Frame 1
stop();
score = 0;
loseCount = 0;
message = "";
weapon = 1;
shotCount = 0;
Instance of Symbol 40 MovieClip in Frame 1
onClipEvent (enterFrame) {
if ((_x != _root._xmouse) and (_x < _root._xmouse)) {
_x = _root._xmouse;
}
if ((_x != _root._xmouse) and (_x > _root._xmouse)) {
_x = _root._xmouse;
}
if ((_y != _root._ymouse) and (_y < _root._ymouse)) {
_y = _root._ymouse;
}
if ((_y != _root._ymouse) and (_y > _root._ymouse)) {
_y = _root._ymouse;
}
}
onClipEvent (load) {
Mouse.hide();
}
Frame 2
stop();
displayTime = 30;
countDown = function () {
if (displayTime > 0) {
displayTime--;
}
if (displayTime <= 0) {
timer.stop();
gotoAndStop (3);
if (score > 9) {
message = "Straight shootin', space cowboy!";
} else {
message = "Not fast enough, hot shot!";
}
}
};
timer = setInterval(countDown, 1000);
Instance of Symbol 28 MovieClip "my_ship" in Frame 2
on (keyPress "<Left>") {
if (this._x > 20) {
this._x = this._x - 10;
}
}
on (keyPress "<Right>") {
if (this._x < 530) {
this._x = this._x + 10;
}
}
on (keyPress "<Space>") {
if (_root.weapon == 1) {
this.my_shot._visible = true;
this.my_shot.gotoAndPlay(1);
} else {
_root.shotCount = _root.shotCount - 1;
if (_root.shotCount < 1) {
_root.weapon = 1;
}
this.myBeam._visible = true;
this.myBeam.gotoAndPlay(2);
}
}
Instance of Symbol 47 MovieClip "alien_1" in Frame 2
onClipEvent (load) {
function reset() {
this._x = random(400) + 50;
this._y = -50;
}
mySoundObj = new Sound();
mySoundObj.attachSound("explosion");
reset();
}
onClipEvent (enterFrame) {
if (this.myCore.hitTest(_root.my_ship.my_shot) || (this.myCore.hitTest(_root.my_ship.myBeam))) {
_root.score++;
mySoundObj.start(0, 1);
if (_root.score > 29) {
_root.message = "YOU FREAKING WIN!";
stopAllSounds();
_root.nextFrame();
}
reset();
}
if (this.myCore.hitTest(_root.my_ship.myBody)) {
mySoundObj.start(0, 1);
_root.message = "You crashed into another ship! You lose.";
stopAllSounds();
_root.nextFrame();
}
if (this.hitTest(_root.endField.body)) {
_root.loseCount++;
if (_root.loseCount > 9) {
_root.message = "You missed 10! YOU LOSE!";
stopAllSounds();
_root.nextFrame();
}
reset();
}
this._y = this._y + 1;
if (this._y > 450) {
reset();
}
}
Instance of Symbol 47 MovieClip in Frame 2
onClipEvent (load) {
function reset() {
this._x = random(400) + 50;
this._y = -50;
this.myPowerUp._visible = false;
this.myPowerUp.gotoAndStop(1);
}
mySoundObj = new Sound();
mySoundObj.attachSound("explosion");
if (weapon != 1) {
if (randRange(1, 10) >= 1) {
this.myPowerUp._visible = true;
this.myPowerUp.gotoAndPlay(2);
weapon = 0;
}
}
reset();
}
onClipEvent (enterFrame) {
if (this.myCore.hitTest(_root.my_ship.my_shot) || (this.myCore.hitTest(_root.my_ship.myBeam))) {
_root.score++;
mySoundObj.start(0, 1);
if (_root.score > 29) {
_root.message = "YOU FREAKING WIN!";
stopAllSounds();
_root.nextFrame();
}
reset();
}
if (this.myPowerUp.hitTest(_root.my_Ship.myShot)) {
weapon = 1;
reset();
}
if (this.myCore.hitTest(_root.my_ship.myBody)) {
mySoundObj.start(0, 1);
_root.message = "You crashed into another ship! You lose.";
stopAllSounds();
_root.nextFrame();
}
if (this.hitTest(_root.endField.body)) {
_root.loseCount++;
if (_root.loseCount > 9) {
_root.message = "You missed 10! YOU LOSE!";
stopAllSounds();
_root.nextFrame();
}
reset();
}
this._y = this._y + 1;
if (this._y > 450) {
reset();
}
}
Instance of Symbol 47 MovieClip in Frame 2
onClipEvent (load) {
function reset() {
this._x = random(400) + 50;
this._y = -50;
}
mySoundObj = new Sound();
mySoundObj.attachSound("explosion");
reset();
}
onClipEvent (enterFrame) {
if (this.myCore.hitTest(_root.my_ship.my_shot) || (this.myCore.hitTest(_root.my_ship.myBeam))) {
_root.score++;
mySoundObj.start(0, 1);
if (_root.score > 29) {
_root.message = "YOU FREAKING WIN!";
stopAllSounds();
_root.nextFrame();
}
reset();
}
if (this.myCore.hitTest(_root.my_ship.myBody)) {
mySoundObj.start(0, 1);
_root.message = "You crashed into another ship! You lose.";
stopAllSounds();
_root.nextFrame();
}
if (this.hitTest(_root.endField.body)) {
_root.loseCount++;
if (_root.loseCount > 9) {
_root.message = "You missed 10! YOU LOSE!";
stopAllSounds();
_root.nextFrame();
}
reset();
}
this._y = this._y + 1;
if (this._y > 450) {
reset();
}
}
Instance of Symbol 44 MovieClip in Frame 2
onClipEvent (load) {
this._x = random(400) + 50;
this._visible = true;
this.gotoAndPlay(2);
}
onClipEvent (enterFrame) {
if (this._y > 450) {
this._visible = false;
this.gotoAndStop(1);
} else {
this._y = this._y + 1;
}
if (this.hitTest(_root.my_ship.myBody)) {
_root.weapon = 0;
_root.shotCount = 5;
this._visible = false;
this.gotoAndStop(1);
}
}
Instance of Symbol 62 MovieClip "myCounter" in Frame 2
onClipEvent (enterFrame) {
gotoAndStop(_root.shotCount + 1);
}
Frame 3
_root.weapon = 1;
stop();
clearInterval(timer);
Instance of Symbol 40 MovieClip in Frame 3
onClipEvent (enterFrame) {
if ((_x != _root._xmouse) and (_x < _root._xmouse)) {
_x = _root._xmouse;
}
if ((_x != _root._xmouse) and (_x > _root._xmouse)) {
_x = _root._xmouse;
}
if ((_y != _root._ymouse) and (_y < _root._ymouse)) {
_y = _root._ymouse;
}
if ((_y != _root._ymouse) and (_y > _root._ymouse)) {
_y = _root._ymouse;
}
}
onClipEvent (load) {
Mouse.hide();
}
Symbol 8 Button
on (release) {
stopAllSounds();
play();
}
Symbol 14 MovieClip Frame 1
stop();
Symbol 19 MovieClip Frame 1
play();
Symbol 19 MovieClip Frame 60
gotoAndPlay (1);
Symbol 27 MovieClip Frame 1
stop();
Symbol 27 MovieClip Frame 2
play();
Symbol 27 MovieClip Frame 61
gotoAndStop (1);
Symbol 44 MovieClip Frame 1
stop();
Symbol 44 MovieClip Frame 2
play();
Symbol 44 MovieClip Frame 60
gotoAndPlay (2);
Symbol 62 MovieClip Frame 1
stop();
Symbol 62 MovieClip Frame 2
stop();
Symbol 62 MovieClip Frame 3
stop();
Symbol 62 MovieClip Frame 4
stop();
Symbol 62 MovieClip Frame 5
stop();
Symbol 62 MovieClip Frame 6
stop();
Symbol 65 Button
on (release) {
score = 0;
stopAllSounds();
gotoAndPlay (2);
}