[ Pobierz całość w formacie PDF ]

The image on the Stage is now an instance of the MCWheel symbol in the library.
Assign an instance name to the movie clip
To refer to an instance in ActionScript, and as a general best practice, always assign instance
names to buttons and movie clip symbols. (You cannot assign an instance name to a
graphic symbol.)
" In the Property inspector, with the instance of MCWheel selected on the Stage, enter
wheel_mc in the Instance Name text box.
Assign an instance name to the movie clip 67
Add an effect to the movie clip
You can create an animation within a movie clip Timeline, in symbol-editing mode, that plays
independent of the main Timeline. You ll add an effect to the MCWheel symbol that will cause
all instances of the symbol to spin.
1 With the Selection tool, double-click the wheel_mc instance to enter symbol-editing mode.
2 Right-click (Windows) or Control-click (Macintosh) the symbol and select Timeline Effects >
Transform/Transition > Transform.
3 In the Transform dialog box, enter 60 in the Effect Duration text box to specify that the effect
span 60 frames in the Timeline.
4 In the Spin text box, enter 1 and verify that 360 populates the Rotate text box.
5 Click Update Preview to view a preview of the effect, then click OK.
The Effect spans 60 frames in the movie clip Timeline.
6 Click Scene 1 above the Timeline to exit symbol-editing mode.
7 Select Control > Test Movie to view the animation.
Summary
Congratulations on learning about symbols and instances. In a few minutes, you accomplished
the following tasks:
" Create a graphic symbol
" Duplicate and modify an instance
" Create a movie clip symbol
" Edit a symbol by adding an effect
To learn more about Flash, take another lesson in the Basic Flash series.
68 Chapter 8: Create Symbols and Instances
CHAPTER 9
Add Animation and Navigation to Buttons
A button is a symbol that contains special frames for different button states, such as when the
user s mouse pointer is over the button or when the user clicks the button. When you select the
Button behavior for a new symbol, Macromedia Flash MX 2004 and Macromedia Flash MX
Professional 2004 create the Timeline for the button states. You can add navigation to buttons by
using behaviors or by writing ActionScript.
In this lesson, you ll learn about creating and modifying buttons, including adding animation to a
button. Specifically, you ll learn how to complete the following tasks:
" Create a button from grouped objects
" Name a button instance
" View the hit area of a button
" Change the hit area of a button
" Align buttons
" Create animation for a button state
" Add an action to a button
" Add navigation to a button
If you are not familiar with symbols and instances, before taking this lesson select Help > How
Do I > Basic Flash > Create Symbols and Instances to take that lesson.
69
Set up your workspace
First, you ll open the start file for the lesson and set up your workspace to use an optimal layout
for taking lessons.
1 To open the start file, in Flash select File > Open. Then do one of the following:
 % If you re using a Windows 2000 or XP operating system, browse to
\Documents and Settings\\Local Settings\Application Data\
Macromedia\Flash MX 2004\\Configuration\HelpPanel\HowDoI\BasicFlash\
start_files and double-click buttons_start.fla.
Note: If the Application Data folder is hidden, you ll need to change your Windows Explorer
settings to see the folder.
 % If you re using a Windows 98 operating system, browse to
\Windows\Application Data\Macromedia\Flash MX 2004\\
Configuration\HelpPanel\HowDoI\BasicFlash\start_files and double-click
buttons_start.fla.
 % If you re using a Macintosh operating system, browse to /Applications/
Macromedia/Flash MX 2004/First Run/HelpPanel/HowDoI/BasicFlash/start_files and
double-click buttons_start.fla.
Note: The BasicFlash\finished_files folder contains completed versions of lesson FLA files, for
your reference.
2 Select File > Save As and save the document with a new name, in the same folder, to preserve
the original start file.
3 Select Window > Panel Sets > Training Layout to modify your work area for taking lessons.
4 In the Stage View pop-up menu, in the upper right side of the Timeline, select Show Frame to
view both the Stage and the work area.
5 Click in the work area, away from objects on the Stage, so that no objects are selected.
Create a button from grouped objects
You can create buttons from text and graphics, including bitmap images and grouped objects. [ Pobierz całość w formacie PDF ]

  • zanotowane.pl
  • doc.pisz.pl
  • pdf.pisz.pl
  • apsys.pev.pl