About the Tween and TransitionManager classes
497
The second section of ActionScript creates a listener object for the MovieClipLoader class
instance, which you create in the third section of code. When the target movie clip loads
into the MovieClipLoader instance, the
onLoadInit
event triggers and executes the block
of code, which calls both the Tween class and the TransitionManager class. This event
handler fades in the target movie clip because you modify the
_alpha
property in the
Tween class, and
flies
the target movie clip along the
x
-axis.
The third section of ActionScript code creates a MovieClipLoader instance and applies the
listener object that you created earlier (so the target movie clip loader instance can listen
for the
onLoadInit
event). Then you load the target JPEG image into a movie clip that
you create dynamically by calling the
createEmptyMovieClip()
method.
3.
Save your document and select Control > Test Movie to view the animation in the
test environment.
After the external JPEG image finishes downloading from the server, the image fades in
gradually and animates from right to left across the Stage.
For information on using the Tween class, see
“Using the Tween class” on page 490
.
For information on each method and property of the Tween class, see
Chapter 51, “Tween
class”
in the
Components Language Reference
. For information on each method and property of
the TransitionManager class, see
Chapter 48, “TransitionManager class”
in the
Components
Language Reference
.
You can find a sample source file that adds scripted animation using these classes. Find
tweenProgress.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\Tween ProgressBar.
■
On the Macintosh, browse to
Macintosh HD
/Applications/Macromedia Flash 8/Samples
and Tutorials/Samples/ActionScript/Tween ProgressBar.
Содержание 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...