Skip to main content
julianc96306437
Participating Frequently
June 1, 2023
Question

HTML5 Canvas: adding "Go to Web Page" code snippet makes browser display nothing when testing

  • June 1, 2023
  • 1 reply
  • 454 views

Hello! I'm working on an animated, interactive infographic in an HTML5 canvas document. I have a series of buttons that I intend to make open and close a corresponding series of infoboxes. This I've figured out how to do already; they work fine. What I'm hoping to do now is make certain parts of the text within these infoboxes link to web pages. The idea is simple: click a button, infobox above button appears, click text within infobox, you're taken to website. When I apply "Click to Go to Web Page" from the "Code Snippets" panel to the specific piece of text I want to make into a link, the browser displays nothing when I execute "Control > Test". I thought there was something I did the application didn't like, something to do with how I have things nested, etc. However, it seems the problem is way more simple than that. Before adding the Go to Web Page code snippet, the test works fine. I try adding a simple shape in Scene 1, at the top of the hierarchy, and apply the Go to Web Page code snippet, and, again, the browser displays nothing. Here's something weird: when I open the file, the test works fine, as I've not added any code snippet. I add the code snippet, run the test, blank browser. Now, when I undo back to before I've done anything, like it was when I opened the file, it does the blank browser thing again. That's baffling. Please help me. Also, I should mention, when I try to test on one of my computers, I get this message in the otherwise empty browser window: Error 404: Not Found File not found. Testing works fine on my desktop computer, however. Thanks! (Okay, apparently, I can't attach the Animate document to this message, even though it says that .fla files are supported, so what's up with that, btw? I'm about to lose my mind here.)

    This topic has been closed for replies.

    1 reply

    kglad
    Community Expert
    June 1, 2023

    what code are you using?

    julianc96306437
    Participating Frequently
    June 1, 2023

    julianc96306437
    Participating Frequently
    June 14, 2023

    that's as3 code. use the correct snippet group.


    Okay, so what snippet group should I use, and how do I use it?