Pin scripts in the Actions panel

If you don’t organize the code within your FLA file into one central location, or if you’re using behaviors, you can pin individual scripts in the Actions panel to move among them more easily. To pin a script means that you can keep the location of the code open in the Actions panel, and easily click between open scripts. This can be especially useful when debugging.

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+-

  This page on the Web