Jump to content
Search Community

LoaderMax onComplete not firing sometimes... weird issue

sbarret test
Moderator Tag

Recommended Posts

Hello all

 

I'm having an issue and don't have any idea of what to do.

 

I have a loaderMax instance that has appended to it an xml loader, 25 image loaders, 3 swf loaders.

 

Each loader (xml, image, swf) has onComplete and onError event handlers - everything loads and the complete fire just fine. Things can be seen added to stage, so that's good.

 

The thing is that the loaderMax instance also has an onComplete; sometimes it fires, sometimes it doesn't. I can't pinpoint exactly what changes to make it fire or not - sometimes just reloading a page makes it work, sometimes reloading a page makes it stop working.

 

I have traces for the progress; every time everything works, it ends on "1"; ever time it fails, it either ends on

0.9999956816315227 or

1.0185082703068316

- a bit less, or a bit more.

 

If all the individual loaders COMPLETE event fire, why there's such a problem with the the loaderMax instance? What can cause this? Any ideas?

 

Thanks!

Link to comment
Share on other sites

Hmm...I'm not aware of any issues like that, no, but I'd absolutely LOVE to see an example set of files that reproduce the problem. Can you post a super simple example? No need to post your production files - just something with the minimal amount of code to show what happens.

 

You are using the latest version of LoaderMax, right? I believe there was a very old version of VideoLoader that [in very specific scenarios] didn't always fire its onComplete, but that was fixed a while back.

 

The only other thing I can think of is maybe one of your subloading swfs contains code that is throwing an uncaught error that is halting execution of ActionScript in general (totally a guess).

Link to comment
Share on other sites

BTW, I'm using the latest version, there's no video involved and I'm manually tracking (through an enterframe) when things complete loading, so there are no failures, everything loads but sometimes the complete won't fire.

 

The only thing I can think of as "different" is that some of the image loaders are being added after the initial loaders are already appended and running... other than that, it's all simple.

I'll post updates!

Link to comment
Share on other sites

Sure, you can add loaders whenever you want - that shouldn't be a problem.

 

You didn't set skipFailed or skipPaused to false, did you? The default values are true, so you generally don't need to mess with those unless you specifically WANT you LoaderMax to cease as soon as it encounters a failed or paused loader in its queue.

 

You said all the child loaders dispatch their COMPLETE event, right? (have you tested that?)

 

I cannot imagine why the LoaderMax wouldn't fire its COMPLETE event if all the children finish loading properly and you don't pause() or cancel() or dispose() the LoaderMax instance before it's completely done. You're not calling one of those methods from inside an onComplete of a child, are you?

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...