home *** CD-ROM | disk | FTP | other *** search
/ 404 Jogos / CLJG.iso / Aventura / Frizzle_fraz.swf / scripts / Code / LIB / MOCHIADS / _gw127.as next >
Encoding:
Text File  |  2008-09-26  |  6.3 KB  |  228 lines

  1. package Code.LIB.MOCHIADS
  2. {
  3.    import flash.display.MovieClip;
  4.    import flash.display.Sprite;
  5.    import flash.text.TextField;
  6.    
  7.    public class _gw127
  8.    {
  9.       
  10.       private static var boardID:String;
  11.       
  12.       public static var onErrorHandler:Object;
  13.       
  14.       public static var onCloseHandler:Object;
  15.        
  16.       
  17.       public function _gw127()
  18.       {
  19.          super();
  20.       }
  21.       
  22.       public static function _pp45(param1:Object, param2:Object = null) : void
  23.       {
  24.          _rg35.send("scores_requestList",null,param1,param2);
  25.       }
  26.       
  27.       public static function _sb158(param1:Object = null) : void
  28.       {
  29.          if(param1 != null)
  30.          {
  31.             if(param1.error != null)
  32.             {
  33.                if(param1.error == true)
  34.                {
  35.                   if(onErrorHandler != null)
  36.                   {
  37.                      if(param1.errorCode == null)
  38.                      {
  39.                         param1.errorCode = "IOError";
  40.                      }
  41.                      onErrorHandler(param1.errorCode);
  42.                      _rg35._bo468();
  43.                      return;
  44.                   }
  45.                }
  46.             }
  47.          }
  48.          onCloseHandler();
  49.          _rg35._bo468();
  50.       }
  51.       
  52.       public static function _mx117(param1:Object = null) : void
  53.       {
  54.          var options:Object = param1;
  55.          if(options != null)
  56.          {
  57.             if(options._nw236 != null)
  58.             {
  59.                if(options._nw236 is Sprite)
  60.                {
  61.                   _rg35._qh508(options._nw236);
  62.                }
  63.                delete options._nw236;
  64.             }
  65.             else
  66.             {
  67.                _rg35._qh508();
  68.             }
  69.             _rg35._nb559();
  70.             if(options.name != null)
  71.             {
  72.                if(options.name is TextField)
  73.                {
  74.                   if(options.name.text.length > 0)
  75.                   {
  76.                      options.name = options.name.text;
  77.                   }
  78.                }
  79.             }
  80.             if(options.score != null)
  81.             {
  82.                if(options.score is TextField)
  83.                {
  84.                   if(options.score.text.length > 0)
  85.                   {
  86.                      options.score = options.score.text;
  87.                   }
  88.                }
  89.             }
  90.             if(options.onDisplay != null)
  91.             {
  92.                options.onDisplay();
  93.             }
  94.             else if(_rg35._nw236 != null)
  95.             {
  96.                if(_rg35._nw236 is MovieClip)
  97.                {
  98.                   _rg35._nw236.stop();
  99.                }
  100.                else
  101.                {
  102.                   trace("Warning: Container is not a MovieClip, cannot call default onDisplay.");
  103.                }
  104.             }
  105.          }
  106.          else
  107.          {
  108.             options = {};
  109.             if(_rg35._nw236 is MovieClip)
  110.             {
  111.                _rg35._nw236.stop();
  112.             }
  113.             else
  114.             {
  115.                trace("Warning: Container is not a MovieClip, cannot call default onDisplay.");
  116.             }
  117.          }
  118.          if(options._sb158 != null)
  119.          {
  120.             onCloseHandler = options._sb158;
  121.          }
  122.          else
  123.          {
  124.             onCloseHandler = function():void
  125.             {
  126.                if(_rg35._nw236 is MovieClip)
  127.                {
  128.                   _rg35._nw236.play();
  129.                }
  130.                else
  131.                {
  132.                   trace("Warning: Container is not a MovieClip, cannot call default onClose.");
  133.                }
  134.             };
  135.          }
  136.          if(options._vn456 != null)
  137.          {
  138.             onErrorHandler = options._vn456;
  139.          }
  140.          else
  141.          {
  142.             onErrorHandler = null;
  143.          }
  144.          if(options.boardID == null)
  145.          {
  146.             if(_gw127.boardID != null)
  147.             {
  148.                options.boardID = _gw127.boardID;
  149.             }
  150.          }
  151.          _rg35.send("scores_showLeaderboard",{"options":options},null,_sb158);
  152.       }
  153.       
  154.       public static function _ft482() : void
  155.       {
  156.          _rg35.send("scores_closeLeaderboard");
  157.       }
  158.       
  159.       public static function _yl49(param1:Object) : Object
  160.       {
  161.          var _loc2_:Object = null;
  162.          var _loc3_:Number = NaN;
  163.          var _loc4_:Number = NaN;
  164.          var _loc5_:Object = null;
  165.          var _loc6_:Object = null;
  166.          var _loc7_:String = null;
  167.          var _loc8_:String = null;
  168.          _loc2_ = {};
  169.          for(_loc7_ in param1)
  170.          {
  171.             if(typeof param1[_loc7_] == "object")
  172.             {
  173.                if(param1[_loc7_].cols != null && param1[_loc7_].rows != null)
  174.                {
  175.                   _loc2_[_loc7_] = [];
  176.                   _loc5_ = param1[_loc7_];
  177.                   _loc4_ = 0;
  178.                   while(_loc4_ < _loc5_.rows.length)
  179.                   {
  180.                      _loc6_ = {};
  181.                      _loc3_ = 0;
  182.                      while(_loc3_ < _loc5_.cols.length)
  183.                      {
  184.                         _loc6_[_loc5_.cols[_loc3_]] = _loc5_.rows[_loc4_][_loc3_];
  185.                         _loc3_++;
  186.                      }
  187.                      _loc2_[_loc7_].push(_loc6_);
  188.                      _loc4_++;
  189.                   }
  190.                }
  191.                else
  192.                {
  193.                   _loc2_[_loc7_] = {};
  194.                   for(_loc8_ in param1[_loc7_])
  195.                   {
  196.                      _loc2_[_loc7_][_loc8_] = param1[_loc7_][_loc8_];
  197.                   }
  198.                }
  199.             }
  200.             else
  201.             {
  202.                _loc2_[_loc7_] = param1[_loc7_];
  203.             }
  204.          }
  205.          return _loc2_;
  206.       }
  207.       
  208.       public static function _fm164(param1:Number, param2:String, param3:Object = null, param4:Object = null) : void
  209.       {
  210.          _rg35.send("scores_submit",{
  211.             "score":param1,
  212.             "name":param2
  213.          },param3,param4);
  214.       }
  215.       
  216.       public static function _nl314(param1:Object, param2:Object = null) : void
  217.       {
  218.          _rg35.send("scores_getPlayerInfo",null,param1,param2);
  219.       }
  220.       
  221.       public static function _qf494(param1:String) : void
  222.       {
  223.          _gw127.boardID = param1;
  224.          _rg35.send("scores_setBoardID",{"boardID":param1});
  225.       }
  226.    }
  227. }
  228.