
346
USING FLASH CS4 PROFESSIONAL
ActionScript
If the content in the Script pane doesn’t change to reflect the location you select on the timeline, the Script pane is
probably showing a pinned script. Click the tab at the lower left of the Script pane to show the script associated with
your location along the timeline.
See also
“
Debugging ActionScript 3.0
” on page 360
“
Debugging ActionScript 1.0 and 2.0
” on page 350
Pin a script
1
Click 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.
•
Right-click (Windows) or Control-click (Macintosh) the tab, and select Pin Script.
•
From the panel menu
(at the upper-right corner of the Actions panel), select Pin Script.
Unpin a script
•
If a pinned script appears in a tab at the lower left of the Script pane in the Actions panel, click the Pushpin icon on
the right of the tab.
•
Right-click (Windows) or Control-click (Macintosh) a tab, and select Close Script or Close All Scripts.
•
From the panel menu
(at the upper-right corner of the Actions panel), select Close Script or Close All Scripts.
Keyboard shortcuts for pinned scripts
When the insertion point is in the Script pane, use the following keyboard shortcuts to work with pinned scripts.
Insert target paths
Many script actions are meant to affect movie clips, buttons, and other symbol instances. In your code, you can
reference symbol instances on a timeline by inserting a
target path
—the address of the instance you want to target. You
can set either an absolute or relative target path. An absolute path contains the entire address of the instance. A relative
path contains only the part of the address that is different from the address of the script itself in the FLA file, and will
no longer work if the script is moved to another location.
1
In the Actions panel, click an action in your script.
2
Click Target Path
.
3
Enter the path to the target instance, or select the target from the list.
4
Select either the Absolute or Relative path option.
Action
Windows shortcut key
Macintosh shortcut key
Pin script
= (equal sign)
=
Unpin script
- (minus sign)
-
Move focus to tab on the right
Shift+. (period)
Shift+.
Move focus to tab on the left
Shift+, (comma)
Shift+,
Unpin all scripts
Shift+- (minus sign)
Shift+-
Updated 5 March 2009