Animation, Filters, and Drawings

This chapter describes how to add animation to your Flash CS3 Professional applications using ActionScript instead of (or in addition to) timeline-based animations that use motion or shape tweens. Using code to create animation and effects often reduces the file size of your finished application, and can also improve the performance and consistency of the animation itself. At times, ActionScript-based animations might even reduce your workload: code can be faster to write, and it's easy to apply to many instances at once or reuse in other applications. This chapter also shows you how to animate by using fundamental ActionScript basics, the Tween and TransitionManager classes, the Drawing API, filter classes, and blend modes.

You can use the Drawing API, which consists of the drawing methods in the MovieClip class, to add animation and draw. These methods let you use code to create lines, fills, and shapes, instead of using the drawing tools in the authoring tool.

Filters and other expressive effects are also important in many Flash applications, to quickly apply an effect and animate it. You can use code to add and animate filter effects, blend modes, and bitmap images.

This chapter contains the following sections, which describe using ActionScript to create animation and add effects, as well as using the Drawing API to draw in ActionScript:

Scripting animation with ActionScript 2.0

About bitmap caching, scrolling, and performance

About the Tween and TransitionManager classes

Using filter effects

Working with filters using ActionScript

Manipulating filter effects with code

Creating bitmaps with the BitmapData class

About blending modes

About operation order

Drawing with ActionScript

Understanding scaling and slice guides