Packagestencyl.api.engine.gui
Classpublic class Panel
InheritancePanel Inheritance FlxGroup Inheritance FlxObject Inheritance FlxRect Inheritance FlxPoint Inheritance Object
Implements Component



Public Properties
 PropertyDefined By
 Inheritedacceleration : FlxPoint
How fast the speed of this object is changing.
FlxObject
 Inheritedactive : Boolean
If an object is not alive, the game loop will not automatically call update() on it.
FlxObject
 Inheritedangle : Number
Set the angle of a sprite to rotate it.
FlxObject
 InheritedangularAcceleration : Number
How fast the spin speed should change.
FlxObject
 InheritedangularDrag : Number
Like drag but for spinning.
FlxObject
 InheritedangularVelocity : Number
This is how fast you want this sprite to spin.
FlxObject
 Inheritedbottom : Number
[read-only] The Y coordinate of the bottom of the rectangle.
FlxRect
  bottomEdge : BitmapData
Panel
  bottomLeft : BitmapData
Panel
  bottomRight : BitmapData
Panel
  cache : BitmapData
Panel
  center : BitmapData
Panel
 InheritedcolHullX : FlxRect
These store a couple of useful numbers for speeding up collision resolution.
FlxObject
 InheritedcolHullY : FlxRect
These store a couple of useful numbers for speeding up collision resolution.
FlxObject
 InheritedcollideBottom : Boolean
Flag for direction collision resolution.
FlxObject
 InheritedcollideLeft : Boolean
Flag for direction collision resolution.
FlxObject
 InheritedcollideRight : Boolean
Flag for direction collision resolution.
FlxObject
 InheritedcollideTop : Boolean
Flag for direction collision resolution.
FlxObject
 InheritedcolOffsets : Array
An array of FlxPoint objects.
FlxObject
  color : uint = 0x00ffffff
Panel
 InheritedcolVector : FlxPoint
These store a couple of useful numbers for speeding up collision resolution.
FlxObject
  ct : ColorTransform
Panel
 Inheriteddead : Boolean
Handy for tracking gameplay or animations.
FlxObject
 Inheriteddrag : FlxPoint
This isn't drag exactly, more like deceleration that is only applied when acceleration is not affecting the sprite.
FlxObject
 Inheritedexists : Boolean
Kind of a global on/off switch for any objects descended from FlxObject.
FlxObject
 Inheritedfixed : Boolean
If an object is 'fixed' in space, it will not budge when it collides with a not-fixed object.
FlxObject
  game : GameState
Panel
 Inherited_group : Boolean
Dedicated internal flag for whether or not this class is a FlxGroup.
FlxObject
  hasBackground : Boolean
Panel
 Inheritedhealth : Number
Handy for storing health percentage or armor points or whatever.
FlxObject
 Inheritedheight : Number
FlxRect
 InheritedID : int
FlxGroup
 Inheritedleft : Number
[read-only] The X coordinate of the left side of the rectangle.
FlxRect
  leftEdge : BitmapData
Panel
 InheritedmaxAngular : Number
Use in conjunction with angularAcceleration for fluid spin speed control.
FlxObject
 InheritedmaxThrust : Number
Used to cap thrust, helpful and easy!
FlxObject
 InheritedmaxVelocity : FlxPoint
If you are using acceleration, you can use maxVelocity with it to cap the speed automatically (very useful!).
FlxObject
 Inheritedmembers : Array
Array of all the FlxObjects that exist in this layer.
FlxGroup
 Inheritedmoves : Boolean
Set this to false if you want to skip the automatic motion/movement stuff (see updateMotion()).
FlxObject
 Inheritedname : String
FlxGroup
 InheritedonFloor : Boolean
Flag that indicates whether or not you just hit the floor.
FlxObject
  _opacity : Number = 256
Panel
  opacity : Number
Panel
 Inheritedorigin : FlxPoint
WARNING: The origin of the sprite will default to its center.
FlxObject
  parent : Panel
Panel
 Inheritedright : Number
[read-only] The X coordinate of the right side of the rectangle.
FlxRect
  rightEdge : BitmapData
