Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

unloadAndStop(true) throwing URL not found error?

Guest
May 31, 2013 May 31, 2013

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 ?

TOPICS
ActionScript
854
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 31, 2013 May 31, 2013

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
May 31, 2013 May 31, 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();

}

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 31, 2013 May 31, 2013

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jun 01, 2013 Jun 01, 2013

It's called in the removeAll() function

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 01, 2013 Jun 01, 2013
LATEST

delete the add() call.

if that eliminates the error, you probably cannot use add() when the bulkloader has no content.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines