PImage webImg;
PImage webImg2;
PImage webImg3;
void setup() {
size(728,90);
webImg = loadImage("http://www.Rechenkraft.net/wiki/images/7/7f/RKNev.png");
 
 webImg2 = loadImage("https://img6.klamm.de/banner/o/234x60/klamm_234x60_o_12.gif");
  webImg3 = loadImage(" https://www.easyhits4u.com/img/banners/120x60_2.gif");

}
PImage imagest;
PImage imagest2;
PImage imagest3;
int c=60;
int cb=195;
int cf=60;
int cbf=30;

int run0=0;
int run1=0;
int red=255;
int green=0;
int red1=255;
int green1=0;

  float    mouseovery=0; 
float mouseoverx=0;
int once=0;
int tw=0;
  void draw() {
    
 
  mouseovery = mouseY;
  mouseoverx = mouseX;
  if(mousePressed&&once==0){

        
   if(red1>=230)text("Klickdauerabhänig! Multibanner!",mouseoverx/2-130 ,70);
       if(red1<=9){text("Klickdauerabhänig! Multibanner!" ,mouseoverx/2-130 ,70);red1=255;green1=0; }
    
    
    red1--;
    green1++;
      red--;
    green++;
    if(red<0){red=0;}
    if(green>254){green=255;}
 //   red1=red;green1=green;
  }else  {red=c;green=c; 
  if(red1>=230)text("Klickdauerabhänig! Multibanner!" ,mouseoverx/2-130 ,70);
       if(red1<=9){text("Klickdauerabhänig! Multibanner!" ,mouseoverx/2-130 ,70);red1=255;green1=0;tw=2; }
     if(red1<=99&&red1>=9&&once==0){once=1; ; link("https://www.rechenkraft.net/");}
           if(red1>=100&&red1<=179&&once==0){once=1; ; link("https://www.easyhits4u.com/?ref=xquantum725");}
    if( red1>=180&&red1<=229&&once==0){once=1; ; link("https://www.klamm.de/?refid=507075");}
   if(red1>=230)text("Klickdauerabhänig! Multibanner!" ,mouseoverx/2-130 ,70);
  
     }

  if(run0==1){

if(cb>=200){cbf=cbf+(int)random(-2,3);cb=cb+cbf*(int)mouseoverx/150;}else  {cbf=cbf+(int)random(-2,5);cb=cb+cbf*(int)mouseoverx/100;;}


if(cb>=254){run0=0;cb=255;cbf=0;}
    fill(cb);
    rect(0,0,728,90);
  }
  
  
  if(run0!=1){
 
  if(cb<=70){cbf=cbf+(int)random(-3,2);cb=cb+cbf*(int)mouseovery/150;;}else { cbf=cbf+(int)random(-5,2);cb=cb+cbf*(int)mouseovery/100;;}
    if(cb<=1){run0=1;cb=0;cbf=0;}
    fill(cb);
    rect(0,0,728,90);
  }
  
  
  
  
  if(run1==0){    
if(c>=200){cf=cf+(int)random(-2,3);c=c+cf*(int)mouseoverx/100;;}else { cf=cf+(int)random(-2,5);c=c+cf*(int)mouseoverx/150;;}


if(c>=255){run1=1;c=255;cf=0;}

  fill(red,green,red);

    textSize(50);
   
   if(red1>=230)text("Klickdauerabhänig! Multibanner!" ,mouseoverx/2-130 ,70);else 
  
if(red1>=180&&red1<=229){ if (webImg2 != null){                           //wenn ein bild vorhanden ist das bild.png heißt tue:
        
     
    
  image(webImg2, 0, 0);
 if ((mouseoverx >= 0 && mouseoverx <= 88) && (mouseovery  >= 0 && mouseovery  <=31)) {//??
    }}; text("www.klamm.de Ready!" ,mouseoverx/2-200 ,70);}else
    if(red1>=99&&red1<=179){     if (webImg3 != null){                           //wenn ein bild vorhanden ist das bild.png heißt tue:
        
     
    
  image(webImg3, 0, 0);
 if ((mouseoverx >= 0 && mouseoverx <= 120) && (mouseovery  >= 0 && mouseovery  <=60)) {//??
    }}; text("www.easyhits4u.com Ready!" ,mouseoverx/2-200 ,70);}else
        if(red1>=10&&red1<=99){     if (webImg != null){                           //wenn ein bild vorhanden ist das bild.png heißt tue:
        
     
    
  image(webImg, 0, 0);
 if ((mouseoverx >= 0 && mouseoverx <= 120) && (mouseovery  >= 0 && mouseovery  <=84)) {//??
    }};text("Rechenkraft.net Spende Rechnenzeit!" ,mouseoverx/2-200 ,70);}else
         if(red1<=9)text("Klickdauerabhänig! Multibanner!" ,mouseoverx/2-130 ,70);
    
    
    
  }
  
  if(run1==1){    
  if(c<=50){cf=cf+(int)random(-3,2);c=c+cf*(int)mouseovery/100;}else { cf=cf+(int)random(-5,2);c=c+cf*(int)mouseovery/150;;}
    if(c<=0){run1=0;c=0;cf=0;}


  fill(red,green,red);

    textSize(50);
   

  
   if(red1>=230)text("Klickdauerabhänig! Multibanner!" ,mouseoverx/2-130 ,70);else 
  
if(red1>=180&&red1<=229){ if (webImg2 != null){                           //wenn ein bild vorhanden ist das bild.png heißt tue:
        
     
    
  image(webImg2, 0, 0);
 if ((mouseoverx >= 0 && mouseoverx <= 234) && (mouseovery  >= 0 && mouseovery  <=60)) {//??
    }}; text("www.klamm.de Ready!" ,mouseoverx/2-200 ,70);}else
    if(red1>=99&&red1<=179){     if (webImg3 != null){                           //wenn ein bild vorhanden ist das bild.png heißt tue:
        
     
    
  image(webImg3, 0, 0);
 if ((mouseoverx >= 0 && mouseoverx <= 120) && (mouseovery  >= 0 && mouseovery  <=60)) {//??
    }}; text("www.easyhits4u.com Ready!" ,mouseoverx/2-200 ,70);}else
        if(red1>=10&&red1<=99){     if (webImg != null){                           //wenn ein bild vorhanden ist das bild.png heißt tue:
        
     
    
  image(webImg, 0, 0);
 if ((mouseoverx >= 0 && mouseoverx <= 120) && (mouseovery  >= 10 && mouseovery  <=94)) {//??
  }};text("Rechenkraft.net Spende Rechnenzeit!" ,mouseoverx/2-200 ,70);}
   if(red1<=9)text("Klickdauerabhänig! Multibanner!" ,mouseoverx/2-130 ,70);
  }
 
  if(mousePressed){
        strokeWeight(1);
        stroke(0, 255,0);
        //translate(20, 20, 20);
        line (0,0, mouseoverx, mouseovery);  
        line (728,0, mouseoverx, mouseovery); 
        line (728,90, mouseoverx, mouseovery); 
        line (0,90, mouseoverx, mouseovery); 
        
        float winkel;
        float laenge; 
        float dx;  
        float dy;  
        stroke(255, 200);  
        strokeWeight(2);  
        smooth(); 
        int i=0;
        
    while ( i < red1/2-mouseoverx/mouseovery) { 
        
                 
 

  
     
   float dz=0;
    
      i++;  
        winkel = random(3*PI);    
        laenge = random(min(abs(width/2), height));   
        dx = cos(winkel*mouseoverx/mouseovery)*laenge;   
        dy = sin(winkel*mouseoverx/mouseovery)* laenge; 
          dz = tan(winkel)* laenge; 
              stroke(dy+laenge+red+mouseoverx/mouseovery,dx+laenge+red1+mouseoverx/mouseovery,dz+laenge+green+mouseoverx/mouseovery,170+mouseoverx/mouseovery);
         

        line (40+cb+dx-c+mouseoverx, 40+green+dy-cb+mouseovery,abs(mouseoverx) , abs(mouseovery));  
      noStroke();
  fill(0);
  

  
  
      }
}
  
  }
