Player.IO

Build fun, powerful & scalable online and mobile games with the reliable backend your users expect

Sign Up | Sign In

ActionScript3 Reference

actionscript 3 PlayerIO class informationClass PlayerIO

Namespace: playerio
Language: ActionScript 3

API wrapper that is used to connect to the PlayerIO webservices

Properties

 
public static
quickConnect :playerio:QuickConnect [read-only]

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.

quickConnect

Referance to a QuickConnect instance that allows you to easly connect with 3rd party user databases.

Return Value

connect

Authenticates and connects the game to the Player.IO webservices.

Arguments

flash.display:Stage stage
A reference to the base stage of your project.
String gameid
Unique ID that identifies which game the client will try to connect to
String connectionid
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.
String userid
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.
String auth
User auth. Can be left blank if the connection identified by connectionid does not require authentication.
String partnerId
String that identifies a possible affiliate partner.
Function callback
Function executed on successful connect: function(client:Client):void{...}
Function errorhandler
Function executed if the request failed: function(error:PlayerIOError):void{...}

gameFS

Referance to a GameFS instance that allows you to access GameFS

Arguments

String gameId
the GameID of your game.

Return Value

playerio:GameFS

Example

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

showLogo

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

flash.display:Stage stage
A reference to the base stage of your project.
String align
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.