Add Sounds To Buttons - MACROMEDIA DIRECTOR MX-USING DIRECTOR MX Use Manual

Table of Contents

Advertisement

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.
In the Cast window, select the PauseScript cast member, and click the Cast Member Script
1
button at the upper right of the window. The Script window opens with the PauseScript
displayed.
Place the insertion point at the end of the second line of the handler that reads:
2
sprite(1).movieRate = 0
Press Enter (Windows) or Return (Macintosh). On the new line, type the following:
3
sound(1).pause()
This Lingo tells Director to pause the sound in sound channel 1.
Close the Script window and save your movie.
4
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.
In the Cast window, select the RewindScript cast member and click the Cast Member Script
1
button at the upper right of the window.
In the Script window, place the insertion point at the end of the third line of the handler that
2
reads as follows:
sprite(1).movieRate = 0
Press Enter (Windows) or Return (Macintosh). On the new line, type the following:
3
sound(1).stop()
This Lingo tells Director to stop the sound in sound channel 1.
Close the Script window, and save your movie.
4
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.
98
Chapter 2

Advertisement

Table of Contents
loading

This manual is also suitable for:

Director mx

Table of Contents