Key.getAscii()
Top  Previous  Next


SWiSH Player Support
SWF5 or later

Syntax
Key.getAscii()

Arguments
none

Returns
The ascii code of the last pressed key.

Note: This cannot be used to check keys that do not correspond to an ascii character.
eg. Shift or Caps lock. See Key.getCode() to monitor those keys.

Description
Method: Returns the ascii code of the last pressed key.

Sample
onEnterFrame() {
   // _root.ret.text is a dynamic text element. 
   // this displays the ascii code of the last pressed key.
   _root.ret.text = Key.getAscii();
}

See Also
Key.getAscii(), Key.getCode()