home *** CD-ROM | disk | FTP | other *** search
/ 200 Game / 200GAME2.iso / FLASHGAME / PARADE.EXE / scripts / DefineSprite_171 / frame_1 / DoAction.as
Encoding:
Text File  |  2000-08-17  |  496 b   |  21 lines

  1. n = "1";
  2. while("6" >= n)
  3. {
  4.    disy = getProperty("/spot" add n, _Y) - getProperty("/thing" add eval("/:b"), _Y);
  5.    disx = getProperty("/spot" add n, _X) - getProperty("/thing" add eval("/:b"), _X);
  6.    disx *= disx;
  7.    disy *= disy;
  8.    rad = getProperty("/thing" add eval("/:b"), _width);
  9.    rad *= rad;
  10.    disp = disx + disy;
  11.    if(disp < rad)
  12.    {
  13.       tellTarget("/thing" add eval("/:b"))
  14.       {
  15.          gotoAndPlay(2);
  16.       }
  17.       gotoAndPlay(3);
  18.    }
  19.    n += "1";
  20. }
  21.