Packagecom.desuade.motion.tweens
Classpublic class ColorTween
InheritanceColorTween Inheritance MultiTween Inheritance Tween Inheritance BasicTween Inheritance BaseBasic Inheritance flash.events.EventDispatcher

Language Version : ActionScript 3
Since : 02.05.2009
Runtime Versions : AIR 1.0, Flash Player 9.0.0

Standard tween class to change the color of a DisplayObject.



Public Properties
 PropertyDefined By
 Inheritedactive : Boolean
[read-only] If the primitive is currently active and running.
BaseBasic
 Inheritedcompleted : Boolean
[read-only] If the tween finished or not.
Tween
 Inheritedconfig : Object
[read-only] Gets the config object that was passed in the constructor.
BaseBasic
 Inheritedpid : int
[read-only] The primitive's id
BaseBasic
 Inheritedposition : Number
[read-only] Gets the current position 0-1 of the tween.
Tween
 Inheritedtarget : Object
The target object
BaseBasic
Public Methods
 MethodDefined By
  
ColorTween(target:Object, configObject:Object = null)
The constructor accepts an object that has all the paramaters needed to create a new tween. Paramaters for the tween object: type:String – the type of color transformation to apply.
ColorTween
 Inherited
fromXML(xml:XML):*
[override] Configures the object based on the values provided by the XML. Most properties can assigned in the attributes using the same names. The values of the attributes will be converted to Numbers if they're not NaN.
MultiTween
 Inherited
reset():void
[override] Resets the tween back to the beginning.
MultiTween
 Inherited
run(target:Object, property:String, value:*, duration:Number, ease:* = linear, position:Number = 0, endfunc:Function = null):int
[static] This let's you run a tween that's unmanaged and bypasses events, using just a callback function on end. The syntax is just a strict function call, so there's no configObject. While there's little speed improvement with this over creating an tween object, it does use about half the memory.
Tween
 Inherited
start(delay:Number = -1, position:Number = -1):*
[override] This starts the tween.
Tween
 Inherited
stop():Boolean
[override] This stops the currently playing tween at it's current position.
Tween
 Inherited
toXML():XML
[override] This creates an XML object that represents the object, based on it's config object.
MultiTween
Constructor Detail
ColorTween()Constructor
public function ColorTween(target:Object, configObject:Object = null)

The constructor accepts an object that has all the paramaters needed to create a new tween.

Paramaters for the tween object:

Example: var mt:ColorTween = new ColorTween(myobj, {value:0xff77d5, amount:0.8, duration:2, ease:'easeInBounce', delay:2, position:0})

Parameters
target:Object — The target object to have it's property tweened
 
configObject:Object (default = null) — The config object that has all the values for the tween

See also