Writing Scripts with ActionScript > Using the Actions panel > Working in normal mode |
![]() ![]() ![]() |
Working in normal mode
In normal mode you build scripts by selecting items from the Actions toolbox, the list on the left side of the Actions panel. (You can also select actions from the Add (+) button pop-up menu.) The Actions toolbox separates items into categories such as Actions, Properties, and Objects, and also provides an Index category that lists all items alphabetically. When you click an item once, its description appears at the upper right of the panel. When you double-click an item, it appears on the right side of the panel, in the Script pane.
In normal mode you can add, delete, or change the order of statements in the Script pane; you can also enter parameters for actions in text boxes above the Script pane. The Actions panel also lets you find and replace text, view script line numbers, and "pin" a scriptthat is, keep a script in the Script pane when you click away from the object or frame. You can also use the jump menu to go to any script on any object in the current frame.
To use the Actions panel to insert target paths, see Working with Movie Clips and Buttons.
To work with the Actions panel's debugging breakpoint features, see Setting and removing breakpoints.
The Actions panel in normal mode
To display the Actions panel in normal mode:
1 |
Select Windows > Actions. |
2 |
Do one of the following: |
![]() |
Click the arrow in the upper right corner of the Actions panel to display the pop-up menu, and choose Normal Mode. |
![]() |
Click anywhere in the Actions panel. Then press Control+Shift+N (Windows) or Command+Shift+N (Macintosh). |
To view a description of an action, do one of the following:
![]() |
Click a category in the Actions toolbox to display the actions in that category, and click an action. |
![]() |
Select a line of code in the Script pane. |
The description appears at the upper right of the Actions panel.
To add an action to the Script pane, do one of the following:
![]() |
Click a category in the Actions toolbox to display the actions in that category. Then either double-click an action, drag it to the Script pane, or right-click (Windows) or Control-click (Macintosh) and select Add to Script. |
![]() |
Click the Add (+) button and select an action from the pop-up menu. |
![]() |
Press Escape and a shortcut key. For example, Escape+st adds a |
To delete an action:
1 |
Select a statement in the Script pane. |
2 |
Click the Delete (-) button or press the Delete key. |
To move a statement up or down in the Script pane:
Select a statement in the Script pane, then do one of the following:
![]() |
Click the Up or Down Arrow button. |
![]() |
Select the statement and drag it up or down. |
To work with parameters:
1 |
Add an action to or select a statement in the Script pane. |
2 |
Enter values in the parameter text boxes above the Script pane. |
For more information about code hints that can help you insert parameters, see Using code hints.
To search for text in a script, do one of the following:
![]() |
To go to a specific line in a script, choose GoTo Line from the Actions panel pop-up menu or press Control+G (Windows) or Command+G (Macintosh); then enter the line number. |
![]() |
To find text, click the Find button above the Script pane, choose Find from the Actions panel pop-up menu, or press Control+F (Windows) or Command+F (Macintosh). Enter the text you want to find in the dialog box that appears. |
![]() |
To find text again, press F3 or choose Find Again from the Actions panel pop-up menu. |
![]() |
To replace text, click the Replace button above the Script pane, choose Replace from the Actions panel pop-up menu, or press Control+H (Windows) or Command-H (Macintosh). Enter the text you want to find and the text you want to replace it with in the dialog box that appears. |
In expert mode, Replace scans the entire body of text in a script. In normal mode, Replace searches and replaces text only in the parameter box of each action. For example, in normal mode you cannot replace all |
These find and replace features search the current Script pane. To search through text in every script in a movie, use the Movie Explorer (see Using the Movie Explorer).
To navigate between scripts:
Use the jump menu at the top of the Actions panel and choose a script from the list.
To pin a script to the Actions panel:
Click the Script Pin button.
The Actions panel displays the script in the Script pane even when you click away from the object or frame.
To resize the Actions toolbox or Script pane, do one of the following:
![]() |
Drag the vertical splitter bar that appears between the Actions toolbox and Script pane. |
![]() |
Double-click the splitter bar to collapse the Actions toolbox; double-click the bar again to redisplay the Actions toolbox. |
![]() |
Click the arrow button on the splitter bar to expand or collapse the Actions toolbox. |
When the Actions toolbox is hidden, you can still use the Add (+) button to access its items. |
To view line numbers in the Script pane, do one of the following:
![]() |
Select View Line Numbers from the View Options pop-up menu above the Script pane. |
![]() |
Select View Line Numbers from the Actions panel pop-up menu. |
![]() |
Press Control+Shift+L (Windows) or Command+Shift+L (Macintosh). |
To print actions:
1 |
From the Actions panel pop-up menu, choose Print. |
The Print dialog box appears. |
|
2 |
Choose options and click Print. |
Because the printed file won't include information about its originating Flash file, it's a good idea to include this information in a comment
action in the script.
![]() ![]() ![]() |