Displayed a video in the background and reveal using the mouse
in
Programming Questions
•
2 years ago
Hi just a really simple query but im scratching ym head to implement - probably because most of my stuff is generative and doesnt use Pimage and pGraphics or video - or im thick
Anyway
I want to render a video as the background - which i just achieved by loading a video file to a movie variable and then displaying a pimage at location 0,0 using the image(mymovie,0,0,width,height).
What i want is then to cover the screen black and only show a rectangle of say size 35 at the mouseX,mouseY which basically reveals out of the black the video behind.
Its to go onto a bigger project using tracking of movement and physics to slide the rectanlge about a bit more and i actually have all that code working so id swap the mouseX,mouseY for all my other code.
So does anyone have an idea - im presuming some tintin or alpha transparency or even mask() is required but to be honest ive never done this and dont know where to start.
plainspeaking terms - the mouse is a torch revealing the video. the screen is totally black if the mouse is not in focus.
1