home *** CD-ROM | disk | FTP | other *** search
/ Champak 40 / Vol 40.iso / games / water_ba.swf / scripts / DefineSprite_703 / frame_1 / DoAction.as
Encoding:
Text File  |  2007-03-21  |  5.8 KB  |  203 lines

  1. stop();
  2. tilly.onEnterFrame = function()
  3. {
  4.    this.arrowdrive(30,10,10,15,10);
  5. };
  6. chart.onRelease = function()
  7. {
  8.    name = _root.name;
  9.    score = _root.score;
  10.    _root.attachMovie("board_score","boardcontrol",999,{_x:256,_y:192,name:"menu",tag:"end"});
  11.    _root.menu.currentup = true;
  12.    _parent.removeMovieClip();
  13. };
  14. text.onEnterFrame = function()
  15. {
  16.    if(this._alpha = 100)
  17.    {
  18.       if(!this.init)
  19.       {
  20.          this.tallseq = 0;
  21.          this.init = true;
  22.       }
  23.       switch(this.tallseq)
  24.       {
  25.          case 2:
  26.             if(this.addtick < _root.addscore)
  27.             {
  28.                this.addtick += 1;
  29.                _root.ticky.singleshot("ticky",true);
  30.                if(this.addtick < 10)
  31.                {
  32.                   this.addscore_t = "00" + this.addtick;
  33.                }
  34.                if(this.addtick < 100 and this.addtick > 10)
  35.                {
  36.                   this.addscore_t = "0" + this.addtick;
  37.                }
  38.                if(this.addtick > 100)
  39.                {
  40.                   this.addscore_t = this.addtick;
  41.                }
  42.                trace(this.addscore_t);
  43.                _root.texter = this.addscore_t;
  44.             }
  45.             else
  46.             {
  47.                this.tallseq = 3;
  48.             }
  49.             break;
  50.          case 0:
  51.             if(this.chartext_t < _root.yoursplash)
  52.             {
  53.                _root.ticky.singleshot("ticky",true);
  54.                this.chartick = this.chartick + 1;
  55.                this.chartext_t = "0" + this.chartick;
  56.             }
  57.             else
  58.             {
  59.                this.tallseq = 1;
  60.             }
  61.             break;
  62.          case 1:
  63.             if(this.fullsecond_t < _root.fullsecond + 1)
  64.             {
  65.                _root.ticky.singleshot("ticky",true);
  66.                this.fullsecond_t = this.fullsecond_t + 1;
  67.                if(this.ticker < 10)
  68.                {
  69.                   this.sec_t = "0" + this.ticker;
  70.                }
  71.                if(this.ticker > 10)
  72.                {
  73.                   this.sec_t = this.ticker;
  74.                }
  75.                if(this.sec_t < 60)
  76.                {
  77.                   this.ticker = this.ticker + 1;
  78.                }
  79.                else
  80.                {
  81.                   this.minute_t = this.minute_t + 1;
  82.                   this.ticker = "00";
  83.                }
  84.             }
  85.             else
  86.             {
  87.                this.tallseq = 2;
  88.             }
  89.             break;
  90.          case 3:
  91.             if(this.prevtick < _root.prevscore)
  92.             {
  93.                this.prevtick += 1;
  94.                _root.ticky.singleshot("ticky",true);
  95.                if(this.prevtick < 10)
  96.                {
  97.                   this.prevscore_t = "00" + this.prevtick;
  98.                }
  99.                if(this.prevtick < 100 and this.prevtick > 10)
  100.                {
  101.                   this.prevscore_t = "0" + this.prevtick;
  102.                }
  103.                if(this.prevtick > 100)
  104.                {
  105.                   this.prevscore_t = this.prevtick;
  106.                }
  107.             }
  108.             else
  109.             {
  110.                this.tallseq = 4;
  111.             }
  112.             break;
  113.          case 4:
  114.             if(this.hittick < _root.hittally)
  115.             {
  116.                this.hittick += 1;
  117.                _root.ticky.singleshot("ticky",true);
  118.                if(this.hittick < 10)
  119.                {
  120.                   this.hittally_t = "00" + this.hittick;
  121.                }
  122.                if(this.hittick < 100 and this.hittick > 10)
  123.                {
  124.                   this.hittally_t = "0" + this.hittick;
  125.                }
  126.                if(this.hittick > 100)
  127.                {
  128.                   this.hittally_t = this.hittick;
  129.                }
  130.             }
  131.             else
  132.             {
  133.                this.tallseq = 5;
  134.             }
  135.             break;
  136.          case 5:
  137.             if(this.bontick < _root.bonus)
  138.             {
  139.                this.bontick += 1;
  140.                _root.ticky.singleshot("ticky",true);
  141.                if(this.bontick < 10)
  142.                {
  143.                   this.bonus_t = "00" + this.bontick;
  144.                }
  145.                if(this.bontick < 100 and this.bontick > 10)
  146.                {
  147.                   this.bonus_t = "0" + this.bontick;
  148.                }
  149.                if(this.hittick > 100)
  150.                {
  151.                   this.bonus_t = this.bontick;
  152.                }
  153.             }
  154.             else
  155.             {
  156.                this.tallseq = 6;
  157.             }
  158.             break;
  159.          case 6:
  160.             if(this.tallyt < _root.score)
  161.             {
  162.                this.talltick += 1;
  163.                _root.ticky.singleshot("ticky",true);
  164.                if(this.talltick < 10)
  165.                {
  166.                   this.tallyt = "00" + this.talltick;
  167.                }
  168.                if(this.talltick < 100 and this.talltick > 10)
  169.                {
  170.                   this.tallyt = "0" + this.talltick;
  171.                }
  172.                if(this.talltick >= 100)
  173.                {
  174.                   this.tallyt = this.talltick;
  175.                }
  176.                _root.prevscore = _root.score;
  177.             }
  178.             else
  179.             {
  180.                if(this.tallyt > _root.scoretop)
  181.                {
  182.                   _root.currentlevel = _root.currentlevel + 1;
  183.                }
  184.                _root.scorefin.singleshot("scorefin",true);
  185.                this.tallseq = 7;
  186.                _root.minute = "00";
  187.                _root.sec = "0";
  188.                if(_root.currentlevel < 4)
  189.                {
  190.                   _root.nextlevel.singleshot("nextlevel",true);
  191.                }
  192.                else
  193.                {
  194.                   _root.finish.singleshot("finish",true);
  195.                }
  196.             }
  197.       }
  198.    }
  199. };
  200. chart.onRollOver = function()
  201. {
  202. };
  203.