beautypg.com

Script assist mode and behaviors, About script assist mode, Use script assist to write actionscript – Adobe Flash Professional CC 2014 v.13.0 User Manual

Page 658

background image

(Deprecated with Flash Professional CC) Script Assist mode and
behaviors

To the top

To the top

About Script Assist mode
Use Script Assist to write ActionScript
About behaviors

About Script Assist mode

If you are new to ActionScript, or if you want to add simple interactivity without having to learn the ActionScript language and its syntax, you can
use Script Assist in the Actions panel to help you add ActionScript to your FLA files.

Script Assist lets you build scripts by selecting items from the Actions toolbox. When you click an item once, its description appears at the upper
right of the panel. When you double-click an item, it adds the item to the Actions panel Script pane.

In Script Assist mode, you can add, delete, or change the order of statements in the Script pane; enter parameters for actions in boxes above the
Script pane; find and replace text; and view script line numbers. You can also pin a script—that is, keep a script in the Script pane when you click
away from the object or frame.

Script Assist helps you avoid the syntax and logic errors a novice user might make. However, to use Script Assist you must become familiar with
ActionScript, and know what methods, functions, and variables to use when creating your scripts. To learn about ActionScript, see Learning
ActionScript 2.0 in Adobe Flash
or Programming ActionScript 3.0.

For a video tutorial about Script Assist mode, see

www.adobe.com/go/vid0131

.

For a text tutorial about Script Assist mode, see Use Script Assist Mode on the Flash Tutorials page at

www.adobe.com/go/learn_fl_tutorials

.

Use Script Assist to write ActionScript

To add an ActionScript 3.0 action to a Flash document, you must attach it to a frame. To add an ActionScript 2.0 (or earlier) action to a Flash
document, attach it to a button or movie clip, or to a frame in the timeline.

For a video tutorial about Script Assist mode, see

www.adobe.com/go/vid0131

.

For a text tutorial about Script Assist mode, see Use Script Assist Mode on the Flash Tutorials page at

www.adobe.com/go/learn_fl_tutorials

.

Start Script Assist mode

1. Select Window > Actions.

2. In the Actions panel, click Script Assist

.

In Script Assist mode, the Actions panel changes in the following ways:

Add (+) functions differently in Script Assist mode. When you select an item from the Actions toolbox or the Add menu

, the item is

added after the currently selected text block.

Delete (-) lets you remove the current selection in the Script pane.

The up and down arrows let you move the current selection in the Script pane upward or downward within the code.

The Check Syntax

, Auto Format

, Show Code Hint

, and Debug Options

buttons and menu items normally visible in the

Actions panel are disabled, as they do not apply to Script Assist mode.

The Insert Target button

is disabled unless you are typing in a box. Clicking Insert Target places the resulting code in the current box.

Note: If the Actions panel contains ActionScript code when you click Script Assist, Flash compiles the code. If there are errors in the code, you
cannot use Script Assist until you fix the current code selection. The errors are described in detail in the Compiler Errors panel.

View a description of an action

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 top of the Actions panel.

Add an action to the Script pane

651