Skip to main content
Participant
Oct 19, 2018 2:46 AM UTC
Answered

How to add a button that links to a website

Hi everyone I know absolutely nothing about adobe animate CC but iv been assigned a task to create a link from a button on a video, I dont speak computer so please just include screenshots to show me what I need to do.

I am using Adobe Animate CC 2018

Kind regard, Angus

This topic is closed to new replies. Start a new post to keep the conversation going.
JoãoCésar17023019
JoãoCésar17023019Correct answer
Community Expert
Oct 19, 2018 2:04 PM UTC

Hi.

Please put this code in a frame of the timeline where your button is located.

JavaScript code:

function openWebPage()

{

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

}

this.linkButton.addEventListener("click", openWebPage);

FLA download:

animate_cc_html5_open_webpage.zip - Google Drive​

Don't forget to have a look at the Snippets panel for common interactivities.

Regards,

JC

3 replies

JoãoCésar17023019
Community Expert
JoãoCésar17023019Community ExpertCorrect answer
Community Expert
Oct 19, 2018 2:04 PM UTC

Hi.

Please put this code in a frame of the timeline where your button is located.

JavaScript code:

function openWebPage()

{

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

}

this.linkButton.addEventListener("click", openWebPage);

FLA download:

animate_cc_html5_open_webpage.zip - Google Drive​

Don't forget to have a look at the Snippets panel for common interactivities.

Regards,

JC

Translate
Known Participant
Mar 8, 2024 6:23 PM UTC

João César, I see that both your answer and the Animate Wizard give me options for opening the link in a new browser window. 

Is there JavaScript code to follow the link in the current browser window?

Thank you for your help in advance. 

Translate
kglad
Community Expert
Community Expert
Mar 8, 2024 6:33 PM UTC

instead of _blank, use _self

Translate