152
Chapter 9: Constants
BACKSPACE
Usage
-- Lingo syntax
BACKSPACE
// JavaScript syntax
51 // value of _key.keyCode
Description
Constant; represents the Backspace key. This key is labeled Backspace in Windows and Delete on
the Macintosh.
Example
This
on keyDown
handler checks whether the Backspace key was pressed and, if it was, calls the
handler
clearEntry
:
--Lingo syntax
on keyDown
if (_key.key = BACKSPACE) then clearEntry
_movie.stopEvent()
end keyDown
// JavaScript syntax
function keyDown() {
if (_key.keyCode == 51) {
clearEntry();
_movie.stopEvent();
}
}
EMPTY
Usage
--Lingo syntax
EMPTY
// JavaScript syntax
""
Description
Character constant; represents the empty string,
""
, a string with no characters.
Example
This statement erases all characters in the field cast member Notice by setting the field to
EMPTY
:
--Lingo syntax
member("Notice").text = EMPTY
// JavaScript syntax
member("Notice").text = "";
Содержание DIRECTOR MX 2004
Страница 1: ...DIRECTOR MX 2004 Director Scripting Reference...
Страница 48: ...48 Chapter 2 Director Scripting Essentials...
Страница 100: ...100 Chapter 4 Debugging Scripts in Director...
Страница 118: ...118 Chapter 5 Director Core Objects...
Страница 594: ...594 Chapter 12 Methods...
Страница 684: ...684 Chapter 14 Properties See also DVD...
Страница 702: ...702 Chapter 14 Properties See also face vertices vertices flat...
Страница 856: ...856 Chapter 14 Properties JavaScript syntax sprite 15 member member 3 4...
Страница 889: ...netPresent 889 _player alert Sorry the Network Support Xtras could not be found See also Player...
Страница 1102: ...1102 Chapter 14 Properties...