Tools in the actions panel and script window – Adobe Flash Professional CS3 User Manual

Page 391

Advertising
background image

FLASH CS3

User Guide

385

If you have more than one external file open, filenames are displayed on tabs across the top of the Script window.

In the Script window, you can use the following features: the Add (+) menu (which is like the Actions toolbox), find
and replace, syntax checking, syntax coloring, auto format, code hinting, code commenting, code collapse, debug
options (ActionScript files only), and word wrap. The Script window also lets you display line numbers and hidden
characters.

The Script window does not include code-assistance features such as the Script navigator, Script Assist mode, and
behaviors. These features are useful only in the context of creating a FLA file, not an external script file.

See also

“Writing and managing scripts” on page 390

Create an external file in the Script window

1

Select File > New.

2

Select the type of external file you want to create (ActionScript file, ActionScript Communication file, or Flash

JavaScript file).

Edit an existing file in the Script window

To open an existing script, select File > Open, and then open an existing AS file.

To edit a script that is already open, click the document tab that shows the script’s name.

Tools in the Actions panel and Script window

The Actions panel and Script window toolbars let you access the code-assistance features that help simplify and
streamline coding in ActionScript. The tools are different depending on whether you are using the Actions panel or
the Script window.

Add A New Item To The Script

Displays the language elements that are also in the Actions toolbox. Select an item

to add it to the script.

Find

Finds and replaces text in your script.

Insert Target Path

(Actions panel only) Helps you set an absolute or relative target path for an action in the

script.

Check Syntax

Checks for syntax errors in the current script. Syntax errors are listed in the Output panel.

Auto Format

Formats your script for proper coding syntax and improved readability. Set autoformatting prefer-

ences in the Preferences dialog box, which is available from the Edit menu or from the Actions Panel menu.

Show Code Hint

If you’ve turned off automatic code hinting, use Show Code Hint to display a code hint for the

line of code you’re working on.

Debug Options

(Actions panel only) Sets and removes breakpoints so that you can proceed line by line through

your script when debugging. You can use debug options only for ActionScript files, not ActionScript Communi-
cation or Flash JavaScript files.

Collapse Between Braces

Collapses code that appears between the curly braces or parentheses that currently

contain the insertion point.

Collapse Selection

Collapses the currently selected code block.

Expand All

Expands all collapsed code in the current script.

Advertising