Processing Forum
int totalFrames = 12;
PImage[] images = new PImage[totalFrames];
int xSize = 50;
int ySize = 36;
int x = 0;
int y = 0;
void setup() {
size(500, 500);
for (int i=0; i<totalFrames; i++) {
String imageName = i + ".jpg";
images[i] = loadImage(imageName);
print(images[i]);
}
}
void draw() {
background(0);
for (int i = 0; i < width; i = i+xSize) {
for (int j = 0; j < height; j = j+ySize) {
for (int f = frameNumLow; f < frameNumHigh; f++) {
image(images[x], i, j);
if ((i + i)%2==0){
x++;
}
if (x >=11) {
x = x-1;
}
}
}
}