Skip to main content
connie mariaw84248761
Participant
August 12, 2019
Question

Action to open a new webpage after playing a video?

  • August 12, 2019
  • 1 reply
  • 306 views

Hi everybody,

I am looking for an action i html5 canvas to open a new webpage immediately after running a short video intro. I can only find the 'onclick'-action, but I need an action that opens a new webpage without any activity from the user. Can it be done?

Best Regards,

Rasmus Jelbo

This topic has been closed for replies.

1 reply

JoãoCésar17023019
Community Expert
Community Expert
August 12, 2019

Hi.

If your video instance name is video0 and the loop property is false, you could write this:

var video;

setTimeout(function() // a delay is needed to reference components in Animate CC

{

    video = document.querySelector("#video0");

  

    video.onended = function(e)

    {

        window.open("https://www.adobe.com/", "_blank");

    };

}, 0);

Regards,

JC

Participant
March 2, 2022

Hi,

 

I know it's old but I had the same question and I tried exactly this but it's not working.

(I use Animate in HTML5 Canvas and I set the loop to of and the instance name of my video is video0)

But at the end of the video nothing happens.

 

Best regards