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?
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.
Copy link to clipboard
Copied
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.