Property | Defined By | ||
---|---|---|---|
data : Object
Get the last response data object; Available after IDNET Event. | IDNET | ||
isBlacklisted : Boolean [read-only]
Returns true if game is hosted in one of blacklisted sites. | IDNET | ||
isInterfaceOpen : Boolean [read-only]
The same as InterfaceOpen() method but in property form. | IDNET | ||
isLoggedIn : Boolean [read-only]
Check if a user is already logged in. | IDNET | ||
isProtectionLoaded : Boolean [read-only]
Returns true if protection state is loaded and handled. | IDNET | ||
isSponsor : Boolean [read-only]
Returns true if game is hosted in one of sponsored sites. | IDNET | ||
_loggedIn : Boolean = false | IDNET | ||
_timeMachine : TimeMachine | IDNET | ||
type : String
Get the last response type; Available after any IDNET Event. | IDNET | ||
_user : Object | IDNET | ||
userData : * [read-only]
Get last saved user data without making a new connection. | IDNET | ||
_userThumb : MovieClip
A movie clip object of the user profile picture. | IDNET | ||
_verbose : Boolean = true | IDNET |
Method | Defined By | ||
---|---|---|---|
IDNET()
The IDnet Flash interface allows secure authentication across applications. | IDNET | ||
achievementsList():void
List all achievements setup at id.net. | IDNET | ||
achievementsSave(achName:String, achKey:String, playerName:String, overwrite:Boolean = false, allowDuplicates:Boolean = false):*
When a player has reached a milestone, save an achievement to their account. | IDNET | ||
advancedScoreList(table:String, highest:Boolean = true, allowDuplicates:Boolean = false, useMilliseconds:Boolean = false):*
List scores using the advanced scores. | IDNET | ||
advancedScoreListCustom(table:String, mode:String, perPage:int, page:int, highest:Boolean, allowDuplicates:Boolean):*
List scores using the advanced scores and a custom interface. | IDNET | ||
advancedScoreListPlayer(table:String, highest:Boolean = true, allowDuplicates:Boolean = false):*
List the player's score(s). | IDNET | ||
advancedScoreSubmit(points:int, table:String, playerName:String, highest:Boolean = true, allowDuplicates:Boolean = false):*
Submit a id.net player's score using the advanced scores
| IDNET | ||
advancedScoreSubmitList(points:int, table:String, playerName:String, highest:Boolean = true, allowDuplicates:Boolean = false, useMilliseconds:Boolean = false):void
Submit a guest or id.net player's score using the advanced scores and toggle interface
A guest will be given a register to submit button that will cache their score. | IDNET | ||
closeInterfaces():void
The closeInterfaces method is called when toggleInterface is null and the UI is open. | IDNET | ||
customEvent(name:String, value:String = null):void
Sends custom event to be tracked by game analytics.
If you send value - you will get a table with total count this value was sent by all users to named table.
If value is not set, it will produce valueless named table, with frequency how much this event was sent by each individual user.
| IDNET | ||
getPoints():*
Returns id.net points using type getPoints. | IDNET | ||
getProfile():*
Get the user's profile. | IDNET | ||
handleLoginConnection(jsonData:String, passThrough:Object):void | IDNET | ||
init(stageRef:Stage, appId:String, appSecret:String = null, verbose:Boolean = true, preload:Boolean = false, protection:Boolean = false):void
Initialize the IDNET AS3 Interface. | IDNET | ||
InterfaceOpen():Boolean
Check if interface is visible. | IDNET | ||
mapListCustom(_mode:String, perPage:int, page:int, returnData:Boolean):*
Return listing data for a custom player maps interface. | IDNET | ||
mapLoad(mapId:String):void
Load a player created map. | IDNET | ||
mapRate(mapId:String, rating:int):*
Rate a player's custom map for list sorting. | IDNET | ||
mapSave(mapName:String, mapData:String, playerName:String):*
Save a player's custom map
| IDNET | ||
onIoError(event:IOErrorEvent):void | IDNET | ||
openProfile():void | IDNET | ||
removeUserData(key:String, passThroughKey:String = null):*
Removes user's data. | IDNET | ||
retrieveUserData(key:String, passThroughKey:String = null):*
Retrieve user's data. | IDNET | ||
submitProfileImage(target:DisplayObject, ext:String, drawRectangle:Rectangle = null):void
Submits an image to the id.net user's profile
| IDNET | ||
submitUserData(key:String, data:*, passThroughKey:String = null):*
Submit user's data
| IDNET | ||
toggleInterface(type:String = null):void
Toggles the interface open or closed. | IDNET |
_loggedIn | property |
public var _loggedIn:Boolean = false
_timeMachine | property |
public var _timeMachine:TimeMachine
_user | property |
public var _user:Object
_userThumb | property |
public var _userThumb:MovieClip
A movie clip object of the user profile picture. 32x32 pixels.
_verbose | property |
public var _verbose:Boolean = true
data | property |
public var data:Object
Get the last response data object; Available after IDNET Event.
isBlacklisted | property |
isBlacklisted:Boolean
[read-only] Returns true if game is hosted in one of blacklisted sites.
public function get isBlacklisted():Boolean
isInterfaceOpen | property |
isInterfaceOpen:Boolean
[read-only] The same as InterfaceOpen() method but in property form.
public function get isInterfaceOpen():Boolean
isLoggedIn | property |
isLoggedIn:Boolean
[read-only] Check if a user is already logged in.
public function get isLoggedIn():Boolean
isProtectionLoaded | property |
isProtectionLoaded:Boolean
[read-only] Returns true if protection state is loaded and handled.
public function get isProtectionLoaded():Boolean
isSponsor | property |
isSponsor:Boolean
[read-only] Returns true if game is hosted in one of sponsored sites.
public function get isSponsor():Boolean
type | property |
public var type:String
Get the last response type; Available after any IDNET Event.
userData | property |
userData:*
[read-only] Get last saved user data without making a new connection.
public function get userData():*
IDNET | () | Constructor |
public function IDNET()
The IDnet Flash interface allows secure authentication across applications.
Note 1 - Because of security sandboxes with flash, swf files loading from the desktop will be unable to connect to the interface. Use the flash IDE, exportant to exe, or add the output folder to flash's trusted locations.
achievementsList | () | method |
public function achievementsList():void
List all achievements setup at id.net. If a player is logged in, the achievementsList data will show which achievements they have unlocked. This method can be used to create a custom achievement list interface. To Use the id.net achievement interface, use toggleInterface.
achievementsSave | () | method |
public function achievementsSave(achName:String, achKey:String, playerName:String, overwrite:Boolean = false, allowDuplicates:Boolean = false):*
When a player has reached a milestone, save an achievement to their account.
Parameters
achName:String — The title of achievement. It must exactly match the achievement setup on id.net
| |
achKey:String — The achievement key. It must exactly match the achievement setup on id.net along with achName.
| |
playerName:String — (optional) Either a in-game player name or an empty string to default to an id.net nickname.
| |
overwrite:Boolean (default = false ) — (optional) True or false for overwriting achievements. defaults to false.
| |
allowDuplicates:Boolean (default = false ) — (optional) True or false is an achievement can be given more than once. Defaults to false.
|
* — false if user is not logged in.
|
advancedScoreList | () | method |
public function advancedScoreList(table:String, highest:Boolean = true, allowDuplicates:Boolean = false, useMilliseconds:Boolean = false):*
List scores using the advanced scores. After calling this, the id.net scoreboard will be toggled.
Parameters
table:String — Should be capitalized like a title as it is shown to players.
| |
highest:Boolean (default = true ) — (optional) False if lower score is better.
| |
allowDuplicates:Boolean (default = false ) — (optional) True is a player can score more than once like a classic leaderboard or false if better scores replace old ones.
| |
useMilliseconds:Boolean (default = false ) — (optional) Set to true to display score with a time format (mm:ss:SSS)
|
* |
advancedScoreListCustom | () | method |
public function advancedScoreListCustom(table:String, mode:String, perPage:int, page:int, highest:Boolean, allowDuplicates:Boolean):*
List scores using the advanced scores and a custom interface. Returns data only and does not open an id.net interface.
Parameters
table:String — Should be capitalized like a title as it is shown to players.
| |
mode:String — A string that uquals alltime, last30days, last7days, today, or newest.
| |
perPage:int — Number of results to show per page. Limit 100.
| |
page:int — page number to offset results. starts at 1.
| |
highest:Boolean — False if a lower score is better.
| |
allowDuplicates:Boolean — True if a player can score more than once like a classic leaderboard or false if better scores replace old ones.
|
* — false When mode is an incorrect string or prePage is greater than 100.
|
advancedScoreListPlayer | () | method |
public function advancedScoreListPlayer(table:String, highest:Boolean = true, allowDuplicates:Boolean = false):*
List the player's score(s).
Parameters
table:String — The name of the leaderboard table.
| |
highest:Boolean (default = true ) — (optional) False if lower score is better.
| |
allowDuplicates:Boolean (default = false ) — (optional) True to show all player scores. Default is to only show the best score.
|
* — false if user is not logged in.
|
advancedScoreSubmit | () | method |
public function advancedScoreSubmit(points:int, table:String, playerName:String, highest:Boolean = true, allowDuplicates:Boolean = false):*
Submit a id.net player's score using the advanced scores
Parameters
points:int — The player's score
| |
table:String — Should be capitalized like a title as it is shown to players.
| |
playerName:String — (optional) The player's in-game name or an empty string to default to an id.net nickname.
| |
highest:Boolean (default = true ) — (optional) False if lower score is better.
| |
allowDuplicates:Boolean (default = false ) — (optional) True if a player can score more than once like a classic leaderboard or false if better scores replace old ones.
|
* — false if user is not logged in.
|
advancedScoreSubmitList | () | method |
public function advancedScoreSubmitList(points:int, table:String, playerName:String, highest:Boolean = true, allowDuplicates:Boolean = false, useMilliseconds:Boolean = false):void
Submit a guest or id.net player's score using the advanced scores and toggle interface
A guest will be given a register to submit button that will cache their score. If they register, it will take them back to the scores interface.
Parameters
points:int — The player's score
| |
table:String — Should be capitalized like a title as it is shown to players.
| |
playerName:String — (optional) The player's in-game name or an empty string to default to an id.net nickname.
| |
highest:Boolean (default = true ) — (optional) False if lower score is better.
| |
allowDuplicates:Boolean (default = false ) — (optional) True if a player can score more than once like a classic leaderboard or false if better scores replace old ones.
| |
useMilliseconds:Boolean (default = false ) — (optional) Set to true to display score with a time format (mm:ss:SSS)
|
closeInterfaces | () | method |
public function closeInterfaces():void
The closeInterfaces method is called when toggleInterface is null and the UI is open. Use this with care, in almost all cases, the users will handle closing an id.net interface.
customEvent | () | method |
public function customEvent(name:String, value:String = null):void
Sends custom event to be tracked by game analytics. If you send value - you will get a table with total count this value was sent by all users to named table. If value is not set, it will produce valueless named table, with frequency how much this event was sent by each individual user.
Parameters
name:String — table name
| |
value:String (default = null ) — optional value to store data by.
|
See also
getPoints | () | method |
public function getPoints():*
Returns id.net points using type getPoints.
Returns* |
getProfile | () | method |
public function getProfile():*
Get the user's profile. Remember to set the permissions you want on the app settings page.
Returns* — false if user is not logged in.
|
handleLoginConnection | () | method |
public function handleLoginConnection(jsonData:String, passThrough:Object):void
Parameters
jsonData:String | |
passThrough:Object |
init | () | method |
public function init(stageRef:Stage, appId:String, appSecret:String = null, verbose:Boolean = true, preload:Boolean = false, protection:Boolean = false):void
Initialize the IDNET AS3 Interface. For examples of how to call this method from a timeline or document class look at the provided examples.
Parameters
stageRef:Stage — Reference to the stage.
| |
appId:String — The Application ID strong from the idnet website.
| |
appSecret:String (default = null ) — The application secret key string (not implemented).
| |
verbose:Boolean (default = true ) — Set to true by default. Set the debug param to false to disable idnet traces.
| |
preload:Boolean (default = false )
| |
protection:Boolean (default = false )
|
InterfaceOpen | () | method |
public function InterfaceOpen():Boolean
Check if interface is visible.
ReturnsBoolean — true If interface is visible;
false if interface is hidden.
|
mapListCustom | () | method |
public function mapListCustom(_mode:String, perPage:int, page:int, returnData:Boolean):*
Return listing data for a custom player maps interface.
Parameters
_mode:String — Acceptable modes are alltime, newest, popular, todayaverage, yesterdayaverage, last7daysaverage, last30daysaverage, last90daysaverage
| |
perPage:int — Integer of how many results to return. Limit 50 with return data false or 10 with it true.
| |
page:int — Integer of how many to offset based on perPage
| |
returnData:Boolean — False if you want map data on the list. Good for previews but should limit perpage to 10 so download speeds are fast.
|
* — false if perPage is set too high.
|
mapLoad | () | method |
public function mapLoad(mapId:String):void
Load a player created map.
Parameters
mapId:String — the levelid returned after saving a map or from the custom map list function. This will get called automatically when using the id.net player maps interface.
|
mapRate | () | method |
public function mapRate(mapId:String, rating:int):*
Rate a player's custom map for list sorting. Rating requires id.net login to prevent cheating.
Parameters
mapId:String — the levelid returned after saving or loading a map.
| |
rating:int — A rating interger from 1 to 10. If you want to use like/dislike buttons use rating numbers 10 and 1.
|
* — false if user is not logged in.
|
mapSave | () | method |
public function mapSave(mapName:String, mapData:String, playerName:String):*
Save a player's custom map
Parameters
mapName:String — The name of the map.
| |
mapData:String — A string representation of a map. Best to use json as it comes with methods to convert to strings/objects. Max size is 100 KB or roughly 100 000 characters.
| |
playerName:String — (optional) Either a in-game player name or an empty string to default to an id.net nickname.
|
* — false if user is not logged in.
|
onIoError | () | method |
public function onIoError(event:IOErrorEvent):void
Parameters
event:IOErrorEvent |
openProfile | () | method |
public function openProfile():void
removeUserData | () | method |
public function removeUserData(key:String, passThroughKey:String = null):*
Removes user's data.
Parameters
key:String — A unique key string to index the data.
| |
passThroughKey:String (default = null )
|
* — false if user is not logged in.
|
retrieveUserData | () | method |
public function retrieveUserData(key:String, passThroughKey:String = null):*
Retrieve user's data.
Parameters
key:String — A unique key string to index the data.
| |
passThroughKey:String (default = null )
|
* — false if user is not logged in.
|
submitProfileImage | () | method |
public function submitProfileImage(target:DisplayObject, ext:String, drawRectangle:Rectangle = null):void
Submits an image to the id.net user's profile
Parameters
target:DisplayObject — A movie clip or sprite. Size the display object to a good size of 600 x 400. If larger the image will be scaled and cropped.
| |
ext:String — A string of jpg or png. If the display object has a very limited color palette use png. If there are gradients or many colors use jpg.
| |
drawRectangle:Rectangle (default = null )
|
submitUserData | () | method |
public function submitUserData(key:String, data:*, passThroughKey:String = null):*
Submit user's data
Parameters
key:String — A unique key string to index the data.
| |
data:* — Data string to be stored.
| |
passThroughKey:String (default = null )
|
* — false if user is not logged in.
|
toggleInterface | () | method |
public function toggleInterface(type:String = null):void
Toggles the interface open or closed. If type is null it will default to the login interface. If the interface is open and type is null, it will close. Acceptable interface type strings are login, registration, achievements, and playerMaps. To show the interface for advanced scores, use either the advancedScoreList or advancedScoreSubmitList functions and not toggleInterface. To access the depreciated simple scores use type scoreboard.
Parameters
type:String (default = null ) — An optional string to identify what user interface dialog to show.
Defaults to null
|