Quantcast
Channel: Processing Forum
Viewing all articles
Browse latest Browse all 1768

Re : Avoid clicking the mouse on the frame to start video capture

$
0
0
A sketch like
  1. void setup()
  2. {
  3.   size(1024, 720);
  4. }
  5.  
  6. void draw()
  7. {
  8.   background(0);
  9.  
  10.   ellipse(frameCount % width, height / 2, 50, 50);
  11. }
  12.  
  13. void keyPressed()
  14. {
  15.   exit();
  16. }
works for me, ie. no need to put the focus on the frame to have keyPressed() to work, on Windows 7.
So perhaps the problem is elsewhere. You should do like me, starting from a simple sketch, building it up to see when it stops working as you want. It might be the renderer, the behavior of the video library or whatever.

BTW, moved from Programming Questions because there is, precisely, no code to look at.

Viewing all articles
Browse latest Browse all 1768

Trending Articles