Packageorg.flixel
Classpublic class FlxObject
InheritanceFlxObject Inheritance FlxBasic Inheritance Object
Subclasses FlxSprite, FlxTile, FlxTilemap

This is the base class for most of the display objects (FlxSprite, FlxText, etc). It includes some basic attributes about game objects, including retro-style flickering, basic state information, sizes, scrolling, and basic physics and motion.



Public Properties
 PropertyDefined By
  acceleration : FlxPoint
How fast the speed of this object is changing.
FlxObject
 Inheritedactive : Boolean
Controls whether update() is automatically called by FlxState/FlxGroup.
FlxBasic
 Inherited_ACTIVECOUNT : uint
[static]
FlxBasic
 Inheritedalive : Boolean
Useful state for many game objects - "dead" (!alive) vs alive.
FlxBasic
  allowCollisions : uint
Bit field of flags (use with UP, DOWN, LEFT, RIGHT, etc) indicating collision directions.
FlxObject
  angle : Number
Set the angle of a sprite to rotate it.
FlxObject
  angularAcceleration : Number
How fast the spin speed should change.
FlxObject
  angularDrag : Number
Like drag but for spinning.
FlxObject
  angularVelocity : Number
This is how fast you want this sprite to spin.
FlxObject
 Inheritedcameras : Array
An array of camera objects that this object will use during draw().
FlxBasic
  drag : FlxPoint
This isn't drag exactly, more like deceleration that is only applied when acceleration is not affecting the sprite.
FlxObject
  elasticity : Number
The bounciness of this object.
FlxObject
 Inheritedexists : Boolean
Controls whether update() and draw() are automatically called by FlxState/FlxGroup.
FlxBasic
  flickering : Boolean
[read-only] Check to see if the object is still flickering.
FlxObject
  health : Number
Handy for storing health percentage or armor points or whatever.
FlxObject
  height : Number
The height of this object.
FlxObject
 InheritedID : int
IDs seem like they could be pretty useful, huh? They're not actually used for anything yet though.
FlxBasic
 InheritedignoreDrawDebug : Boolean
Setting this to true will prevent the object from appearing when the visual debug mode in the debugger overlay is toggled on.
FlxBasic
  immovable : Boolean
Whether an object will move/alter position after a collision.
FlxObject
  last : FlxPoint
Important variable for collision processing.
FlxObject
  mass : Number
The virtual mass of the object.
FlxObject
  maxAngular : Number
Use in conjunction with angularAcceleration for fluid spin speed control.
FlxObject
  maxVelocity : FlxPoint
If you are using acceleration, you can use maxVelocity with it to cap the speed automatically (very useful!).
FlxObject
  moves : Boolean
Set this to false if you want to skip the automatic motion/movement stuff (see updateMotion()).
FlxObject
  path : FlxPath
A reference to a path object.
FlxObject
  pathAngle : Number
The angle in degrees between this object and the next node, where 0 is directly upward, and 90 is to the right.
FlxObject
  pathSpeed : Number
The speed at which the object is moving on the path.
FlxObject
  scrollFactor : 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
  solid : Boolean
Whether the object collides or not.
FlxObject
  touching : uint
Bit field of flags (use with UP, DOWN, LEFT, RIGHT, etc) indicating surface contacts.
FlxObject
  velocity : FlxPoint
The basic speed of this object.
FlxObject
 Inheritedvisible : Boolean
Controls whether draw() is automatically called by FlxState/FlxGroup.
FlxBasic
 Inherited_VISIBLECOUNT : uint
[static]
FlxBasic
  wasTouching : uint
Bit field of flags (use with UP, DOWN, LEFT, RIGHT, etc) indicating surface contacts from the previous game loop step.
FlxObject
  width : Number
The width of this object.
FlxObject
  x : Number
X position of the upper left corner of this object in world space.
FlxObject
  y : Number
Y position of the upper left corner of this object in world space.
FlxObject
Protected Properties
 PropertyDefined By
  _flicker : Boolean
Internal helper used for retro-style flickering.
FlxObject
  _flickerTimer : Number
