Optimizing Flash Movies Flash

Before you create a .SWF file from your Flash movie (.FLA file), you should read through this section to determine whether you can optimize your Flash movie. Optimizing can mean finding anything redundant in the final movie extra points in a line, repeated artwork, and so on to breaking apart your large .FLA file into several smaller .FLA files that will be loaded into a primary Flash movie. As you should see, symbols are the key to eliminating unnecessary repetition with Flash artwork. Optimizing can also entail the restricted use of bandwidth- heavy items, such as bitmapped artwork or lengthy sound tracks.

Simplify artwork
Although Flash can do some pretty amazing things with vector shapes and animation, you don’t want to overdo it at least not if you want 28.8 Kbps modem users to see your work without too much waiting. Keep the following tips in mind while creating your Flash artwork or reviewing your final production:

  • Use tweens for animations wherever possible. If you need complicated paths for objects to follow, use a motion guide layer instead of using a series of keyframes the fewer keyframes, the better.
  • Custom line types (such as dashed, dotted, ragged, and so on) take up more file space than regular solid lines. Strokes created with the Brush Tool also use more memory than lines created with the Pencil Tool. Artwork created with the Brush Tool is actually a fill not a stroke. The boundary of a fill is more complex than a simple line or stroke.
  • Reduce the number of points and/or lines used to create a shape. In Flash, you can use the Modify➪Optimize command, which joins line segments in a line or shape. Note that you need to ungroup any grouped lines to use this command. The Use Multiple Passes option optimizes the selection to the fullest extent possible.
  • Gradients are more complex than a solid fill for a computer processor to handle. Try to minimize the number of simultaneous gradients shown in any given frame, and avoid any complex animation with gradient shapes or symbols. Gradients add more bytes to a .SWF’s file size than does a solid color. See below for a study of gradient color and .SWF file sizes.
  • Don’t use many different fonts (typefaces) or font styles (such as Oblique, Bold, Condensed, and so on) in your Flash movies. Most elegant designs use complementary typefaces that occur in the same typeface family, or use a balanced and restricted number of sans serif or serif fonts. Font characters can require a lot of file space, from 81 bytes to over 191 bytes per character.
  • Generally, more elaborate serif fonts (such as Garamond) take up more room per character than sans serif fonts (such as Arial). For text fields, make sure that you embed only what is necessary from a font for the given field. For example, if a text field needs to use only lowercase characters of a font for a login or name field, then specify this in the Text Options Panel for that text field. Ultimately, use device fonts (_sans, _serif, and _typewriter) whenever possible, as they do not need their outlines stored in the .SWF file.

  • Keep bitmap or raster images to a minimum. Flash’s strength is its vectorbased technology. Animated bitmap sequences inflate your Flash file sizes. Unless the content you are creating needs to be photorealistic (as in a photographer’s portfolio), don’t use 24-bit color bitmaps.
  • Use alpha effects on symbol instances sparingly with Motion Tweens. Alpha options can be found in the Effect Panel. In a sample three-keyframe Motion Tween, adding an alpha effect to a symbol instance on the start keyframe added 85 bytes to the .SWF file size. Adding another alpha effect to a symbol instance on the end keyframe added 175 bytes to the original alpha-free Motion Tween. Alpha effects can also slow frame rates during complex animated sequences. If you need to fade in or out a symbol, try using the Tint option in the Effect Panel first.
  • Effects of gradient colors on .SWF file size

    Effects of gradient colors on .SWF file size

    Although some of these optimization tips may not seem to have a drastic effect on file size, realize that most Flash movies on the Web don’t just use one or two elements, or one or two Motion Tweens. When you start to compound the file size reductions over several Movie Clips or .SWF files, you’ll find that you can cut many kilobytes from your Flash .SWF files.

Use symbols
Anything in Flash can be turned into a symbol. When the Flash movie is exported as a .SWF file, the symbol’s contents are stored on the first frame that uses that symbol.

Symbol instances are similar to <A HREF> tags in HTML: They link data to a given frame, rather than copying or storing it there. After a symbol’s contents are downloaded to the Flash player, it is easily available for any subsequent reuse in the Flash movie. After you’ve completed a Flash movie, you want to review your Flash production and perform the following optimizations:

  • If any element is used in more than one keyframe or scene, consider making a symbol out of it. Just about every professional Flash designer uses nested symbols: An element is drawn, converted to a symbol, and then used in another symbol such as a Button or Movie Clip. Symbol instances reduce the resource overhead in .SWF files. Unlike grouped shapes, symbols need only refer to the original resource in the .SWF file rather than storing a new resource for every occurrence of it. You can, however, make a grouped shape into a symbol.
  • If you want to use the same shape in a variety of colors, then make that shape a symbol. For each instance of the symbol, use the Effect Panel to change the color.
  • The contents of a symbol are downloaded when the Flash Player encounters the first frame that uses the symbol. Given this, put any heavy symbol (for example, a symbol with bitmaps or sounds) in its own Flash movie, and start preloading the .SWF file near the beginning of the main Flash movie.
  • Avoid using linked symbols from large Shared Library .SWF files. Any Flash movie that links to a Shared Library .SWF file will not start to play until the entire Shared Library .SWF has downloaded.
  • Avoid setting large symbols or assets to be exported as Linked Symbols (to use with attachSound or attachMovie methods) in the movie’s native Library. All Linked Symbols must be downloaded before playback of the .SWF can begin.
  • If you are streaming your Flash movies (and not preloading them), then streaming playback can be interrupted when the playhead reaches a frame with a large symbol. Flash will not play a frame until the entire contents of any symbol on that frame are fully downloaded.

Manage assets in the Flash Library
Bitmaps and sound files that have been imported into Flash automatically become items stored in the Flash Library. As later sections show you, you can specify the sound quality of audio events and streams in the Export Movie or Publish Settings dialog. However, these settings control the audio quality for the entire movie unless a specific encoding scheme is specified for individual sound clips in the Flash Library. Use the Library to assign specific compression methods to any given media element. For audio, Flash’s MP3 encoding provides the best compression-to-quality ratio available. Specify MP3 compression on as many sounds in the Flash Library as possible.


All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Flash Topics