Hmm, that isn't as easy as it should be.  Please file a bug.

 

I did this to get it working:

 

<?xml version="1.0" encoding="utf-8"?>

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"; 

layout="absolute">

<mx:Button x="153" y="123" label="Button" click="onclick()" />

<mx:Script>

<![CDATA[

import mx.core.UIComponentGlobals;

import mx.controls.Alert;

private var a:Alert;

 

private function onclick(){

 

a = Alert.show('I want to see It first before entering loop');

a.addEventListener("enterFrame", alertUp);

}

 

private function alertUp(event:Event):void

{

            if (a.visible)

            {

                        a.removeEventListener("enterFrame", alertUp);

 

                        callLater(Dolater);

            }

}

 

 

 

private function Dolater(){

for(var i:int=0;i<9999999;i++){

for(var j:int=0;j<99;j++){

}

if(i==9999998){

Alert.show('ohhno');

}

}

}

]]>

</mx:Script>

 

</mx:Application>

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of nahidupa
Sent: Tuesday, October 23, 2007 5:23 AM
To: [email protected]
Subject: [flexcoders] How do i show a wait screen before entaring havy
task...

 

hi,
How do i show a wait screen before entaring havy task...

Alert.show('I want to see It first before entering loop');..should 
come first before other task but ui become hung...plz 
help...calllater also can't help

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml
<http://www.adobe.com/2006/mxml> " 
layout="absolute">
<mx:Button x="153" y="123" label="Button" click="onclick()" />
<mx:Script>
<![CDATA[
import mx.core.UIComponentGlobals;
import mx.controls.Alert;
private function onclick(){

Alert.show('I want to see It first before entering 
loop');
callLater(Dolater);
Alert.show('huh');
}
private function Dolater(){
for(var i:int=0;i<9999999;i++){
for(var j:int=0;j<99;j++){
}
if(i==9999998){
Alert.show('ohhno');
}
}
}
]]>
</mx:Script>

</mx:Application>

 

Reply via email to