Chapter 12 Behaviors; Attaching Behaviors - MACROMEDIA DIRECTOR MX 2004-USING DIRECTOR Use Manual

Hide thumbs Also See for DIRECTOR MX 2004-USING DIRECTOR:
Table of Contents

Advertisement

CHAPTER 12
Behaviors
A behavior in Macromedia Director MX 2004 is prewritten Lingo or JavaScript syntax that you
use to provide interactivity and add interesting effects to your 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 that lets you define 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, you use the Behavior inspector or Property inspector.
For more information about using included behaviors, see Using Director Behaviors on the
Director Support Center at www.macromedia.com/go/director_behaviors_en.

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. You can attach as many behaviors as you want to a sprite, but you can 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.
275

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the DIRECTOR MX 2004-USING DIRECTOR and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Director mx 2004

Table of Contents