PDA

View Full Version : Need help!, I need to know the color of a pixel


kabomi
08-09-2005, 02:13 PM
Hi everyone, im a newbie and ive been searching the web but didnt find an answer, so here i am asking you.
My question is: its possible in one way or another to know the color of a pixel using actionscript?
Need to make the same function like dropper tools do. Thz in advance Guys

saumya
08-09-2005, 04:12 PM
yes, it is possible.Just look for the color object in your action script help file.

kabomi
08-10-2005, 12:45 PM
Ok, ive been looking color object, it has some usefull functions that may help me, but still dont get how to tell flash, for example, that I want the color of the point 300x, 500y in RGB format. ??? Greetings saumya

stevehapp
08-10-2005, 01:49 PM
i dont think it is easily done it flash per se..
that is more c++ blitting..
setPixel etc..

the way around it maybe to draw a line from (300,200) to (301,200)
and set the color of the line to red..
i forget all the graphics class..

// make an emptymovieclip.
// set color
// start line..
// moveTo(x2my2)..

i just forget all the methods .. do a search for moveTo..

saumya
08-10-2005, 05:18 PM
well all that is possible inside flash player.You can get those values from the color object's getRBG() method.