Internal helper used for retro-style flickering.
FlxObject
  _pathInc : int
Internal helper for node navigation, specifically yo-yo and backwards movement.
FlxObject
  _pathMode : uint
Internal tracker for path behavior flags (like looping, horizontal only, etc).
FlxObject
  _pathNodeIndex : int
Internal helper, tracks which node of the path this object is moving toward.
FlxObject
  _pathRotate : Boolean
Internal flag for whether hte object's angle should be adjusted to the path angle during path follow behavior.
FlxObject
  _point : FlxPoint
This is just a pre-allocated x-y point container to be used however you like
FlxObject
  _rect : FlxRect
This is just a pre-allocated rectangle container to be used however you like
FlxObject
Public Methods
 MethodDefined By
  
FlxObject(X:Number = 0, Y:Number = 0, Width:Number = 0, Height:Number = 0)
Instantiates a FlxObject.
FlxObject
  
destroy():void
[override] Override this function to null out variables or manually call destroy() on class members if necessary.
FlxObject
  
draw():void
[override] Rarely called, and in this case just increments the visible objects count and calls drawDebug() if necessary.
FlxObject
  
drawDebug(Camera:FlxCamera = null):void
[override] Override this function to draw custom "debug mode" graphics to the specified camera while the debugger's visual mode is toggled on.
FlxObject
  
flicker(Duration:Number = 1):void
Tells this object to flicker, retro-style.
FlxObject
  
followPath(Path:FlxPath, Speed:Number = 100, Mode:uint, AutoRotate:Boolean = false):void
Call this function to give this object a path to follow.
FlxObject
  
Retrieve the midpoint of this object in world coordinates.
FlxObject
  
getScreenXY(Point:FlxPoint = null, Camera:FlxCamera = null):FlxPoint
Call this function to figure out the on-screen position of the object.
FlxObject
  
hurt(Damage:Number):void
Reduces the "health" variable of this sprite by the amount specified in Damage.
FlxObject
  
isTouching(Direction:uint):Boolean
Handy function for checking if this object is touching a particular surface.
FlxObject
  
justTouched(Direction:uint):Boolean
Handy function for checking if this object is just landed on a particular surface.
FlxObject
 Inherited
kill():void
Handy function for "killing" game objects.
FlxBasic
  
onScreen(Camera:FlxCamera = null):Boolean
Check and see if this object is currently on screen.
FlxObject
  
overlaps(ObjectOrGroup:FlxBasic, InScreenSpace:Boolean = false, Camera:FlxCamera = null):Boolean
Checks to see if some FlxObject overlaps this FlxObject or FlxGroup.
FlxObject
  
overlapsAt(X:Number, Y:Number, ObjectOrGroup:FlxBasic, InScreenSpace:Boolean = false, Camera:FlxCamera = null):Boolean
Checks to see if this FlxObject were located at the given position, would it overlap the FlxObject or FlxGroup? This is distinct from overlapsPoint(), which just checks that point, rather than taking the object's size into account.
FlxObject
  
overlapsPoint(Point:FlxPoint, InScreenSpace:Boolean = false, Camera:FlxCamera = null):Boolean
Checks to see if a point in 2D world space overlaps this FlxObject object.
FlxObject
  
postUpdate():void
[override] Post-update is called right after update() on each object in the game loop.
FlxObject
  
preUpdate():void
[override] Pre-update is called right before update() on each object in the game loop.
FlxObject
  
reset(X:Number, Y:Number):void
Handy function for reviving game objects.
FlxObject
 Inherited
revive():void
Handy function for bringing game objects "back to life".
FlxBasic
  
separate(Object1:FlxObject, Object2:FlxObject):Boolean
[static] The main collision resolution function in flixel.
FlxObject
  
separateX(Object1:FlxObject, Object2:FlxObject):Boolean
[static] The X-axis component of the object separation process.
FlxObject
  
separateY(Object1:FlxObject, Object2:FlxObject):Boolean
[static] The Y-axis component of the object separation process.
FlxObject
  
