You can use the Transition and Tween classes in Flash MX 2004 and Flash MX Professional 2004 to add animations to movie clips, components, and frames using ActionScript. If you don't use the Transition or the Tween class, you have to write your own code to animate movie clips, or modify their alpha and coordinates. If you want to add easing to the animation, the ActionScript (and mathematics) can quickly become complex. However, if you want to change the easing on a particular animation and you are using these prebuilt classes, then you can choose a different class instead of trying to figure out what new mathematical equations you need to create a smooth animation.
To use the Transition class to animate a movie clip zooming in on the Stage, follow these steps:
Select the imported image on the Stage, and then select Modify > Convert to Symbol (F8). Name the symbol img1, and make sure you set the behavior to Movie Clip. The registration point of the symbol is by default in the upper-left corner of the symbol (see Figure 1).
Figure 1. Convert the image into a symbol, and set the registration to the upper-left corner.
Select frame 1 of the main Timeline. Add the following ActionScript into the Actions panel:
mx.transitions.TransitionManager.start(img1_mc, {type:mx.transitions.Zoom, direction:0, duration:1, easing:mx.transitions.easing.Bounce.easeOut, param1:empty, param2:empty});
duration (in the previous code snippet) from one second to two or three seconds.You might notice that the image anchors in the upper-left corner, and grows towards the lower-right corner. This is different than the preview you see in the Transition dialog box. If you want images to zoom in from the center, instead of anchoring on a corner, you need to modify the symbol's registration point when you convert the image from a bitmap (see step 2 above). Follow these steps:
Click the center of the 3x3 grid to set the registration point to the center of the bitmap (see Figure 2). Click OK.
Figure 2. Convert the image into a symbol, and set the registration to the center.
Select frame 1 of the main Timeline and add the following ActionScript to the existing code:
mx.transitions.TransitionManager.start(img2_mc, {type:mx.transitions.Zoom, direction:0, duration:1, easing:mx.transitions.easing.Bounce.easeOut, param1:empty, param2:empty});
If you modified the duration in step 7 above, modify this code snippet to the use the same number.
As you can see, creating complex animations is extremely easy using transitions, and doesn't require you to create motion or shape tweens on the Timeline. And most importantly, you don't need to write complex math to create easing methods.
Note: Some transitions are sensitive to where you locate the registration point. Changing the registration point can have a dramatic effect on how the animation looks in an SWF file.