colorTransform:flash.geom.ColorTransform
you use to adjust the color values of the bitmap. If no object is supplied, the bitmap image's
colors will not be transformed. Set this parameter to a ColorTransform object created using
the default
new ColorTransform()
not want to transform the image.
[optional] - A BlendMode object.
blendMode:Object
clipRect:flash.geom.Rectangle
value, no clipping occurs.
[optional] - A Boolean value that determines whether a BitmapData object
smooth:Boolean
is smoothed when scaled. The default value is
Example
The following example shows how to draw from a source MovieClip instance to a
BitmapData object.
import flash.display.BitmapData;
import flash.geom.Rectangle;
import flash.geom.Matrix;
import flash.geom.ColorTransform;
var myBitmapData:BitmapData = new BitmapData(100, 80, false, 0x00CCCCCC);
var mc_1:MovieClip = this.createEmptyMovieClip("mc",
this.getNextHighestDepth());
mc_1.attachBitmap(myBitmapData, this.getNextHighestDepth());
var mc_2:MovieClip = createRectangle(50, 40, 0xFF0000);
mc_2._x = 101;
var myMatrix:Matrix = new Matrix();
myMatrix.rotate(Math.PI/2);
var translateMatrix:Matrix = new Matrix();
translateMatrix.translate(70, 15);
myMatrix.concat(translateMatrix);
var myColorTransform:ColorTransform = new ColorTransform(0, 0, 1, 1, 0, 0,
255, 0);
var blendMode:String = "normal";
var myRectangle:Rectangle = new Rectangle(0, 0, 100, 80);
var smooth:Boolean = true;
308
ActionScript classes
[optional] - A ColorTransform object that
constructor, if you must pass this parameter but you do
[optional] - A Rectangle object. If you do not supply this
.
false
Need help?
Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?