356
The
loopBounds
property has no effect if the movie’s
loop
property is set to
FALSE
. If the
loop
property is set to
TRUE
while the movie is playing, the movie continues to play. Director uses these
rules to decide how to loop the movie:
•
If the ending time specified by
loopBounds
is reached, the movie loops back to the starting time.
•
If the end of the movie is reached, the movie loops back to the start of the movie.
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.
Notice that the times are set by specifying seconds, which are then converted to ticks by
multiplying by 60.
on beginSprite me
sprite(me.spriteNum).loopBounds = [(16 * 60),(32 * 60)]
end
loopCount
Syntax
sound(
channelNum
).loopCount
the loopCount of sound
channelNum
Description
Cast member property; the total number of times the current sound in sound channel
channelNum
is set to loop. The default 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()
command. 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
, the
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.
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:8000, #loopCount:3])
sound(2).play()
end
Содержание DIRECTOR MX-LINGO DICTIONARY
Страница 1: ...Lingo Dictionary Macromedia Director MX...
Страница 756: ...Index 756...