Jump to content

HTML5 Games in Animate CC


Recommended Posts

Hello Guys,

I'm Emanuel, i'm new on this forum and I want to ask you something about HTML5 games created in Animate CC.

There is an alternative for external links in Animate CC for HTML5 Games ? I'm using this code: 

this.button.addEventListener("click", button_fun);

function button_fun() {
	window.open("http://www.mysite1.com", "_blank");

But i think isn't working for all the users, because my click rate on buttons was decreased.

Thanks in advance!


Link to comment
Share on other sites

I'm not sure how Animate CC works but as you're grabbing a DOM node to append an event listener I'm guessing you can create DOM fairly easily, just add an anchor tag to your DOM:

<a href="http://mysite1.com" target="_blank">Click Me</a>

The browser knows this is a link to an external site, it knows nothing about the JS that you were previously using. This means robots indexing your site can understand it better, which gives you a better ranking. Screenreaders can understand it (might not be an issue for a game). It also keeps unnecessary JS from cluttering your files.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...