Jump to content
GreenSock

Artemix

Wrong progress values when loading files online.

Recommended Posts

Hi guys, first time poster, first of all, this site is great, the tools GS provides to developers are also amazing.

 

I used TweenMax for a long time, and I just found out about LoaderMax, so I gave it a try.

 

Locally, it worked great, I had my flash site, loading stuff, watching the progress, from 0 -> 1, everything worked like a charm.

 

To illustrate it better, when I test my site locally, I get progress numbers like these:

 

 

progress: 0.003883850985636321

progress: 0.005224570522409509

progress: 0.005405667068479131

progress: 0.0055884924598572925

progress: 0.00577347890787113

progress: 0.0058387428182685355

progress: 0.0059476600727065895

progress: 0.007269794522412967

progress: 0.008603166466624857

progress: 0.009943886003398045

progress: 0.011266020453104422

progress: 0.011330852152174694

progress: 0.01140130259849772

progress: 0.025564003366061815

progress: 0.03972670413362591

progress: 0.06805210566875411

progress: 0.0963775072038823

progress: 0.15302831027413868

progress: 0.20967911334439507

progress: 0.3229807194849078

progress: 0.3858683320057242

progress: 0.4857562596085981

progress: 0.5990578657491108

progress: 0.6132205665166749

progress: 0.6415459680518031

progress: 0.6698713695869313

progress: 0.7265221726571877

progress: 0.783172975727444

progress: 0.7855950880047093

progress: 0.8824078320150167

progress: 0.9917776117125812

progress: 0.9938833452983836

progress: 0.9959411034268739

progress: 0.9979781154116618

progress: 1

 

Now.. the online version (uploaded to a hosting) of the website, has the following progress numbers:

 

 

progress: 1.4023074060290286

progress: 0.26088574618533683

progress: 1.054707852623744

progress: 2.2028284331968737

progress: 1.054707852623744

progress: 0.26088574618533683

progress: 1.4153330852251582

progress: 1.5712690733159658

progress: 0.4168217342761444

progress: 0.5742463714179382

progress: 0.7335318198734648

progress: 0.7897283215481951

progress: 0.8835132117603275

progress: 2.0219575735020467

progress: 3.170078154075177

progress: 2.0219575735020467

 

The previous numbers.. are obviously completly screwing up my loader.

 

Any ideas about this issue?, do I have to change something?

 

Thanks!

Link to comment
Share on other sites

Welcome to the forums!

 

Those progress numbers are odd indeed - I've got a few questions for you:

  1. Have you tried a different hosting environment? It almost sounds like your server is sending faulty information to Flash about the size of the files which could happen if the server is set up improperly or sends headers or meta data incorrectly. Totally a guess - your server might be just fine.
  2. Did you provide any estimatedBytes values for your loader(s)?
  3. Did you set auditSize to false?
  4. Are you using the latest version of LoaderMax?
  5. Can you post a very simple example set of files with an FLA that we can publish to see what's happening?

Link to comment
Share on other sites

Thanks for the quick answer!, back to your questions:

 

1- No, is the only hosting I'm using right now, but in case that something has to be changed, I can make a request, I just need to inform them exactly what needs to be changed.

 

2- No, no estimated bytes.

3- Nope.

4- Not sure if the latest, but I downloaded it two weeks ago, new enough?

5- I got no fla, this is a Actionscript only project, I load files like this:

 

 

_queue = new LoaderMax({name:"mainQueue", onProgress:progressHandler, onComplete:completeHandler, onError:errorHandler});

_queue.append( new ImageLoader("../assets/header.png", {name:"header"}));
//and ~20 more appends.

_queue.load();

Link to comment
Share on other sites

  1. I'm not a server admin, so I'm not entirely sure what to advise here but what I'd recommend is sending me the files so that I can try them on my server. If they work fine, we know that it's probably a server issue on your end. Otherwise, we can rule that out and move on to looking at other potential issues
  2. Please try providing estimatedBytes for each one and see if that resolves things. If it does, we know there's something weird happening with the file size auditing. To be clear, you don't typically NEED to define estimatedBytes, but it can speed the loading process and make initial loading progress more accurate.
  3. Okay
  4. Yes, 2 weeks ago should be fine.
  5. Please export (or zip up) your Flash Builder project and send it to me (you can PM or e-mail me so that you don't have to post things directly here for everyone to see). I really need to be able to publish an example. You don't need to give me your production files - just something very simple that clearly demonstrates the problem.

Link to comment
Share on other sites

I tried to fix the problem adding estimatedBytes to every file, it didn't work, it's weird, with the last addition, seems like the numbers are even worse now.

 

I patched the problem, adding a condition that somehow fixes the situation in my particular case, but, is not optimal.

 

I sent you a link with the project zipped, if you have some time, give it a look.

 

Thanks.

Link to comment
Share on other sites

I took your sample code, dropped it into a very simple FLA, published, put it on my server, and it worked perfectly. I suspect the problem might be with your server.

Link to comment
Share on other sites

Thanks for taking the time, and yes, it probably is my server.

 

Anyway, I found an alternative way of loading what I need, the example code can be found here.

 

Basically, I load a frame 1 lightweight preloader, and I put everything else in the frame 2.

 

This way, I can load my main swf entirely with a simple call.

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