BitmapData (flash.display.BitmapData)
307
var mc:MovieClip = this.createEmptyMovieClip("mc",
this.getNextHighestDepth());
mc.attachBitmap(myBitmapData, this.getNextHighestDepth());
mc.onPress = function() {
myBitmapData.dispose();
trace(myBitmapData.width); // -1
trace(myBitmapData.height); // -1
trace(myBitmapData.transparent); // -1
}
draw (BitmapData.draw method)
public draw(source:Object, [matrix:Matrix],
[colorTransform:ColorTransform], [blendMode:Object],
[clipRect:Rectangle], [smooth:Boolean]) : Void
Draws a source image or movie clip onto a destination image, using the Flash Player vector
renderer. You can use Matrix, ColorTransform, BlendMode objects, and a destination
Rectangle object to control how the rendering performs. Optionally, you can specify whether
the bitmap should be smoothed when scaled. This works only if the source object is a
BitmapData object.
This method directly corresponds to how objects are drawn using the standard vector renderer
for objects in the authoring tool interface.
A source MovieClip object does not use any of its on-stage transformations for this call. It is
treated as it exists in the library or file, with no matrix transform, no color transform, and no
blend mode. If you want to draw the movie clip by using its own transform properties, you
can use its Transform object to pass the various transformation properties.
Availability:
ActionScript 1.0; Flash Player 8
Parameters
source
:Object
- The BitmapData object to draw.
matrix
:flash.geom.Matrix
[optional] - A Matrix object used to scale, rotate, or translate
the coordinates of the bitmap. If no object is supplied, the bitmap image will not be
transformed. Set this parameter to an identity matrix, created using the default
new Matrix()
constructor, if you must pass this parameter but you do not want to transform the image.
Summary of Contents for FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
Page 1: ...ActionScript 2 0 Language Reference ...
Page 1352: ...1352 ActionScript classes ...