MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference page 511

Actionscript 2.0 language reference
Table of Contents

Advertisement

}
for(var i in clonedFilter) {
trace(">> " + i + ": " + clonedFilter[i]);
// >> clone: [type Function]
// >> alpha: 0
// >> color: 0
// >> mode: wrap
// >> scaleY: 10
// >> scaleX: 10
// >> componentY: 1
// >> componentX: 1
// >> mapPoint: (-30, -30)
// >> mapBitmap: [object Object]
}
function createGradientBitmap(w:Number, h:Number, bgColor:Number,
type:String, hide:Boolean):BitmapData {
var mc:MovieClip = this.createEmptyMovieClip("mc", 1);
var matrix:Matrix = new Matrix();
matrix.createGradientBox(w, h, 0, 0, 0);
mc.beginGradientFill(type, [0xFF0000, 0x0000FF], [100, 100], [0x55,
0x99], matrix, "pad");
mc.lineTo(w, 0);
mc.lineTo(w, h);
mc.lineTo(0, h);
mc.lineTo(0, 0);
mc.endFill();
(hide == true) ? mc._alpha = 0 : mc._alpha = 100;
var bmp:BitmapData = new BitmapData(w, h, true, bgColor);
bmp.draw(mc, new Matrix(), new ColorTransform(), "normal",
bmp.rectangle, true);
mc.attachBitmap(bmp, this.getNextHighestDepth());
return bmp;
}
To further demonstrate the relationships between
the following example modifies the
demonstrates that the
instead of pointing to them in reference.
import flash.filters.DisplacementMapFilter;
import flash.display.BitmapData;
import flash.geom.Point;
import flash.geom.Matrix;
import flash.geom.ColorTransform;
property of
mode
method creates a new instance based on values of
clone()
DisplacementMapFilter (flash.filters.DisplacementMapFilter)
,
filter_1
filter_2
. Modifying
filter_1
, and
,
clonedFilter
mode
filter_1
511

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash 8

Table of Contents

Save PDF