EasyManua.ls Logo

MACROMEDIA DIRECTOR MX 2004-DIRECTOR SCRIPTING - Page 156

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...
156 Chapter 9: Constants
RETURN (constant)
Usage
-- Lingo syntax
RETURN
// JavaScript syntax
36 // value of _key.keyCode
\n // when used in a string
Description
Constant; represents a carriage return.
Example
This statement causes a paused movie to continue when the user presses the carriage return:
-- Lingo syntax
if (_key.key = RETURN) then _movie.go(_movie.frame + 1)
// JavaScript syntax
if (_key.keyCode == 36) {
_movie.go(_movie.frame + 1);
}
This statement uses the RETURN character constant to insert a carriage return between two lines in
an alert message:
-- Lingo syntax
_player.alert("Last line in the file." & RETURN & "Click OK to exit.")
// JavaScript syntax
_player.alert("Last line in the file.\nClick 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)
SPACE
Usage
-- Lingo syntax
SPACE
// JavaScript syntax
49 // value of _key.keyCode
Description
Constant; read-only, value that represents the space character.
Example
This statement displays ā€œAge Of Aquariusā€ in the Message window:
-- Lingo syntax
put("Age"&SPACE&"Of"&SPACE&"Aquarius")

Related product manuals