diff --git a/java/libraries/video/examples/Movie/Frames/Frames.pde b/java/libraries/video/examples/Movie/Frames/Frames.pde index 98fcf8328..6615216dc 100644 --- a/java/libraries/video/examples/Movie/Frames/Frames.pde +++ b/java/libraries/video/examples/Movie/Frames/Frames.pde @@ -1,6 +1,6 @@ /** - * Frames. - * by Andres Colubri + * Frames + * by Andres Colubri. * * Moves through the video one frame at the time by using the * arrow keys. It estimates the frame counts using the framerate diff --git a/java/libraries/video/examples/Movie/Reverse/Reverse.pde b/java/libraries/video/examples/Movie/Reverse/Reverse.pde index b86279744..a4d5bf3df 100644 --- a/java/libraries/video/examples/Movie/Reverse/Reverse.pde +++ b/java/libraries/video/examples/Movie/Reverse/Reverse.pde @@ -22,7 +22,7 @@ boolean once = true; void setup() { size(640, 360); background(0); - mov = new Movie(this, "transit.mov"); + mov = new Movie(this, "transit.mkv"); mov.play(); } diff --git a/java/libraries/video/examples/Movie/Scratch/Scratch.pde b/java/libraries/video/examples/Movie/Scratch/Scratch.pde index 066312eb8..dbd9fdcec 100644 --- a/java/libraries/video/examples/Movie/Scratch/Scratch.pde +++ b/java/libraries/video/examples/Movie/Scratch/Scratch.pde @@ -1,11 +1,11 @@ /** - * Scratch. - * by Andres Colubri + * Scratch + * by Andres Colubri. * * Move the cursor horizontally across the screen to set * the position in the movie file. */ - + import processing.video.*; Movie mov; @@ -22,19 +22,18 @@ void setup() { mov.pause(); } -void movieEvent(Movie m) { - m.read(); -} - void draw() { - // A new time position is calculated using the current mouse location: - float f = constrain((float)mouseX / width, 0, 1); - float t = mov.duration() * f; - if (mov.ready()) { + + if (mov.available()) { + mov.read(); + // A new time position is calculated using the current mouse location: + float f = map(mouseX, 0, width, 0, 1); + float t = mov.duration() * f; mov.play(); mov.jump(t); mov.pause(); - } + } + image(mov, 0, 0); } diff --git a/java/libraries/video/examples/Movie/Speed/Speed.pde b/java/libraries/video/examples/Movie/Speed/Speed.pde index c42b3cdfb..c08137651 100644 --- a/java/libraries/video/examples/Movie/Speed/Speed.pde +++ b/java/libraries/video/examples/Movie/Speed/Speed.pde @@ -1,5 +1,5 @@ /** - * GSVideo movie speed example. + * Speed. * * Use the Movie.speed() method to change * the playback speed. @@ -15,8 +15,6 @@ void setup() { background(0); mov = new Movie(this, "transit.mov"); mov.loop(); - - textSize(18); } void movieEvent(Movie movie) {