Frame 1
stop();
Frame 2
stop();
stop();
Instance of Symbol 22 MovieClip "ground" in Frame 2
onClipEvent (enterFrame) {
if (_root.spaceship.scrollStart) {
this._x = this._x - groundSpeed;
if ((groundStartx - ground._width) >= this._x) {
this._x = groundStartx - groundSpeed;
}
}
}
Frame 5
numEnemy = 4;
i = 2;
while (numEnemy >= i) {
enemy1.duplicateMovieClip("enemy" + i, i + 100);
i++;
}
score = 0;
stop();
Instance of Symbol 42 MovieClip "enemy1" in Frame 5
onClipEvent (load) {
function reset() {
this._x = 700;
this._y = random(200) + 100;
enemySpeed = random(10) + 5;
this.gotoAndPlay(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();
}
if (this.hitTest(_root.spaceship)) {
_root.gotoAndStop("gameOver");
}
}
Instance of Symbol 50 MovieClip "spaceship" in Frame 5
onClipEvent (load) {
moveSpeed = 10;
_root.laser._visible = false;
laserCounter = 1;
scrollx = _root.mainGround.ground._width / 3;
scrollStart = false;
}
onClipEvent (enterFrame) {
if (Key.isDown(Key.CONTROL)) {
laserCounter++;
_root.laser.duplicateMovieClip("laser" + laserCounter, laserCounter);
_root["laser" + laserCounter]._visible = true;
}
if (Key.isDown(Key.RIGHT)) {
if (this._x < scrollx) {
this._x = this._x + moveSpeed;
} else {
scrollStart = true;
}
} else if (Key.isDown(Key.LEFT)) {
this._x = this._x - moveSpeed;
}
if (Key.isDown(Key.DOWN)) {
this._y = this._y + moveSpeed;
} else if (Key.isDown(Key.UP)) {
this._y = this._y - moveSpeed;
}
}
onClipEvent (keyUp) {
if (Key.getCode() == Key.RIGHT) {
scrollStart = false;
}
}
Instance of Symbol 52 MovieClip "mainGround" in Frame 5
onClipEvent (load) {
ground.duplicateMovieClip("ground2", 100);
ground2._x = ground._x + ground._width;
groundStartx = this._x;
groundSpeed = 10;
}
onClipEvent (enterFrame) {
if (_root.spaceship.scrollStart) {
this._x = this._x - groundSpeed;
if ((groundStartx - ground._width) >= this._x) {
this._x = groundStartx - groundSpeed;
}
}
}
Instance of Symbol 54 MovieClip "laser" in Frame 5
onClipEvent (load) {
laserMoveSpeed = 20;
this._x = _root.spaceship._x + 90;
this._y = _root.spaceship._y;
}
onClipEvent (enterFrame) {
if (this._name != "laser") {
this._x = this._x + laserMoveSpeed;
if (650 < this._x) {
this.removeMovieClip();
}
i = 1;
while (_root.numEnemy >= i) {
if (this.hitTest(_root["enemy" + i])) {
_root.score = _root.score + 100;
_root["enemy" + i].gotoAndPlay(10);
}
i++;
}
}
}
Frame 6
stop();
Frame 7
stop();
Symbol 6 MovieClip Frame 2
var byteload = _root.getBytesLoaded();
var bytetotal = _root.getBytesTotal();
var ready = Math.round((byteload / bytetotal) * 100);
var kilobytes = Math.round(bytetotal / 1000);
var output = ((((((ready + "%") + " ") + "of") + " ") + kilobytes) + "kb");
bar._xscale = ready;
if (ready == 100) {
with (_root) {
gotoAndPlay(_currentFrame + 1);
}
} else {
with (_root) {
gotoAndStop(_currentFrame - 1);
}
}
Symbol 33 Button
on (release) {
gotoAndPlay (5);
}
Symbol 42 MovieClip Frame 6
gotoAndPlay (1);
Symbol 42 MovieClip Frame 12
stop();
Symbol 50 MovieClip Frame 7
gotoAndPlay (1);
Symbol 50 MovieClip Frame 45
gotoAndPlay (3);
Symbol 58 Button
on (release) {
gotoAndPlay (5);
}