Quantcast
Channel: Processing Forum
Viewing all articles
Browse latest Browse all 1768

Re : Question about display movie in Processing

$
0
0
  1. int i=0;
    import processing.video.*;
    Movie myMovie;

    void setup() {


      size(300, 200);
      background(0);
      myMovie = new Movie(this, "1.mp4");
      myMovie.loop();
      myMovie.pause();
    }

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

    void draw() {


      background(255);
      image(myMovie, 0, 0, 300, 200);
    }

    void mousePressed()

    {
      if (i==0) {
        i=1;
        myMovie.play();
      }
      else {
        i=0;
        myMovie.pause();
      }
    }


Viewing all articles
Browse latest Browse all 1768

Trending Articles