/*
Use if your objects position is based on stage.stageWidth and stage.stageHeight.
When refreshed it traces 0 for stageWidth and stageHeight
*/
function startApp():void {
// make it call an function on resize
stage.addEventListener(Event.RESIZE, resizeHandler);
// call that resizeHandler again (for browsers like IE 6)
resizeHandler();
}
function resizeHandler(e:Event = null):void {
// check if the Height and Width is bigger than zero and act accordingly.
if ( stage.stageHeight > 0 && stage.stageWidth > 0 ) {
// safe area. Do normal resize
}
}