Skip to main content
Inspiring
October 15, 2014
Question

Getting SWF file loading Error #2036 only few times

  • October 15, 2014
  • 2 replies
  • 3664 views

I have used the following code:

var loader:Loader = new Loader;

loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoadComplete);

loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioError);

loader.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityError);

var swfUrl:String = "content/1-1-1.swf";

loader.load(new URLRequest(swfUrl));

this.addChild(loader);

function onLoadComplete(e:Event){

    trace("swf loaded successfully");

}

function securityError(e:SecurityErrorEvent){

    trace(swfUrl + " security issue." + e.text);

}

function ioError(e:IOErrorEvent){

    var errorMsg:String = swfUrl + " not found." + e.text;

    trace(errorMsg);

    ExternalInterface.call("ErrorTracker", errorMsg);

    // ErrorTracker sendimg for tracking that function I writeen in html page

    // This error getting very few times not for all times.

    // Getting mails with this message as: content/1-1-1.swf not found.Error #2036

}

All most every times it's running fine. Only very few time, I am getting Error #2036. And mostly this error comes with Window7 or Windows8.

It would be great help if any one can found out some reason why adobe flash player not not loading SWF file some times while the file is available on the same server.

Thanks,

Uday

This topic has been closed for replies.

2 replies

November 12, 2014

I have exactly the same problem as you which accours at random try.

I already googled about 100 topics and didnt found working solution.

I already tried this simple solutions:

- check if path is correct - yes it is correct, coz error appears randomly (on few machines with Windows 7, on others not).

- check if file name is correct with case-sensitive - yes it is correct, coz error appears randomly (on few machines with Windows 7, on others not).

- use reference with Directory to avoid GC - no difference, error still appears.

- avoid cache with variable date timer in url - no difference, error still appears.

- clear all flash cache - no difference, error still appears.

- update your flash player - no difference, error still appears.

- check if flash has access to internet - yes it has, I tried to load other external file (different domain with allowed access) with success.

All computers use Windows 7 x86 with latest updates.

All computers uses the same flash versions.

Some computers keep getting this error for few days.

Other computers works fine in the same time.

UdaySinghAuthor
Inspiring
November 12, 2014

This is a problem with Adobe Flash Player. Sometimes it's not able load the external file. I found some other way that reduced the errors.

You may use this code inside ioError() function:

var swfUrl:String = "content/1-1-1.swf?="+Math.random();

loader.load(new URLRequest(swfUrl));

That means you may load the swf file again by adding query string. Please let me know if it's helpful or not.

November 13, 2014

"- avoid cache with variable date timer in url - no difference, error still appears."

I already tried similar solution, but not in ioError function:
loader.load(new URLRequest("http://www.youtube.com/apiplayer?version=3&nocache="+new Date().getTime()));

I will check if this will make a difference, but I dont think it will in my case.

Difference between your and my case is, that if computer is not able to load file, then it is doing it on every try, and this happens few or more days.
Other computers dont have this problem on any try.
I am using official YouTube code, making many things in AS3 for years, so code is fine, just looking for a trick for this adobe bug that seems to exist in every version of Flash Player.

kglad
Adobe Expert
October 15, 2014

that error typically occurs when navigating away from a flash-embedded html page before a load has completed.

you can use the close() method to prevent that error.

UdaySinghAuthor
Inspiring
October 15, 2014

Thanks for your answer, unfortunately it's not helpful.

It's not away from flash-embed html page. and there is not close() method for loader displayObject. I am loading a external SWF file into main SWF file that's it.

UdaySinghAuthor
Inspiring
October 16, 2014

close

()method

public function close():void

Language Version: ActionScript 3.0
Runtime Versions: AIR 1.0, Flash Player 9, Flash Lite 4

Cancels a load() method operation that is currently in progress for the Loader instance. 

Related API Elements


Thanks for quick response.

Unfortunately the problem is not fixed after implementation of close(). As per my track record one thing I noticed that this issue happening only in Windows7 and 8 only very few times during the heavy traffic. And on windows XP it never throughing any error. Please let me know if you have any idea regarding the same.