home *** CD-ROM | disk | FTP | other *** search
/ Champak 48 / cdrom_image.iso / Games / paintnazorin.swf / scripts / DefineSprite_9 / frame_1 / DoAction.as
Encoding:
Text File  |  2007-10-01  |  1.4 KB  |  35 lines

  1. function connectSWHiscore(functionType, hiscoreID, scoreNum)
  2. {
  3.    var _loc1_ = this;
  4.    _loc1_.createEmptyMovieClip("httpObj",_loc1_.httpObjDepth);
  5.    switch(functionType)
  6.    {
  7.       case "view":
  8.          _loc1_.httpObj.gameid = _loc1_.gameID;
  9.          _loc1_.httpObj.hiscoreid = hiscoreID;
  10.          _loc1_.httpObj.getURL(_loc1_.viewHURL,"_blank","POST");
  11.          break;
  12.       case "submit":
  13.          _loc1_.recieve_lv = new LoadVars();
  14.          _loc1_.recieve_lv.hiscoreConnector = _loc1_;
  15.          _loc1_.recieve_lv.onLoad = function(isSuccess)
  16.          {
  17.             var _loc1_ = this;
  18.             if(isSuccess)
  19.             {
  20.                _loc1_.hiscoreConnector.httpObj.tempID = _loc1_.tempID;
  21.                _loc1_.hiscoreConnector.httpObj.getURL(_loc1_.hiscoreConnector.submitGetHURL,"_blank","GET");
  22.             }
  23.          };
  24.          _loc1_.submit_lv = new LoadVars();
  25.          _loc1_.submit_lv.score = scoreNum;
  26.          _loc1_.submit_lv.gameid = _loc1_.gameID;
  27.          _loc1_.submit_lv.hiscoreid = hiscoreID;
  28.          _loc1_.submit_lv.sendAndLoad(_loc1_.submitPostHURL,_loc1_.recieve_lv,"POST");
  29.    }
  30. }
  31. this.swc_mc._visible = false;
  32. this.viewHURL = "http://hiscore.jp.shockwave.com/rank/member/control/listscore.php";
  33. this.submitPostHURL = "http://hiscore.jp.shockwave.com/rank/member/control/maketemp.php";
  34. this.submitGetHURL = "http://hiscore.jp.shockwave.com/rank/member/control/logintemp.php";
  35.