Adobe
Products
Acrobat
Creative Cloud
Creative Suite
Digital Marketing Suite
Digital Publishing Suite
Elements
Photoshop
Touch Apps
Student and Teacher Editions
More products
Solutions
Creative tools for business
Digital marketing
Digital media
Education
Financial services
Government
Web Experience Management
More solutions
Learning Help Downloads Company
Buy
Home use for personal and home office
Education for students, educators, and staff
Business for small and medium businesses
Licensing programs for businesses, schools, and government
Special offers
Search
 
Info Sign in
Welcome,
My cart
My orders My Adobe
My Adobe
My orders
My information
My preferences
My products and services
Sign out
Why sign in? Sign in to manage your account and access trial downloads, product extensions, community areas, and more.
Adobe
Products Sections Buy   Search  
Solutions Company
Help Learning
Sign in Sign out My orders My Adobe
Preorder Estimated Availability Date. Your credit card will not be charged until the product is shipped. Estimated availability date is subject to change. Preorder Estimated Availability Date. Your credit card will not be charged until the product is ready to download. Estimated availability date is subject to change.
Qty:
Purchase requires verification of academic eligibility
Subtotal
Review and Checkout
Adobe Developer Connection / Flash Developer Center /

Avoiding performance issues in Flash

by Tommi West

Tommi West
  • tommiland.com

Content

  • Adjusting the fps setting to improve the way a project plays back
  • Animating objects with graphic effects, blend modes, and filters
  • Overlapping animations on the Stage
  • Using masks and bitmap fills
  • Applying gradient fills to vector graphics
  • Creating frame-by-frame animations
  • Forgetting to convert artwork to symbols
  • Where to go from here

Created

16 January 2012

Page tools

Share on Facebook
Share on Twitter
Share on LinkedIn
Bookmark
Print
best practice Flash Professional performance

Requirements

Prerequisite knowledge

Previous experience working with Flash Professional is recommended. Refer to Avoiding common authoring mistakes to find links to other articles in this series.

User level

All

Required products

  • Flash Professional (Download trial)

Use the strategies described in this article to ensure that your Adobe Flash Professional projects play back smoothly and download quickly. Even the best designs and content cannot compensate for an application that is slow to load and seems unresponsive. Follow these suggestions to optimize your projects so that they provide a good user experience.

Adjusting the fps setting to improve the way a project plays back

By default, Flash projects are set to play at 24 fps. However, depending on the project, you may find that the content is displayed acceptably at a slower rate. Try adjusting the fps settings and testing the movie repeatedly to discover the lowest acceptable frame rate.

If your application is mostly a static UI that includes an occasional animation, you can use ActionScript to programmatically change the frame rate of the project at runtime.

Animating objects with graphic effects, blend modes, and filters

Whenever possible, avoid applying filters, effects, and blend modes to objects on the Stage in Flash and then animating those objects. Applying drop shadows, glows, blend modes, and other special effects cause Flash Player to perform more calculations, resulting in increased usage of system resources. When these elements are then animated, it causes the calculations to become even more processing-intensive.

Instead of applying effects, blend modes, and filters to objects in Flash, use an image-editing program (such as Adobe Fireworks, Adobe Photoshop, or Adobe Illustrator) to prepare image files. Add any special graphic effects to the bitmap graphics, optimize, and then export the PNG, JPEG, or GIF files at the same dimensions you'll use them in the Flash project. Import the prepared images into Flash and then convert the bitmap graphics to symbols before animating them.

Overlapping animations on the Stage

When there is a section of the Stage that contains animation, this section is known as the redraw area. For example, if most of the Stage is static but there's a bouncing ball in the lower left corner, Flash Player only has to update that area of the Stage and the animation is fairly easy to process.

However, if there are four bouncing balls, and the path of the balls occasionally overlaps in the center of the Stage, it means that almost the entire Stage is the redraw area. This is more resource-intensive for Flash Player to render and can cause the movie to play back less smoothly—especially if the objects being animated are complex or nonoptimized bitmap graphics.

