Bias (Convolutionfilter.bias Property); Clamp (Convolutionfilter.clamp Property) - MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference

Actionscript 2.0 language reference
Table of Contents

Advertisement

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
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
indicates that the input image is extended along each of its borders as necessary
true
by duplicating the color values at the given edge of the input image. A value of
indicates that another color should be used, as specified in the
The default is
.
true
Availability: ActionScript 1.0; Flash Player 8
property of
bias
filter
ConvolutionFilter (flash.filters.ConvolutionFilter)
from its default value of 0 to 50.
false
and
properties.
color
alpha
461

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