1 person found this helpful
All actionscript runs in a single thread. I would say the documentation you
quoted is misleading or incorrect in that if two listeners are listening for
a single event one will get called first and allowed to complete before the
other gets called, but if code in a listener causes the dispatching of some
other event, those other listeners will fire and complete before the first
Thank you very much for the confirmation, the doc is indeed misleading. That doesn't help me to fix my bug though
Sure it helps. It means that a whole class of possible causes has been
Anyway, describe your problem in more detail. Keep in mind that while you
don't have to worry about concurrency issues, you do have to worry about
asynchronicity issues. Network calls, for example, are asynchronous, which
means that they do not block the UI, and their event handlers will run
later, when the response returns (but it won't interrupt other actionscript
processing). I don't believe that responses are guaranteed to return in the
order requested and that can cause your code to run in a different order
Yes it helps, thank you again.
I am not really able to describe the problem in details, if its is not related with concurency issue, it might be something different from what I first evaluated...
This directly contradicts the documentation cited, which also caused me a great deal of confusion. (The documentation isn't just misleading, it is altogether wrong if I read this reply correctly.) Can I have confirmation one way or another?
If I add event listener A with higher priority than listener B, am I indeed guaranteed that listener A will both be invoked and also finish before listener B is invoked?
Thank you very much!
If A and B are listening to the same object, then yes, A will finish before
Excellent. Thank you! (Adobe may consider getting that documentation changed?)
I cannot find that statement in the Flex 4 doc. If you can, please add a
comment to the page.
Good point! That statement was removed for Flex 4 documentation...