PlayerIO

The fastest way to build online games without breaking a sweat.

HTML5 (Javascript) Client Reference

javascript (html5) gameFS class informationClass gameFS

Language: Javascript (HTML5)

The GameFS service. This class is used to get an absolute URL for assets you have stored in GameFS.

Example

Example of how to request the file game.swf from your games GameFS via PlayerIO

Example

Example of how to request the file game.swf from your games GameFS via client

Methods

 
getUrl (path, secure):string

Converts a GameFS path (like '/mygame.swf') into a full url, that can be downloaded over the internet. Important! Do not save or otherwise persist (bigdb, cookies, etc) the returned url, since the url will change over time.

gameFS.getUrl

getUrl (path, secure):string

Converts a GameFS path (like '/mygame.swf') into a full url, that can be downloaded over the internet. Important! Do not save or otherwise persist (bigdb, cookies, etc) the returned url, since the url will change over time.

Arguments

path:string
The path of the file in the GameFS, including the initial slash. Examples: '/mygame.swf' or '/characters/bob.jpg'
secure:boolean
If true, this method returns a secure (https) url.