function sketch() {
myBitmapData.setPixel32(_xmouse, _ymouse, 0x00000000);
}
See also
getPixel32 (BitmapData.getPixel32 method)
method)
threshold (BitmapData.threshold method)
public threshold(sourceBitmap:BitmapData, sourceRect:Rectangle,
destPoint:Point, operation:String, threshold:Number, [color:Number],
[mask:Number], [copySource:Boolean]) : Number
Tests pixel values in an image against a specified threshold and sets pixels that pass the test to
new color values. Using the
an image and perform other logical operations on image pixels.
The threshold test's logic is as follows:
if ((pixelValue & mask) operation (threshold & mask)) then
set pixel to color
else
if (copySource) then
set pixel to corresponding pixel value from sourceBitmap
The
parameter specifies the comparison operator to use for the threshold test. For
operation
example, by using "
==
{operation: "<", mask: 0xFF000000, threshold: 0x7f000000, color:
, you can set all destination pixels to be fully transparent when the source image
0x00000000}
pixel's alpha is less than 0x7F. You can use this technique for animated transitions and other
effects.
Availability: ActionScript 1.0; Flash Player 8
Parameters
sourceBitmap:flash.display.BitmapData
image can be a different BitmapData object or it can refer to the current BitmapData
instance.
method, you can isolate and replace color ranges in
threshold()
", you can isolate a specific color value in an image. Or by using
,
setPixel (BitmapData.setPixel
- The input bitmap image to use. The source
BitmapData (flash.display.BitmapData)
329
Need help?
Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?