mirror of
https://github.com/processing/processing4.git
synced 2026-02-02 21:29:17 +01:00
29 lines
465 B
Plaintext
29 lines
465 B
Plaintext
/**
|
|
* Loop.
|
|
*
|
|
* Move the cursor across the screen to draw.
|
|
* Shows how to load and play a QuickTime movie file.
|
|
*
|
|
*/
|
|
|
|
import processing.video.*;
|
|
|
|
Movie movie;
|
|
|
|
void setup() {
|
|
size(640, 480);
|
|
background(0);
|
|
// Load and play the video in a loop
|
|
movie = new Movie(this, "station.mov");
|
|
movie.loop();
|
|
}
|
|
|
|
void movieEvent(Movie movie) {
|
|
movie.read();
|
|
}
|
|
|
|
void draw() {
|
|
tint(255, 20);
|
|
image(movie, mouseX-movie.width/2, mouseY-movie.height/2);
|
|
}
|