844
Chapter 14: Properties
// JavaScript syntax
function playMusic() {
sound(2).queue(propList("member",member("introMusic"), "startTime",3000,
"loopCount",5, "loopStartTime",8000, "loopEndTime",8900));
sound(2).queue(propList("member",member("creditsMusic"), "startTime",3000,
"endTime",3000, "loopCount",3]);
sound(2).play();
}
See also
loopEndTime
,
loopStartTime
,
queue()
,
setPlayList()
,
Sound Channel
loopEndTime
Usage
-- Lingo syntax
soundChannelObjRef
.loopEndTime
// JavaScript syntax
soundChannelObjRef
.loopEndTime;
Description
Sound Channel property; specifies the end time, in milliseconds, of the loop set in the current
sound playing in a sound channel. Read-only.
The value of this property is a floating-point number, allowing you to measure and control sound
playback to fractions of a millisecond.
This property can only be set when passed as a property in a
queue()
or
setPlaylist()
command.
Example
This handler plays sound cast member introMusic in sound channel 2. Playback loops five times
between the 8 seconds point and the 8.9 second point in the sound.
-- Lingo syntax
on playMusic
sound(2).play([#member:member("introMusic"), #startTime:3000, #loopCount:5 \
#loopStartTime:8000, #loopEndTime:8900])
end playMusic
// JavaScript syntax
function playMusic() {
sound(2).play(propList("member",member("introMusic"), "startTime",3000,
"loopCount",5, "loopStartTime",8000, "loopEndTime",8900));
}
See also
queue()
,
setPlayList()
,
Sound Channel
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...