User Guide

551
Examples
This handler returns a random roll for two dice:
on diceRoll
return random(6) + random(6)
end
In the following example, the two statements
diceRoll
roll = the result
are equivalent to this statement:
set roll = diceRoll()
Note that set roll = diceRoll would not call the handler because there are no parentheses
following
diceRoll; diceRoll here is considered a variable reference.
See also
return (keyword)
resume sprite
Syntax
sprite(whichGIFSpriteNumber ).resume()
resume(sprite whichGIFSpriteNumber)
Description
Animated GIF command; causes the sprite to resume playing from the frame after the current
frame if its been paused. This command has no effect if the animated GIF sprite has not
been paused.
See also
pause sprite, rewind sprite
RETURN (constant)
Syntax
RETURN
Description
Constant; represents a carriage return.
Examples
This statement causes a paused movie to continue when the user presses the carriage return:
if (the key = RETURN) then go to the frame + 1
This statement uses the RETURN character constant to insert a carriage return between two lines in
an alert message:
alert "Last line in the file." & RETURN & "Click OK to exit."
In Windows, it is standard practice to place an additional line-feed character at the end of
each line. This statement creates a two-character string named CRLF that provides the
additional line feed:
CRLF = RETURN & numToChar(10)