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();
}