I'm trying to write a processing sketch that loops a video until the mouse button is pressed, at which point it plays a different non-looped video. with the code I've rather poorly hobbled together now, it loops the video but when I click it just stops the loop and doesn't play the second video. I'm still really new to programming, so I've just kinda taken the example code from GSVideo's site (
http://gsvideo.sourceforge.net/examples/Movie/Loop/Loop.pde) and tried to augment it as best I know.
thanks in advance for your help!
thanks in advance for your help!
- import codeanticode.gsvideo.*;
GSMovie loop;
GSMovie shoot;
void setup() {
size(720, 480);
background(0);
// Load and play the video in a loop
loop = new GSMovie(this, "loop.mov");
shoot = new GSMovie(this, "shoot.mov");
loop.loop();
}
void movieEvent(GSMovie movie) {
loop.read();
}
void draw() {
image(loop,0,0);
}
void mousePressed() {
loop.stop();
shoot.read();
image(shoot,0,0);
}
1