Hello Processors, thank you for your time. I am trying to place video-objects along the same y height but random x position, it works but it moves non stop. Also I am trying to scale, proportionally the object using the scale function unsuccessfully. Please take a look at my code, thank you.
import processing.video.*;
Movie myMovie;
int numVideos = 10;
Video[] videos = new Video[numVideos];
float groundY = 580;
void setup() {
size (640, 640);
myMovie = new Movie(this, "fogata.mp4");
myMovie.loop();
for (int i = 0; i < numVideos; i++) {
videos[i] = new Video(4096/10, 2160/10);
}
}
void draw() {
background(64);
stroke(255);
line(0, groundY, width, groundY);
for (Video video : videos) {
//Video.move();
video.display();
}
}
void movieEvent(Movie m) {
m.read();
}
class Video {
float rectX, rectY, rectW, rectH;
float rectSpeedX, rectSpeedY;
float y = 0;
Video (float w, float h) {
rectW = w;
rectH = h;
}
void display() {
for (float i = 0; i<0; i++) {
scale(-5*i);
}
image(myMovie, random(5)*50, y, rectW, rectH);
}
}