topical media & game development

talk show tell print

graphic-processing-learning-16-example-16-4-example-16-4.pde / pde



  // Learning Processing
  // Daniel Shiffman
  // http://www.learningprocessing.com
  
  // Example 16-4: Display QuickTime movie
  
  import processing.video.*;
  
  // Step 1. Declare Movie object
  Movie movie; 
  
  void setup() {
    size(320,240);
    
    // Step 2. Initialize Movie object
    // Movie file should be in data folder
    movie = new Movie(this, "cat.mov"); 
    
    // Step 3. Start movie playing
    movie.loop();
  }
  
  // Step 4. Read new frames from movie
  void movieEvent(Movie movie) {
    movie.read();
  }
  
  void draw() {
    // Step 5. Display movie.
    image(movie,0,0);
  }
  


(C) Æliens 20/2/2008

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.