About the Tween and TransitionManager classes
483
Adding tweens and transitions to a file in Flash
Professional 8 (Flash Professional 8 only)
The Tween and TransitionManager classes are designed to let you use simple ActionScript to
add animations to parts of your SWF file. The Flash authoring environment contains
behaviors that let you use these prebuilt classes for transitions in a screen-based application.
To create a slide presentation or form application, you can select behaviors that add different
kinds of transitions between slides.
Before you start to use these transitions with movie clips in Flash, you should see what they do
when you use a screen-based application.
To view the ActionScript that creates a transition in a slide presentation:
1.
Select File > New to create a new slide presentation in Flash Professional 8.
2.
Select Flash Slide Presentation from the General tab and click OK.
3.
Select Window > Behaviors to open the Behaviors panel.
4.
Click Add Behavior (+).
5.
Select Screen > Transition from the pop-up menu to open the Transitions dialog box.
6.
Select the Zoom transition.
7.
Type
1
into the Duration text box.
8.
Select Bounce from the Easing pop-up menu.
9.
Click OK to apply the settings and close the dialog box.
This adds about 15 lines of ActionScript directly onto the slide. The following snippet
shows the relevant transition code:
mx.transitions.TransitionManager.start(eventObj.target,
{type:mx.transitions.Zoom, direction:0, duration:1,
easing:mx.transitions.easing.Bounce.easeOut, param1:empty,
param2:empty});
NO
T
E
This section describes adding tweens and transitions to a Flash Professional slide
presentation to demonstrate what they look like for Flash Professional users. However,
you can add transitions and tweens to your Flash Basic 8 (or Flash Professional 8)
applications if you use code. The following sections include examples that show you
how.
Содержание 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...