home *** CD-ROM | disk | FTP | other *** search
- onenterframe = function()
- {
- d--;
- if(!d)
- {
- d = r.itemdelay;
- if(enemyarray.length > 0)
- {
- var tipe = enemyarray.pop();
- var lane = findlane();
- if(tipe == 1 or tipe == 18)
- {
- r.attachmovie("car","c" + r.ed,r.ed);
- r["c" + r.ed].dep = r.ed;
- r["c" + r.ed]._y = lane;
- r["c" + r.ed]._x = 600;
- r["c" + r.ed].tipe = tipe;
- r.cars.push("c" + r.ed);
- r.ed = r.ed + 1;
- }
- else if(tipe == 2)
- {
- r.attachmovie("bot2","b" + r.ed,r.ed);
- r["b" + r.ed].dep = r.ed;
- r["b" + r.ed]._y = 330;
- r["b" + r.ed]._x = 675;
- r.enemy.push("b" + r.ed);
- r.ed = r.ed + 1;
- }
- else if(tipe == 3)
- {
- r.attachmovie("bot3","b" + r.ed,r.ed);
- r["b" + r.ed].dep = r.ed;
- r["b" + r.ed]._y = lane;
- r["b" + r.ed]._x = 650;
- r.enemy.push("b" + r.ed);
- r.ed = r.ed + 1;
- }
- else if(tipe == 4)
- {
- r.attachmovie("bot4","b" + r.ed,r.ed);
- r["b" + r.ed].dep = r.ed;
- r["b" + r.ed]._y = lane;
- r["b" + r.ed]._x = 670;
- r.enemy.push("b" + r.ed);
- r.ed = r.ed + 1;
- }
- else if(tipe == 5)
- {
- r.attachmovie("hc","b" + r.ed,r.ed);
- r["b" + r.ed].dep = r.ed;
- r.enemy.push("b" + r.ed);
- r.ed = r.ed + 1;
- }
- else if(tipe == 6)
- {
- r.attachmovie("UFO","b" + r.ed,r.ed);
- r["b" + r.ed].dep = r.ed;
- r.enemy.push("b" + r.ed);
- r.ed = r.ed + 1;
- }
- else if(tipe == 7)
- {
- var bypos = [280,305,330,355,380];
- bypos.reverse();
- var bxpos = [550,520,550,520,550];
- bxpos.reverse();
- var i = 0;
- while(i < 5)
- {
- r.attachmovie("botx","rx" + i,r.ed);
- r["rx" + i].dep = r.ed;
- r["rx" + i]._y = bypos.pop();
- r["rx" + i]._x = 670 + random(100);
- r["rx" + i].pos = bxpos.pop();
- r.enemy.push("rx" + i);
- r.ed = r.ed + 1;
- i++;
- }
- r.attachmovie("xcontroller","b" + r.ed,r.ed);
- r["b" + r.ed]._y = 10000;
- r.enemy.push("b" + r.ed);
- r.ed = r.ed + 1;
- r.gunrecover1 *= 10;
- r.gunrecover2 *= 1.84;
- r.zloop.stop();
- r.zboss.start(0,99999);
- }
- else if(tipe == 8)
- {
- r.attachmovie("bonus","b" + r.ed,r.ed);
- r["b" + r.ed].dep = r.ed;
- r["b" + r.ed]._y = lane - random(30);
- r["b" + r.ed]._x = 620;
- r.enemy.push("b" + r.ed);
- r.ed = r.ed + 1;
- }
- }
- }
- if(r.noshot == 0 and r.gunh > r.gunless)
- {
- r.shootingani = 1;
- r.gunh -= r.gunless;
- r.zshoot.start();
- r.attachmovie("blast","blast" + r.b,r.b);
- r["blast" + r.b]._x = s._x + 25;
- r["blast" + r.b]._y = s._y - 25;
- if(!r.jump)
- {
- r["blast" + r.b].ypos = s._y;
- }
- r.bul.push("blast" + r.b);
- r.b = r.b + 1;
- }
- if(r.noshot < 1)
- {
- r.noshot--;
- }
- if(r.autofire)
- {
- if(r.noshot < -3)
- {
- r.noshot = 0;
- }
- }
- if(r.inv > 0)
- {
- r.inv--;
- }
- if(r.gunh < r.gunless)
- {
- r.gunh += r.gunrecover1;
- }
- else
- {
- r.gunh += r.gunrecover2;
- }
- if(r.gunh > 100)
- {
- r.gunh = 100;
- }
- };
- stop();
-