| Lesson 12: Video Lingo |
|
|
Goal In this exercise you will learn how to use Lingo to control and play QuickTime video and sound files in your Director Movies. Background: Unquestionably, video is an essential part of many multimedia presentations. Director supports a variety of video formats, but the most versatile and useful overall is QuickTime. QuickTime is more that a video format; it is a system-wide media utility and API that allows dozens of audio, image, and video file formats to be displayed, edited, and converted for a multitude of purposes. Director is very QuickTime savvy and takes advantage of the most important QuickTime features so you can easily add video, QT audio, or QTVRs to your Director movies. Controlling Video with Lingo The easiest way to play a QuickTime movie in Director is to simply import a QuickTime file and drop it onto the stage. This will make it possible to play your movie, but you will have more playback options if you alter some of the properties of the QuickTime movie. You have the option, for example, to choose to show the standard QuickTime controller at the bottom of the movie, or you may simply have the movie play on its own without a controller. There are 7 properties you may click-alter through the Property Inspector "QuickTime" tab. Each one is described below.
DTS - This is the (Direct To Stage) property, and when checked, provides a way to bypass Director's pixel processing for the selected video sprite, which may speed up the rendering of the video to the stage. When DTS is active it essentially "cuts" through the stage image and draws without regard for sprites or ink effects. This may cause flicker if you draw sprites on top of video. Generally, you will need to check DTS only if your movie does not play smoothly. Even DTS may not be enough for a high-bandwidth movie, and the source file may need to be re-coded to work more efficiently within the bandwidth constraints of the medium. Loop - Plays the movie over and over from beginning to end. Controls - Displays the standard QuickTime Player movie controls. Streaming - This allows a movie to be buffered into memory from a remote location so it may be played before all of it is loaded into memory. Lingo to Play video There are two Lingo properties you will need to control the playback of QuickTime in Director: movieRate and currentTime. .movieRate is a property that specifies how the movie plays back.
You may substitute other numbers for movieRate to get a variety of playback effects. You may also choose to import a sound-only QuickTime movie and play a song or soundtrack backward, or at a fast-forward speed, for a humorous effect. QuickTime movies that are sound-only have playback options that are unavailable using other sound playback Lingo. .currentTime is a movie property that can be "set or get," meaning you can use it to tell a movie to play at a certain time within the timeline of a movie, or to monitor the elapsed or current playback time for a movie.
Using currentTime with the duration property makes it easy to compare the current play time of a movie with the overall duration (or length) of the movie. This is useful for showing the percentage of a movie that has played, or for keeping the Director playhead on a frame until a digital video is finished playing (see example below). Digital Video Lingo Examples The following handler will play a QuickTime movie if the behavior is attached to a button. The movieRate property is used to play the movie forward at normal speed. -- plays a QuickTime movie in channel 1 The following behavior stops a QuickTime movie. -- stops a QuickTime movie To rewind a QuickTime movie you set the movieTime property to zero. movieTime is measures in ticks, which are 60ths of a second. (Apparently, as of Director MX 2004, movieTime is deprecated and has been replaced with currentTime. The currentTime property is in milliseconds and it seems to be the best way to ensure future functionality.) -- rewinds a QuickTime movie This behavior gets the length of a movie in ticks (60ths of a second) and displays it in the Message Window: -- returns the length of a movie in ticks This behavior, when attached to a QuickTime video sprite , makes the playhead stay on a frame until the QuickTime movie is finished playing. -- hold on current frame until QT movie is finished playing To change the volume of a QuickTime movie use the volume property. The range for volume is 0-255, where 0 is mute, and 255 is maximum. -- change the volume of a movie Example Movies to Download: Alpha Mask Example (4.4 MB) Animated Movie Example (745 KB) Play QuickTime MIDI Example (20 KB) Play Wired QuickTime Content Example (420 KB) QuickTime Video Logger (1.9 MB) Exercise: Using the example movies as a reference, create a Director movie that includes at least two QuickTime movies controlled by Lingo. Experiment with different Lingo commands and properties until you feel comfortable performing some basic manipulations on Director movies with linked QuickTime content.
Set as favorite
Bookmark
Email this
Hits: 2135 Trackback(0)
Comments (0)
![]() Write comment
|



