60
Chapter 3: Writing and Debugging Scripts
Managing scripts in a FLA file
If you don’t centralize all your code within a FLA file in one location, you can
pin
(lock in place)
multiple scripts in the Actions panel to make it easier to move among them. In the following
figure, the script associated with the current location on the Timeline is on Frame 1 of the layer
named Cleanup. (The tab at the far left always follows your location along the Timeline.) That
script is also pinned (it is shown as the rightmost tab). Two other scripts are pinned; one on
Frame 1 and the other on Frame 15 of the layer named Intro. You can move among the pinned
scripts by clicking on the tabs or by using keyboard shortcuts. Moving among pinned scripts does
not change your current position on the Timeline.
Tip:
If the content displayed in the Script pane isn’t changing to reflect the location that you are
selecting on the Timeline, the Script pane is probably displaying a pinned script. Click the leftmost tab
at the lower left of the Script pane to display the ActionScript associated with your location along
the Timeline.
To pin a script:
1
Position your pointer on the Timeline so the script appears in a tab at the lower left of the Script
pane in the Actions panel.
2
Do one of the following:
■
Click the pushpin icon to the right of the tab. (If the pushpin looks like the icon at the far
left, the script is already pinned; clicking that icon unpins it.)
■
Right-click (Windows) or Control-click (Macintosh) on the tab, and select Pin Script.
■
Select Pin Script from the Options pop-up menu (at the upper right of the panel).
To unpin one or more scripts:
•
Do one of the following:
■
If a pinned script appears in a tab at the lower left of the Script pane in the Actions panel,
click the pushpin icon to the right of the tab. (If the pushpin looks like the icon on the far
left, the script is already unpinned; clicking that icon pins it.)
■
Right-click (Windows) or Control-click (Macintosh) on a tab, and select Close Script or
Close All Scripts.
■
Select Close Script or Close All Scripts from the Options pop-up menu (at the upper right
of the panel).
To use keyboard shortcuts with pinned scripts:
•
You can use the following keyboard shortcuts to work with pinned scripts:
Action
Windows shortcut key
Macintosh shortcut key
Pin script
Control-= (equal sign)
Command-=
Unpin script
Control-- (minus sign)
Command--
Move focus to tab on the right Control-Shift-. (period)
Command-Shift-.
Summary of Contents for FLASH MX 2004 - ACTIONSCRIPT
Page 1: ...ActionScript Reference Guide...
Page 8: ...8 Contents...
Page 12: ......
Page 24: ...24 Chapter 1 What s New in Flash MX 2004 ActionScript...
Page 54: ...54 Chapter 2 ActionScript Basics...
Page 80: ...80 Chapter 3 Writing and Debugging Scripts...
Page 82: ......
Page 110: ...110 Chapter 5 Creating Interaction with ActionScript...
Page 112: ......
Page 120: ...120 Chapter 6 Using the Built In Classes...
Page 176: ......
Page 192: ...192 Chapter 10 Working with External Data...
Page 202: ...202 Chapter 11 Working with External Media...
Page 204: ......
Page 782: ...782 Chapter 12 ActionScript Dictionary...
Page 793: ...Other keys 793 221 222 Key Key code...
Page 794: ...794 Appendix C Keyboard Keys and Key Code Values...
Page 798: ...798 Appendix D Writing Scripts for Earlier Versions of Flash Player...
Page 806: ...806 Appendix E Object Oriented Programming with ActionScript 1...
Page 816: ...816 Index...