Frame 1
stop();
Instance of Symbol 40 MovieClip "spaceship" in Frame 1
onClipEvent (load) {
moveSpeed = 10;
_root.laser._visible = false;
laserCounter = 1;
}
onClipEvent (enterFrame) {
if (Key.isDown(17)) {
laserCounter++;
_root.laser.duplicateMovieClip("laser" + laserCounter, laserCounter);
_root["laser" + laserCounter]._visible = true;
}
if (Key.isDown(39)) {
this._x = this._x + moveSpeed;
} else if (Key.isDown(37)) {
this._x = this._x - moveSpeed;
}
if (Key.isDown(40)) {
this._y = this._y + moveSpeed;
} else if (Key.isDown(38)) {
this._y = this._y - moveSpeed;
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.topwall)) {
_y = (_y + 10);
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.bottomwall)) {
_y = (_y - 10);
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.leftwall)) {
_x = (_x + 10);
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.rightwall)) {
_x = (_x - 10);
}
}
Frame 2
life = 100;
stop();
numEnemy = 3;
i = 2;
while (i <= numEnemy) {
enemy1.duplicateMovieClip("enemy" + i, i + 100);
i++;
}
score = 0;
stop();
Instance of Symbol 103 MovieClip "mainStars" in Frame 2
onClipEvent (load) {
stars.duplicateMovieClip("stars2", 1000);
stars2._x = stars._x + stars._width;
starsStartx = this._x;
starsSpeed = 3;
}
onClipEvent (enterFrame) {
if (_root.spaceship.scrollStart) {
this._x = this._x - starsSpeed;
if (this._x <= (starsStartx - stars._width)) {
this._x = starsStartx - starsSpeed;
}
}
}
Instance of Symbol 126 MovieClip "mainGround" in Frame 2
onClipEvent (load) {
ground.duplicateMovieClip("ground2", 100);
ground2._x = ground._x + ground._width;
groundStartx = this._x;
groundSpeed = 10;
}
onClipEvent (enterFrame) {
if (_root.spaceship.scrollStart == true) {
this._x = this._x - groundSpeed;
if (this._x <= (groundStartx - ground._width)) {
this._x = groundStartx - groundSpeed;
}
}
}
Instance of Symbol 129 MovieClip "laser" in Frame 2
onClipEvent (load) {
laserMoveSpeed = 20;
this._x = _root.spaceship._x + 77;
this._y = _root.spaceship._y;
}
onClipEvent (enterFrame) {
if (this._name != "laser") {
this._x = this._x + laserMoveSpeed;
if (this._x > 600) {
_root.spaceship.laserCounter--;
this.removeMovieClip();
}
i = 1;
while (i <= _root.numEnemy) {
if (this.hitTest(_root["enemy" + i])) {
_root.score = _root.score + 100;
_root["enemy" + i].gotoAndPlay(2);
}
i++;
}
}
}
Instance of Symbol 133 MovieClip "enemy1" in Frame 2
onClipEvent (load) {
function reset() {
var _local1 = this;
_local1._x = 600;
_local1._y = random(200) + 100;
enemySpeed = random(4) + 1;
_local1.gotoAndStop(1);
}
reset();
}
onClipEvent (enterFrame) {
if (_root.spaceship.scrollStart) {
this._x = this._x - (enemySpeed + _root.mainGround.groundSpeed);
} else {
this._x = this._x - enemySpeed;
}
if (this._x < -10) {
reset();
}
}
Instance of Symbol 40 MovieClip "spaceship" in Frame 2
onClipEvent (load) {
moveSpeed = 10;
_root.laser._visible = false;
laserCounter = 1;
scrollx = _root.mainGround.ground._width / 3;
scrollStart = false;
maxLasers = 4;
depthCounter = 1;
}
onClipEvent (enterFrame) {
if (Key.isDown(17) and (laserCounter <= maxLasers)) {
laserCounter++;
_root.laser.duplicateMovieClip("laser" + depthCounter, depthCounter);
_root["laser" + depthCounter]._visible = true;
depthCounter++;
if (depthCounter > maxLasers) {
depthCounter = 1;
}
}
if (Key.isDown(39)) {
if (this._x < scrollx) {
this._x = this._x + moveSpeed;
} else {
scrollStart = true;
}
} else if (Key.isDown(37)) {
this._x = this._x - moveSpeed;
}
if (Key.isDown(40)) {
this._y = this._y + moveSpeed;
} else if (Key.isDown(38)) {
this._y = this._y - moveSpeed;
}
}
onClipEvent (keyUp) {
if (Key.getCode() == 39) {
scrollStart = false;
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.topwall)) {
_y = (_y + 10);
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.bottomwall)) {
_y = (_y - 10);
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.leftwall)) {
_x = (_x + 10);
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.rightwall)) {
_x = (_x - 10);
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.neptune)) {
_root.gotoAndStop("level2");
}
}
onClipEvent (enterFrame) {
i = 1;
while (i <= _root.numEnemy) {
if (this.hitTest(_root["enemy" + i])) {
_root.life = _root.life - 3;
if (_root.life <= 0) {
_root.gotoAndStop("gameOver");
}
_root.score = _root.score + 100;
_root["enemy" + i].gotoAndPlay(2);
_root.spin.gotoAndPlay(19);
}
i++;
}
}
Frame 3
stop();
Frame 4
removeMovieClip(_root["enemy" + i]);
stop();
Frame 5
stop();
stop();
Instance of Symbol 40 MovieClip "spaceship" in Frame 5
onClipEvent (load) {
moveSpeed = 10;
_root.laser._visible = false;
laserCounter = 1;
}
onClipEvent (enterFrame) {
if (Key.isDown(17)) {
laserCounter++;
_root.laser.duplicateMovieClip("laser" + laserCounter, laserCounter);
_root["laser" + laserCounter]._visible = true;
}
if (Key.isDown(39)) {
this._x = this._x + moveSpeed;
} else if (Key.isDown(37)) {
this._x = this._x - moveSpeed;
}
if (Key.isDown(40)) {
this._y = this._y + moveSpeed;
} else if (Key.isDown(38)) {
this._y = this._y - moveSpeed;
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.topwall)) {
_y = (_y + 10);
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.bottomwall)) {
_y = (_y - 10);
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.leftwall)) {
_x = (_x + 10);
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.rightwall)) {
_x = (_x - 10);
}
}
Frame 6
life = 100;
stop();
numEnemy = 5;
i = 2;
while (i <= numEnemy) {
enemy1.duplicateMovieClip("enemy" + i, i + 100);
i++;
}
score = 0;
Instance of Symbol 103 MovieClip "mainStars" in Frame 6
onClipEvent (load) {
stars.duplicateMovieClip("stars2", 1000);
stars2._x = stars._x + stars._width;
starsStartx = this._x;
starsSpeed = 3;
}
onClipEvent (enterFrame) {
if (_root.spaceship.scrollStart) {
this._x = this._x - starsSpeed;
if (this._x <= (starsStartx - stars._width)) {
this._x = starsStartx - starsSpeed;
}
}
}
Instance of Symbol 174 MovieClip "mainGround2" in Frame 6
onClipEvent (load) {
blueground.duplicateMovieClip("ground3", 100);
ground3._x = blueground._x + blueground._width;
groundStartx = this._x;
groundSpeed = 10;
}
onClipEvent (enterFrame) {
if (_root.spaceship.scrollStart == true) {
this._x = this._x - groundSpeed;
if (this._x <= (groundStartx - blueground._width)) {
this._x = groundStartx - groundSpeed;
}
}
}
Instance of Symbol 129 MovieClip "laser" in Frame 6
onClipEvent (load) {
laserMoveSpeed = 20;
this._x = _root.spaceship._x + 77;
this._y = _root.spaceship._y;
}
onClipEvent (enterFrame) {
if (this._name != "laser") {
this._x = this._x + laserMoveSpeed;
if (this._x > 600) {
_root.spaceship.laserCounter--;
this.removeMovieClip();
}
i = 1;
while (i <= _root.numEnemy) {
if (this.hitTest(_root["enemy" + i])) {
_root.score = _root.score + 250;
_root["enemy" + i].gotoAndPlay(2);
}
i++;
}
}
}
Instance of Symbol 133 MovieClip "enemy1" in Frame 6
onClipEvent (load) {
function reset() {
var _local1 = this;
_local1._x = 600;
_local1._y = random(200) + 100;
enemySpeed = random(6) + 1;
_local1.gotoAndStop(1);
}
reset();
}
onClipEvent (enterFrame) {
if (_root.spaceship.scrollStart) {
this._x = this._x - (enemySpeed + _root.mainGround2.groundSpeed);
} else {
this._x = this._x - enemySpeed;
}
if (this._x < -10) {
reset();
}
}
Instance of Symbol 40 MovieClip "spaceship" in Frame 6
onClipEvent (load) {
moveSpeed = 10;
_root.laser._visible = false;
laserCounter = 1;
scrollx = _root.mainGround2.blueground._width / 3;
scrollStart = false;
maxLasers = 4;
depthCounter = 1;
}
onClipEvent (enterFrame) {
if (Key.isDown(17) and (laserCounter <= maxLasers)) {
laserCounter++;
_root.laser.duplicateMovieClip("laser" + depthCounter, depthCounter);
_root["laser" + depthCounter]._visible = true;
depthCounter++;
if (depthCounter > maxLasers) {
depthCounter = 1;
}
}
if (Key.isDown(39)) {
if (this._x < scrollx) {
this._x = this._x + moveSpeed;
} else {
scrollStart = true;
}
} else if (Key.isDown(37)) {
this._x = this._x - moveSpeed;
}
if (Key.isDown(40)) {
this._y = this._y + moveSpeed;
} else if (Key.isDown(38)) {
this._y = this._y - moveSpeed;
}
}
onClipEvent (keyUp) {
if (Key.getCode() == 39) {
scrollStart = false;
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.topwall)) {
_y = (_y + 10);
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.bottomwall)) {
_y = (_y - 10);
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.leftwall)) {
_x = (_x + 10);
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.rightwall)) {
_x = (_x - 10);
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.neptune)) {
_root.gotoAndStop("level2");
}
}
onClipEvent (enterFrame) {
i = 1;
while (i <= _root.numEnemy) {
if (this.hitTest(_root["enemy" + i])) {
_root.life = _root.life - 5;
if (_root.life <= 0) {
_root.gotoAndStop("gameover2");
}
_root.score = _root.score + 250;
_root["enemy" + i].gotoAndPlay(2);
_root.spin.gotoAndPlay(19);
}
i++;
}
}
Frame 7
Instance of Symbol 103 MovieClip "mainStars" in Frame 7
onClipEvent (load) {
stars.duplicateMovieClip("stars2", 1000);
stars2._x = stars._x + stars._width;
starsStartx = this._x;
starsSpeed = 3;
}
onClipEvent (enterFrame) {
if (_root.spaceship.scrollStart) {
this._x = this._x - starsSpeed;
if (this._x <= (starsStartx - stars._width)) {
this._x = starsStartx - starsSpeed;
}
}
}
Instance of Symbol 174 MovieClip "mainGround2" in Frame 7
onClipEvent (load) {
ground.duplicateMovieClip("ground3", 100);
ground3._x = blueground._x + blueground._width;
groundStartx = this._x;
groundSpeed = 10;
}
onClipEvent (enterFrame) {
if (_root.spaceship.scrollStart == true) {
this._x = this._x - groundSpeed;
if (this._x <= (groundStartx - blueground._width)) {
this._x = groundStartx - groundSpeed;
}
}
}
Symbol 12 Button
on (release) {
gotoAndPlay (5);
}
Symbol 22 Button
on (release) {
gotoAndPlay (2);
}
Symbol 32 Button
on (release) {
getURL ("http://www.newgrounds.com");
}
Symbol 39 MovieClip Frame 18
gotoAndPlay (1);
Symbol 39 MovieClip Frame 21
stop();
Symbol 68 MovieClip Frame 40
stop();
Symbol 94 Button
on (release) {
_root.play();
}
Symbol 95 MovieClip Frame 1
function onEnterFrame() {
if (!loaded) {
var _local2 = _root.getBytesLoaded() / _root.getBytesTotal();
if (_local2 >= 1) {
play();
bar._x = initX;
loaded = true;
} else {
bar._x = initX + ((_local2 - 1) * bar._width);
}
}
var _local3 = getTimer() - time;
timeAccum = timeAccum + _local3;
while (timeAccum >= FRAME_TIME) {
var _local1 = 0;
while (_local1 < timeClips.length) {
if (timeClips[_local1]._currentframe < timeClips[_local1]._totalframes) {
timeClips[_local1].nextFrame();
} else {
timeClips[_local1].gotoAndStop(1);
}
_local1++;
}
if (loaded && (_currentframe < _totalframes)) {
nextFrame();
}
timeAccum = timeAccum - FRAME_TIME;
}
time = time + _local3;
}
stop();
_root.stop();
var initX = bar._x;
var time = getTimer();
var FRAME_TIME = 33.3333333333333;
var timeAccum = 0;
var loaded = false;
timeClips = [bargfx, tank.mc0, tank.mc1, tank.mc2, tank.mc3, tank.mc4, tank.mc4.mc0, tank.mc4.mc1, tank.mc4.mc0.mc0, tank.mc4.mc0.mc0.mc0.mc0, tank.mc4.mc0.mc0.mc0.mc1, tank.mc4.mc0.mc0.mc0.mc2, tank.mc4.mc0.mc0.mc0.mc3, tank.mc4.mc0.mc0.mc1, tank.mc4.mc0.mc0.mc2, tank.mc5.mc0];
var i = 0;
while (i < timeClips.length) {
timeClips[i].stop();
i++;
}
Symbol 95 MovieClip Frame 51
Symbol 110 MovieClip Frame 14
stop();
Symbol 123 MovieClip Frame 29
gotoAndPlay (1);
Symbol 133 MovieClip Frame 1
stop();
Symbol 133 MovieClip Frame 4
stop();
Symbol 148 MovieClip Frame 56
stop();
Symbol 152 Button
on (release) {
gotoAndPlay (2);
}
Symbol 155 Button
on (release) {
gotoAndStop (1);
}
Symbol 165 Button
on (release) {
gotoAndPlay (1);
}
Symbol 170 MovieClip Frame 14
stop();
Symbol 180 Button
on (release) {
gotoAndStop (6);
score = 0;
}