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

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

Public Properties

| Property | Defined By
--- | --- | ---
|  | childClip : Object [static] [read-only] | MochiServices
|  | clip : Object [static] [read-only] | MochiServices
|  | comChannelName : String [static] [write-only] | MochiServices
|  | connected : Boolean [static] [read-only] | MochiServices
|  | id : String [static] [read-only] | MochiServices
|  | netup : Boolean = true [static] | MochiServices
|  | netupAttempted : Boolean = false [static] | MochiServices
|  | onError : Object [static] | MochiServices
|  | widget : Boolean = false [static] | MochiServices

Public Methods

| Method | Defined By
--- | --- | ---
|  | addEventListener(eventType:String, delegate:Function):void [static] | MochiServices
|  | addLinkEvent(url:String, burl:String, btn:DisplayObjectContainer, onClick:Function = null):void [static] | MochiServices
|  | allowDomains(server:String):String [static] | MochiServices
|  | bringToTop(e:Event = null):void [static] | MochiServices
|  | connect(id:String, clip:Object, onError:Object = null):void [static] Method: connect Connects your game to the MochiServices API | MochiServices
|  | connectWait(e:TimerEvent):void [static] | MochiServices
|  | disconnect():void [static] | MochiServices
|  | doClose():void [static] | MochiServices
|  | getVersion():String [static] | MochiServices
|  | isNetworkAvailable():Boolean [static] | MochiServices
|  | removeEventListener(eventType:String, delegate:Function):void [static] | MochiServices
|  | send(methodName:String, args:Object = null, callbackObject:Object = null, callbackMethod:Object = null):void [static] | MochiServices
|  | setContainer(container:Object = null, doAdd:Boolean = true):void [static] | MochiServices
|  | stayOnTop():void [static] | MochiServices
|  | triggerEvent(eventType:String, args:Object):void [static] | MochiServices
|  | warnID(bid:String, leaderboard:Boolean):void [static] | MochiServices

Public Constants

| Constant | Defined By
--- | --- | ---
|  | CONNECTED : String = onConnected [static] | MochiServices

Property Detail

childClip | property

`childClip:Object` [read-only]

Implementation
`public static function get childClip():Object`

clip | property |

`clip:Object` [read-only]

Implementation
`public static function get clip():Object`

comChannelName | property |

`comChannelName:String` [write-only]

Implementation
`public static function set comChannelName(value:String):void`

connected | property |

`connected:Boolean` [read-only]

Implementation
`public static function get connected():Boolean`

id | property |

`id:String` [read-only]

Implementation
`public static function get id():String`

netup | property |

`public static var netup:Boolean = true`

netupAttempted | property |

`public static var netupAttempted:Boolean = false`

onError | property |

`public static var onError:Object`

widget | property |

`public static var widget:Boolean = false`

Method Detail

addEventListener | () | method

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

Parameters

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

addLinkEvent | () | method |

`public static function addLinkEvent(url:String, burl:String, btn:DisplayObjectContainer, onClick:Function = null):void`

Parameters

| `url:String`
| `burl:String`
| `btn:DisplayObjectContainer`
| `onClick:Function` (default = `null`)``

allowDomains | () | method |

`public static function allowDomains(server:String):String`

Parameters

| `server:String`

Returns

| `String`

bringToTop | () | method |

`public static function bringToTop(e:Event = null):void`

Parameters

| `e:Event` (default = `null`)``

connect | () | method |

`public static function connect(id:String, clip:Object, onError:Object = null):void`

Method: connect Connects your game to the MochiServices API

Parameters

| `id:String` — the MochiAds ID of your game
| `clip:Object` — the MovieClip in which to load the API (optional for all but AS3, defaults to _root)
| `onError:Object` (default = `null`)`` — a function to call upon connection or IO error

connectWait | () | method |

`public static function connectWait(e:TimerEvent):void`

Parameters

| `e:TimerEvent`

disconnect | () | method |

`public static function disconnect():void`

doClose | () | method |

`public static function doClose():void`

getVersion | () | method |

`public static function getVersion():String`

Returns

| `String`

isNetworkAvailable | () | method |

`public static function isNetworkAvailable():Boolean`

Returns

| `Boolean`

removeEventListener | () | method |

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

Parameters

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

send | () | method |

`public static function send(methodName:String, args:Object = null, callbackObject:Object = null, callbackMethod:Object = null):void`

Parameters

| `methodName:String`
| `args:Object` (default = `null`)``
| `callbackObject:Object` (default = `null`)``
| `callbackMethod:Object` (default = `null`)``

setContainer | () | method |

`public static function setContainer(container:Object = null, doAdd:Boolean = true):void`

Parameters

| `container:Object` (default = `null`)``
| `doAdd:Boolean` (default = `true`)``

stayOnTop | () | method |

`public static function stayOnTop():void`

triggerEvent | () | method |

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

Parameters

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

warnID | () | method |

`public static function warnID(bid:String, leaderboard:Boolean):void`

Parameters

| `bid:String`
| `leaderboard:Boolean`

Constant Detail

CONNECTED | Constant

`public static const CONNECTED:String = onConnected`

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