ignore mouseclicks on VideoGrabber object

Visuals, audio, animation. Blended, not stirred. If LiveCode is part of your rich media production toolbox, this is the forum for you.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Johan_VH
Posts: 67
Joined: Fri Mar 28, 2014 2:46 pm

ignore mouseclicks on VideoGrabber object

Post by Johan_VH » Mon Jan 09, 2017 3:25 pm

Hi all,

I'm making an application (running on Windows desktop) that shows a webcam and grabs an image from it. It works by using a shell command and grabbing the image in Magick convertor since grabbing the image in Livecode itself gives very poor quality.

Since the application is geared towards ages 4 to 8, I mask the webcam image in order to have the children position their heads correctly (and having it look pretty). The only way to achieve this I had to use a substack and setting it's windowshape to a graphic with a hole in it, since the videograbber object doesn't allow a graphic on top of itself in the same card.

Problem: when the user touches the webcam image the masked substack isn't on top anymore and the entire webcamimage is shown... Is there a way to block the mouse or ignore it? I hoped using on mouseUp or mouseDown, but apparentely this is completely ignored when you click on a videograbber object... An invisible button on top of it isn't an option either since you can't place anything on top of the videograbber object.


Another problem I have yet to fix: is mirroring the videograbber object at all possible? It should act like a mirror. So moving your head left moves your head on the shown webcamimage left too, as a kid of that age would expect. Not right as it is standard.


I think I may have found my first case of "damn, Macromedia Director made this easier..." and I don't want that to happen! ;-)

Thanks in advance!

Johan

Johan_VH
Posts: 67
Joined: Fri Mar 28, 2014 2:46 pm

Re: ignore mouseclicks on VideoGrabber object

Post by Johan_VH » Tue Jan 10, 2017 4:48 pm

I found a workaround: I don't use a masked substack anymore but mask the mainstack. The videograbber is now in a separate stack of the correct dimensions that I just position under the mainstack when the mask with a hole in it is used.

I had to use a separate stack since a substack wouldn't do because the webcamimage was shown on top of a card in the mainstack instead of the substack.

Post Reply

Return to “Multimedia”