User Guide

play() (Sound Channel) 451
Example
This statement plays cast member introMusic in sound channel 1:
-- Lingo syntax
sound(1).play(member("introMusic"))
// JavaScript syntax
sound(1).play(member("introMusic"));
The following statement plays cast member creditsMusic in sound channel 2. Playback begins 4
seconds into the sound and ends 15 seconds into the sound. The section from 10.5 seconds to 14
seconds loops 6 times.
-- Lingo syntax
sound(2).play([#member:member("creditsMusic"), #startTime:4000, \
#endTime:15000, #loopCount:6, #loopStartTime:10500, #loopEndTime:14000])
// JavaScript syntax
sound(2).play(propList("member",member("creditsMusic"), "startTime",4000,
"endTime",15000, "loopCount",6, "loopStartTime",10500,
"loopEndTime",14000));
See also
endTime, loopCount, loopEndTime, loopStartTime, pause() (Sound Channel),
preLoadTime, queue(), Sound Channel, startTime, stop() (Sound Channel)
#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.
Property Description