Packageorg.as3lib.kitchensync.action
Classpublic final class TweenFactory

Provides a convenient interface for creating all types of tweens.



Public Properties
 PropertyDefined by
  objectParser : ITweenObjectParser
[static]
TweenFactory
Public Methods
 MethodDefined by
  
newTween(parameters:Object):ITween
[static] Uses a generic object to define parameters for a new tween.
TweenFactory
  
newWithTargetProperty(target:Object = null, property:String = "", startValue:Number = 0, endValue:Number = 0, duration:Function = 0, delay:* = 0, easingFunction:* = null):KSTween
[static] Creates a tween with a TargetProperty as it's tween target.
TweenFactory
  
newWithTweenTarget(tweenTarget:*, duration:Function = 0, delay:* = 0, easingFunction:* = null):KSTween
[static] Creates a new KSTween using an ITweenTarget that you pass into it.
TweenFactory
Property detail
objectParserproperty
public static var objectParser:ITweenObjectParser
Method detail
newTween()method
public static function newTween(parameters:Object):ITween

Uses a generic object to define parameters for a new tween. See ITweenParser and KitchenSyncObjectParser for more details.

Parameters
parameters:Object — An object that contains properties that define the new tween

Returns
ITween — A new tween.

See also

newWithTargetProperty()method 
public static function newWithTargetProperty(target:Object = null, property:String = "", startValue:Number = 0, endValue:Number = 0, duration:Function = 0, delay:* = 0, easingFunction:* = null):KSTween

Creates a tween with a TargetProperty as it's tween target.

Parameters
target:Object (default = null) — - the object whose property will be changed
 
property:String (default = "") — - the name of the property to change. The property must be a Number, int or uint such as a Sprite object's "alpha"
 
startValue:Number (default = 0) — - the value to tween the property to. After the tween is done, this will be the value of the property.
 
endValue:Number (default = 0) — - the starting value of the tween. By default, this is the value of the property before the tween begins.
 
duration:Function (default = 0) — - the time in milliseconds that this tween will take to execute. String values are acceptable too.
 
delay:* (default = 0) — - the time to wait in milliseconds before starting the tween. String values are acceptable too.
 
easingFunction:* (default = null) — - the function to use to interpolate the values between fromValue and toValue.

Returns
KSTween

See also

newWithTweenTarget()method 
public static function newWithTweenTarget(tweenTarget:*, duration:Function = 0, delay:* = 0, easingFunction:* = null):KSTween

Creates a new KSTween using an ITweenTarget that you pass into it.

Parameters
tweenTarget:* — An explicitly defined tweenTarget object (or an array of tweentargets) that contains the values you want to tween.
 
duration:Function (default = 0) — - the time in frames that this tween will take to execute.
 
delay:* (default = 0) — - the time to wait before starting the tween.
 
easingFunction:* (default = null) — - the function to use to interpolate the values between fromValue and toValue.

Returns
KSTween — A new KSTween object.