Chapter 2
98
Modify the script for the Pause button
Now you need to modify the PauseScript Lingo so that the sound pauses when the user clicks the
Pause button to pause the video.
1
In the Cast window, select the PauseScript cast member, and click the Cast Member Script
button at the upper right of the window. The Script window opens with the PauseScript
displayed.
2
Place the insertion point at the end of the second line of the handler that reads:
sprite(1).movieRate = 0
3
Press Enter (Windows) or Return (Macintosh). On the new line, type the following:
sound(1).pause()
This Lingo tells Director to pause the sound in sound channel 1.
4
Close the Script window and save your movie.
Now when you click the Pause button in the sound and video scene, the sound and video pause
at the same time. When you click the Play button again, the video will resume and the sound
plays again.
Modify the script for the Rewind button
You can modify the RewindScript Lingo so that the sound stops when the user clicks the Rewind
button.
1
In the Cast window, select the RewindScript cast member and click the Cast Member Script
button at the upper right of the window.
2
In the Script window, place the insertion point at the end of the third line of the handler that
reads as follows:
sprite(1).movieRate = 0
3
Press Enter (Windows) or Return (Macintosh). On the new line, type the following:
sound(1).stop()
This Lingo tells Director to stop the sound in sound channel 1.
4
Close the Script window, and save your movie.
Now when you click the Rewind button in the sound and video scene, the video rewinds and
the the sound stops playing. When you click the Play button, the video restarts and the sound
plays again.
Add sounds to buttons
The final effect you’ll add to your movie is to make a short sound play when users click any of the
video control buttons 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...