Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import processing.video.*;
- Movie myMovie;
- void setup() {
- size(1280, 720,P3D);
- myMovie = new Movie(this, "particulo.mp4");
- //myMovie.loop();
- myMovie.play();
- }
- int rOld;
- void draw() {
- int r = int(map(mouseY, 0, height, 1, 5));
- //println(r);
- if(rOld != r){
- myMovie.jump(r);
- rOld = r;
- }
- if (myMovie.available()) {
- //myMovie.read();}
- image(myMovie, 0, 0);
- }
- textSize(32);
- text(r, 20, 60);
- fill(255, 0, 0);
- //image(myMovie, mouseX, mouseY);
- }
- // Called every time a new frame is available to read
- void movieEvent(Movie m) {
- m.read();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement