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.
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.
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.
Copy link to clipboard
Copied
How on Earth are you using HTML5 video in an AS3 document?
Copy link to clipboard
Copied
Yeah, javascript... I meant to say I haven't touched Actions since AS2 - a loooooooong time ago.
Copy link to clipboard
Copied
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.