EasyManua.ls Logo

MACROMEDIA DIRECTOR MX 2004-DIRECTOR SCRIPTING - Page 216

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...
216 Chapter 11: Keywords
next repeat
Usage
-- Lingo syntax
next repeat
Description
Keyword; sends Lingo to the next step in a repeat loop in a script. This function differs from that
of the
exit repeat keyword.
Example
This repeat loop displays only odd numbers in the Message window:
repeat with i = 1 to 10
if (i mod 2) = 0 then next repeat
put(i)
end repeat
on
Usage
-- Lingo syntax
on handlerName {argument1}, {arg2}, {arg3} ...
statement(s)
end handlerName
Description
Keyword; indicates the beginning of a handler, a collection of Lingo statements that you can
execute by using the handler name. A handler can accept arguments as input values and returns a
value as a function result.
Handlers can be defined in behaviors, movie scripts, and cast member scripts. A handler in a cast
member script can be called only by other handlers in the same script. A handler in a movie script
can be called from anywhere.
You can use the same handler in more than one movie by putting the handlers script in a
shared cast.
otherwise
Usage
-- Lingo syntax
otherwise statement(s)
Description
Keyword; precedes instructions that Lingo performs when none of the earlier conditions in a
case statement are met.
This keyword can be used to alert users of out-of-bound input or invalid type, and can be very
helpful in debugging during development.

Related product manuals