Posted By

mprabhuram on 07/14/09


Tagged

actionscript event Flex keypress


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

muoto
mprabhuram
tspitzr


KeyPress/keyboard events handling in Flex AS3


 / Published in: ActionScript 3
 

Use this code to handle keypress/keyboard events

  1. public function init():void
  2. {
  3. txtBox.addEventListener(KeyboardEvent.KEY_UP,pressEscape);
  4. }
  5.  
  6. public function pressEscape(event:KeyboardEvent):void
  7. {
  8. if (event.keyCode==13)
  9. {
  10. Alert.show("Enter Key has been pressed");
  11. }
  12. }

Report this snippet  

You need to login to post a comment.