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;
mc._y = 20;
return mc;
}
knockout (GradientGlowFilter.knockout property)
public knockout : Boolean
Specifies whether the object has a knockout effect. A knockout effect makes the object's fill
transparent and reveals the background color of the document. The value
knockout effect; the default is
Availability: ActionScript 1.0; Flash Player 8
Example
The following example changes the
clicks it.
import flash.filters.GradientGlowFilter;
var mc:MovieClip = createGradientGlowRectangle("GlowKnockout");
mc.onRelease = function() {
var filter:GradientGlowFilter = this.filters[0];
filter.knockout = true;
this.filters = new Array(filter);
}
function createGradientGlowRectangle(name:String):MovieClip {
var art:MovieClip = this.createEmptyMovieClip(name,
this.getNextHighestDepth());
var w:Number = 100;
var h:Number = 100;
art.beginFill(0x003366);
art.lineTo(w, 0);
art.lineTo(w, h);
art.lineTo(0, h);
art.lineTo(0, 0);
art._x = 20;
art._y = 20;
(no knockout effect).
false
property on an existing movie clip when a user
knockout
GradientGlowFilter (flash.filters.GradientGlowFilter)
specifies a
true
645
Need help?
Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?