Hi,

i have a simple "Test Component" that display the key pressed by the
user, but it doesn't log anything

package
{
   import flash.display.*;
   import flash.events.*;
   import mx.core.*;

   public class Stage extends UIComponent
   {

     public function Stage()
     {
       super();

       //height = 300;
       //width = 400;

       //
       // keyboard binding
       //
       addEventListener( KeyboardEvent.KEY_DOWN, onKeyDown );

     }

     private function onKeyDown( event:KeyboardEvent ):void
     {
       trace("Key Code: "+event.keyCode);
     }

   }
}


Where i'm wrong?



Reply via email to