Package | com.desuade.motion.tweens |
Class | public class MultiTween |
Inheritance | MultiTween ![]() ![]() ![]() ![]() |
Subclasses | ColorTween |
Language Version : | ActionScript 3 |
Since : | 02.05.2009 |
Runtime Versions : | AIR 1.0, Flash Player 9.0.0 |
Method | Defined By | ||
---|---|---|---|
MultiTween(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:
properties:Object – an object of properties and values to tween. | MultiTween | ||
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 | ||
reset():void [override]
Resets the tween back to the beginning. | MultiTween | ||
![]() | 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 | |
![]() | start(delay:Number = -1, position:Number = -1):* [override]
This starts the tween. | Tween | |
![]() | stop():Boolean [override]
This stops the currently playing tween at it's current position. | Tween | |
toXML():XML [override]
This creates an XML object that represents the object, based on it's config object. | MultiTween |
MultiTween | () | Constructor |
public function MultiTween(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:
{x:100}
or {y:"200"}
Example: var mt:MultiTween = new MultiTween(myobj, {properties:{x:40, y:200}, duration:2, ease:'easeInBounce', delay:2, position:0, round:false, relative:true})
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
fromXML | () | method |
override public function fromXML(xml:XML):*
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. For values that should be Strings (for relative), use a '*' – ie: value='*50'
Parameters
xml:XML — The XML to use for configuration
|
* — The object that called the method (for chaining)
|
reset | () | method |
override public function reset():void
Resets the tween back to the beginning.
toXML | () | method |
override public function toXML():XML
This creates an XML object that represents the object, based on it's config object.
ReturnsXML — An XML object of the config
|