Array
SWF maximum file size [Archive] - FlashMove Forum

PDA

View Full Version : SWF maximum file size


bat7
03-31-2005, 07:50 AM
Hi!

In the Macromedia Flash Lite 1.1 – Authoring Guidelines it sais:

"There is a prescribed limit on how large a web page can be, whether or not it includes Flash Lite content. For most mobile phones, this limit is 20-100 Kb ."

It is speaking about the size of a web page.

What is the adviced size for SWFs that are locally, on the device itself?

I know that this of course depends on the device itself - and what actually happens in the application itself (the required runtime memory) - but what do you find the sizes acceptable for local SWF files?? I am addressing here the people who have experience with this, and kind of set the limit for SWF applications to.... X...

Please let me know what you think is the desired maximum size....!!!

Thank you very much!!

Bat7

FrozenMedia
03-31-2005, 10:44 AM
There was a limit for Flash Lite 1.0 (DocoMo phones), but the series 60 Flash Lite 1.1 player doesn't have this limit, technically your SWF can be any size.

However, it only ever has under 1mb of RAM (UIQ = 1mb, series60 = 750kb) to use while it is running. This means that if you have 2 jpg's/png's (100 x 200) displaying on screen, and they only take up 20kb to store on file, they have to be first un-compressed for display, 1 pixel = 2 bytes (for 16bit displays), taking a total of 80kb of memory just for 2 small JPGs, not including all your text, script etc.

As a rule of thumb, you can display roughly 2 screen sizes worth of JPGS before you hit the memory limit and get an "Error with content: 6" message. This doesn't mean you cant have many more, it just means that at any one point you have to be careful how much data is being displayed at any one time (remember also that a movieclip takes up 4 bytes each, and text can take up alot per character).

A quick list:
- A frame takes up 2 bytes (frame 1 takes 27 possibly due to + _root)
- A frame after a frame with content/AS takes 4 extra bytes.
- A movieclip takes around 27 bytes in FL1.1
(+ around 4 for each character in its stage name)
(+ any vector content included)
- A graphic takes up 0 according to output (doubtful)
(size of a line in graphic = 44, size of a line in MC = 68, difference = 24 bytes)
- Text "Hello World" in _sans, static takes up 80 bytes

So there's a few things to consider, there's plenty more but its easy to see how the size mounts up very quickly.

If you need a desired size, I'd stick to 200kb absolute max and you shouldn't have any problems. I've run animations that are larger, but the player doesn't have to display lots of content at the same time, it can stream it in.

Rich

bat7
04-05-2005, 10:08 AM
Hi - Thank you very very much for the above!! VERY useful!!

There are still a few parts of it - I don't fully understand:

publishing an empty movie - is indeed 27 bytes.

I then drew a shape - which I use in the following tests:

only the shape - 72 bytes
empty movie (27) + shape (37) = 64 - where are the remaining 8 bytes?

shape - turned into graphic symbol - 72 bytes
empty movie (27) + graphic (34) = 61 - 11 bytes 'missing'??

shape - turned into movieClip - 97 bytes
empty movie (27) + MC (37) = 64 - 33 missing.
You wrote: MC takes about 27 bytes - still 6 missing...

I also noticed that when let's say I put exactly the same symbol on stage - and change tint for example - the color I choose has an impact on the final file size - INTERESTING!!!

In any case: this subject is just extremely interesting to me - and I'd like to know even more / deeper information about it - if anyone knows.

Rich, your info has been great - if you know even more about it - please let me know!!

TNX!

FrozenMedia
04-05-2005, 01:18 PM
You might look into getting a profiler tool that tells you exactly how much RAM the Flash Standalone player is using, I guess the Windows Task Manager (Processes tab) will do, but I don't know how accurate it is.

Thanks for all that extra info!
rich