About behaviors – Adobe Flash Professional CC 2014 v.13.0 User Manual

Page 659

Advertising
background image

To the top

Click a category in the Actions toolbox to display the actions in that category, and then either double-click an action or drag it to the Script
pane.

Click Add (+) and select an action from the pop-up menu.

Press Escape and a shortcut key. (To view a list of shortcut keys, select Esc Shortcut Keys in the Actions panel pop-up menu; select this
option again to hide the list.)

Delete an action

1. Select a statement in the Script pane.

2. Click Delete (-) or press the Delete key.

Move a statement up or down in the Script pane

1. Select a statement in the Script pane.

2. Click the up or down arrow.

Work with parameters

1. Add an action to, or select a statement in, the Script pane.

Relevant parameter options appear above the Script pane.

2. Enter values in the boxes above the Script pane.

Search for text in a script

To go to a specific line in a script, choose Go To Line from the Actions panel pop-up menu or press Control+G (Windows) or Command+G
(Macintosh); then enter the line number.

To find text, click Find

, select Find from the Actions panel pop-up menu, or press Control+F (Windows) or Command+F (Macintosh).

To find text again, press F3 or select Find Again from the Actions panel pop-up menu.

To replace text, click Find, or press Control+H (Windows) or Command+H (Macintosh).

In Script Assist mode, Replace searches and replaces text only in the parameter box of each action, not in the entire script. For example, in
Script Assist mode you cannot replace all gotoAndPlay actions with gotoAndStop.

About behaviors

Behaviors are predefined scripts that you can attach to objects in your FLA file. Behaviors provide functionality such as frame navigation, loading
external SWF and JPEG files, controlling the stacking order of movie clips, and movie clip dragging.

Behaviors provide a convenient way to avoid writing ActionScript and can help you learn how ActionScript works.

Behaviors are available only for ActionScript 2.0 and earlier, and only when you work in the Actions panel, not in an external script file. Typically,
you select a triggering object in your document (such as a movie clip or a button), select Add in the Behaviors panel, and then select behavior, as
the following example shows:

Selecting a behavior from the Behaviors panel

The behavior is added to the object and is displayed in the Actions panel.

The ActionScript of a behavior

652

Advertising