User Guide
GlowFilter (flash.filters.GlowFilter) 607
inner:Boolean [optional] - Specifies whether the glow is an inner glow. The value true
indicates an inner glow. The default is
false, an outer glow (a glow around the outer edges of
the object).
knockout:Boolean [optional] - Specifies whether the object has a knockout effect. The value
true makes the object's fill transparent and reveals the background color of the document.
The default is
false (no knockout effect).
Example
The following example instantiates a new GlowFilter instance and applies it to a flat,
rectangular shape.
import flash.filters.GlowFilter;
var rect:MovieClip = createRectangle(100, 100, 0x003366,
"gradientGlowFilterExample");
var color:Number = 0x33CCFF;
var alpha:Number = .8;
var blurX:Number = 35;
var blurY:Number = 35;
var strength:Number = 2;
var quality:Number = 3;
var inner:Boolean = false;
var knockout:Boolean = false;
var filter:GlowFilter = new GlowFilter(color,
alpha,
blurX,
blurY,
strength,
quality,
inner,
knockout);
var filterArray:Array = new Array();
filterArray.push(filter);
rect.filters = filterArray;
function createRectangle(w:Number, h:Number, bgColor:Number,
name:String):MovieClip {
var mc:MovieClip = this.createEmptyMovieClip(name,
this.getNextHighestDepth());
mc.beginFill(bgColor);
mc.lineTo(w, 0);
mc.lineTo(w, h);
mc.lineTo(0, h);
mc.lineTo(0, 0);
mc._x = 20;