import processing.video.*; MovieMaker mm; // this is the movie maker objects // from previous sketch float x = 0, y = 0; float r = 20; float easing = 0.05; void setup() { size(400,400); smooth(); noStroke(); // make a new MovieMaker mm = new MovieMaker(this, width, height, "sketch.mov", 30, MovieMaker.H263, MovieMaker.HIGH); } void draw() { background(0); fill(255); ellipse(x,y,2*r,2*r); fill(128); ellipse(mouseX,mouseY,r/2,r/2); // take a step float vx = (mouseX - x) * easing; float vy = (mouseY - y) * easing; x += vx; y += vy; // add a frame mm.addFrame(); } void keyPressed() { if (key == ' ') { mm.finish(); // Finish the movie if space bar is pressed! } } // START NO NOTES // code used to capture screenshots void keyReleased() { if(key == '`' && !online) save("sketch.png"); }