Director MX Basics Tutorial
95
Digital video movies use a timeline instead of a Score. The timing of the video playback is tied
closer to the soundtrack of the video. For example, if the video has a soundtrack, the timing of the
video and sound must remain synchronized during the entire playback of the video. For this
reason, digital videos will skip frames if necessary to keep up with the soundtrack. On slower
computers, several frames might be skipped during video playback. This kind of animation is
called time-based. These differences are the reason you navigate a Director movie by jumping to
different frames in the movie, and you navigate a digital video by jumping to different times
within the video.
Add scripts for video control
Now you’re ready to add scripts to the bitmap graphic buttons for controlling the digital video
playback. For these buttons, you’ll use some new Lingo terms. There is a Play button, a Pause
button, and a Rewind button. They will use the
movieRate
and
movieTime
properties of the
QuickTime sprite. By changing the values of these properties with Lingo, you change the way the
video plays on the Stage.
When the user navigates to the sound and video scene from a different scene, the digital video
plays from start to finish once. To play the video again without first leaving the scene, you need to
rewind it. You rewind the video by setting its
movieTime
property.
The
movieTime
property indicates the time, within the digital video, that currently appears on
the screen. The
movieTime
is measured in ticks, or 60ths of a second. For example, when the
movie displays the very first frame of video, the
movieTime
is 0. When 1 second of the video has
played, the
movieTime
equals 60. When 3 seconds of the video has played, the
movieTime
equals
180. By setting the movieTime to a number of you select, you can make the video jump to a
different frame.
Rewind the QuickTime sprite
You can rewind the QuickTime sprite by setting its
movieTime
to 0.
1
In the Score, right-click (Windows) or Control-click (Macintosh) the Rewind button sprite in
channel 4, frames 55 through 64.
2
Select Script from the context menu.
The Script window opens with a default
on mouseUp
handler already entered.
3
On the second line of the handler, type the following Lingo to rewind the QuickTime sprite:
sprite(1).movieTime = 0
4
Press Enter (Windows) or Return (Macintosh).
5
On the third line of the handler, type the following Lingo:
sprite(1).movieRate = 0
The
movieRate
property indicates the speed at which the QuickTime sprite is playing. When
the video is stopped, the
movieRate
is 0.
The result looks like this:
On mouseUp me
sprite(1).movieTime = 0
sprite(1).movieRate = 0
end
Summary of Contents for DIRECTOR MX-USING DIRECTOR MX
Page 1: ...Using Director MX Macromedia Director MX...
Page 12: ...Contents 12...
Page 156: ...Chapter 4 156...
Page 202: ...Chapter 6 202...
Page 244: ...Chapter 7 244...
Page 292: ...Chapter 10 292...
Page 330: ...Chapter 12 330...
Page 356: ...Chapter 13 356...
Page 372: ...Chapter 14 372...
Page 442: ...Chapter 16 442...
Page 472: ...Chapter 18 472...
Page 520: ...Chapter 19 520...
Page 536: ...Chapter 20 536...
Page 562: ...Chapter 23 562...
Page 566: ...Chapter 24 566...
Page 602: ...Chapter 27 602...