We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi,
I am coding a program that allows the user to click on the movie and if the movie is done it will replay the movie. The issue that I am using an IF statement(below) to check if the movie is currently playing by checking if the time is less than or more than the duration, but the time seems to go past the duration ( I put the movie into the example sketch where it shows frames and when the movie was done it said 123/86) is there a reason for this? or a better way for me to check if the video is currently playing?
CODE
// tests to see if a movie is playing
if (mov.time() < mov.duration() && mov.time() > 0) {
}
// tests to see if if mouse is clicked
else if ( mouseclicked == true) {
//checks if the mouse is over the 1st surface
if (isMouseOver2 == true) {
d = 0;
// play the file
player.play();
}
else
//checks if the mouse is over the 2nd surface
if (isMouseOver3 == true) {
f = 0;
//sets the frame position to 0
mov.jump(0);
//plays the movie
mov.play();
}
}
else if (mov.time()>mov.duration()) {
d=0;
}
Answers
Could you include the code that actually prints those frame values?
I have the same problem and had to put a hard coded delay - not good! I wonder what the proper solution is?
Sorry to those who have looked at this/responded. I completely forgot i posted this. I cannot remember how exactly i fixed this issue, but i believe it was a frame rate issue with the actual videos and that i just re-rendered the videos and a different frame rate.