Frame 1
stop();
Frame 2
_root.force = 0;
_root.counter = 1;
_root.enemylist = new Array();
_root.forcemeter._xscale = (_root.force / 20) * 100;
_root.combo = 0;
_root.ingame = 0;
_root.score = 0;
_root.health = 20;
_root.time = 0;
_root.cannonsound = new Sound();
_root.cannonsound.attachSound("cannon");
stop();
Instance of Symbol 24 MovieClip "forcemeter" in Frame 2
onClipEvent (enterFrame) {
this._xscale = this._xscale + ((((_root.force / 20) * 100) - this._xscale) / 10);
this._alpha = this._xscale;
}
Instance of Symbol 28 MovieClip "life" in Frame 2
onClipEvent (enterFrame) {
this._xscale = this._xscale + ((((_root.health / 20) * 100) - this._xscale) / 10);
_root.lifepercentage = Math.round(this._xscale) + " %";
}
Instance of Symbol 38 MovieClip "bomb" in Frame 2
onClipEvent (load) {
this.launched = 0;
this.maxheight = 0;
this.time = 100;
}
onClipEvent (enterFrame) {
if (this.launched == 1) {
this._x = this._x + this.speedx;
this._y = this._y + this.speedy;
this.speedy = this.speedy + 1.2;
if (0 >= this.reload) {
duplicateMovieClip (_root.fireball_flame, "fireball_flame" + _root.counter, _root.counter);
eval ("_root.fireball_flame" + _root.counter)._x = this._x - this.speedx;
eval ("_root.fireball_flame" + _root.counter)._y = this._y - this.speedy;
_root.counter++;
this.reload = this.reload + 2;
}
this.reload--;
if (170 < this._y) {
this._y = 170;
this.speedy = 0;
this.speedx = this.speedx + ((-this.speedx) / 3);
this._xscale = this._xscale + ((120 - this._xscale) / 3);
this._yscale = this._yscale + ((120 - this._yscale) / 3);
if (this.speedx < 0.2) {
imax = 0;
i = 0;
while (i < _root.enemylist.length) {
if (eval ("_root." + _root.enemylist[i]).hitTest(this)) {
eval ("_root." + _root.enemylist[i]).health = eval ("_root." + _root.enemylist[i]).health - 200;
if (0 >= eval ("_root." + _root.enemylist[i]).health) {
imax = imax + 2;
_root.combo++;
removeMovieClip("_root." + _root.enemylist[i]);
_root.enemylist.splice(i, 1);
i = 0;
while (i < 10) {
duplicateMovieClip (_root.debris, "debris" + _root.counter, _root.counter);
eval ("_root.debris" + _root.counter)._x = this._x;
eval ("_root.debris" + _root.counter)._y = this._y;
_root.counter++;
i++;
}
}
}
i++;
}
this.play();
i = 0;
while (i < imax) {
_root.ingame++;
duplicateMovieClip (_root.glowing, "glowing" + _root.counter, _root.counter);
eval ("_root.glowing" + _root.counter)._x = this._x;
eval ("_root.glowing" + _root.counter)._y = this._y - 10;
eval ("_root.glowing" + _root.counter).speedx = (Math.random() - 0.5) * 6;
eval ("_root.glowing" + _root.counter).speedy = -2 + (Math.random() * -6);
_root.counter++;
i++;
}
}
}
}
}
Instance of Symbol 41 MovieClip "fireball_flame" in Frame 2
onClipEvent (load) {
this._alpha = 100;
this._xscale = 100;
this._yscale = 100;
}
onClipEvent (enterFrame) {
if (this._name != "fireball_flame") {
this._alpha = this._alpha - 10;
this._xscale = this._xscale - 10;
this._yscale = this._yscale - 10;
if (0 >= this._alpha) {
removeMovieClip(this);
}
}
}
Instance of Symbol 46 MovieClip "gunpowder" in Frame 2
onClipEvent (load) {
this._xscale = 50;
this._yscale = 50;
this.gotoAndStop(1 + Math.round(Math.random() * this._totalFrames));
this._alpha = 100;
}
onClipEvent (enterFrame) {
if (this._name != "gunpowder") {
this._xscale = this._xscale + 2;
this._yscale = this._yscale + 2;
this._x = this._x + this.speedx;
this._y = this._y + this.speedy;
this._alpha = this._alpha - 4;
if (10 >= this._alpha) {
this.removeMovieClip();
}
}
}
Instance of Symbol 49 MovieClip "enemy" in Frame 2
onClipEvent (load) {
this.health = 200;
this.speed = 0.8 + (_root.time / 2000);
this.rotation = this.speed * 3;
this.gotoAndStop(1 + Math.round(Math.random() * this._totalFrames));
}
onClipEvent (enterFrame) {
if (this._name != "enemy") {
this._rotation = this._rotation - this.rotation;
this._x = this._x - this.speed;
if (this._x < 50) {
i = 0;
while (i < _root.enemylist.length) {
if (this._name == _root.enemylist[i]) {
_root.enemylist.splice(i, 1);
}
i++;
}
_root.health = _root.health - 2;
removeMovieClip(this);
}
}
}
Instance of Symbol 53 MovieClip "debris" in Frame 2
onClipEvent (load) {
this.ybegin = this._y;
this._rotation = Math.round(Math.random() * 360);
this.x = (Math.random() - 0.5) * 16;
this.y = -6 + (Math.random() * -20);
this.rotation = (Math.random() - 0.5) * 20;
this._alpha = 100;
this.gotoAndStop(1 + Math.round(Math.random() * this._totalFrames));
}
onClipEvent (enterFrame) {
this._x = this._x + this.x;
this.y = this.y + 2;
this._y = this._y + this.y;
this._rotation = this._rotation + this.rotation;
if (this.ybegin < this._y) {
removeMovieClip(this);
}
}
Instance of Symbol 56 MovieClip "glowing" in Frame 2
onClipEvent (load) {
}
onClipEvent (enterFrame) {
this._x = this._x + this.speedx;
this._y = this._y + this.speedy;
this.time--;
this.speedy = this.speedy + 1.2;
if (170 < this._y) {
this._y = 170;
this.speedy = 0;
this.speedx = this.speedx + ((-this.speedx) / 3);
}
}
Instance of Symbol 60 MovieClip in Frame 2
onClipEvent (enterFrame) {
if ((_root.ingame == 0) and (0 < _root.combo)) {
this.combopoints = Math.round((_root.combo * (_root.combo * 0.5)) * 15);
_root.score = _root.score + this.combopoints;
this.time = 100;
_root.combo = 0;
}
this.time--;
if (0 < this.time) {
this._y = this._y + ((50 - this._y) / 10);
} else {
this._y = this._y + ((-100 - this._y) / 10);
}
}
Instance of Symbol 64 MovieClip in Frame 2
onClipEvent (load) {
this.score = 0;
}
onClipEvent (enterFrame) {
if (this.score < _root.score) {
this.score++;
}
}
Frame 3
stop();
Symbol 16 Button
on (release) {
_root.play();
}
Symbol 17 MovieClip Frame 1
_root.stop;
this.loading = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
this.loadingrounded = Math.round(this.loading);
if (this.loading != 100) {
} else {
this.gotoAndStop("loaded");
}
Symbol 17 MovieClip Frame 3
gotoAndPlay (1);
Instance of Symbol 31 MovieClip in Symbol 33 MovieClip Frame 1
onClipEvent (load) {
this.bla = this._x;
}
onClipEvent (enterFrame) {
if (0 >= _root.health) {
stopAllSounds();
_root.play();
}
_root.time++;
if (Math.random() < 0.01) {
duplicateMovieClip (_root.enemy, "enemy" + _root.counter, _root.counter);
_root.enemylist.push("enemy" + _root.counter);
eval ("_root.enemy" + _root.counter)._x = 520;
eval ("_root.enemy" + _root.counter)._y = 160;
_root.counter++;
}
this._x = this._x + ((this.bla - this._x) / 3);
this.myRadians = Math.atan2((_root._ymouse - _parent._y) + this._y, (_root._xmouse - _parent._x) + this._x);
this.myDegrees = Math.round((this.myRadians * 180) / Math.PI);
this._rotation = this.myDegrees + 90;
_parent.cannon._rotation = this.myDegrees + 90;
this._x = this._x + (Math.sin(_rotation * (Math.PI/180)) * 0);
this._y = this._y + (Math.cos(_rotation * (Math.PI/180)) * 0);
if (this.shoot == 1) {
_root.force++;
if (20 < _root.force) {
_root.force = 20;
}
}
}
onClipEvent (mouseDown) {
this.shoot = 1;
}
onClipEvent (mouseUp) {
if ((this.shoot == 1) and (_root.ingame == 0)) {
this._x = this._x - (Math.sin(_rotation * (Math.PI/180)) * _root.force);
_root.cannonsound.start();
_root.bomb._x = (this._x + _parent._x) + (Math.sin(this._rotation * (Math.PI/180)) * 30);
_root.bomb._y = (this._y + _parent._y) + (Math.cos(this._rotation * (Math.PI/180)) * -30);
_root.bomb._alpha = 100;
_root.bomb.speedx = Math.sin(_rotation * (Math.PI/180)) * _root.force;
_root.bomb.speedy = Math.cos(_rotation * (Math.PI/180)) * (-_root.force);
_root.bomb.launched = 1;
_root.ingame++;
_root.combo = 0;
duplicateMovieClip (_root.gunpowder, "gunpowder" + _root.counter, _root.counter);
eval ("_root.gunpowder" + _root.counter)._x = (_parent._x + this._x) + (Math.sin(this._rotation * (Math.PI/180)) * 38);
eval ("_root.gunpowder" + _root.counter)._y = (_parent._y + this._y) + (Math.cos(this._rotation * (Math.PI/180)) * -38);
eval ("_root.gunpowder" + _root.counter).speedx = Math.sin(_rotation * (Math.PI/180)) * (_root.force / 20);
eval ("_root.gunpowder" + _root.counter).speedy = Math.cos(_rotation * (Math.PI/180)) * (-(_root.force / 20));
_root.counter++;
}
this.shoot = 0;
_root.force = 0;
}
Symbol 38 MovieClip Frame 1
stop();
Symbol 38 MovieClip Frame 5
this.launched = 0;
_root.ingame--;
this._xscale = 100;
this._yscale = 100;
this._x = -100;
this._y = -100;
Symbol 56 MovieClip Frame 30
if (this._name != "glowing") {
i = 0;
while (i < _root.enemylist.length) {
if (eval ("_root." + _root.enemylist[i]).hitTest(this)) {
eval ("_root." + _root.enemylist[i]).health = eval ("_root." + _root.enemylist[i]).health - 200;
if (0 >= eval ("_root." + _root.enemylist[i]).health) {
_root.ingame++;
duplicateMovieClip (_root.glowing, "glowing" + _root.counter, _root.counter);
eval ("_root.glowing" + _root.counter)._x = this._x;
eval ("_root.glowing" + _root.counter)._y = this._y - 10;
eval ("_root.glowing" + _root.counter).speedx = (Math.random() - 0.5) * 6;
eval ("_root.glowing" + _root.counter).speedy = -2 + (Math.random() * -6);
_root.counter++;
_root.combo++;
removeMovieClip("_root." + _root.enemylist[i]);
_root.enemylist.splice(i, 1);
i = 0;
while (i < 4) {
duplicateMovieClip (_root.debris, "debris" + _root.counter, _root.counter);
eval ("_root.debris" + _root.counter)._x = this._x;
eval ("_root.debris" + _root.counter)._y = this._y;
_root.counter++;
i++;
}
}
}
i++;
}
_root.ingame--;
removeMovieClip(this);
}
Symbol 71 Button
on (release) {
this.play();
}
Symbol 75 MovieClip Frame 1
stopAllSounds();
Symbol 75 MovieClip Frame 2
stop();
Symbol 75 MovieClip Frame 3
stopAllSounds();
Symbol 75 MovieClip Frame 4
stop();
Symbol 75 MovieClip Frame 5
stopAllSounds();
Symbol 75 MovieClip Frame 6
stop();
Symbol 79 Button
on (release) {
stopAllSounds();
_root.play();
}