Jump to content


LoaderMax with child swf

Moderator Tag

Recommended Posts

I have 2 child swfs being loaded into a parent swf. Each child swf loads its own XML file. When I load the child swfs, I get back a null because they have not loaded their XML files yet. I am using LoaderMax. Is there anyway for the parent to know when all the child XMLs have been loaded.

Link to comment
Share on other sites

Hello and welcome to the GreenSock forums.


Yes, the loading of the xml can be integrated into the progress of the child swf (assuming that xml is loaded with an XMLLoader);


From the XMLLoader docs:


requireWithRoot : - LoaderMax supports subloading, where an object can be factored into a parent's loading progress. If you want LoaderMax to require this XMLLoader as part of its parent SWFLoader's progress, you must set the requireWithRoot property to your swf's root.


In each child swf that loads xml use:


var loader:XMLLoader = new XMLLoader("data.xml", {name:"data", requireWithRoot:this.root});


Let us know if you have any trouble

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.