Programming ActionScript 3.0 |
|
|
|
| Filtering display objects > Creating and applying filters > Creating a new filter | |||
To create a new filter object, simply call the constructor method of your selected filter class. For example, to create a new DropShadowFilter object, use the following code:
import flash.filters.DropShadowFilter; var myFilter:DropShadowFilter = new DropShadowFilter();
Although not shown here, the DropShadowFilter() constructor (like all the filter classes' constructors) accepts several optional parameters that can be used to customize the appearance of the filter effect.
|
|
|
|