home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Corrida / FlashRacer.swf / scripts / DefineSprite_95 / frame_1 / DoAction.as
Encoding:
Text File  |  2001-07-07  |  2.6 KB  |  85 lines

  1. computer = random("3") + "1";
  2. zufall = random(eval("/:hardness")) + "1";
  3. if(zufall == "10")
  4. {
  5.    tellTarget("_flash0/computer" add computer)
  6.    {
  7.       gotoAndPlay(_currentframe + "2");
  8.    }
  9. }
  10. set("/:C1_frames",getProperty("_flash0/computer1", _currentframe));
  11. set("/:C1_frame",getProperty("_flash0/computer1", _currentframe) / "199" * "100");
  12. set("/:C1_pos",getProperty("_flash0/computer1/auto/move", _currentframe));
  13. set("/:C2_frames",getProperty("_flash0/computer2", _currentframe));
  14. set("/:C2_frame",getProperty("_flash0/computer2", _currentframe) / "199" * "100");
  15. set("/:C2_pos",getProperty("_flash0/computer2/auto/move", _currentframe));
  16. set("/:C3_frames",getProperty("_flash0/computer3", _currentframe));
  17. set("/:C3_frame",getProperty("_flash0/computer3", _currentframe) / "199" * "100");
  18. set("/:C3_pos",getProperty("_flash0/computer3/auto/move", _currentframe));
  19. set("/:P_frames",getProperty("_flash0/player", _currentframe));
  20. set("/:P_frame",getProperty("_flash0/player", _currentframe) / "187" * "100");
  21. set("/:P_pos",getProperty("_flash0/player/auto/move", _currentframe));
  22. if(eval("/:C1_frame") - "1" < eval("/:P_frame") and eval("/:C1_frame") >= eval("/:P_frame") and eval("/:P_pos") >= eval("/:C1_pos") - "1" and eval("/:C1_pos") + "1" >= eval("/:P_pos"))
  23. {
  24.    tellTarget("_flash0/computer1")
  25.    {
  26.       gotoAndPlay(eval("/:C1_frames") + "2");
  27.    }
  28.    tellTarget("_flash0/hupen")
  29.    {
  30.       play();
  31.    }
  32. }
  33. if(eval("/:C2_frame") - "1" < eval("/:P_frame") and eval("/:C2_frame") >= eval("/:P_frame") and eval("/:P_pos") >= eval("/:C2_pos") - "1" and eval("/:C2_pos") + "1" >= eval("/:P_pos"))
  34. {
  35.    tellTarget("_flash0/computer2")
  36.    {
  37.       gotoAndPlay(eval("/:C2_frames") + "2");
  38.    }
  39.    tellTarget("_flash0/hupen")
  40.    {
  41.       play();
  42.    }
  43. }
  44. if(eval("/:C3_frame") - "1" < eval("/:P_frame") and eval("/:C3_frame") >= eval("/:P_frame") and eval("/:P_pos") >= eval("/:C3_pos") - "1" and eval("/:C3_pos") + "1" >= eval("/:P_pos"))
  45. {
  46.    tellTarget("_flash0/computer3")
  47.    {
  48.       gotoAndPlay(eval("/:C3_frames") + "2");
  49.    }
  50.    tellTarget("_flash0/hupen")
  51.    {
  52.       play();
  53.    }
  54. }
  55. set("/:roundstogo","3" - eval("/:rounds"));
  56. if(eval("/:rounds") == "0")
  57. {
  58.    tellTarget("_flash0/round1")
  59.    {
  60.       gotoAndStop(2);
  61.    }
  62. }
  63. if(eval("/:rounds") == "1")
  64. {
  65.    tellTarget("_flash0/round2")
  66.    {
  67.       gotoAndStop(2);
  68.    }
  69.    tellTarget("_flash0/round1")
  70.    {
  71.       gotoAndStop(1);
  72.    }
  73. }
  74. if(eval("/:rounds") == "2")
  75. {
  76.    tellTarget("_flash0/round3")
  77.    {
  78.       gotoAndStop(2);
  79.    }
  80.    tellTarget("_flash0/round2")
  81.    {
  82.       gotoAndStop(1);
  83.    }
  84. }
  85.