Packagecom.greensock.data
Classpublic dynamic class TweenLiteVars
InheritanceTweenLiteVars Inheritance VarsCore Inheritance flash.utils.Proxy
SubclassesTweenMaxVars

There are 2 primary benefits of using a TweenLiteVars instance to define your TweenLite variables:
  1. In most code editors, code hinting will be activated which helps remind you which special properties are available in TweenLite
  2. It allows you to code using strict datatyping (although it doesn't force you to).
USAGE:

Instead of 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:
Copyright 2010, GreenSock. All rights reserved. This work is subject to the terms in http://www.greensock.com/terms_of_use.html or for corporate Club GreenSock members, the software agreement that was issued with the corporate membership.



Public Properties
 PropertyDefined 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
Public Methods
 MethodDefined 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
Protected Methods
 MethodDefined by
 Inherited
hasProperty(name:*):Boolean
VarsCore
Property detail
autoAlphaproperty
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.

bevelFilterproperty 
public var bevelFilter:BevelFilterVars

Applies a BevelFilter tween (use the BevelFilterVars class to define the values).

bezierproperty 
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}]});

bezierThroughproperty 
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.

blurFilterproperty 
public var blurFilter:BlurFilterVars

Applies a BlurFilter tween (use the BlurFilterVars class to define the values).

colorMatrixFilterproperty 
public var colorMatrixFilter:ColorMatrixFilterVars

Applies a ColorMatrixFilter tween (use the ColorMatrixFilterVars class to define the values).

colorTransformproperty 
public var colorTransform:ColorTransformVars

Applies a ColorTransform tween (use the ColorTransformVars class to define the values).

dataproperty 
public var data:*

Any data that you'd like associated with your tween.

delayproperty 
public var delay:Number

The number of seconds (or frames for frames-based tweens) to delay before the tween begins.

dropShadowFilterproperty 
public var dropShadowFilter:DropShadowFilterVars

Applies a DropShadowFilter tween (use the DropShadowFilterVars class to define the values).

dynamicPropsproperty 
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.

easeproperty 
public var ease:Function

An easing function (i.e. fl.motion.easing.Elastic.easeOut) The default is Regular.easeOut.

easeParamsproperty 
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.

endArrayproperty 
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.

frameproperty 
frame:int  [read-write]

Tweens a MovieClip to a particular frame.

Implementation
    public function get frame():int
    public function set frame(value:int):void
frameLabelproperty 
public var frameLabel:String

Tweens a MovieClip to a particular frame.

glowFilterproperty 
public var glowFilter:GlowFilterVars

Applies a GlowFilter tween (use the GlowFilterVars class to define the values).

hexColorsproperty 
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.

immediateRenderproperty 
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
motionBlurproperty 
public var motionBlur:Object

Applies a motionBlur tween.

onCompleteproperty 
public var onComplete:Function

A function to call when the tween has completed.

onCompleteParamsproperty 
public var onCompleteParams:Array

An Array of parameters to pass the onComplete function

onInitproperty 
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.

onInitParamsproperty 
public var onInitParams:Array

An Array of parameters to pass the onInit function.

onStartproperty 
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).

onStartParamsproperty 
public var onStartParams:Array

An Array of parameters to pass the onStart function.

onUpdateproperty 
public var onUpdate:Function

A function to call whenever the tweening values are updated (on every frame during the time the tween is active).

onUpdateParamsproperty 
public var onUpdateParams:Array

An Array of parameters to pass the onUpdate function

orientToBezierproperty 
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:

  1. Position property 1 (typically "x")
  2. Position property 2 (typically "y")
  3. Rotational property (typically "rotation")
  4. Number of degrees to add (optional - makes it easy to orient your MovieClip/Sprite properly)
The orientToBezier property should be an Array containing one Array for each set of these values. For maximum flexibility, you can pass in any number of Arrays inside the container Array, one for each rotational property. This can be convenient when working in 3D because you can rotate on multiple axis. If you're doing a standard 2D x/y tween on a bezier, you can simply pass in a boolean value of true and TweenMax will use a typical setup, [["x", "y", "rotation", 0]]. Hint: Don't forget the container Array (notice the double outer brackets)

overwriteproperty 
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
quaternionsproperty 
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.

removeTintproperty 
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
runBackwardsproperty 
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
scrollRectproperty 
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.

setSizeproperty 
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.

shortRotationproperty 
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}

tintproperty 
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
transformAroundCenterproperty 
public var transformAroundCenter:TransformAroundCenterVars

Applies a transformAroundCenter tween (use the TransformAroundCenterVars class to define the values).

transformAroundPointproperty 
public var transformAroundPoint:TransformAroundPointVars

Applies a transformAroundPoint tween (use the TransformAroundPointVars class to define the values).

useFramesproperty 
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
visibleproperty 
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
volumeproperty 
public var volume:Number

Changes the volume of any object that has a soundTransform property (MovieClip, SoundChannel, NetStream, etc.)

Constructor detail
TweenLiteVars()constructor
public function TweenLiteVars(vars:Object = null)

Constructor

Parameters
vars: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})
Method detail
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

Parameters
name: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 
public function clone():TweenLiteVars

Clones the TweenLiteVars object.

Returns
TweenLiteVars