
275
Chapter 13: Behaviors
A
behavior
in Adobe
®
Director
®
is prewritten Lingo or JavaScript™ syntax that you use to provide interactivity and
add interesting effects to a movie. You drag a behavior from the Library palette and drop it on a sprite or frame to
attach it.
If the behavior includes parameters, a dialog box appears for defining those parameters. For example, most
navigation behaviors let you specify a frame to jump to. You can attach the same behavior to as many sprites or
frames as necessary and use different parameters for each instance of the behavior.
Most behaviors respond to simple events such as a mouse click on a sprite or the entry of the playhead into a frame.
When the event occurs, the behavior performs an action, such as jumping to a different frame or playing a sound.
Director comes packaged with customizable, reusable behaviors for many basic functions. You and other developers
can also create and share your own behaviors by writing Lingo or JavaScript syntax. To modify behaviors, use the
Behavior inspector or Property inspector.
For more information about using included behaviors, see Using Director Behaviors on the Director Support Center
at
http://www.adobe.com/support/documentation/en/director/
.
Attaching behaviors
You use the Library palette to display behaviors included in Director.
Director allows you to attach the same behavior to several sprites or several frames at the same time. Attach as many
behaviors as you want to a sprite, but attach only one behavior to a frame. If you attach a behavior to a frame that
already has a behavior, the new behavior replaces the old one. Behaviors attached to frames are best suited to actions
that affect the entire movie. For example, you might attach
Loop Until Media in Frame is Available
to make
the movie wait while the media for a particular frame downloads.
When you attach a behavior, and the Parameters dialog box appears, the parameters you specify apply to the behavior
only as it is attached to the current sprite or frame. These settings do not affect the way the behavior works when
attached elsewhere. Use the Behavior inspector to change parameters for behaviors attached to sprites or frames.
Once you attach a behavior to a sprite or frame, Director copies the behavior from the Behavior library to the
currently selected cast in the movie. This means you do not have to include the Behavior library when you distribute
the movie.
Attach a behavior to a single sprite or frame, using the Library palette
1
Select Window > Library Palette.
2
Select a library from the Library menu in the upper-left corner of the palette.
Содержание 65036570 - Director - PC
Страница 1: ...i ADOBE DIRECTOR 11 USER GUIDE...