Modify The Script For The Rewind Button; Add Sounds To Buttons - MACROMEDIA DIRECTOR MX 2004-GETTING STARTED WITH DIRECTOR Getting Started

Hide thumbs Also See for DIRECTOR MX 2004-GETTING STARTED WITH DIRECTOR:
Table of Contents

Advertisement

Modify the script for the Rewind button

You can modify the RewindScript cast member so that the sound stops when the user clicks the
Rewind button.
In the Cast window, select the RewindScript cast member.
1
Click the Cast Member Script button in the upper right corner of the Cast window.
2
In the Script window, place the insertion point at the end of the third line of the handler that
3
reads as follows:
sprite(1).movieRate = 0
Press Enter (Windows) or Return (Macintosh). On the new line, type the following:
4
sound(1).stop()
This Lingo tells Director to stop the sound in sound channel 1.
Close the Script window, and save your movie.
5
Now when you click the Rewind button in the sound and video scene of the movie, the video
rewinds and the sound stops playing. When you click the Play button in the movie, the video
restarts and the sound plays again.

Add sounds to buttons

The final effect to add is to make a short sound play when users click any of the video control
buttons in the sound and video scene. This sound file is small; there is no compelling reason not
to import the file directly into your Director file. Then you will add a
the scripts that are attached to the video control buttons. This command plays the new sound cast
member in the second sound channel.
Select File > Import.
1
In the Import Files dialog box, navigate within your Director MX folder to Tutorials/Basics/
2
BasicsMedia/Sounds.
Select the file named button.wav, and click the Add button.
3
In the Media pop-up menu, select Standard Import.
4
Click the Import button.
5
The new sound cast member appears in the Cast window in the next available cast slot.
In the Cast window, select the RewindScript cast member.
6
Click the Cast Member Script button in the upper right corner of the Script window.
7
In the Script window, create a new line after the first line of the handler.
8
On the new line, type the following Lingo:
9
sound(2).play(member("button"))
The
specifies the second sound channel.
(2)
Close the Script window, and save your movie.
10
Repeat steps 6 through 10 for the PlayScript and PauseScript cast members.
11
You have now completed authoring your Director movie. You can play the movie and move from
scene to scene with the navigation buttons that you created. You can control the playback of the
digital video with the bitmap graphic buttons that you added. Next, you will publish the movie to
play on the web.
76
Chapter 4: Building Your First Basic Movie
function to each of
play

Advertisement

Table of Contents
loading
Need help?

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

This manual is also suitable for:

Director mx 2004

Table of Contents