> I'm not sure it's a bug, but it's really annoying!!

 

It isn't a bug; it's due to the way that the Flash Player works. The Player isn't threaded and doesn't have public APIs for processing its event queue. Alert.show() must return as soon as the Alert is shown -- not when the user dismisses it -- so that the Player can handle the user's mouse and keyboard events while the Alert is up.

 

This is similar to what happens when you use APIs that load information over the network... they return immediately, and you get notified via an event when the data arrives.

 

- Gordon

 


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Daniel Tuppeny
Sent: Tuesday, June 13, 2006 4:56 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Mx.controls.Alert confusion

 


I had the same thing, but I was alerting to variables (both numbers),
and it was messing with my head!

It seems that Alert.show() is not modal. It looks it, but it doesn't
halt exectuion until you click OK, so what's actually happening, is that
the second alert box is popping up over the first very quickly, so you
see it first. When you click OK, you then see the original box that was
hidden behind it.

I'm not sure it's a bug, but it's really annoying!!

-----Original Message-----
From: [EMAIL PROTECTED]ups.com [mailto:[EMAIL PROTECTED]ups.com] On
Behalf Of rama satoskar
Sent: 13 June 2006 12:32
To: [EMAIL PROTECTED]ups.com
Subject: [flexcoders] Mx.controls.Alert confusion

hi all,
Has anyone come across this?
I have a button whose click event activates an event listener where i
have two alert boxes. The first one displays a message "hi" and the
second one displays"hello". They are written one after the other.
However the second alert message displays first. Why is this?? i am
confused??

The code is given below:

var btn:Button = new Button()
btn.addEventListener(MouseEvent.Click,handleClick)

public function handleClick(event:Event):void {
mx.controls.Alert.show("hi"); mx.controls.Alert.show("hello"); }

------------------------ Yahoo! Groups Sponsor --------------------~-->
Protect your PC from spy ware with award winning anti spy technology.
It's free.
http://us.click.yahoo.com/97bhrC/LGxNAA/yQLSAA/nhFolB/TM
----------------------------------------------------------~->

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links

[Inbound Mail Scanned by MessageLabs]

__________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
__________________________________________________________

__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




__,_._,___

Reply via email to