PImage face1;
PImage face2;
int a;
void setup(){
size (600,400);
background(255);
noStroke();
smooth();
noCursor();
face1 = loadImage ("face1.gif");
face2 = loadImage ("face2.gif");
}
void draw(){
image(face1, 200, 10);
if (mousePressed == true){
image(face2, 200,10);
int a = int(random(200,400));
fill(0);
strokeWeight(5);
frameRate(16);
triangle(280,500,320,500, random(100,500) ,random (100, 400));
}
else {
fill(255);
rect (0,0,600,400);
image(face1, 200, 10);
}
}
Monica - L
on Monday, Nov 24, 2008 – 8:41 am