MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference page 298

Actionscript 2.0 language reference
Table of Contents

Advertisement

ColorMatrixFilter — This filter can use source and destination images that are either
opaque or transparent.
DisplacementMapFilter — This filter can use source and destination images that are
either opaque or transparent, but the source and destination image formats must be the
same.
Returns
- A number that indicates whether the filter was applied successfully. If 0 is returned,
Number
the filter was applied successfully. If a negative number is returned, an error occurred during
the application of the filter.
Example
The following example shows how to apply a bevel filter to a BitmapData instance:
import flash.display.BitmapData;
import flash.filters.BevelFilter;
import flash.geom.Point;
var myBitmapData:BitmapData = new BitmapData(100, 80, true, 0xCCCCCCCC);
var mc:MovieClip = this.createEmptyMovieClip("mc",
this.getNextHighestDepth());
mc.attachBitmap(myBitmapData, this.getNextHighestDepth());
var filter:BevelFilter = new BevelFilter(5, 45, 0xFFFF00, .8, 0x0000FF, .8,
20, 20, 1, 3, "inner", false);
mc.onPress = function() {
myBitmapData.applyFilter(myBitmapData, myBitmapData.rectangle, new
Point(0, 0), filter);
}
See also
BevelFilter (flash.filters.BevelFilter)
(flash.filters.BlurFilter)
(flash.filters.ColorMatrixFilter)
(flash.filters.ConvolutionFilter)
(flash.filters.DisplacementMapFilter)
(flash.filters.DropShadowFilter)
filters (MovieClip.filters property)
298
ActionScript classes
,
BlurFilter
,
ColorMatrixFilter
,
ConvolutionFilter
,
DisplacementMapFilter
,
DropShadowFilter
,
GlowFilter (flash.filters.GlowFilter)
,

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?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash 8

Table of Contents

Save PDF