We are about to switch to a new forum software. Until then we have removed the registration on this forum.
So I already have 4 pictures done from a code someone showed me, but i can't figure out how to add more to it. Any helpers? I'm very new to processing!
PImage img;
PImage img1;
PImage img2;
PImage img3;
int transparency1;
int transparency2;
int transparency3;
void setup(){
size(640,480);
transparency1 = 255;
transparency2 = 0;
transparency3 = 0;
img = loadImage("girl.jpg");
img1 = loadImage("field.jpg");
img2 = loadImage("bubbles.jpg");
img3 = loadImage("balloons.jpg");
}
void draw(){
background(255);
tint(255,255,255,transparency1);
image(img,0,0);
if(transparency1 > 0) {
transparency1--;
}
tint(255,255,255-transparency1);
image(img1,0,0);
tint(255,255,255,transparency2);
image(img2,0,0);
if((transparency1 == 0) &&(transparency2 < 255)){
transparency2++;
}
tint(255,255,255,transparency3);
image(img3,0,0);
if((transparency2 >0) && (transparency2 ==255)) {
transparency3++;
}
}
Answers
Take a look at this article: From several variables to arrays (and other Technical FAQ articles).