Flex does not work like javascript.  Javascript would wait for a response from 
alert 1 before executing alert 2.  Flex executes them all as Luciano points 
out.  It is the same thing with confirmation boxes.  You will need to bind 
events to them where as in JS you might put them inside of 'if' conditions.

-R

--- On Fri, 12/5/08, Luciano Manerich Junior <[EMAIL PROTECTED]> wrote:
From: Luciano Manerich Junior <[EMAIL PROTECTED]>
Subject: RES: [flexcoders] Flex : Execution of Alert.show() starts for the last 
one
To: [email protected]
Date: Friday, December 5, 2008, 1:34 PM

Hi,

that is the normal behavior. Every message gets the MAX(z-index) + 1.

When you add the first message, you'll have just the application

App Layer | 1st Message

When it comes the 2nd message, that will be above last added message

App Layer | 1st Message | 2nd Message

And so it is on 3rd message. 

App Layer | 1st Message | 2nd Message | 3rd Message

The same will happen if you add a custom popup

App Layer | 1st Message | 2nd Message | 3rd Message | Modal Popup

-----Mensagem original-----
De: [email protected] [mailto:[EMAIL PROTECTED] Em
nome de Gaurav J
Enviada em: sexta-feira, 5 de dezembro de 2008 08:37
Para: [email protected]
Assunto: [flexcoders] Flex : Execution of Alert.show() starts for the
last one

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






------------------------------------

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Alternative FAQ location:
https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-
1e62079f6847
Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups
Links




------------------------------------

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Alternative FAQ location:
https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo!
Groups Links






      

Reply via email to