EasyManua.ls Logo

MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE - Page 308

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...
308 ActionScript classes
colorTransform:flash.geom.ColorTransform [optional] - A ColorTransform object that
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() constructor, if you must pass this parameter but you do
not want to transform the image.
blendMode:Object [optional] - A BlendMode object.
clipRect:flash.geom.Rectangle [optional] - A Rectangle object. If you do not supply this
value, no clipping occurs.
smooth:Boolean [optional] - A Boolean value that determines whether a BitmapData object
is smoothed when scaled. The default value is
false.
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;

Table of Contents

Related product manuals