Queueing getURL calls
When building Flash applications that quickly call getURL in succession (for state updates, statistics reports, opening HTML popups), Internet Explorer sometimes tends to completely drop some calls or even clear its own loading queue. Other browsers like Firefox and Safari don’t seem to share this behaviour.
For example, when your Flash application is embedded in an HTML environment, this can result in not loading parts of the HTML page, after Flash issues a getURL command to the browser.
Another issue you may encounter is the fact that only the last getURL action is actually executed. All previous calls in the same frame are ignored.
To prevent this from happening, you can use a class that queues all getURL calls and executes them one after the other with a slight delay. We settled for 200 milliseconds, a timeout that doesn’t notably disrupt the user experience.
In response to Kevin Lynch’ post on his blog, I hereby publish a getURL queueing class named PostCenter created by Arthur Clemens and myself for the company I work for, Lost Boys.
Usage:
[as]import PostCenter;
var msg1:String = “javascript:alert(’message one’);”;
var msg2:String = “javascript:alert(’message two’);”;
var msg3:String = “http://www.lostboys.nl”;
PostCenter.send(msg1);
PostCenter.send(msg2);
PostCenter.send(msg3, “_blank”);[/as]
Get the source files. As always, feedback much appreciated.

October 18th, 2007 at 14:36
perfect! i used this for indextools as i sometimes could have two or more url requests for stats and they never went through in IE7. Thank you very much for this exellent class. =)