Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Import video library.
- import processing.video.*;
- // Declare a movie variable.
- Movie melies;
- void setup() {
- size(512, 256);
- // Create a new movie by supplying this
- // sketch, a child of a PApplet, and a String
- // for the file name.
- melies = new Movie(this, "melies.ogv");
- // Begin playing the movie on a loop.
- melies.loop();
- }
- void draw() {
- // Read new frame data if available.
- if (melies.available()) {
- melies.read();
- }
- // Display movie with image function.
- // an image from the top-left corner that
- // is the width and height of the screen.
- image(melies, 0.0, 0.0, width, height);
- }
Add Comment
Please, Sign In to add comment