home *** CD-ROM | disk | FTP | other *** search
/ One Click 5 / ONCE005.iso / Jogos / 1516.swf / scripts / DefineSprite_422 / frame_1 / DoAction.as
Encoding:
Text File  |  2006-05-02  |  1.6 KB  |  71 lines

  1. _X = _X - "10";
  2. _Y = _Y + "8";
  3. _xscale = "100" + "0.2" * (_Y - "200");
  4. _yscale = "100" + "0.2" * (_Y - "200");
  5. mmrandom = random("2") + "1";
  6. mmb = random("50");
  7. if("100" - (getProperty("/mm1", _Y) - "400") / "3" >= getProperty("/mm1", _X) or mmb == "15")
  8. {
  9.    tellTarget("/mm1")
  10.    {
  11.       if(mmrandom == "1")
  12.       {
  13.          gotoAndStop("mm-RD");
  14.          play();
  15.       }
  16.       if(mmrandom == "2")
  17.       {
  18.          gotoAndStop("mm-RU");
  19.          play();
  20.       }
  21.    }
  22. }
  23. if(getProperty("/mm1", _Y) >= "300" or mmb == "35")
  24. {
  25.    tellTarget("/mm1")
  26.    {
  27.       if(mmrandom == "1")
  28.       {
  29.          gotoAndStop("mm-RU");
  30.          play();
  31.       }
  32.       if(mmrandom == "2")
  33.       {
  34.          gotoAndStop("mm-LU");
  35.          play();
  36.       }
  37.    }
  38. }
  39. setProperty("/mm2", _X, getProperty("/mm1", _X));
  40. setProperty("/mm2", _Y, getProperty("/mm1", _Y));
  41. tellTarget("/mm2")
  42. {
  43.    gotoAndPlay(getProperty("/mm1", _currentframe));
  44. }
  45. if(getProperty("/m1", _Y) >= _Y)
  46. {
  47.    setProperty("/mm2", _visible, "0");
  48.    setProperty("/mm1", _visible, "1");
  49. }
  50. if(getProperty("/m1", _Y) < _Y)
  51. {
  52.    setProperty("/mm2", _visible, "1");
  53.    setProperty("/mm1", _visible, "0");
  54. }
  55. if(getProperty("/m1", _X) + "20" >= _X and _X >= getProperty("/m1", _X) - "30" and getProperty("/m1", _Y) + "30" >= _Y and _Y >= getProperty("/m1", _Y) - "20" and getProperty("/m1/hit", _currentframe) == "1")
  56. {
  57.    tellTarget("/m1/hit")
  58.    {
  59.       play();
  60.    }
  61. }
  62. soundplay = random("30");
  63. if(soundplay == "15")
  64. {
  65.    tellTarget("/monstersounds")
  66.    {
  67.       gotoAndStop("mummy");
  68.       play();
  69.    }
  70. }
  71.