home *** CD-ROM | disk | FTP | other *** search
/ Champak 112 / jogo-disk-112.iso / Games / mon_the_monkey.swf / scripts / frame_9 / DoAction.as
Text File  |  2010-07-14  |  1KB  |  62 lines

  1. stop();
  2. door();
  3. backSound();
  4. if(sudahMenang == true)
  5. {
  6.    restart_btn._visible = true;
  7.    back_btn._visible = false;
  8. }
  9. else if(sudahMenang == false)
  10. {
  11.    restart_btn._visible = false;
  12.    back_btn._visible = true;
  13. }
  14. back_btn.onRollOver = restart_btn.onRollOver = clear_btn.onRollOver = function()
  15. {
  16.    over();
  17. };
  18. back_btn.onRelease = function()
  19. {
  20.    klik();
  21.    delete this.onEnterFrame;
  22.    gotoAndStop(3, tandaBalik);
  23. };
  24. restart_btn.onRelease = function()
  25. {
  26.    klik();
  27.    delete this.onEnterFrame;
  28.    gotoAndStop("menu");
  29. };
  30. clear_btn.onRelease = function()
  31. {
  32.    klik();
  33.    buatData();
  34.    bacaData();
  35. };
  36. bacaData();
  37. this.onEnterFrame = function()
  38. {
  39.    zi = 1;
  40.    while(zi <= 10)
  41.    {
  42.       myStr = new String(this["scorenya" + zi]);
  43.       if(myStr.length == 1)
  44.       {
  45.          this["xscorenya" + zi] = "000" + this["scorenya" + zi];
  46.       }
  47.       else if(myStr.length == 2)
  48.       {
  49.          this["xscorenya" + zi] = "00" + this["scorenya" + zi];
  50.       }
  51.       else if(myStr.length == 3)
  52.       {
  53.          this["xscorenya" + zi] = "0" + this["scorenya" + zi];
  54.       }
  55.       else if(myStr.length == 4)
  56.       {
  57.          this["xscorenya" + zi] = this["scorenya" + zi];
  58.       }
  59.       zi++;
  60.    }
  61. };
  62.