
335
USING FLASH CS4 PROFESSIONAL
ActionScript
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
preferences 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 Communication
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.
Apply Block Comment
Adds comment markers to the beginning and end of the selected code block.
Apply Line Comment
Adds a single-line comment marker at the insertion point, or at the beginning of each line of
code in a multiline selection.
Remove Comment
Removes comment markers from the current line or all lines of the current selection.
Show/Hide Toolbox
Displays or hides the Actions Toolbox.
Script Assist
(Actions panel only) In Script Assist mode, you are presented with a user-interface for entering the
elements needed to create scripts.
Help
Displays reference information for the ActionScript element that is selected in the Script pane. For example,
if you click an
import
statement and then click Help, the reference information for
import
appears in the Help panel.
Panel menu
(Actions panel only) Contains the commands and preferences that apply to the Actions panel. For
example, you can set line numbers and word wrapping, access ActionScript preferences, and import or export scripts.
Updated 5 March 2009