/* Matt Martell IAT 800 - Dr. Christopher Shaw Due Oct. 6, 2008 A2-10 - Create an event that begins when the mouse is pressed and ends when the mouse is released. */ void setup() { size(400,400); smooth(); stroke(230,230,250); frameRate(7); } //Variables float x; float y; void draw () { // Draw boxes in random pattern when mouse pressed, when released it clears if (mousePressed) { rect (x,y, 15,15); x= random(400) + 5; x++; y = random(400) + 5; y++; } else { background(0); } }