Panel
 InheritedscrollFactor : FlxPoint
A point that can store numbers from 0 to 1 (for X and Y independently) that governs how much this object is affected by the camera subsystem.
FlxObject
 Inheritedsolid : Boolean
If an object is dead, the functions that automate collisions will skip it (see FlxG.overlapArrays() and FlxG.collideArrays()).
FlxObject
 Inheritedthrust : Number
If you want to do Asteroids style stuff, check out thrust, instead of directly accessing the object's velocity or acceleration.
FlxObject
 Inheritedtop : Number
[read-only] The Y coordinate of the top of the rectangle.
FlxRect
  topEdge : BitmapData
Panel
  topLeft : BitmapData
Panel
  topRight : BitmapData
Panel
 Inheritedvelocity : FlxPoint
The basic speed of this object.
FlxObject
 Inheritedvisible : Boolean
If an object is not visible, the game loop will not automatically call render() on it.
FlxObject
 Inheritedwidth : Number
FlxRect
 Inheritedx : Number
FlxPoint
 Inheritedy : Number
FlxPoint
Protected Properties
 PropertyDefined By
 Inherited_first : Boolean
FlxGroup
 Inherited_flashPoint : Point
This is a pre-allocated Flash Point object, which is useful for certain Flash graphics API calls
FlxObject
 Inherited_flicker : Boolean
Internal helper used for retro-style flickering.
FlxObject
 Inherited_flickerTimer : Number
Internal helper used for retro-style flickering.
FlxObject
 Inherited_last : FlxPoint
Helpers for moving/updating group members.
FlxGroup
 Inherited_point : FlxPoint
This is just a pre-allocated x-y point container to be used however you like
FlxObject
 Inherited_rect : FlxRect
This is just a pre-allocated rectangle container to be used however you like
FlxObject
Public Methods
 MethodDefined By
  
Panel(x:int, y:int, w:int, h:int)
Panel
 Inherited
add(Object:FlxObject, ShareScroll:Boolean = false):FlxObject
Adds a new FlxObject subclass (FlxSprite, FlxBlock, etc) to the list of children
FlxGroup
  
Panel
  
Panel
  
Panel
 Inherited
collide(Object:FlxObject = null):Boolean
FlxObject
  
contains(c:Component):Boolean
Panel
 Inherited
countDead():int
Call this function to find out how many members of the group are dead.
FlxGroup
 Inherited
Call this function to find out how many members of the group are not dead.
FlxGroup
 Inherited
Returns a count of how many objects in this group are on-screen right now.
FlxGroup
 Inherited
destroy():void
[override] Override this function to handle any deleting or "shutdown" type operations you might need, such as removing traditional Flash children like Sprite objects.
FlxGroup
  
fadeTo(value:Number, duration:int = 1000, easing:String = linear, delay:int = 0):void
Panel
 Inherited
flicker(Duration:Number = 1):void
Tells this object to flicker, retro-style.
FlxObject
 Inherited
flickering():Boolean
Check to see if the object is still flickering.
FlxObject
  
getAngle():Number
Panel
  
Panel
 Inherited
Call this function to retrieve the first object with dead == false in the group.
FlxGroup
 Inherited
Call this function to retrieve the first object with exists == false in the group.
FlxGroup
 Inherited
Call this function to retrieve the first object with dead == true in the group.
FlxGroup
 Inherited
Call this function to retrieve the first object with exists == true in the group.
FlxGroup
 Inherited
Call this function to retrieve the first index set to 'null'.
FlxGroup
  
getHeight():Number
Panel
  
Panel
  
getOpacity():Number
Panel
  
Panel
  
getParentX():Number
Panel
  
getParentY():Number
Panel
 Inherited
Returns a member at random from the group.
FlxGroup
 Inherited
Call this function to figure out the on-screen position of the object.
FlxObject
  
getWidth():Number
Panel
  
getX():Number
Panel
  
getY():Number
Panel
 Inherited
