Change colors on different objects blinking

@debxyz Thank you …
I did try place this code in many places along… each one one diferent result. what is nice… Learning!!

What is see is that the draw on top of the objects doesn’t stay the same as on the canvas… (am i clear?! sorry)

this is what i place wich draw the flower on top of every thing… Check out how the flower draw is on top and a side…
And in this way the flower draw stay permanent as a “line” on top objets and a flowting** draw a side of them… and if you look on top of the objects when is only one clic estay a DOT, not a flower as out side. ( you will see) [ i m working on it! :slight_smile: )

In the next code, the draw only appears when mouse is pressed. we draw, desappear then clic and the draw show up. What is nice too…

//String[] sentences={"VrtX_@rT"};


float xRed = 62, xGreen = 20, xBlue = 173;
float yRed = 207, yGreen = 1, yBlue = 106;

boolean backwards=false;
int timeLapse=400;
int timeTrack;

int angle = 0;

PShader blur;

PGraphics flowers;
void setup() {
  size(800, 800);
  background(102);
  noStroke();
  fill(0, 102);
  
  flowers = createGraphics(800, 800);

  timeTrack=millis()+timeLapse;

  blur = loadShader("blur.glsl");
}

void draw() {


  int m = millis();    // start flash rec
  int p1 = m % 200;    // velocity
  fill(606, 0, p1); // color 
  rect(0, 0, 555, 355);  // end ret flash
  
  
   int m1 = millis();
   int p = m1 % 200;   // velocity
   fill(p, 70, 200);  // here it is, purple and blue : )
  circle(80,75, 220);
  
   
  int m2 = millis();
  int p2 = m2 % 200;
   fill(p2, 100, 255, 200);                  //fill(m2 % 250);
  triangle(120, 750, 232, 450, 344, 750);
  

                           //Next inverts diretion o ellipse colors
  if (millis()>timeTrack) {
    timeTrack=millis()+timeLapse;
    backwards=!backwards;
  }


  float per = (timeTrack-millis())/float(timeLapse);
  if (backwards==true) {
    per = 1-per;
  }

  surface.setTitle(nf(per*100, 3, 2)+"% Flag="+backwards);
  fill(lerpColor(color(xRed, xGreen, xBlue), color(yRed, yGreen, yBlue), per));
  ellipse(width/2, height/2, 300, 300);
                                          //End ellipse code
                                         
                                    
   int m4 = millis();
  fill(m4 % 200);
  circle(520,520, 120);
 
 
    if (mousePressed == true) {
 flowers.beginDraw();
 flowers.fill(0);
 flowers.ellipse(mouseX, mouseY, 5, 5);
 flowers.endDraw(); 
  }
   image(flowers, 2, 2);
  
  
  // Start Drawing on canva with the mouse pressed
  
  if (mousePressed == true) {
    angle += 5;
    float val = cos(radians(angle)) * 12.0;
    for (int a = 0; a < 360; a += 75) {
      float xoff = cos(radians(a)) * val;
      float yoff = sin(radians(a)) * val;
      fill(0);
      ellipse(mouseX + xoff, mouseY + yoff, val, val);
    }
    

   
   
    fill(255);
    ellipse(mouseX, mouseY, 2, 2);
    // Drwaing on canva code
  }
}

the second, when clic and appear…

//String[] sentences={"VrtX_@rT"};


float xRed = 62, xGreen = 20, xBlue = 173;
float yRed = 207, yGreen = 1, yBlue = 106;

boolean backwards=false;
int timeLapse=400;
int timeTrack;

int angle = 0;

PShader blur;

PGraphics flowers;
void setup() {
  size(800, 800);
  background(102);
  noStroke();
  fill(0, 102);
  
  flowers = createGraphics(800, 800);

  timeTrack=millis()+timeLapse;

  blur = loadShader("blur.glsl");
}

void draw() {


  int m = millis();    // start flash rec
  int p1 = m % 200;    // velocity
  fill(606, 0, p1); // color 
  rect(0, 0, 555, 355);  // end ret flash
  
  
   int m1 = millis();
   int p = m1 % 200;   // velocity
   fill(p, 70, 200);  // here it is, purple and blue : )
  circle(80,75, 220);
  
   
  int m2 = millis();
  int p2 = m2 % 200;
   fill(p2, 100, 255, 200);                  //fill(m2 % 250);
  triangle(120, 750, 232, 450, 344, 750);
  

                           //Next inverts diretion o ellipse colors
  if (millis()>timeTrack) {
    timeTrack=millis()+timeLapse;
    backwards=!backwards;
  }


  float per = (timeTrack-millis())/float(timeLapse);
  if (backwards==true) {
    per = 1-per;
  }

  surface.setTitle(nf(per*100, 3, 2)+"% Flag="+backwards);
  fill(lerpColor(color(xRed, xGreen, xBlue), color(yRed, yGreen, yBlue), per));
  ellipse(width/2, height/2, 300, 300);
                                          //End ellipse code
                                         
                                    
   int m4 = millis();
  fill(m4 % 200);
  circle(520,520, 120);
 
 
  
  // Start Drawing on canva with the mouse pressed
  
  if (mousePressed == true) {
    angle += 5;
    float val = cos(radians(angle)) * 12.0;
    for (int a = 0; a < 360; a += 75) {
      float xoff = cos(radians(a)) * val;
      float yoff = sin(radians(a)) * val;
      fill(0);
      ellipse(mouseX + xoff, mouseY + yoff, val, val);
    }
      
    fill(255);
    ellipse(mouseX, mouseY, 2, 2);
    // Drwaing on canva code
    
           if (mousePressed == true) {
 flowers.beginDraw();
 flowers.fill(0);
 flowers.ellipse(mouseX, mouseY, 5, 5);
 flowers.endDraw(); 
  }
   image(flowers, 2, 2);
  }
}

The flower draw in some cases stay visible, because i let the objets in Alpha, transluced…

Thank you for your time !!