Jump to content


estimated bytes

Recommended Posts

I have a pretty common scenario, but can't quite get the loading progress sorted out-


I have a main swf, containing a swfLoader which loads in another swf:


menuLoader = new SWFLoader("menu.swf", {container:this.menuHolder,estimatedBytes:10000000});


in the child swf I have an xmlLoader which loads xml file containg a videoLoader, several MP3loaders and some imageLoaders, the content of which totals around 10Mb:


xmlLoader= new XMLLoader(baseURL+"xml/menu_config.xml", {name:"xmlData",onComplete:completeHandler,requireWithRoot:this.root});



Everything loads perfectly, but I cannot get a smooth progress on the preloader? It goes quickly to 10% or so, then jumps to 95% and slowly progresses up to 100? I've tried every option I can think of,but its pretty clear I don't understand how its supposed to work.


So...some basic questions,


1. do I declare estimatedBytes in the parent swfLoader, or the child xmlLoader, or in the xml file itself for each imageLoader,videoLoader etc, or some combination of those?


2. what should this.root refer to in requireWithRoot? I would think it would be the parent loader but when I trace out this.root it always refers to the child class?


3. is there something else, probably very basic, I'm missing?


cheers for any help

Link to comment
Share on other sites

Hi and Welcome to the GreenSock forums!


First, congratulations on your success so far with LoaderMax. We are glad to hear that LoaderMax has allowed you to track the progress of assets loading in various swfs.


As for the odd progress behavior. Have you read tips 8 and 9 here:



Give those a look. If you still have trouble smoothing it out, just let us know and we'll do our best to help you.

Link to comment
Share on other sites

Also, did you try setting an estimatedBytes on your XMLLoader that includes any of its subloaders?

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.