GODPAPER | All Packages | All Classes | Index | Frames No Frames |
MochiSocial

Package | mochi.as3
Class | public class MochiSocial
Inheritance | MochiSocial Object

Public Properties

| Property | Defined By
--- | --- | ---
|  | loggedIn : Boolean [static] [read-only] | MochiSocial
|  | _user_info : Object = null [static] | MochiSocial

Public Methods

| Method | Defined By
--- | --- | ---
|  | addEventListener(eventType:String, delegate:Function):void [static] | MochiSocial
|  | getAPIToken():String [static] | MochiSocial
|  | getAPIURL():String [static] | MochiSocial
|  | getFriendsList(properties:Object = null):void [static] Method: getFriendsList Asyncronously request friend graph Response returned in MochiSocial.FRIEND_LIST event | MochiSocial
|  | getVersion():String [static] | MochiSocial
|  | hideLoginWidget():void [static] | MochiSocial
|  | inviteFriends(properties:Object = null):void [static] Method: inviteFriends Post (optionally with a gift) invite to friends also may include prepopulated list of friends. | MochiSocial
|  | postToStream(properties:Object = null):void [static] Method: postToStream Post (optionally with a reward) a message to user's public stream. | MochiSocial
|  | removeEventListener(eventType:String, delegate:Function):void [static] | MochiSocial
|  | requestFan(properties:Object = null):void [static] Method: requestFan Ask the current player to become a fan and follow your developer updates. | MochiSocial
|  | requestLogin(properties:Object = null):void [static] | MochiSocial
|  | saveUserProperties(properties:Object):void [static] | MochiSocial
|  | showLoginWidget(options:Object = null):void [static] Method: showLoginWidget Displays the MochiGames Login widget. | MochiSocial
|  | showProfile(options:Object = null):void [static] | MochiSocial
|  | triggerEvent(eventType:String, args:Object):void [static] | MochiSocial

Public Constants

| Constant | Defined By
--- | --- | ---
|  | ACTION_CANCELED : String = onCancel [static] | MochiSocial
|  | ACTION_COMPLETE : String = onComplete [static] | MochiSocial
|  | ERROR : String = Error [static] | MochiSocial
|  | FRIEND_LIST : String = FriendsList [static] | MochiSocial
|  | GAMEPLAY_DATA : String = GameplayData [static] | MochiSocial
|  | IO_ERROR : String = IOError [static] | MochiSocial
|  | LOGGED_IN : String = LoggedIn [static] | MochiSocial
|  | LOGGED_OUT : String = LoggedOut [static] | MochiSocial
|  | LOGIN_HIDE : String = LoginHide [static] | MochiSocial
|  | LOGIN_SHOW : String = LoginShow [static] | MochiSocial
|  | LOGIN_SHOWN : String = LoginShown [static] | MochiSocial
|  | NO_USER : String = NoUser [static] | MochiSocial
|  | PROFILE_DATA : String = ProfileData [static] | MochiSocial
|  | PROFILE_HIDE : String = ProfileHide [static] | MochiSocial
|  | PROFILE_SHOW : String = ProfileShow [static] | MochiSocial
|  | PROPERTIES_SAVED : String = PropertySaved [static] | MochiSocial
|  | PROPERTIES_SIZE : String = PropertiesSize [static] | MochiSocial
|  | USER_INFO : String = UserInfo [static] | MochiSocial
|  | WIDGET_LOADED : String = WidgetLoaded [static] | MochiSocial

Property Detail

_user_info | property

`public static var _user_info:Object = null`

loggedIn | property |

`loggedIn:Boolean` [read-only]

Implementation
`public static function get loggedIn():Boolean`
Method Detail

addEventListener | () | method

`public static function addEventListener(eventType:String, delegate:Function):void`

Parameters

| `eventType:String`
| `delegate:Function`

getAPIToken | () | method |

`public static function getAPIToken():String`

Returns

| `String`

getAPIURL | () | method |

`public static function getAPIURL():String`

Returns

| `String`

getFriendsList | () | method |

`public static function getFriendsList(properties:Object = null):void`

Method: getFriendsList Asyncronously request friend graph Response returned in MochiSocial.FRIEND_LIST event

Parameters

| `properties:Object` (default = `null`)``

