Frame 1
gameOver._visible = false;
muptop = new Sound();
muptop.attachSound("Muptop");
muptop.start(0, 999);
startbutton.onRelease = function () {
this._visible = false;
stopAllSounds();
cannon1._visible = true;
cannon2._visible = true;
cannon3._visible = true;
title._visible = false;
_root.createEmptyMovieClip("bullets", 10);
bCount = 0;
_root.createEmptyMovieClip("planes", 11);
pCount = 0;
_root.createEmptyMovieClip("bombs", 12);
bmCount = 0;
cannonEnterFrame = function () {
var _local4 = _root._xmouse - this._x;
var _local3 = _root._ymouse - this._y;
this.ang = Math.atan2(_local3, _local4);
if (this.ang > 0) {
_local3 = 0;
this.ang = Math.atan2(_local3, _local4);
}
this._rotation = this.ang * 57.2957795130823;
if (bombs.hitTest(this._x, this._y, true)) {
this.alive = false;
this._visible = false;
numAlive--;
if (numAlive == 0) {
stopAllSounds();
gameover = new Sound();
gameover.attachSound("imenevero");
gameover.start(0, 999);
gameOver._visible = true;
startbutton._visible = true;
}
delete this.onEnterFrame;
}
};
dofires = function () {
if (cannon1.alive) {
fireBullet(cannon1);
AAShot.start(0, 0);
AAShot.setPan(-15);
AAShot.setVolume(100);
}
if (cannon2.alive) {
fireBullet(cannon2);
AAShot.start(0, 0);
AAShot.setVolume(100);
}
if (cannon3.alive) {
fireBullet(cannon3);
AAShot.start(0, 0);
AAShot.setPan(15);
AAShot.setVolume(100);
}
AAShot.start(0, 0);
};
_root.onMouseDown = function () {
dofires();
bfire = setInterval(dofires, 170);
};
_root.onMouseUp = function () {
clearInterval(bfire);
};
_root.onRelease = function () {
clearInterval(bfire);
};
Ruinion = new Sound();
Ruinion.attachSound("Ruinion");
Ruinion.start(0, 999);
fireBullet = function (who) {
var _local2 = "bullet" + bCount;
bullets.attachMovie("bullet", _local2, bCount);
bullets[_local2]._x = who._x + (Math.cos(who.ang) * 40);
bullets[_local2]._y = who._y + (Math.sin(who.ang) * 40);
bullets[_local2]._rotation = who._rotation;
bullets[_local2].dx = Math.cos(who.ang) * 11;
bullets[_local2].dy = Math.sin(who.ang) * 11;
bullets[_local2].gotoAndStop((bCount % 2) + 1);
who["muzzleFlash" + ((bCount % 2) + 1)].play();
bullets[_local2].onEnterFrame = function () {
this._x = this._x + this.dx;
this._y = this._y + this.dy;
if (((this._x < -100) || (this._x > 650)) || (this._y < -100)) {
this.removeMovieClip();
}
};
bCount++;
};
launchPlane = function () {
var _local2 = "plane" + pCount;
planes.attachMovie("plane", _local2, pCount);
planes[_local2]._x = 600;
planes[_local2]._y = (Math.random() * 200) + 20;
planes[_local2].dx = -((Math.random() * 3) + 3);
planes[_local2].dy = 0;
planes[_local2]._yscale = -100;
planes[_local2].gotoAndStop(1);
planes[_local2].hit = 0;
planes[_local2].onEnterFrame = function () {
this._x = this._x + this.dx;
this._y = this._y + this.dy;
this._rotation = Math.atan2(this.dy, this.dx) * 57.2957795130823;
if ((this._x < -100) || (this._y > 500)) {
this.removeMovieClip();
}
if (bullets.hitTest(this._x, this._y, true) && (this.hit < 5)) {
this.hit++;
this.gotoAndStop(this.hit + 1);
}
if (this.hit == 5) {
kills++;
kills_txt.text = kills;
this.hit = 6;
}
if (this.hit == 6) {
this.dy = this.dy + 0.1;
}
if (((Math.random() * 150) < 1) && (this.hit < 5)) {
dropBomb(this._x, this._y + 5, this.dx / 3);
}
};
pCount++;
};
planeLauncher = setInterval(launchPlane, 1000);
dropBomb = function (x, y, dx) {
var _local2 = "bomb" + bmCount;
bombs.attachMovie("bomb", _local2, bmCount);
bombs[_local2]._x = x;
bombs[_local2]._y = y;
bombs[_local2].dx = dx;
bombs[_local2].dy = 0;
bombs[_local2].gotoAndStop(1);
bombs[_local2].onEnterFrame = function () {
this._x = this._x + this.dx;
this._y = this._y + this.dy;
this._rotation = Math.atan2(this.dy, this.dx) * 57.2957795130823;
if (this._x < -100) {
this.removeMovieClip();
}
if (bullets.hitTest(this._x, this._y, true)) {
this.removeMovieClip();
}
if (this._y > 350) {
this.play();
this._rotation = 0;
delete this.onEnterFrame;
}
this.dy = this.dy + 0.05;
this.dx = this.dx * 0.99;
};
bmCount++;
};
cannon1.onEnterFrame = cannonEnterFrame;
cannon2.onEnterFrame = cannonEnterFrame;
cannon3.onEnterFrame = cannonEnterFrame;
cannon1.alive = true;
cannon2.alive = true;
cannon3.alive = true;
numAlive = 3;
kills = 0;
kills_txt.text = kills;
skyline.swapDepths(15);
gameOver.swapDepths(20);
gameOver._visible = false;
AAShot = new Sound(cannon1);
AAShot.attachSound("AAShot");
};
Symbol 23 MovieClip [bomb] Frame 16
this.removeMovieClip();
Symbol 30 MovieClip Frame 1
stop();