Publishing
Optimizing the movie
When you created the Flash movies in your exercises you might have not worried about how large your file is and how fast it may be downloaded from the Internet. You always saved files on your computer and ran them from it.
In the real-life situation most Flash products are published for the Internet used and must be downloaded to client computer from remote servers. Even with modern cable or ADSL connection may be not fast enough to download files containing images, music, complex animations.
We mentioned before such advantage of Flash as using size-efficient vector graphics and good file compression capabilities but still there are several weak points in Flash publishing developer needs to take care of.
- Imported image size. If you want to use bitmap graphics you need to analyze the image even before importing it to Flash. In most situation dimensions of the image in Flash movie will be small. And not always you need a high quality image. It could be that the image will appear in your introductory animation for a second or even less. Another situation when image is moving, simulating video. In such cases you need to change size and quality of the image before importing it to Flash. Ideally you should not resize the bitmap inside Flash. If you imported a bitmap 600X400 pixels and publish your movie and then resized image to 60X40 pixels – when published it will yield approximately the same size of SWF file!
- Image compressing. In the Publish dialog for Flash Tab you may experiment with JPEG quality – 80 is good, but sometimes even 20 will be enough. It may save some file size.
- Sound compressing. At the bottom of Publish dialog for the Flash Tab you may set Audio Stream and Audio Event sound output quality. 8 KB/sec is like “phone” sound but 16 is good enough for most purposes. Install better settings only if you really need a perfect sound because it may increase size of the file drastically
- Tweening animations. Tweening is the essence of Flash. However don’t exploit tweening when you don’t really need it. If you insert a tweening between keyframes and there is no or practically no movement – it will still add a little to each frame where tweening is assigned. Revise your animation and leave tweening only when it’s necessary
- Fonts. Flash takes into the SWF file only those characters which were used, not all fonts, but still you need to avoid funny looking but not professionaly optimized fonts - they may increase size of SWF file
Remember that Flash design file (FLA) may be as large as necessary, but ready-to-use SWF file must be as small as possible.