Video in Processing
in
Core Library Questions
•
1 year ago
HI there,
I was wondering how I would be able to have a video play in processing and when it stops, be able to play again from a mouse click. So in a way its looping, however by a mouse click.
This is the code I have so far, the only thing I need to figure out is the mouse click aspect.
Thanks for your help!
import processing.video.*;
Movie myMovie;
void setup() {
size(200, 200, P2D);
myMovie = new Movie(this, "movie.mov");
myMovie.play();
}
void draw() {
image(myMovie, 0, 0);
}
void movieEvent(Movie m) {
m.read();
}
1