Wooh[] woohs = new Wooh[100]; Zoog zoog1=new Zoog(); int imageindex = 0; // initial image to displayed is the first int totalWoohs = 0; PImage woohImg; void setup() { size(400,400); smooth(); frameRate(15); background(0); woohImg = loadImage("wooh.gif"); for(int i=0;i<50;i++) { woohs[i] = new Wooh(); } } void draw() { background(0); for (int i = 0; i < 50; i++) { woohs[i].move(); woohs[i].touch(); // intersection? remove it. woohs[i].display(); } zoog1.move(mouseX); zoog1.display(); }