stopFollowingPath(DestroyPath:Boolean = false):void
Tells this object to stop following the path its on.
FlxObject
 Inherited
toString():String
Convert object to readable string name.
FlxBasic
 Inherited
update():void
Override this function to update your class's position and appearance.
FlxBasic
Protected Methods
 MethodDefined By
  
advancePath(Snap:Boolean = true):FlxPoint
Internal function that decides what node in the path to aim for next based on the behavior flags.
FlxObject
  
Internal function for updating the position and speed of this object.
FlxObject
  
Internal function for moving the object along the path.
FlxObject
Public Constants
 ConstantDefined By
  ANY : uint
[static] Special-case constant meaning any direction, used mainly by allowCollisions and touching.
FlxObject
  CEILING : uint = 0x0100
[static] Special-case constant meaning up, used mainly by allowCollisions and touching.
FlxObject
  DOWN : uint = 0x1000
[static] Generic value for "down" Used by facing, allowCollisions, and touching.
FlxObject
  FLOOR : uint = 0x1000
[static] Special-case constant meaning down, used mainly by allowCollisions and touching.
FlxObject
  LEFT : uint = 0x0001
[static] Generic value for "left" Used by facing, allowCollisions, and touching.
FlxObject
  NONE : uint = 0
[static] Special-case constant meaning no collisions, used mainly by allowCollisions and touching.
FlxObject
  OVERLAP_BIAS : Number = 4
[static] Handy constant used during collision resolution (see separateX() and separateY()).
FlxObject
  PATH_BACKWARD : uint = 0x000001
[static] Path behavior controls: move from the end of the path to the start then stop.
FlxObject
  PATH_FORWARD : uint = 0x000000
[static] Path behavior controls: move from the start of the path to the end then stop.
FlxObject
  PATH_HORIZONTAL_ONLY : uint = 0x010000
[static] Path behavior controls: ignores any vertical component to the path data, only follows side to side.
FlxObject
  PATH_LOOP_BACKWARD : uint = 0x000100
[static] Path behavior controls: move from the end of the path to the start then directly back to the end, and start over.
FlxObject
  PATH_LOOP_FORWARD : uint = 0x000010
[static] Path behavior controls: move from the start of the path to the end then directly back to the start, and start over.
FlxObject
  PATH_VERTICAL_ONLY : uint = 0x100000
[static] Path behavior controls: ignores any horizontal component to the path data, only follows up and down.
FlxObject
  PATH_YOYO : uint = 0x001000
[static] Path behavior controls: move from the start of the path to the end then turn around and go back to the start, over and over.
FlxObject
  RIGHT : uint = 0x0010
[static] Generic value for "right" Used by facing, allowCollisions, and touching.
FlxObject
  UP : uint = 0x0100
[static] Generic value for "up" Used by facing, allowCollisions, and touching.
FlxObject
  WALL : uint
[static] Special-case constant meaning only the left and right sides, used mainly by allowCollisions and touching.
FlxObject
Protected Constants
 ConstantDefined By
  _pZero : FlxPoint
[static] Should always represent (0,0) - useful for different things, for avoiding unnecessary new calls.
FlxObject
Property Detail
_flickerproperty
protected var _flicker:Boolean

Internal helper used for retro-style flickering.

_flickerTimerproperty 
protected var _flickerTimer:Number

Internal helper used for retro-style flickering.

_pathIncproperty 
protected var _pathInc:int

Internal helper for node navigation, specifically yo-yo and backwards movement.

_pathModeproperty 
protected var _pathMode:uint

Internal tracker for path behavior flags (like looping, horizontal only, etc).

_pathNodeIndexproperty 
protected var _pathNodeIndex:int

Internal helper, tracks which node of the path this object is moving toward.

_pathRotateproperty 
protected var _pathRotate:Boolean

Internal flag for whether hte object's angle should be adjusted to the path angle during path follow behavior.

_pointproperty 
protected var _point:FlxPoint

This is just a pre-allocated x-y point container to be used however you like

_rectproperty 
protected var _rect:FlxRect

