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:
Position your pointer on the Timeline so the script appears in a tab at the lower left of the Script
1
pane in the Actions panel.
Do one of the following:
2
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
Pin script
Unpin script
Move focus to tab on the right Control-Shift-. (period)
60
Chapter 3: Writing and Debugging Scripts
Windows shortcut key
Control-= (equal sign)
Control-- (minus sign)
Macintosh shortcut key
Command-=
Command--
Command-Shift-.
Need help?
Do you have a question about the FLASH MX 2004 - ACTIONSCRIPT and is the answer not in the manual?