PlayerIO

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

ActionScript3 Reference

actionscript 3 GameRequests class informationClass GameRequests

Namespace: playerio
Language: ActionScript 3

The Player.IO GameRequests service

Properties

 
public
waitingRequests :Array [read-only]

The list of oldest received requests that are waiting to be processed and deleted.

Methods

 
public
refresh (callback:Function, errorCallback:Function):void

Refresh the list of received requests.

public
remove (requests:Array, callback:Function, errorCallback:Function):void

Delete the given requests. Will also update the Received property after deletion is complete.

public
send (requestType:String, requestData:Object, recipients:Array, callback:Function, errorCallback:Function):void

Send a GameRequest to the specified recipients.

public
showSendDialog (requestType:String, requestData:Object, callback:Function):void

Show a dialog to send GameRequests

GameRequests.waitingRequests

public
waitingRequests :Array [read-only]

The list of oldest received requests that are waiting to be processed and deleted.

GameRequests.refresh

public
refresh (callback:Function, errorCallback:Function):void

Refresh the list of received requests.

Arguments

callback:Function
Callback that will be called when the operation succeeds.
errorCallback:Function
Callback that will be called if the operation fails.

GameRequests.remove

public
remove (requests:Array, callback:Function, errorCallback:Function):void

Delete the given requests. Will also update the Received property after deletion is complete.

Arguments

requests:Array
The list of gameRequests to delete.
callback:Function
Callback that will be called when the operation succeeds.
errorCallback:Function
Callback that will be called if an error occurs during the operation

GameRequests.send

public
send (requestType:String, requestData:Object, recipients:Array, callback:Function, errorCallback:Function):void

Send a GameRequest to the specified recipients.

Arguments

requestType:String
The request type of the request to send.
requestData:Object
Data that will be available to the recipient of the request with information about the request. Useful for passing any kind of data to the recipient.
recipients:Array
The recipients to send this request to.
callback:Function
Callback that will be called when the operation succeeds.
errorCallback:Function
Callback that will be called if an error occurs during the operation

GameRequests.showSendDialog

public
showSendDialog (requestType:String, requestData:Object, callback:Function):void

Show a dialog to send GameRequests

Arguments

requestType:String
The request type of the request to send.
requestData:Object
Data that will be available to the recipient of the request with information about the request. Useful for passing any kind of data to the recipient.
callback:Function
Callback that will called when the dialog close, with information about the requests sent. NOTE: There is no way to tell if the end-user copied a link and sent it to another player.