This is just a pre-allocated rectangle container to be used however you like

accelerationproperty 
public var acceleration:FlxPoint

How fast the speed of this object is changing. Useful for smooth movement and gravity.

allowCollisionsproperty 
public var allowCollisions:uint

Bit field of flags (use with UP, DOWN, LEFT, RIGHT, etc) indicating collision directions. Use bitwise operators to check the values stored here. Useful for things like one-way platforms (e.g. allowCollisions = UP;) The accessor "solid" just flips this variable between NONE and ANY.

angleproperty 
public var angle:Number

Set the angle of a sprite to rotate it. WARNING: rotating sprites decreases rendering performance for this sprite by a factor of 10x!

angularAccelerationproperty 
public var angularAcceleration:Number

How fast the spin speed should change.

angularDragproperty 
public var angularDrag:Number

Like drag but for spinning.

angularVelocityproperty 
public var angularVelocity:Number

This is how fast you want this sprite to spin.

dragproperty 
public var drag:FlxPoint

This isn't drag exactly, more like deceleration that is only applied when acceleration is not affecting the sprite.

elasticityproperty 
public var elasticity:Number

The bounciness of this object. Only affects collisions. Default value is 0, or "not bouncy at all."

flickeringproperty 
flickering:Boolean  [read-only]

Check to see if the object is still flickering.


Implementation
    public function get flickering():Boolean
healthproperty 
public var health:Number

Handy for storing health percentage or armor points or whatever.

heightproperty 
public var height:Number

The height of this object.

immovableproperty 
public var immovable:Boolean

Whether an object will move/alter position after a collision.

lastproperty 
public var last:FlxPoint

Important variable for collision processing. By default this value is set automatically during preUpdate().

massproperty 
public var mass:Number

The virtual mass of the object. Default value is 1. Currently only used with elasticity during collision resolution. Change at your own risk; effects seem crazy unpredictable so far!

maxAngularproperty 
public var maxAngular:Number

Use in conjunction with angularAcceleration for fluid spin speed control.

maxVelocityproperty 
public var maxVelocity:FlxPoint

If you are using acceleration, you can use maxVelocity with it to cap the speed automatically (very useful!).

movesproperty 
public var moves:Boolean

Set this to false if you want to skip the automatic motion/movement stuff (see updateMotion()). FlxObject and FlxSprite default to true. FlxText, FlxTileblock, FlxTilemap and FlxSound default to false.

pathproperty 
public var path:FlxPath

A reference to a path object. Null by default, assigned by followPath().

pathAngleproperty 
public var pathAngle:Number

The angle in degrees between this object and the next node, where 0 is directly upward, and 90 is to the right.

pathSpeedproperty 
public var pathSpeed:Number

The speed at which the object is moving on the path. When an object completes a non-looping path circuit, the pathSpeed will be zeroed out, but the path reference will NOT be nulled out. So pathSpeed is a good way to check if this object is currently following a path or not.

scrollFactorproperty 
public var scrollFactor: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. 0 means it never moves, like a HUD element or far background graphic. 1 means it scrolls along a the same speed as the foreground layer. scrollFactor is initialized as (1,1) by default.

solidproperty 
solid:Boolean

Whether the object collides or not. For more control over what directions the object will collide from, use collision constants (like LEFT, FLOOR, etc) to set the value of allowCollisions directly.


Implementation
    public function get solid():Boolean
    public function set solid(value:Boolean):void
touchingproperty 
public var touching:uint

Bit field of flags (use with UP, DOWN, LEFT, RIGHT, etc) indicating surface contacts. Use bitwise operators to check the values stored here, or use touching(), justStartedTouching(), etc. You can even use them broadly as boolean values if you're feeling saucy!

velocityproperty 
public var velocity:FlxPoint

The basic speed of this object.

wasTouchingproperty 
public var wasTouching:uint

Bit field of flags (use with UP, DOWN, LEFT, RIGHT, etc) indicating surface contacts from the previous game loop step. Use bitwise operators to check the values stored here, or use touching(), justStartedTouching(), etc. You can even use them broadly as boolean values if you're feeling saucy!

