Hello everybody!
I am new in this and I was wondering if someone could help me with this.
I’m trying to start or stop a video when the mouse passed over it, but idk why they don’t appear (only hear the music) or once it has stopped it wont get start again.
In advance thank you all <3
import processing.video.*;
Movie car; //video[1]
Movie bike; //video[2]
void setup(){
size(2170,700);
background(255);
car = new Movie(this, "video[1].mp4");
bike = new Movie(this, "video[2].mp4");
}
void draw(){
image(car, 25, 25 );
car.play();
if (mouseX > 700 ){
car.pause();
} else if (mouseX > 25) {
car.loop();
}
image(bike, 900, 25 );
bike.play();
if (mouseX > 1500 ){
bike.pause();
} else if (mouseX > 900) {
bike.loop();
}
}