Button activated with webcam

hi to everybody,
how can I make to appear a quad(dx9) when an object taken back by a webcam is found on the button Menu?
thousand thanks.

I attach the patch.

contorno.v4p (12.7 kB)

try using the x and y co-ordinate of the blob and activate another quad when the X and Y co-ordinates match with the menu block.

hope this works

cheers!!!

(why do people always assume we all can test it with a webcam??)

You need to check the location off the blob/mouse and the location off the menu, easy to do with the intersect.

I attached a patch that does this for other buttons.

Next, if you want to make it spreadable, read this thread.

Sry for the late reply.

simple button.v4p (12.8 kB)

with a slight modification you can keep a button clicked as long you keep the mousebutton clicked even when you are drifting away with the cursor.

simple button.v4p (14.0 kB)

thanks to everybody,
to the beginning I had used the method with the coordinates of X and Y of the blob as dj2812 it recommends me.
Then I have used some blocks trautner, with some masks corresponding to the keys that serve me; and it works well but the system becomes slow.
however the solution that you have proposed me is interesting, I had never used the block intersect, I hope that it works well when to the place of the mouse there is the block contour.
thanks still to everybody