Frame 1
stop();
Frame 2
stop();
Frame 3
function shoot() {
i = 1;
while (i < numenemies) {
var _local3 = _root["ship" + i];
if (_local3.time < getTimer()) {
_root.shot.duplicateMovieClip("shot" + shotcount, shotcount + 2000);
playsound.start(0, 1);
var _local2 = _root["shot" + shotcount];
_local2._x = _local3._x;
_local2._y = _local3._y;
_root["ship" + i].rotationRadian = (_root["ship" + i]._rotation * Math.PI) / 180;
_local2.xspeed = 7 * Math.cos(_root["ship" + i].rotationRadian);
_local2.yspeed = 7 * Math.sin(_root["ship" + i].rotationRadian);
_local3.time = getTimer() + 2500;
shotcount++;
}
i++;
}
}
stop();
_global.thescore = 0;
score = 0;
playsound = new Sound(this);
playsound.attachSound("GUN1");
playsound1 = new Sound(this);
playsound1.attachSound("beat1");
playsound2 = new Sound(this);
playsound2.attachSound("beat2");
numenemies = 5;
shotcount = 1;
i = 1;
while (i < numenemies) {
ship.duplicateMovieClip("ship" + i, i + 1000, ship);
var en = _root["ship" + i];
en._x = random(200);
en._y = random(200);
en.time = getTimer() + random(2500);
i++;
}
Instance of Symbol 47 MovieClip "ast" in Frame 3
onClipEvent (load) {
function reset() {
this._rotation = 0;
this.decay = 0.97;
this.xspeed = 0;
this.yspeed = 0;
this.dead = 0;
this.totalspeed = 0;
}
reset();
}
onClipEvent (enterFrame) {
rotationRadian = (_rotation * Math.PI) / 180;
this._x = this._x + this.xspeed;
this._y = this._y + this.yspeed;
if (Key.isDown(39)) {
this._rotation = this._rotation + 5;
}
if (Key.isDown(37)) {
this._rotation = this._rotation - 5;
}
if (Key.isDown(38)) {
if (this.xspeed < 12) {
this.xspeed = this.xspeed + (Math.cos(rotationRadian) * 0.6);
}
if (this.yspeed < 12) {
this.yspeed = this.yspeed + (Math.sin(rotationRadian) * 0.6);
}
} else {
this.xspeed = this.xspeed * this.decay;
this.yspeed = this.yspeed * this.decay;
}
if (this._x > 580) {
this._x = -20;
}
if (this._x < -30) {
this._x = 570;
}
if (this._y > 430) {
this._y = -20;
}
if (this._y < -30) {
this._y = 420;
}
}
Instance of Symbol 52 MovieClip "ship" in Frame 3
onClipEvent (load) {
function reset() {
this.dead = 0;
if (this._name == "ship") {
this._visible = false;
} else {
this._visible = true;
}
this._rotation = 0;
this.shipylocation = random(2);
this._x = random(500) + 20;
if (this.shipylocation == 1) {
this._y = 0;
} else if (this.shipylocation == 0) {
this._y = 415;
}
this.xshipdir = random(2);
this.yshipdir = random(2);
this.shiprotation = random(2) + 1;
if (this.xshipdir == 0) {
this.xspeed = random(2) + 0.5;
} else if (this.xshipdir == 1) {
this.xspeed = (random(2) - 2) + 0.5;
}
if (this.yshipdir == 0) {
this.yspeed = random(2) + 0.5;
} else {
this.yshipdir == 1;
}
this.yspeed = (random(2) - 2) + 0.5;
}
reset();
}
onClipEvent (enterFrame) {
if (this.dead == 1) {
this.reset();
}
this._rotation = this._rotation + this.shiprotation;
this._x = this._x + xspeed;
this._y = this._y + yspeed;
if (this._y > 420) {
this._y = -10;
}
if (this._y < -20) {
this._y = 410;
}
if (this._x < -20) {
this._x = 560;
}
if (this._x > 570) {
this._x = -10;
}
i = 1;
while (i < 5) {
if (((this.hitTest(_root.ast["asthit" + i]) && (this.dead == 0)) && (_root.ast.dead == 0)) && (this._name != "ship")) {
this.dead = 1;
_global.thescore = _global.thescore + 10;
_root.score = _root.score + 10;
this.gotoAndPlay(2);
}
i++;
}
}
Instance of Symbol 54 MovieClip "shot" in Frame 3
onClipEvent (load) {
if (this._name == "shot") {
this._visible = false;
} else {
this._visible = true;
}
}
onClipEvent (enterFrame) {
this._x = this._x + this.xspeed;
this._y = this._y + this.yspeed;
if ((((this._x > 550) || (this._x < 0)) || (this._y > 400)) || (this._y < 0)) {
this.removeMovieClip();
}
i = 1;
while (i < 5) {
if ((this.hitTest(_root.ast["asthit" + i]) && (_root.ast.dead == 0)) && (this._name != "shot")) {
_root.ast.gotoAndPlay(2);
this.removeMovieClip();
}
i++;
}
}
Instance of Symbol 56 MovieClip in Frame 3
onClipEvent (load) {
this.beatcount = 1;
}
onClipEvent (enterFrame) {
if (((this.beatcount % 30) == 0) && ((this.beatcount % 60) != 0)) {
_root.playsound1.start(0, 1);
}
if ((this.beatcount % 60) == 0) {
_root.playsound2.start(0, 1);
}
this.beatcount++;
_root.shoot();
}
Frame 4
function shoot() {
i = 1;
while (i < numenemies) {
var _local3 = _root["ship" + i];
if (_local3.time < getTimer()) {
_root.shot.duplicateMovieClip("shot" + shotcount, shotcount + 2000);
var _local2 = _root["shot" + shotcount];
playsound.start(0, 1);
_local2._x = _local3._x;
_local2._y = _local3._y;
_root["ship" + i].rotationRadian = (_root["ship" + i]._rotation * Math.PI) / 180;
_local2.xspeed = 7 * Math.cos(_root["ship" + i].rotationRadian);
_local2.yspeed = 7 * Math.sin(_root["ship" + i].rotationRadian);
_local3.time = getTimer() + 2250;
shotcount++;
}
i++;
}
}
stop();
score = _global.thescore;
numenemies = 5;
shotcount = 1;
playsound = new Sound(this);
playsound.attachSound("GUN1");
playsound1 = new Sound(this);
playsound1.attachSound("beat1");
playsound2 = new Sound(this);
playsound2.attachSound("beat2");
i = 1;
while (i < numenemies) {
ship.duplicateMovieClip("ship" + i, i + 1000, ship);
var en = _root["ship" + i];
en._x = random(200);
en._y = random(200);
en.time = getTimer() + random(2250);
i++;
}
stop();
Instance of Symbol 52 MovieClip "ship" in Frame 4
onClipEvent (load) {
function reset() {
this.dead = 0;
if (this._name == "ship") {
this._visible = false;
} else {
this._visible = true;
}
this._rotation = 0;
this.shipylocation = random(2);
this._x = random(500) + 20;
if (this.shipylocation == 1) {
this._y = 0;
} else if (this.shipylocation == 0) {
this._y = 415;
}
this.xshipdir = random(2);
this.yshipdir = random(2);
this.shiprotation = random(2) + 1;
if (this.xshipdir == 0) {
this.xspeed = random(2) + 0.5;
} else if (this.xshipdir == 1) {
this.xspeed = (random(2) - 2) + 0.5;
}
if (this.yshipdir == 0) {
this.yspeed = random(2) + 0.5;
} else {
this.yshipdir == 1;
}
this.yspeed = (random(2) - 2) + 0.5;
}
reset();
}
onClipEvent (enterFrame) {
if (this.dead == 1) {
this.reset();
}
this._rotation = this._rotation + this.shiprotation;
this._x = this._x + xspeed;
this._y = this._y + yspeed;
if (this._y > 420) {
this._y = -10;
}
if (this._y < -20) {
this._y = 410;
}
if (this._x < -20) {
this._x = 560;
}
if (this._x > 570) {
this._x = -10;
}
i = 1;
while (i < 5) {
if (((this.hitTest(_root.mast["masthit" + i]) && (this.dead == 0)) && (_root.mast.dead == 0)) && (this._name != "ship")) {
_root.score = _root.score + 10;
_global.thescore = _global.thescore + 10;
this.dead = 1;
this.gotoAndPlay(2);
}
i++;
}
}
Instance of Symbol 54 MovieClip "shot" in Frame 4
onClipEvent (load) {
if (this._name == "shot") {
this._visible = false;
} else {
this._visible = true;
}
}
onClipEvent (enterFrame) {
this._x = this._x + this.xspeed;
this._y = this._y + this.yspeed;
if ((((this._x > 550) || (this._x < 0)) || (this._y > 400)) || (this._y < 0)) {
this.removeMovieClip();
}
i = 1;
while (i < 5) {
if ((this.hitTest(_root.mast["masthit" + i]) && (_root.mast.dead == 0)) && (this._name != "shot")) {
_root.mast.gotoAndPlay(2);
this.removeMovieClip();
}
i++;
}
}
Instance of Symbol 56 MovieClip in Frame 4
onClipEvent (load) {
this.beatcount = 1;
}
onClipEvent (enterFrame) {
if (((this.beatcount % 30) == 0) && ((this.beatcount % 60) != 0)) {
_root.playsound1.start(0, 1);
}
if ((this.beatcount % 60) == 0) {
_root.playsound2.start(0, 1);
}
this.beatcount++;
_root.shoot();
}
Instance of Symbol 72 MovieClip "mast" in Frame 4
onClipEvent (load) {
function reset() {
this._rotation = 0;
this.decay = 0.97;
this.xspeed = 0;
this.yspeed = 0;
this.dead = 0;
this.totalspeed = 0;
}
reset();
}
onClipEvent (enterFrame) {
rotationRadian = (_rotation * Math.PI) / 180;
this._x = this._x + this.xspeed;
this._y = this._y + this.yspeed;
if (Key.isDown(39)) {
this._rotation = this._rotation + 5;
}
if (Key.isDown(37)) {
this._rotation = this._rotation - 5;
}
if (Key.isDown(38)) {
if (this.xspeed < 12) {
this.xspeed = this.xspeed + (Math.cos(rotationRadian) * 0.6);
}
if (this.yspeed < 12) {
this.yspeed = this.yspeed + (Math.sin(rotationRadian) * 0.6);
}
} else {
this.xspeed = this.xspeed * this.decay;
this.yspeed = this.yspeed * this.decay;
}
if (this._x > 580) {
this._x = -20;
}
if (this._x < -30) {
this._x = 570;
}
if (this._y > 430) {
this._y = -20;
}
if (this._y < -30) {
this._y = 420;
}
}
Frame 5
function shoot() {
i = 1;
while (i < numenemies) {
var _local3 = _root["ship" + i];
if (_local3.time < getTimer()) {
_root.shot.duplicateMovieClip("shot" + shotcount, shotcount + 2000);
var _local2 = _root["shot" + shotcount];
playsound.start(0, 1);
_local2._x = _local3._x;
_local2._y = _local3._y;
_root["ship" + i].rotationRadian = (_root["ship" + i]._rotation * Math.PI) / 180;
_local2.xspeed = 7 * Math.cos(_root["ship" + i].rotationRadian);
_local2.yspeed = 7 * Math.sin(_root["ship" + i].rotationRadian);
_local3.time = getTimer() + 2000;
shotcount++;
}
i++;
}
}
stop();
score = _global.thescore;
numenemies = 5;
shotcount = 1;
playsound = new Sound(this);
playsound.attachSound("GUN1");
playsound1 = new Sound(this);
playsound1.attachSound("beat1");
playsound2 = new Sound(this);
playsound2.attachSound("beat2");
i = 1;
while (i < numenemies) {
ship.duplicateMovieClip("ship" + i, i + 1000, ship);
var en = _root["ship" + i];
en._x = random(200);
en._y = random(200);
en.time = getTimer() + random(2000);
i++;
}
Instance of Symbol 52 MovieClip "ship" in Frame 5
onClipEvent (load) {
function reset() {
this.dead = 0;
if (this._name == "ship") {
this._visible = false;
} else {
this._visible = true;
}
this._rotation = 0;
this.shipylocation = random(2);
this._x = random(500) + 20;
if (this.shipylocation == 1) {
this._y = 0;
} else if (this.shipylocation == 0) {
this._y = 415;
}
this.xshipdir = random(2);
this.yshipdir = random(2);
this.shiprotation = random(2) + 1;
if (this.xshipdir == 0) {
this.xspeed = random(2) + 0.5;
} else if (this.xshipdir == 1) {
this.xspeed = (random(2) - 2) + 0.5;
}
if (this.yshipdir == 0) {
this.yspeed = random(2) + 0.5;
} else {
this.yshipdir == 1;
}
this.yspeed = (random(2) - 2) + 0.5;
}
reset();
}
onClipEvent (enterFrame) {
if (this.dead == 1) {
this.reset();
}
this._rotation = this._rotation + this.shiprotation;
this._x = this._x + xspeed;
this._y = this._y + yspeed;
if (this._y > 420) {
this._y = -10;
}
if (this._y < -20) {
this._y = 410;
}
if (this._x < -20) {
this._x = 560;
}
if (this._x > 570) {
this._x = -10;
}
i = 1;
while (i < 5) {
if (((this.hitTest(_root.sast["sasthit" + i]) && (this.dead == 0)) && (_root.sast.dead == 0)) && (this._name != "ship")) {
_root.score = _root.score + 10;
_global.thescore = _global.thescore + 10;
this.dead = 1;
this.gotoAndPlay(2);
}
i++;
}
}
Instance of Symbol 54 MovieClip "shot" in Frame 5
onClipEvent (load) {
if (this._name == "shot") {
this._visible = false;
} else {
this._visible = true;
}
}
onClipEvent (enterFrame) {
this._x = this._x + this.xspeed;
this._y = this._y + this.yspeed;
if ((((this._x > 550) || (this._x < 0)) || (this._y > 400)) || (this._y < 0)) {
this.removeMovieClip();
}
i = 1;
while (i < 5) {
if ((this.hitTest(_root.sast["sasthit" + i]) && (_root.sast.dead == 0)) && (this._name != "shot")) {
_root.sast.gotoAndPlay(2);
this.removeMovieClip();
}
i++;
}
}
Instance of Symbol 56 MovieClip in Frame 5
onClipEvent (load) {
this.beatcount = 1;
}
onClipEvent (enterFrame) {
if (((this.beatcount % 30) == 0) && ((this.beatcount % 60) != 0)) {
_root.playsound1.start(0, 1);
}
if ((this.beatcount % 60) == 0) {
_root.playsound2.start(0, 1);
}
this.beatcount++;
_root.shoot();
}
Instance of Symbol 88 MovieClip "sast" in Frame 5
onClipEvent (load) {
function reset() {
this._rotation = 0;
this.decay = 0.97;
this.xspeed = 0;
this.yspeed = 0;
this.dead = 0;
this.totalspeed = 0;
}
reset();
}
onClipEvent (enterFrame) {
rotationRadian = (_rotation * Math.PI) / 180;
this._x = this._x + this.xspeed;
this._y = this._y + this.yspeed;
if (Key.isDown(39)) {
this._rotation = this._rotation + 5;
}
if (Key.isDown(37)) {
this._rotation = this._rotation - 5;
}
if (Key.isDown(38)) {
if (this.xspeed < 12) {
this.xspeed = this.xspeed + (Math.cos(rotationRadian) * 0.6);
}
if (this.yspeed < 12) {
this.yspeed = this.yspeed + (Math.sin(rotationRadian) * 0.6);
}
} else {
this.xspeed = this.xspeed * this.decay;
this.yspeed = this.yspeed * this.decay;
}
if (this._x > 580) {
this._x = -20;
}
if (this._x < -30) {
this._x = 570;
}
if (this._y > 430) {
this._y = -20;
}
if (this._y < -30) {
this._y = 420;
}
}
Frame 6
stop();
score = _global.thescore;
Symbol 9 Button
on (release) {
getURL ("http://www.flashninjaclan.com", "_blank");
}
Symbol 12 Button
on (release) {
getURL ("http://www.java-gaming.com", "_blank");
}
Symbol 19 Button
on (release) {
gotoAndPlay ("ist");
}
Symbol 22 Button
on (release) {
getURL ("http://www.java-gaming.com", "_blank");
}
Symbol 26 Button
on (release) {
getURL ("http://www.flashninjaclan.com/games/asteroidrevenge/topscores.php", "_blank");
}
Symbol 33 Button
on (release) {
gotoAndPlay ("big");
}
Symbol 47 MovieClip Frame 1
stop();
Symbol 47 MovieClip Frame 2
this.dead = 1;
Symbol 47 MovieClip Frame 5
this.removeMovieClip();
i = 0;
while (i < 5) {
_root["ship" + i].removeMovieClip();
i++;
}
_root.gotoAndPlay("start2");
Symbol 52 MovieClip Frame 1
stop();
Symbol 52 MovieClip Frame 4
this.reset();
Symbol 72 MovieClip Frame 1
stop();
Symbol 72 MovieClip Frame 2
this.dead = 1;
Symbol 72 MovieClip Frame 5
this.removeMovieClip();
i = 0;
while (i < 5) {
_root["ship" + i].removeMovieClip();
i++;
}
_root.gotoAndPlay("sstart");
Symbol 88 MovieClip Frame 1
stop();
Symbol 88 MovieClip Frame 2
this.dead = 1;
Symbol 88 MovieClip Frame 5
this.removeMovieClip();
i = 0;
while (i < 5) {
_root["ship" + i].removeMovieClip();
i++;
}
_root.gotoAndPlay("end");
Symbol 97 Button
on (release) {
_root.thename = _root.scorename;
score = _root.score;
loadVariablesNum ("http://www.flashninjaclan.com/games/asteroidrevenge/newscore.php", 0, "POST");
gotoAndPlay (1);
}