358
loopsRemaining
Syntax
sound(
channelNum
).loopsRemaining
the loopsRemaining of sound(
channelNum
)
Description
Read-only property; the number of times left to play a loop in the current sound playing in sound
channel
channelNum
. If the sound had no loop specified when it was queued, this property is 0. If
this property is tested immediately after a sound starts playing, it returns one less than the number
of loops defined with the
#loopCount
property in the
queue()
or
setPlayList()
command.
See also
breakLoop()
,
loopCount
,
loopEndTime
,
loopStartTime
,
queue()
loopStartTime
Syntax
sound(
channelNum
).loopStartTime
the loopStartTime of sound(
channelNum
)
Description
Cast member property; the start time, in milliseconds, of the loop for the current sound being
played by
soundObject
. Its value is a floating-point number, allowing you to measure and
control sound playback to fractions of a millisecond. The default is the
startTime
of the sound if
no loop has been defined.
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 two points 8 seconds and 8.9 seconds into the sound.
on playMusic
sound(2).play([#member:member("introMusic"), #startTime:3000,\
#loopCount:5,#loopStartTime:8000, #loopEndTime:8900])
end
Example
This handler causes the text field TimWords to read "Help me, I’m stuck!" when the
currentTime
of sound channel 2 is between its
loopStartTime
and
loopEndTime
:
on idle
if sound(2).currentTime > sound(2).loopStartTime and \
sound(2).currentTime < sound(2).loopEndTime then
member("TimWords").text = "Help me, I’m stuck!"
else
member("TimWords").text = "What’s this sticky stuff?"
end if
end
See also
breakLoop()
,
setPlaylist()
,
loopCount
,
loopEndTime
,
loopsRemaining
,
queue()
Содержание DIRECTOR MX-LINGO DICTIONARY
Страница 1: ...Lingo Dictionary Macromedia Director MX...
Страница 756: ...Index 756...