User Guide

858 ActionScript classes
square_mc.lineTo(10, 10);
square_mc.endFill();
The MovieClip.getNextHighestDepth() method used in this example requires Flash Player
7 or later. If your SWF file includes a version 2 component, use the version 2 components
DepthManager class instead of the
MovieClip.getNextHighestDepth() method.
An example is also in the drawingapi.fla file in the Samples\ActionScript\DrawingAPI. The
following list gives typical paths to this folder:
Windows: \Program Files\Macromedia\Flash 8\Samples and Tutorials\Samples\
Macintosh: HD/Applications/Macromedia Flash 8/Samples and Tutorials/Samples/
See also
beginFill (MovieClip.beginFill method), beginGradientFill
(MovieClip.beginGradientFill method)
, moveTo (MovieClip.moveTo method)
filters (MovieClip.filters property)
public filters : Array
An indexed array containing each filter object currently associated with the movie clip. The
flash.filters package contains several classes that define specific filters you can use.
Filters can be applied in the Flash authoring tool at design-time, or at runtime using
ActionScript code. To apply a filter using ActionScript, you must make a temporary copy of
the entire
MovieClip.filters array, modify the temporary array, and then assign the value
of the temporary array back to the
MovieClip.filters array. You cannot directly add a new
filter object to the
MovieClip.filters array. The following code has no effect on the target
movie clip, named
myMC:
myMC.filters[0].push(myDropShadow);
To add a filter using ActionScript, you must follow the following steps (assume that the target
movie clip is named myMC):
Create a new filter object using the constructor function of your chosen filter class.
Assign the value of the myMC.filters array to a temporary array, such as one named
myFilters.
Add the new filter object to the temporary array, myFilters.
Assign the value of the temporary array to the myMC.filters array.