FAQ
 
 
Cover  \ Exhibition  \ Learning  \ Reference  \ Download  \ Discourse   
      Language \ Environment \ Libraries \ Comparison
 
   
   
Back  
   
  Reference for Processing (BETA) version 91+. If you have a previous version, use the reference included with your software. If you see any errors or have any comments, let us know.  
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  
read()
  Reads the current frame from the movie

available()
  Returns true when a new frame is available

play()
  Plays the movie once

pause()
  Pauses the movie playback

stop()
  Stops the movie playback

loop()
  Plays the movie continuously

noLoop()
  Stops the movie from looping

jump()
  Jumps to a specific location in the movie

duration()
  Returns the total length of the movie

time()
  Returns the current playback position

speed()
  Sets a multiplier for how fast/slow a movie should play

framerate()
  Sets how often new frames are read from the movie

   
   
Constructors  
Movie(parent, filename)
Movie(parent, filename, fps)
Movie(parent, url)
Movie(parent, url, fps)
   
Parameters  
parent   PApplet: typically use "this"

filename   String: name of the movie

fps   int: frames per second

url   URL: location of the file on the network

   
Usage   Application
   
 
 






   
 
Updated: Fri Jul 15 16:41:05 PDT 2005
 
 








Creative Commons License
 
  Processing is an open project initiated by Ben Fry and Casey Reas  
  © Info  
://web.resource.org/cc/Distribution" /> -->     Processing is an open project initiated by Ben Fry and Casey Reas     © Info   A versatile input provider, a popup window with a set of interactive