Hello, I need help. Currently, I have a gif animation running in processing. However, I would like to have a white image over the running gif. Then when the pressure sensor is pressed, have the white image fade out to reveal the gif and when the pressure sensor is release have the white image fade back over the gif. Is this even possible? If so, what is my next step? I have included the I have written, and a code I have been using that incorporates the pressure sensor. I have been trying to meld the two, but I am having trouble. Thank you!
MY CODE
import fullscreen.*;
import processing.serial.*;
FullScreen fs;
Serial myPort; // The serial port
int numFrames = 13; // The number of frames in the animation
int frame = 0;
PImage[] images = new PImage[numFrames];
int transparency = 0;
int clickTime = 0;
float inByte = 0;
boolean readyToChange = false;
void setup()
{
size(1024, 768);
println(Serial.list());
myPort = new Serial(this, Serial.list()[0], 9600);