getVersion | () | method |

`public static function getVersion():String`

Returns

| `String`

hideLoginWidget | () | method |

`public static function hideLoginWidget():void`

inviteFriends | () | method |

`public static function inviteFriends(properties:Object = null):void`

Method: inviteFriends Post (optionally with a gift) invite to friends also may include prepopulated list of friends. Item id's must be marked as giftable in your developer account. Each invited player and the current player will be given the gifted item.

Parameters

| `properties:Object` (default = `null`)`` — Object containing message { friends: ['xxx'], item: 'xxx', title: 'xxx', message: 'xxx' }

postToStream | () | method |

`public static function postToStream(properties:Object = null):void`

Method: postToStream Post (optionally with a reward) a message to user's public stream. The stream post goes both on MochiGames as well as their other social networks. Item id's must be marked as 'giftable' in your developer account. Items are given as a reward only to the current player as incentive for posting about the game.

Parameters

| `properties:Object` (default = `null`)`` — Object containing message { channel: 'xxx', item: 'xxx', title: 'xxx', message: 'xxx' }

removeEventListener | () | method |

`public static function removeEventListener(eventType:String, delegate:Function):void`

Parameters

| `eventType:String`
| `delegate:Function`

requestFan | () | method |

`public static function requestFan(properties:Object = null):void`

Method: requestFan Ask the current player to become a fan and follow your developer updates. Your messages are recieved by players both through MochiGames.com and in-game via the login widget or leaderboards. You can configure your update settings on mochimedia.com

Parameters

| `properties:Object` (default = `null`)`` — Object containing message { channel: 'xxx' }

requestLogin | () | method |

`public static function requestLogin(properties:Object = null):void`

Parameters

| `properties:Object` (default = `null`)``

saveUserProperties | () | method |

`public static function saveUserProperties(properties:Object):void`

Parameters

| `properties:Object`

showLoginWidget | () | method |

`public static function showLoginWidget(options:Object = null):void`

Method: showLoginWidget Displays the MochiGames Login widget.

Parameters

| `options:Object` (default = `null`)``

showProfile | () | method |

`public static function showProfile(options:Object = null):void`

Parameters

| `options:Object` (default = `null`)``

triggerEvent | () | method |

`public static function triggerEvent(eventType:String, args:Object):void`

Parameters

| `eventType:String`
| `args:Object`

Constant Detail

ACTION_CANCELED | Constant

`public static const ACTION_CANCELED:String = onCancel`

ACTION_COMPLETE | Constant |

`public static const ACTION_COMPLETE:String = onComplete`

ERROR | Constant |

`public static const ERROR:String = Error`

FRIEND_LIST | Constant |

`public static const FRIEND_LIST:String = FriendsList`

GAMEPLAY_DATA | Constant |

`public static const GAMEPLAY_DATA:String = GameplayData`

IO_ERROR | Constant |

`public static const IO_ERROR:String = IOError`

LOGGED_IN | Constant |

`public static const LOGGED_IN:String = LoggedIn`

LOGGED_OUT | Constant |

`public static const LOGGED_OUT:String = LoggedOut`

LOGIN_HIDE | Constant |

`public static const LOGIN_HIDE:String = LoginHide`

LOGIN_SHOW | Constant |

`public static const LOGIN_SHOW:String = LoginShow`

LOGIN_SHOWN | Constant |

`public static const LOGIN_SHOWN:String = LoginShown`

NO_USER | Constant |

`public static const NO_USER:String = NoUser`

PROFILE_DATA | Constant |

`public static const PROFILE_DATA:String = ProfileData`

PROFILE_HIDE | Constant |

`public static const PROFILE_HIDE:String = ProfileHide`

PROFILE_SHOW | Constant |

`public static const PROFILE_SHOW:String = ProfileShow`

PROPERTIES_SAVED | Constant |

`public static const PROPERTIES_SAVED:String = PropertySaved`

PROPERTIES_SIZE | Constant |

`public static const PROPERTIES_SIZE:String = PropertiesSize`

USER_INFO | Constant |

`public static const USER_INFO:String = UserInfo`

WIDGET_LOADED | Constant |

`public static const WIDGET_LOADED:String = WidgetLoaded`

Thu Jan 16 2014, 01:11 PM +08:00