Packagecom.flashdynamix.motion.guides
Classpublic class Bezier2D

Allows for Objects to follow a 2D bezier path. This path is made from a list of points these points are either control points or through points for the bezier.



Public Properties
 PropertyDefined by
  autoRotate : Boolean
Whether the Object will directionally rotate.
Bezier2D
  item : Object
The Object you wish to be updated with x,y and rotation values.
Bezier2D
  length : int
[read-only]
Bezier2D
  movingPts : Boolean
Whether the pts in the BezierPath can be repositioned.
Bezier2D
  position : Number
Bezier2D
  pts : Array
A list of Points defining nodes of the bezier path.
Bezier2D
  through : Boolean
Whether the pts in the bezier path will be used as control points or through points.
Bezier2D
Public Methods
 MethodDefined by
  
Bezier2D(item:Object, through:Boolean = false, autoRotate:Boolean = false, movingPts:Boolean = false, ... pts)
Bezier2D
  
addAt(index:int, pt:Point):void
Adds a Point into the Bezier path at the specified index.
Bezier2D
  
index(index:int):Point
Bezier2D
  
push(pt:Point):void
Pushes a Point into the Bezier path.
Bezier2D
  
remove(pt:Point):void
Removes a Point from the Bezier path.
Bezier2D
  
removeAt(index:int, count:int = 1):void
Removes one or more Point(s) at the specified index and count from the Bezier path.
Bezier2D
Property detail
autoRotateproperty
public var autoRotate:Boolean

Whether the Object will directionally rotate.

itemproperty 
public var item:Object

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

lengthproperty 
length:int  [read-only]

Implementation
    public function get length():int
movingPtsproperty 
public var movingPts:Boolean

Whether the pts in the BezierPath can be repositioned.

positionproperty 
position:Number  [read-write]

Implementation
    public function get position():Number
    public function set position(value:Number):void
ptsproperty 
public var pts:Array

A list of Points defining nodes of the bezier path.

throughproperty 
public var through:Boolean

Whether the pts in the bezier path will be used as control points or through points.

Constructor detail
Bezier2D()constructor
public function Bezier2D(item:Object, through:Boolean = false, autoRotate:Boolean = false, movingPts:Boolean = false, ... pts)

Parameters
item:Object — The Object you wish to be updated with x,y and rotation values.
 
through:Boolean (default = false) — Whether the pts in the bezier path will be used as control points or through points.
 
autoRotate:Boolean (default = false) — Whether the Object will directionally rotate.
 
movingPts:Boolean (default = false) — Whether the pts in the BezierPath can be repositioned.
 
... pts
Method detail
addAt()method
public function addAt(index:int, pt:Point):void

Adds a Point into the Bezier path at the specified index.

Parameters
index:int — The index for which to insert the Point.
 
pt:Point — The Point to insert at the index.
index()method 
public function index(index:int):Point

Parameters
index:int — The position to return a Point from.

Returns
Point — Returns a Point at the specified index.
push()method 
public function push(pt:Point):void

Pushes a Point into the Bezier path.

Parameters
pt:Point — The Point which will be added to the end of the bezier path.
remove()method 
public function remove(pt:Point):void

Removes a Point from the Bezier path.

Parameters
pt:Point — The Point you would like to remove from the bezier path.
removeAt()method 
public function removeAt(index:int, count:int = 1):void

Removes one or more Point(s) at the specified index and count from the Bezier path.

Parameters
index:int — The index to start removing nodes from the Bezier path.
 
count:int (default = 1) — the Number of nodes to remove from the Bezier path. If this is 0 no nodes are removed.