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

  1. _X = _X - "15";
  2. _Y = _Y - "12";
  3. _xscale = "100" + "0.2" * (_Y - "200");
  4. _yscale = "100" + "0.2" * (_Y - "200");
  5. skb = random("50");
  6. skrandom = random("2") + "1";
  7. if("50" - (getProperty("/sk1", _Y) - "400") / "3" >= getProperty("/sk1", _X) or skb == "15")
  8. {
  9.    tellTarget("/sk1")
  10.    {
  11.       if(skrandom == "1")
  12.       {
  13.          gotoAndStop("sk-RD");
  14.          play();
  15.       }
  16.       if(skrandom == "2")
  17.       {
  18.          gotoAndStop("sk-LD");
  19.          play();
  20.       }
  21.    }
  22. }
  23. if("70" >= getProperty("/sk1", _Y) or skb == "35")
  24. {
  25.    tellTarget("/sk1")
  26.    {
  27.       if(skrandom == "1")
  28.       {
  29.          gotoAndStop("sk-RD");
  30.          play();
  31.       }
  32.       if(skrandom == "2")
  33.       {
  34.          gotoAndStop("sk-LD");
  35.          play();
  36.       }
  37.    }
  38. }
  39. if(getProperty("/m1", _X) + "20" >= _X and _X >= getProperty("/m1", _X) - "20" and getProperty("/m1", _Y) + "20" >= _Y and _Y >= getProperty("/m1", _Y) - "20" and getProperty("/m1/hit", _currentframe) == "1")
  40. {
  41.    tellTarget("/m1/hit")
  42.    {
  43.       play();
  44.    }
  45. }
  46.