hitBottom(Contact:FlxObject, Velocity:Number):void
Called when this object's bottom edge collides with the top of another FlxObject.
FlxObject
 Inherited
hitLeft(Contact:FlxObject, Velocity:Number):void
Called when this object's left side collides with another FlxObject's right.
FlxObject
 Inherited
hitRight(Contact:FlxObject, Velocity:Number):void
Called when this object's right side collides with another FlxObject's left.
FlxObject
 Inherited
hitTop(Contact:FlxObject, Velocity:Number):void
Called when this object's top collides with the bottom of another FlxObject.
FlxObject
 Inherited
hurt(Damage:Number):void
Call this function to "damage" (or give health bonus) to this sprite.
FlxObject
  
isVisible():Boolean
Panel
 Inherited
kill():void
[override] Calls kill on the group and all its members.
FlxGroup
  
moveBy(x:Number, y:Number, duration:int = 1000, easing:String = linear, delay:int = 0):void
Panel
  
moveTo(x:Number, y:Number, duration:int = 1000, easing:String = linear, delay:int = 0):void
Panel
 Inherited
onScreen():Boolean
Check and see if this object is currently on screen.
FlxObject
 Inherited
overlaps(Object:FlxObject):Boolean
Checks to see if some FlxObject object overlaps this FlxObject object.
FlxObject
 Inherited
overlapsPoint(X:Number, Y:Number, PerPixel:Boolean = false):Boolean
Checks to see if a point in 2D space overlaps this FlxObject object.
FlxObject
  
pack():void
Panel
 Inherited
preCollide(Object:FlxObject):void
FlxU.collide() (and thus FlxObject.collide()) call this function each time two objects are compared to see if they collide.
FlxObject
 Inherited
Called by FlxObject.updateMotion() and some constructors to rebuild the basic collision data for this object.
FlxObject
 Inherited
remove(Object:FlxObject, Splice:Boolean = false):FlxObject
Removes an object from the group.
FlxGroup
  
Panel
  
render():void
[override]
Panel
 Inherited
replace(OldObject:FlxObject, NewObject:FlxObject):FlxObject
Replaces an existing FlxObject with a new one.
FlxGroup
 Inherited
reset(X:Number, Y:Number):void
[override] If the group's position is reset, we want to reset all its members too.
FlxGroup
 Inherited
resetFirstAvail(X:Number = 0, Y:Number = 0):Boolean
Finds the first object with exists == false and calls reset on it.
FlxGroup
  
Panel
  
Panel
  
setBackground(img:BitmapData, cornerWidth:int, cornerHeight:int):void
Panel
  
setOpacity(opacity:Number):void
Panel
  
Panel
  
setVisible(isVisible:Boolean):void
Panel
  
spinBy(angle:Number, duration:int = 1000, easing:String = linear, delay:int = 0):void
Panel
  
spinTo(angle:Number, duration:int = 1000, easing:String = linear, delay:int = 0):void
Panel
 Inherited
toString():String
[override]
FlxGroup
  
update():void
[override]
Panel
Protected Methods
 MethodDefined By
 Inherited
Internal function that actually loops through and destroys each member.
FlxGroup
 Inherited
Internal function that calls kill on all members.
FlxGroup
 Inherited
Internal function that actually loops through and renders all the group members.
FlxGroup
 Inherited
Internal function, helps with the moving/updating of group members.
FlxGroup
 Inherited
Just updates the retro-style flickering.
FlxObject
 Inherited
Internal function that actually goes through and updates all the group members.
FlxGroup
 Inherited
Internal function for updating the position and speed of this object.
FlxObject
Protected Constants
 ConstantDefined By
 Inherited_pZero : FlxPoint
[static] A handy "empty point" object
FlxObject
Property Detail
_opacityproperty
public var _opacity:Number = 256

bottomEdgeproperty 
public var bottomEdge:BitmapData

bottomLeftproperty 
public var bottomLeft:BitmapData

bottomRightproperty 
public var bottomRight:BitmapData

cacheproperty 
public var cache:BitmapData

centerproperty 
public var center:BitmapData

colorproperty 
public var color:uint = 0x00ffffff

