This content has been marked as final. Show 7 replies
Its probably a compressed SWF file.
Anyway .. it doesn't matter
you take percentage getBytesLoaded of getBytesTotal and all will be fine.
Ignore the size report when it comes to loading your file.
Thanks for the answer.
The problem is that my FLA is built i a way that every keyframe in the _root timeline is a "page". Every of these pages weighs about 100-200k. They are in a reasonable order, so that the ones that get chosen most often or earlier in a session are at the beginning.
Now I'd like the user to be able to go to the 2nd page (keyframe #2) as soon as it's loaded, even though keyframe #10 (total: 1Mb) hasn't loaded yet - do you see the problem? To get the load percentage I'd have to know how much was loaded when the new page was called and how much has to be loaded. Or is there a possible use of getBytesTotal() I'm not seeing?
In that case you're just doing it all wrong .. if you want to know if a
frame is loaded, use _framesloaded
So you do not need to know anything about how bit the individual frames are
(a very time consuming and unreliable way of doing what you want anyway)
Again, that is clear to me and I am showing the frame as soon as _framesloaded >= frame_number_to_be_loaded ...
But I need to present the user with a loader which shows the percentage of what's loaded compared of what needs to be loaded.
Export the movie with compression turned off .. then you'll know the number
of bytes for each frame. Then use those figures in your script and test
again (as changing the script may change the figures). Then, when it all
seems to work, turn compression back on and it should work just fine (only
difference is that the whole thing will be quicker, which is good)
That was it! Thanks a lot!