EasyManua.ls Logo

MACROMEDIA FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH - Scripting Animation with Actionscript 2.0

MACROMEDIA FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH
830 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
470 Animation, Filters, and Drawings
Scripting animation with ActionScript 2.0
You can use ActionScript 2.0 to add animation to your Flash applications, instead of using
motion or shape tweens on a timeline.The following sections show you how to use code to
animate instances, such as changing the transparency and appearance of the instance, and
moving the instance around the Stage.
For information on using the Tween and TransitionManager classes to further automate code-
based animations, see “TransitionManager class on page 1201 and “Tween class
on page 1273. These classes help you add advanced easing equations and transition
animations to movie clip instances in your application. Many of these effects are difficult to
recreate using ActionScript without these prebuilt classes, because the code you need to use
involves writing complex mathematical equations to achieve the effect.
For more information about how to animate drawings that you create with code, see
“Drawing with ActionScript” on page 540.
The following sections describe how to script animations:
About animation and frame rateon page 471
“Fading objects with code” on page 472
Adding color and brightness effects with code” on page 474
“Moving objects with code” on page 477
“Panning an image with code” on page 478
For an example of scripted animation in Flash, you can find a sample source file,
animation.fla, in the Samples folder on your hard disk.
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and
Tutorials\Samples\ActionScript\Animation.
On the Macintosh, browse to Macintosh HD/Applications/Macromedia Flash 8/Samples
and Tutorials/Samples/ActionScript/Animation.
You can find samples of photo gallery applications on your hard disk.These files provide
examples of how to use ActionScript to control movie clips dynamically while loading image
files into a SWF file, which includes scripted animation. You can find the sample source files,
gallery_tree.fla and gallery_tween.fla, in the Samples folder on your hard disk.
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and
Tutorials\Samples\ActionScript\Galleries.
On the Macintosh, browse to Macintosh HD/Applications/Macromedia Flash 8/Samples
and Tutorials/Samples/ActionScript/Galleries.

Table of Contents

Related product manuals