I found an interesting questions regarding the events in action script: is the event buffered and ordered?
Ie) In a swfloader example, I setup a timer(1 sec) to run a function, in the function I setup a listener to event INIT of the loaded swf. It depends on the network condition that whether the timer handler or the INIT event will be first executed. Imagine a case that the INIT event fired first but the handler to handle the INIT event be setup later, will the handler be invoked?
Another question, if the loaded swf fired several events very fast, will the events be kept ordered as the fire sequence?
First Question: No, if INIT event is fired first and there is no handler for that Event then that event will be lost. So the best way is to setup all the listeners first then start any loading operation.
Second Question: Yes, all the events fired will be handled in the same order as they’re fired.