/ Published in: ActionScript 3
Use this code to handle keypress/keyboard events
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
public function init():void { txtBox.addEventListener(KeyboardEvent.KEY_UP,pressEscape); } public function pressEscape(event:KeyboardEvent):void { if (event.keyCode==13) { Alert.show("Enter Key has been pressed"); } }