Instance of Symbol 22 MovieClip in Frame 1
onClipEvent (load) {
this.createTextField("textbox2", 1, 0, 0, 240, 78);
textbox2.variable = "txtdisplay";
textbox2.selectable = false;
myformat = new TextFormat();
myformat.color = 333;
myformat.bold = true;
myformat.font = "Sydnie";
}
onClipEvent (enterFrame) {
currentbytes = int(_root.getBytesLoaded() / 1000);
totalbytes = int(_root.getBytesTotal() / 1000);
percentbytes = int((currentbytes / totalbytes) * 100);
textbox2.text = ((("Loading" + percentbytes) + "% of ") + totalbytes) + " kb";
textbox2.setTextFormat(myformat);
if (percentbytes >= 100) {
textbox2.text = "Loading Complete";
textbox2.setTextFormat(myformat);
_root.gotoAndStop();
}
}
Frame 121
Mouse.hide();
stopAllSounds();
Instance of Symbol 26 MovieClip in Frame 121
onClipEvent (enterFrame) {
startDrag ("", true);
}
Frame 122
Frame 123
removeMovieClip(gameOver);
removeMovieClip(planes);
removeMovieClip(skyline);
removeMovieClip(bombs);
removeMovieClip(flames);
stop();
Frame 125
stop();
_root.createEmptyMovieClip("bullets", 10);
bCount = 0;
_root.createEmptyMovieClip("planes", 3);
pCount = 0;
_root.createEmptyMovieClip("bombs", 4);
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;
numAlive--;
if (numAlive == 0) {
gameOver._visible = true;
menu._visible = true;
}
delete this.onEnterFrame;
}
};
dofires = function () {
if (cannon1.alive) {
fireBullet(cannon1);
}
if (cannon2.alive) {
fireBullet(cannon2);
}
if (cannon3.alive) {
fireBullet(cannon3);
}
blaster.start(0, 0);
};
_root.onMouseDown = function () {
dofires();
bfire = setInterval(dofires, 170);
};
_root.onMouseUp = function () {
clearInterval(bfire);
};
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() * 2) + 2);
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;
menu._visible = false;
blaster = new Sound(cannon1);
blaster.attachSound("blaster");
Frame 126
Mouse.hide();
stop();
stopAllSounds();
Frame 127
stop();
Symbol 21 MovieClip [bomb] Frame 16
this.removeMovieClip();
Symbol 33 Button
on (release) {
play();
}
Symbol 36 Button
on (release) {
gotoAndPlay (126);
}
Symbol 39 Button
on (release) {
gotoAndPlay (127);
}
Symbol 55 MovieClip Frame 1
stop();
Symbol 66 Button
on (release) {
gotoAndPlay (121);
}