User Guide
loopCount 843
If the loop property is turned off while the movie is playing, the movie continues to play.
Director stops when it reaches the end of the movie.
This property can be tested and set. The default setting is [0,0].
Example
This sprite script sets the starting and ending times for looping within a QuickTime sprite. The
times are set by specifying seconds, which are then converted to ticks by multiplying by 60.
-- Lingo syntax
on beginSprite me
sprite(me.spriteNum).loopBounds = [(16 * 60),(32 * 60)]
end
// JavaScript syntax
function beginSprite() {
sprite(me.spriteNum).loopBounds = list((16 * 60),(32 * 60));
}
loopCount
Usage
-- Lingo syntax
soundChannelObjRef.loopCount
// JavaScript syntax
soundChannelObjRef.loopCount;
Description
Sound Channel property; specifies the total number of times the current sound in a sound
channel is set to loop. Read-only.
The default value of this property is 1 for sounds that are simply queued with no internal loop.
You can loop a portion of a sound by passing the parameters
loopStartTime, loopEndTime, and
loopCount with a queue() or setPlayList() method. These are the only methods for setting
this property.
If
loopCount is set to 0, the loop will repeat forever. If the sound cast member’s loop property is
set to
TRUE, loopCount will return 0.
Example
This handler queues and plays two sounds in sound channel 2. The first sound, cast member
introMusic, loops five times between 8 seconds and 8.9 seconds. The second sound, cast member
creditsMusic, loops three times. However, no
#loopStartTime and #loopEndTime are specified,
so these values default to the #startTime and #endTime, respectively.
-- Lingo syntax
on playMusic
sound(2).queue([#member:member("introMusic"), #startTime:3000, \
#loopCount:5, #loopStartTime:8000, #loopEndTime:8900])
sound(2).queue([#member:member("creditsMusic"), #startTime:3000, \
#endTime:3000, #loopCount:3])
sound(2).play()
end playMusic