• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL

Lesson 13. Markers and Navigation > Navigating to a Marker

Navigating to a Marker

When the movie plays, you want to be able to get to the frames with the Priv, Line, and Res markers from the main menu by clicking the corresponding menu options. To make that happen, you will add to the behaviors you created for the first three menu options on the main menu.

In the score, click frame 15 in the frame channel.

On the stage, you can see the main menu you created in the preceding lesson.

Choose View > Sprite Overlay > Show Info (Windows Ctrl+Shift+Alt+O, Macintosh Command+Shift+Option+O).

This turns on the Sprite Overlay feature so you can see the behaviors already assigned to the sprites when they're selected on the stage.

Click the 14:PrivationDim sprite in the upper-right corner of the stage.

The Sprite Overlay panel for this sprite appears.

Figure .

Click the Behavior Inspector button on the sprite toolbar or on Director's toolbar.

If the Events and Actions panels are not visible in the Behavior Inspector, click the arrow to display them.

Figure .

The Behavior Inspector appears, and the Button1 behavior is listed in the Behaviors panel. Next you'll add another type of event and action combination.

Figure .

From the Events menu, choose mouseUp. Then from the Actions menu, choose Navigation > Go to Marker.

A dialog box asks you to choose the marker you want to go to.

Figure .

From the menu in the dialog box, select the Priv marker. Then click OK.

Now when the privation and excesses sprite is clicked, a mouseUp event message is sent to Director, which branches the playback head to the Priv marker. This new event is now one of three that you've assigned to this sprite in the Button1 behavior you created in the previous lesson. As this example shows you, many Lingo instructions can be executed from a single behavior that applies to one sprite.

Figure .

When you were introduced to navigation scripts in Lesson 5, great emphasis was placed on spelling the marker name correctly in the scripts you wrote. Using the Behavior Inspector takes the worry out of spelling the marker name correctly because you can simply select a marker from the list.


When using a button for navigation, you will generally use the mouseUp event rather than the mouseDown event to trigger the change. If your button is set up to show a changed sprite when the mouse button is pressed, then the user can see that the object is clickable, but still have the option of sliding the mouse off of the sprite before releasing. This gives users more control without creating any additional work for them since they have to release the button anyway. An additional advantage is that you, as the developer, don't have to worry about which sprite receives the mouseUp message. As an extreme example, consider the user who clicks a sprite (causing a navigational change) but doesn't release the button until the next scene is displayed, and even then moves the cursor around before releasing the button. Much better to stick to using the mouseUp event.

Select the sprite for the next menu option, lineament. Add a mouseUp event to its Button2 behavior. For the action, choose Navigation > Go to Marker and then select the Line marker.

Now Director will move the playback head to the Line marker in the score when users click the lineament menu option on the main menu. Note that the Behavior Inspector is context sensitive—when you select a new sprite while the Behavior Inspector is open, the contents change to reflect information about the new sprite.

Add a mouseUp event to the Button3 behavior assigned to the reserve menu option. Make sure the action you select moves the playback head to the Res marker in the score.

Save your work.

Rewind and play the movie.

After the introduction, the playback head is held on frame 27, because of the go to the frame script you added to the behavior channel in the previous lesson. The playback head will not move forward until the user makes a selection from the menu.

Click the privations and excesses menu option and watch the playback head.

The playback head branches to the Priv marker because of the mouseUp event you added to the sprite's Button1 behavior. Then the playback head continues on to the end of the presentation because no other instructions control the playback head. To keep the playback head on this frame, you can loop on the frame. You will do that in the next task.

Add a mouseUp event to the Button4 and Button5 behaviors assigned to the Biography and Question menu options, respectively. Make sure you choose the correct markers to go to. The Exit menu option does not get a mouseUp behavior just yet.

Stop the movie and close the Behavior Inspector.

Good work! You've just built some destination frames and added navigation to them using the Behavior Inspector.



Not a subscriber?

Start A Free Trial

  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint