Packagecom.gskinner.motion
Classpublic class GTweener

GTweener ©2009 Grant Skinner, gskinner.com. Visit www.gskinner.com/libraries/gtween/ for documentation, updates and more free code. Licensed under the MIT license - see the source file header for more information.
GTweener is an experimental class that provides a static interface and basic override management for GTween. It adds about 1kb to GTween. With GTweener, if you tween a value that is already being tweened, the new tween will override the old tween for only that value. The old tween will continue tweening other values uninterrupted.

GTweener also serves as an interesting example for utilizing GTween's " plugin registration feature, where a plugin can be registered to run for every tween.

GTweener introduces a small amount overhead to GTween, which may have a limited impact on performance critical scenarios with large numbers (thousands) of tweens.



Public Methods
 MethodDefined by
  
add(tween:GTween):void
[static] Adds a tween to be managed by GTweener.
GTweener
  
from(target:Object = null, duration:Number = 1, values:Object = null, props:Object = null, pluginData:Object = null):GTween
[static] Tweens the target from the specified values to its current values.
GTweener
  
getTween(target:Object, name:String):GTween
[static] Gets the tween that is actively tweening the specified property of the target, or null if none.
GTweener
  
getTweens(target:Object):Array
[static] Returns an array of all tweens that GTweener is managing for the specified target.
GTweener
  
pauseTweens(target:Object, paused:Boolean = true):void
[static] Pauses all tweens that GTweener is managing for the specified target.
GTweener
  
remove(tween:GTween):void
[static] Removes a tween from being managed by GTweener.
GTweener
  
removeTweens(target:Object):void
[static] Removes all tweens that GTweener is managing for the specified target.
GTweener
  
resumeTweens(target:Object):void
[static] Resumes all tweens that GTweener is managing for the specified target.
GTweener
  
to(target:Object = null, duration:Number = 1, values:Object = null, props:Object = null, pluginData:Object = null):GTween
[static] Tweens the target to the specified values.
GTweener
Method detail
add()method
public static function add(tween:GTween):void

Adds a tween to be managed by GTweener.

Parameters
tween:GTween
from()method 
public static function from(target:Object = null, duration:Number = 1, values:Object = null, props:Object = null, pluginData:Object = null):GTween

Tweens the target from the specified values to its current values.

Parameters
target:Object (default = null)
 
duration:Number (default = 1)
 
values:Object (default = null)
 
props:Object (default = null)
 
pluginData:Object (default = null)

Returns
GTween
getTween()method 
public static function getTween(target:Object, name:String):GTween

Gets the tween that is actively tweening the specified property of the target, or null if none.

Parameters
target:Object
 
name:String

Returns
GTween
getTweens()method 
public static function getTweens(target:Object):Array

Returns an array of all tweens that GTweener is managing for the specified target.

Parameters
target:Object

Returns
Array
pauseTweens()method 
public static function pauseTweens(target:Object, paused:Boolean = true):void

Pauses all tweens that GTweener is managing for the specified target.

Parameters
target:Object
 
paused:Boolean (default = true)
remove()method 
public static function remove(tween:GTween):void

Removes a tween from being managed by GTweener.

Parameters
tween:GTween
removeTweens()method 
public static function removeTweens(target:Object):void

Removes all tweens that GTweener is managing for the specified target.

Parameters
target:Object
resumeTweens()method 
public static function resumeTweens(target:Object):void

Resumes all tweens that GTweener is managing for the specified target.

Parameters
target:Object
to()method 
public static function to(target:Object = null, duration:Number = 1, values:Object = null, props:Object = null, pluginData:Object = null):GTween

Tweens the target to the specified values.

Parameters
target:Object (default = null)
 
duration:Number (default = 1)
 
values:Object (default = null)
 
props:Object (default = null)
 
pluginData:Object (default = null)

Returns
GTween