How to make an image disappear with a mouse move
in
Programming Questions
•
4 months ago
HI!!!!
We are very "amateur" in Processing stuff and we are trying to design I simple behavior:
We need to make and jpeg image desapear and apear with the mouse movement.
Do you know the code we must use?
This is what we have right now:
int a;
PImage img1;
PImage img2;
void setup()
{
size(900,600,P3D); // or however big you need.
img1=loadImage("554037_446371552108299_1763329318_n.jpg");
img2=loadImage("calma.jpg");
a=0;
}
void draw()
{
background(0);
noTint();
image(img1,0,0);
tint(255,255,255,a);
image(img2,0,0);
if(a<255)
a++;
}
we are waiting for your answer!!!!
Thanks a lot!!
1