Director Help

Creating basic navigation controls with behaviors

Director provides behaviors that let you create basic navigation controls without knowing Lingo or JavaScript syntax. You can use behaviors to move the playhead to a frame number or marker. You can also stop the playhead at any frame and wait for the user to act.

The following examples explain the basic use of the Hold on Current Frame and Go Next Button behaviors. You can create custom navigation behaviors or get them from third-party developers. For information about using behaviors, see Behaviors.

  1. Create a movie that contains a sprite in frame 1 and at least one marker in a later frame.
  2. Select Window > Library Palette, and select the Navigation library.
  3. Drag Hold on Current Frame to frame 1 in the script channel.

    Typically, you use this behavior in a frame that requires user interaction such as selecting a menu command.

  4. Play the movie.

    The playhead remains in frame 1 where you attached the behavior. The movie is still playing, but the playhead remains on the single frame. Use the Go Next Button behavior to send the playhead to a new frame and continue playing, as described in the following steps.

  5. Stop the movie.
  6. Drag the Go Next Button behavior from the Library palette to the sprite in frame 1.
  7. Rewind and play the movie again.

    The playhead is again stopped in the first frame by the Hold on Current Frame behavior.

  8. Click the sprite to which you attached the Go Next Button behavior.

    The playhead jumps to the frame that contains the next marker and continues playing.