Reducing Filesizes

img

#Tips for pictures

#Put all pictures inside of symbols, and use only the symbols

# If you use the bitmaps directly or “break them apart”, you’ll end up making COPIES of them. This will seriously bloat the SWF file. If you use symbols, you’re referring to ONE image over and over. This is much more efficient.

#Re-use symbols as much as possible

# Obviously, you don’t want multiple copies of the SAME symbol in your library. One symbol can be used many times. It can also be flipped and rotated, so you do not need separate symbols for flipped or rotated graphics. You can also use symbols inside of other symbols. This is especially useful for invisible buttons.

#NEVER use “generate tween”

# Create Motion Tween" creates a new symbol each time it’s used. That’s not necessary, and will only clutter up your library. Instead, select the tween method from the properties.

# img img

#Keep your library organized

# I often create folders for each symbol I intend to use. Stuff that’s used as part of that symbol, goes into its folder. Things that are re-used by multiple symbols go elsewhere and are not stored in their folders.

img

# On the other hand, if you have LOTS of symbols containing single pictures, it can be more convenient to separate the pictures and symbols, allowing you to use the symbols without scrolling through lots of pictures.

img

#Place projectiles outside of the things that shoot them

# Control their movement with programming instead of using tweens. That way, you won’t have to create more symbols just to animate them.

#Remove all sounds and images you’re not using

img

# … including images used for reference. A good way to find out if something is used is to turn on “Usage Count” in the library’s options. If you’re using linkage ID’s, their Use Count will seem to be zero, so be careful not to delete them by accident.

#Resize pixel-based pictures

# Resize them to the size you intend to use them at, before importing them into Flash. Enlarged pictures look blurry, and shrunken pictures take up more memory than necessary.

#Choose the right type of compression

img

# Use lossless compression for images that use only a few colors, such as graphics from video games. Use JPEG compression for images with many colors or detailed shading.

img

#Tips for vector-based images

#Keep the details simple

# …Especially if the image will be displayed at a small size. Why waste memory on details you can barely see?

#Tips for sound

#Use 24kbps Mono MP3

img

# Use Mono sound, especially for sound effects. Have flash compress audio as MP3 at 24 kbps or less. Anything more than that is overkill and you won’t hear much difference. You can also use code to tell Flash to use streaming music. But streaming won’t work if you’re uploading to websites that only accept single SWF files.

#Tips for fonts

#Static text

# If you’re using a “static” text field containing text that never changes, you don’t have to worry about anything. Flash actually converts that text into vector shapes.

#Dynamic text

# img img

# If you’re using any dynamic text fields, make sure they’re ALWAYS set to “Use device fonts”, otherwise, Flash will ask you to “Embed” the font.

# Since each text field has its own embedding, this will bloat the size of your SWF pretty quickly.

#Embedded fonts

img

# If you really want a custom font in a dynamic text field, the correct way to do it is to right-click in the library and select “New Font…” Give it any name you want. I recommend putting an _ at the beginning of the name so it’ll be at the top of the font list. Select the font you want, and the size you want to use. An embedded font can only use one size. Then you just set your dynamic text fields to use this custom font. But make sure they’re ALWAYS set to “Use device fonts!”

img