EasyManua.ls Logo

MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE - Quality (Blurfilter.quality Property)

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...
340 ActionScript classes
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
Example
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;
}

Table of Contents

Related product manuals