About how to load images after the video is over

I wanted to make two images of case2 appear after the ‘intro’ video, but it didn’t work. What could be the problem?

import processing.video.*;
Movie intro;

int caseNum=1;
PImage start;
PImage press;

void setup() {
size (1423, 800);
intro=new Movie(this, "intro.mp4 ");
intro.play();
}

void draw() {
switch(caseNum) {
case 1:
if (intro.available()==true) {
intro.read();
}
image(intro, 0, 0, width, height);
if (intro.time() >= intro.duration()) {
intro.stop();
caseNum=2;
}
break;

case 2:
start=loadImage(“start.png”);
image(start, 0, 0);
press=loadImage(“press.png”);
image(press, 500, 620);
break;

void mousePressed() {

  switch(caseNum) {
  case 1:
    break;
  }
}

please format the code!

1 Like

hi,
from the code here, you have void mousePressed() inside your draw() … not good : mousePressed

then you can set caseNum =2 to check if images display as expected,
in your code for each frame you call loadImage(“start.png”);, are you sure it’s what you want to do, if png files doesn’t change, you need to call it only one time