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

I haven’t set playing == false anywhere, I will try the code.

Okay I tried the code for processing you’ve written it so much clearer and the values 0-3 do come up in processing. My issue now is there is no video being shown when I go to press any sensor. I will check over the code and see if there is something missing. I think it may have to do with the if statements not referring to the values:

if ( val > 0) ; 
movie1.play();
playing = true; 
play = 1; 

else if ( val = 0); 
movie1.pause;
playing = false; 

Would this be correct?

Thank you so much