Showcase and discover digital art at yex

Follow Design Stacks

Subscribe to our free newsletter to get all our latest tutorials and articles delivered directly to your inbox!

Using Bitmap Caching in Flash

Using Bitmap Caching in Flash

As most of you know, Flash began as a tool for creating vector animations on the web. Flash Player was designed specifically as a lightweight animation viewer to display moving vector objects, which are, in their simplest form, mathematical equations that describe complex shapes made up of points, lines, curves, and fills.

However, today, developers and designers use Flash to do a lot more than just animation; today, we use Flash for everything from interactive banner ads to games and large applications with complex user interfaces. We are now pushing Flash to its limits, and our frame rates are starting to suffer as we develop content that is more application-centric.

Previous versions of Flash Player showed some obvious performance limitations. The vector renderer inside the player generally coughed and spluttered when it attempted to play Flash applications with a lot of objects on the Stage. This is because the player was not optimized to deal with large amounts of static content. By design, on each frame, Flash Player 7 and previous versions had to update and redraw all the vector objects on the Stage, even if they had not changed. This was an intensive and unnecessary process.

Flash Player 8 addresses these visual performance issues with various improvements and optimizations to the renderer. There are also various new performance-enhancing authoring features in Flash Professional 8, which developers can use to take advantage of these significant changes.

This article will show you how to effectively use these new performance-related features to increase the frame rates of your Flash applications.

Requirements

To complete this tutorial you will need to install the following software and files:

Flash Player

Flash Professional 8

Prerequisite Knowledge

An intermediate to advanced familiarity with ActionScript and Flash Player functionality is required.

Bitmap Caching

One of the most significant additions to Flash Player 8 has to be bitmap caching. This feature gives developers that are experiencing poor frame rates the power to greatly increase the speed at which large amounts of objects are updated and drawn onto the Stage by the renderer. The renderer is a very important part of Flash Player; it is responsible for everything that you see when you view a Flash application, as it draws all the vector and bitmap data onto the Stage. On each frame, the renderer has to update the Stage and the various objects it contains to reflect any changes that have occurred since the last frame. This process can become quite intensive when the application updates a large amount of information on any given frame. Using this feature gives the developer some control over the amount of work that the renderer has to perform in each frameā€”the less work you give the renderer, the faster and smoother your Flash application will run.

Comments