Tuesday, April 26, 2011

totalFrames > 16,000


There is currently a limit in Adobe Flash involving total frames. The rule seems to be that that there can be no more then 16,000 total frames. There can also be no more then 16,000 total layers and 16,000 total symbol instances, but for this article let’s stick with total frames.

While researching this problem there were several common forum responses. The first of which being, “how the hell did you get more then 16,000 frames?”. The answer, self-contained video player with final deployment set for .exe i.e. no reference files.

The second response being a suggestion to break the project or video out into smaller pieces or chapters and dynamically load only the movieclip(s) needed at any given moment to stay or hide safely under the 16,000 frames. However when making a self-contained project you do not have this luxury and rather must embed all required elements.

As far as my web-investigative journalism can tell there is no way around this other then the technique listed above.

In my particular instance I was around 3900 frames over the limit, and apparently the client did not really want to hear that this project could not be accomplished and continuously dropping the frame rate of the video was not producing the James Cameron like experience I was hoping for.

The answer export the video chapters into separate .swc files. If you are not familiar:

“An Adobe SWC file is a package of precompiled Flash symbols and ActionScript code that allows a Flash or Flex developer to distribute classes and assets, or to avoid recompiling symbols and code that will not change. SWC files can be generated by the Flash authoring tool, and by Flex. They are sometimes referred to as a class libraries and cannot be directly executed by the Flash Player.”

In addition to the above a .swc file is also somewhat of a flash based file compression. The key to this technique working or not working was whether or not the files or classes contained within the .swc remained compressed until class instantiation. Apparently they do. I created a .swc for each chapter of the video. Each individual chapter ranged in frame size from between 4000 frames all the way up to 9500 frames. As long as you dispose of each movieclip prior to reaching 16,000 frames this technique seems to work fine.

*Please note that I also hit a file size limit, Im not sure what the exact number is but 62 mgs of content was too much and 53 mgs was fine.

No comments: