Jump to content
Search Community

XMLLoader.parseLoaders problem

murrinus test
Moderator Tag

Recommended Posts

Hi,

I'm trying to avoid loading xml data form multiple files. Instead I want to have only one xml file with all my data, and load only a certain amount of data in different parts of my app.

 

I figured that the best solution would be using XMLLoader and parseLoaders method, but I'm having a hard time implementing it.

 

Here's my code:

var _queue:LoaderMax=new LoaderMax({ name:'laderQueue', onProgress:progressHandler, onComplete:completeHandler });
XMLLoader.parseLoaders(xml,_queue,_queue);
_queue.load();

 

Where xml var contains XML:








 

Unfortunately this doesn't work. When I trace numChildren of _queue I get "1" and in completeHandler trace(e.currentTarget.bytesTotal) I get 0.

 

Any ideas on what I am doing wrong?

 

PS: Forgive my English ;)

Link to comment
Share on other sites

I bet you just forgot to activate() ImageLoader. Remember, in order for XMLoader to recognize the various types of nodes, you must activate the necessary loader types like:

 

LoaderMax.activate([imageLoader, SWFLoader]); //or whatever types you're using

 

It worked fine for me.

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