User Tools

Site Tools


Note: default video library does not work in Linux.

// Learning Processing
// Daniel Shiffman
// Example 16-5: Scrubbing forward and backward in movie
// If mouseX is 0, go to beginning
// If mouseX is width, go to end
// And everything else scrub in between
Movie movie;
void setup() {
  movie = new Movie(this, "");
void draw() {
  // Ratio of mouse X over width
  float ratio = mouseX / (float) width;
  // The jump() function allows you to jump immediately to a point of time within the video. 
  // duration() returns the total length of the movie in seconds.  
  // Read frame; 
  // Display frame
cs276/ex16-6.txt · Last modified: 2009/11/10 09:41 by scarl