I am working on a creative code project for school using Processing.
We have a series of 5 videos where each one is corresponding to a different key on the keyboard.
Does anyone have some quick code for this? simply pressing a button which pulls up the corresponding video.
This is not the place to ask for ready-made code, but for asking help with code you already wrote. Next time, try having a reproducible example (link) ready:
For now, here's an answer that may get you on the right track.
Take a look at the video (link) library to load and play your videos. You need to create a Movie object and play it using the play()
(link) function.
The keyPressed()
(link) function can be used to check if a certain input()
has been pressed, though I am not sure how your 'Makey Makey' interacts with your computer. If you can make it press buttons on your keyboard, listen for those keyCode
s (link) in your keyPressed()
function.