| Package | net.flashpunk.tweens.motion |
| Class | public class CubicMotion |
| Inheritance | CubicMotion Motion Tween Object |
| Method | Defined By | ||
|---|---|---|---|
CubicMotion(complete:Function = null, type:uint = 0)
Constructor. | CubicMotion | ||
![]() | cancel():void
Immediately stops the Tween and removes it from its Tweener without calling the complete callback. | Tween | |
setMotion(fromX:Number, fromY:Number, aX:Number, aY:Number, bX:Number, bY:Number, toX:Number, toY:Number, duration:Number, ease:Function = null):void
Starts moving along the curve. | CubicMotion | ||
![]() | start():void
Starts the Tween, or restarts it if it's currently running. | Tween | |
![]() | update():void
Updates the Tween, called by World. | Tween | |
| CubicMotion | () | Constructor |
public function CubicMotion(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, aX:Number, aY:Number, bX:Number, bY:Number, toX:Number, toY:Number, duration:Number, ease:Function = null):voidStarts moving along the curve.
Parameters
fromX:Number — X start.
| |
fromY:Number — Y start.
| |
aX:Number — First control x.
| |
aY:Number — First control y.
| |
bX:Number — Second control x.
| |
bY:Number — Second control y.
| |
toX:Number — X finish.
| |
toY:Number — Y finish.
| |
duration:Number — Duration of the movement.
| |
ease:Function (default = null) — Optional easer function.
|