Language \ Environment \ Comparison
 
Index
 
  The Processing 1.0 _ALPHA_ Reference is a work in progress.
If you see any errors or have any comments, please write to: reas at groupc.net
Name  

videoEvent()

   
Examples  
int pos = 0; 
 
void setup() {	 
  size(320, 240); 
  noBackground(); 
  beginVideo(2, 240, 24);  
} 
 
// Called every time there is a new video frame ready 
public void videoEvent() {  
  pos = pos + 2; 
  if(pos >= width) { 
    pos = 0; 
  } 
} 
 
void loop() { 
  // Display the captured frame at position [0, 0] 
  image(video, pos, 0);   	 
} 

Description   Called when a new video frame is available and assumes only one frame of video will be read at a time. The video variable always contains the most recently captured video frame.
   
Syntax  
videoEvent() {
  statements
}
   
Parameters  
statements   any valid statements

   
Returns  
   
Usage   Application
   
Related   beginVideo()
endVideo()
video
   
© 2004 - 2001 Massachusetts Institute of Technology and Interaction Design Institute Ivrea
Processing is an open project initiated by Ben Fry and Casey Reas