-- Lingo syntax soundChannelObjRef.setPlayList(linearListOfPropLists) // JavaScript syntax soundChannelObjRef.setPlayList(linearListOfPropLists);
Sound Channel method; sets or resets the playlist of a sound channel.
This method is useful for queueing several sounds at once.
To see an example of setPlaylist() used in a completed movie, see the Sound Control movie in the Learning/Lingo folder inside the Director application folder.
linearListOfPropLists Required. A linear list of property lists that specifies parameters of a playlist. You can specify these parameters for each sound to be queued:
|
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. |
This handler queues and plays the cast member introMusic, 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:member("introMusic"), #startTime:3000, #endTime:10000, #loopCount:5, #loopStartTime:8000, #loopEndTime:8900])
sound(2).play()
end playMusic
// JavaScript syntax
function playMusic() {
sound(2).queue(propList("member",member("introMusic"),"startTime",3000, "endTime",10000, "loopCount",5, "loopStartTime",8000,"loopEndTime",8900));
sound(2).play();
}
endTime, getPlayList(), loopCount, loopEndTime, loopStartTime, Member, member, preLoadTime, queue(), Sound Channel, startTime