User Guide
ConvolutionFilter (flash.filters.ConvolutionFilter) 461
myBitmapData.noise(128, 0, 255, 1 | 2 | 4 | 8, false);
mc.onPress = function() {
myBitmapData.applyFilter(myBitmapData, new Rectangle(0, 0, 98, 78), new
Point(2, 2), filter);
}
bias (ConvolutionFilter.bias property)
public bias : Number
Bias to add to the result of the matrix transformation. The default is 0.
Availability: ActionScript 1.0; Flash Player 8
Example
The following example changes the
bias property of filter from its default value of 0 to 50.
import flash.filters.ConvolutionFilter;
import flash.display.BitmapData;
var bias:Number = 50;
var filter:ConvolutionFilter = new ConvolutionFilter(3, 3, [1, 1, 1, 1, 1,
1, 1, 1, 1], 9, bias);
var myBitmapData:BitmapData = new BitmapData(100, 80, false, 0x00FF0000);
var mc:MovieClip = this.createEmptyMovieClip("mc",
this.getNextHighestDepth());
mc.attachBitmap(myBitmapData, this.getNextHighestDepth());
myBitmapData.noise(128);
mc.onPress = function() {
myBitmapData.applyFilter(myBitmapData, myBitmapData.rectangle, new
Point(0, 0), filter);
}
clamp (ConvolutionFilter.clamp property)
public clamp : Boolean
Indicates whether the image should be clamped. For pixels that are off the source image, a
value of
true indicates that the input image is extended along each of its borders as necessary
by duplicating the color values at the given edge of the input image. A value of
false
indicates that another color should be used, as specified in the
color and alpha properties.
The default is
true.
Availability: ActionScript 1.0; Flash Player 8