Can someone help me I am kind of new at programming but was working in processing and need to create a pogram which combines two arrays into one and displays them exactly on the same position? So it cycles through one array, which is like 23 images and then the other array which is 8 images. I have this so far:
PImage[][] mEyes1 = new PImage[23][8];
// PImage[] mEyes2 = new PImage[8];
void setup() {
size(620, 400);
// fullScreen();
frameRate(60);
smooth();
for (int i = 0; i < mEyes1.length; i++)
for (int j = 0; j < mEyes1.length; j++) {
PImage img = loadImage(i + "h.jpg");
PImage img1 = loadImage(j + "j.jpg");
// r
mEyes1[i][j] = img.get(130, 170, 310, 100);
mEyes1[i][j] = img1.get(130, 170, 310, 100); //Get a portion of the loaded image with displaying it
int idy = (int)map(mouseY, 0, 2*width, 0.0, mEyes1[i].length -1);
int idx = (int)map(mouseX, 0, 2*width, 0.0, mEyes1[j].length -1);
image(mEyes1[idx][idy], 0, 0, mEyes1[idx][idy].width, mEyes1[idx][idy].height -1);
// image(mEyes1[idy][idx], 0, 0, mEyes1[idy][idx].width, mEyes1[idy][idx].height -1);
println(idx,idy);
}
}
void draw() {
}
I know it looks wrong, but I want to display a series of images at the same position after it goes through the first 23?
Thanks!