Game Development Reference
In-Depth Information
Here is a list of the ones available to us:
Filter Class Description
BevelFilter The BevelFilter class lets you add a bevel effect.
BlurFilter The BlurFilter class lets you apply a blur visual effect.
ColorMatrixFilter The ColorMatrixFilter class lets you apply a 4 x 5 matrix
transformation on the RGBA color and alpha values of every
pixel in the input image to produce a result with a new set of
RGBA color and alpha values.
ConvolutionFilter The ConvolutionFilter class applies a matrix convolution
filter effect.
DisplacementFilter The DisplacementMapFilter class uses the pixel values
from the specified BitmapData object (called the displacement
map image) to perform a displacement of an object.
DropShadowFilter The DropShadowFilter class lets you add a drop shadow
to display objects.
GlowFilter The GlowFilter class lets you apply a glow effect.
GradientBevelFilter The GradientBevelFilter class lets you apply a gradient
bevel effect.
GradientGlowFilter
The GradientGlowFilter class lets you apply a gradient
glow effect.
Modifying the filters of a display object or sprite is a three-step process:
1. Assign the sprite's filter to a temporary array.
2. Modify the temporary array the way you want, either remove an existing
filter or add an additional filter.
3. Assign the temporary filter back to the sprite's filter property, assuming that
m_filter was defined as follows:
private var m_filter:DropShadowFilter = new DropShadowFilter();
The following is the code to add a filter to the sprite m_sprite :
var filters:Array;
filters = m_sprite.filters;
filters.push(m_filter);
m_sprite.filters = filters;
Search WWH ::




Custom Search