EasyManua.ls Logo

MACROMEDIA DIRECTOR MX 2004-DIRECTOR SCRIPTING - Page 844

MACROMEDIA DIRECTOR MX 2004-DIRECTOR SCRIPTING
1130 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
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