Jump to content
Search Community

Adding children once loading has started

kheftel test
Moderator Tag

Recommended Posts

Hi,

 

I was wondering if it is possible to add children loaders to a LoaderMax once loading has already started.

 

I have a multi-SWF project where the top-level SWF loads multiple child SWFs, which also load their own child SWFs. The top-level SWF passes a reference to the LoaderMax object to the child SWFs. Can they then call LoaderMax.append() on the LoaderMax instance from the parent SWF and add their own children to the queue? I tried to get it to work this way but I couldn't get it to work properly.

 

I know that subloading is supported, but as far as I can tell you have to create and fully initialize the LoaderMax object in the child SWF's constructor, and my child SWFs aren't fully ready until after the constructor because they need some data passed in from the parent SWF, so I'd rather not go that route.

 

Does this make sense?

Link to comment
Share on other sites

Sure, I can't see any reason why you couldn't do that. You can definitely append() more loaders dynamically anytime, even while the LoaderMax is actively loading other stuff. Keep in mind, however, that if the LoaderMax completes and then you add more to it, it won't automatically start loading again unless you set that LoaderMax's "autoLoad" special property to true (it is false by default).

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