MACROMEDIA FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH Manual page 486

Learning actionscript 2.0 in flash
Table of Contents

Advertisement

9.
With the image still selected, open the Property inspector (Window > Properties >
Properties), and assign the movie clip the instance name img1_mc.
10.
Select Frame 1 of the main Timeline and add the following ActionScript to 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});
For information on working with packages, see
on page
499.
11.
Select Control > Test Movie to test the animation.
The image grows and has a slight bouncing effect before it returns to its original size. If the
animation moves too quickly, increase the animation's duration (in the previous code
snippet) from one second to two or three seconds (for example,
You might notice that the image is anchored in the upper-left corner and grows toward the
lower-right corner. This is different from the preview you see in the Transitions
dialog box.
Creating complex animations is easy using the Tween and TransitionManager classes and
doesn't require you to create motion or shape tweens on the timeline. Most importantly,
you don't need to write complex math to create easing methods. If you want images to
zoom in from the center instead of anchoring on a corner, modify the symbol's
registration point when you convert the image from a bitmap into a symbol.
To zoom images in from the center of the image:
1.
Complete the steps in the previous procedure.
2.
Open the zoom.fla file, and select File > Save As to save a new copy of the document.
Save the file as zoom2.fla.
3.
Drag a copy of the bitmap symbol from the Library panel onto the Stage beside the current
movie clip symbol.
4.
With the bitmap image still selected on the Stage, press F8 to convert the symbol into a
movie clip.
Name the symbol img2.
486
Animation, Filters, and Drawings
"Working with filter packages"
duration:3
).

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash 8

Table of Contents