Frame 1
stop();
_root.runners = true;
_root.bkg = 1;
_root.difficulty = 3;
Frame 2
stop();
Instance of Symbol 23 MovieClip in Frame 2
onClipEvent (enterFrame) {
if (_root.runners) {
gotoAndStop (1);
} else {
gotoAndStop (2);
}
}
Instance of Symbol 32 MovieClip in Frame 2
onClipEvent (load) {
stop();
}
onClipEvent (enterFrame) {
gotoAndStop(_root.bkg);
}
Instance of Symbol 41 MovieClip in Frame 2
onClipEvent (load) {
stop();
}
onClipEvent (enterFrame) {
gotoAndStop(_root.difficulty);
}
Frame 3
stop();
Mouse.hide();
score = 0;
rscore = 0;
bullets = 0;
final = 0;
bc = 10000;
d = 0;
i = 0;
spawnrate = 30 - (_root.difficulty * 5);
onMouseDown = function () {
bullets++;
bc++;
if (bc > 10025) {
bc = 10000;
}
duplicateMovieClip ("bullet", "b" + bc, bc);
};
onEnterFrame = function () {
i++;
if (random(spawnrate) == 0) {
if (random(5) == 0) {
if (_root.runners) {
duplicateMovieClip (_root.runner, "runner" + i, i);
}
} else {
duplicateMovieClip (_root.enemy, "enemy" + i, i);
}
}
if (i > 300) {
i = 0;
}
};
Instance of Symbol 47 MovieClip in Frame 3
onClipEvent (load) {
gotoAndStop(_root.bkg);
}
Instance of Symbol 49 MovieClip "player" in Frame 3
onClipEvent (load) {
this._x = Stage.width / 2;
this._y = Stage.height / 2;
speed = 3.5;
}
onClipEvent (enterFrame) {
if (Key.isDown(87)) {
if (this._y > (30 + speed)) {
this._y = this._y - speed;
} else {
this._y = 30;
}
} else if (Key.isDown(83)) {
if (this._y < ((Stage.height - 30) - speed)) {
this._y = this._y + speed;
} else {
this._y = Stage.height - 30;
}
}
if (Key.isDown(65)) {
if (this._x > (30 + speed)) {
this._x = this._x - speed;
} else {
this._x = 30;
}
} else if (Key.isDown(68)) {
if (this._x < ((Stage.width - 30) - speed)) {
this._x = this._x + speed;
} else {
this._x = Stage.width - 30;
}
}
}
onClipEvent (mouseMove) {
Xd = _root._xmouse - _x;
Yd = _root._ymouse - _y;
radAngle = Math.atan2(Yd, Xd);
_rotation = int(((radAngle * 180) / Math.PI) + 90);
updateAfterEvent();
}
Instance of Symbol 51 MovieClip "bullet" in Frame 3
onClipEvent (load) {
spd = 30;
_x = _root.player._x;
_y = _root.player._y;
_rotation = _root.player._rotation;
}
onClipEvent (enterFrame) {
if (_name == "bullet") {
this._x = this._x - 4000;
} else if (_rotation > 180) {
_y = (_y + (spd * Math.cos((Math.PI/180) * _rotation)));
_x = (_x - (spd * Math.sin((Math.PI/180) * _rotation)));
} else {
_y = (_y - (spd * Math.cos((Math.PI/180) * _rotation)));
_x = (_x + (spd * Math.sin((Math.PI/180) * _rotation)));
}
if ((((_x > Stage.width) || (_x < 0)) || (_y < 0)) || (_y > Stage.height)) {
this.removeMovieClip();
}
}
Instance of Symbol 54 MovieClip "enemy" in Frame 3
onClipEvent (load) {
stop();
b = random(3);
if (b == 0) {
this._x = Stage.width + this._width;
this._y = random(Stage.height);
} else if (b == 1) {
this._x = -this._width;
this._y = random(Stage.height);
} else if (b == 2) {
this._y = Stage.width + this._width;
this._x = random(Stage.width);
} else if (b == 3) {
this._y = -this._width;
this._x = random(Stage.width);
}
speed = 2.5;
}
onClipEvent (enterFrame) {
if (this._currentframe == 1) {
Xd = _root.player._x - _x;
Yd = _root.player._y - _y;
radAngle = Math.atan2(Yd, Xd);
this._rotation = int(((radAngle * 180) / Math.PI) + 90);
i = 10000;
while (i < 10026) {
if (this.hitTest(_root["b" + i])) {
play();
}
i++;
}
if (this._rotation > 180) {
_y = (_y + (speed * Math.cos((Math.PI/180) * _rotation)));
_x = (_x - (speed * Math.sin((Math.PI/180) * _rotation)));
} else {
_y = (_y - (speed * Math.cos((Math.PI/180) * _rotation)));
_x = (_x + (speed * Math.sin((Math.PI/180) * _rotation)));
}
if (this.hitTest(_root.player)) {
_root.nextFrame();
}
}
}
Instance of Symbol 57 MovieClip "runner" in Frame 3
onClipEvent (load) {
stop();
if (_root.runners) {
b = random(3);
if (b == 0) {
this._x = Stage.width + this._width;
this._y = random(Stage.height);
} else if (b == 1) {
this._x = -this._width;
this._y = random(Stage.height);
} else if (b == 2) {
this._y = Stage.width + this._width;
this._x = random(Stage.width);
} else if (b == 3) {
this._y = -this._width;
this._x = random(Stage.width);
}
speed = 4.5;
}
}
onClipEvent (enterFrame) {
if (_root.runners) {
if (this._currentframe == 1) {
Xd = _root.player._x - _x;
Yd = _root.player._y - _y;
radAngle = Math.atan2(Yd, Xd);
this._rotation = int(((radAngle * 180) / Math.PI) + 90);
i = 10000;
while (i < 10026) {
if (this.hitTest(_root["b" + i])) {
play();
}
i++;
}
if (this._rotation > 180) {
_y = (_y + (speed * Math.cos((Math.PI/180) * _rotation)));
_x = (_x - (speed * Math.sin((Math.PI/180) * _rotation)));
} else {
_y = (_y - (speed * Math.cos((Math.PI/180) * _rotation)));
_x = (_x + (speed * Math.sin((Math.PI/180) * _rotation)));
}
if (this.hitTest(_root.player)) {
_root.nextFrame();
}
}
}
}
Instance of Symbol 59 MovieClip "cursor" in Frame 3
onClipEvent (mouseMove) {
this._x = _root._xmouse;
this._y = _root._ymouse;
updateAfterEvent();
}
Frame 4
d = 0;
while (d < 301) {
_root["enemy" + d].removeMovieClip();
_root["runner" + d].removeMovieClip();
d++;
}
i = 0;
d = 0;
if (_root.runners) {
rscorex = rscore;
} else {
rscorex = "N/A";
}
Mouse.show();
if (bullets == 0) {
final = 0;
} else {
final = (Math.round((score / bullets) * 40) + (score * 20)) * _root.difficulty;
}
onMouseDown = function () {
};
Symbol 9 Button
on (release) {
_root.play();
}
Symbol 10 MovieClip Frame 1
_root.stop();
PercentLoaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
if (PercentLoaded != 100) {
bar._xscale = PercentLoaded;
} else {
gotoAndStop ("loaded");
}
Symbol 10 MovieClip Frame 2
gotoAndPlay (1);
Symbol 16 Button
on (release) {
nextFrame();
}
Symbol 20 Button
on (release) {
if (_root.runners) {
_root.runners = false;
} else {
_root.runners = true;
}
}
Symbol 26 Button
on (release) {
_root.bkg++;
if (_root.bkg > 5) {
_root.bkg = 1;
}
}
Symbol 35 Button
on (release) {
_root.difficulty++;
if (_root.difficulty > 5) {
_root.difficulty = 1;
}
}
Symbol 54 MovieClip Frame 10
stop();
_root.score++;
_parent.removeMovieClip();
Symbol 57 MovieClip Frame 10
stop();
_root.score++;
_root.rscore++;
_parent.removeMovieClip();
Symbol 67 Button
on (release) {
gotoAndPlay (2);
}