Jump to content
Search Community

delay load progress for LoaderMax

Guest RebuiltJorge
Moderator Tag

Recommended Posts

Guest RebuiltJorge

I have a loaderMax instance that loads ,xml, images, and swfs, my problem is that the "onProgress" function doesn't get called till 5-7 seconds after the load() method gets called, any ideas

 

grandLoader = new LoaderMax( { onComplete:loadComplete, onProgress:onProgress } );

grandLoader.append( new XMLLoader( $list.@url.toString() , { name:$list.@name }) );

grandLoader.append(new ImageLoader( $list.@url.toString() , { name:$list.@name } ) );

grandLoader.append(new SWFLoader( swf.@url.toString() , { name:swf.@name } ) );

grandLoader.load()

 

function onProgress(){

//doesn't get called till about 5 seconds after grandLoader.load() gets called

}

Link to comment
Share on other sites

are you doing an auditSize() ? its possible that 5 seconds is the time that each file is being requested to figure out how much needs to load.

you can read about his feature here:

 

http://www.greensock.com/as/docs/tween/ ... auditSize()

 

also read tip 8 http://www.greensock.com/loadermax-tips/

 

in the interactive demo, clear out the estimated bytes for each child asset and select the auditSize option. you will se a live preview of the files being audited.

 

also read tips 9 and 10 on the same page.

 

I'm pretty sure that should clear things up.

 

Enjoy LoaderMax,

 

Carl

Link to comment
Share on other sites

Guest RebuiltJorge

Thanks, I tried this

 

LoaderMax.defaultAuditSize = false;

 

and

 

grandLoader = new LoaderMax( { onComplete:loadComplete, onProgress:onProgress, auditSize:false } );

 

but I'm still having a delay load, grandLoader is the only LoaderMax instance in the game, any ideas

Link to comment
Share on other sites

strange, I'm out of ideas, but perhaps more info could help.

 

does you XMLLoader have any LoaderItems in it?

 

when the progress does display does it start at 0? or does it jump to say 10% immediately?

 

I'd experiement with putting an onOpen eventListener on you grandLoader and tracing out and "open" message.

and also having a simple trace in onProgress (which you probably already have)

 

I'm suggesting this just to narrow down exactly where the delay might becoming from and perhaps rule out any other failures in how the progress is being displayed.

 

Is it possible you just have a slow server?

 

Furthermore, I would suggest testing

in Safari: open the activity window and you can see when requests are being made. if auditing is still taking place you will see loading progress show up and then report that they have failed.

 

in Chrome: do an "inspect element" and watch the "network" tab to see when assets actually are requested.

Link to comment
Share on other sites

  • 2 weeks later...
Guest RebuiltJorge

thanks, and sorry for the late reply, I will try all of your suggestions today and update the post

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