Adobe Flex 3 Help

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:

  • Creating a filter
  • Applying a filter to a display object
  • Removing a filter from a display object
  • Applying a filter to the image data in a BitmapData instance
  • Removing filters from an object
  • Creating various filter effects, such as glow, blur, drop shadow, sharpness, displacement, edge detection, embossing, and other effects

Important concepts and terms

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

  • Bevel: An edge created by lightening pixels on two sides and darkening pixels on the opposite two sides, creating a three-dimensional border effect commonly used for raised or indented buttons and similar graphics.
  • Convolution: Distorting pixels in an image by combining each pixel's value with the values of some or all of its neighboring pixels, using various ratios.
  • Displacement: Shifting or moving pixels in an image to a new position.
  • Matrix: A grid of numbers used to perform certain mathematical calculations by applying the numbers in the grid to various values, then combining the results.