home *** CD-ROM | disk | FTP | other *** search
/ PC World Plus! (NZ) 2001 June / HDC50.iso / FreeSoftware / MicrosoftXP / extended_main.swf / scripts / DefineSprite_16 / frame_1 / DoAction_2.as next >
Text File  |  2001-03-22  |  358b  |  11 lines

  1. dragX = getProperty(action, _X);
  2. dragY = getProperty(action, _Y);
  3. squareX = getProperty(name, _X);
  4. squareY = getProperty(name, _Y);
  5. difX = dragX - squareX;
  6. difY = 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.