• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Listener for end of video playback

Participant ,
Nov 07, 2021 Nov 07, 2021

Copy link to clipboard

Copied

I have done this several times before, about two years ago. Simple HTML5 touch screen interactive to play a selection of MP4's. When each video finished it would return to screen with selection buttons. But now, when the videos finish it just hangs on video player frame.

 

Here is my test: https://rickgodin.net/test2/test2.html 

 

Here is the movie end listener code I'm using:

this.stop();

var root = this;

this.movie1.on("added", function() {

$("#movie1").on("ended", function() {

movetoMenu();

});

});

function movetoMenu() {
console.log("go back to menu");
root.gotoAndStop(0);
}

 

If I did this more than every 2 years I am sure I would remember the trick.

 

Thanks in advance, rg

TOPICS
ActionScript , Code , Other , Timeline

Views

75

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation