home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Nave / roam-and-protect.swf / scripts / DefineSprite_380 / frame_4 / DoAction.as
Encoding:
Text File  |  2005-09-29  |  1.2 KB  |  56 lines

  1. cnt += 1;
  2. if(_root.thislev eq "level7")
  3. {
  4.    if(_root.convoylist.length < 2)
  5.    {
  6.       _root.restart = "true";
  7.       _root.scanner.gotoAndPlay("out");
  8.       _root.play();
  9.    }
  10. }
  11. if(_root.convoylist.length < 1 or _root.dead eq "true")
  12. {
  13.    _root.restart = "true";
  14.    _root.scanner.gotoAndPlay("out");
  15.    _root.play();
  16. }
  17. else if(_root.complete eq "true")
  18. {
  19.    _root.restart = "true";
  20.    _root.scanner.gotoAndPlay("out");
  21.    _root.gotoAndPlay(_root._currentframe + 3);
  22. }
  23. if(popcnt < _root.refreshmax)
  24. {
  25.    if(cnt > randpop)
  26.    {
  27.       _root.scanner.populate2();
  28.       popcnt += 1;
  29.       gotoAndPlay(2);
  30.    }
  31.    else
  32.    {
  33.       gotoAndPlay(_currentframe - 1);
  34.    }
  35. }
  36. else
  37. {
  38.    if(_root.refreshtimed eq "true")
  39.    {
  40.       if(gonecnt == popcnt)
  41.       {
  42.          _root.survived = _root.convoylist.length;
  43.          endcnt += 1;
  44.          if(endcnt > 19)
  45.          {
  46.             _root.restart = "true";
  47.             _root.scanner.gotoAndPlay("out");
  48.             _root.gotoAndPlay(_root._currentframe + 3);
  49.             endcnt = 0;
  50.          }
  51.       }
  52.    }
  53.    gotoAndPlay(_currentframe - 1);
  54. }
  55. _root.enleft = _root.refreshmax - gonecnt;
  56.