| Package | playerio |
| Class | public final class PlayerIO |
| Inheritance | PlayerIO Object |
| Property | Defined By | ||
|---|---|---|---|
| quickConnect : QuickConnect [static] [read-only]
Referance to a QuickConnect instance that allows you to easly connect with 3rd party user databases. | PlayerIO | ||
| Method | Defined By | ||
|---|---|---|---|
PlayerIO()
You cannot create an instance of the PlayerIO class, all use happens via static methods. | PlayerIO | ||
connect(stage:Stage, gameid:String, connectionid:String, userid:String, auth:String, partnerId:String, callback:Function, errorhandler:Function = null):void [static]
Authenticates and connects the game to the Player.IO webservices. | PlayerIO | ||
[static]
Referance to a GameFS instance that allows you to access GameFS
| PlayerIO | ||
showLogo(stage:Stage, align:String):void [static]
Gives you greater control over when and where the Player.IO logo is shown. | PlayerIO | ||
| quickConnect | property |
quickConnect:QuickConnect [read-only] Referance to a QuickConnect instance that allows you to easly connect with 3rd party user databases.
public static function get quickConnect():QuickConnect| PlayerIO | () | Constructor |
public function PlayerIO()You cannot create an instance of the PlayerIO class, all use happens via static methods.
Error — You cannot create an instance of the PlayerIO class!
|
| connect | () | method |
public static function connect(stage:Stage, gameid:String, connectionid:String, userid:String, auth:String, partnerId:String, callback:Function, errorhandler:Function = null):voidAuthenticates and connects the game to the Player.IO webservices.
Parameters
stage: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{...}
|
See also
| gameFS | () | method |
public static function gameFS(gameId:String):GameFSReferance to a GameFS instance that allows you to access GameFS
Parameters
gameId:String — the GameID of your game.
|
GameFS — An instance of GameFS
|
var url:String = PlayerIO.gameFS("game-id").getURL("game.swf")
| showLogo | () | method |
public static function showLogo(stage:Stage, align:String):voidGives 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.
Parameters
stage: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.
|