Macromedia flash mx 2004-learning flash User Manual

Page of 122
28
Chapter 3:  Write Scripts with ActionScript
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 your start file, in Flash select File > Open and navigate to the file:
On Windows 2000 or XP, browse to boot drive\ Documents and Settings\All Users\ 
Application Data\Macromedia\Flash MX 2004\language\Configuration\ HelpPanel\ 
HowDoI\ QuickTasks\start_files and double-click scripts_start.fla.
Note: If the Application Data folder is hidden, you’ll need to change your Windows Explorer 
settings to see the folder.
On Windows 98, browse to boot drive\Windows\ Application Data\Macromedia\Flash MX 
2004\language\Configuration\HelpPanel\ HowDoI\QuickTasks\start_files and double-click 
scripts_start.fla.
On Macintosh, browse to Macintosh HD/Users/Shared/Application Support/Macromedia/
Flash MX 2004/language/Configuration/HelpPanel/HowDoI/QuickTasks/start_files and 
double-click scripts_start.fla.
Note: The QuickTasks\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 workspace for taking lessons.
Create an instance of a symbol
You’ll drag an instance of an animated movie clip from the library to the Global Positioning 
System artwork on the Stage. You’ll then follow the recommended practice of always naming 
instances—both to prompt code-hinting and because in your scripts you generally refer to 
instance names rather than symbol names. Code hints are the tooltips that prompt you with the 
correct ActionScript syntax.
1.
In the Tools panel, click the Selection tool. Select the map layer in the Timeline, and click the 
padlock next to the map layer to unlock that layer. 
2.
To place the movie clip accurately, select View > Snapping. Select Snap Align and Snap to 
Objects if the commands are not already selected.
3.
From the Library panel (Window > Library), drag map_skewed to the black background area 
of the Stage.
Because guides don’t appear when you first drag an object from the Library panel, you’ll release 
the object and then drag it again.