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
displacement map data.
mapPoint:flash.geom.Point
upper-left corner of the target movie clip from the upper-left corner of the map image.
- A BitmapData object containing the
- A
flash.geom.Point
DisplacementMapFilter (flash.filters.DisplacementMapFilter)
value that contains the offset of the
517
Need help?
Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?