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
Summary of Contents for DIRECTOR MX 2004-DIRECTOR SCRIPTING
Page 1: ...DIRECTOR MX 2004 Director Scripting Reference...
Page 48: ...48 Chapter 2 Director Scripting Essentials...
Page 100: ...100 Chapter 4 Debugging Scripts in Director...
Page 118: ...118 Chapter 5 Director Core Objects...
Page 594: ...594 Chapter 12 Methods...
Page 684: ...684 Chapter 14 Properties See also DVD...
Page 702: ...702 Chapter 14 Properties See also face vertices vertices flat...
Page 856: ...856 Chapter 14 Properties JavaScript syntax sprite 15 member member 3 4...
Page 1102: ...1102 Chapter 14 Properties...