MACROMEDIA DIRECTOR MX 2004-DIRECTOR SCRIPTING Reference page 221

Director scripting reference
Table of Contents

Advertisement

repeat with
Usage
-- Lingo syntax
repeat with counter = start to finish
statement(s)
end repeat
Description
Keyword; executes the Lingo specified by
. The value of
counter
value specified by
repeat loop.
The
repeat with
or for calculating a series of numbers to some exponent.
While in a repeat loop, Lingo ignores other events. To check the current key in a repeat loop, use
the
keyPressed
Only one handler can run at a time. If Lingo stays in a repeat loop for a long time, other events
stack up waiting to be evaluated. Therefore, repeat loops are best used for short, fast operations or
when users are idle.
If you need to process something for several seconds or more, evaluate the function in a loop with
some type of counter or test to track progress.
If the stop condition is never reached or there is no exit from the repeat loop, you can force
Director to stop by using Control+Alt+period (Windows) or Command+period (Macintosh).
Example
This handler turns sprites 1 through 30 into puppets:
on puppetize
repeat with channel = 1 to 30
_movie.puppetSprite(channel, TRUE)
end repeat
end puppetize
See also
exit,
exit
repeat,
repeat with...down to
Usage
-- Lingo syntax
repeat with variable = startValue down to endValue
Description
Keyword; counts down by increments of 1 from
Only one handler can run at a time. If Lingo stays in a repeat loop for a long time, other events
stack up waiting to be evaluated. Therefore, repeat loops are best used for short, fast operations or
when you know the user won't be doing other things.
is the difference between the value specified by
counter
. The counter is incremented by 1 each time Lingo cycles through the
finish
structure is useful for repeatedly applying the same effect to a series of sprites
property.
repeat
while,
the number of times specified by
statement(s)
repeat with...down
to
startValue
start
to,
repeat with...in list
.
endValue
repeat with...down to
and the
221

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the DIRECTOR MX 2004-DIRECTOR SCRIPTING and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

This manual is also suitable for:

Director mx 2004

Table of Contents