With ActionScript 3.0, you can easily apply one or a combination of preset graphical styles to any display object. Perhaps you'd like to blur an image, create a beveled edge, or add a glow to a
Sprite, or maybe you want to distort an image. Like bitmap image-editing programs such as Photoshop, these treatments are made available as filters. In the Flash Player API, subclasses of the
flash.filters.BitmapFilter class represent filters you can use to style display objects at runtime.
Filters are built-in effects you can apply to any
TextField. All the filters discussed in this chapter are built into the Flash Player runtime, which makes them fast to render. Under the hood, when you apply a filter to a
DisplayObject, Flash Player renders the display object as a bitmap and applies the filter to the bitmap to produce the desired graphical effect. Any time you apply a filter to a
cacheAsBitmap property is set to
The filters available in Flash Player 9 and later are as follows:
Flash Player 10 adds the
ShaderFilter, enabling you to use Pixel Bender shaders easily on display objects with the same interface as any of the built-in filters. You'll learn about Pixel Bender shaders in Chapter ...