Trigger an image in interactive installation “sensor input cannot be resolved as a variable”

you did not answer my question,
what is the idea / start logic,
and the “playing” variable.

you can for a test just disable that line ( and the corresponding // } )

if you want wait until “all” songs/movies finished,
and then enable start a new one,
the code is ok, but miss one part, where you check if
all movies finished set
playing = false;

but as you now come up with the

movie1.pause;
playing = false; 

would mean every touch stops the running movie and start the other one.
( but you can not use the
if ( val == 0 )
)
more like

void startM1() {
//  if (!playing) {
    movie1.play();       // display movie1
    movie2.pause();
    movie3.pause();
//    playing = true;
    play = 1;
//  }
}