User Guide

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 = "";