home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Corrida / PMGRacing.swf / scripts / DefineSprite_10 / frame_2 / DoAction.as
Encoding:
Text File  |  2001-07-07  |  703 b   |  21 lines

  1. set("hc:vx",(eval("hc:vx") + eval("control:x_value") - eval("hc:x_value")) * "1" / a / b);
  2. set("hc:vy",(eval("hc:vy") + eval("control:y_value") - eval("hc:y_value")) * "1" / a / b);
  3. set("hc:x_value",eval("hc:x_value") + eval("hc:vx"));
  4. set("hc:y_value",eval("hc:y_value") + eval("hc:vy"));
  5. set("control:x_value",getProperty("control/", _X));
  6. set("control:y_value",getProperty("control/", _Y));
  7. oldX = getProperty("hc/", _X);
  8. newX = getProperty("control/", _X);
  9. rot = (newX - oldX) / "1.5";
  10. if("60" < rot)
  11. {
  12.    rot = "60";
  13. }
  14. if(rot < - "60")
  15. {
  16.    rot = - "60";
  17. }
  18. setProperty("hc", _X, eval("hc:x_value"));
  19. setProperty("hc", _Y, eval("hc:y_value"));
  20. setProperty("hc", _rotation, rot);
  21.