Director MX Basics Tutorial
97
Add a script that pauses the QuickTime sprite
When the video is paused, the
movieRate
is 0. You can play a video at faster than normal speed
by using numbers greater than 1 and at slow speed by using numbers less than 1.
1
In the Score, right-click (Windows) or Control-click (Macintosh) the Pause button sprite in
channel 3, frames 55 through 64, and select Script from the context menu.
2
On the second line of the handler in the Script window, type the following Lingo:
sprite(1).movieRate = 0
This Lingo pauses the QuickTime sprite.
3
In the name text box at the top of the script window, type
PauseScript
, close the Script
window, and save your movie.
Now all your video control buttons work. Rewind and play your movie to test the buttons.
The sound and video scene plays the sound file you placed in the Score, but only the first time
you go to the scene. You can add Lingo to make the music play each time you play the video. You
can also add Lingo to make a short sound effect play when the video control buttons are clicked.
Control sound with Lingo
To control sound with Lingo, you use commands that are specifically intended for use with
sounds. The first step is to add Lingo to play the drumloop sound when the video plays a second
time. For this task, add the play command to the PlayScript Lingo you’ve already written.
1
In the Cast window, select the PlayScript and click the Cast Member Script button at the
upper right of the window. The Script window opens with the PlayScript visible.
2
Place the insertion point at the end of the second line of the handler that reads:
sprite(1).movieRate = 1
3
Press Enter (Windows) or Return (Macintosh), and type the following on the new line:
sound(1).play(member("drumLoop"))
This Lingo tells Director to play the sound cast member named drumloop in sound channel 1.
In the Score, there are two sound channels. When you use Lingo, you can use as many as eight
sound channels.
4
Close the Script window, and save your movie.
5
Rewind and play your movie. The drumloop sound now plays each time you press the Play
button in the sound and video scene.
Содержание DIRECTOR MX-USING DIRECTOR MX
Страница 1: ...Using Director MX Macromedia Director MX...
Страница 12: ...Contents 12...
Страница 156: ...Chapter 4 156...
Страница 202: ...Chapter 6 202...
Страница 244: ...Chapter 7 244...
Страница 292: ...Chapter 10 292...
Страница 330: ...Chapter 12 330...
Страница 356: ...Chapter 13 356...
Страница 372: ...Chapter 14 372...
Страница 442: ...Chapter 16 442...
Страница 472: ...Chapter 18 472...
Страница 520: ...Chapter 19 520...
Страница 536: ...Chapter 20 536...
Страница 562: ...Chapter 23 562...
Страница 566: ...Chapter 24 566...
Страница 602: ...Chapter 27 602...