home *** CD-ROM | disk | FTP | other *** search
- _root.bulletarray = new Array();
- _root.red1 = function()
- {
- _root.interval = 5;
- _root.shot.duplicateMovieClip("bullet" + _root.depth,_root.depth);
- _root["bullet" + _root.depth]._x = _root.ship._x + _root.ship.gun._x;
- _root["bullet" + _root.depth]._y = _root.ship._y + _root.ship.gun._y;
- _root["bullet" + _root.depth].xvalue = _root.bulletspeed;
- _root["bullet" + _root.depth].yvalue = 0;
- _root["bullet" + _root.depth].shottype = "red1";
- _root.bulletarray[_root.bulletarray.length] = _root["bullet" + _root.depth];
- if(_root.depth < 100000)
- {
- _root.depth = _root.depth + 1;
- }
- else
- {
- _root.depth = 100;
- }
- };
- _root.red2 = function()
- {
- _root.interval = 5;
- _root.shot.duplicateMovieClip("bullet" + _root.depth,_root.depth);
- _root["bullet" + _root.depth]._x = _root.ship._x + _root.ship.gun._x;
- _root["bullet" + _root.depth]._y = _root.ship._y + _root.ship.gun._y;
- _root["bullet" + _root.depth].xvalue = _root.bulletspeed;
- _root["bullet" + _root.depth].yvalue = 0;
- _root["bullet" + _root.depth].gotoAndStop("red2");
- _root["bullet" + _root.depth].shottype = "red2";
- _root.bulletarray[_root.bulletarray.length] = _root["bullet" + _root.depth];
- if(_root.depth < 100000)
- {
- _root.depth = _root.depth + 1;
- }
- else
- {
- _root.depth = 100;
- }
- };
- _root.red3 = function()
- {
- _root.interval = 5;
- _root.shot.duplicateMovieClip("bullet" + _root.depth,_root.depth);
- _root["bullet" + _root.depth]._x = _root.ship._x + _root.ship.gun._x;
- _root["bullet" + _root.depth]._y = _root.ship._y + _root.ship.gun._y;
- _root["bullet" + _root.depth].xvalue = _root.bulletspeed;
- _root["bullet" + _root.depth].yvalue = 0;
- _root["bullet" + _root.depth].gotoAndStop("red3");
- _root["bullet" + _root.depth].shottype = "red3";
- _root.bulletarray[_root.bulletarray.length] = _root["bullet" + _root.depth];
- if(_root.depth < 100000)
- {
- _root.depth = _root.depth + 1;
- }
- else
- {
- _root.depth = 100;
- }
- };
- _root.red4 = function()
- {
- _root.interval = 6;
- _root.shot.duplicateMovieClip("bullet" + _root.depth,_root.depth);
- _root["bullet" + _root.depth]._x = _root.ship._x + _root.ship.gun._x;
- _root["bullet" + _root.depth]._y = _root.ship._y + _root.ship.gun._y;
- _root["bullet" + _root.depth].xvalue = _root.x20;
- _root["bullet" + _root.depth].yvalue = _root.y20;
- _root["bullet" + _root.depth]._rotation = 20;
- _root["bullet" + _root.depth].gotoAndStop("red2");
- _root["bullet" + _root.depth].shottype = "red4";
- _root.bulletarray[_root.bulletarray.length] = _root["bullet" + _root.depth];
- if(_root.depth < 100000)
- {
- _root.depth = _root.depth + 1;
- }
- else
- {
- _root.depth = 100;
- }
- _root.shot.duplicateMovieClip("bullet" + _root.depth,_root.depth);
- _root["bullet" + _root.depth]._x = _root.ship._x + _root.ship.gun._x;
- _root["bullet" + _root.depth]._y = _root.ship._y + _root.ship.gun._y;
- _root["bullet" + _root.depth].xvalue = _root.bulletspeed;
- _root["bullet" + _root.depth].yvalue = 0;
- _root["bullet" + _root.depth].gotoAndStop("red2");
- _root["bullet" + _root.depth].shottype = "red4";
- _root.bulletarray[_root.bulletarray.length] = _root["bullet" + _root.depth];
- if(_root.depth < 100000)
- {
- _root.depth = _root.depth + 1;
- }
- else
- {
- _root.depth = 100;
- }
- _root.shot.duplicateMovieClip("bullet" + _root.depth,_root.depth);
- _root["bullet" + _root.depth]._x = _root.ship._x + _root.ship.gun._x;
- _root["bullet" + _root.depth]._y = _root.ship._y + _root.ship.gun._y;
- _root["bullet" + _root.depth].xvalue = _root.x20;
- _root["bullet" + _root.depth].yvalue = - _root.y20;
- _root["bullet" + _root.depth]._rotation = -20;
- _root["bullet" + _root.depth].gotoAndStop("red2");
- _root["bullet" + _root.depth].shottype = "red4";
- _root.bulletarray[_root.bulletarray.length] = _root["bullet" + _root.depth];
- if(_root.depth < 100000)
- {
- _root.depth = _root.depth + 1;
- }
- else
- {
- _root.depth = 100;
- }
- };
- _root.sred = function()
- {
- _root.shot.duplicateMovieClip("bullet" + _root.depth,_root.depth);
- _root["bullet" + _root.depth]._x = _root.sredx;
- _root["bullet" + _root.depth]._y = _root.sredy;
- _root["bullet" + _root.depth].destx = 100;
- _root["bullet" + _root.depth].desty = 100;
- _root["bullet" + _root.depth].diffx = _root["bullet" + _root.depth]._x - _root["bullet" + _root.depth].destx;
- _root["bullet" + _root.depth].diffy = _root["bullet" + _root.depth]._y - _root["bullet" + _root.depth].desty;
- _root["bullet" + _root.depth].angle = Math.atan2(_root["bullet" + _root.depth].diffy,_root["bullet" + _root.depth].diffx);
- _root["bullet" + _root.depth].xvalue = -15 * Math.cos(_root["bullet" + _root.depth].angle);
- _root["bullet" + _root.depth].yvalue = -15 * Math.sin(_root["bullet" + _root.depth].angle);
- _root["bullet" + _root.depth].gotoAndStop("bomb");
- _root["bullet" + _root.depth].shottype = "sred";
- _root["bullet" + _root.depth].exploding = false;
- _root.bulletarray[_root.bulletarray.length] = _root["bullet" + _root.depth];
- if(_root.depth < 100000)
- {
- _root.depth = _root.depth + 1;
- }
- else
- {
- _root.depth = 100;
- }
- _root.shot.duplicateMovieClip("bullet" + _root.depth,_root.depth);
- _root["bullet" + _root.depth]._x = _root.sredx;
- _root["bullet" + _root.depth]._y = _root.sredy;
- _root["bullet" + _root.depth].destx = 600;
- _root["bullet" + _root.depth].desty = 100;
- _root["bullet" + _root.depth].diffx = _root["bullet" + _root.depth]._x - _root["bullet" + _root.depth].destx;
- _root["bullet" + _root.depth].diffy = _root["bullet" + _root.depth]._y - _root["bullet" + _root.depth].desty;
- _root["bullet" + _root.depth].angle = Math.atan2(_root["bullet" + _root.depth].diffy,_root["bullet" + _root.depth].diffx);
- _root["bullet" + _root.depth].xvalue = -15 * Math.cos(_root["bullet" + _root.depth].angle);
- _root["bullet" + _root.depth].yvalue = -15 * Math.sin(_root["bullet" + _root.depth].angle);
- _root["bullet" + _root.depth].gotoAndStop("bomb");
- _root["bullet" + _root.depth].shottype = "sred";
- _root["bullet" + _root.depth].exploding = false;
- _root.bulletarray[_root.bulletarray.length] = _root["bullet" + _root.depth];
- if(_root.depth < 100000)
- {
- _root.depth = _root.depth + 1;
- }
- else
- {
- _root.depth = 100;
- }
- _root.shot.duplicateMovieClip("bullet" + _root.depth,_root.depth);
- _root["bullet" + _root.depth]._x = _root.sredx;
- _root["bullet" + _root.depth]._y = _root.sredy;
- _root["bullet" + _root.depth].destx = 100;
- _root["bullet" + _root.depth].desty = 400;
- _root["bullet" + _root.depth].diffx = _root["bullet" + _root.depth]._x - _root["bullet" + _root.depth].destx;
- _root["bullet" + _root.depth].diffy = _root["bullet" + _root.depth]._y - _root["bullet" + _root.depth].desty;
- _root["bullet" + _root.depth].angle = Math.atan2(_root["bullet" + _root.depth].diffy,_root["bullet" + _root.depth].diffx);
- _root["bullet" + _root.depth].xvalue = -15 * Math.cos(_root["bullet" + _root.depth].angle);
- _root["bullet" + _root.depth].yvalue = -15 * Math.sin(_root["bullet" + _root.depth].angle);
- _root["bullet" + _root.depth].gotoAndStop("bomb");
- _root["bullet" + _root.depth].shottype = "sred";
- _root["bullet" + _root.depth].exploding = false;
- _root.bulletarray[_root.bulletarray.length] = _root["bullet" + _root.depth];
- if(_root.depth < 100000)
- {
- _root.depth = _root.depth + 1;
- }
- else
- {
- _root.depth = 100;
- }
- _root.shot.duplicateMovieClip("bullet" + _root.depth,_root.depth);
- _root["bullet" + _root.depth]._x = _root.sredx;
- _root["bullet" + _root.depth]._y = _root.sredy;
- _root["bullet" + _root.depth].destx = 600;
- _root["bullet" + _root.depth].desty = 400;
- _root["bullet" + _root.depth].diffx = _root["bullet" + _root.depth]._x - _root["bullet" + _root.depth].destx;
- _root["bullet" + _root.depth].diffy = _root["bullet" + _root.depth]._y - _root["bullet" + _root.depth].desty;
- _root["bullet" + _root.depth].angle = Math.atan2(_root["bullet" + _root.depth].diffy,_root["bullet" + _root.depth].diffx);
- _root["bullet" + _root.depth].xvalue = -15 * Math.cos(_root["bullet" + _root.depth].angle);
- _root["bullet" + _root.depth].yvalue = -15 * Math.sin(_root["bullet" + _root.depth].angle);
- _root["bullet" + _root.depth].gotoAndStop("bomb");
- _root["bullet" + _root.depth].shottype = "sred";
- _root["bullet" + _root.depth].exploding = false;
- _root.bulletarray[_root.bulletarray.length] = _root["bullet" + _root.depth];
- if(_root.depth < 100000)
- {
- _root.depth = _root.depth + 1;
- }
- else
- {
- _root.depth = 100;
- }
- };
- _root.blue1 = function()
- {
- _root.interval = 10;
- _root.shot.duplicateMovieClip("bullet" + _root.bluedepth,_root.bluedepth);
- _root["bullet" + _root.bluedepth]._x = _root.ship._x;
- _root["bullet" + _root.bluedepth]._y = _root.ship._y;
- _root["bullet" + _root.bluedepth].xvalue = _root.bulletspeed;
- _root["bullet" + _root.bluedepth].yvalue = 0;
- _root["bullet" + _root.bluedepth].gotoAndStop("blue1");
- _root["bullet" + _root.bluedepth].shottype = "blue1";
- _root["bullet" + _root.bluedepth].randomframe = random(5) + 1;
- _root["bullet" + _root.bluedepth].blue.gotoAndPlay(randomframe);
- _root.bulletarray[_root.bulletarray.length] = _root["bullet" + _root.bluedepth];
- if(_root.bluedepth < 100040)
- {
- _root.bluedepth = _root.bluedepth + 1;
- }
- else
- {
- _root.bluedepth = 100010;
- }
- _root.blueready = false;
- _root["bullet" + _root.bluedepth].explodedelay = 0;
- };
- _root.blue2 = function()
- {
- _root.interval = 11;
- _root.shot.duplicateMovieClip("bullet" + _root.bluedepth,_root.bluedepth);
- _root["bullet" + _root.bluedepth]._x = _root.ship._x;
- _root["bullet" + _root.bluedepth]._y = _root.ship._y;
- _root["bullet" + _root.bluedepth].xvalue = _root.bulletspeed;
- _root["bullet" + _root.bluedepth].yvalue = 0;
- _root["bullet" + _root.bluedepth].gotoAndStop("blue2");
- _root["bullet" + _root.bluedepth].shottype = "blue2";
- _root["bullet" + _root.bluedepth].randomframe = random(5) + 1;
- _root["bullet" + _root.bluedepth].blue.gotoAndPlay(randomframe);
- _root.bulletarray[_root.bulletarray.length] = _root["bullet" + _root.bluedepth];
- if(_root.bluedepth < 100040)
- {
- _root.bluedepth = _root.bluedepth + 1;
- }
- else
- {
- _root.bluedepth = 100010;
- }
- _root["bullet" + _root.bluedepth].explodedelay = 0;
- };
- _root.blue3 = function()
- {
- _root.interval = 11;
- _root.shot.duplicateMovieClip("bullet" + _root.bluedepth,_root.bluedepth);
- _root["bullet" + _root.bluedepth]._x = _root.ship._x;
- _root["bullet" + _root.bluedepth]._y = _root.ship._y;
- _root["bullet" + _root.bluedepth].xvalue = _root.bulletspeed;
- _root["bullet" + _root.bluedepth].yvalue = 0;
- _root["bullet" + _root.bluedepth].gotoAndStop("blue3");
- _root["bullet" + _root.bluedepth].shottype = "blue3";
- _root["bullet" + _root.bluedepth].randomframe = random(5) + 1;
- _root["bullet" + _root.bluedepth].blue.gotoAndPlay(randomframe);
- _root.bulletarray[_root.bulletarray.length] = _root["bullet" + _root.bluedepth];
- if(_root.bluedepth < 100040)
- {
- _root.bluedepth = _root.bluedepth + 1;
- }
- else
- {
- _root.bluedepth = 100010;
- }
- _root["bullet" + _root.bluedepth].explodedelay = 0;
- };
- _root.blue4 = function()
- {
- _root.interval = 12;
- _root.shot.duplicateMovieClip("bullet" + _root.bluedepth,_root.bluedepth);
- _root["bullet" + _root.bluedepth]._x = _root.ship._x;
- _root["bullet" + _root.bluedepth]._y = _root.ship._y;
- _root["bullet" + _root.bluedepth].xvalue = _root.bulletspeed;
- _root["bullet" + _root.bluedepth].yvalue = 0;
- _root["bullet" + _root.bluedepth].gotoAndStop("blue4");
- _root["bullet" + _root.bluedepth].shottype = "blue4";
- _root["bullet" + _root.bluedepth].randomframe = random(5) + 1;
- _root["bullet" + _root.bluedepth].blue.gotoAndPlay(randomframe);
- _root.bulletarray[_root.bulletarray.length] = _root["bullet" + _root.bluedepth];
- if(_root.bluedepth < 100040)
- {
- _root.bluedepth = _root.bluedepth + 1;
- }
- else
- {
- _root.bluedepth = 100010;
- }
- _root["bullet" + _root.bluedepth].explodedelay = 0;
- };
- _root.sblue = function()
- {
- _root.shot.duplicateMovieClip("bullet" + _root.depth,_root.depth);
- _root["bullet" + _root.depth]._x = _root.sbluex;
- _root["bullet" + _root.depth]._y = _root.sbluey;
- _root["bullet" + _root.depth].xvalue = _root.powerupspeed;
- _root["bullet" + _root.depth].yvalue = 0;
- _root["bullet" + _root.depth].gotoAndStop("sblue");
- _root["bullet" + _root.depth].shottype = "sblue";
- _root.bulletarray[_root.bulletarray.length] = _root["bullet" + _root.depth];
- if(_root.depth < 100000)
- {
- _root.depth = _root.depth + 1;
- }
- else
- {
- _root.depth = 100;
- }
- };
- _root.green1 = function()
- {
- _root.interval = 6;
- _root.shot.duplicateMovieClip("bullet" + _root.depth,_root.depth);
- _root["bullet" + _root.depth]._x = _root.ship._x + _root.ship.green._x;
- _root["bullet" + _root.depth]._y = _root.ship._y + _root.ship.green._y;
- _root["bullet" + _root.depth].xvalue = 5 + _root.bulletspeed;
- _root["bullet" + _root.depth].yvalue = 0;
- _root["bullet" + _root.depth].gotoAndStop("green1");
- _root["bullet" + _root.depth].shottype = "green1";
- _root.bulletarray[_root.bulletarray.length] = _root["bullet" + _root.depth];
- if(_root.depth < 100000)
- {
- _root.depth = _root.depth + 1;
- }
- else
- {
- _root.depth = 100;
- }
- };
- _root.green2 = function()
- {
- _root.interval = 5;
- _root.shot.duplicateMovieClip("bullet" + _root.depth,_root.depth);
- _root["bullet" + _root.depth]._x = _root.ship._x + _root.ship.green._x;
- _root["bullet" + _root.depth]._y = _root.ship._y + _root.ship.green._y;
- _root["bullet" + _root.depth].xvalue = 5 + _root.bulletspeed;
- _root["bullet" + _root.depth].yvalue = 0;
- _root["bullet" + _root.depth].gotoAndStop("green2");
- _root["bullet" + _root.depth].shottype = "green2";
- _root.bulletarray[_root.bulletarray.length] = _root["bullet" + _root.depth];
- if(_root.depth < 100000)
- {
- _root.depth = _root.depth + 1;
- }
- else
- {
- _root.depth = 100;
- }
- };
- _root.green3 = function()
- {
- _root.interval = 5;
- _root.shot.duplicateMovieClip("bullet" + _root.depth,_root.depth);
- _root["bullet" + _root.depth]._x = _root.ship._x + _root.ship.green._x;
- _root["bullet" + _root.depth]._y = _root.ship._y + _root.ship.green._y;
- _root["bullet" + _root.depth].xvalue = 5 + _root.bulletspeed;
- _root["bullet" + _root.depth].yvalue = 0;
- _root["bullet" + _root.depth].gotoAndStop("green3");
- _root["bullet" + _root.depth].shottype = "green3";
- _root.bulletarray[_root.bulletarray.length] = _root["bullet" + _root.depth];
- if(_root.depth < 100000)
- {
- _root.depth = _root.depth + 1;
- }
- else
- {
- _root.depth = 100;
- }
- };
- _root.green4 = function()
- {
- _root.interval = 4;
- _root.shot.duplicateMovieClip("bullet" + _root.depth,_root.depth);
- _root["bullet" + _root.depth]._x = _root.ship._x + _root.ship.green._x;
- _root["bullet" + _root.depth]._y = _root.ship._y + _root.ship.green._y;
- _root["bullet" + _root.depth].xvalue = 5 + _root.bulletspeed;
- _root["bullet" + _root.depth].yvalue = 0;
- _root["bullet" + _root.depth].gotoAndStop("green4");
- _root["bullet" + _root.depth].shottype = "green4";
- _root.bulletarray[_root.bulletarray.length] = _root["bullet" + _root.depth];
- if(_root.depth < 100000)
- {
- _root.depth = _root.depth + 1;
- }
- else
- {
- _root.depth = 100;
- }
- };
- _root.firelaser = function()
- {
- if(_root.status.mask.laser._xscale == 100)
- {
- _root.lasersound.start(0,0);
- _root.shot.duplicateMovieClip("bullet" + _root.bluedepth,_root.bluedepth);
- _root["bullet" + _root.bluedepth].gotoAndStop("laser");
- _root["bullet" + _root.bluedepth]._x = _root.ship._x + _root.ship.laser._x;
- _root["bullet" + _root.bluedepth]._y = _root.ship._y + _root.ship.laser._y;
- _root.bulletarray[_root.bulletarray.length] = _root["bullet" + _root.bluedepth];
- _root["bullet" + _root.bluedepth].xvalue = 40;
- _root["bullet" + _root.bluedepth].yvalue = 0;
- _root.status.mask.laser._xscale = 0;
- _root["bullet" + _root.bluedepth].shottype = "laser";
- if(_root.bluedepth < 100040)
- {
- _root.bluedepth = _root.bluedepth + 1;
- }
- else
- {
- _root.bluedepth = 100010;
- }
- }
- };
- _root.firehmfunction = function()
- {
- _root.megahoming.duplicateMovieClip("bullet" + _root.depth,_root.depth);
- _root["bullet" + _root.depth]._x = _root.ship._x + _root.ship.missile._x;
- _root["bullet" + _root.depth]._y = _root.ship._y + _root.ship.missile._y;
- if(_root.enemyarray.length >= 1)
- {
- _root["bullet" + _root.depth].enemynumber = Number(_root.targetenemy);
- _root["bullet" + _root.depth].targetname = _root.enemyarray[_root.targetenemy]._name;
- _root["bullet" + _root.depth].targetname._visible = true;
- }
- else
- {
- _root["bullet" + _root.depth].targetname._visible = false;
- }
- _root["bullet" + _root.depth].megahomingacceleratex = 2;
- _root["bullet" + _root.depth].megahomingacceleratey = 2;
- _root["bullet" + _root.depth].megahomingturndelay = 3;
- _root["bullet" + _root.depth].deploy = true;
- _root["bullet" + _root.depth].deployrate = 5;
- _root["bullet" + _root.depth].speedx = 0;
- _root["bullet" + _root.depth].speedy = 0;
- _root["bullet" + _root.depth].shottype = "homingmissile";
- _root.bulletarray.push(_root["bullet" + _root.depth]);
- if(_root.depth < 100000)
- {
- _root.depth = _root.depth + 1;
- }
- else
- {
- _root.depth = 100;
- }
- };
- _root.firebomb = function()
- {
- if(_root.numberofbombs >= 0)
- {
- if(_root.bombfire == true)
- {
- if(_root.bombsound == false)
- {
- _root.bombexplodesound.start(0,0);
- _root.bombsound = true;
- }
- _root.bomb1.bomb.gotoAndStop(2);
- _root.bombexplode = true;
- }
- if(_root.numberofbombs > 0)
- {
- if(_root.bombfire == false)
- {
- _root.shot.duplicateMovieClip("bomb1",_root.bluedepth);
- _root.bomb1.gotoAndStop("bomb");
- _root.bomb1._x = _root.ship._x + _root.ship.bomb._x;
- _root.bomb1._y = _root.ship._y + _root.ship.bomb._y;
- _root.bomb1.xvalue = 20;
- _root.bomb1.shottype = "bomb";
- _root.bombfire = true;
- _root.numberofbombs--;
- _root.status.bomb.gotoAndStop(_root.numberofbombs + 1);
- _root.bulletarray[_root.bulletarray.length] = _root.bomb1;
- if(_root.bluedepth < 100040)
- {
- _root.bluedepth = _root.bluedepth + 1;
- }
- else
- {
- _root.bluedepth = 100010;
- }
- }
- }
- }
- };
-