home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Acao / DomonicDefence4.swf / scripts / DefineSprite_1351 / frame_15 / DoAction.as
Encoding:
Text File  |  2005-09-27  |  433 b   |  24 lines

  1. tempo = random(_root.enemyOut) + 1;
  2. choose = random(13) + 1;
  3. switch(choose)
  4. {
  5.    case 1:
  6.       _root["enemy" + tempo].life -= random(10) + 3;
  7.       break;
  8.    case 4:
  9.       _root["enemy" + tempo].life -= random(9) + 12;
  10.       break;
  11.    case 6:
  12.       _root["enemy" + tempo].life -= random(30) + 10;
  13. }
  14. if(timer > 750)
  15. {
  16.    this.active = false;
  17.    timer = 0;
  18.    this.gotoAndStop(16);
  19. }
  20. else
  21. {
  22.    gotoAndPlay(1);
  23. }
  24.