The Tween and Transition prebuilt classes enable you to add animations to parts of your movie using simple ActionScript. The Flash authoring environment currently uses the prebuilt classes for transitions in a screen-based application. To create a slide presentation or form application, you can select behaviors that add different kinds of transitions between slides. To see these transitions in action, follow these steps:
Flash ships with 10 different transitions, which you can customize using the easing methods, and several optional parameters. Easing refers to gradual acceleration or deceleration during an animation. For example, a ball might gradually increase its speed near the beginning of an animation, but slow down right at the end of the animation before it arrives at a full stop. There are many different equations for the acceleration and deceleration, which change the easing animation accordingly. Easing helps your animations appear more realistic, which you'll discover in this article.
Flash MX Professional 2004 includes the following transitions:
Each transition has slightly different customizations that you can apply to the animation. The Transitions dialog box enables you to preview a sample animation before you apply the effect to the slide or form. To see the kind of ActionScript that these behaviors apply, apply the following settings in the Transitions dialog box.
Click OK to apply the settings and close the dialog box. About 15 lines of ActionScript are inserted directly onto the slide itself. You can see the relevant transition code in the following snippet:
mx.transitions.TransitionManager.start(eventObj.target, {type:mx.transitions.Zoom, direction:0, duration:1, easing:mx.transitions.easing.Bounce.easeOut, param1:empty, param2:empty});
The previous line of code calls the TransitionManager class, and then applies the Zoom transition with the specified easing method mx.transitions.easing.Bounce.easeOut. In this case, the transition applies to the selected slide. If you want to apply this effect to a movie clip instead, you can modify the ActionScript to use in your Flash animations. Fortunately, modifying the code to work with a movie clip symbol is as easy as changing the first parameter from eventObj.target to the desired movie clip's instance name.