In the Cast window, select the PlayScript cast member.
1
Click the Cast Member Script button near the upper right corner of the window.
2
The Script window opens with the Lingo from the PlayScript cast member visible.
Place the insertion point at the end of the second line of the handler that reads as follows:
3
sprite(1).movieRate = 1
Press Enter (Windows) or Return (Macintosh), and type the following on the new line:
4
sound(1).play(member("track1"))
This Lingo tells Director to play the sound cast member named track1 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.
Close the Script window, and save your movie.
5
Rewind and play your movie. The track1 sound now plays each time you press the Play button
6
in the sound and video scene of the movie.
Modify the script for the Pause button
Now you need to modify the PauseScript cast member so that the sound pauses when the user
clicks the Pause button on the Stage to pause the video.
In the Cast window, select the PauseScript cast member.
1
Click the Cast Member Script button in the upper right corner of the Cast window. The Script
2
window opens with the PauseScript Lingo displayed.
Place the insertion point at the end of the second line of the handler that reads as follows:
3
sprite(1).movieRate = 0
Press Enter (Windows) or Return (Macintosh). On the new line, type the following:
4
sound(1).pause()
This Lingo tells Director to pause the sound in sound channel 1.
Close the Script window and save your movie.
5
Now when you click the Pause button in the sound and video scene of the movie, the sound and
video pause at the same time. When you click the Play button in the movie again, the video
resumes and the sound plays again.
Cast Member Script button
Writing scripts to control the movie
75
Need help?
Do you have a question about the DIRECTOR MX 2004-GETTING STARTED WITH DIRECTOR and is the answer not in the manual?
Questions and answers