home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Nave / Graviton.swf / scripts / DefineSprite_57 / frame_2 / DoAction.as
Encoding:
Text File  |  2005-08-05  |  431 b   |  16 lines

  1. x = getProperty("/ufo1/", _X);
  2. y = getProperty("/ufo1/", _Y);
  3. myx = x1 + eval("../:x");
  4. myy = y1 + eval("../:y");
  5. top = myy - height;
  6. left = myx - width;
  7. dx = myx - x;
  8. dy = myy - y;
  9. slope = (x - left) * m;
  10. xtolerance = width + eval("/:ufowidth");
  11. ytolerance = height + eval("/:ufoheight");
  12. if(dx < xtolerance and - xtolerance < dx and dy < ytolerance and - ytolerance < dy and top + slope < y)
  13. {
  14.    call("crash");
  15. }
  16.