ActionScript3 Reference
Class PlayerIO
Namespace: playerio
Language: ActionScript 3
API wrapper that is used to connect to the PlayerIO webservices
Properties
|
| public static |
Referance to a QuickConnect instance that allows you to easly connect with 3rd party user databases.
|
Methods
|
| public static |
| connect |
(stage:flash.display:Stage, gameid:String, connectionid:String, userid:String, auth:String, partnerId:String, callback:Function, errorhandler:Function = null):void |
Authenticates and connects the game to the Player.IO webservices.
|
| public static |
| gameFS |
(gameId:String):playerio:GameFS |
Referance to a GameFS instance that allows you to access GameFS
|
| public static |
| showLogo |
(stage:flash.display:Stage, align:String):void |
Gives you greater control over when and where the Player.IO logo is shown. If this method is called, the logo will not appear when you connect to player.io via playerio.connect nor via QuickConnect.
|
PlayerIO.quickConnect
Referance to a QuickConnect instance that allows you to easly connect with 3rd party user databases.
PlayerIO.connect
| public static |
| connect |
(stage:flash.display:Stage, gameid:String, connectionid:String, userid:String, auth:String, partnerId:String, callback:Function, errorhandler:Function = null):void |
|
Authenticates and connects the game to the Player.IO webservices.
Arguments
|
stage:flash.display:Stage |
|
A reference to the base stage of your project. |
|
gameid:String |
|
Unique ID that identifies which game the client will try to connect to |
|
connectionid:String |
|
Id of the connection to use when connecting to the game. Usually this is "public" unless you've set up different connections in the Player.IO admin panel. |
|
userid:String |
|
Unique identifier of the current user playing the game. This can be supplied by you, or a a third party. Example userids are Username, Facebook UserID, OpenID Url etc. |
|
auth:String |
|
User auth. Can be left blank if the connection identified by connectionid does not require authentication. |
|
partnerId:String |
|
String that identifies a possible affiliate partner. |
|
callback:Function |
|
Function executed on successful connect: function(client:Client):void{...} |
|
errorhandler:Function (Default = null) |
|
Function executed if the request failed: function(error:PlayerIOError):void{...} |
PlayerIO.gameFS
| public static |
| gameFS |
(gameId:String):playerio:GameFS |
|
Referance to a GameFS instance that allows you to access GameFS
Arguments
|
gameId:String |
|
the GameID of your game. |
Example
Example of how to request the file game.swf from your games GameFS via PlayerIO
PlayerIO.showLogo
| public static |
| showLogo |
(stage:flash.display:Stage, align:String):void |
|
Gives you greater control over when and where the Player.IO logo is shown. If this method is called, the logo will not appear when you connect to player.io via playerio.connect nor via QuickConnect.
Arguments
|
stage:flash.display:Stage |
|
A reference to the base stage of your project. |
|
align:String |
|
Where should the logo appear. Valid values are TL, CL, BL, TC, CC, BC, TR, CR, BR. The first letter stands for vertical position Top, Center or Bottom. The second letter is for horizontal position Left, Center or Right. |