About behaviors – Adobe Flash Professional CS3 User Manual

Page 395

Advertising
background image

FLASH CS3

User Guide

389

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

For a sample about behaviors, see the Flash Samples page at

www.adobe.com/go/learn_fl_samples

. Download and

decompress the Samples zip file and navigate to the Behaviors\BehaviorsScrapbook folder to access the sample.

Advertising