- 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();
}
}
↧
Re : Question about display movie in Processing
↧