widthproperty 
public var width:Number

The width of this object.

xproperty 
public var x:Number

X position of the upper left corner of this object in world space.

yproperty 
public var y:Number

Y position of the upper left corner of this object in world space.

Constructor Detail
FlxObject()Constructor
public function FlxObject(X:Number = 0, Y:Number = 0, Width:Number = 0, Height:Number = 0)

Instantiates a FlxObject.

Parameters
X:Number (default = 0) — The X-coordinate of the point in space.
 
Y:Number (default = 0) — The Y-coordinate of the point in space.
 
Width:Number (default = 0) — Desired width of the rectangle.
 
Height:Number (default = 0) — Desired height of the rectangle.
Method Detail
advancePath()method
protected function advancePath(Snap:Boolean = true):FlxPoint

Internal function that decides what node in the path to aim for next based on the behavior flags.

Parameters

Snap:Boolean (default = true)

Returns
FlxPoint — The node (a FlxPoint object) we are aiming for next.
destroy()method 
override public function destroy():void

Override this function to null out variables or manually call destroy() on class members if necessary. Don't forget to call super.destroy()!

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

Rarely called, and in this case just increments the visible objects count and calls drawDebug() if necessary.

drawDebug()method 
override public function drawDebug(Camera:FlxCamera = null):void

Override this function to draw custom "debug mode" graphics to the specified camera while the debugger's visual mode is toggled on.

Parameters

Camera:FlxCamera (default = null) — Which camera to draw the debug visuals to.

flicker()method 
public function flicker(Duration:Number = 1):void

Tells this object to flicker, retro-style. Pass a negative value to flicker forever.

Parameters

Duration:Number (default = 1) — How many seconds to flicker for.

followPath()method 
public function followPath(Path:FlxPath, Speed:Number = 100, Mode:uint, AutoRotate:Boolean = false):void

Call this function to give this object a path to follow. If the path does not have at least one node in it, this function will log a warning message and return.

Parameters

Path:FlxPath — The FlxPath you want this object to follow.
 
Speed:Number (default = 100) — How fast to travel along the path in pixels per second.
 
Mode:uint (default = NaN) — Optional, controls the behavior of the object following the path using the path behavior constants. Can use multiple flags at once, for example PATH_YOYO|PATH_HORIZONTAL_ONLY will make an object move back and forth along the X axis of the path only.
 
AutoRotate:Boolean (default = false) — Automatically point the object toward the next node. Assumes the graphic is pointing upward. Default behavior is false, or no automatic rotation.

getMidpoint()method 
public function getMidpoint(Point:FlxPoint = null):FlxPoint

Retrieve the midpoint of this object in world coordinates.

Parameters

Point:FlxPoint (default = null)

Returns
FlxPoint — A FlxPoint object containing the midpoint of this object in world coordinates.
getScreenXY()method 
public function getScreenXY(Point:FlxPoint = null, Camera:FlxCamera = null):FlxPoint

Call this function to figure out the on-screen position of the object.

Parameters

Point:FlxPoint (default = null) — Specify which game camera you want. If null getScreenXY() will just grab the first global camera.
 
Camera:FlxCamera (default = null) — Takes a FlxPoint object and assigns the post-scrolled X and Y values of this object to it.

Returns
FlxPoint — The Point you passed in, or a new Point if you didn't pass one, containing the screen X and Y position of this object.
hurt()method 
public function hurt(Damage:Number):void

Reduces the "health" variable of this sprite by the amount specified in Damage. Calls kill() if health drops to or below zero.

Parameters

Damage:Number — How much health to take away (use a negative number to give a health bonus).

isTouching()method 
public function isTouching(Direction:uint):Boolean

Handy function for checking if this object is touching a particular surface. For slightly better performance you can just & the value directly into touching. However, this method is good for readability and accessibility.

Parameters

Direction:uint — Any of the collision flags (e.g. LEFT, FLOOR, etc).

Returns
Boolean — Whether the object is touching an object in (any of) the specified direction(s) this frame.
justTouched()method 
public function justTouched(Direction:uint):Boolean

