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

  1. setProperty("/gh2", _X, getProperty("/gh2", _X) + (getProperty("/gh2", _X) - "275") / "94");
  2. setProperty("/gh2", _Y, getProperty("/gh2", _Y) + "4");
  3. ghrandom = random("25");
  4. if(getProperty("/gh2", _Y) >= "320" or ghrandom == "15")
  5. {
  6.    tellTarget("/gh2")
  7.    {
  8.       gotoAndStop("g-up");
  9.       play();
  10.    }
  11. }
  12. if(getProperty("/m1", _Y) >= getProperty("/gh2", _Y))
  13. {
  14.    setProperty("/gh2", _visible, "0");
  15.    setProperty("/gh1", _visible, "1");
  16. }
  17. if(getProperty("/m1", _Y) < getProperty("/gh2", _Y))
  18. {
  19.    setProperty("/gh2", _visible, "1");
  20.    setProperty("/gh1", _visible, "0");
  21. }
  22. setProperty("/gh1", _Y, getProperty("/gh2", _Y));
  23. setProperty("/gh1", _X, getProperty("/gh2", _X));
  24. setProperty("/gh2", _xscale, "100" + "0.2" * (_Y - "200"));
  25. setProperty("/gh2", _yscale, "100" + "0.2" * (_Y - "200"));
  26. setProperty("/gh1", _xscale, getProperty("/gh2", _xscale));
  27. setProperty("/gh1", _yscale, getProperty("/gh2", _yscale));
  28. tellTarget("/gh1")
  29. {
  30.    gotoAndPlay(getProperty("/gh2", _currentframe));
  31. }
  32. if(getProperty("/m1", _X) + "30" >= _X and _X >= getProperty("/m1", _X) - "30" and getProperty("/m1", _Y) + "20" >= _Y and _Y >= getProperty("/m1", _Y) - "20" and getProperty("/m1/hit", _currentframe) == "1")
  33. {
  34.    tellTarget("/m1/hit")
  35.    {
  36.       play();
  37.    }
  38. }
  39. soundplay = random("66");
  40. if(soundplay == "33")
  41. {
  42.    tellTarget("/monstersounds")
  43.    {
  44.       gotoAndStop("ghost");
  45.       play();
  46.    }
  47. }
  48.