The Taming of Director 7

What if I said you could create an interactive project in Macromedia Director without having to write scripts in Director's Lingo language? You'd probably wonder what I was smoking. Sorry, Cheech–with Director 7, it really is possible to make multimedia without having to learn a lick of Lingo. Director has always required tiresome scripting to add even a simple navigation button, but Director 7 is a brand-new, friendlier beast that even beginners can use without needing to take a three-day training seminar.

Macromedia has greatly enhanced and expanded Director 7's library of behaviors–canned Lingo scripts that you attach to media elements–to make quick work of many authoring chores: navigation, QuickTime-movie playback, and accessing media over the Internet (see Reviews, "April 1999").

To demonstrate how much easier multimedia authoring is in Director 7, let me guide you through the process of creating an interactive project using the drag-and-drop ease of Director's helpful new features. Along the way, I'll pass along some extra tips for using Director 7. I've additionally created an example project you can download. It incorporates an opening screen, a main menu, screens containing text and QuickTime movies, and another screen that dynamically loads a Web page.

The first phase in a Director project often involves importing media–movies, graphics, sounds, and so on–you've created in other programs. As with previous Director versions, you use the File menu's Import command to bring elements into the Cast window, Director's database for holding your project's elements.

You can also import media from the Internet by clicking on the Import dialog box's Internet button and entering a URL. If you choose Link To External File from the Import Type pop-up menu, Director 7 creates a link to the Internet-based media rather than importing the actual file. Then each time the project runs, Director automatically updates the media–perfect for CD-ROMs that retrieve updates over the Web.

TIP You can also import media by dragging and dropping media files from the Finder to the Cast window.

Director's Score window provides a timelinelike view into a project's overall design, with numbered frames that hold media elements, scripts, behaviors, transitions, and more. Normally, Director wants to play a project straight from first frame to last. That's fine if you're simply creating an animation, but it's not suitable for an interactive project where the playback sequence depends on a user's navigation choices.

In previous Director versions, controlling playback usually meant writing Lingo scripts. For example, it was common to write a script that would essentially tell Director, "Play the current frame over and over again until the user clicks on a button; then jump to frame X." Director 7's enhanced behavior library eliminates this manual labor.

Director's Jump To Marker Button navigation behavior relies on markers, those handy bookmarklike placeholders you can create in the Score window. Since you'll typically use this behavior throughout projects, it's essential to create markers for each scene in a project (see "Make Your Mark").

TIP Markers are also convenient navigation aids. Using the Markers window or the Score window's Markers menu, you can quickly jump to a section of the Score without having to scroll your way there.

With a feature that debuted in Director 6, you can also use markers to synchronize a project's playback to an audio track. For details, see "Cue Me Up," in ""Director 6 Secrets"," June 1997.

With your markers made and your media imported, you're ready to create your screens. Use Director's built-in tools to create text headings, bitmapped graphics (see "Embed a Font"), and vector shapes as needed. Drag media elements such as QuickTime movies (see "Easy QuickTime-Movie Playback") from the Cast window onto the Stage or into the Score. When you do, Director creates a sprite–a capsule of information–that controls the Cast member's appearance, location, duration, and other properties.

Finally, use the Score window to fine-tune the duration of the sprites. In my example project, most sprites have a duration of just one or two frames–I used behaviors that cause playback to loop on a single frame until the user clicks on a navigation button.

TIP If you know in advance that most sprites will have a specific duration, set Director's preferences accordingly and save yourself some sprite-resizing time. To do so, simply choose Sprite from the File menu's Preferences submenu, and in the Sprite Preferences dialog box, type a number in the Frames text box next to Span Duration.

With your cast of characters in place, you're ready to attach behaviors to them using the new Library palette. Attaching a behavior to an element generally involves just dragging the desired behavior from the palette and dropping it onto the element (see "Make Buttons Behave" and "Display Updating Web Text").

Some behaviors require additional parameters–the name of the marker to which you want to jump, for instance, or the address of the Web page you want to display. When you attach one of these behaviors, a dialog box for supplying the required parameters appears.

TIP You can (and often must) attach multiple behaviors to a sprite. If you're creating a button that jumps to a marker, for instance, you might first attach the Push Button behavior to control a sprite's appearance, swapping in different Cast members for rollovers and mouse-down events. Then you might attach the Jump To Marker Button to specify what you want that button to do.

After you've fleshed out your project's interactivity, you can save it as a stand-alone application (called a projector, most commonly used for CD-ROM distribution) or as a Shockwave movie (which can play in a Web browser armed with the Shockwave plug-in).

