User Guide

272
getPlaylist()
Syntax
sound(channelNum).getPlaylist()
getPlaylist(sound(channelNum))
Description
This function returns a copy of the list of queued sounds for soundObject. This list does not
include the currently playing sound.
The list of queued sounds may not be edited directly. You must use
setPlayList().
The playlist is a linear list of property lists. Each property list corresponds to one queued sound
cast member. Each queued sound may specify these properties:
Example
The following handler queues two sounds in sound channel 2, starts playing them, and then
displays the playList in the message window. The playlist includes only the second sound queued,
because the first sound is already playing.
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()
put sound(2).getPlaylist()
end
-- [[#member: (member 12 of castLib 2), #startTime: 3000, #endTime: 10000,
#loopCount: 5, #loopStartTime: 8000, #loopEndTime: 8900]]
See also
endTime, loopCount, loopEndTime, loopStartTime, member (keyword), preLoadTime,
queue(), setPlaylist(), startTime
Property Description
#member The sound cast member to play. This property will always be present; all others are optional.
#startTime The time within the sound at which playback begins, in milliseconds. See startTime.
#endTime The time within the sound at which playback ends, in milliseconds. See endTime.
#loopCount The number of times to play a portion of the sound. See loopCount.
#loopStartTime The time within the sound at which a loop begins, in milliseconds. See loopStartTime.
#loopEndTime The time within the sound at which a loop ends, in milliseconds. See loopEndTime.
#preloadTime The amount of the sound to buffer before playback, in milliseconds. See preloadTime.