home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Nave / avenger.swf / scripts / frame_102 / DoAction.as
Encoding:
Text File  |  2006-06-13  |  2.4 KB  |  116 lines

  1. stop();
  2. wyspa._visible = true;
  3. attackTime = 0;
  4. level = 2;
  5. menu.level_txt.text = level;
  6. wyspa.onEnterFrame = function()
  7. {
  8.    this._x -= 0.8;
  9.    if(this._x < -200)
  10.    {
  11.       this._x = 700;
  12.    }
  13. };
  14. muzyka3 = new Sound();
  15. muzyka3.attachSound("level2");
  16. muzyka3.setVolume(100);
  17. muzyka3.start(0,9999);
  18. next_lev = false;
  19. this.onEnterFrame = function()
  20. {
  21.    if(attackTime == 50)
  22.    {
  23.       var sx = Math.random() * 180 + 100;
  24.       ship_attack3("ship4",sx,6,7);
  25.    }
  26.    if(attackTime == 120)
  27.    {
  28.       ship_attack0("ship1MaW",3);
  29.    }
  30.    if(attackTime == 250)
  31.    {
  32.       var sx = Math.random() * 100 + 180;
  33.       ship_attack2("ship5",sx,8,7);
  34.    }
  35.    if(attackTime == 350)
  36.    {
  37.       var sx = Math.random() * 120 + 120;
  38.       ship_attack3("ship3",sx,5,-7);
  39.    }
  40.    if(attackTime == 400)
  41.    {
  42.       ship_attack0("ship1",2);
  43.    }
  44.    if(attackTime == 420)
  45.    {
  46.       ship_attack1("ship7",3);
  47.    }
  48.    if(attackTime == 440)
  49.    {
  50.       boss_attack1("boss2",600,150,laser2a);
  51.    }
  52.    if(attackTime == 600)
  53.    {
  54.       ship_attack1("ship1",3);
  55.    }
  56.    if(attackTime == 700)
  57.    {
  58.       ship_attack0("ship1MaW",2);
  59.    }
  60.    if(attackTime == 880)
  61.    {
  62.       boss_attack2("boss3MaW",600,150,laser2a);
  63.    }
  64.    if(attackTime == 905)
  65.    {
  66.       boss_attack1("boss1MaW",600,150,bullet_boss);
  67.    }
  68.    if(attackTime == 950)
  69.    {
  70.       var sx = Math.random() * 180 + 100;
  71.       ship_attack3("ship5",sx,2,-7);
  72.    }
  73.    if(attackTime == 1050)
  74.    {
  75.       var sx = Math.random() * 100 + 180;
  76.       ship_attack2("ship4",sx,5,7);
  77.    }
  78.    if(attackTime == 1120)
  79.    {
  80.       var sx = Math.random() * 120 + 120;
  81.       ship_attack3("ship7",sx,6,7);
  82.    }
  83.    if(attackTime == 1290)
  84.    {
  85.       ship_attack1("ship1Maw",4);
  86.    }
  87.    if(attackTime == 1380)
  88.    {
  89.       boss_attack1("boss1MaW",600,150,laser2a);
  90.    }
  91.    if(attackTime == 1480)
  92.    {
  93.       var sx = Math.random() * 180 + 100;
  94.       ship_attack3("ship5",sx,5,-8);
  95.    }
  96.    if(attackTime == 1500)
  97.    {
  98.       var sx = Math.random() * 180 + 100;
  99.       ship_attack3("ship6",sx,5,8);
  100.    }
  101.    if(attackTime == 1600)
  102.    {
  103.       boss_level("boss_koniec_2",600,150,bullet1);
  104.    }
  105.    if(attackTime > 1650 && przenies <= 0 && next_lev == true)
  106.    {
  107.       delete this.onEnterFrame;
  108.       delete wyspa.onEnterFrame;
  109.       wyspa._visible = false;
  110.       muzyka3.stop();
  111.       gotoAndPlay(152);
  112.    }
  113.    attackTime++;
  114.    trace(attackTime);
  115. };
  116.