Game > Web


View our article on Web Requests for an explanation of these blocks.


Web Browser

Open URL in Browser

open url text in browser

Opens the given URL in the system's default web browser. On mobile devices, this will open up the browser app. To view pages in-game, use the Web Views extension.

For a Flash game you may need to give permissions to access the web.

openURLInBrowser([TEXT]);

HTTP Requests

GET Request

visit url text and then do...

Issues an HTTP GET request at the given URL, then executes the enclosed blocks if the request succeeded. The server's response is enclosed in the site's response block.

For a Flash game you may need to give permissions to access the web.

visitURL([TEXT], function(event:Event):Void {
  [ACTIONS]
});

POST Request

post data text to url text and then do...

Issues an HTTP POST request at the given URL with the given parameters, then executes the enclosed blocks if the request succeeded. The server's response is enclosed in the site's response block.

Parameters are pased in as key=value pairs, separated by ampersands (&), like this name=John&id=123456.

For a Flash game you may need to give permissions to access the web.

postToURL([TEXT], [TEXT], function(event:Event):Void {
  [ACTIONS]
});