home *** CD-ROM | disk | FTP | other *** search
/ Micromanía: 150 Juegos 2010 / 150Juegos_16.iso / Shareware / Gridshock / gridshock.swf / scripts / MochiBot.as < prev    next >
Encoding:
Text File  |  2010-05-14  |  1.6 KB  |  56 lines

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