finding corodonates of a color.
hi trying find coridanates of anywhere there color red , save in 2 variables. one corodanets of color on x axis , 1 of corordonates on y axis. if knows how please let me know , reply code.
if bmpd bitmapdata instance:
var r:rectangle = bmpd.getcolorboundsrect(0x00ffffff, 0x00ff0000, true);
for(var x:number=0;x<=r.width;x++){
for(var y:number=0;y<=r.height;y++){
if(bmpd.getpixel(x,y)==0xff0000){
//do whatever x,y
}
}
}
More discussions in ActionScript 1 and 2
adobe
Comments
Post a Comment