Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need to seek a movie using the scroll wheel #215

Open
le-Screwball opened this issue Mar 10, 2023 · 0 comments
Open

Need to seek a movie using the scroll wheel #215

le-Screwball opened this issue Mar 10, 2023 · 0 comments

Comments

@le-Screwball
Copy link

le-Screwball commented Mar 10, 2023

Is there way to call for the next frame of the movie only when a scroll wheel event is triggered ? The code i have so far updates to the current frame every time the scroll wheel is scrolled down(the movie seems to be playing in the background without being updated), not to the frame after the most recent frame displayed.

import processing.video.*;

Movie myMovie;

void setup() {
size(1920, 1080);
myMovie = new Movie(this, "1.mov");
myMovie.play();
}

void mouseWheel(MouseEvent event) {

float delta = event.getCount();
if (delta > 0) {
myMovie.read();
} else if (delta < 0) {

}
println(delta);
delta = 0;
}

void draw() {
background(0);
image(myMovie, 0, 0);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant