You can't predict order, but you can be assured that there is no parallel processing of actionscript code. I don't know the internals of the flash player well enough to say in detail but there are rules that control what code is processed when.
If you need to know that two async processes have completed, use a flag or dictionary, set a flag value in each handler, and check it in each handler. Tracy Spratt, Lariat Services, development services available _____ From: [email protected] [mailto:[email protected]] On Behalf Of Jon Gunnip Sent: Thursday, August 27, 2009 10:04 AM To: [email protected] Subject: [flexcoders] Race conditions when event handlers triggered from different targets Hi, I have a concern about possible race conditions in our Flex application. I've read in "Essential ActionScript 3.0" that the Flash runtime will not interrupt the execution of an event handler to update the screen. I'm wondering if there are any similar guarantees about the order in which two event handlers registered with different targets are executed. Consider the following: User presses button A triggering event handler A' In same frame, result returned from HTTPService B, triggering event handler B' If A' starts executing before B', will it run to completion before B' starts executing, or could their execution be interleaved? Thanks, Jon

