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

HMTL5 Video Event Listener

Community Beginner ,
May 13, 2017 May 13, 2017

Copy link to clipboard

Copied

Hi, I'm new to scripting in AS3 so I apologise if I'm just doing something really stupid...

I'm having trouble getting any video event listeners to work.

I want to use html5 to load a video and do something (go to a specific frame etc) when it ends.

I've looked for examples, but haven't got any to work, lots seem to be written for Edge, but I can't get any to work.

Failing this, can anyone explain why my video in an AIR file looks pixelated? Only choosing html5 as the video looks better.

Thanks, Dan.

PS: I'm using the 2017.2 version of Animate.

Views

297

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 , May 15, 2017 May 15, 2017

You were probably trying to address the component before it had initialized. Timeline code executes first, then any clips/components after that. Usually waiting one frame allows everything to fully initialize.

Votes

Translate

Translate
Community Beginner ,
May 15, 2017 May 15, 2017

Copy link to clipboard

Copied

It seems that I was trying to do everything too quick.

If I leave the adding of an event listener until frame 5, it works.

I think it was trying to add the event listener before (or at the same time as) it was trying to actually make the html5 video item.

There's probably a preload setting I should be using, but for now this workaround is doing the trick.

If somebody knows how to do this properly, I'd be grateful to hear how.

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
LEGEND ,
May 15, 2017 May 15, 2017

Copy link to clipboard

Copied

How on Earth are you using HTML5 video in an AS3 document?

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 Beginner ,
May 15, 2017 May 15, 2017

Copy link to clipboard

Copied

Yeah, javascript... I meant to say I haven't touched Actions since AS2 - a loooooooong time ago.

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
LEGEND ,
May 15, 2017 May 15, 2017

Copy link to clipboard

Copied

LATEST

You were probably trying to address the component before it had initialized. Timeline code executes first, then any clips/components after that. Usually waiting one frame allows everything to fully initialize.

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