home *** CD-ROM | disk | FTP | other *** search
- package Code.LIB.MOCHIADS
- {
- import flash.display.MovieClip;
- import flash.display.Sprite;
- import flash.text.TextField;
-
- public class _gw127
- {
-
- private static var boardID:String;
-
- public static var onErrorHandler:Object;
-
- public static var onCloseHandler:Object;
-
-
- public function _gw127()
- {
- super();
- }
-
- public static function _pp45(param1:Object, param2:Object = null) : void
- {
- _rg35.send("scores_requestList",null,param1,param2);
- }
-
- public static function _sb158(param1:Object = null) : void
- {
- if(param1 != null)
- {
- if(param1.error != null)
- {
- if(param1.error == true)
- {
- if(onErrorHandler != null)
- {
- if(param1.errorCode == null)
- {
- param1.errorCode = "IOError";
- }
- onErrorHandler(param1.errorCode);
- _rg35._bo468();
- return;
- }
- }
- }
- }
- onCloseHandler();
- _rg35._bo468();
- }
-
- public static function _mx117(param1:Object = null) : void
- {
- var options:Object = param1;
- if(options != null)
- {
- if(options._nw236 != null)
- {
- if(options._nw236 is Sprite)
- {
- _rg35._qh508(options._nw236);
- }
- delete options._nw236;
- }
- else
- {
- _rg35._qh508();
- }
- _rg35._nb559();
- if(options.name != null)
- {
- if(options.name is TextField)
- {
- if(options.name.text.length > 0)
- {
- options.name = options.name.text;
- }
- }
- }
- if(options.score != null)
- {
- if(options.score is TextField)
- {
- if(options.score.text.length > 0)
- {
- options.score = options.score.text;
- }
- }
- }
- if(options.onDisplay != null)
- {
- options.onDisplay();
- }
- else if(_rg35._nw236 != null)
- {
- if(_rg35._nw236 is MovieClip)
- {
- _rg35._nw236.stop();
- }
- else
- {
- trace("Warning: Container is not a MovieClip, cannot call default onDisplay.");
- }
- }
- }
- else
- {
- options = {};
- if(_rg35._nw236 is MovieClip)
- {
- _rg35._nw236.stop();
- }
- else
- {
- trace("Warning: Container is not a MovieClip, cannot call default onDisplay.");
- }
- }
- if(options._sb158 != null)
- {
- onCloseHandler = options._sb158;
- }
- else
- {
- onCloseHandler = function():void
- {
- if(_rg35._nw236 is MovieClip)
- {
- _rg35._nw236.play();
- }
- else
- {
- trace("Warning: Container is not a MovieClip, cannot call default onClose.");
- }
- };
- }
- if(options._vn456 != null)
- {
- onErrorHandler = options._vn456;
- }
- else
- {
- onErrorHandler = null;
- }
- if(options.boardID == null)
- {
- if(_gw127.boardID != null)
- {
- options.boardID = _gw127.boardID;
- }
- }
- _rg35.send("scores_showLeaderboard",{"options":options},null,_sb158);
- }
-
- public static function _ft482() : void
- {
- _rg35.send("scores_closeLeaderboard");
- }
-
- public static function _yl49(param1:Object) : Object
- {
- var _loc2_:Object = null;
- var _loc3_:Number = NaN;
- var _loc4_:Number = NaN;
- var _loc5_:Object = null;
- var _loc6_:Object = null;
- var _loc7_:String = null;
- var _loc8_:String = null;
- _loc2_ = {};
- for(_loc7_ in param1)
- {
- if(typeof param1[_loc7_] == "object")
- {
- if(param1[_loc7_].cols != null && param1[_loc7_].rows != null)
- {
- _loc2_[_loc7_] = [];
- _loc5_ = param1[_loc7_];
- _loc4_ = 0;
- while(_loc4_ < _loc5_.rows.length)
- {
- _loc6_ = {};
- _loc3_ = 0;
- while(_loc3_ < _loc5_.cols.length)
- {
- _loc6_[_loc5_.cols[_loc3_]] = _loc5_.rows[_loc4_][_loc3_];
- _loc3_++;
- }
- _loc2_[_loc7_].push(_loc6_);
- _loc4_++;
- }
- }
- else
- {
- _loc2_[_loc7_] = {};
- for(_loc8_ in param1[_loc7_])
- {
- _loc2_[_loc7_][_loc8_] = param1[_loc7_][_loc8_];
- }
- }
- }
- else
- {
- _loc2_[_loc7_] = param1[_loc7_];
- }
- }
- return _loc2_;
- }
-
- public static function _fm164(param1:Number, param2:String, param3:Object = null, param4:Object = null) : void
- {
- _rg35.send("scores_submit",{
- "score":param1,
- "name":param2
- },param3,param4);
- }
-
- public static function _nl314(param1:Object, param2:Object = null) : void
- {
- _rg35.send("scores_getPlayerInfo",null,param1,param2);
- }
-
- public static function _qf494(param1:String) : void
- {
- _gw127.boardID = param1;
- _rg35.send("scores_setBoardID",{"boardID":param1});
- }
- }
- }
-