We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hello,
I am trying to get the video to not begin playing until stage 1, but it starts right away. Any suggestions? Thank you!
PImage old;
import processing.video.*;
Movie movie;
int stage = 0;
void setup(){
size(500,500);
old = loadImage("old.png");
old.resize(500,500);
movie = new Movie(this, "full.mov");
movie.loop();
}
void draw(){
if (stage == 0){
fill (255,0,0);
rect (0,0,500,500);
if ((mousePressed)&& (mouseX > 0) && (mouseX < 250)&& (mouseY > 0) && (mouseY < 250)){ //button on upper left side
stage = 1;
}
}
if (stage == 1){
image(movie,0,0,500,500);
image(old,0,0,500,500);
}
}
void movieEvent(Movie m){
m.read();
}
Answers
@koogs is this solution as easy as the one you just gave me about the audio file? :)
I solved my own problem based on another post! It must start off in pause mode for zero and then play mode in stage 1.
Don't know how to mark it as resolved.
movie.loop() starts the video iirc.
Thank you @koogs!!!
That's right,
movie.loop()
means "play now, and also repeat when done", not "turn the repeat flag on."