Flash Access Basic User Info
From J2Play
Flash Challenge.getDisplayMessage() > Flash Access Player Profile > C++ ScoreController::SetScores() > Flash Challenge.getPlayerNumber() > Flash Access Basic User Info
The J2PlayController is the main interface class of J2Play library, and is accessible in your Flash game as the following:
Contents |
ActionScript 2
import ca.j2x.flash.IController; var j2play:IController = _global.controller;
ActionScript 3
import ca.j2x.flash.IController; import ca.j2x.flash.lang.Global; var j2play:IController = Global.vars.controller;
Basic interface
J2PlayController provides following APIs for basic information about J2Play environment.
- J2PlayController.getUsername() Get current user's username
- J2PlayController.getSessionID() Get current user's session ID
- J2PlayController.getNickname() Get current user's nickname
- J2PlayController.getPassword() Get current user's password
- J2PlayController.getGameID() Get game ID
- J2PlayController.getNetworkID() Get network ID
For a full interface description of the controller, look at j2play-flash-toolkit/[flash version]/interfaces/ca/j2x/flash/IController.as
