Basics of filtering display objects

Introduction to filtering display objects

One of the ways to add polish to an application is to add simple graphic effects, such as a drop shadow behind a photo to create the illusion of 3-d, or a glow around a button to show that it is active. ActionScript 3.0 includes nine filters that you can apply to any display object or to a BitmapData instance. These range from basic filters, such as the drop shadow and glow filters, to complex filters for creating various effects, such as the displacement map filter and the convolution filter.

Common filtering tasks

The following tasks are things you'll likely want to accomplish using filters in ActionScript:

Important concepts and terms

The following reference list contains important terms that you will encounter in this chapter:

Working through in-chapter examples

While you're working through the chapter, you may want to test the example code listings that are provided. Because this chapter deals with creating and manipulating visual content, testing the code involves running the code and viewing the results in the SWF that's created. Nearly all the examples either create content using the drawing API or load images to which filters are applied.

To test the code in this chapter:

  1. Create an empty Flash document.
  2. Select a keyframe in the Timeline.
  3. Open the Actions panel and copy the code into the Script pane.
  4. Run the program using Control > Test Movie.

    You see the results of the code in the SWF file that's created.

Nearly all the example code includes code that creates a bitmap image, so you can just test the code directly without needing to provide any bitmap content. Alternatively you can change the code listings to load your own images and use those in place of the ones in the examples.


Flash CS3


 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/flash/9.0/main/00000191.html