Package | net.flashpunk.tweens.motion |
Class | public class LinearPath |
Inheritance | LinearPath Motion Tween Object |
Property | Defined By | ||
---|---|---|---|
active : Boolean
If the tween should update. | Tween | ||
complete : Function
Tween completion callback. | Tween | ||
delay : Number = 0
Length of time to wait before starting this tween. | Tween | ||
distance : Number [read-only]
The full length of the path. | LinearPath | ||
object : Object
Target object for the tween. | Motion | ||
percent : Number
The completion percentage of the Tween. | Tween | ||
pointCount : Number [read-only]
How many points are on the path. | LinearPath | ||
scale : Number [read-only]
The current time scale of the Tween (after easer has been applied). | Tween | ||
x : Number
Current x position of the Tween. | Motion | ||
y : Number
Current y position of the Tween. | Motion |
Method | Defined By | ||
---|---|---|---|
LinearPath(complete:Function = null, type:uint = 0)
Constructor. | LinearPath | ||
addPoint(x:Number = 0, y:Number = 0):void
Adds the point to the path. | LinearPath | ||
cancel():void
Immediately stops the Tween and removes it from its Tweener without calling the complete callback. | Tween | ||
getPoint(index:uint = 0):Point
Gets a point on the path. | LinearPath | ||
setMotion(duration:Number, ease:Function = null):void
Starts moving along the path. | LinearPath | ||
setMotionSpeed(speed:Number, ease:Function = null):void
Starts moving along the path at the speed. | LinearPath | ||
start():void
Starts the Tween, or restarts it if it's currently running. | Tween | ||
update():void
Updates the Tween, called by World. | Tween |
distance | property |
distance:Number
[read-only] The full length of the path.
public function get distance():Number
pointCount | property |
pointCount:Number
[read-only] How many points are on the path.
public function get pointCount():Number
LinearPath | () | Constructor |
public function LinearPath(complete:Function = null, type:uint = 0)
Constructor.
Parameterscomplete:Function (default = null ) — Optional completion callback.
| |
type:uint (default = 0 ) — Tween type.
|
addPoint | () | method |
public function addPoint(x:Number = 0, y:Number = 0):void
Adds the point to the path.
Parameters
x:Number (default = 0 ) — X position.
| |
y:Number (default = 0 ) — Y position.
|
getPoint | () | method |
public function getPoint(index:uint = 0):Point
Gets a point on the path.
Parameters
index:uint (default = 0 ) — Index of the point.
|
Point — The Point object.
|
setMotion | () | method |
public function setMotion(duration:Number, ease:Function = null):void
Starts moving along the path.
Parameters
duration:Number — Duration of the movement.
| |
ease:Function (default = null ) — Optional easer function.
|
setMotionSpeed | () | method |
public function setMotionSpeed(speed:Number, ease:Function = null):void
Starts moving along the path at the speed.
Parameters
speed:Number — Speed of the movement.
| |
ease:Function (default = null ) — Optional easer function.
|