Packagemochi.as3
Classpublic class MochiSocial
InheritanceMochiSocial Inheritance Object



Public Properties
 PropertyDefined By
  loggedIn : Boolean
[static] [read-only]
MochiSocial
  _user_info : Object = null
[static]
MochiSocial
Public Methods
 MethodDefined 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
  
[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
 ConstantDefined 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_infoproperty
public static var _user_info:Object = null

loggedInproperty 
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_CANCELEDConstant
public static const ACTION_CANCELED:String = onCancel

ACTION_COMPLETEConstant 
public static const ACTION_COMPLETE:String = onComplete

ERRORConstant 
public static const ERROR:String = Error

FRIEND_LISTConstant 
public static const FRIEND_LIST:String = FriendsList

GAMEPLAY_DATAConstant 
public static const GAMEPLAY_DATA:String = GameplayData

IO_ERRORConstant 
public static const IO_ERROR:String = IOError

LOGGED_INConstant 
public static const LOGGED_IN:String = LoggedIn

LOGGED_OUTConstant 
public static const LOGGED_OUT:String = LoggedOut

LOGIN_HIDEConstant 
public static const LOGIN_HIDE:String = LoginHide

LOGIN_SHOWConstant 
public static const LOGIN_SHOW:String = LoginShow

LOGIN_SHOWNConstant 
public static const LOGIN_SHOWN:String = LoginShown

NO_USERConstant 
public static const NO_USER:String = NoUser

PROFILE_DATAConstant 
public static const PROFILE_DATA:String = ProfileData

PROFILE_HIDEConstant 
public static const PROFILE_HIDE:String = ProfileHide

PROFILE_SHOWConstant 
public static const PROFILE_SHOW:String = ProfileShow

PROPERTIES_SAVEDConstant 
public static const PROPERTIES_SAVED:String = PropertySaved

PROPERTIES_SIZEConstant 
public static const PROPERTIES_SIZE:String = PropertiesSize

USER_INFOConstant 
public static const USER_INFO:String = UserInfo

WIDGET_LOADEDConstant 
public static const WIDGET_LOADED:String = WidgetLoaded