alright, i know this is simple but I've come to a wall. basically heres what i want to do; load and loop a video, control the play speed as you go up the y coordinate by dragging your mouse. then, as you fall into the center of the video (x coordinate) it will trip video to play in reverse along with slowing down play speed as you continue to move down Y coordinate.
I've been using GS video library and this is the beginning of the sample code they supplied. any help or different approaches will be greatly appreciated.
/**
* GSVideo movie speed example.
*
* Use the GSMovie.speed() method to change
* the playback speed.
*
*/
import codeanticode.gsvideo.*;
GSMovie movie;
public void setup() {
size(320, 240);
background(0);
movie = new GSMovie(this, "balloon.ogg");
movie.loop();
PFont font = loadFont("DejaVuSans-24.vlw");
textFont(font, 24);
}
public void movieEvent(GSMovie movie) {
movie.read();
}
public void draw() {
image(movie, 0, 0, width, height);
float newSpeed = map(mouseX, 0, width, 0.1, 2);
movie.speed(newSpeed);
fill(240, 20, 30);
text(nfc(newSpeed, 2) + "X", width - 80, 30);
}
1