Carlos, I think it will be good for you and for others working on flex component to know the following:
"How big can a Flash movie be?
What is the maximum limit?
Some Flash users are curious to know what limits Flash has, in regards to symbols, layers, file size and ActionScript expressions. While these limitations are not documented, every program has logical limits. Many of those limits are difficult to pinpoint, as they may vary from computer to computer, and are often dependent on things such as RAM, CPU, operating system, video card, and browser version. There is an additional factor of chance, as users often use Flash in ways that may have not been intended by the program's designers.
Sometimes an intended behavior is achieved, and other times it fails. This may be due to reaching a limit in the program or on the machine being used for playback.
When asking the question, "how big can a Flash movie be?" always defer to the obvious. Flash was created to make small, streamable, vector-based files for web delivery. This is the usage addressed by the bulk of the documentation, and it is where Flash performs best. Flash can also be used for nonstandard purposes, such as CD authoring, desktop publishing, stand-alone application building, and other uses. While you can do these things, it's important to ask yourself, "Is this program designed to do what I am attempting? Is there a better program for this use, should this one fail?"
It's big
Some Flash users create stand-alone projector files from their movies. This is a great feature in Flash that allows the user's movie to play outside of a browser, without requiring that the Flash Player be installed on the machine used for playback. In addition, Flash projectors are given a limited amount of system-level functionality that allows them to perform simple operations such as playing full screen, opening an application program and quitting the projector.
Creating a file for desktop delivery often makes a file that is much larger than a web-delivered SWF. It may work, but users often have problems exporting a projector or SWF file that is over a few megabytes in size. The same files can also have problems during playback, such as crashes, inconsistent playback, slow playback, file corruption and unpredictable behavior in logical statements. In situations where large multimedia projects are needed, it is best to use a program that was built for this purpose, such as Director.
The magic number
A Flash movie can have as many as 16,000 frames. Exceeding that limit will cause the movie playback to stop. While this limit is rarely reached by most developers, it is possible to have movies that are this long. If your movie must have more than this number of frames, it would be best to create multiple movies with fewer than 16,000 frames each, and link them together with a method such as LoadMovie.
The number 16,000 is a limit for other things in Flash as well: it is the maximum number of layers that Flash can export, the maximum number of loaded movies that Flash can support, and the maximum number of symbol instances allowed in a Flash movie. Combining multiple limits in a single Flash file would create greater risk, as using them together would most likely create other problems. Keep in mind that Flash and the Flash Player are optimized for normal circumstances, and testing the extreme limits of Flash can cause memory and other operating system issues.
It's logical
With the creation of ActionScript, there are also measures that prevent users from reaching maximum memory limitations. Since this feature of the program allows users to create loops and mathematical calculations that are capable of taking up a lot of system resources, measures have been put into place to ensure the user doesn't accidentally create a function that crashes the machine. By limiting certain methods—such as the Loop action, which is limited to 200,000 operations—Flash provides a way to escape a situation that would probably crash a machine if the stopgap weren't there.
Additionally, functions such as Int() and Random() are limited to numbers around 2 billion, which ensures that they don't take up valuable memory reserved for other programmatic mechanisms.
When is a Flash movie too big?
This is a question that does not have an absolute answer. One of the best ways to approach this question is to look at the obvious. Consult the Flash manual and see if the features being used are documented for the purposes you are intending to use them.
If you are working with large files, you may want to defer to the default system specifications for Flash. On a Macintosh, memory for applications is allocated on a per-application basis. The memory required to run the Flash 4 editor is a minimum of 18,500K, with a preferred size of 26,143K. In contrast, the Flash 4 standalone player has a preferred size of 4,000K of memory. This should make sense, as SWF files are compressed and therefore much smaller than the work file. Since Flash loads most media into RAM, it would be wise not to exceed this amount of imported media in the Flash movie without increasing the RAM allocation. While that number can be increased, keep in mind that this is the recommended size, and extreme limits are not known. Your mileage may vary.
On a Windows machine, memory is allocated as the application requests it. While the same memory requirements aren't posted, it is safe to assume that Flash still has a preferred size that works best for FLA and SWF files.
We recommend that Flash Applications built with Version 2 components be limited to 125 components. This is a suggestion for best performance, not a hard, unbreakable rule.
As for the variables created in ActionScript, they will take up at least 12 bytes of memory, plus additional space for its name, enumeration flags, etc. The actual content—for example, the actual string assigned to a string data type—will add additional bytes.
Because ActionScript is an interpreted language, variables take up quite a bit more space than they would in a compiled language like C++, and it's hard to predict exactly how much because of the interpreter's various data structures.
The possibilities are endless, but memory is not. Having described the theoretical limits above, it is not recommended that users approach them for practical purposes." (Macromedia Technote)
Are you sure your pub is 208 Mb in size?? I have done some pretty weird and heavy stuff in flash and never reached such a big swf at the end.
German
_________________ German Silva Senior Web & Multimedia Developer E-solutions Inc Pro version 8.10 user
|