Jump to content
Search Community

Loader gets stuck in state Loading

prestont test
Moderator Tag

Recommended Posts

I am getting a strange case I can't debug successfully. This is in code I have used in previous projects successfully.

 

I am loading various SWF resources for the game. A bunch of resources (SWF's) are downloaded using a LoaderMax. This load without problem.

_gameLoader = new LoaderMax({onFail:errorHandler,maxConnections:6,auditSize:false});)

 

public function requestGameSWF(rname:String,n:String):void {

var swfl:SWFLoader = new SWFLoader(n,{name:rname,autoPlay:false,onFail:gameSwfErrorHandler,onComplete:gameSwfLoadComplete});

_gameLoader.append(swfl);

_gameLoader.load();

}

 

Then as the users takes actions, additional swf's are requested and loaded. However, these were not being downloaded.

 

From what I can tell the _gameLoader is still in state 1 (LOADING) according to its internal state but should, if fact, be in READY state since nothing is actually in the queue after the first set of files are laoded. When load() is called, it basically does nothing because it appears to be LOADING. If I use the debugger to change the state to READY before load is called, it picks up and loads fine.

Also, if I cause pause() then load() it will start working again.

 

I ran with this code in a different project for months now without a problem and this class was copied over without changes so I can't figure out what is broken. The problem remains both accessing files locally and downloading over http.

 

Thanks,

Preston

 

ps. For all that this is two posts in one day, I have been using Loader for months now without a problem

Link to comment
Share on other sites

I just tried your code and it seemed to work perfectly for me - can you please post a very simple FLA (or set of FLAs) that I can compile to clearly see the issue? I just need to be able to reproduce the problem to effectively troubleshoot it. I think there might be something else going on with your other code, so I need to see this in context.

 

The simpler you can make the example, the better - no need to post your production files.

Link to comment
Share on other sites

Well in trying to create a minimal app, I found the problem. Apparently it was getting stuck on what looks like a corrupt SWF. I have attached it in case you want to see the effect. Basically it got stuck somehow thinking it was still loading and blocking the queue.

Link to comment
Share on other sites

Interesting. Looks like that swf was attempting to load another file named "deco_egypt.swf" but you didn't include that one so it's tough to tell exactly what's going on. And it'd be helpful to see the FLA files that created the "corrupt" swfs. But if you narrowed it down to a faulty swf and got it working in some other way, great.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...