PImage hund1;
PImage hund2;
PImage hund3;
PImage hund4;
PImage hund5;
PImage hund6;
PImage hund7;
PImage hund8;
PImage hund9;
void setup() {
size(500, 664);
background(0, 0, 0);
hund1 = loadImage("hund1.jpg");
hund2 = loadImage("hund2.jpg");
hund3 = loadImage("hund3.jpg");
hund4 = loadImage("hund4.jpg");
hund5 = loadImage("hund5.jpg");
hund6 = loadImage("hund6.jpg");
hund7 = loadImage("hund7.jpg");
hund8 = loadImage("hund8.jpg");
hund9 = loadImage("hund9.jpg");
frameRate(3);
}
void draw() {
if (frameCount % 9 == 1) {
// show h1 for odd frames
image(hund1, 7, 7, 486, 648);
} else if (frameCount % 9 == 2) {
// show h1 for odd frames
image(hund2, 7, 7, 486, 648);
} else if (frameCount % 9 == 3) {
// show h1 for odd frames
image(hund3, 7, 7, 486, 648);
} else if (frameCount % 9 == 4) {
// show h1 for odd frames
image(hund4, 7, 7, 486, 648);
} else if (frameCount % 9 == 5) {
// show h1 for odd frames
image(hund5, 7, 7, 486, 648);
} else if (frameCount % 9 == 6) {
// show h1 for odd frames
image(hund6, 7, 7, 486, 648);
} else if (frameCount % 9 == 7) {
// show h1 for odd frames
image(hund7, 7, 7, 486, 648);
} else if (frameCount % 9 == 8) {
// show h1 for odd frames
image(hund8, 7, 7, 486, 648);
} else {
// show tree for even frames
image(hund9, 7, 7, 486, 648);
}}