Optimizing Flash Movies

 < Day Day Up > 



Carefully optimizing the individual elements in your movie and following some of the tips listed here will help you reduce the size of your SWF movie.

Bitmaps

It's a good idea to use large bitmaps as static background images only. It's not a good idea to use large bitmaps in an animation because of the large size of the files. You can, however, use small bitmaps sparingly and animate them with a motion tween.

You get better results if you edit your bitmaps in Fireworks before you place them into Flash. The difference in file size may not be much, but every little bit helps; plus you have more control and optimization options in Fireworks. For instance, with the new Selective JPEG Compression feature, you can optimize portions of an image at a higher setting and optimize less important areas at a lower setting.

Keep in mind that when you export your Flash movie, Flash compresses your image again. JPEGs that are compressed multiple times frequently result in artifacts. To avoid this, select the image from the Library list (before you make it a symbol). From the Options pop-up menu, choose Properties. The Bitmap Properties dialog box opens. Choose Lossless from the Compression drop-down menu, and click OK.

Traced bitmaps

If you trace complex images, the file sizes may be considerably larger than the original bitmap version because of the complex curves. You can simplify the curves to make it less complex. Always check the file size to determine whether you need to redraw portions of the traced bitmap or even perhaps use the bitmap itself depending on the use of the image.

Animations

When making animations, it's best to use symbols as much as possible and then use tweens on the symbols. If you animate frame-by-frame, each keyframe has to load. If you animate using a motion tween or a guided motion tween, only the symbols have to load.

Symbols

You get small file sizes if you tween symbols instead of using large groups of objects. If you ungroup your elements, there are fewer paths involved for Flash. Plus in a symbol if there are no groups, any effects you apply are applied to the symbol as a whole instead of to groups within the symbol.

Paths

When you make vector images in FreeHand or other vector programs, simplify the paths as much as possible while maintaining the integrity of the paths. Vectors you make in Flash should have the paths optimized as well (Modify ® Optimize).

Fonts

Fonts are embedded and the outlines are exported with your Flash movie. But Flash does not necessarily support all fonts. It's easy to do a quick test to see if the fonts you want to use are acceptable. Choose View ® Antialias Text. If the text appears jaggy, it isn't compatible. If the text you need isn't design critical you can use device fonts: _sans, which is similar to Arial and Helvetica, _serif, which is similar to Times Roman, and _typewriter, which is similar to Courier. These fonts are the top three in the font drop-down list of the Character panel. You reduce the file size by using device fonts, because they use the closest font match from the user's system, so there is no embedding of fonts in the movie.

Gradients

Solid fills add the smallest amount to your file size. Gradients should be used sparingly. Flash can do gradients up to eight colors; after that the additional colors are broken up into separate shapes, which adds to your file size.

Alpha versus Tint

When you add an Alpha effect to a symbol, it increases the file size. Tint adds less if it'll do the trick for you. Try to limit the number of Alpha effects you have in the same symbol.

Layers and folders

Layers and folders are a great way to keep your movies organized: images on a layer, buttons on a layer, actions, and so on. Use all the layers and folders you want or need. They do not add to the finished SWF movie file size.

Sound

You should optimize each sound separately, as discussed in Chapter 29. Edit your sound to the absolute minimum to get the best sound at the lowest file size. Remember to edit out any dead space. If you use sound frequently, you may want to invest in a good sound-editing program.

If you want streaming sound, place it in the main movie Timeline and not in a Movie Clip. The reason being, in the main Timeline, the sound begins at the appropriate frame and plays immediately. If it's in a Movie Clip, the entire file has to load before play begins.

On the Flash tab of the Publish Settings dialog box you can compress audio streams and audio events separately so you can have a higher quality for music and lower quality for sounds that go with buttons.



 < Day Day Up > 



Macromedia Studio MX Bible
Macromedia Studio MX Bible
ISBN: 0764525239
EAN: 2147483647
Year: 2003
Pages: 491

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net