Handy function for checking if this object is just landed on a particular surface.

Parameters

Direction:uint — Any of the collision flags (e.g. LEFT, FLOOR, etc).

Returns
Boolean — Whether the object just landed on (any of) the specified surface(s) this frame.
onScreen()method 
public function onScreen(Camera:FlxCamera = null):Boolean

Check and see if this object is currently on screen.

Parameters

Camera:FlxCamera (default = null) — Specify which game camera you want. If null getScreenXY() will just grab the first global camera.

Returns
Boolean — Whether the object is on screen or not.
overlaps()method 
public function overlaps(ObjectOrGroup:FlxBasic, InScreenSpace:Boolean = false, Camera:FlxCamera = null):Boolean

Checks to see if some FlxObject overlaps this FlxObject or FlxGroup. If the group has a LOT of things in it, it might be faster to use FlxG.overlaps(). WARNING: Currently tilemaps do NOT support screen space overlap checks!

Parameters

ObjectOrGroup:FlxBasic — The object or group being tested.
 
InScreenSpace:Boolean (default = false) — Whether to take scroll factors into account when checking for overlap. Default is false, or "only compare in world space."
 
Camera:FlxCamera (default = null) — Specify which game camera you want. If null getScreenXY() will just grab the first global camera.

Returns
Boolean — Whether or not the two objects overlap.
overlapsAt()method 
public function overlapsAt(X:Number, Y:Number, ObjectOrGroup:FlxBasic, InScreenSpace:Boolean = false, Camera:FlxCamera = null):Boolean

Checks to see if this FlxObject were located at the given position, would it overlap the FlxObject or FlxGroup? This is distinct from overlapsPoint(), which just checks that point, rather than taking the object's size into account. WARNING: Currently tilemaps do NOT support screen space overlap checks!

Parameters

X:Number — The X position you want to check. Pretends this object (the caller, not the parameter) is located here.
 
Y:Number — The Y position you want to check. Pretends this object (the caller, not the parameter) is located here.
 
ObjectOrGroup:FlxBasic — The object or group being tested.
 
InScreenSpace:Boolean (default = false) — Whether to take scroll factors into account when checking for overlap. Default is false, or "only compare in world space."
 
Camera:FlxCamera (default = null) — Specify which game camera you want. If null getScreenXY() will just grab the first global camera.

Returns
Boolean — Whether or not the two objects overlap.
overlapsPoint()method 
public function overlapsPoint(Point:FlxPoint, InScreenSpace:Boolean = false, Camera:FlxCamera = null):Boolean

Checks to see if a point in 2D world space overlaps this FlxObject object.

Parameters

Point:FlxPoint — The point in world space you want to check.
 
InScreenSpace:Boolean (default = false) — Whether to take scroll factors into account when checking for overlap.
 
Camera:FlxCamera (default = null) — Specify which game camera you want. If null getScreenXY() will just grab the first global camera.

Returns
Boolean — Whether or not the point overlaps this object.
postUpdate()method 
override public function postUpdate():void

Post-update is called right after update() on each object in the game loop. In FlxObject this function handles integrating the objects motion based on the velocity and acceleration settings, and tracking/clearing the touching flags.

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

Pre-update is called right before update() on each object in the game loop. In FlxObject it controls the flicker timer, tracking the last coordinates for collision purposes, and checking if the object is moving along a path or not.

reset()method 
public function reset(X:Number, Y:Number):void

Handy function for reviving game objects. Resets their existence flags and position.

Parameters

X:Number — The new X position of this object.
 
Y:Number — The new Y position of this object.

separate()method 
public static function separate(Object1:FlxObject, Object2:FlxObject):Boolean

The main collision resolution function in flixel.

Parameters

Object1:FlxObject — Any FlxObject.
 
Object2:FlxObject — Any other FlxObject.

Returns
Boolean — Whether the objects in fact touched and were separated.
separateX()method 
public static function separateX(Object1:FlxObject, Object2:FlxObject):Boolean

