New in Director MX 2004 is the ability to play DVD-based content. Don't get confused about this feature, however. You can play DVD video only; Director can't be used to author a DVD that will play on a standard home DVD player. That said, however, a whole new range of potential applications has emerged. From distance learning applications, presentations and, entertainment to Web-based DVD players, you can do a lot with this new feature.
One of the most exciting areas in this new realm is the ability to play and control a DVD from a Web page. This marriage of DVD and the Internet has been dubbed WebDVD. If you want to see how it's currently being used, a Google search will yield you many places to look.
Imagine that a company has a training video that is sent out to employees on a standard DVD to be watched on their home DVD player. Now imagine the company has also hired you to create a Web-based player for their DVD. Using Director you could create an application that allowed the user to jump to different sections of the video by clicking a thumbnail. Users could also be prompted to sign in to the application so that tracking information for each person could be sent to a database on a server using network Lingo. Users could even save their progress so that the next time they used the application the video would begin where it left off.
In the opposite fashion, events within the DVD, such as when a certain time is reached, can trigger new links to appear on the Web page or new content to appear. As another example, imagine a marketing DVD where product pricing could be pulled right from a server so as to always be upto date.
Movie studios have been integrating Web content with the DVD versions of their movies for some time now. Even so, the WebDVD market is still in its infancy. Macromedia has gone a long way with this new version in giving you the tools necessary to help it along.
One of these tools is the new DVD Event Manager MIAW (Movie In A Window) that can make authoring DVD-based content quick and simple.
The DVD Event Manager
The event manager is a MIAW tool created by Macromedia and shipped on the Director install CD in the Goodies folder, but it is not installed along with Director. To get a better understanding of how to use the event manager, you will first need to install it.
If you don't have your original Director CD available, both Mac and Windows versions of the Goodies folder have been included on the CD for this book. They are located in the Lesson04 folder and named goodies.zip for Windows, or goodies.sit for the Mac.
I should warn you that the event manager tool requires a fair amount of additional resources above and beyond Director's minimum system requirements. If you experienceproblems when using the tool, it's likely your machine simply isn't powerful enough. However, once you've used the event manager to define your events, it can be closedit doesn't need to be present for play back so end users will not need the additional horsepower your development machine may need.
Using whatever tool you use to manage compressed files (.zip and .sit), unpack the archive. Within it you will find a bunch of folders containing various plug-ins and behaviors to use. For this exercise, however, you're just interested in the folder named DVD Event Manager. Inside the folder is the DVD Event Manager.dcr file, along with a couple of help and tutorial files.
Close Director, then extract the DVD Event Manager.dcr file from the Goodies folder to Director's Xtras folder, Director MX 2004\Configuration\Xtras folder in Windows and HD:Applications:Macromedia Director MX 2004:Configuration:Xtras on the Mac.
With the file in the correct location you can restart Director and use the new tool.
Start Director and choose to make a new movie from the Start page. Use the Property inspector to set the Stage to 800 x 600 with a white background.
Before opening the event manager tool, you will need to place a DVD in your computer's DVD-ROM drive. If you launch the event manager without a DVD in the drive, you'll get an error and the tool will close itself down.
You can use any DVD you have available, as this exercise is for testing only.
With a DVD in your drive choose Xtras > DVD Event Manager from the top menu to open the tool.
The event manager opens and presents you with the opportunity to create a new DVD cast member, or use a pre-existing one.
Click the New DVD Cast Member button, and in the resulting dialog name your new member DVDtest and press OK. The event manager changes to show the following screen: The AutoStart option is turned on, so the video will appear and begin to play. Other options within the window allow you to set the video to play full screen, use the localConnect option, use event triggers, or play the video at a custom size.
To change what happens when the video is finished, select one of the three buttons under the When Done Playing heading. This setting controls what Director does, not the video. Stop will cause Director to stop, closing the application if playing in a projector. Loop does exactly what you think it does. Continue has Director play the remainder of the movie once the DVD sprite has finished. You can leave this set at the default of Continue for now.
The Play Segment Only option will play the video between the start and end times given in the interface. By using this option you can chain pieces of a DVD together to have it play in the order you want.
For this exercise you're going to use event triggers to change the text displayed on screen when certain events are reached. And yes, event triggers are almost exactly the same as cue points. Actually, they are like the pseudo cue points you created for the QuickTime movie because they work off the current time of the movie, and are stored externally in a script attached to the video sprite by the event manager.
Make sure AutoStart is on, and Use Event Triggers is checked, then click the Event Triggers tab so you can add a trigger to the video.
Event triggers let you react to specific times in the video. For this exercise you want to use the Send Sprite event, which will call a handler in any named sprite on Stage. You can also call different handlers within the same sprite. You can take advantage of this by creating a text sprite and then creating handlers within the sprite's behavior that change the text being displayed.
Use the controls under the video to get the movie to about 30 seconds in, then press the Pause button.
Thirty seconds in is a good spot to add an event for testing purposes as you'll be able to quickly see how the event works.
Press the New Event Trigger button. In the Event Trigger dialog select Send Sprite as the trigger type. Press the Current Time button to pull the current time of the video into the fields. Enter testOne for the Event Name, enter myText for the Sprite name, and finally enter textOne as the handler to call in the named sprite. Press OK.
When you press OK the dialog closes and the new trigger appears in the trigger list at the bottom of the window. To get a better feel for the test, add one more trigger to the video at one minute in.
Play the video to the one-minute mark, pause it, then press the New Event Trigger buttonto add a second sendSprite event to the video. Name the event testTwo, use myText again for the sprite name, and call the handler named textTwo. Press OK to close the dialog.
The trigger appears in the list, which should now look like this:
Click the Final Step tab at the top of the dialog box and read over the instructions that appear.
Essentially, what the instructions say is to drag the DVD member and the Control panel member from the cast onto the Stage, and then click the Add Scripts button.
Move the DVD Event Manager window out of the way, but don't close it. Then drag the DVD video member and the control panel from the internal cast out onto the Stage. With the sprites placed on the Stage, move the event manager back into view and click the Add Scripts button.
After pressing the Add Scripts button you'll see some text appear telling you the DVD sprite and the Controller sprite were updated.
Close the DVD event manager, and position the video and controller somewhat like the following image, so there is room for some text above. All that's needed now is to create the text sprite and the behavior containing the handlers that will be called by the video.
Click the Text tool in the Tool palette and drag out a text box, on the Stage, above thevideo. Enter a single space into the text field, then press Ctrl/Command+A to select the space.Choose Window > Text inspector from the top menu and set the text to Arial, 18pt, bold.
You added a single space to the text field so that there would be something in the field to preserve the formatting you added with the Text inspector, and also because the field should be blank until told to display text by the video.
Select the text sprite in the Score and then, using the Property inspector's Sprite panel, name the sprite myText. Next, right-click the sprite, on the Stage or in the Score, and select Script from the context menu. Delete the default mouseUp handler and then add the following Lingo:
on textOne me sprite(me.spriteNum).member.text = "Hello World!" end on textTwo me sprite(me.spriteNum).member.text = "The time is 1 minute." end
The two handlers should be the only Lingo in the behavior. What this Lingo does is change the text property of the sprite's member. You'll learn more about the sprite(me.spriteNum) reference in the next lesson.
Close the script window and then play the movie.
At 30 seconds into the video, "Hello World!" is displayed. At one minute, the text changes to "The time is 1 minute."
Aside from changing the text of the member you could change anything on the Stage you wanted to. Using the DVD Event Manager lets you quickly and easily build applications that respond to key points in the video.
Using the Open URL trigger, you could have the application open a Web page, or if playing online in a framed page, change the content in another frame. Possible applications using DVD and mixing it with real-time data from the Internet are limited only by your imagination.