import processing.video.*; MovieMaker mm; int circleX = 25; float circleY= 200; void setup() { size(720, 480); // Save uncompressed, at 15 frames per second mm = new MovieMaker(this, width, height, "drawing.mov"); // Or, set specific compression and frame rate options //mm = new MovieMaker(this, width, height, "drawing.mov", 30, // MovieMaker.ANIMATION, MovieMaker.HIGH); background(0, 255, 0); } void draw() { stroke (0); strokeWeight (1); fill(175); line(circleX, circleY, circleX, circleY); circleX = circleX +1; circleY = circleY + random(-5,5); // Add window's pixels to movie mm.addFrame(); } void keyPressed() { if (key == ' ') { // Finish the movie if space bar is pressed mm.finish(); // Quit running the sketch once the file is written exit(); } }