Frame 1
_root.kongregateServices.connect();
Instance of Symbol 10 MovieClip "plyr" in Frame 1
onClipEvent (load) {
var Vx = 0;
var Vy = 0;
var E = 0.05;
var live = true;
}
onClipEvent (enterFrame) {
_x = (_x + Vx);
_y = (_y + Vy);
if (live == true) {
Mouse.hide();
Vx = (_root._xmouse - _x) * E;
Vy = (_root._ymouse - _y) * E;
} else {
Mouse.show();
_alpha = (_alpha - 5);
}
e = 0;
while (e <= 100) {
if (this.hitTest(_root["enemy" + e]._x, _root["enemy" + e]._y, true)) {
new Color(this).setRGB(16711680);
live = false;
_root.clearInterval(spawnEnemy);
_root.clearInterval(counter);
_root.play();
}
e++;
}
}
onClipEvent (mouseDown) {
if (live == true) {
this.play();
if (this._currentframe == 1) {
_root.beat.play();
_root.beat._x = _x + (Vx * 3);
_root.beat._y = _y + (Vy * 3);
}
}
}
Instance of Symbol 13 MovieClip "beat" in Frame 1
onClipEvent (enterFrame) {
_rotation = (Math.random() * 360);
}
Frame 290
stop();
var e = 0;
var sec = 0;
spawnEnemy = setInterval(function () {
e++;
if (e >= 100) {
e = 0;
}
srcEnemy.duplicateMovieClip("enemy" + e, 1000 + e);
}, 5000);
counter = setInterval(function () {
sec++;
}, 1000);
Instance of Symbol 21 MovieClip "srcEnemy" in Frame 290
onClipEvent (load) {
var Vx = ((Math.random() * 6) - 3);
var Vy = ((Math.random() * 6) - 3);
if (_name != "srcEnemy") {
_x = (Math.random() * 480);
_y = (Math.random() * 270);
}
}
onClipEvent (enterFrame) {
if (_name != "srcEnemy") {
_x = (_x + Vx);
_y = (_y + Vy);
_rotation = (Math.random() * 360);
if ((_x <= 0) || (_x >= 480)) {
Vx = Vx * -1;
}
if ((_y <= 0) || (_y >= 270)) {
Vy = Vy * -1;
}
if (_root.plyr.live == false) {
this.removeMovieClip();
}
}
}
onClipEvent (mouseDown) {
if (_root.beat._currentframe == 1) {
play();
}
}
Frame 320
stop();
score.score.text = ("you survived for " + sec) + " seconds";
_root.kongregateScores.submit(sec);
Symbol 10 MovieClip Frame 1
stop();
Symbol 13 MovieClip Frame 1
stop();
Symbol 21 MovieClip Frame 1
stop();
Symbol 26 Button
on (press) {
_root.sec = 0;
gotoAndPlay (1);
}