-- Lingo syntax BACKSPACE // JavaScript syntax 51 // value of _key.keyCode
Constant; represents the Backspace key. This key is labeled Backspace (Windows) and Delete (Mac).
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();
}
}