MACROMEDIA DIRECTOR MX 2004-DIRECTOR SCRIPTING Reference page 485

Director scripting reference
Table of Contents

Advertisement

Once a sound has been queued, it can be played immediately with the
because Director preloads a certain amount of each sound that is queued, preventing any delay
between the
play()
preloaded is 1500 milliseconds. This parameter can be modified by passing a property list
containing one or more parameters with the
passed with the
setPlayList()
To see an example of
Learning/Lingo folder inside the Director application folder.
Parameters
Required if specifying a sound cast member. A reference to the sound cast
memberObjRef
member to queue.
Required if passing a property list as parameters. A property list that applies to the
propList
sound cast member to queue. These properties include:
Property
Description
The sound cast member to queue. This property must be provided; all others
#member
are optional.
The time within the sound at which playback begins, in milliseconds. The default is
#startTime
the beginning of the sound. See
The time within the sound at which playback ends, in milliseconds. The default is
#endTime
the end of the sound. See
#loopCount
The number of times to play a loop defined with
The default is 1. See
The time within the sound to begin a loop, in milliseconds. See
#loopStartTime
The time within the sound to end a loop, in milliseconds. See
#loopEndTime
#preloadTime
The amount of the sound to buffer before playback, in milliseconds. See
preloadTime
Example
The following handler queues and plays two sounds. The first sound, cast member Chimes,
is played in its entirety. The second sound, cast member introMusic, is played starting at its
3-second point, with a loop repeated 5 times from the 8-second point to the 8.9 second point,
and stopping at the 10-second point.
-- Lingo syntax
on playMusic
sound(2).queue(member("Chimes"))
sound(2).queue([#member:member("introMusic"), #startTime:3000, \
#endTime:10000, #loopCount:5, #loopStartTime:8000, #loopEndTime:8900])
sound(2).play()
end playMusic
// JavaScript syntax
function playMusic() {
sound(2).queue(member("Chimes"))
sound(2).queue(propList("member",member("introMusic"), "startTime",3000,
"endTime",10000, "loopCount",5, "loopStartTime",8000, "loopEndTime",8900));
sound(2).play();
}
method and the start of playback. The default amount of sound that is
method.
used in a completed movie, see the Sound Control movie in the
queue()
endTime
loopCount
.
method. These parameters can also be
queue()
.
startTime
.
#loopStartTime
.
method. This is
play()
and
#loopEndTime
.
loopStartTime
.
loopEndTime
queue()
.
485

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the DIRECTOR MX 2004-DIRECTOR SCRIPTING and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Director mx 2004

Table of Contents