4 Replies Latest reply on Apr 7, 2009 1:20 PM by Eisley79

    KeyboardEvent doesn't work

      Hello there,

      I'm trying to catch user input throught this

      addEventListener(KeyboardEvent.KEY_DOWN, KeyPressed);

      where "KeyPressed" is the following

      public function KeyPressed(event:KeyboardEvent) : void{
      Alert.show("You pressed something");

      but for strange reasons that actually I'm trying to find "KeyPressed" is never called. If I replace "KeyboardEvent.KEY_DOWN" with "MouseEvent.CLICK" and "event:KeyboardEvent" with "event:MouseEvent" the KeyPressed function works!

      But my objective is to work with a Keyboard and not with a mouse... can anyone help me?