Insert target paths use code hints, Insert target paths, Use code hints – Adobe Flash Professional CC 2014 v.13.0 User Manual
Page 686
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 the tabs or by using keyboard
shortcuts. Moving among pinned scripts does not change your current position on the timeline.
A pinned script
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.
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.
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+.
Move focus to tab on the left
Control+Shift+, (comma)
Command+Shift+,
Unpin all scripts
Control+Shift+- (minus sign)
Command+Shift+-
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.
Use code hints
When you work in the Actions panel or Script window, the software can detect what action you are entering and display a code hint. There are two
types of code hint: a tooltip that contains the complete syntax for that action, and a pop-up menu that lists possible ActionScript elements, such as
method or property names (sometimes referred to as a form of code completion).
Code hints are enabled by default. By setting preferences, you can disable code hints or determine how quickly they appear. When code hints are
disabled in preferences, you can still manually display a code hint for a specific command.
679