Chapter 14. Applying Filter Effects
Filters in Flash are similar to the layer styles found in popular image editing programs. Filters allow for glow, shadow, bevel effects, and more! These effects are new in Flash 8. Previous versions of Flash allowed rudimentary effects using vector graphics libraries, which were both difficult to manage and processor intensive. With Flash 8 filters, you have the advantage of built-in pixel-level manipulation of objects as bitmaps, which means fast and easy filter manipulation of any movieClip or Bitmap object.
The filters are applied easily by declaring the filters
property of a movie clip. When the movie clip changes, the filters
property is checked and the filter is applied. You can apply multiple filters to the same object. You also can apply multiple versions of the same filter to the same object. This gives you unparalleled control of filter effects at runtime using ActionScript.
Filters are exceptionally easy in Flash. You can stipulate all the properties within each new filter constructor or set them individually. This enables you to reuse an existing filter rather than instantiating a new filter object. Each time you modify a filter, you must reapply it to your target movie clip using the filters property of the movie clip.
Although you can set the properties of a filter via the new constructor, it is far more readable, and easier to scan, when a property declaration list is used. This is especially helpful for group development, particularly ...
Get Beginning ActionScript 2.0 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.