ActionScript 2.0 Components Language Reference |
|
|
|
| TransitionManager class > Using the TransitionManager class | |||
To use the methods and properties of the TransitionManager class, you have two options for creating a new instance. The easiest is to call the TransitionManager.start() method, which creates a new TransitionManager instance, designates the target object, applies a transition with an easing method, and starts it in one call. The following code uses the TransitionManager.start() method:
mx.transitions.TransitionManager.start(myMovieClip_mc, {type:mx.transitions.Zoom, direction:mx.transitions.Transition.IN, duration:1, easing:mx.transitions.easing.Bounce.easeOut});
For more information about the TransitionManager.start() method, its use, and parameters, see TransitionManager.start().
You can also create a new instance of the TransitionManager class by using the new operator. You then designate the transition properties and start the transition effect in a second step by calling the TransitionManager.startTransition() method. The following code uses the TransitionManager.startTransition() method:
var myTransitionManager:mx.transitions.TransitionManager = new mx.transitions.TransitionManager(myMovieClip_mc);
myTransitionManager.startTransition({type:mx.transitions.Zoom, direction:Transition.IN, duration:1, easing:mx.transitions.easing.Bounce.easeOut});
When you create a new instance of a TransitionManager class by using the new operator, you must designate a target movie clip in the content parameter for its constructor. The constructor for the mx.transitions.TransitionManager class has the following parameter name and type:
TransitionManager(content:MovieClip)
content is the movie clip object to which the TransitionManager instance applies a transition.
|
NOTE |
If you create a TransitionManager instance by using the new operator, you must then designate the properties of the transition that you want to apply and follow with a call to start the transition using the |
When you create an instance of the TransitionManager class by using the TransitionManager.start() method, you use the easing property of the transParam parameter to specify a function or method that provides an easing calculation. For a full description of the available easing classes and methods see About easing classes and methods.
|
|
|
|