Packagenet.flashpunk.tweens.motion
Classpublic class Motion
InheritanceMotion Inheritance Tween Inheritance Object
Subclasses CircularMotion, CubicMotion, LinearMotion, LinearPath, QuadMotion, QuadPath

Base class for motion Tweens.



Public Properties
 PropertyDefined By
 Inheritedactive : Boolean
If the tween should update.
Tween
 Inheritedcomplete : Function
Tween completion callback.
Tween
 Inheriteddelay : Number = 0
Length of time to wait before starting this tween.
Tween
  object : Object
Target object for the tween.
Motion
 Inheritedpercent : Number
The completion percentage of the Tween.
Tween
 Inheritedscale : 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
Protected Properties
 PropertyDefined By
  _object : Object
Motion
  _x : Number = 0
Motion
  _y : Number = 0
Motion
Public Methods
 MethodDefined By
  
Motion(duration:Number, complete:Function = null, type:uint = 0, ease:Function = null)
Constructor.
Motion
 Inherited
cancel():void
Immediately stops the Tween and removes it from its Tweener without calling the complete callback.
Tween
 Inherited
start():void
Starts the Tween, or restarts it if it's currently running.
Tween
 Inherited
update():void
Updates the Tween, called by World.
Tween
Public Constants
 ConstantDefined By
 InheritedLOOPING : uint = 1
[static] Looping Tween type, will restart immediately when it finishes.
Tween
 InheritedONESHOT : uint = 2
[static] Oneshot Tween type, will stop and remove itself from its core container when it finishes.
Tween
 InheritedPERSIST : uint = 0
[static] Persistent Tween type, will stop when it finishes.
Tween
Property Detail
_objectproperty
protected var _object:Object

_xproperty 
protected var _x:Number = 0

_yproperty 
protected var _y:Number = 0

objectproperty 
object:Object

Target object for the tween. Must have an x and a y property.


Implementation
    public function get object():Object
    public function set object(value:Object):void
xproperty 
x:Number

Current x position of the Tween.


Implementation
    public function get x():Number
    public function set x(value:Number):void
yproperty 
y:Number

Current y position of the Tween.


Implementation
    public function get y():Number
    public function set y(value:Number):void
Constructor Detail
Motion()Constructor
public function Motion(duration:Number, complete:Function = null, type:uint = 0, ease:Function = null)

Constructor.

Parameters
duration: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.