EasyManua.ls Logo

MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE - Displacementmapfilter Constructor

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...
DisplacementMapFilter (flash.filters.DisplacementMapFilter) 517
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;
}
function createTextBlock():MovieClip {
var txtBlock:MovieClip = this.createEmptyMovieClip("txtBlock",
this.getNextHighestDepth());
txtBlock.createTextField("txt", this.getNextHighestDepth(), 0, 0, 300,
80);
txtBlock.txt.text = "watch the text bend with the displacement map";
return txtBlock;
}
See also
BitmapData (flash.display.BitmapData)
DisplacementMapFilter constructor
public DisplacementMapFilter(mapBitmap:BitmapData, mapPoint:Point,
componentX:Number, componentY:Number, scaleX:Number, scaleY:Number,
[mode:String], [color:Number], [alpha:Number])
Initializes a DisplacementMapFilter instance with the specified parameters.
Availability: ActionScript 1.0; Flash Player 8
Parameters
mapBitmap:flash.display.BitmapData - A BitmapData object containing the
displacement map data.
mapPoint:flash.geom.Point - A flash.geom.Point value that contains the offset of the
upper-left corner of the target movie clip from the upper-left corner of the map image.

Table of Contents

Related product manuals