Hello, this is the first time I use HTML5 build and I don’t know how to add external link? I want to redirect players to another website if they click a button. I found only this example:
function visitWebsite(event) if ( event.phase == "ended" ) then system.openURL( "http://example.com" ) end buttonGames:addEventListener("touch", visitWebsite);
Now, if I test the game in simulator and I click the button, it redirects me to the website.
But if I test it in browsers, it’s blocked by popup blockers. I tried Chrome, FIrefox and Opera.
Error: Failed not open
Try to disable popup blockers
I create HTML5/JS games and I can open links in a new tab without any problems
function visitWebsite() { window.open("http://example.com", "\_blank"); }