Whenever possible, keep the animations separated to reduce the redraw area that Flash Player will update, rather than allowing multiple animations to intersect during playback.

Using masks and bitmap fills

Flash Professional includes many features that help you achieve dramatic image effects, including masking images (so that only a portion of the image shows through) or applying a bitmap fill (so that the fill area of a vector shape uses the pixel data of a specified bitmap image). In both these cases, parts of the bitmap image are not visible. Even though portions of the bitmap images are hidden, these areas of pixels are still contributing to the overall file size of the published SWF file.

In some cases, masking techniques are necessary to animate a specific effect. But in most situations, the same graphic effects conveyed by masking and applying bitmap fills could also be achieved by using an image editing program to prepare the image files, optimize them, apply transparency settings, and export the files in the PNG format. Then, the flat PNG image file can be imported into Flash.

Whenever possible, try to prepare the graphics ahead of time and then bring them into Flash, rather than importing the full-size bitmaps into Flash and only displaying a smaller portion of the bitmap image.

Applying gradient fills to vector graphics

In general, vector artwork can be less resource-intensive to be displayed in Flash than bitmap graphics. However, if you use gradient fills for shapes, the system resources needed to display (and especially animate) the vector artwork increase.

Use an image-editing program to prepare a PNG or JPEG graphic with the gradient effect. Optimize and export the file. Import the bitmap into Flash and compare the performance and file size difference with a version of the project using vector artwork with gradient fills. Choose the configuration that results in the best quality and the lowest file size possible to improve performance of applications and animations.

Creating frame-by-frame animations

Frame-by-frame animations are not tweened. Instead, every frame in the Timeline contains a keyframe that contains new shapes or artwork that defines that particular frame of visual information. Tweened animations only require artwork in the beginning and end points, because Flash interpolates the changes based on the first and last keyframes and generates the frames in between.

Since frame-by-frame animations require new keyframes and new unique content on each frame in the Timeline that contains changes to the animation, this combined set of assets is much larger than the file size of a single symbol. Additionally, the numerous keyframes cause Flash Player to completely redraw each frame with the new content, rather than programmatically calculating and displaying the movement of a motion tween or shape tween.

Avoid creating frame-by-frame animations whenever possible to decrease the file size of projects and improve performance during playback. If necessary, you can alternate between using tween animations and smaller frame-by-frame animation sequences to minimize the processing and reduce the project's file size as much as possible.

Forgetting to convert artwork to symbols

Always create symbols when working with objects on the Stage. If you create motion tweens, Flash automatically reminds you to convert objects to symbols. However, you should strive to convert all project assets into symbols, even if they are not animated.

Flash excels at animation specifically because it uses a single symbol as a reference and then uses multiple symbol instances throughout the project (rather than duplicating reused objects multiple times). Any object on the Stage can be converted to a symbol, and should be, even if the object doesn't move and is not a button.For example, you can drag an instance of a symbol to use as a background image for the project, rather than using a bitmap file.

Take advantage of the built-in optimization that Flash offers. Always convert bitmaps and vector artwork to symbols and name them descriptively to keep them organized. As an added bonus, symbols make it much easier to update the project later, because if the client decides that the flowers should be orange, not blue, you can open a single symbol and edit it to update all of the instances in the project that are associated with that symbol.

To learn more about using symbols, read Working with symbol instances in the Flash Professional online documentation.

Where to go from here

Be sure to prepare sound, graphics, and video files prior to importing them into Flash. Always strive to find the best balance of visual and audio quality with the lowest file size of the published SWF file. To get more suggestions and learn best practices for optimizing your Flash projects, see the following:

  • Optimizing FLA files for SWF output (Flash documentation)
  • Tips for using Flash efficiently
  • Improving Flash Player performance

Refer to Avoiding common authoring mistakes to find links to other articles in this series.

Creative Commons License
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License

