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

TransitionManager class parameters

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 TransitionManager.startTransition() method; otherwise, the transition is not applied to a movie clip or started. For details about the TransitionManager.startTransition() method, its use, and parameters, see TransitionManager.startTransition(). A quick alternative to the two-step process of creating a TransitionManager instance is to simply call the TransitionManager.start() method; for more information, see TransitionManager.start(). The TransitionManager.start() method allows you to create a TransitionManager instance, provide the target movie clip, and specify the transition properties in one call.

Specifying an easing class and method in a transition

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.