Skip to main content
May 31, 2013
Question

unloadAndStop(true) throwing URL not found error?

  • May 31, 2013
  • 1 reply
  • 896 views

I'm using BulkLoader to load a .swf file from a website. The problem I'm having is that occasionally, say 1 out of 50 download attempts, I get the following error message:

Error #2044: Unhandled IOErrorEvent:. text=Error #2035: URL Not Found.

The .swf does then actually load and display properly, but I'm still concerned by this behaviour.

I've tracked the error down to this function called on a Loader object. The .swf has been downloaded by this point, and is trying to be cleaned up.

            loader.unloadAndStop(true);

I can't seem to listen for this IOError event by adding listeners to the loader object. Why would unloadAndStop() be reporting a URL not found ?

This topic has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
May 31, 2013

if you execute that while something is loading or before anything is loaded, you'll probably trigger that error.

June 1, 2013

I don't think that's the cause in this case. I can create the problem from the following code:

private var bulkLoader:BulkLoader = new BulkLoader("Test");

bulkLoader.addEventListener(Event.COMPLETE, onComplete);

private function reload():void

{

     trace("loading again");

     bulkLoader.add("My_swf_url", {preventCache:true});    

     bulkLoader.start();

}

private function onComplete(e:Event):void

{

     bulkLoader.removeAll();

     reload();

}

kglad
Community Expert
Community Expert
June 1, 2013

where's the unloadAndStop() that triggers the error in that message 2 code?