Skip to main content
Participating Frequently
January 18, 2023
Question

Button with hyperlink not working

  • January 18, 2023
  • 1 reply
  • 2809 views

Hello, I'm trying to add a button with an hyperlink to a page on my website to the last frame (the animation is programmed to stop after the last frame) of an HTML5 Canvas animation; when I try the animation in preview the link just works fine, but when I publish it it does not work. What am I missing? Here's the code I added to the action timeline at the last frame:

this.button_1.addEventListener("click", fl_ClickToGoToWebPage);

function fl_ClickToGoToWebPage() {
window.open("https://www.soildao.org/onepager.pdf", "_blank");
}
this.stop();

    This topic has been closed for replies.

    1 reply

    kglad
    Community Expert
    January 18, 2023

    open your browser's developer console and check for errors.

    -ppixAuthor
    Participating Frequently
    January 20, 2023

    Any suggestion?

    -ppixAuthor
    Participating Frequently
    January 21, 2023

    those aren't errors (and they don't look like the developer console).  what's the url (if uploaded to a web server) of your html?


    It's https://www.soildao.org