-
all I ask is, can it be done and what would be the correct syntax?
thanks.
-
Deathbringer
Errrm....
A stupid way would be to include everything in your scene in a movieClip and then put it in your scene... and then get the size of that... but it would impact on nearly all your variable paths, you might not be able to get the info and you'll screw up your download stream....
Alternatively, just generate a size report, and add the size of each frame (or take the value of the last frame in the scene and substract the first.. since it's cumulative...) in the scene you want but you'd have to hand code the number into your FLA afterwards and then use the number from then. However, every modification to your FLA will need a new calculation....
Or...... you *may* be able to get away with it with the timeline properties.
say your scene is between frames ... 40 and 100 (when flash compiles into the SWF scenes are sort of removed) so store the amount of data taken at those points:
(this assumes a loop on the main timeline)
if (_framesLoaded=40) {
sceneStart=getBytesLoaded();
}
if (_framesLoaded=100) {
sceneEnd=getBytesLoaded();
}
if (_framesLoaded > 100) {
sceneSize=sceneEnd-sceneStart;
}
Of course you'll only get the info after it's loaded and i'm guessing you need this for a preloaded... hence it's useless for that need.
So my advice... pick the one you could use and try it...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|