I am writing a keyboard event handler in actionscript. I would like to trace something when the letter "d" is pressed.
private static const THE_LETTER_D:int = 100;
private function onKeyUp(evt:KeyboardEvent):void
{
if (evt.keyCode == THE_LETTER_D )
{
trace('Someone pressed the letter d');
}
}
Is there a way I can do this without defining THE_LETTER_D? I tried to do int('d') but that does not work, and I am not sure what else to try.