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

Unable to detect end of video for GoToAndPlay frame number since update on HTML5 Canvas

Community Beginner ,
Dec 26, 2019 Dec 26, 2019

Copy link to clipboard

Copied

Our digital project uses a video component to serve an mp4 video. We used the following code to detect when the video had ended, then GoToAndPlay a new frame. Since the update, this code no longer detects the end of the video, and the scene comes to a stop. 

The Code (placed on frame 1 on root timeline):

var _this = this;

_this.scene1_mc.on("added", funcion (){

      $("#scene1_mc").on("ended", function () {
             this.gotoAndPlay(42);

      });

});

Then the video component was named scene1_mc. This worked great all year, and still works on already published files. When publishing new ones, it breaks. Anyone know if any features relevant to this have been depreciated?

 

TOPICS
ActionScript , Publish package

Views

289

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

correct answers 1 Correct answer

LEGEND , Dec 26, 2019 Dec 26, 2019

The video component is just a thin wrapper around a native HTML5 <video> element, so Animate has no say about which events it fires. What's probably happening is that the event listener isn't being assigned at all. For example, if you misspelled "function" as "funcion" in your code.

 

Try sticking an alert("HELLO!"); statement in your "added" event handler to verify that it's actually running.

Votes

Translate

Translate
LEGEND ,
Dec 26, 2019 Dec 26, 2019

Copy link to clipboard

Copied

LATEST

The video component is just a thin wrapper around a native HTML5 <video> element, so Animate has no say about which events it fires. What's probably happening is that the event listener isn't being assigned at all. For example, if you misspelled "function" as "funcion" in your code.

 

Try sticking an alert("HELLO!"); statement in your "added" event handler to verify that it's actually running.

Votes

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