Frame 1
function engine() {
if (_root.getBytesLoaded() >= _root.getBytesTotal()) {
gotoAndPlay (2);
}
procent = Math.round((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
}
stop();
fscommand ("showmenu", "false");
stage.showMenu = false;
Instance of Symbol 128 MovieClip in Frame 1
onClipEvent (enterFrame) {
_root.engine();
}
Frame 5
kwaliteit = 3;
gotoAndPlay (257);
Frame 257
Mouse.show();
menuMuziek.gotoAndPlay(2);
stop();
Frame 258
stop();
Frame 259
stop();
Frame 260
stop();
Frame 261
stop();
Frame 262
stop();
Frame 263
stop();
Frame 265
stop();
Frame 266
stop();
Frame 267
stop();
Frame 268
stop();
Frame 269
stop();
Frame 270
function initGame() {
stopAllSounds();
losingStreak.gotoAndPlay(2);
if (tanknumber == 1) {
sst.gotoAndPlay(2);
} else if (tanknumber == 2) {
st143.gotoAndPlay(2);
}
nextShotTime = reloadTime;
bulletCount = 0;
bullets = [];
heliTimer = getTimer();
heliCount = 0;
heliArray = [];
spawnTijd = 5000;
heliKogelCount = 0;
heliKogels = [];
heliShoot = false;
heliShotTimer = getTimer() + 2500;
_root.armorBalk._xscale = _root.armorTanx;
skyTimer = getTimer() + 45000;
skyTrick = 2;
_root.upgradeBalk._xscale = 0;
upgradeMax = false;
upgradeTwee = false;
upgradeDrie = false;
afteller = 300;
timerCheck = 1000;
Mouse.hide();
_root.attachMovie("crosshair", "cursor", 102);
_root.cursor.gotoAndStop(tanknumber);
_root.cursor.swapDepths(99999);
}
function fire() {
if (getTimer() > nextShotTime) {
if (upgradeCount <= 2) {
str.gotoAndPlay(2);
} else if (upgradeCount == 3) {
stl.gotoAndPlay(2);
} else if ((upgradeCount == 4) or (upgradeCount == 5)) {
t143.gotoAndPlay(2);
} else if (upgradeCount == 6) {
str.gotoAndPlay(2);
}
bulletCount++;
_root.attachMovie("bullet", "bullet" + bulletCount, bulletCount + 99999);
bullet = _root["bullet" + bulletCount];
bullet._rotation = bulletAngleDegrees;
bullet._x = tanx._x + (Math.cos(bulletAngle) * 20);
bullet._y = tanx._y + (Math.sin(bulletAngle) * 20);
nextShotTime = getTimer() + reloadTime;
tanx.gun.gotoAndPlay(2);
bullet.gotoAndStop(upgradeCount);
bullets.push({clip:bullet, richting:bulletAngle});
}
}
function engine() {
x = _root._xmouse;
y = _root._ymouse;
_root.cursor._x = x;
_root.cursor._y = y;
if (afteller <= 0) {
gotoAndPlay ("removeAll");
}
if (_root.armorBalk._xscale <= 0) {
gotoAndStop ("rgr");
}
amsterdamTimer = getTimer();
if (amsterdamTimer >= timerCheck) {
timerCheck = timerCheck + 1000;
afteller = afteller - 1;
_root.amsterdam.kilometers = Math.round(afteller);
}
if ((_root.upgradeBalk._xscale >= 100) and (upgradeMax == false)) {
_root.upgradeBalk._xscale = 0;
_root.upgradeCount = _root.upgradeCount + 1;
_root.upgradeLevel.nextFrame();
_root.upgradeOmheining.gotoAndPlay(2);
}
if ((_root.upgradeLevel._currentframe == 2) and (upgradeTwee == false)) {
upgradeTwee = true;
if (tanknumber == 1) {
_root.reloadTime = _root.reloadTime - 125;
}
if (tanknumber == 2) {
_root.kogelSnelheid = _root.kogelSnelheid + 5;
_root.armorBalk._xscale = _root.armorBalk._xscale + 10;
}
}
if ((_root.upgradeLevel._currentframe == 3) and (upgradeDrie == false)) {
upgradeDrie = true;
if (tanknumber == 1) {
_root.reloadTime = _root.reloadTime - 200;
_root.armorBalk._xscale = _root.armorBalk._xscale + 15;
_root.agility = _root.agility + 1.5;
}
if (tanknumber == 2) {
_root.kogelSnelheid = _root.kogelSnelheid + 5;
_root.armorBalk._xscale = _root.armorBalk._xscale + 10;
}
}
if (_root.upgradeLevel._currentframe == 3) {
upgradeMax = true;
_root.upgradeBalk._xscale = 100;
_root.upgradeBalk.gotoAndStop(2);
}
timer = getTimer();
if (timer > skyTimer) {
_root.sky.gotoAndPlay(skyTrick);
skyTimer = timer + 45000;
skyTrick = skyTrick + 20;
}
if (skyTrick >= 99) {
skyTrick = 2;
}
if ((getTimer() > heliTimer) and (heliArray.length <= 6)) {
if (spawnTijd >= 1200) {
spawnTijd = spawnTijd - 50;
}
heliCount++;
attachMovie("alienHeli", "helikopter" + heliCount, heliCount + 88888);
heli = _root["helikopter" + heliCount];
heli._x = random(500) + 50;
heli._y = random(150) + 50;
heli._xscale = 5;
heli._yscale = 5;
heliArray.push({heliClip:heli});
heliTimer = getTimer() + spawnTijd;
}
h = heliArray.length - 1;
while (h >= 0) {
heli = heliArray[h].heliClip;
if ((heli._xscale < 80) and (heli._yscale < 80)) {
heli._xscale = heli._xscale + 0.8;
heli._yscale = heli._yscale + 0.8;
}
h--;
}
h = heliArray.length - 1;
while (h >= 0) {
while (h >= 0) {
heli = heliArray[h].heliClip;
if ((heli._xscale <= 60) and (heli._yscale <= 60)) {
h--;
} else {
heliShoot = true;
break;
}
}
if ((getTimer() > heliShotTimer) and (heliShoot == true)) {
laser.gotoAndPlay(2);
if (heliArray.length == 0) {
omfg = 0;
} else if (heliArray.length == 1) {
omfg = 1;
} else if (heliArray.length == 2) {
omfg = random(2) + 1;
} else if (heliArray.length > 2) {
omfg = heliArray.length - random(heliArray.length);
}
omg = heliArray.length - omfg;
xXx = heliArray[omg].heliClip._x;
yYy = heliArray[omg].heliClip._y;
heliKogelCount++;
hdx = tanx._x - xXx;
hdy = tanx._y - yYy;
heliAngle = Math.atan2(hdy, hdx);
attachMovie("heliPlasma", "heliPlasmaKogel" + heliKogelCount, heliKogelCount + 29402);
heliKogel = _root["heliPlasmaKogel" + heliKogelCount];
heliKogel._x = xXx + (Math.cos(heliAngle) * 20);
heliKogel._y = yYy + (Math.sin(heliAngle) * 20);
heliShotTimer = ((getTimer() + random(500)) + 500) - (heliArray.length * 50);
heliKogels.push({hkclip:heliKogel, helidir:heliAngle});
heliShoot = false;
}
h--;
}
hk = heliKogels.length;
while (hk >= 0) {
heliKogel = heliKogels[hk].hkclip;
heliKogel._x = heliKogel._x + (Math.cos(heliKogels[hk].helidir) * 10);
heliKogel._y = heliKogel._y + (Math.sin(heliKogels[hk].helidir) * 10);
if (heliKogel.hitTest(tanx)) {
_root.tanx.gotoAndPlay("hit");
_root.armorBalk._xscale = _root.armorBalk._xscale - 5;
_root.omheining.gotoAndPlay(2);
heliKogel.removeMovieClip();
heliKogels.splice(hk, 1);
if ((_root.upgradeBalk._xscale > 2) and (upgradeMax == false)) {
_root.upgradeBalk._xscale = _root.upgradeBalk._xscale - 5;
}
}
if (heliKogel._y > 440) {
heliKogel.removeMovieClip();
heliKogels.splice(hk, 1);
}
hk--;
}
dx = _xmouse - tanx._x;
dy = _ymouse - tanx._y;
bulletAngle = Math.atan2(dy, dx);
bulletAngleDegrees = ((360 * bulletAngle) / (Math.PI*2)) + 90;
tanx.gun._rotation = bulletAngleDegrees;
i = bullets.length;
while (i >= 0) {
bullet = bullets[i].clip;
bullet._x = bullet._x + (Math.cos(bullets[i].richting) * kogelSnelheid);
bullet._y = bullet._y + (Math.sin(bullets[i].richting) * kogelSnelheid);
if ((((bullet._x > 650) or (bullet._x < -50)) or (bullet._y > 550)) or (bullet._y < -50)) {
bullet.removeMovieClip();
bullets.splice(i, 1);
if ((_root.upgradeBalk._xscale > 2) and (upgradeMax == false)) {
_root.upgradeBalk._xscale = _root.upgradeBalk._xscale - 3;
}
}
if (bullet.hitTest(_root.oldHeli) and (_root.oldHeli.destroyed == false)) {
_root.oldHeli.gotoAndPlay("hit");
bullet.removeMovieClip();
bullets.splice(i, 1);
if (_root.upgradeBalk._xscale < 100) {
_root.upgradeBalk._xscale = _root.upgradeBalk._xscale + upgradeSpeed;
}
}
ha = heliArray.length;
while (ha >= 0) {
aantalHeli = heliArray[ha].heliClip;
if (bullet.hitTest(_root.aantalHeli) and ((!_root.aantalHeli) <= 0)) {
aantalHeli.gotoAndPlay("hit");
bullet.removeMovieClip();
bullets.splice(i, 1);
if (_root.upgradeBalk._xscale < 100) {
_root.upgradeBalk._xscale = _root.upgradeBalk._xscale + upgradeSpeed;
}
}
ha--;
}
i--;
}
if (Key.isDown(87) or Key.isDown(83)) {
fire();
}
if ((Key.isDown(65) and (tanx._x > 150)) and (goRight == false)) {
movement = agility;
tanx._x = tanx._x - movement;
goLeft = true;
} else {
movement = 0;
if ((Key.isDown(68) and (tanx._x < 450)) and (goLeft == false)) {
movement = agility;
tanx._x = tanx._x + movement;
goRight = true;
} else {
goLeft = false;
goRight = false;
movement = 0;
}
}
if (((movement != 0) && (tanx._currentFrame == 1)) && (Key.isDown(65))) {
tanx.gotoAndPlay("left");
} else if (((movement != 0) && (tanx._currentFrame == 1)) && (Key.isDown(68))) {
tanx.gotoAndPlay("right");
}
if ((movement == 0) and (!heliKogel.hitTest(tanx))) {
tanx.gotoAndStop("halt");
}
}
stop();
Instance of Symbol 306 MovieClip in Frame 270
onClipEvent (load) {
_root.initGame();
}
onClipEvent (enterFrame) {
_root.engine();
}
onClipEvent (mouseDown) {
_root.fire();
}
Instance of Symbol 336 MovieClip in Frame 270
onClipEvent (load) {
this._xscale = 5;
this._yscale = 5;
this._x = random(500) + 50;
this._y = random(10) + 310;
}
onClipEvent (enterFrame) {
function resetthisshit() {
this._xscale = 5;
this._yscale = 5;
this._x = random(500) + 50;
this._y = random(4) + 306;
}
if (this._x < 300) {
if (this._y <= 385) {
this._x = this._x + -3;
this._y = this._y + 1;
this._yscale = this._yscale + 0.3;
this._xscale = this._xscale + 0.3;
} else {
this._x = this._x + -3.75;
this._y = this._y + 1.25;
}
}
if (this._x >= 300) {
if (this._y <= 385) {
this._x = this._x + 3;
this._y = this._y + 1;
this._yscale = this._yscale + 0.3;
this._xscale = this._xscale + 0.3;
} else {
this._x = this._x + 3.75;
this._y = this._y + 1.25;
}
}
if ((this._x < (random(100) - 300)) || (this._x > (random(100) + 900))) {
resetthisshit();
}
}
Instance of Symbol 338 MovieClip in Frame 270
onClipEvent (load) {
this._xscale = 5;
this._yscale = 5;
this._x = random(500) + 50;
this._y = random(10) + 310;
}
onClipEvent (enterFrame) {
function resetthisshit() {
this._xscale = 5;
this._yscale = 5;
this._x = random(500) + 50;
this._y = random(4) + 306;
}
if (this._x < 300) {
if (this._y <= 385) {
this._x = this._x + -3;
this._y = this._y + 1;
this._yscale = this._yscale + 0.3;
this._xscale = this._xscale + 0.3;
} else {
this._x = this._x + -3.75;
this._y = this._y + 1.25;
}
}
if (this._x >= 300) {
if (this._y <= 385) {
this._x = this._x + 3;
this._y = this._y + 1;
this._yscale = this._yscale + 0.3;
this._xscale = this._xscale + 0.3;
} else {
this._x = this._x + 3.75;
this._y = this._y + 1.25;
}
}
if ((this._x < (random(100) - 300)) || (this._x > (random(100) + 900))) {
resetthisshit();
}
}
Instance of Symbol 340 MovieClip "steen2" in Frame 270
onClipEvent (load) {
this._xscale = 5;
this._yscale = 5;
this._x = random(500) + 50;
this._y = random(10) + 310;
}
onClipEvent (enterFrame) {
function resetthisshit() {
this._xscale = 5;
this._yscale = 5;
this._x = random(500) + 50;
this._y = random(4) + 306;
}
if (this._x < 300) {
if (this._y <= 385) {
this._x = this._x + -3;
this._y = this._y + 1;
this._yscale = this._yscale + 0.3;
this._xscale = this._xscale + 0.3;
} else {
this._x = this._x + -3.75;
this._y = this._y + 1.25;
}
}
if (this._x >= 300) {
if (this._y <= 385) {
this._x = this._x + 3;
this._y = this._y + 1;
this._yscale = this._yscale + 0.3;
this._xscale = this._xscale + 0.3;
} else {
this._x = this._x + 3.75;
this._y = this._y + 1.25;
}
}
if ((this._x < (random(100) - 300)) || (this._x > (random(100) + 900))) {
resetthisshit();
}
}
Instance of Symbol 336 MovieClip in Frame 270
onClipEvent (load) {
this._xscale = 5;
this._yscale = 5;
this._x = random(500) + 50;
this._y = random(10) + 310;
}
onClipEvent (enterFrame) {
function resetthisshit() {
this._xscale = 5;
this._yscale = 5;
this._x = random(500) + 50;
this._y = random(4) + 306;
}
if (this._x < 300) {
if (this._y <= 385) {
this._x = this._x + -3;
this._y = this._y + 1;
this._yscale = this._yscale + 0.3;
this._xscale = this._xscale + 0.3;
} else {
this._x = this._x + -3.75;
this._y = this._y + 1.25;
}
}
if (this._x >= 300) {
if (this._y <= 385) {
this._x = this._x + 3;
this._y = this._y + 1;
this._yscale = this._yscale + 0.3;
this._xscale = this._xscale + 0.3;
} else {
this._x = this._x + 3.75;
this._y = this._y + 1.25;
}
}
if ((this._x < (random(100) - 300)) || (this._x > (random(100) + 900))) {
resetthisshit();
}
}
Instance of Symbol 338 MovieClip in Frame 270
onClipEvent (load) {
this._xscale = 5;
this._yscale = 5;
this._x = random(500) + 50;
this._y = random(10) + 310;
}
onClipEvent (enterFrame) {
function resetthisshit() {
this._xscale = 5;
this._yscale = 5;
this._x = random(500) + 50;
this._y = random(4) + 306;
}
if (this._x < 300) {
if (this._y <= 385) {
this._x = this._x + -3;
this._y = this._y + 1;
this._yscale = this._yscale + 0.3;
this._xscale = this._xscale + 0.3;
} else {
this._x = this._x + -3.75;
this._y = this._y + 1.25;
}
}
if (this._x >= 300) {
if (this._y <= 385) {
this._x = this._x + 3;
this._y = this._y + 1;
this._yscale = this._yscale + 0.3;
this._xscale = this._xscale + 0.3;
} else {
this._x = this._x + 3.75;
this._y = this._y + 1.25;
}
}
if ((this._x < (random(100) - 300)) || (this._x > (random(100) + 900))) {
resetthisshit();
}
}
Instance of Symbol 340 MovieClip "steen2" in Frame 270
onClipEvent (load) {
this._xscale = 5;
this._yscale = 5;
this._x = random(500) + 50;
this._y = random(10) + 310;
}
onClipEvent (enterFrame) {
function resetthisshit() {
this._xscale = 5;
this._yscale = 5;
this._x = random(500) + 50;
this._y = random(4) + 306;
}
if (this._x < 300) {
if (this._y <= 385) {
this._x = this._x + -3;
this._y = this._y + 1;
this._yscale = this._yscale + 0.3;
this._xscale = this._xscale + 0.3;
} else {
this._x = this._x + -3.75;
this._y = this._y + 1.25;
}
}
if (this._x >= 300) {
if (this._y <= 385) {
this._x = this._x + 3;
this._y = this._y + 1;
this._yscale = this._yscale + 0.3;
this._xscale = this._xscale + 0.3;
} else {
this._x = this._x + 3.75;
this._y = this._y + 1.25;
}
}
if ((this._x < (random(100) - 300)) || (this._x > (random(100) + 900))) {
resetthisshit();
}
}
Instance of Symbol 123 MovieClip [heli2] "oldHeli" in Frame 270
onClipEvent (load) {
maxScale = 70;
scaling = 0.5;
HeliHP = 100;
goFly = getTimer() + 50000;
flight = false;
schieten = false;
destroyed = false;
}
onClipEvent (enterFrame) {
if ((flight == false) and (getTimer() > goFly)) {
this._xscale = 1;
this._yscale = 1;
this._x = random(500) + 50;
this._y = random(150) + 50;
heliHP = 100;
flight = true;
destroyed = false;
goFly = (getTimer() + random(20000)) + 20000;
}
if (flight == true) {
if ((this._xscale < maxScale) and (this._xscale < maxScale)) {
this._xscale = this._xscale + scaling;
this._yscale = this._yscale + scaling;
}
}
if (flight == true) {
if (_root.tanx._x > this._x) {
verschilX = _root.tanx._x - this._x;
} else if (this._x > _root.tanx._x) {
verschilX = this._x - _root.tanx._x;
}
if ((_root.tanx._x > this._x) and (verschilX > 3)) {
this._x = this._x + 1;
} else if ((this._x > _root.tanx._x) and (verschilX > 3)) {
this._x = this._x - 1;
}
}
if (verschilX >= 4) {
schieten = false;
}
if ((flight == true) and (schieten == false)) {
if (verschilX < 4) {
attack = _root.attachMovie("attack", "heli2attack", 55);
_root.laser.gotoAndPlay(2);
}
}
attack._x = this._x;
attack._y = this._y;
if (_root.tanx.hitTest(attack)) {
_root.armorBalk._xscale = _root.armorBalk._xscale - 15;
_root.omheining.gotoAndPlay(2);
schieten = false;
attack.unloadMovie();
}
}
Instance of Symbol 348 MovieClip "amsterdam" in Frame 270
onClipEvent (load) {
sign = false;
leftAlign = 466;
rightAlign = 610;
}
onClipEvent (enterFrame) {
if ((_root.afteller > 285) and (_root.afteller < 299)) {
if (this._x > leftAlign) {
this._x = this._x - 1;
sign = true;
}
} else if ((_root.afteller > 185) and (_root.afteller < 200)) {
if (this._x > leftAlign) {
this._x = this._x - 1;
sign = true;
}
} else if ((_root.afteller > 135) and (_root.afteller < 150)) {
if (this._x > leftAlign) {
this._x = this._x - 1;
sign = true;
}
} else if ((_root.afteller > 85) and (_root.afteller < 100)) {
if (this._x > leftAlign) {
this._x = this._x - 1;
sign = true;
}
} else if ((_root.afteller > 0) and (_root.afteller < 22)) {
if (this._x > leftAlign) {
this._x = this._x - 1;
sign = true;
}
} else {
sign = false;
}
if (sign == false) {
if (this._x < rightAlign) {
this._x = this._x + 1;
}
}
}
Instance of Symbol 350 MovieClip in Frame 270
onClipEvent (load) {
vliegwaarde = random(1) + 0.5;
this._x = random(400) + 600;
this._y = random(200) + 50;
}
onClipEvent (enterFrame) {
function reset() {
vliegwaarde = random(1) + 0.5;
this._x = random(400) + 600;
this._y = random(200) + 50;
}
this._x = this._x - vliegwaarde;
if (this._x < -150) {
reset();
}
}
Instance of Symbol 352 MovieClip in Frame 270
onClipEvent (load) {
vliegwaarde = random(1) + 0.5;
this._x = random(400) + 600;
this._y = random(200) + 50;
}
onClipEvent (enterFrame) {
function reset() {
vliegwaarde = random(1) + 0.5;
this._x = random(400) + 600;
this._y = random(200) + 50;
}
this._x = this._x - vliegwaarde;
if (this._x < -150) {
reset();
}
}
Instance of Symbol 354 MovieClip in Frame 270
onClipEvent (load) {
vliegwaarde = random(1) + 0.5;
this._x = random(400) + 600;
this._y = random(200) + 50;
}
onClipEvent (enterFrame) {
function reset() {
vliegwaarde = random(1) + 0.5;
this._x = random(400) + 600;
this._y = random(200) + 50;
}
this._x = this._x - vliegwaarde;
if (this._x < -150) {
reset();
}
}
Frame 271
function initRemove3() {
doorstroom = getTimer() + 5000;
cursor.swapDepths(99999);
}
function removeAll3() {
h = 0;
while (h <= bulletCount) {
_root["bullet" + h].removeMovieClip();
h++;
}
j = 0;
while (j <= heliCount) {
_root["helikopter" + j].removeMovieClip();
j++;
}
r = 0;
while (r <= heliKogelCount) {
_root["heliPlasmaKogel" + r].removeMovieClip();
r++;
}
if (getTimer() > doorstroom) {
_root.gotoAndPlay("boss");
}
x = _root._xmouse;
y = _root._ymouse;
_root.cursor._x = x;
_root.cursor._y = y;
}
stop();
Instance of Symbol 306 MovieClip in Frame 271
onClipEvent (load) {
_root.initRemove3();
}
onClipEvent (enterFrame) {
_root.removeAll3();
}
Frame 272
function initGame2() {
nextShotTime = reloadTime;
bulletCount = 0;
bullets = [];
_root.bossBalk._xscale = 100;
cursor.swapDepths(99999);
}
function fire2() {
if (getTimer() > nextShotTime) {
if (upgradeCount <= 2) {
str.gotoAndPlay(2);
} else if (upgradeCount == 3) {
stl.gotoAndPlay(2);
} else if ((upgradeCount == 4) or (upgradeCount == 5)) {
t143.gotoAndPlay(2);
} else if (upgradeCount == 6) {
str.gotoAndPlay(2);
}
bulletCount++;
_root.attachMovie("bullet", "bullet" + bulletCount, bulletCount + 99999);
bullet = _root["bullet" + bulletCount];
bullet._rotation = bulletAngleDegrees;
bullet._x = tanx._x + (Math.cos(bulletAngle) * 20);
bullet._y = tanx._y + (Math.sin(bulletAngle) * 20);
nextShotTime = getTimer() + reloadTime;
tanx.gun.gotoAndPlay(2);
bullet.gotoAndStop(upgradeCount);
bullets.push({clip:bullet, richting:bulletAngle});
}
}
function engine2() {
x = _root._xmouse;
y = _root._ymouse;
_root.cursor._x = x;
_root.cursor._y = y;
if (_root.bossBalk._xscale <= 0) {
_root.gotoAndStop("youwin");
} else if (_root.armorBalk._xscale <= 0) {
gotoAndStop ("rgr");
}
if (_root.bolt1.hitTest(_root.tanx)) {
_root.armorBalk._xscale = _root.armorBalk._xscale - 0.5;
}
if (_root.bolt2.hitTest(_root.tanx)) {
_root.armorBalk._xscale = _root.armorBalk._xscale - 0.5;
}
if (_root.bolt3.hitTest(_root.tanx)) {
_root.armorBalk._xscale = _root.armorBalk._xscale - 0.5;
}
if (_root.bolt4.hitTest(_root.tanx)) {
_root.armorBalk._xscale = _root.armorBalk._xscale - 0.5;
}
timer = getTimer();
if (timer > skyTimer) {
_root.sky.gotoAndPlay(skyTrick);
skyTimer = timer + 45000;
skyTrick = skyTrick + 20;
}
if (skyTrick >= 99) {
skyTrick = 2;
}
dx = _xmouse - tanx._x;
dy = _ymouse - tanx._y;
bulletAngle = Math.atan2(dy, dx);
bulletAngleDegrees = ((360 * bulletAngle) / (Math.PI*2)) + 90;
tanx.gun._rotation = bulletAngleDegrees;
i = bullets.length;
while (i >= 0) {
bullet = bullets[i].clip;
bullet._x = bullet._x + (Math.cos(bullets[i].richting) * kogelSnelheid);
bullet._y = bullet._y + (Math.sin(bullets[i].richting) * kogelSnelheid);
if ((((bullet._x > 650) or (bullet._x < -50)) or (bullet._y > 550)) or (bullet._y < -50)) {
bullet.removeMovieClip();
bullets.splice(i, 1);
}
if (bullet.hitTest(_root.boss)) {
_root.bossBalk._xscale = _root.bossBalk._xscale - (0.1 * _root.tankDamagePerKogel);
bullet.removeMovieClip();
bullets.splice(i, 1);
}
i--;
}
if (Key.isDown(87) or Key.isDown(83)) {
fire();
}
if ((Key.isDown(65) and (tanx._x > 150)) and (goRight == false)) {
movement = agility;
tanx._x = tanx._x - movement;
goLeft = true;
} else {
movement = 0;
if ((Key.isDown(68) and (tanx._x < 450)) and (goLeft == false)) {
movement = agility;
tanx._x = tanx._x + movement;
goRight = true;
} else {
goLeft = false;
goRight = false;
movement = 0;
}
}
if (((movement != 0) && (tanx._currentFrame == 1)) && (Key.isDown(65))) {
tanx.gotoAndPlay("left");
} else if (((movement != 0) && (tanx._currentFrame == 1)) && (Key.isDown(68))) {
tanx.gotoAndPlay("right");
}
if ((movement == 0) and (!heliKogel.hitTest(tanx))) {
tanx.gotoAndStop("halt");
}
}
stop();
Instance of Symbol 306 MovieClip in Frame 272
onClipEvent (load) {
_root.initGame2();
}
onClipEvent (enterFrame) {
_root.engine2();
}
onClipEvent (mouseDown) {
_root.fire2();
}
Instance of Symbol 407 MovieClip "boss" in Frame 272
onClipEvent (enterFrame) {
if ((((this._x > 100) and (this._x < 500)) and (this._y > 40)) and (this._y < 300)) {
this._x = this._x + (random(5) - 2);
this._y = this._y + (random(3) - 1);
} else if (this._x <= 100) {
this._x = this._x + random(4);
} else if (this._x >= 500) {
this._x = this._x - random(4);
} else if (this._y <= 40) {
this._y = this._y + random(2);
} else if (this._y >= 300) {
this._y = this._y - random(2);
}
}
Instance of Symbol 411 MovieClip "bolt1" in Frame 272
onClipEvent (load) {
this._y = -50;
this._x = -50;
shoot = false;
}
onClipEvent (enterFrame) {
if (shoot == false) {
shoot = true;
this._y = _root.boss._y + 30;
this._x = _root.boss._x;
willekeurigY = random(5) + 5;
willekeurigX = random(8) - 4;
}
if (shoot == true) {
this._y = this._y + willekeurigY;
this._x = this._x + willekeurigX;
}
if (this._y >= 470) {
shoot = false;
}
}
Instance of Symbol 411 MovieClip "bolt2" in Frame 272
onClipEvent (load) {
this._y = -50;
this._x = -50;
shoot = false;
}
onClipEvent (enterFrame) {
if (shoot == false) {
shoot = true;
this._y = _root.boss._y + 30;
this._x = _root.boss._x;
willekeurigY = random(5) + 5;
willekeurigX = random(8) - 4;
}
if (shoot == true) {
this._y = this._y + willekeurigY;
this._x = this._x + willekeurigX;
}
if (this._y >= 470) {
shoot = false;
}
}
Instance of Symbol 411 MovieClip "bolt3" in Frame 272
onClipEvent (load) {
this._y = -50;
this._x = -50;
shoot = false;
}
onClipEvent (enterFrame) {
if (shoot == false) {
shoot = true;
this._y = _root.boss._y + 30;
this._x = _root.boss._x;
willekeurigY = random(5) + 5;
willekeurigX = random(8) - 4;
}
if (shoot == true) {
this._y = this._y + willekeurigY;
this._x = this._x + willekeurigX;
}
if (this._y >= 470) {
shoot = false;
}
}
Instance of Symbol 411 MovieClip "bolt4" in Frame 272
onClipEvent (load) {
this._y = -50;
this._x = -50;
shoot = false;
}
onClipEvent (enterFrame) {
if (shoot == false) {
shoot = true;
this._y = _root.boss._y + 30;
this._x = _root.boss._x;
willekeurigY = random(5) + 5;
willekeurigX = random(8) - 4;
}
if (shoot == true) {
this._y = this._y + willekeurigY;
this._x = this._x + willekeurigX;
}
if (this._y >= 470) {
shoot = false;
}
}
Frame 273
function initRemove1() {
Mouse.show();
_root.cursor.removeMovieClip();
youdead.gotoAndPlay(2);
}
function removeAll1() {
h = 0;
while (h <= bulletCount) {
_root["bullet" + h].removeMovieClip();
h++;
}
j = 0;
while (j <= heliCount) {
_root["helikopter" + j].removeMovieClip();
j++;
}
r = 0;
while (r <= heliKogelCount) {
_root["heliPlasmaKogel" + r].removeMovieClip();
r++;
}
}
stop();
Instance of Symbol 306 MovieClip in Frame 273
onClipEvent (load) {
_root.initRemove1();
}
onClipEvent (enterFrame) {
_root.removeAll1();
}
Instance of Symbol 425 MovieClip in Frame 273
onClipEvent (load) {
this._x = _root.tanx._x;
this._y = _root.tanx._y + 10;
_root.tanx.removeMovieClip();
}
Frame 274
function initRemove2() {
Mouse.show();
_root.cursor.removeMovieClip();
bossdead.gotoAndPlay(2);
}
function removeAll2() {
h = 0;
while (h <= bulletCount) {
_root["bullet" + h].removeMovieClip();
h++;
}
}
stop();
Instance of Symbol 306 MovieClip in Frame 274
onClipEvent (load) {
_root.initRemove2();
_root.tanx.removeMovieClip();
}
onClipEvent (enterFrame) {
_root.removeAll2();
}
Symbol 12 MovieClip Frame 1
stop();
Symbol 12 MovieClip Frame 5
gotoAndStop (1);
Symbol 20 MovieClip [T143] Frame 1
stop();
Symbol 20 MovieClip [T143] Frame 2
stop();
Symbol 20 MovieClip [T143] Frame 3
stop();
Symbol 20 MovieClip [T143] Frame 7
gotoAndStop (1);
Symbol 26 MovieClip Frame 1
stop();
Symbol 26 MovieClip Frame 4
gotoAndStop (1);
Symbol 36 MovieClip [speedtank2] Frame 1
stop();
Symbol 36 MovieClip [speedtank2] Frame 2
stop();
Symbol 36 MovieClip [speedtank2] Frame 3
stop();
Symbol 36 MovieClip [speedtank2] Frame 7
gotoAndStop (1);
Symbol 77 MovieClip [bullet] Frame 1
stop();
Symbol 77 MovieClip [bullet] Frame 2
stop();
Symbol 77 MovieClip [bullet] Frame 3
stop();
Symbol 77 MovieClip [bullet] Frame 4
stop();
Symbol 77 MovieClip [bullet] Frame 5
stop();
Symbol 77 MovieClip [bullet] Frame 6
stop();
Symbol 94 MovieClip [alienHeli] Frame 1
heliHP = 30;
heliID = _root.heliCount;
_root.heliCount++;
Symbol 94 MovieClip [alienHeli] Frame 2
stop();
Symbol 94 MovieClip [alienHeli] Frame 3
heliHP = heliHP - _root.tankDamagePerKogel;
if (heliHP <= 0) {
gotoAndPlay ("destroyed");
}
Symbol 94 MovieClip [alienHeli] Frame 5
gotoAndPlay ("fly");
Symbol 94 MovieClip [alienHeli] Frame 6
_root.newAlien.gotoAndPlay(2);
Symbol 94 MovieClip [alienHeli] Frame 7
while (heliID >= 0) {
if (_root.heliArray[heliID].heliClip == this) {
_root.heliArray.splice(this.heliID, 1);
break;
}
heliID--;
}
Symbol 94 MovieClip [alienHeli] Frame 10
removeMovieClip(this);
Symbol 108 MovieClip [attack] Frame 1
_root.oldHeli.schieten = true;
Symbol 108 MovieClip [attack] Frame 29
_root.oldHeli.schieten = false;
Symbol 108 MovieClip [attack] Frame 30
unloadMovie (this);
Symbol 111 MovieClip [crosshair] Frame 1
stop();
Symbol 111 MovieClip [crosshair] Frame 2
stop();
Symbol 123 MovieClip [heli2] Frame 5
gotoAndPlay (1);
Symbol 123 MovieClip [heli2] Frame 16
if (_root.oldHeli.heliHP > 0) {
_root.oldHeli.heliHP = _root.oldHeli.heliHP - _root.tankDamagePerKogel;
}
if (_root.oldHeli.heliHP <= 0) {
gotoAndPlay ("destroyed");
_root.oldHeli.destroyed = true;
}
Symbol 123 MovieClip [heli2] Frame 18
gotoAndPlay (1);
Symbol 123 MovieClip [heli2] Frame 19
_root.oldAlien.gotoAndPlay(2);
Symbol 123 MovieClip [heli2] Frame 24
_root.oldHeli._x = -50;
_root.oldHeli._y = -50;
_root.oldHeli.flight = false;
Symbol 153 Button
on (release) {
gotoAndPlay (270);
}
Symbol 162 MovieClip Frame 75
stop();
Symbol 216 Button
on (release) {
_root.gotoAndStop("theStory");
}
Symbol 217 Button
on (release) {
gotoAndStop ("options");
}
Symbol 218 Button
on (release) {
gotoAndStop ("help");
}
Symbol 219 Button
on (release) {
gotoAndStop ("creditz");
}
Symbol 226 MovieClip Frame 1
stop();
Symbol 233 Button
on (release) {
gotoAndPlay ("select");
}
Symbol 241 Button
on (release) {
gotoAndStop ("speedtankInfo");
}
Symbol 242 Button
on (release) {
reloadTime = 500;
upgradeCount = 1;
_root.agility = 5;
_root.armorTanx = 60;
kogelSnelheid = 15;
tankDamagePerKogel = 12;
attachMovie("speedtank2", "tanx", 333);
_root.tanx._x = 206;
_root.tanx._y = 395;
tanknumber = 1;
gotoAndPlay (270);
upgradeSpeed = 2;
}
Symbol 245 Button
on (release) {
gotoAndStop ("t143info");
}
Symbol 246 Button
on (release) {
reloadTime = 900;
upgradeCount = 4;
_root.agility = 3;
_root.armorTanx = 80;
kogelSnelheid = 18;
tankDamagePerKogel = 32;
attachMovie("T143", "tanx", 333);
_root.tanx._x = 206;
_root.tanx._y = 395;
tanknumber = 2;
gotoAndPlay (270);
upgradeSpeed = 3.5;
}
Symbol 260 Button
on (release) {
gotoAndStop ("select");
}
Symbol 261 Button
on (release) {
gotoAndStop ("speedtankMore");
}
Symbol 266 Button
on (release) {
gotoAndStop ("t143More");
}
Symbol 274 Button
on (release) {
_root.kwaliteit++;
if (_root.kwaliteit == 5) {
_root.kwaliteit = 1;
}
if (_root.kwaliteit == 1) {
_quality = "LOW";
_root.helpText = "Low";
}
if (_root.kwaliteit == 2) {
_quality = "MEDIUM";
_root.helpText = "Medium";
}
if (_root.kwaliteit == 3) {
_quality = "HIGH";
_root.helpText = "High";
}
if (_root.kwaliteit == 4) {
_quality = "BEST";
_root.helpText = "Best";
}
}
Symbol 277 Button
on (release) {
gotoAndStop ("optionsStory");
}
Symbol 281 Button
on (release) {
getURL ("http://www.newgrounds.com/portal/view.php?id=189956", _blank);
}
Symbol 284 Button
on (release) {
gotoAndStop ("mainMenu");
}
Symbol 287 Button
on (release) {
gotoAndStop ("creditz");
}
Symbol 290 Button
on (release) {
gotoAndStop ("help");
}
Symbol 293 Button
on (release) {
gotoAndStop ("about");
}
Symbol 295 Button
on (release) {
gotoAndPlay ("options");
}
Symbol 303 Button
on (release) {
getURL ("http://members.home.nl/avenger", _blank);
}
Symbol 334 MovieClip Frame 1
stop();
Symbol 334 MovieClip Frame 20
stop();
Symbol 334 MovieClip Frame 40
stop();
Symbol 334 MovieClip Frame 60
stop();
Symbol 334 MovieClip Frame 80
stop();
Symbol 340 MovieClip Frame 1
stop();
Symbol 357 MovieClip Frame 1
stop();
Symbol 360 MovieClip Frame 1
stop();
Symbol 363 MovieClip Frame 1
stop();
Symbol 366 MovieClip Frame 1
stop();
Symbol 369 MovieClip Frame 1
stop();
Symbol 372 MovieClip Frame 1
stop();
Symbol 375 MovieClip Frame 1
stop();
Symbol 378 MovieClip Frame 1
stop();
Symbol 381 MovieClip Frame 1
stop();
Symbol 383 MovieClip Frame 1
stop();
Symbol 386 MovieClip Frame 1
stop();
Symbol 386 MovieClip Frame 5
gotoAndStop (1);
Symbol 396 MovieClip Frame 1
stop();
Symbol 396 MovieClip Frame 2
stop();
Symbol 396 MovieClip Frame 3
stop();
Symbol 398 MovieClip Frame 1
stop();
Symbol 398 MovieClip Frame 2
stop();
Symbol 401 Button
on (release) {
stopAllSounds();
gotoAndStop ("rgr");
}
Symbol 412 Button
on (release) {
stopAllSounds();
gotoAndStop ("mainMenu");
}
Symbol 418 MovieClip Frame 1
stop();
Symbol 425 MovieClip Frame 42
stop();
Symbol 430 MovieClip Frame 1
stop();