EasyManua.ls Logo

MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE - Page 298

MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
1378 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
298 ActionScript classes
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
Number - A number that indicates whether the filter was applied successfully. If 0 is returned,
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), BlurFilter
(flash.filters.BlurFilter)
, ColorMatrixFilter
(flash.filters.ColorMatrixFilter)
, ConvolutionFilter
(flash.filters.ConvolutionFilter)
, DisplacementMapFilter
(flash.filters.DisplacementMapFilter)
, DropShadowFilter
(flash.filters.DropShadowFilter)
, GlowFilter (flash.filters.GlowFilter),
filters (MovieClip.filters property)

Table of Contents

Related product manuals