Copy link to clipboard
Copied
I place start button in the frame 0 and video component in the frame 1(only autoplay check) and 2(loop), if I assign "click to go to frame 1 and play" HTML5 will skip video 1 because it is only 1 frame duration if I assign "click to go to frame 1 and stop" it will end at video 1 last frame and not play video 2 at frame 4.
I want to make HTML5 play nextframe after video at frame 1 END.
Thank you for reading.
Copy link to clipboard
Copied
this.stop();
var thisTimeline = this;
// video must not be set to autoplay
// video must not be set to loop
// wait until video component is fully initialized
stage.on("drawstart", initVideo, this, true);
// add event listener to video and tell it to play
function initVideo() {
$("#myMovieClip")[0].addEventListener("ended", nextFrame);
$("#myMovieClip")[0].play();
}
// remove event listener and continue
function nextFrame(evt) {
evt.currentTarget.removeEventListener("ended", nextFrame);
thisTimeline.gotoAndStop(thisTimeline.currentFrame + 1);
}
Copy link to clipboard
Copied
Copy link to clipboard
Copied
I'm having a similar issue but once the video ends I want it to jump back to frame 1. Basically, I have 4 buttons, each jumping to different frames to autoplay their specific videos. Once the video ends I want to automatically jump back to frame 1. Any help? Thanks in advance!