About the Tween and TransitionManager classes
485
Each transition has slightly different customizations that you can apply to the animation. The
Transitions dialog box lets you preview a sample animation before you apply the effect to the
slide or form.
Animating with the TransitionManager and
Tween classes
You can use the TransitionManager and Tween classes in Flash Basic 8 and Flash Professional
8 to add animations to movie clips, components, and frames using ActionScript. If you don’t
use the TransitionManager or the Tween class, you have to write custom code to animate
movie clips or modify their level of transparency (alpha) and coordinates (location). If you
add easing to the animation, the ActionScript (and mathematics) can become complex
quickly. However, if you want to change the easing on a particular animation and you use
these prebuilt classes, you can select a different class instead of trying to figure out the new
mathematical equations you need to create a smooth animation.
The following procedure animates a movie clip so that it uses the TransitionManager class to
zoom in on the Stage.
To animate a movie clip using the TransitionManager class:
1.
Select File > New and select Flash Document.
2.
Click OK to create the new FLA file.
3.
Save the FLA file as
zoom.fla
.
4.
Select File > Import > Import to Stage, and select an image on your hard disk to import
into the FLA file.
The image is imported into your file as a bitmap image, so you need to convert the image
manually into a movie clip symbol.
5.
Click Open to import the image.
6.
Select the imported image on the Stage and select Modify > Convert to Symbol
7.
Name the symbol
img1
, and make sure you set the behavior to Movie Clip.
By default, the registration point of the symbol is in the upper-left corner of the symbol.
8.
Click OK to convert the bitmap image into a movie clip.
TI
P
To preview how each transition works with the different methods in the easing classes,
you can double-click Transition.swf in
boot drive
\Program Files\Macromedia\Flash
8\
language
\First Run\Behaviors\ folder or
Macintosh HD
:Applications:Macromedia
Flash 8:First Run:Behaviors: to open the SWF file in the stand-alone player.
Содержание FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH
Страница 1: ...Learning ActionScript 2 0 in Flash...
Страница 8: ...8 Contents...
Страница 18: ...18 Introduction...
Страница 30: ...30 What s New in Flash 8 ActionScript...
Страница 66: ...66 Writing and Editing ActionScript 2 0...
Страница 328: ...328 Interfaces...
Страница 350: ...350 Handling Events...
Страница 590: ...590 Creating Interaction with ActionScript...
Страница 710: ...710 Understanding Security...
Страница 730: ...730 Debugging Applications...
Страница 780: ...780 Deprecated Flash 4 operators...
Страница 830: ...830 Index...