More Like This

  • Optimizing content for Apple iOS devices
  • Creating ActionScript 3.0 components in Flash – Part 6: Invalidation model
  • Creating ActionScript 3.0 components in Flash – Part 7: Focus management
  • Creating ActionScript 3.0 components in Flash – Part 8: Keyboard support
  • Common mistakes working with fonts and text objects in Flash
  • Avoiding common Timeline errors in Flash
  • Image rasterization in Flash Professional
  • Creating ActionScript 3.0 components in Flash – Part 1: Introducing components
  • Guide for Apple App Store submissions
  • Tips for using Flash efficiently

Flash User Forum

More
04/23/2012 Auto-Save and Auto-Recovery
04/23/2012 Open hyperlinks in new window/tab/pop-up ?
04/21/2012 PNG transparencies glitched
04/01/2010 Workaround for JSFL shape selection bug?

Flash Cookbooks

More
02/13/2012 Randomize an array
02/11/2012 How to create a Facebook fan page with Flash
02/08/2012 Digital Clock
01/18/2012 Recording webcam video & audio in a flv file on local drive

Products

  • Acrobat
  • Creative Cloud
  • Creative Suite
  • Digital Marketing Suite
  • Digital Publishing Suite
  • Elements
  • Mobile Apps
  • Photoshop
  • Touch Apps
  • Student and Teacher Editions

Solutions

  • Digital marketing
  • Digital media
  • Web Experience Management

Industries

  • Education
  • Financial services
  • Government

Help

  • Product help centers
  • Orders and returns
  • Downloading and installing
  • My Adobe

Learning

  • Adobe Developer Connection
  • Adobe TV
  • Training and certification
  • Forums
  • Design Center

Ways to buy

  • For personal and home office
  • For students, educators, and staff
  • For small and medium businesses
  • For businesses, schools, and government
  • Special offers

Downloads

  • Adobe Reader
  • Adobe Flash Player
  • Adobe AIR
  • Adobe Shockwave Player

Company

  • News room
  • Partner programs
  • Corporate social responsibility
  • Career opportunities
  • Investor Relations
  • Events
  • Legal
  • Security
  • Contact Adobe
Choose your region United States (Change)
Choose your region Close

North America

Europe, Middle East and Africa

Asia Pacific

  • Canada - English
  • Canada - Français
  • Latinoamérica
  • México
  • United States

South America

  • Brasil
  • Africa - English
  • Österreich - Deutsch
  • Belgium - English
  • Belgique - Français
  • België - Nederlands
  • България
  • Hrvatska
  • Česká republika
  • Danmark
  • Eastern Europe - English
  • Eesti
  • Suomi
  • France
  • Deutschland
  • Magyarország
  • Ireland
  • Israel - English
  • ישראל - עברית
  • Italia
  • Latvija
  • Lietuva
  • Luxembourg - Deutsch
  • Luxembourg - English
  • Luxembourg - Français
  • الشرق الأوسط وشمال أفريقيا - اللغة العربية
  • Middle East and North Africa - English
  • Moyen-Orient et Afrique du Nord - Français
  • Nederland
  • Norge
  • Polska
  • Portugal
  • România
  • Россия
  • Srbija
  • Slovensko
  • Slovenija
  • España
  • Sverige
  • Schweiz - Deutsch
  • Suisse - Français
  • Svizzera - Italiano
  • Türkiye
  • Україна
  • United Kingdom
  • Australia
  • 中国
  • 中國香港特別行政區
  • Hong Kong S.A.R. of China
  • India - English
  • 日本
  • 한국
  • New Zealand
  • 台灣

Southeast Asia

  • Includes Indonesia, Malaysia, Philippines, Singapore, Thailand, and Vietnam - English

Copyright © 2012 Adobe Systems Incorporated. All rights reserved.

Terms of Use | Privacy Policy and Cookies (Updated)

Ad Choices

Reviewed by TRUSTe: site privacy statement