Package | net.flashpunk.tweens.motion |
Class | public class QuadMotion |
Inheritance | QuadMotion 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 distance of the entire curve. | QuadMotion | ||
object : Object
Target object for the tween. | Motion | ||
percent : Number
The completion percentage of the Tween. | Tween | ||
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 | ||
---|---|---|---|
QuadMotion(complete:Function = null, type:uint = 0)
Constructor. | QuadMotion | ||
cancel():void
Immediately stops the Tween and removes it from its Tweener without calling the complete callback. | Tween | ||
setMotion(fromX:Number, fromY:Number, controlX:Number, controlY:Number, toX:Number, toY:Number, duration:Number, ease:Function = null):void
Starts moving along the curve. | QuadMotion | ||
setMotionSpeed(fromX:Number, fromY:Number, controlX:Number, controlY:Number, toX:Number, toY:Number, speed:Number, ease:Function = null):void
Starts moving along the curve at the speed. | QuadMotion | ||
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 distance of the entire curve.
public function get distance():Number
QuadMotion | () | Constructor |
public function QuadMotion(complete:Function = null, type:uint = 0)
Constructor.
Parameterscomplete:Function (default = null ) — Optional completion callback.
| |
type:uint (default = 0 ) — Tween type.
|
setMotion | () | method |
public function setMotion(fromX:Number, fromY:Number, controlX:Number, controlY:Number, toX:Number, toY:Number, duration:Number, ease:Function = null):void
Starts moving along the curve.
Parameters
fromX:Number — X start.
| |
fromY:Number — Y start.
| |
controlX:Number — X control, used to determine the curve.
| |
controlY:Number — Y control, used to determine the curve.
| |
toX:Number — X finish.
| |
toY:Number — Y finish.
| |
duration:Number — Duration of the movement.
| |
ease:Function (default = null ) — Optional easer function.
|
setMotionSpeed | () | method |
public function setMotionSpeed(fromX:Number, fromY:Number, controlX:Number, controlY:Number, toX:Number, toY:Number, speed:Number, ease:Function = null):void
Starts moving along the curve at the speed.
Parameters
fromX:Number — X start.
| |
fromY:Number — Y start.
| |
controlX:Number — X control, used to determine the curve.
| |
controlY:Number — Y control, used to determine the curve.
| |
toX:Number — X finish.
| |
toY:Number — Y finish.
| |
speed:Number — Speed of the movement.
| |
ease:Function (default = null ) — Optional easer function.
|