import processing.serial.*;
import processing.video.*;

Movie myMovie;

Serial myPort;
String val = new String("found");

boolean movieplay = false;
boolean movepause = true;

void setup() {
  size(800, 800);
  
  println(Serial.list());
  String portName = Serial.list()[5];
  myPort = new Serial(this, portName, 9600);

  myMovie = new Movie(this, "a.mov");
  myMovie.pause();

}

void draw() {
  if ( myPort.available () > 0)
  {
    val = myPort.readStringUntil('\n');
  }
  println(val);

  if ("found" == "found") {
//    image(myMovie, 0, 0);
    println("catfishes");
  }
}

void movieEvent(Movie m) {
  m.read();
}