Package | com.greensock.data |
Class | public dynamic class TweenLiteVars |
Inheritance | TweenLiteVars VarsCore flash.utils.Proxy |
Subclasses | TweenMaxVars |
TweenLite.to(mc, 1, {x:300, tint:0xFF0000, onComplete:myFunction})
, you could use this utility like:
var myVars:TweenLiteVars = new TweenLiteVars();
myVars.addProp("x", 300); // use addProp() to add any property that doesn't already exist in the TweenLiteVars instance.
myVars.tint = 0xFF0000;
myVars.onComplete = myFunction;
TweenLite.to(mc, 1, myVars);
NOTES:Property | Defined by | ||
---|---|---|---|
autoAlpha : Number Same as changing the "alpha" property but with the additional feature of toggling the "visible" property to false when alpha is 0.
| TweenLiteVars | ||
bevelFilter : BevelFilterVars
Applies a BevelFilter tween (use the BevelFilterVars class to define the values).
| TweenLiteVars | ||
bezier : Array Array of Objects, one for each "control point" (see documentation on Flash's curveTo() drawing method for more about how control points work).
| TweenLiteVars | ||
bezierThrough : Array Identical to bezier except that instead of passing Bezier control point values, you pass values through which the Bezier values should move.
| TweenLiteVars | ||
blurFilter : BlurFilterVars
Applies a BlurFilter tween (use the BlurFilterVars class to define the values).
| TweenLiteVars | ||
colorMatrixFilter : ColorMatrixFilterVars
Applies a ColorMatrixFilter tween (use the ColorMatrixFilterVars class to define the values).
| TweenLiteVars | ||
colorTransform : ColorTransformVars
Applies a ColorTransform tween (use the ColorTransformVars class to define the values).
| TweenLiteVars | ||
data : * Any data that you'd like associated with your tween.
| TweenLiteVars | ||
delay : Number The number of seconds (or frames for frames-based tweens) to delay before the tween begins.
| TweenLiteVars | ||
dropShadowFilter : DropShadowFilterVars
Applies a DropShadowFilter tween (use the DropShadowFilterVars class to define the values).
| TweenLiteVars | ||
dynamicProps : Object Allows you to associate a function with a property so that every time the tween is updated, it calls that function to get the end value for the associated property.
| TweenLiteVars | ||
ease : Function An easing function (i.e.
| TweenLiteVars | ||
easeParams : Array An Array of extra parameter values to feed the easing equation (beyond the standard 4).
| TweenLiteVars | ||
endArray : Array An Array containing numeric end values of the target Array.
| TweenLiteVars | ||
frame : int Tweens a MovieClip to a particular frame.
| TweenLiteVars | ||
frameLabel : String Tweens a MovieClip to a particular frame.
| TweenLiteVars | ||
glowFilter : GlowFilterVars
Applies a GlowFilter tween (use the GlowFilterVars class to define the values).
| TweenLiteVars | ||
hexColors : Object Although hex colors are technically numbers, if you try to tween them conventionally, you'll notice that they don't tween smoothly.
| TweenLiteVars | ||
immediateRender : Boolean Normally, zero-duration tweens render immediately and all other tweens begin rendering on the very next frame after they are instantiated, but immediateRender allows you to override that behavior if you prefer.
| TweenLiteVars | ||
motionBlur : Object Applies a motionBlur tween.
| TweenLiteVars | ||
onComplete : Function A function to call when the tween has completed.
| TweenLiteVars | ||
onCompleteParams : Array An Array of parameters to pass the onComplete function
| TweenLiteVars | ||
onInit : Function A function that should be called just before the tween inits (renders for the first time).
| TweenLiteVars | ||
onInitParams : Array An Array of parameters to pass the onInit function.
| TweenLiteVars | ||
onStart : Function A function that should be called when the tween begins (when its currentTime is at 0 and changes to some other value which can happen more than once if the tween is restarted multiple times).
| TweenLiteVars | ||
onStartParams : Array An Array of parameters to pass the onStart function.
| TweenLiteVars | ||
onUpdate : Function A function to call whenever the tweening values are updated (on every frame during the time the tween is active).
| TweenLiteVars | ||
onUpdateParams : Array An Array of parameters to pass the onUpdate function
| TweenLiteVars | ||
orientToBezier : Array
A common effect that designers/developers want is for a MovieClip/Sprite to orient itself in the direction of a Bezier path (alter its rotation).
| TweenLiteVars | ||
overwrite : int NONE = 0, ALL_IMMEDIATE = 1, AUTO = 2, CONCURRENT = 3, ALL_ONSTART = 4, PREEXISTING = 5 (2 through 5 are only available with the optional OverwriteManager add-on class which must be initted once for TweenLite, like OverwriteManager.init().
| TweenLiteVars | ||
quaternions : Object An object with properties that correspond to the quaternion properties of the target object.
| TweenLiteVars | ||
removeTint : Boolean To remove the tint from a DisplayObject, set removeTint to true.
| TweenLiteVars | ||
runBackwards : Boolean When true, the tween will flip the start and end values which is exactly what TweenLite.from() does.
| TweenLiteVars | ||
scrollRect : Object Tweens the scrollRect property of any DisplayObject; you can define any of the following properties in the object: left, right, top, bottom, x, y, width, height.
| TweenLiteVars | ||
setSize : Object An object containing a "width" and/or "height" property which will be tweened over time and applied using setSize() on every frame during the course of the tween.
| TweenLiteVars | ||
shortRotation : Object To tween any rotation property (even multiple properties) of the target object in the shortest direction, use shortRotation.
| TweenLiteVars | ||
tint : uint To change a DisplayObject's tint, set this to the hex value of the color you'd like the DisplayObject to end up at(or begin at if you're using TweenLite.from()).
| TweenLiteVars | ||
transformAroundCenter : TransformAroundCenterVars
Applies a transformAroundCenter tween (use the TransformAroundCenterVars class to define the values).
| TweenLiteVars | ||
transformAroundPoint : TransformAroundPointVars
Applies a transformAroundPoint tween (use the TransformAroundPointVars class to define the values).
| TweenLiteVars | ||
useFrames : Boolean If useFrames is set to true, the tweens's timing mode will be based on frames.
| TweenLiteVars | ||
visible : Boolean To set a DisplayObject's "visible" property at the end of the tween, use this special property.
| TweenLiteVars | ||
volume : Number Changes the volume of any object that has a soundTransform property (MovieClip, SoundChannel, NetStream, etc.)
| TweenLiteVars |
Method | Defined by | ||
---|---|---|---|
TweenLiteVars(vars:Object = null)
Constructor
| TweenLiteVars | ||
addProp(name:String, value:Number, relative:Boolean = false):void
Adds a dynamic property for tweening and allows you to set whether the end value is relative or not
| TweenLiteVars | ||
Clones the TweenLiteVars object.
| TweenLiteVars |
autoAlpha | property |
public var autoAlpha:Number
Same as changing the "alpha" property but with the additional feature of toggling the "visible" property to false when alpha is 0.
bevelFilter | property |
public var bevelFilter:BevelFilterVars
Applies a BevelFilter tween (use the BevelFilterVars class to define the values).
bezier | property |
public var bezier:Array
Array of Objects, one for each "control point" (see documentation on Flash's curveTo() drawing method for more about how control points work). In this example, let's say the control point would be at x/y coordinates 250,50. Just make sure your my_mc is at coordinates 0,0 and then do: TweenLite.to(my_mc, 3, {bezier:[{x:250, y:50}, {x:500, y:0}]});
bezierThrough | property |
public var bezierThrough:Array
Identical to bezier except that instead of passing Bezier control point values, you pass values through which the Bezier values should move. This can be more intuitive than using control points.
blurFilter | property |
public var blurFilter:BlurFilterVars
Applies a BlurFilter tween (use the BlurFilterVars class to define the values).
colorMatrixFilter | property |
public var colorMatrixFilter:ColorMatrixFilterVars
Applies a ColorMatrixFilter tween (use the ColorMatrixFilterVars class to define the values).
colorTransform | property |
public var colorTransform:ColorTransformVars
Applies a ColorTransform tween (use the ColorTransformVars class to define the values).
data | property |
public var data:*
Any data that you'd like associated with your tween.
delay | property |
public var delay:Number
The number of seconds (or frames for frames-based tweens) to delay before the tween begins.
dropShadowFilter | property |
public var dropShadowFilter:DropShadowFilterVars
Applies a DropShadowFilter tween (use the DropShadowFilterVars class to define the values).
dynamicProps | property |
public var dynamicProps:Object
Allows you to associate a function with a property so that every time the tween is updated, it calls that function to get the end value for the associated property. You could, for example, tween an object's x/y coordinates to wherever the mouse is.
ease | property |
public var ease:Function
An easing function (i.e. fl.motion.easing.Elastic.easeOut) The default is Regular.easeOut.
easeParams | property |
public var easeParams:Array
An Array of extra parameter values to feed the easing equation (beyond the standard 4). This can be useful with easing equations like Elastic that accept extra parameters like the amplitude and period. Most easing equations, however, don't require extra parameters so you won't need to pass in any easeParams.
endArray | property |
public var endArray:Array
An Array containing numeric end values of the target Array. Keep in mind that the target of the tween must be an Array with at least the same length as the endArray.
frame | property |
frame:int
[read-write]Tweens a MovieClip to a particular frame.
Implementation public function get frame():int
public function set frame(value:int):void
frameLabel | property |
public var frameLabel:String
Tweens a MovieClip to a particular frame.
glowFilter | property |
public var glowFilter:GlowFilterVars
Applies a GlowFilter tween (use the GlowFilterVars class to define the values).
hexColors | property |
public var hexColors:Object
Although hex colors are technically numbers, if you try to tween them conventionally, you'll notice that they don't tween smoothly. To tween them properly, the red, green, and blue components must be extracted and tweened independently. TweenMax makes it easy. To tween a property of your object that's a hex color to another hex color, use this special hexColors property of TweenMax. It must be an OBJECT with properties named the same as your object's hex color properties. For example, if your my_obj object has a "myHexColor" property that you'd like to tween to red (0xFF0000) over the course of 2 seconds, do: TweenMax.to(my_obj, 2, {hexColors:{myHexColor:0xFF0000}}); You can pass in any number of hexColor properties.
immediateRender | property |
immediateRender:Boolean
[read-write]Normally, zero-duration tweens render immediately and all other tweens begin rendering on the very next frame after they are instantiated, but immediateRender allows you to override that behavior if you prefer. For example, if you're inserting a zero-duration tween into a timeline, you should set immediateRender:false so that it doesn't render immediately.
Implementation public function get immediateRender():Boolean
public function set immediateRender(value:Boolean):void
motionBlur | property |
public var motionBlur:Object
Applies a motionBlur tween.
onComplete | property |
public var onComplete:Function
A function to call when the tween has completed.
onCompleteParams | property |
public var onCompleteParams:Array
An Array of parameters to pass the onComplete function
onInit | property |
public var onInit:Function
A function that should be called just before the tween inits (renders for the first time). Since onInit runs before the start/end values are recorded internally, it is a good place to run code that affects the target's initial position or other tween-related properties. onStart, by contrast, runs AFTER the tween inits and the start/end values are recorded internally. onStart is called every time the tween begins which can happen more than once if the tween is restarted multiple times.
onInitParams | property |
public var onInitParams:Array
An Array of parameters to pass the onInit function.
onStart | property |
public var onStart:Function
A function that should be called when the tween begins (when its currentTime is at 0 and changes to some other value which can happen more than once if the tween is restarted multiple times).
onStartParams | property |
public var onStartParams:Array
An Array of parameters to pass the onStart function.
onUpdate | property |
public var onUpdate:Function
A function to call whenever the tweening values are updated (on every frame during the time the tween is active).
onUpdateParams | property |
public var onUpdateParams:Array
An Array of parameters to pass the onUpdate function
orientToBezier | property |
public var orientToBezier:Array
A common effect that designers/developers want is for a MovieClip/Sprite to orient itself in the direction of a Bezier path (alter its rotation). orientToBezier makes it easy. In order to alter a rotation property accurately, TweenLite/Max needs 4 pieces of information:
overwrite | property |
overwrite:int
[read-write]NONE = 0, ALL_IMMEDIATE = 1, AUTO = 2, CONCURRENT = 3, ALL_ONSTART = 4, PREEXISTING = 5 (2 through 5 are only available with the optional OverwriteManager add-on class which must be initted once for TweenLite, like OverwriteManager.init(). TweenMax, TimelineLite, and TimelineMax automatically init OverwriteManager.
Implementation public function get overwrite():int
public function set overwrite(value:int):void
quaternions | property |
public var quaternions:Object
An object with properties that correspond to the quaternion properties of the target object. For example, if your my3DObject has "orientation" and "childOrientation" properties that contain quaternions, and you'd like to tween them both, you'd do: {orientation:myTargetQuaternion1, childOrientation:myTargetQuaternion2}. Quaternions must have the following properties: x, y, z, and w.
removeTint | property |
removeTint:Boolean
[read-write]To remove the tint from a DisplayObject, set removeTint to true.
Implementation public function get removeTint():Boolean
public function set removeTint(value:Boolean):void
runBackwards | property |
runBackwards:Boolean
[read-write]When true, the tween will flip the start and end values which is exactly what TweenLite.from() does.
Implementation public function get runBackwards():Boolean
public function set runBackwards(value:Boolean):void
scrollRect | property |
public var scrollRect:Object
Tweens the scrollRect property of any DisplayObject; you can define any of the following properties in the object: left, right, top, bottom, x, y, width, height.
setSize | property |
public var setSize:Object
An object containing a "width" and/or "height" property which will be tweened over time and applied using setSize() on every frame during the course of the tween.
shortRotation | property |
public var shortRotation:Object
To tween any rotation property (even multiple properties) of the target object in the shortest direction, use shortRotation. For example, if myObject.rotation is currently 170 degrees and you want to tween it to -170 degrees, a normal rotation tween would travel a total of 340 degrees in the counter-clockwise direction, but if you use shortRotation, it would travel 20 degrees in the clockwise direction instead. Pass in an object in with properties that correspond to the rotation values of the target, like {rotation:-170} or {rotationX:-170, rotationY:50}
tint | property |
tint:uint
[read-write]To change a DisplayObject's tint, set this to the hex value of the color you'd like the DisplayObject to end up at(or begin at if you're using TweenLite.from()). An example hex value would be 0xFF0000. If you'd like to remove the tint from a DisplayObject, use the removeTint special property.
Implementation public function get tint():uint
public function set tint(value:uint):void
transformAroundCenter | property |
public var transformAroundCenter:TransformAroundCenterVars
Applies a transformAroundCenter tween (use the TransformAroundCenterVars class to define the values).
transformAroundPoint | property |
public var transformAroundPoint:TransformAroundPointVars
Applies a transformAroundPoint tween (use the TransformAroundPointVars class to define the values).
useFrames | property |
useFrames:Boolean
[read-write]If useFrames is set to true, the tweens's timing mode will be based on frames. Otherwise, it will be based on seconds/time. NOTE: a tween's timing mode is always determined by its parent timeline.
Implementation public function get useFrames():Boolean
public function set useFrames(value:Boolean):void
visible | property |
visible:Boolean
[read-write]To set a DisplayObject's "visible" property at the end of the tween, use this special property.
Implementation public function get visible():Boolean
public function set visible(value:Boolean):void
volume | property |
public var volume:Number
Changes the volume of any object that has a soundTransform property (MovieClip, SoundChannel, NetStream, etc.)
TweenLiteVars | () | constructor |
public function TweenLiteVars(vars:Object = null)
Constructor
Parametersvars:Object (default = null ) — An Object containing properties that correspond to the properties you'd like to add to this TweenLiteVars Object. For example, TweenLiteVars({x:300, onComplete:myFunction})
|
addProp | () | method |
public function addProp(name:String, value:Number, relative:Boolean = false):void
Adds a dynamic property for tweening and allows you to set whether the end value is relative or not
Parametersname:String — Property name
|
|
value:Number — Numeric end value (or beginning value for from() calls)
|
|
relative:Boolean (default = false ) — If true, the value will be relative to the target's current value. For example, if my_mc.x is currently 300 and you do addProp("x", 200, true), the end value will be 500.
|
clone | () | method |