EasyManua.ls Logo

MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE - Knockout (Gradientglowfilter.knockout 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...
GradientGlowFilter (flash.filters.GradientGlowFilter) 645
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
true specifies a
knockout effect; the default is
false (no knockout effect).
Availability: ActionScript 1.0; Flash Player 8
Example
The following example changes the
knockout property on an existing movie clip when a user
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;

Table of Contents

Related product manuals