Gaurav

Actually no - it is calling them in the right order. You need to think
about what is happening...

You call Alert.show with "Message 1"
Flex puts this alert on screen
You call Alert.show with "Message 2"
Flex puts this alert on screen directly over the top of "Message 1"
You call Alert.show with "Message 3"
Flex puts this alert on screen directly over the top of "Message 2"

So, on screen you see "Message 3" with OK button. You click OK and see
"Message 2" with OK button. You click OK and see "Message 1" with OK
button.

HTH



Steve




--- In [email protected], "Gaurav J" <[EMAIL PROTECTED]> wrote:
>
> Hello All,
> 
> I have doing a small experiment with flex 3 and found something every 
> strange.  In a function i am calling Alert.show() 3 Times 1,2,3 but 
> when i call that function the execution of starts from the bottom 
> calling the message box 3 first and message 1 the last. 
> 
> Have anyone got an idea why its happening ?
> 
> 
> 
> Here the code 
> 
> <?xml version="1.0" encoding="utf-8"?>
> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"; 
> layout="vertical" backgroundGradientAlphas="[1.0, 1.0]" 
> backgroundGradientColors="[#8E8E8E, #DEDEDE]">
> <mx:Script>
>       <![CDATA[
>               import mx.controls.Alert;
>               private function callAlerts():void
>               {
>                       Alert.show("Hello World","Message 1");
>                       Alert.show("Hello World","Message 2");
>                       Alert.show("Hello World","Message 3");
>               }
>       ]]>
> </mx:Script>
>       <mx:Label text="Test Alert"/>
>       <mx:Button click="callAlerts()" label="Call Alert Box"/>
> </mx:Application>
> 
> 
> Regards 
> 
> 
> Gaurav
>


Reply via email to