Director Help

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.

  3. To view a brief description of included behaviors, move the pointer over a behavior icon.

    If the behavior includes a longer description, you can view it in the Behavior inspector or in Director Help. For more information, see Getting information about behaviors. The behaviors included with Director come with descriptions. Behaviors from other sources may not.

    Select Show Names from the Library menu to turn the display of behavior names on or off.

  4. To attach a behavior to a single sprite, drag a behavior from the Library palette to a sprite on the Stage or in the Score, as shown.

  5. To attach a behavior to a frame in the behavior channel, drag a behavior from the Library palette to a frame in the behavior channel, as shown.

  6. Enter parameters for the behavior in the Parameters dialog box.

Note: If you attach a behavior from a Director library of behaviors, the behavior is copied to the currently active cast.

Attach the same behavior to several sprites at once, using the Library palette

  • Select the sprites on the Stage or in the Score and drag a behavior to any one of them.

Attach behaviors that have already been copied to a cast

  1. Select Window > Behavior Inspector to open the Behavior inspector.
  2. Do one of the following:
    • Select a sprite or several sprites.
    • Select a frame or several frames.
  3. Select a behavior from the Behaviors menu.

    Director attaches the behavior you select to the sprites or frames, as shown in the example.

    Note: Some behaviors work only when applied to either a sprite or a frame. For more information, read the behavior descriptions.

Change parameters for a behavior attached to a sprite or frame

  1. Select the sprite or frame to which the behavior is attached.
  2. In the Behavior tab of the Property inspector, use the menus or text boxes to change any parameters.