We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I'm very new to Processing. I am working on a project that involves Makey Makey. I was wondering if it is possible to use keyPressed or something similar to respond to the number of times the key is pressed? For instance, I want the user to press LEFT three times and RIGHT two times, and after that the video will play. Is there a way to do it?
Answers
Thank you so much!!!
However, when I'm trying to run your code, I am getting "The function getSurface() does not exist"
Grab P3: https://Processing.org/download/
Being very careful to choose another path for your P3's "Sketchbook" when 1st running it!!! L-)
If you wish for it to work w/ P2's previous versions, replace:
if (mov.width > 0) getSurface().setSize(mov.width, mov.height);
w/:
if (mov.width > 0) size(mov.width, mov.height);
.And also replace all
getSurface();
w/frame
.Thank you, you are a lifesaver!
Hey, sorry to bother you again. I was trying to combine your code with mine. I need those videos to play one after another, but for some reason I only get the sound without image from the second one and because of that 3 to 5 don't play as well.
Is there a better way to do it?
W/o using arrays there's no sane way to tame your sketch at all: :-t
https://Processing.org/reference/arrayaccess.html
http://docs.Oracle.com/javase/tutorial/java/nutsandbolts/arrays.html
Try to adapt this Minim sketch to use Movie instead:
https://forum.Processing.org/two/discussion/16413/minim-pause-does-not-work#Item_12
Once you accomplish that, it's not far away to get the rest. :-bd
Hi again. I'm trying to adapt that Minim sketch as you advised, but I am somewhat confused, for I have never used Minim before. How would I go about changing "ddf.minim.Minim" and "ddf.minim.Playable" to something similar in the video library?
Video library use
import processing.video.Movie;
only for playing videos.Obviously that Minim's style used there to load audios is different from Movie's.
Which you already know how to do it. But I guess now you won't be able to pull that off. :|
For example, in the original, the AudioPlayer objects are created via Minim's loadFile() method:
Movie class is directly instantiated via
new
instead:Dear GoToLoop, I try to use the video player you wrote when clicking/selecting 3d objects, but I don't get anywhere!?
There are no 3D objects in the sketch I've posted in this more-than-1-year forum thread. 8-|
Sorry for the misunderstanding GoToLoop I try to use the code you wrote in this old forum thread to read videos when I click on 3d objects in my sketch but I don't manage to make it work...