User Guide

594
You can specify these parameters for each sound to be queued:
To see an example of
setPlaylist() used in a completed movie, see the Sound Control movie in
the Learning/Lingo Examples folder inside the Director application folder.
Example
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.
on playMusic
sound(2).queue([#member: member("introMusic"), #startTime: 3000,\
#endTime: 10000, #loopCount: 5, #loopStartTime: 8000, #loopEndTime: 8900])
sound(2).play()
end
See also
endTime, getPlaylist(), startTime, loopCount, loopEndTime, loopStartTime, member
(sound property)
, play() (sound), preLoadTime, queue()
setPref
Syntax
setPref prefName, prefValue
Description
Command; writes the string specified by prefValue in the file specified by prefName on the
computers local disk. The file is a standard text file.
The
prefName argument must be a valid filename. To make sure the filename is valid on all
platforms, use no more than eight alphanumeric characters for the file name.
After the
setPref command runs, if the movie is playing in a browser, a folder named Prefs is
created in the Plug-In Support folder. The
setPref command can write only to that folder.
If the movie is playing in a projector or Director, a folder is created in the same folder as the
application. The folder receives the name Prefs.
Do not use this command to write to read-only media. Depending on the platform and version of
the operating system, you may encounter errors or other problems.
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.