Example
The first statement of this script checks whether the monitor is set to black and white and then
exits if it is:
on setColors
if _system.colorDepth = 1 then exit
sprite(1).foreColor = 35
end
See also
abort, halt(), quit(), pass,
exit repeat
Usage
-- Lingo syntax
exit repeat
Description
Keyword; instructs Lingo to leave a repeat loop and go to the statement following the
statement but to remain within the current handler or method.
repeat
The
exit repeat
condition—such as two values being equal or a variable being a certain value—exists.
Example
The following handler searches for the position of the first vowel in a string represented by the
variable
testString
Lingo to leave the repeat loop and go to the statement
on findVowel testString
repeat with i = 1 to testString.char[testString.char.count]
if "aeiou" contains testString.char[i] then exit repeat
end repeat
return i
end
See also
repeat
while,
field
Usage
field(whichField)
Description
Keyword; refers to the field cast member specified by
•
When
whichField
•
When
whichField
Character strings and chunk expressions can be read from or placed in the field.
return (keyword)
keyword is useful for breaking out of a repeat loop when a specified
. As soon as the first vowel is found, the
repeat with
is a string, it is used as the cast member name.
is an integer, it is used as the cast member number.
exit repeat
:
return i
.
whichField
end
command instructs
field
207
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