View comments | RSS feed

TransitionManager.start()

Availability

Flash Player 6 (6.0.79.0).

Edition

Flash MX 2004.

Usage

transitionManagerInstance.start(content, transParams)

Parameters

content The MovieClip object to which to apply the transition effect.

transParams A collection of parameters that are passed within an object.

The transParams object should contain a type parameter that indicates the transition effect class to be applied, followed by direction, duration, and easing parameters. In addition, you must include any parameters required by that transition effect class. For example, the mx.transitions.Iris transition effect class requires additional startPoint and shape parameters. So, in addition to the type, duration, and easing parameters that every transition requires, you would also add (to the transParams object) the startPoint and shape parameters that the mx.transitions.Iris effect requires. The following code adds startPoint and shape parameters to the mx.transitions.Iris effect:

{type:mx.transitions.Iris, direction:mx.transitions.Transition.IN, duration:5, easing:mx.transitions.easing.Bounce.easeOut, startPoint:5, shape:mx.transitions.Iris.CIRCLE}

To verify the additional required parameters for the transition class effect that you are specifying in the transParam object's type parameter, see the API for that transition class. For example, for more information about the Blinds transition class, see Blinds transition.

NOTE

 

The transParams object's type parameter should include the full class-package name of the classes specified for its parameters unless they are already imported by using the import statement. To avoid having to provide the full class-package name for all the transParams parameter collection, place the following import statements previously in your code to import all mx.transitions classes and all mx.transitions.easing classes:

import mx.transitions.*;
import mx.transitions.easing.*;

Returns

An instance of the Transition object that the TransitionManager instance is assigned to apply.

Description

Method; creates an instance of the TransitionManager class if one does not already exist, creates an instance of the specified transition class designated in the transParams.type parameter, and then starts the transition. The transition is applied to the slide or movie clip that is designated in the content parameter.

Example

The following code uses the TransitionManager.start() method to create an instance of TransitionManager and assigns an Iris transition to a movie clip called img1_mc. The TransitionManager.start() method contains two parameters. The first parameter, content, is the MovieClip object that the transition effect will be applied to. The second parameter for the TransitionManager.start() method, transParam, contains an object that holds a parameter collection. This object that contains a parameter collection first designates the type of transition effect with the type parameter, followed by the direction, duration, and easing parameters. The type, direction, duration, and easing parameters are required information for all TransitionManager effects. Following the easing parameter are any parameters that the transition type specifically requires. In the following example, the Iris transition is the type of transition, and the Iris transition requires the startPoint and shape parameters (for more information about the Iris transition parameters, see Iris transition):

import mx.transitions.*;
import mx.transitions.easing.*;
TransitionManager.start(img1_mc, {type:Iris, direction:Transition.IN, duration:5, easing:Bounce.easeOut, startPoint:5, shape:Iris.CIRCLE});

Version 8

Comments


Fumio Nonaka said on Nov 4, 2006 at 12:04 AM :
Wrong:
transitionManagerInstance.start(content, transParams)

Correct:
TransitionManager.start(content, transParams)

TransitionManager.start() is a static method as described in the Example.

 

RSS feed | Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/flash/8/main/00004090.html