home *** CD-ROM | disk | FTP | other *** search
/ 404 Jogos / CLJG.iso / Esportes / abyss01.swf / scripts / __Packages / ResultCheck.as < prev    next >
Encoding:
Text File  |  2008-03-12  |  2.2 KB  |  78 lines

  1. class ResultCheck
  2. {
  3.    var _mc;
  4.    var userId;
  5.    var ip;
  6.    var gameName;
  7.    var point;
  8.    var star;
  9.    var _parent;
  10.    var starArr = new Array(0,1,3,5,7);
  11.    var abyss_boarddriversLebleArr = new Array(50,200,500,1000);
  12.    var abyss_bricksLebleArr = new Array(4,10,30,100);
  13.    var abyss_jungleairplaneLebleArr = new Array(99,300,600,1000);
  14.    var abyss_cubemoaLebleArr = new Array(99,300,1000,2000);
  15.    var abyss_filsalLebleArr = new Array(49,100,300,1000);
  16.    var abyss_jujuLebleArr = new Array(49,300,1000,5000);
  17.    var abyss_gunmanLebleArr = new Array(49,200,500,1000);
  18.    var nowLebleArr = new Array();
  19.    function ResultCheck(mc, userId, ip, gameName, point)
  20.    {
  21.       this._mc = mc;
  22.       this.userId = userId;
  23.       this.ip = ip;
  24.       this.gameName = gameName;
  25.       this.point = point;
  26.       trace(this._mc);
  27.       trace(userId);
  28.       trace(ip);
  29.       trace(gameName);
  30.       trace(point);
  31.    }
  32.    function starCalF()
  33.    {
  34.       trace("start");
  35.       var _loc3_ = undefined;
  36.       trace("point = " + this.point + ", nowArr = " + this.nowLebleArr[this.nowLebleArr.length - 1] + "," + (this.point > this.nowLebleArr[this.nowLebleArr.length]));
  37.       if(this.point > this.nowLebleArr[this.nowLebleArr.length - 1])
  38.       {
  39.          _loc3_ = this.nowLebleArr.length;
  40.       }
  41.       else
  42.       {
  43.          var _loc2_ = 0;
  44.          while(_loc2_ < this.nowLebleArr.length)
  45.          {
  46.             if(this.nowLebleArr[_loc2_] >= this.point)
  47.             {
  48.                _loc3_ = _loc2_;
  49.                break;
  50.             }
  51.             _loc2_ = _loc2_ + 1;
  52.          }
  53.       }
  54.       this.star = this.starArr[_loc3_];
  55.       this.gameEndMcF();
  56.    }
  57.    function gameEndMcF()
  58.    {
  59.       this._mc.gotoAndStop("pointSaveF");
  60.       this._mc.point = this.point;
  61.       this._mc.star = this.star;
  62.       this.resltF();
  63.    }
  64.    function resltF()
  65.    {
  66.       this._mc.gotoAndStop("loginF");
  67.       this._mc.B1.onRelease = function()
  68.       {
  69.          this._parent.gotoAndStop(1);
  70.          _root.startGame();
  71.       };
  72.       this._mc.B2.onRelease = function()
  73.       {
  74.          getUrl("http://kr.abyss.teen.yahoo.com/", "_blank");
  75.       };
  76.    }
  77. }
  78.