For Shockwave development, Director 7 includes numerous new behaviors that simplify the tricky process of creating streaming projects (projects that play back as they download). By using these behaviors, you can ensure, for example, that all media required for a particular section load before it plays.

The behaviors you're likely to use most often are the looping and jumping behaviors, which enable you to pause and otherwise control playback while items download. And also experiment with the progress bar and placeholder behaviors– they enable you to provide essential visual feedback to users.

TIP If you're creating Shockwave-destined projects, take advantage of the File menu's new Preview In Browser command. It enables you to assess how your project will behave in a browser.

And speaking of Shockwave, no Web-destined project is complete without a visit to the bundled Aftershock utility. Aftershock not only creates the tags necessary to add a Shockwave movie to a Web page but it also gets rid of some of those annoying "missing plug-in" errors. For example, you can specify that users who don't have Shockwave see a JPEG placeholder image instead.

The process I've outlined here doesn't create a project with the complexities of Myst, but it does incorporate the most commonly used media types and navigation techniques. And as promised, it didn't require a lick of Lingo. Well, actually, I'm lying. The truth is, behaviors are Lingo scripts–indeed, they're often extremely complex Lingo scripts. You just don't have to type them in yourself.

After you've mastered Director 7's behaviors, you should consider exploring the scripts behind them (use the Behavior Inspector to view scripts). They're littered with comments that describe their workings, and studying these remarks can help you when you're ready to move up to the next step: learning Lingo.


May 1999 page: 101

To ensure that your project's text displays in the desired font, embed that font in your project. Choose Font from the Insert menu's Media Element submenu, and complete the Font Cast Member Properties dialog box.

First, choose the font and style to embed. If your project contains text in small point sizes, you can often improve its legibility by embedding bitmapped versions of the font in those sizes. Enter all the point sizes here. If small file size is paramount (for Shockwave-destined projects, it usually is), you can embed specific characters only (instead of the entire font) by typing them here.

Markers are bookmarklike placEholders that you create to serve as targets for scripts and behaviors, to help you navigate through a project in progress, and more. To create a marker, click in the Markers channel in the Score window and type the marker's name. To move a marker, drag its upside-down triangle. To jump to a specific marker, choose its name from the Marker pull-down menu, and to jump to the next or previous marker, click on the arrow buttons. The Hold On Current Frame behavior noted under each marker causes the playback to stay in the current frame.

Director 7's library palette IS THE gateway to creating buttons that change when a user mouses over and clicks on them. The Push Button behavior in the Controls category makes it easy to create these multiple-state buttons (you can access categories via the Library List pop-up menu [A]).

First, create a separate Cast member for each of the button states you want to implement: normal, mouse-over, mouse-down, and so on. Position the normal-state version of the graphic on the Stage. Then drag the Push Button behavior to the graphic. In the Parameters dialog box, specify the Cast members to use for each state.

Note that the Push Button behavior affects only the appearance of the button–it doesn't actually program a jump to another section of your project. To do that, use one of the Navigation category's behaviors. Or use the Jump To Marker Button behavior in the Controls category: drag the Jump To Marker Button behavior to the button, and choose a marker from the pop-up menu in the Parameters dialog box.

Director 7 provides a variety of ways to play QuickTime movies in a project, and most require working with multiple behaviors or Lingo scripts. But there's an easy way to implement basic movie playback.

First, select the movie in either the Cast window or the Stage window. Choose Properties from the Modify menu's Cast Member submenu. In the Properties dialog box, click on Options and complete the QuickTime Xtra Properties dialog box. To have the movie open but not play immediately, check Paused. Then check Show Controller to display the standard QuickTime-movie controller, which enables users to play, pause, and scroll through the movie and adjust its volume.

In order to link to a movie located on the Web, click on the Internet button and type the movie's URL in the subsequent dialog box.

The get net text behavior (in the Library palette's Text category, via the Library List pop-up menu [A] ) is your key to creating interactive projects–such as CD-ROMs–that retrieve up-to-the-minute text updates from the Web.

To do this, create a text Cast member containing placeholder text and position it on the Stage. Specify the text box's size in the Sprite Properties dialog box, which you access by choosing Properties from the Modify menu's Sprite submenu.

Next, drag the Get Net Text behavior (B) onto the text box and complete the Parameters dialog box. Specify the URL (C) of the file you want to display. If the file contains HTML formatting tags, check Treat Text As HTML. In my example here, I used HTML (D) for basic formatting, such as the bold headings and line breaks. To have the text box update as soon as it appears, choose frame from the Activation pop-up menu (E). The HTML page then appears, formatting intact, within your project.

1 2 Page 1
Page 1 of 2
Shop Tech Products at Amazon