//Ball joe = new Ball(34.5, 100.6, color(255,0,0, 127) ); //Ball alice = new Ball(400.3, 20.0, color(0,0,255, 20) ); Ball[] balls = new Ball[5]; PFont theMainFont; String output = "hello world"; void setup() { size( 600, 600 ); frameRate(30); // frames per second background(255,255,255); theMainFont = loadFont("Helvetica-36.vlw"); textFont(theMainFont); String upper = output.toUpperCase(); fill(255,0,0); stroke(0,0,255); text(upper, 300, 200); for( int i = 0; i < balls.length; i++) { println(i); // Ball( xCenter, yCenter, fillColor ); balls[i] = new Ball( random(200, 400), random(200, 400), color(225, 225, 225), i ); balls[i].showBall(); } } void draw() { background(255); String info = "click on a ball to change it to a rectangle"; textAlign(CENTER); textSize(24); fill(255,0,0); stroke(0,0,255); text(info, width/2, height-20); for( int i = 0; i < balls.length; i++ ) { balls[i].update(); balls[i].showBall(); } }