Has anybody ever had issues with URLRequest’s unexpectedly failing or stopping for no good reason?
I have a series of functions all getting data (Mainly JSON and XML files) and 90% of the time Flash will load all the files fine, however sometimes it will just stop after a certain amount.
My code;
function loadXSI(xsiSuffix:String, complete:Function):void
var url:String = "XXXXXXX" + xsiSuffix _callbacks["loadXSInformation"] = complete; var loader:URLLoader = new URLLoader(); loader.addEventListener(Event.COMPLETE, loadXSIComplete, false, 0, true); var request:URLRequest = new URLRequest(url); loader.load(request); if (_updateFeed) _updateFeed.text = "Requesting XS Information...";
That function gets called multiple times like so;
for(var a:int=0;a<EntityList.userLength;++a){
loadXSI("user="+String(a+1),xsiComplete);
}
However when I add a counter into the xsiComplete() function (to see how many of the requests are complete, sometimes it will just “hang” on say number 42/50 or so.
Is there any way to fix this or to detect when the request has been hanging (or failed)?