Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Preloaders- percent loaded, measured by KB 2

Status
Not open for further replies.

carpeliam

Programmer
Mar 17, 2000
990
US
So far, in preloaders that show what percentage has been loaded so far, I've seen it as (framesLoaded / totalFrames). Is there anyway to measure how much has been loaded depending on kilobytes, not frames? I only need to preload the first frame, as all the graphics in the movie are in that frame. Measuring by framesLoaded, it would go from 0% to 100% instantaneously (as totalFrames is set to 1). Can I measure by kilobytesLoaded? How might I be able to do that, if possible? Thanks... :eek:) <p>Liam Morley<br><a href=mailto:lmorley@wpi.edu>lmorley@wpi.edu</a><br><a href= imotic ::</a><br>
 
No, but as one of your compatriots (hi Dave!) once suggested, I did have my head cracks filled with polyfilla!
It's been working fine since! The ball never goes off stage! Regards,

new.gif
 
ok, maybe a worst case scenario would help it to make sense. Your preloader starts. 84 bytes have been loaded. But, because getBytesLoaded() is less than 100, getBytesTotal() is unreliable and reports that there are only 84 bytes (when in fact there are a lot more than that). because getBytesLoaded() = getBytesTotal(), your preloader stops and goes to the first frame of your movie, which crawls because there's still a lot left to be loaded. does that help to explain why such an issue can be important? I've never had such an issue, and by the sound of it neither have you guys, but apparently (or so says the advanced flash programming CD), this kind of thing can happen, so why not be alert to it. Liam Morley
lmorley@gdc.wpi.edu
&quot;light the deep, and bring silence to the world.
light the world, and bring depth to the silence.&quot;
 
Okay - time to put the brakes on this ...

I see what you mean about your code, Liam. Preventative measures ... better than cure ... see where your going. Not futile ... very admirable ... will probably use it myself from now on! Maybe we should abandon this thread before other people start taking an interest ... ;)
 
not my code:) so I couldn't really say how great the need for it is. It seems that the three of us haven't needed it so far. but just explaining what seemed to be a problem for others. and yeah, I think a thread with 22 responses needs a fork stuck in it. Liam Morley
lmorley@gdc.wpi.edu
&quot;light the deep, and bring silence to the world.
light the world, and bring depth to the silence.&quot;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top