Flash 8 Documentation |
|||
| ActionScript 2.0 Language Reference > ActionScript classes > BlurFilter (flash.filters.BlurFilter) > quality (BlurFilter.quality property) | |||
public quality : Number
The number of times to perform the blur. Valid values are from 0-15. The default value is 1, which is equivalent to low quality. A value of 2 is medium quality. A value of 3 is high quality and approximates a Gaussian blur.
For most applications, a quality value of 1, 2, or 3 is sufficient. Although you can use additional numeric values up to 15 to increase the number of times the blur is applied, thus getting a more blurred effect, be aware that higher values are rendered more slowly. Instead of increasing the value of quality, you can often get a similar effect, and with faster rendering, by simply increasing the values of blurX and blurY.
Availability: ActionScript 1.0; Flash Player 8
The following example creates a rectangle and applies a blur filter with a quality value of 1 to the rectangle. When you click the rectangle, the quality increases to 3, and the rectangle becomes more blurry.
import flash.filters.BlurFilter;
var mc:MovieClip = createBlurFilterRectangle("BlurFilterQuality");
mc.onRelease = function() {
var filter:BlurFilter = this.filters[0];
filter.quality = 3;
this.filters = new Array(filter);
}
function createBlurFilterRectangle(name:String):MovieClip {
var rect:MovieClip = this.createEmptyMovieClip(name, this.getNextHighestDepth());
var w:Number = 100;
var h:Number = 100;
rect.beginFill(0x003366);
rect.lineTo(w, 0);
rect.lineTo(w, h);
rect.lineTo(0, h);
rect.lineTo(0, 0);
rect._x = 20;
rect._y = 20;
var filter:BlurFilter = new BlurFilter(30, 30, 1);
var filterArray:Array = new Array();
filterArray.push(filter);
rect.filters = filterArray;
return rect;
}
Version 8
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/flash/8/main/00001979.html