Publishing / Optimizing FLA files for SWF Output
Visitors to VTC.com will be able to view all introductory videos for each training course.
Free Trial Members will gain access to first three chapters for each training course.
Full Access Members have full access to VTC.com’s entire library of video tutorials.
Learn More
Subtitles of the Movie
Let's close out this Section of the Tutorial in Publishing with practices for optimizing your Flash files for SWF output. As your document file size increases so does its download time and playback speed. You can take steps to prepare your document for optimal playback. As part of the Publishing process, Flash automatically performs some optimization on documents, so before exporting a document you can optimize it further by using the following strategies to reduce file size. As I covered here earlier, you can also compress SWF files as you publish it. The first tip is to use Symbols, animated or otherwise, for every element that appears more than once in a project. Two, use Tweened animations whenever possible when creating animation sequences. Tweened animations use less file space than a series of Keyframes. Three, use Movie Clips instead of Graphic Symbols for animation sequences. And four, limit the area of change in each Keyframe. Make the action take place in as small an area as possible. Avoid animating Bitmap elements. Instead, use Bitmap images as background or static elements; and finally, use MP3 files, the smallest sound format, whenever possible. My next tip is to Optimize Elements and Lines. Do this by Grouping elements. Use Layers to separate elements that change during the animation from elements that do not. Use the Modify Shape Optimize to minimize the number of separate lines that are used to describe shapes, and lastly, limit the number of special line types, such as Dashed, Dotted, Ragged, and so on. Solid lines require less memory. Lines created with the Pencil Tool require less memory than Brush Strokes. My next tip is to optimize Text and Fonts. Limit the number of Fonts and Font Styles. Use Embedded Fonts sparingly because they increase file size. For Embedded Font options select only the characters needed instead of including the entire Font Set. The next tip is to optimize colors. Use the Color Menu in the Symbol Property Inspector to create many instances of this single Symbol in different colors. Use the Color Panel to match the Color Palette of the document to a browser-specific palette. Also, use Gradients sparingly. Filling an area with Gradient color requires about 50 bytes more than filling it with a solid color. And lastly, use Alpha Transparency sparingly because it can really slow playback. My next set of tips relate to speeding up document display. To speed up the document display use commands in the View Menu to turn off Rendering Quality features that require extra computing, and slow down document display. None of these commands here have any effect on how Flash exports a document. To specify the display quality of Flash documents in a Web Browser use the Object and Embed parameters. The Publish Command can do this for you automatically. To set up your Document Display options, select View, Preview Mode and then there are some options here: Outlines, Fast, Antialias, Antialias Text, and Full. Let me review these for you now. The Outlines option displays only the outlines of the shapes in your scene and causes all lines to appear as thin lines. This makes it easier to reshape your graphic elements and to display complex scenes quickly. Fast turns off Antialiasing and displays all the colors and line styles of your drawing. The Antialias setting turns on Antialiasing for lines, shapes, and bitmaps, and displays shapes and lines so that their edges appear smoother on the screen. With this option, Flash draws objects more slowly than the Fast option. Antialiasing works best on video cards that provide thousands, which is 16-bit, or millions, which is 24-bit of colors in 16, or 256 color mode, black lines are smooth but colors might look better in Fast mode. The next option, Antialias Text smoothes the edges of any text. This works best with large Font sizes, and can be slow with large amounts of text. This is the most common mode in which to work. Full renders all content on the Stage fully, although this might slow down your display. My next set of tips revolve around optimizing graphics and animation. Avoid using Gradients because they require many colors and calculations to be processed which is always more difficult for a computer processor to render. For the same reason, keep the amount of Alpha or Transparency that you use in an SWF file to a minimum. Animating objects that include transparency is a processor-intensive process and should be kept to a minimum. Animating transparent graphics over bitmaps is particularly processor-intensive, and must be kept to a minimum or avoided completely. Next, optimize Bitmaps before bringing them into Flash. This is a deep topic, beyond the scope of this movie. You'll want to see my various VTC Tutorials covering Fireworks, which is a tool designed for just this work. The best Bitmap format to import into Flash is the PNG or PNG file format, which is the native file format of Fireworks. PNG files have RGB and Alpha information stored for each pixel. If you import a Fireworks PNG file into Flash you can retain some ability to edit the graphic objects right there in the FLA file. Next, be sure to optimize Bitmaps without over-compressing them. A 72 dpi resolution is optimal for the Web. Compressing a Bitmap image reduces file size, but compressing it too much compromises the quality of the graphic. Check that the settings for the JPEG Quality in the Publish Settings dialog box do not over-compress your image. Next, test your animations at different Frame Rates to find the lowest Frame Rate possible. Frame Rate can affect the performance of your SWF file and the computer that plays it. Setting Frame Rate too high can lead to processor problems, especially when you use many assets, or use ActionScript to create animation. However, you also need to consider the Frame Rate setting because it affects how smoothly your animation plays. Next, watch your Filters. If you use too many Filters in an application you can use large amounts of memory and cause the Flash Player performance to suffer. There are many other techniques for improving your SWF file performance Ð too numerous to include here Ð but be sure to check other topics in Flash Help including: how to use Bitmap caching to improve SWF file performance; using Runtime Shared Libraries; working with Components, and also check out the section entitled Tips for Creating Content for Mobile Devices. That, then, will wrap up this Section of the Tutorial on Publishing. In this Section you've learned about Publishing Profiles and File Types, how to publish to HTML. You've learned all about the SWF and HTML Publish Settings; you've learned how to create Projectors and Adobe AIR files, and you got some tips in this movie for optimizing FLA files for SWF output.
Tutorial Information
| Course: | Adobe Flash CS4 |
| Author: | James Gonzalez |
| SKU: | 33981 |
| ISBN: | 1-935320-37-8 |
| Release Date: | 2009-04-19 |
| Duration: | 11 hrs / 126 lessons |
| Work Files: |
Yes |
| Captions: | Available on CD and Online University |
| Compatibility: |
Vista/XP/2000, OS X, Linux QuickTime 7, Flash 8 |
VTC Sign up & Benefits
- Unlimited Access
- 98,729 Video Tutorials (23,265 free)
- Video Available as Flash or QuickTime
- Over 1026 Courses
- $30 for One Month Access
- Multi-User Discounts Available
United States 