Q:

ActionScript Preloader More Detailed Percentages

I am building a preloader for a flash application I am building. I am looking for a way to gain more detailed percentages from the ProgressEvent.PROGRESS that all preloaders use to track downloading progress. When I run a trace() statement on the loader percentages for a small file, my output window displays something like this:
4
8
13
17
23 etc...

I am looking for a way to be able to monitor this progress more closely, so I get 1, 2, 3, etc.... If numbers are repeated, that is okay. Parts of my preloader rely on these values, and thus, it would be great to be able to get them from 1 - 100 with no skipped whole numbers.
Thank you for your time.

A:

This doesn't make sense - unless your internet connection loaded exactly 1% of the file at a time.
What's happening is that after each new packet is received, it could be any size based on your download speed (let's say between 200 and 230kb). ProgressEvent.PROGRESS is dispatched each time one of these is received, adding to the total percentage loaded as you would expect.
So basically, let's say we're loading a 1000kb file, and your download speed is 100-150kbps.
Each trace() in your function called on each dispatch of ProgressEvent.PROGRESS will be run when a new packet has been received, so:

100kb loaded - 100 total - traces
  10 120kb loaded - 220 total -
  traces 22 150kb loaded - 370
  total - traces 37

Etc.

