User Guide
Playing digital video with Lingo or JavaScript syntax 247
Playing digital video with Lingo or JavaScript syntax
Lingo or JavaScript syntax can take advantage of the most important and powerful features of
digital video. Besides playing digital video linearly, Lingo or JavaScript syntax can pause, stop, and
rewind a video. These abilities are useful for jumping to segments within a digital video and for
emulating a typical digital video control panel.
Lingo or JavaScript syntax also lets you work with an individual track in a digital video by
determining the track’s content and position and by turning these tracks on and off.
For information about using Lingo or JavaScript syntax with RealMedia movies, see “Using
RealMedia content in Director” on page 259.
Controlling digital video playback with Lingo or JavaScript syntax
The following list provides a general description of how you can control digital video with Lingo
or JavaScript syntax. Each media type may have slightly different properties and methods for
playback control, but conceptually they work as described below. For more information about
particular digital video media types, see the Scripting Reference topics in the Director Help Panel.
• To turn on looping in a digital video cast member, set the digital video’s loop cast member
property to TRUE.
• To determine the current time of a digital video sprite, check the sprite’s currentTime
property.
• To pause a digital video sprite, set the sprite’s movieRate property to 0.
• To start a paused digital video sprite, set the sprite’s movieRate property to 1.
• To play a digital video sprite in reverse, set the sprite’s movieRate property to -1.
• To rewind a digital video sprite to the beginning, set the sprite’s movieTime property to 0.
• To control a digital video sprite’s playback rate, set the sprite’s movieRate property to the
desired rate.
• To mix QuickTime audio tracks with internal Director sounds (necessary only in Windows),
use the
soundDevice system property to specify QT3Mix.
Determining digital video content with Lingo or JavaScript syntax
The following list describes how script can determine a digital video’s content. For more
information, see the Scripting Reference topics in the Director Help Panel.
• To determine the time units a digital video cast member uses, check the video’s timeScale cast
member property.
• To determine whether a digital video is QuickTime or Windows Media, check the digital
video’s
digitalVideoType cast member property.
• To determine the number of tracks in a digital video sprite or cast member, check the digital
video’s
trackCount sprite or cast member property.
• To determine which type of media a digital video track contains, check the digital video’s
trackType sprite or cast member property.
• To determine the start time of a track in a digital video sprite or cast member, check the digital
video’s
trackStartTime sprite or cast member property.