File size

my animation SWF publish’s at 167KB, but when I throw it into a browser with preloader it’s loading 415KB. Why?

I’m new to flash so theres probably a simple explenation to this.

my guess is either 1) you arent looking at the right swf when you are checking its size or 2) your preloader isnt working the way it should

i got the preloader of one of these tutorials so I imagine it works fine and i’m checking the correct SWF.

I thought the initial load up was loading all my level 1,2,3 etc SWF’s from the begining…could this be happening???

I wouldnt think so. One preloader, unless specifically designed to handle more than one movie, will only represent the one its used on… but another thing is not all these tutorials on here are exactly right either. A common mistake made in preloaders (which I have seen on at least one example from this site) is that a Bytes to KiloBytes conversion is Bytes*1024 and not 1000. Now that alone wont change 167 to 415, and is generally insigificant enough to ignore, but its something to be aware of none the less.

How are you checking the file size intially? Have you run it off your hard drive and the server and gotten those two different results? Try uploading it to a different directory on the server or another server altogether and see if the same occurs

no just the SWF after publishing to my harddrive…

Hey Senocular, I have actually wondered about 1024 and 1000 myself, so I did some research a while ago.

My research returned that there are actually 1024 bytes in a kilobyte, but 1000 is still accepted, so in that case it is just a personal preference on whether you choose to use 1024 or 1000.

And I know you like to challenge what I say all the time, so I am going to post this link…

http://www.romulus2.com/articles/guides/misc/bitsbytes.shtml

its only accepted because it makes more sense :wink: but that doesnt make it correct. Its an error on whoever, way back when, decided to consider 1024 to be close enough to 1000 for computer engineers to name byte sizes with metric prefixes. Because of the confusion this called, somewhere down the line they seemed it was necessary to accept a term like Kilobyte to also mean 1000 bytes. In ‘math’ terms, thats absolutely right, but in terms of your computer, a Kilobyte is 1024 bytes. If you look at a file on your computer in KB, you’ll be seeing the 1024 conversion of bytes to kb, so if comparing your flash preloader kb to your computer specified kb, youd be best off using 1024

Yes I do agree that 1024 is more accurate and use it myself when needed, but I was merely stating that 1000 is accepted as well if that is what you want to use and have displayed. So in this case there is no right and wrong, it just depends on what version of Kilobytes you want to show.

oh sure, for display purposes, its no big deal at all, but when you are complaining about the KB of your preloader not matching the KB of the file as specified by your OS, then its an issue.

Yeah but as you stated before it definitely wouldn’t be the cause of a 248kb difference. And now looking back at that… that is one huge difference! 248kb is a lot on the web, for dial-ups that is, but tacking that to an already 167KB file… wow.

What file size does it say your .swf file is on the server? Most (if not all) servers have the file size next to the file name.

hey guys, thanks for your responses, I need all the help I can get!

Ok, just thrown it on the the server, and the server is telling me that the SWF is 170KB which is what the SWF is after publish, but preloader still tells me it’s 415KB and while ‘show streaming’ is active in flash, it sure feels like 415KB is loading.

I also out of curiosity took the same file and added an extra 30 scenes to see how much the file would increase. It published to 191 KB and the server saw it as 191KB, but in flash "showstreaming’ the preloader was saying 798KB and felt like it was loading that much as well.

Which do I believe.???

cheers.

Well you really can’t <I>feel</I> a file size, and using show streaming in Flash reads it as if it were going on like a 28.8 or something like that (maybe an exaggeration, but it shows it as if it were on dial-up).

I guess you have no choice but to go by what the preloader tells you if you can’t seem to figure out why it is outputting that info.

I know I have no clue. If it is no extra math in the preloader code, then I am clueless right now.