Login / Registrieren
DE EN FR ES IT CZ
Zurück Nach oben

Linking to URLs from HTML5 version

  • #1, by lukas 6 years ago Zitieren
    I use the same project to build for several platforms. My Windows and MacOS versions have objects that, when clicked, execute a script opening a URL in the standard browser (the ususal startDefaultBrowser("https://XXXXX")). When building the game for HTML5, these links won’t work. Is there a command that keeps the HTML5 version of the game in one tab and opens a URL in a new one (or a new browser window)?
  • #2, by SimonS 6 years ago Zitieren
    js([[window.open(url, '_blank').focus();]])
  • #3, by lukas 6 years ago Zitieren
    js([[window.open(url, '_blank').focus();]])
    Thanks! Just in case someone stumbles upon this, the link has to be formatted with single quotation marks ('https://www.visionaire-studio.net') and after a bit of experimenting I'd recommend to use 'self' instead of 'blank', as changing the tab seems to crash the game in Firefox.