home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Aventura / tall-ships.swf / scripts / DefineSprite_659 / frame_8 / DoAction.as
Encoding:
Text File  |  2005-09-29  |  3.5 KB  |  93 lines

  1. stop();
  2. time_txt.text = _parent.timer.seconds + "." + _parent.timer.milliseconds;
  3. bonusTime = _parent.timer.seconds * 10 + _parent.timer.milliseconds;
  4. bonusPoints_txt.text = _parent.timer.seconds + "." + _parent.timer.milliseconds + " x 10 = " + bonusTime;
  5. scoreCounter_mc.count = _global.totalPoints;
  6. scoreCounter_mc.score = bonusTime + _global.totalPoints;
  7. _global.totalPoints += bonusTime;
  8. btnRestart_mc.onRelease = function()
  9. {
  10.    _global.totalPoints -= bonusTime;
  11.    clearInterval(timerInterval);
  12.    _global.city[_global.nextCity] = false;
  13.    _parent.gotoAndPlay("restart");
  14. };
  15. btnContinue_mc.onRelease = function()
  16. {
  17.    clearInterval(timerInterval);
  18.    switch(_global.leg)
  19.    {
  20.       case "london":
  21.          _global.londonSeconds = timer.seconds;
  22.          _global.londonMilliseconds = timer.milliseconds;
  23.          _global.leg = "lisbon";
  24.          _global.nextCity = "alexandria";
  25.          _global.nextDock = "alexandriaDock_mc";
  26.          _global.shipRotation = 45;
  27.          _global.startSeconds = 60;
  28.          _global.startMilliseconds = 0;
  29.          _parent.gotoAndPlay("restart");
  30.          break;
  31.       case "lisbon":
  32.          _global.lisbonSeconds = timer.seconds;
  33.          _global.lisbonMilliseconds = timer.milliseconds;
  34.          _global.leg = "alexandria";
  35.          _global.nextCity = "dakar";
  36.          _global.nextDock = "dakarDock_mc";
  37.          _global.shipRotation = 180;
  38.          _global.startSeconds = 60;
  39.          _global.startMilliseconds = 0;
  40.          _parent.gotoAndPlay("restart");
  41.          break;
  42.       case "alexandria":
  43.          _global.alexandriaSeconds = timer.seconds;
  44.          _global.alexandriaMilliseconds = timer.milliseconds;
  45.          _global.leg = "dakar";
  46.          _global.nextCity = "rioDeJaneiro";
  47.          _global.nextDock = "rioDeJaneiroDock_mc";
  48.          _global.shipRotation = 90;
  49.          _global.startSeconds = 14;
  50.          _global.startMilliseconds = 0;
  51.          _parent.gotoAndPlay("restart");
  52.          break;
  53.       case "dakar":
  54.          _global.dakarSeconds = timer.seconds;
  55.          _global.dakarMilliseconds = timer.milliseconds;
  56.          _global.leg = "rioDeJaneiro";
  57.          _global.nextCity = "caracas";
  58.          _global.nextDock = "caracasDock_mc";
  59.          _global.shipRotation = 330;
  60.          _global.startSeconds = 60;
  61.          _global.startMilliseconds = 0;
  62.          _parent.gotoAndPlay("restart");
  63.          break;
  64.       case "rioDeJaneiro":
  65.          _global.rioDeJaneiroSeconds = timer.seconds;
  66.          _global.rioDeJaneiroMilliseconds = timer.milliseconds;
  67.          _global.leg = "caracas";
  68.          _global.nextCity = "newOrleans";
  69.          _global.nextDock = "newOrleansDock_mc";
  70.          _global.shipRotation = 195;
  71.          _global.startSeconds = 25;
  72.          _global.startMilliseconds = 0;
  73.          _parent.gotoAndPlay("restart");
  74.          break;
  75.       case "caracas":
  76.          _global.caracasSeconds = timer.seconds;
  77.          _global.caracasMilliseconds = timer.milliseconds;
  78.          _global.leg = "newOrleans";
  79.          _global.nextCity = "halifax";
  80.          _global.nextDock = "halifaxDock_mc";
  81.          _global.shipRotation = 340;
  82.          _global.startSeconds = 20;
  83.          _global.startMilliseconds = 0;
  84.          _parent.gotoAndPlay("restart");
  85.          break;
  86.       case "newOrleans":
  87.          _global.newOrleansSeconds = timer.seconds;
  88.          _global.newOrleansMilliseconds = timer.milliseconds;
  89.          _global.leg = "finish";
  90.          _parent.gotoAndPlay("finish");
  91.    }
  92. };
  93.