<<to be re-org'd/rewritten>>

Writing scripts -where

<<explain that Script editor means script pane of actions panel and also script window that opens if you are editing AS or JSFL file>>

Using the Actions panel

You create scripts that are part of your document 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.

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.

To display the Actions panel :

Note: If the panel is already open when you do either of the above, the action toggles between displaying and minimizing it.

To check syntax, do one of the following:

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

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

  1. Select Auto Format Options from the Actions panel pop-up menu.
  2. The Auto Format Options dialog box appears.

  3. Select any of the check boxes. To see the effect of each selection, look in the Preview pane.

To use automatic indentation:

To use punctuation balance:

  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.
  3. 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 in Using Flash.