Height (Bitmapdata.height Property); Hittest (Bitmapdata.hittest Method) - MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference

Actionscript 2.0 language reference
Table of Contents

Advertisement

var green:String = (myBitmapData.getPixel32(0, 0) >> 8 &
0xFF).toString(16);
trace(">> green: " + green); // cc
var blue:String = (myBitmapData.getPixel32(0, 0) & 0xFF).toString(16);
trace(">> blue: " + blue); // ee
trace("0x" + alpha + red + green + blue); // 0xffaaccee
See also
getPixel (BitmapData.getPixel method)

height (BitmapData.height property)

public height : Number [read-only]
The height of the bitmap image in pixels.
Availability: ActionScript 1.0; Flash Player 8
Example
The following example shows that the
only by trying to set it and failing:
import flash.display.BitmapData;
var myBitmapData:BitmapData = new BitmapData(100, 80, false, 0x00CCCCCC);
var mc:MovieClip = this.createEmptyMovieClip("mc",
this.getNextHighestDepth());
mc.attachBitmap(myBitmapData, this.getNextHighestDepth());
trace(myBitmapData.height); // 80
myBitmapData.height = 999;
trace(myBitmapData.height); // 80

hitTest (BitmapData.hitTest method)

public hitTest(firstPoint:Point, firstAlphaThreshold:Number,
secondObject:Object, [secondBitmapPoint:Point],
[secondAlphaThreshold:Number]) : Boolean
Performs pixel-level hit detection between one bitmap image and a point, rectangle or other
bitmap image. No stretching, rotation, or other transformation of either object is considered
when doing the hit test.
property of the
height
BitmapData (flash.display.BitmapData)
instance is read-
BitmapData
315

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash 8

Table of Contents

Save PDF