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
- The BitmapData object to draw.
source:Object
matrix:flash.geom.Matrix
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
constructor, if you must pass this parameter but you do not want to transform the image.
[optional] - A Matrix object used to scale, rotate, or translate
BitmapData (flash.display.BitmapData)
new Matrix()
307
Need help?
Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?