xxxxxxxxxx
// i left off with trying to:
//1. get the videos centered
//2. get them all to play with different keypressed functions
//3. possibly getting them to all play randomly with the array
let currentclip=1 ;
var clips;
var lastvideo;
// videos
let clip1;
let clip2;
let clip3;
let clip4;
let clip5;
function preload(){
}
function setup() {
createCanvas(600, 900);
background(100);
clips = ["clip1", "clip2", "clip3","clip4"]
let currentclip = random(clips);
clip1 = createVideo ("clip1.mov") ;
clip1.loop();
clip1.hide();
clip2 = createVideo ("clip2.mov") ;
clip2.loop();
clip2.hide();
clip3 = createVideo ("clip3.mov") ;
clip3.loop();
clip3.hide();
clip4 = createVideo ("clip4.mov") ;
clip4.loop();
clip4.hide();
clip5 = createVideo ("clip5.mov") ;
clip5.loop();
clip5.hide();
}
function draw() {
if (currentclip == clip1){
image("clip1" ,0, 0, 600, 900); // draws video
print("clip1");
}
if (currentclip == clip2){
image(clip2,0, 0, 600, 900);
}
if (currentclip == clip3){
image(clip3,0, 0, 600, 900);
}
if (currentclip == clip4){
video.loop () ;// plays video
image(clip4,0, 0, 600, 900);
}
if (currentclip == clip5){
video.loop () ;// plays video
image(clip5,0, 0, 600, 900);
}
}
function keyPressed(){
currentclip ++
}