This reference is for Processing 2.0+. If you have a previous version, use the reference included with your software. If you see any errors or have suggestions, please let us know. If you prefer a more technical reference, visit the Processing Javadoc.

Name

Movie

Examples
import processing.video.*;
Movie myMovie;

void setup() {
  size(200, 200);
  myMovie = new Movie(this, "totoro.mov");
  myMovie.loop();
}

void draw() {
  tint(255, 20);
  image(myMovie, mouseX, mouseY);
}

// Called every time a new frame is available to read
void movieEvent(Movie m) {
  m.read();
}

Description Datatype for storing and playing movies in Apple's QuickTime format. Movies must be located in the sketch's data directory or an accessible place on the network to load without an error.
Methods
frameRate() Sets the target frame rate
speed() Sets the relative playback speed
duration() Returns length of movie in seconds
time() Returns location of playback head in units of seconds
jump() Jumps to a specific location
available() Returns "true" when a new movie frame is available to read.
play() Plays movie one time and stops at the last frame
loop() Plays a movie continuously, restarting it when it's over.
noLoop() Stops the movie from looping
pause() Pauses the movie
stop() Stops the movie
read() Reads the current frame
Constructor
Movie(parent, filename)
Parameters
parent PApplet: PApplet
filename String: String
Updated on May 19, 2014 05:30:05pm PDT

Creative Commons License