martes, 8 de noviembre de 2011

Trabajo con imagenes, musica y mouse.



import ddf.minim.*;

Minim minim;
AudioPlayer in ;

PImage b;
PImage img2;

float speed = 2.5;
int diameter = 20;
float x ;
float y ;

void setup (){
 minim = new Minim (this);
in = minim.loadFile("Shine on.mp3");
in.play();

  size(600,600);
 smooth();
 x=width/2;
 y=height/2;

img2 = loadImage("caracol.jpg");
 }



void draw(){
  b = loadImage ("flor.jpg");
  image (b, 0, 0);

  x+= random (-speed,speed);
  y+= random (-speed,speed);
  translate(mouseX,mouseY);
 image(img2, 0,0);

}

No hay comentarios:

Publicar un comentario