Get the color of a pixel at x&y
I made a little test to do this. But, it doens't work. ]=
Lets say i drew this blue square, 50px * 50px.
It is not a movieclip.
Now I want to know what color is at the center of the square:
Code:
import flash.display.BitmapData;
var kl:BitmapData = new BitmapData (50, 50);
trace (kl.getPixel (25, 25).toString(16));
The problem is, whatever color i give the square, it keeps tracing "ffffff".
getRGB and setRGB is no option. I tried that and it works in this case, but i cant use it in this case.