Writing Scripts with ActionScript > Using the Actions panel > Working in expert mode |  |

Working in expert mode

In expert mode you create scripts by entering ActionScript directly into the Script pane on the right side of the Actions panel. You edit actions, enter parameters for actions, or delete actions directly in the Script pane, much as you would create a script in a text editor. You can also use the Actions toolbox (the left side of the Actions panel) and the Add (+) button to add actions to the Script pane, but the parameter text boxes don't appear. You cannot move statements with the Up Arrow and Down Arrow buttons or delete statements with the Delete (-) button.

Like normal mode, expert mode lets you use the buttons above the Script pane to find and replace text, set and remove debugging breakpoints, view line numbers, and insert target paths; it also allows you to use the jump menu and the Script Pin button.

In expert mode you can also check syntax for errors, automatically format code, and use code hints to help you complete syntax. In addition, the punctuation balance feature helps you pair parentheses, braces, or brackets.

The Actions panel in expert mode

To display the Actions panel in expert 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 Expert Mode.
| Click anywhere in the Actions panel. Then press Control+Shift+E (Windows) or Command+Shift+E (Macintosh).

To check syntax, do one of the following:

| Click the Check Syntax button.
| Choose Check Syntax from the Actions panel pop-up menu (at the upper right of the panel). Syntax errors are listed in Output window.
| Press Control+T (Windows) or Command+T (Macintosh).

To format code using the Flash formatting style, do one of the following:

| Click the Auto Format button.
| Choose Auto Format from the Actions panel pop-up menu.
| Press Control+Shift+F (Windows) or Command+Shift+F (Macintosh).

To set options for the Flash formatting style, do the following:

1 | Choose Auto Format Options from the Actions panel pop-up menu.
| The Auto Format Options dialog box appears.
2 | Select any of the check boxes. To see the effect of each selection, look in the Preview pane.

To use automatic indentation:

Automatic indentation is turned on by default. To turn it off, deselect Automatic Indentation in ActionScript Editor preferences.

When automatic indentation is turned on, the text you type after `(` or `{` is automatically indented according to the Tab Size setting in ActionScript Editor preferences. To indent another line in the Script pane, select the line and press Tab. To remove the indent, press Shift+Tab.

To use punctuation balance, do the following:

1 | Click between braces, brackets, or parentheses in your script.
2 | Press Control+' (Windows) or Command+' (Macintosh) to highlight the text between braces, brackets, or parentheses.
| The highlighting helps you check whether opening punctuation has correct corresponding closing punctuation.

To display code hints:

Click the Show Code Hint button.

For more information about code hints, see Using code hints. To change Flash preferences so that code hints always appear, see Setting Actions panel preferences.