You can use the transition and Tween classes to add animations to movie clips and components using ActionScript. If you don't use the transition or the Tween class, you'll have to write your own code to animate movie clips, or modify their alpha and coordinate values. 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 try choosing a different type of easing 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. Registration point set to the upper-left corner by default
import fl.transitions.*;
import fl.transitions.easing.*;
TransitionManager.start(img1_mc, {type:Zoom, direction:0, duration:3, easing: Bounce.easeOut});duration (in the previous code example) from one second to two or three seconds.You might notice that the image anchors in the upper-left corner, and it grows towards the lower-right corner. If you want images to zoom in from the center, instead of anchoring on a corner, you'll 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 3 × 3 grid to set the registration point to the center of the bitmap (see Figure 2). Click OK.
Figure 2. Setting the registration to the center by clicking the middle square
import fl.transitions.*;
import fl.transitions.easing.*;
TransitionManager.start(img2_mc, {type:Zoom, direction:0, duration:3, easing: Bounce.easeOut});
If you modified the duration in Step 7 above, modify this code example 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 use complex math calculations to create easing methods.
Note: Some transitions are sensitive to where you locate the registration point in the movie clip. Changing the registration point can have a dramatic effect on how the animation looks in an SWF file.
To use the Tween class to animate an object, follow these steps:
With Frame 1 of the actions layer selected, open the Actions panel and enter the following code into the Script window:
import fl.transitions.*;
import fl.transitions.easing.*;
function finishHandler(event:TweenEvent):void
{
// Place your actions here
trace("MOTION_FINISH time = "+event.time);
}
var myTween:Tween = new Tween(img1_mc, "y", Elastic.easeOut, 0, 250, 3, true);
myTween.addEventListener(TweenEvent.MOTION_FINISH, finishHandler);
Note: This code example shows how to create a simple tween with an event handler function assigned to listen to the animation. Events are timing hooks that allow you to respond to various points in the animation. You can respond to the following events: motionChange, motionFinish, motionLoop, motionResume, motionStart, and motionStop.
img1_mc finishes animating
on the Stage.Read about the Tween class in the ActionScript 3.0 Language and Components Reference for more information.