I would try something like this:
(You need to be online for image to load.)
- PImage standForVideo;
- int alphaVal = 255;
- void setup() {
- size(500, 332);
- standForVideo = loadImage("http://www.hightech-edge.com/wp-content/uploads/chad-estes-slow-shutter-shots.jpg");
- noStroke();
- }
- void draw() {
- image (standForVideo, 0, 0);
- if (!mousePressed && alphaVal < 255) {
- alphaVal ++;
- }
- else if (mousePressed && alphaVal > 0) {
- alphaVal--;
- }
- fill(0, 30, 150, alphaVal);
- rect(0, 0, width, height);
- println(alphaVal);
- }