home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Classicos / DesktopInvaders.swf / scripts / frame_10 / DoAction_2.as next >
Encoding:
Text File  |  2006-06-13  |  655 b   |  39 lines

  1. stopDrag();
  2. x = getProperty("mouse", _X);
  3. y = getProperty("mouse", _Y);
  4. if("240" < x)
  5. {
  6.    x = "240";
  7. }
  8. if(x < "4")
  9. {
  10.    x = "4";
  11. }
  12. d = (x - shipoffx) / "4";
  13. setProperty("/ship", _X, x);
  14. shipx = int(d);
  15. smooth = x - shipoffx;
  16. if("0" < life)
  17. {
  18.    life -= "10";
  19.    if("0" < life)
  20.    {
  21.       setProperty("/ship", _xscale, life + "100");
  22.    }
  23.    else
  24.    {
  25.       setProperty("/ship", _xscale, "100");
  26.       setProperty("lives" add lives, _alpha, "30");
  27.       lives -= "1";
  28.    }
  29. }
  30. if(xlf == "0")
  31. {
  32.    if("50000" < score)
  33.    {
  34.       xlf = "1";
  35.       lives += "1";
  36.       setProperty("lives" add lives, _alpha, "100");
  37.    }
  38. }
  39.