The X-axis component of the object separation process.

Parameters

Object1:FlxObject — Any FlxObject.
 
Object2:FlxObject — Any other FlxObject.

Returns
Boolean — Whether the objects in fact touched and were separated along the X axis.
separateY()method 
public static function separateY(Object1:FlxObject, Object2:FlxObject):Boolean

The Y-axis component of the object separation process.

Parameters

Object1:FlxObject — Any FlxObject.
 
Object2:FlxObject — Any other FlxObject.

Returns
Boolean — Whether the objects in fact touched and were separated along the Y axis.
stopFollowingPath()method 
public function stopFollowingPath(DestroyPath:Boolean = false):void

Tells this object to stop following the path its on.

Parameters

DestroyPath:Boolean (default = false) — Tells this function whether to call destroy on the path object. Default value is false.

updateMotion()method 
protected function updateMotion():void

Internal function for updating the position and speed of this object. Useful for cases when you need to update this but are buried down in too many supers. Does a slightly fancier-than-normal integration to help with higher fidelity framerate-independenct motion.

updatePathMotion()method 
protected function updatePathMotion():void

Internal function for moving the object along the path. Generally this function is called automatically by preUpdate(). The first half of the function decides if the object can advance to the next node in the path, while the second half handles actually picking a velocity toward the next node.

Constant Detail
_pZeroConstant
protected static const _pZero:FlxPoint

Should always represent (0,0) - useful for different things, for avoiding unnecessary new calls.

ANYConstant 
public static const ANY:uint

Special-case constant meaning any direction, used mainly by allowCollisions and touching.

CEILINGConstant 
public static const CEILING:uint = 0x0100

Special-case constant meaning up, used mainly by allowCollisions and touching.

DOWNConstant 
public static const DOWN:uint = 0x1000

Generic value for "down" Used by facing, allowCollisions, and touching.

FLOORConstant 
public static const FLOOR:uint = 0x1000

Special-case constant meaning down, used mainly by allowCollisions and touching.

LEFTConstant 
public static const LEFT:uint = 0x0001

Generic value for "left" Used by facing, allowCollisions, and touching.

NONEConstant 
public static const NONE:uint = 0

Special-case constant meaning no collisions, used mainly by allowCollisions and touching.

OVERLAP_BIASConstant 
public static const OVERLAP_BIAS:Number = 4

Handy constant used during collision resolution (see separateX() and separateY()).

PATH_BACKWARDConstant 
public static const PATH_BACKWARD:uint = 0x000001

Path behavior controls: move from the end of the path to the start then stop.

PATH_FORWARDConstant 
public static const PATH_FORWARD:uint = 0x000000

Path behavior controls: move from the start of the path to the end then stop.

PATH_HORIZONTAL_ONLYConstant 
public static const PATH_HORIZONTAL_ONLY:uint = 0x010000

Path behavior controls: ignores any vertical component to the path data, only follows side to side.

PATH_LOOP_BACKWARDConstant 
public static const PATH_LOOP_BACKWARD:uint = 0x000100

Path behavior controls: move from the end of the path to the start then directly back to the end, and start over.

PATH_LOOP_FORWARDConstant 
public static const PATH_LOOP_FORWARD:uint = 0x000010

Path behavior controls: move from the start of the path to the end then directly back to the start, and start over.

PATH_VERTICAL_ONLYConstant 
public static const PATH_VERTICAL_ONLY:uint = 0x100000

Path behavior controls: ignores any horizontal component to the path data, only follows up and down.

PATH_YOYOConstant 
public static const PATH_YOYO:uint = 0x001000

Path behavior controls: move from the start of the path to the end then turn around and go back to the start, over and over.

RIGHTConstant 
public static const RIGHT:uint = 0x0010

Generic value for "right" Used by facing, allowCollisions, and touching.

UPConstant 
public static const UP:uint = 0x0100

Generic value for "up" Used by facing, allowCollisions, and touching.

WALLConstant 
public static const WALL:uint

Special-case constant meaning only the left and right sides, used mainly by allowCollisions and touching.