home *** CD-ROM | disk | FTP | other *** search
/ PC World Plus! (NZ) 2001 June / HDC50.iso / FreeSoftware / MicrosoftXP / extended_main.swf / scripts / DefineSprite_16 / frame_2 / DoAction.as
Text File  |  2001-03-22  |  377b  |  12 lines

  1. dragX = getProperty(action, _X);
  2. dragY = getProperty(action, _Y);
  3. squareX = getProperty(name, _X);
  4. squareY = getProperty(name, _Y);
  5. dif1X = dragX - squareX;
  6. dif1Y = dragY - squareY;
  7. xStp = difX / Number(speed);
  8. yStp = difY / Number(speed);
  9. setProperty(name, _X, Number(squareX) + Number(xStp));
  10. setProperty(name, _Y, Number(squareY) + Number(yStp));
  11. gotoAndPlay(1);
  12.