MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference page 859

Actionscript 2.0 language reference
Table of Contents

Advertisement

If the
array is empty, you need not use a temporary array. Instead, you can directly
filters
assign an array literal that contains one or more filter objects that you created.
To modify an existing filter object, whether it was created at design-time or at runtime, you
must use the technique of modifying a copy of the
Assign the value of the
.
myFilters
Modify the property using the temporary array,
set the quality property of the first filter in the array, you could use the following code:
myList[0].quality = 1;
Assign the value of the temporary array to the
To clear the filters for a movie clip, set
At load time, if a movie clip has an associated filter, it is marked to cache itself as a transparent
bitmap. From this point forward, as long as the movie clip has a valid filter list, the player
caches the movie clip as a bitmap. This source bitmap is used as a source image for the filter
effects. Each movie clip usually has two bitmaps: one with the original unfiltered source
movie clip and another for the final image after filtering. The final image is used when
rendering. As long as the movie clip does not change, the final image does not need updating.
If you are working with a
the type of filter assigned to each array index, you can maintain your own
use a separate data structure to track the type of filter associated with each array index. There
is no simple way to determine the type of filter associated with each
Availability: ActionScript 1.0; Flash Player 8
Example
The following example adds a drop shadow filter to a movie clip named
var myDropFilter = new flash.filters.DropShadowFilter();
var myFilters:Array = myMC.filters;
myFilters.push(myDropFilter);
myMC.filters = myFilters;
The following example changes the
example works only if at least one filter object has been associated with the
var myList:Array = myMC.filters;
myList[0].quality = 15;
myMC.filters = myList;
See also
array to a temporary array, such as one named
myMC.filters
filters
array that contains multiple filters and you need to track
filters
setting of the first filter in the array to 15 (this
quality
array:
filters
. For example, if you want to
myFilters
array.
myMC.filters
to an empty array (
[]
filters
).
array and
filters
array index.
:
myMC
movie clip):
myMC
MovieClip
859

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?

This manual is also suitable for:

Flash 8

Table of Contents

Save PDF