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

(ANCC,HTMML5,video Component)The end of the video could not be detected.

Enthusiast ,
Oct 12, 2020 Oct 12, 2020

Copy link to clipboard

Copied

I need to play the video automatically and jump to the specified frame at the end.

I need help.

 

 

 

this.stop();
var op= this;

stage.on("drawstart", initVideo, this, true);
function initVideo() {

alert("yes")
$("#video1")[0].addEventListener("ended",nextFrame);
$("#video1")[0].play();
}
function nextFrame(evt) {
evt.currentTarget.removeEventListener("ended",nextFrame);
op.gotoAndStop("ed");
}

 

视频2.PNG

 

 

 

视频1.PNG

 

@JoãoCésar  @kglad  @Colin Holgate  @

Views

264

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

Community Expert , Oct 13, 2020 Oct 13, 2020

what's line 73 in video.js

Votes

Translate

Translate
Community Expert ,
Oct 13, 2020 Oct 13, 2020

Copy link to clipboard

Copied

your code is valid but animate v20.5.1 is broken.  test using another version.  (i know it works in v19.2.1)

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
Enthusiast ,
Oct 13, 2020 Oct 13, 2020

Copy link to clipboard

Copied

I switched to an older version.But it hasn't worked yet.

 

19.PNG191.PNG

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
Community Expert ,
Oct 13, 2020 Oct 13, 2020

Copy link to clipboard

Copied

what's line 73 in video.js

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
Enthusiast ,
Oct 13, 2020 Oct 13, 2020

Copy link to clipboard

Copied

73 The js file could not be connected.I changed to a managed library.(73)The error disappeared.

However, the other prompts are the same as the first prompts.

 

'addEventListener' of  Undefined.The same error prompt as version 20.

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
Enthusiast ,
Oct 13, 2020 Oct 13, 2020

Copy link to clipboard

Copied

Can you upload the source file?

I'd like to compare my File.

Find out what's going on on my side.

 

 

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
Enthusiast ,
Oct 13, 2020 Oct 13, 2020

Copy link to clipboard

Copied

I found a workable way.

It can now work well.

The problem is the stage or event.(stage.on ("drawstart")

Anyway, I can use it.

Thank you for your answer, too.

But I really want it to play automatically.

 

 


var ts=this


canvas.style.zIndex = "1"; 


var videoURL = "kc_1.mp4";

this.py.addEventListener("click", bfsp.bind(this));

function bfsp()
{ts.gotoAndStop('cc');
$("#video1")[0].src=videoURL;
$("#video1")[0].addEventListener("ended",nextFrame);
$("#video1")[0].play();
}

function nextFrame(evt) {
evt.currentTarget.removeEventListener("ended",nextFrame);
alert("22")
}
this.stop()

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
Community Expert ,
Oct 14, 2020 Oct 14, 2020

Copy link to clipboard

Copied

LATEST

you're welcome.

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