ctproperty 
public var ct:ColorTransform

gameproperty 
public var game:GameState

hasBackgroundproperty 
public var hasBackground:Boolean

leftEdgeproperty 
public var leftEdge:BitmapData

opacityproperty 
opacity:Number


Implementation
    public function get opacity():Number
    public function set opacity(value:Number):void
parentproperty 
public var parent:Panel

rightEdgeproperty 
public var rightEdge:BitmapData

topEdgeproperty 
public var topEdge:BitmapData

topLeftproperty 
public var topLeft:BitmapData

topRightproperty 
public var topRight:BitmapData

Constructor Detail
Panel()Constructor
public function Panel(x:int, y:int, w:int, h:int)



Parameters
x:int
 
y:int
 
w:int
 
h:int
Method Detail
addComponent()method
public function addComponent(c:Component):void

Parameters

c:Component

bringForward()method 
public function bringForward(c:Component):void

Parameters

c:Component

bringToFront()method 
public function bringToFront(c:Component):void

Parameters

c:Component

contains()method 
public function contains(c:Component):Boolean

Parameters

c:Component

Returns
Boolean
fadeTo()method 
public function fadeTo(value:Number, duration:int = 1000, easing:String = linear, delay:int = 0):void

Parameters

value:Number
 
duration:int (default = 1000)
 
easing:String (default = linear)
 
delay:int (default = 0)

getAngle()method 
public function getAngle():Number

Returns
Number
getComponents()method 
public function getComponents():Array

Returns
Array
getHeight()method 
public function getHeight():Number

Returns
Number
getNumComponents()method 
public function getNumComponents():int

Returns
int
getOpacity()method 
public function getOpacity():Number

Returns
Number
getParentPanel()method 
public function getParentPanel():Panel

Returns
Panel
getParentX()method 
public function getParentX():Number

Returns
Number
getParentY()method 
public function getParentY():Number

Returns
Number
getWidth()method 
public function getWidth():Number

Returns
Number
getX()method 
public function getX():Number

Returns
Number
getY()method 
public function getY():Number

Returns
Number
isVisible()method 
public function isVisible():Boolean

Returns
Boolean
moveBy()method 
public function moveBy(x:Number, y:Number, duration:int = 1000, easing:String = linear, delay:int = 0):void

Parameters

x:Number
 
y:Number
 
duration:int (default = 1000)
 
easing:String (default = linear)
 
delay:int (default = 0)

moveTo()method 
public function moveTo(x:Number, y:Number, duration:int = 1000, easing:String = linear, delay:int = 0):void

Parameters

x:Number
 
y:Number
 
duration:int (default = 1000)
 
easing:String (default = linear)
 
delay:int (default = 0)

pack()method 
public function pack():void

removeComponent()method 
public function removeComponent(c:Component):void

Parameters

c:Component

render()method 
override public function render():void

sendBackward()method 
public function sendBackward(c:Component):void

Parameters

c:Component

sendToBack()method 
public function sendToBack(c:Component):void

Parameters

c:Component

setBackground()method 
public function setBackground(img:BitmapData, cornerWidth:int, cornerHeight:int):void

Parameters

img:BitmapData
 
cornerWidth:int
 
cornerHeight:int

setOpacity()method 
public function setOpacity(opacity:Number):void

Parameters

opacity:Number

setParentPanel()method 
public function setParentPanel(p:Panel):void

Parameters

p:Panel

setVisible()method 
public function setVisible(isVisible:Boolean):void

Parameters

isVisible:Boolean

spinBy()method 
public function spinBy(angle:Number, duration:int = 1000, easing:String = linear, delay:int = 0):void

Parameters

angle:Number
 
duration:int (default = 1000)
 
easing:String (default = linear)
 
delay:int (default = 0)

spinTo()method 
public function spinTo(angle:Number, duration:int = 1000, easing:String = linear, delay:int = 0):void

Parameters

angle:Number
 
duration:int (default = 1000)
 
easing:String (default = linear)
 
delay:int (default = 0)

update()method 
override public function update():void