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

Popular posts from this blog

CS5 Adobe Media Encoder: Encode failed because the source duration is nil.

cf_sql_integer vs cf_sql_bigint vs cf_sql_int??

localhost/joomla15/administrator doesnt work - Joomla! Forum - community, help and support