Mega Code Archive

 
Categories / Flex / Event
 

Timer event

<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="initApp();">   <mx:Script>       import mx.controls.Alert;       import flash.external.ExternalInterface;       private function initApp():void{             var readyTimer:Timer = new Timer(100);             readyTimer.addEventListener(TimerEvent.TIMER, jsNotReady);             readyTimer.start();       }       private function jsNotReady(event:TimerEvent):void {           Timer(event.target).stop();       }        </mx:Script> </mx:Application>