Packagenet.flashpunk.tweens.misc
Classpublic class NumTween
InheritanceNumTween Inheritance Tween Inheritance Object

Tweens a numeric value.



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
 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
  value : Number = 0
The current value.
NumTween
Public Methods
 MethodDefined By
  
NumTween(complete:Function = null, type:uint = 0)
Constructor.
NumTween
 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
  
tween(fromValue:Number, toValue:Number, duration:Number, ease:Function = null):void
Tweens the value from one value to another.
NumTween
 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
valueproperty
public var value:Number = 0

The current value.

Constructor Detail
NumTween()Constructor
public function NumTween(complete:Function = null, type:uint = 0)

Constructor.

Parameters
complete:Function (default = null) — Optional completion callback.
 
type:uint (default = 0) — Tween type.
Method Detail
tween()method
public function tween(fromValue:Number, toValue:Number, duration:Number, ease:Function = null):void

Tweens the value from one value to another.

Parameters

fromValue:Number — Start value.
 
toValue:Number — End value.
 
duration:Number — Duration of the tween.
 
ease:Function (default = null) — Optional easer function.