520
Description
Function; adds the given sound cast member to the queue of sound channel
channelNum
.
Once a sound has been queued, it can be played immediately with the
play()
command. This is
because Director preloads a certain amount of each sound that is queued, preventing any delay
between the
play()
command and the start of playback. The default amount of sound that is
preloaded is 1500 milliseconds. This parameter can be modified by passing a property list
containing one or more parameters with the
queue()
command.
You can specify these properties may be specified with the
queue()
command:
These parameters can also be passed with the
setPlayList()
command.
To see an example of
queue()
used in a completed movie, see the Sound Control movie in the
Learning/Lingo Examples folder inside the Director application folder.
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.
on playMusic
sound(2).queue([#member: member("Chimes")])
sound(2).queue([#member: member("introMusic"), #startTime: 3000,\
#endTime: 10000, #loopCount: 5, #loopStartTime: 8000, #loopEndTime: 8900])
sound(2).play()
end
See also
startTime, endTime, loopCount, loopStartTime, loopEndTime, preLoadTime,
setPlaylist(), play() (sound)
Property
Description
#member
The sound cast member to queue. This property must be provided; all others are optional.
#startTime
The time within the sound at which playback begins, in milliseconds. The default is the
beginning of the sound. See
startTime
.
#endTime
The time within the sound at which playback ends, in milliseconds. The default is the end of
the sound. See
endTime
.
#loopCount
The number of times to play a loop defined with
#loopStartTime
and
#loopEndTime
. The
default is 1. See
loopCount
.
#loopStartTime
The time within the sound to begin a loop, in milliseconds. See
loopStartTime
.
#loopEndTime
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
.
Содержание DIRECTOR MX-LINGO DICTIONARY
Страница 1: ...Lingo Dictionary Macromedia Director MX...
Страница 756: ...Index 756...