Jump to content


Dynamically loaded LoaderMax is empty inside (Loaded from XML file)

Recommended Posts

I'm using this function to get the MP3Loaders from within the xml

 xmlLoader = new LoaderMax({name:"aName", autoDispose :true, onComplete:propsLoaded});
        xmlLoader.append(new XMLLoader(loaderPath, {name:"anotherName" , autoDispose :true,  estimatedBytes:841 }));

private function propsLoaded(e:LoaderEvent):void {

        var curPageLoader:LoaderMax = xmlLoader.getLoader("loaderrr"); //get the pages LoaderMax stored within the xml
        //curPageLoader is NOT null, but it contains NO loaders inside - it should containt 2 MP3Loaders according to my xml
<?xml version="1.0" encoding="utf-8"?>
<tale id="1">
  <page id="1">
  <taleText>Lorem ipsum bla bla bla.</taleText>
      <LoaderMax name="loaderrr">
          <MP3Loader name="sth1" url="page_1/backsound.mp3" estimatedBytes="2050" autoPlay="false" />
          <MP3Loader name="sth2" url="page_1/backsound.mp3" estimatedBytes="2050" autoPlay="false" />

but the LoaderMax object that is returned to me has NO loaders inside. Its empty.. Why is that?

Link to comment
Share on other sites

Did you activate MP3Loader? If not, LoaderMax will have no way of recognizing those. Also, have you tried removing the autoDispose:true? 

Link to comment
Share on other sites

That was the problem. I didn't know I have to activate anything.. Problem fixed, thank you :D

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.