MACROMEDIA FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH Manual page 503

Learning actionscript 2.0 in flash
Table of Contents

Advertisement

For an example of using ActionScript to apply filters, you can find a sample source file,
Filters.fla, in the Samples folder on your hard disk.
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and
Tutorials\Samples\ActionScript\Filters.
On the Macintosh, browse to Macintosh HD/Applications/Macromedia Flash 8/Samples
and Tutorials/Samples/ActionScript/Filters.
About hit detection, rotating, skewing, and
scaling filters
No filtered region (drop shadow, for example) outside of a movie clip instance's bounding box
rectangle is considered to be part of the surface for hit detection purposes (determining if an
instance overlaps or intersects with another instance). Because hit detection is vector-based,
you cannot perform a hit detection on the bitmap result. For example, if you apply a bevel
filter to a button instance, hit detection is not available on the beveled portion of the instance.
Scaling, rotating, and skewing are not supported by filters; if the instance itself is scaled
(
and
_xscale
_yscale
means that the original shape of the instance rotates, scales, or skews; however, the filter does
not rotate, scale, or skew with the instance.
You can animate an instance with a filter to create realistic effects, or nest instances and use
the BitmapData class to animate filters to achieve this effect.
Applying filters to object instances and BitmapData
instances
The use of filters depends on the object instance to which you apply the filter. Use the
following guidelines when you apply a filter to an object or BitmapData instance:
To apply filters to movie clips, text fields, and buttons at runtime, use the
property. Setting the
undone by clearing the
To apply filters to BitmapData instances, use the
Calling
applyFilter()
cannot be undone.
(Flash Professional 8 only) You can also apply filter effects to images and video
during authoring using the Filters tab in the Property inspector.
are not 100%), the filter effect does not scale with the instance. This
property of an object does not modify the object and can be
filters
property.
filters
on a BitmapData object modifies that BitmapData object and
BitmapData.applyFilter()
Using filter effects
filters
method.
503

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash 8

Table of Contents