PROGRAMA
import processing.video.*;
/**
* Loop.
*
* Move the cursor across the screen to draw.
* Shows how to load and play a QuickTime movie file.
*/
import processing.video.*;
Movie myMovie;
String videos[];
boolean presiona = true;
void setup() {
size(640, 480, P3D);
background(0);
// Load and play the video in a loop
myMovie = new Movie(this, "rojofinal.mov");
videos = new String[10];
videos[0]="amarillofinal";
videos[1]="blancofinal";
videos[2]="cafefinal";
videos[3]="grisfinal";
videos[4]="morado final";
videos[5]="naranjafinal";
videos[6]="negrofinal";
videos[7]="rojofinal";
videos[8]="rosadofinal";
videos[9]="verdefinal";
myMovie.loop();
fill(0);
}
void draw() {
tint(255, 20);
image(myMovie, -10,-10);
}
//Called every time a new frame is available to read
void keyPressed() {
if(presiona){
myMovie = new Movie (this, videos [floor (random(10))]+".mov");
presiona = false; }
myMovie.read();
}
void keyReleased(){
presiona=true;
rect(0,0,width,height);
}
viernes, 14 de diciembre de 2007
Suscribirse a:
Enviar comentarios (Atom)
No hay comentarios:
Publicar un comentario