home *** CD-ROM | disk | FTP | other *** search
/ 404 Jogos / CLJG.iso / Puzzle / HexiomConnect.swf / scripts / MochiBot.as < prev    next >
Text File  |  2008-08-29  |  2KB  |  58 lines

  1. package
  2. {
  3.    import flash.display.DisplayObjectContainer;
  4.    import flash.display.Loader;
  5.    import flash.display.Sprite;
  6.    import flash.net.URLRequest;
  7.    import flash.net.URLRequestMethod;
  8.    import flash.net.URLVariables;
  9.    import flash.system.Capabilities;
  10.    import flash.system.Security;
  11.    
  12.    public dynamic class MochiBot extends Sprite
  13.    {
  14.        
  15.       
  16.       public function MochiBot()
  17.       {
  18.          super();
  19.       }
  20.       
  21.       public static function track(param1:DisplayObjectContainer, param2:String) : MochiBot
  22.       {
  23.          if(Security.sandboxType == "localWithFile")
  24.          {
  25.             return null;
  26.          }
  27.          var _loc3_:MochiBot = new MochiBot();
  28.          param1.addChild(_loc3_);
  29.          Security.allowDomain("*");
  30.          Security.allowInsecureDomain("*");
  31.          var _loc4_:String = "http://core.mochibot.com/my/core.swf";
  32.          var _loc5_:URLVariables;
  33.          (_loc5_ = new URLVariables())["sb"] = Security.sandboxType;
  34.          _loc5_["v"] = Capabilities.version;
  35.          _loc5_["swfid"] = param2;
  36.          _loc5_["mv"] = "8";
  37.          _loc5_["fv"] = "9";
  38.          var _loc6_:String;
  39.          if((_loc6_ = _loc3_.root.loaderInfo.loaderURL).indexOf("http") == 0)
  40.          {
  41.             _loc5_["url"] = _loc6_;
  42.          }
  43.          else
  44.          {
  45.             _loc5_["url"] = "local";
  46.          }
  47.          var _loc7_:URLRequest;
  48.          (_loc7_ = new URLRequest(_loc4_)).contentType = "application/x-www-form-urlencoded";
  49.          _loc7_.method = URLRequestMethod.POST;
  50.          _loc7_.data = _loc5_;
  51.          var _loc8_:Loader = new Loader();
  52.          _loc3_.addChild(_loc8_);
  53.          _loc8_.load(_loc7_);
  54.          return _loc3_;
  55.       }
  56.    }
  57. }
  58.