Packagecom.flashdynamix.motion.guides
Classpublic class Direction2D

Allows for Objects to follow a 2D directional path. This path is made from a list of points these points are through points for the direction path.



Public Properties
 PropertyDefined by
  angle : Number
Direction2D
  autoRotate : Boolean = false
Whether the Object will directionally rotate.
Direction2D
  distance : Number
Direction2D
  endX : Number
[read-only]
Direction2D
  endY : Number
[read-only]
Direction2D
  item : Object
The Object you wish to be updated with x,y values
Direction2D
  position : Number
Direction2D
Public Methods
 MethodDefined by
  
Direction2D(item:Object, angle:Boolean, distance:*, startDistance:* = 0, autoRotate:* = false)
Direction2D
Property detail
angleproperty
angle:Number  [read-write]

Implementation
    public function get angle():Number
    public function set angle(value:Number):void
autoRotateproperty 
public var autoRotate:Boolean = false

Whether the Object will directionally rotate.

distanceproperty 
distance:Number  [read-write]

Implementation
    public function get distance():Number
    public function set distance(value:Number):void
endXproperty 
endX:Number  [read-only]Implementation
    public function get endX():Number
endYproperty 
endY:Number  [read-only]Implementation
    public function get endY():Number
itemproperty 
public var item:Object

The Object you wish to be updated with x,y values

positionproperty 
position:Number  [read-write]

Implementation
    public function get position():Number
    public function set position(value:Number):void
Constructor detail
Direction2D()constructor
public function Direction2D(item:Object, angle:Boolean, distance:*, startDistance:* = 0, autoRotate:* = false)

Parameters
item:Object — The Object you wish to be updated with x,y and rotation values
 
angle:Boolean — The angle in degrees you would like your Object to travel.
This value can be either a Number or a String i.e. "45, 90" will use a random angle between 45 and 90 degrees.
 
distance:* — The distance in pixels you would like your Object to travel.
This value can be either a Number or a String i.e. "50, 100" will use a random distance between 50 and 100 pixels.
 
startDistance:* (default = 0) — The start distance pixels will offset the Objects current position using the current angle.
This value can be either a Number or a String i.e. "50, 100" will use a random distance between 50 and 100 pixels.
 
autoRotate:* (default = false) — Whether the Object will directionally rotate.