Question : How can I detect a pixel color of an image in Flash using ActionScript 2?

How can I detect a pixel color of an external image in Flash using ActionScript 2?

For example, if I wanted the RGB of the pixel at the very top left hand corner of an external image, how would I do that?

Answer : How can I detect a pixel color of an image in Flash using ActionScript 2?

Do you see these two lines???  Basically those are the only ones that you need to get the pixel value from the bitmap image...

CyanBlue
1:
2:
var pColor:Number = bmp.getPixel(_xmouse, _ymouse)
var hexColor:String = pColor.toString(16).toUpperCase()
Random Solutions  
 
programming4us programming4us