Event Flex


    xmlns:s="library://ns.adobe.com/flex/spark" creationComplete="initApp();">
    
        
    

    
         
        import mx.core.FlexGlobals; 
        private function initApp():void { 
            FlexGlobals.topLevelApplication.addEventListener(KeyboardEvent.KEY_UP, keyHandler); 
        } 
        private function keyHandler(event:KeyboardEvent):void { 
            t1.text = event.keyCode + "/" + event.charCode; 
        }