Instance of Symbol 4 MovieClip "mainStars" in Frame 1
onClipEvent (load) {
stars.duplicateMovieClip("stars2", 100);
stars2._x = stars._x + stars._width;
starsStartx = this._x;
starsSpeed = 10;
}
onClipEvent (enterFrame) {
this._x = this._x - groundSpeed;
if (this._x <= (groundStartx - ground._width)) {
this._x = groundStartx - groundSpeed;
}
}
Instance of Symbol 6 MovieClip "laser" in Frame 1
onClipEvent (load) {
laserMoveSpeed = 20;
this._x = _root.spaceship._x + 35;
this._y = _root.spaceship._y + 50;
}
onClipEvent (enterFrame) {
this._x = this._x + laserMoveSpeed;
if (this._x > 600) {
this.removeMovieClip();
}
}
Instance of Symbol 10 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;
}
}