| Package | net.flashpunk.tweens.motion |
| Class | public class Motion |
| Inheritance | Motion Tween Object |
| Subclasses | CircularMotion, CubicMotion, LinearMotion, LinearPath, QuadMotion, QuadPath |
| 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 | |
| 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 | ||
| Property | Defined By | ||
|---|---|---|---|
| _object : Object | Motion | ||
| _x : Number = 0 | Motion | ||
| _y : Number = 0 | Motion | ||
| Method | Defined By | ||
|---|---|---|---|
Motion(duration:Number, complete:Function = null, type:uint = 0, ease:Function = null)
Constructor. | Motion | ||
![]() | cancel():void
Immediately stops the Tween and removes it from its Tweener without calling the complete callback. | Tween | |
![]() | start():void
Starts the Tween, or restarts it if it's currently running. | Tween | |
![]() | update():void
Updates the Tween, called by World. | Tween | |
| _object | property |
protected var _object:Object| _x | property |
protected var _x:Number = 0| _y | property |
protected var _y:Number = 0| object | property |
object:ObjectTarget object for the tween. Must have an x and a y property.
public function get object():Object public function set object(value:Object):void| x | property |
x:NumberCurrent x position of the Tween.
public function get x():Number public function set x(value:Number):void| y | property |
y:NumberCurrent y position of the Tween.
public function get y():Number public function set y(value:Number):void| Motion | () | Constructor |
public function Motion(duration:Number, complete:Function = null, type:uint = 0, ease:Function = null)Constructor.
Parametersduration:Number — Duration of the Tween.
| |
complete:Function (default = null) — Optional completion callback.
| |
type:uint (default = 0) — Tween type.
| |
ease:Function (default = null) — Optional easer function.
|