Frame 1
with (_root) {
gotoAndPlay(3);
}
Frame 2
stop();
Frame 3
play();
Frame 4
play();
Frame 5
_framesloaded = 36;
if (36) {
nextFrame();
} else {
prevFrame();
}
Frame 6
play();
Frame 38
maxBarWidth = 125;
loadedBytes = getBytesLoaded();
totalBytes = getBytesTotal();
setProperty("loadingBar", _width , (maxBarWidth * loadedBytes) / totalBytes);
if (loadedBytes == totalBytes) {
gotoAndStop (40);
}
play();
Frame 39
prevFrame();
Frame 40
stop();
Frame 41
_root.music = true;
Instance of Symbol 148 MovieClip "MusicButton" in Frame 41
onClipEvent (load) {
if (_root.music == true) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Frame 42
_root.bgLoop.play();
Frame 43
textLevel = "LEVEL 1";
Frame 136
level = 1;
credit = 10;
reward = 10;
x0 = 195;
y0 = 230;
clockRadius = 135;
enemyNumber = 1;
_root.enemy._visible = false;
Instance of Symbol 154 MovieClip "enemy" in Frame 136
onClipEvent (load) {
alive = true;
enemySpeed = 5;
}
onClipEvent (enterFrame) {
if (this._name != "enemy") {
if (this.moving == true) {
x1 = this._x;
y1 = this._y;
enemyRadius = Math.sqrt((((x1 - _root.x0) * (x1 - _root.x0)) + ((y1 - _root.y0) * (y1 - _root.y0))) + (getProperty(this, _height) / 2));
if (_root.clockRadius >= enemyRadius) {
xmov = enemySpeed * Math.sin((Math.PI/180) * this._rotation);
ymov = (-enemySpeed) * Math.cos((Math.PI/180) * this._rotation);
moveLegs = true;
this._x = this._x + xmov;
this._y = this._y + ymov;
} else {
moveLegs = false;
newRotation = (random(25) - 12) * 15;
xmov = enemySpeed * Math.sin((Math.PI/180) * newRotation);
ymov = (-enemySpeed) * Math.cos((Math.PI/180) * newRotation);
x1 = this._x + xmov;
y1 = this._y + ymov;
newEnemyRadius = Math.sqrt((((x1 - _root.x0) * (x1 - _root.x0)) + ((y1 - _root.y0) * (y1 - _root.y0))) + (getProperty(this, _height) / 2));
if (_root.clockRadius >= newEnemyRadius) {
moveLegs = true;
this._rotation = newRotation;
this._x = this._x + xmov;
this._y = this._y + ymov;
}
}
i = 1;
while (_root.enemyNumber >= i) {
k = 1;
while (_root.enemyNumber >= k) {
if (k == i) {
} else if (_root["enemy" + i].head.hitTest(_root["enemy" + k].body)) {
this._rotation = this._rotation - 180;
xmov = enemySpeed * Math.sin((Math.PI/180) * this._rotation);
ymov = (-enemySpeed) * Math.cos((Math.PI/180) * this._rotation);
newYmov = -xmov;
this._x = this._x + ymov;
this._y = this._y + newYmov;
}
k++;
}
i++;
}
if (this.head.hitTest(_root.ant.body) || (this.head.hitTest(_root.ant.head))) {
_root.ant.alive = false;
}
}
if (moveLegs == true) {
this.Play();
} else {
this.Stop();
}
if (((this.alive == false) && (_root.ant.alive == true)) && (tweezers != true)) {
_root.sounds.gotoAndPlay("enemyDie");
tweezers = true;
this.moving = false;
extract = substring(this._name, 6, 1);
tweezerOut = "tweezer" + extract;
_root.attachMovie("tweezerOut", tweezerOut, 90 + extract);
_root[tweezerOut]._x = this._x;
_root[tweezerOut]._y = this._y;
_root[tweezerOut]._rotation = this._rotation;
_root[tweezerOut].enemy = this._name;
}
}
}
Instance of Symbol 161 MovieClip "bgLoop" in Frame 136
onClipEvent (load) {
if (_root.music == false) {
this.stop();
}
}
Instance of Symbol 148 MovieClip "MusicButton" in Frame 136
onClipEvent (load) {
if (_root.music == true) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Frame 137
enemyCount = enemyNumber;
_root.attachMovie("countDown", "countDown", 100);
_root.countDown._x = x0;
_root.countDown._y = y0;
_root.countDown._alpha = 40;
_root.ant._visible = true;
_root.ant.moving = false;
_root.ant._x = x0;
_root.ant._y = y0 + 80;
_root.ant._rotation = 0;
posX1 = x0;
posY1 = 160;
rot1 = 180;
_root.enemy._visible = false;
i = 1;
while (enemyNumber >= i) {
enemy.duplicateMovieClip("enemy" + i, i);
_root["enemy" + i]._visible = true;
_root["enemy" + i].alive = true;
_root["enemy" + i].moveLegs = false;
_root["enemy" + i].moving = false;
_root["enemy" + i]._x = _root["posX" + i];
_root["enemy" + i]._y = _root["posY" + i];
_root["enemy" + i]._rotation = _root["rot" + i];
i++;
}
Instance of Symbol 162 MovieClip "ant" in Frame 137
onClipEvent (load) {
alive = true;
antSpeed = 8;
moveLegs = false;
}
onClipEvent (enterFrame) {
if (Key.isDown(Key.RIGHT) or Key.isDown(65)) {
moveLegs = true;
this._rotation = this._rotation + 15;
} else if (Key.isDown(Key.LEFT) or Key.isDown(68)) {
moveLegs = true;
this._rotation = this._rotation - 15;
}
if (moving == true) {
x1 = this._x;
y1 = this._y;
antRadius = Math.sqrt(((x1 - _root.x0) * (x1 - _root.x0)) + ((y1 - _root.y0) * (y1 - _root.y0))) + (getProperty(this, _height) / 2);
if (_root.clockRadius >= antRadius) {
xmov = antSpeed * Math.sin((Math.PI/180) * this._rotation);
ymov = (-antSpeed) * Math.cos((Math.PI/180) * this._rotation);
if (Key.isDown(Key.UP) or Key.isDown(87)) {
moveLegs = true;
this._x = this._x + xmov;
this._y = this._y + ymov;
} else if (Key.isDown(Key.DOWN) or Key.isDown(83)) {
moveLegs = true;
this._x = this._x - (xmov / 2);
this._y = this._y - (ymov / 2);
}
} else {
ymov = ((antRadius - _root.clockRadius) * (_root.y0 - y1)) / antRadius;
xmov = ((antRadius - _root.clockRadius) * (_root.x0 - x1)) / antRadius;
if (Key.isDown(Key.UP)) {
moveLegs = true;
this._x = this._x + xmov;
this._y = this._y + ymov;
} else if (Key.isDown(Key.DOWN)) {
moveLegs = true;
this._x = this._x + xmov;
this._y = this._y + ymov;
}
}
i = 1;
while (_root.enemyNumber >= i) {
if (this.head.hitTest(_root["enemy" + i].body)) {
if (Key.isDown(Key.UP)) {
moveLegs = true;
this._x = this._x - xmov;
this._y = this._y - ymov;
if (this.alive == true) {
_root["enemy" + i].alive = false;
}
}
} else if (this.body.hitTest(_root["enemy" + i].body)) {
if (Key.isDown(Key.DOWN)) {
moveLegs = true;
this._x = this._x + (xmov + (xmov / 4));
this._y = this._y + (ymov + (ymov / 4));
}
}
i++;
}
}
if (moveLegs == true) {
this.Play();
} else {
this.Stop();
}
if ((this.alive == false) && (dead != true)) {
this.moving = false;
i = 1;
while (_root.enemyNumber >= i) {
_root["enemy" + i].moving = false;
_root["enemy" + i].moveLegs = false;
i++;
}
this._visible = false;
_root.attachMovie("deadAnt", "deadAnt", 90);
_root.deadAnt._x = this._x;
_root.deadAnt._y = this._y;
_root.deadAnt._rotation = this._rotation;
dead = true;
}
if (((_root.enemyCount == 0) && (this.alive == true)) && (won != true)) {
_root.ant.moving = false;
_root.attachMovie("youWon", "youWon", 100);
_root.youWon._x = _root.x0;
_root.youWon._y = _root.y0;
_root.youWon.play();
won = true;
}
}
onClipEvent (keyUp) {
moveLegs = false;
}
Frame 138
stop();
Frame 143
textLevel = "LEVEL 2";
Instance of Symbol 148 MovieClip "MusicButton" in Frame 143
onClipEvent (load) {
if (_root.music == true) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Frame 238
level = 2;
reward = 20;
enemyNumber = 2;
_root.enemy._visible = false;
Instance of Symbol 164 MovieClip "enemy" in Frame 238
onClipEvent (load) {
alive = true;
enemySpeed = random(2) + 5;
}
onClipEvent (enterFrame) {
if (this._name != "enemy") {
if (this.moving == true) {
x1 = this._x;
y1 = this._y;
enemyRadius = Math.sqrt((((x1 - _root.x0) * (x1 - _root.x0)) + ((y1 - _root.y0) * (y1 - _root.y0))) + (getProperty(this, _height) / 2));
if (_root.clockRadius >= enemyRadius) {
xmov = enemySpeed * Math.sin((Math.PI/180) * this._rotation);
ymov = (-enemySpeed) * Math.cos((Math.PI/180) * this._rotation);
moveLegs = true;
this._x = this._x + xmov;
this._y = this._y + ymov;
} else {
moveLegs = false;
newRotation = (random(25) - 12) * 15;
xmov = enemySpeed * Math.sin((Math.PI/180) * newRotation);
ymov = (-enemySpeed) * Math.cos((Math.PI/180) * newRotation);
x1 = this._x + xmov;
y1 = this._y + ymov;
newEnemyRadius = Math.sqrt((((x1 - _root.x0) * (x1 - _root.x0)) + ((y1 - _root.y0) * (y1 - _root.y0))) + (getProperty(this, _height) / 2));
if (_root.clockRadius >= newEnemyRadius) {
moveLegs = true;
this._rotation = newRotation;
this._x = this._x + xmov;
this._y = this._y + ymov;
}
}
i = 1;
while (_root.enemyNumber >= i) {
k = 1;
while (_root.enemyNumber >= k) {
if (k == i) {
} else if (_root["enemy" + i].head.hitTest(_root["enemy" + k].body)) {
this._rotation = this._rotation - 180;
xmov = enemySpeed * Math.sin((Math.PI/180) * this._rotation);
ymov = (-enemySpeed) * Math.cos((Math.PI/180) * this._rotation);
newYmov = -xmov;
this._x = this._x + ymov;
this._y = this._y + newYmov;
}
k++;
}
i++;
}
if (this.head.hitTest(_root.ant.body) || (this.head.hitTest(_root.ant.head))) {
_root.ant.alive = false;
}
}
if (moveLegs == true) {
this.Play();
} else {
this.Stop();
}
if (((this.alive == false) && (_root.ant.alive == true)) && (tweezers != true)) {
_root.sounds.gotoAndPlay("enemyDie");
tweezers = true;
this.moving = false;
extract = substring(this._name, 6, 1);
tweezerOut = "tweezer" + extract;
_root.attachMovie("tweezerOut", tweezerOut, 90 + extract);
_root[tweezerOut]._x = this._x;
_root[tweezerOut]._y = this._y;
_root[tweezerOut]._rotation = this._rotation;
_root[tweezerOut].enemy = this._name;
}
}
}
Instance of Symbol 161 MovieClip "bgLoop" in Frame 238
onClipEvent (load) {
if (_root.music == false) {
this.stop();
}
}
Instance of Symbol 148 MovieClip "MusicButton" in Frame 238
onClipEvent (load) {
if (_root.music == true) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Frame 239
enemyCount = enemyNumber;
_root.attachMovie("countDown", "countDown", 100);
_root.countDown._x = x0;
_root.countDown._y = y0;
_root.countDown._alpha = 40;
_root.ant._visible = true;
_root.ant.moving = false;
_root.ant._x = x0;
_root.ant._y = y0 + 80;
_root.ant._rotation = 0;
posX1 = x0 - 75;
posY1 = 180;
rot1 = 150;
posX2 = x0 + 75;
posY2 = 180;
rot2 = -150;
_root.enemy._visible = false;
i = 1;
while (enemyNumber >= i) {
enemy.duplicateMovieClip("enemy" + i, i);
_root["enemy" + i]._visible = true;
_root["enemy" + i].alive = true;
_root["enemy" + i].moveLegs = false;
_root["enemy" + i].moving = false;
_root["enemy" + i]._x = _root["posX" + i];
_root["enemy" + i]._y = _root["posY" + i];
_root["enemy" + i]._rotation = _root["rot" + i];
i++;
}
Instance of Symbol 162 MovieClip "ant" in Frame 239
onClipEvent (load) {
alive = true;
antSpeed = 8;
moveLegs = false;
}
onClipEvent (enterFrame) {
if (Key.isDown(Key.RIGHT) or Key.isDown(65)) {
moveLegs = true;
this._rotation = this._rotation + 15;
} else if (Key.isDown(Key.LEFT) or Key.isDown(68)) {
moveLegs = true;
this._rotation = this._rotation - 15;
}
if (moving == true) {
x1 = this._x;
y1 = this._y;
antRadius = Math.sqrt(((x1 - _root.x0) * (x1 - _root.x0)) + ((y1 - _root.y0) * (y1 - _root.y0))) + (getProperty(this, _height) / 2);
if (_root.clockRadius >= antRadius) {
xmov = antSpeed * Math.sin((Math.PI/180) * this._rotation);
ymov = (-antSpeed) * Math.cos((Math.PI/180) * this._rotation);
if (Key.isDown(Key.UP) or Key.isDown(87)) {
moveLegs = true;
this._x = this._x + xmov;
this._y = this._y + ymov;
} else if (Key.isDown(Key.DOWN) or Key.isDown(83)) {
moveLegs = true;
this._x = this._x - (xmov / 2);
this._y = this._y - (ymov / 2);
}
} else {
ymov = ((antRadius - _root.clockRadius) * (_root.y0 - y1)) / antRadius;
xmov = ((antRadius - _root.clockRadius) * (_root.x0 - x1)) / antRadius;
if (Key.isDown(Key.UP)) {
moveLegs = true;
this._x = this._x + xmov;
this._y = this._y + ymov;
} else if (Key.isDown(Key.DOWN)) {
moveLegs = true;
this._x = this._x + xmov;
this._y = this._y + ymov;
}
}
i = 1;
while (_root.enemyNumber >= i) {
if (this.head.hitTest(_root["enemy" + i].body)) {
if (Key.isDown(Key.UP)) {
moveLegs = true;
this._x = this._x - xmov;
this._y = this._y - ymov;
if (this.alive == true) {
_root["enemy" + i].alive = false;
}
}
} else if (this.body.hitTest(_root["enemy" + i].body)) {
if (Key.isDown(Key.DOWN)) {
moveLegs = true;
this._x = this._x + (xmov + (xmov / 4));
this._y = this._y + (ymov + (ymov / 4));
}
}
i++;
}
}
if (moveLegs == true) {
this.Play();
} else {
this.Stop();
}
if ((this.alive == false) && (dead != true)) {
this.moving = false;
i = 1;
while (_root.enemyNumber >= i) {
_root["enemy" + i].moving = false;
_root["enemy" + i].moveLegs = false;
i++;
}
this._visible = false;
_root.attachMovie("deadAnt", "deadAnt", 90);
_root.deadAnt._x = this._x;
_root.deadAnt._y = this._y;
_root.deadAnt._rotation = this._rotation;
dead = true;
}
if (((_root.enemyCount == 0) && (this.alive == true)) && (won != true)) {
_root.ant.moving = false;
_root.attachMovie("youWon", "youWon", 100);
_root.youWon._x = _root.x0;
_root.youWon._y = _root.y0;
_root.youWon.play();
won = true;
}
}
onClipEvent (keyUp) {
moveLegs = false;
}
Frame 240
stop();
Frame 245
textLevel = "LEVEL 3";
Instance of Symbol 148 MovieClip "MusicButton" in Frame 245
onClipEvent (load) {
if (_root.music == true) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Frame 340
level = 3;
reward = 30;
enemyNumber = 3;
_root.enemy._visible = false;
Instance of Symbol 164 MovieClip "enemy" in Frame 340
onClipEvent (load) {
alive = true;
enemySpeed = random(2) + 5;
}
onClipEvent (enterFrame) {
if (this._name != "enemy") {
if (this.moving == true) {
x1 = this._x;
y1 = this._y;
enemyRadius = Math.sqrt((((x1 - _root.x0) * (x1 - _root.x0)) + ((y1 - _root.y0) * (y1 - _root.y0))) + (getProperty(this, _height) / 2));
if (_root.clockRadius >= enemyRadius) {
xmov = enemySpeed * Math.sin((Math.PI/180) * this._rotation);
ymov = (-enemySpeed) * Math.cos((Math.PI/180) * this._rotation);
moveLegs = true;
this._x = this._x + xmov;
this._y = this._y + ymov;
} else {
moveLegs = false;
newRotation = (random(25) - 12) * 15;
xmov = enemySpeed * Math.sin((Math.PI/180) * newRotation);
ymov = (-enemySpeed) * Math.cos((Math.PI/180) * newRotation);
x1 = this._x + xmov;
y1 = this._y + ymov;
newEnemyRadius = Math.sqrt((((x1 - _root.x0) * (x1 - _root.x0)) + ((y1 - _root.y0) * (y1 - _root.y0))) + (getProperty(this, _height) / 2));
if (_root.clockRadius >= newEnemyRadius) {
moveLegs = true;
this._rotation = newRotation;
this._x = this._x + xmov;
this._y = this._y + ymov;
}
}
i = 1;
while (_root.enemyNumber >= i) {
k = 1;
while (_root.enemyNumber >= k) {
if (k == i) {
} else if (_root["enemy" + i].head.hitTest(_root["enemy" + k].body)) {
this._rotation = this._rotation - 180;
xmov = enemySpeed * Math.sin((Math.PI/180) * this._rotation);
ymov = (-enemySpeed) * Math.cos((Math.PI/180) * this._rotation);
newYmov = -xmov;
this._x = this._x + ymov;
this._y = this._y + newYmov;
}
k++;
}
i++;
}
if (this.head.hitTest(_root.ant.body) || (this.head.hitTest(_root.ant.head))) {
_root.ant.alive = false;
}
}
if (moveLegs == true) {
this.Play();
} else {
this.Stop();
}
if (((this.alive == false) && (_root.ant.alive == true)) && (tweezers != true)) {
_root.sounds.gotoAndPlay("enemyDie");
tweezers = true;
this.moving = false;
extract = substring(this._name, 6, 1);
tweezerOut = "tweezer" + extract;
_root.attachMovie("tweezerOut", tweezerOut, 90 + extract);
_root[tweezerOut]._x = this._x;
_root[tweezerOut]._y = this._y;
_root[tweezerOut]._rotation = this._rotation;
_root[tweezerOut].enemy = this._name;
}
}
}
Instance of Symbol 161 MovieClip "bgLoop" in Frame 340
onClipEvent (load) {
if (_root.music == false) {
this.stop();
}
}
Instance of Symbol 148 MovieClip "MusicButton" in Frame 340
onClipEvent (load) {
if (_root.music == true) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Frame 341
enemyCount = enemyNumber;
_root.attachMovie("countDown", "countDown", 100);
_root.countDown._x = x0;
_root.countDown._y = y0;
_root.countDown._alpha = 40;
_root.ant._visible = true;
_root.ant.moving = false;
_root.ant._x = x0;
_root.ant._y = y0 + 80;
_root.ant._rotation = 0;
posX1 = x0;
posY1 = 160;
rot1 = 180;
posX2 = x0 - 75;
posY2 = 180;
rot2 = 150;
posX3 = x0 + 75;
posY3 = 180;
rot3 = -150;
_root.enemy._visible = false;
i = 1;
while (enemyNumber >= i) {
enemy.duplicateMovieClip("enemy" + i, i);
_root["enemy" + i]._visible = true;
_root["enemy" + i].alive = true;
_root["enemy" + i].moveLegs = false;
_root["enemy" + i].moving = false;
_root["enemy" + i]._x = _root["posX" + i];
_root["enemy" + i]._y = _root["posY" + i];
_root["enemy" + i]._rotation = _root["rot" + i];
i++;
}
Instance of Symbol 162 MovieClip "ant" in Frame 341
onClipEvent (load) {
alive = true;
antSpeed = 8;
moveLegs = false;
}
onClipEvent (enterFrame) {
if (Key.isDown(Key.RIGHT) or Key.isDown(65)) {
moveLegs = true;
this._rotation = this._rotation + 15;
} else if (Key.isDown(Key.LEFT) or Key.isDown(68)) {
moveLegs = true;
this._rotation = this._rotation - 15;
}
if (moving == true) {
x1 = this._x;
y1 = this._y;
antRadius = Math.sqrt(((x1 - _root.x0) * (x1 - _root.x0)) + ((y1 - _root.y0) * (y1 - _root.y0))) + (getProperty(this, _height) / 2);
if (_root.clockRadius >= antRadius) {
xmov = antSpeed * Math.sin((Math.PI/180) * this._rotation);
ymov = (-antSpeed) * Math.cos((Math.PI/180) * this._rotation);
if (Key.isDown(Key.UP) or Key.isDown(87)) {
moveLegs = true;
this._x = this._x + xmov;
this._y = this._y + ymov;
} else if (Key.isDown(Key.DOWN) or Key.isDown(83)) {
moveLegs = true;
this._x = this._x - (xmov / 2);
this._y = this._y - (ymov / 2);
}
} else {
ymov = ((antRadius - _root.clockRadius) * (_root.y0 - y1)) / antRadius;
xmov = ((antRadius - _root.clockRadius) * (_root.x0 - x1)) / antRadius;
if (Key.isDown(Key.UP)) {
moveLegs = true;
this._x = this._x + xmov;
this._y = this._y + ymov;
} else if (Key.isDown(Key.DOWN)) {
moveLegs = true;
this._x = this._x + xmov;
this._y = this._y + ymov;
}
}
i = 1;
while (_root.enemyNumber >= i) {
if (this.head.hitTest(_root["enemy" + i].body)) {
if (Key.isDown(Key.UP)) {
moveLegs = true;
this._x = this._x - xmov;
this._y = this._y - ymov;
if (this.alive == true) {
_root["enemy" + i].alive = false;
}
}
} else if (this.body.hitTest(_root["enemy" + i].body)) {
if (Key.isDown(Key.DOWN)) {
moveLegs = true;
this._x = this._x + (xmov + (xmov / 4));
this._y = this._y + (ymov + (ymov / 4));
}
}
i++;
}
}
if (moveLegs == true) {
this.Play();
} else {
this.Stop();
}
if ((this.alive == false) && (dead != true)) {
this.moving = false;
i = 1;
while (_root.enemyNumber >= i) {
_root["enemy" + i].moving = false;
_root["enemy" + i].moveLegs = false;
i++;
}
this._visible = false;
_root.attachMovie("deadAnt", "deadAnt", 90);
_root.deadAnt._x = this._x;
_root.deadAnt._y = this._y;
_root.deadAnt._rotation = this._rotation;
dead = true;
}
if (((_root.enemyCount == 0) && (this.alive == true)) && (won != true)) {
_root.ant.moving = false;
_root.attachMovie("youWon", "youWon", 100);
_root.youWon._x = _root.x0;
_root.youWon._y = _root.y0;
_root.youWon.play();
won = true;
}
}
onClipEvent (keyUp) {
moveLegs = false;
}
Frame 342
stop();
Frame 347
textLevel = "LEVEL 4";
Instance of Symbol 148 MovieClip "MusicButton" in Frame 347
onClipEvent (load) {
if (_root.music == true) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Frame 442
level = 4;
reward = 40;
enemyNumber = 4;
_root.enemy._visible = false;
Instance of Symbol 164 MovieClip "enemy" in Frame 442
onClipEvent (load) {
alive = true;
enemySpeed = random(2) + 5;
}
onClipEvent (enterFrame) {
if (this._name != "enemy") {
if (this.moving == true) {
x1 = this._x;
y1 = this._y;
enemyRadius = Math.sqrt((((x1 - _root.x0) * (x1 - _root.x0)) + ((y1 - _root.y0) * (y1 - _root.y0))) + (getProperty(this, _height) / 2));
if (_root.clockRadius >= enemyRadius) {
xmov = enemySpeed * Math.sin((Math.PI/180) * this._rotation);
ymov = (-enemySpeed) * Math.cos((Math.PI/180) * this._rotation);
moveLegs = true;
this._x = this._x + xmov;
this._y = this._y + ymov;
} else {
moveLegs = false;
newRotation = (random(25) - 12) * 15;
xmov = enemySpeed * Math.sin((Math.PI/180) * newRotation);
ymov = (-enemySpeed) * Math.cos((Math.PI/180) * newRotation);
x1 = this._x + xmov;
y1 = this._y + ymov;
newEnemyRadius = Math.sqrt((((x1 - _root.x0) * (x1 - _root.x0)) + ((y1 - _root.y0) * (y1 - _root.y0))) + (getProperty(this, _height) / 2));
if (_root.clockRadius >= newEnemyRadius) {
moveLegs = true;
this._rotation = newRotation;
this._x = this._x + xmov;
this._y = this._y + ymov;
}
}
i = 1;
while (_root.enemyNumber >= i) {
k = 1;
while (_root.enemyNumber >= k) {
if (k == i) {
} else if (_root["enemy" + i].head.hitTest(_root["enemy" + k].body)) {
this._rotation = this._rotation - 180;
xmov = enemySpeed * Math.sin((Math.PI/180) * this._rotation);
ymov = (-enemySpeed) * Math.cos((Math.PI/180) * this._rotation);
newYmov = -xmov;
this._x = this._x + ymov;
this._y = this._y + newYmov;
}
k++;
}
i++;
}
if (this.head.hitTest(_root.ant.body) || (this.head.hitTest(_root.ant.head))) {
_root.ant.alive = false;
}
}
if (moveLegs == true) {
this.Play();
} else {
this.Stop();
}
if (((this.alive == false) && (_root.ant.alive == true)) && (tweezers != true)) {
_root.sounds.gotoAndPlay("enemyDie");
tweezers = true;
this.moving = false;
extract = substring(this._name, 6, 1);
tweezerOut = "tweezer" + extract;
_root.attachMovie("tweezerOut", tweezerOut, 90 + extract);
_root[tweezerOut]._x = this._x;
_root[tweezerOut]._y = this._y;
_root[tweezerOut]._rotation = this._rotation;
_root[tweezerOut].enemy = this._name;
}
}
}
Instance of Symbol 161 MovieClip "bgLoop" in Frame 442
onClipEvent (load) {
if (_root.music == false) {
this.stop();
}
}
Instance of Symbol 148 MovieClip "MusicButton" in Frame 442
onClipEvent (load) {
if (_root.music == true) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Frame 443
enemyCount = enemyNumber;
_root.attachMovie("countDown", "countDown", 100);
_root.countDown._x = x0;
_root.countDown._y = y0;
_root.countDown._alpha = 40;
_root.ant._visible = true;
_root.ant.moving = false;
_root.ant._x = x0;
_root.ant._y = y0 + 80;
_root.ant._rotation = 0;
posX1 = x0 - 85;
posY1 = 200;
rot1 = 135;
posX2 = x0 + 85;
posY2 = 200;
rot2 = -135;
posX3 = x0 - 35;
posY3 = 160;
rot3 = 165;
posX4 = x0 + 35;
posY4 = 160;
rot4 = -165;
_root.enemy._visible = false;
i = 1;
while (enemyNumber >= i) {
enemy.duplicateMovieClip("enemy" + i, i);
_root["enemy" + i]._visible = true;
_root["enemy" + i].alive = true;
_root["enemy" + i].moveLegs = false;
_root["enemy" + i].moving = false;
_root["enemy" + i]._x = _root["posX" + i];
_root["enemy" + i]._y = _root["posY" + i];
_root["enemy" + i]._rotation = _root["rot" + i];
i++;
}
Instance of Symbol 162 MovieClip "ant" in Frame 443
onClipEvent (load) {
alive = true;
antSpeed = 8;
moveLegs = false;
}
onClipEvent (enterFrame) {
if (Key.isDown(Key.RIGHT) or Key.isDown(65)) {
moveLegs = true;
this._rotation = this._rotation + 15;
} else if (Key.isDown(Key.LEFT) or Key.isDown(68)) {
moveLegs = true;
this._rotation = this._rotation - 15;
}
if (moving == true) {
x1 = this._x;
y1 = this._y;
antRadius = Math.sqrt(((x1 - _root.x0) * (x1 - _root.x0)) + ((y1 - _root.y0) * (y1 - _root.y0))) + (getProperty(this, _height) / 2);
if (_root.clockRadius >= antRadius) {
xmov = antSpeed * Math.sin((Math.PI/180) * this._rotation);
ymov = (-antSpeed) * Math.cos((Math.PI/180) * this._rotation);
if (Key.isDown(Key.UP) or Key.isDown(87)) {
moveLegs = true;
this._x = this._x + xmov;
this._y = this._y + ymov;
} else if (Key.isDown(Key.DOWN) or Key.isDown(83)) {
moveLegs = true;
this._x = this._x - (xmov / 2);
this._y = this._y - (ymov / 2);
}
} else {
ymov = ((antRadius - _root.clockRadius) * (_root.y0 - y1)) / antRadius;
xmov = ((antRadius - _root.clockRadius) * (_root.x0 - x1)) / antRadius;
if (Key.isDown(Key.UP)) {
moveLegs = true;
this._x = this._x + xmov;
this._y = this._y + ymov;
} else if (Key.isDown(Key.DOWN)) {
moveLegs = true;
this._x = this._x + xmov;
this._y = this._y + ymov;
}
}
i = 1;
while (_root.enemyNumber >= i) {
if (this.head.hitTest(_root["enemy" + i].body)) {
if (Key.isDown(Key.UP)) {
moveLegs = true;
this._x = this._x - xmov;
this._y = this._y - ymov;
if (this.alive == true) {
_root["enemy" + i].alive = false;
}
}
} else if (this.body.hitTest(_root["enemy" + i].body)) {
if (Key.isDown(Key.DOWN)) {
moveLegs = true;
this._x = this._x + (xmov + (xmov / 4));
this._y = this._y + (ymov + (ymov / 4));
}
}
i++;
}
}
if (moveLegs == true) {
this.Play();
} else {
this.Stop();
}
if ((this.alive == false) && (dead != true)) {
this.moving = false;
i = 1;
while (_root.enemyNumber >= i) {
_root["enemy" + i].moving = false;
_root["enemy" + i].moveLegs = false;
i++;
}
this._visible = false;
_root.attachMovie("deadAnt", "deadAnt", 90);
_root.deadAnt._x = this._x;
_root.deadAnt._y = this._y;
_root.deadAnt._rotation = this._rotation;
dead = true;
}
if (((_root.enemyCount == 0) && (this.alive == true)) && (won != true)) {
_root.ant.moving = false;
_root.attachMovie("youWon", "youWon", 100);
_root.youWon._x = _root.x0;
_root.youWon._y = _root.y0;
_root.youWon.play();
won = true;
}
}
onClipEvent (keyUp) {
moveLegs = false;
}
Frame 444
stop();
Frame 449
textLevel = "LEVEL 5";
Instance of Symbol 148 MovieClip "MusicButton" in Frame 449
onClipEvent (load) {
if (_root.music == true) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Frame 544
level = 5;
reward = 50;
enemyNumber = 5;
_root.enemy._visible = false;
Instance of Symbol 164 MovieClip "enemy" in Frame 544
onClipEvent (load) {
alive = true;
enemySpeed = random(2) + 5;
}
onClipEvent (enterFrame) {
if (this._name != "enemy") {
if (this.moving == true) {
x1 = this._x;
y1 = this._y;
enemyRadius = Math.sqrt((((x1 - _root.x0) * (x1 - _root.x0)) + ((y1 - _root.y0) * (y1 - _root.y0))) + (getProperty(this, _height) / 2));
if (_root.clockRadius >= enemyRadius) {
xmov = enemySpeed * Math.sin((Math.PI/180) * this._rotation);
ymov = (-enemySpeed) * Math.cos((Math.PI/180) * this._rotation);
moveLegs = true;
this._x = this._x + xmov;
this._y = this._y + ymov;
} else {
moveLegs = false;
newRotation = (random(25) - 12) * 15;
xmov = enemySpeed * Math.sin((Math.PI/180) * newRotation);
ymov = (-enemySpeed) * Math.cos((Math.PI/180) * newRotation);
x1 = this._x + xmov;
y1 = this._y + ymov;
newEnemyRadius = Math.sqrt((((x1 - _root.x0) * (x1 - _root.x0)) + ((y1 - _root.y0) * (y1 - _root.y0))) + (getProperty(this, _height) / 2));
if (_root.clockRadius >= newEnemyRadius) {
moveLegs = true;
this._rotation = newRotation;
this._x = this._x + xmov;
this._y = this._y + ymov;
}
}
i = 1;
while (_root.enemyNumber >= i) {
k = 1;
while (_root.enemyNumber >= k) {
if (k == i) {
} else if (_root["enemy" + i].head.hitTest(_root["enemy" + k].body)) {
this._rotation = this._rotation - 180;
xmov = enemySpeed * Math.sin((Math.PI/180) * this._rotation);
ymov = (-enemySpeed) * Math.cos((Math.PI/180) * this._rotation);
newYmov = -xmov;
this._x = this._x + ymov;
this._y = this._y + newYmov;
}
k++;
}
i++;
}
if (this.head.hitTest(_root.ant.body) || (this.head.hitTest(_root.ant.head))) {
_root.ant.alive = false;
}
}
if (moveLegs == true) {
this.Play();
} else {
this.Stop();
}
if (((this.alive == false) && (_root.ant.alive == true)) && (tweezers != true)) {
_root.sounds.gotoAndPlay("enemyDie");
tweezers = true;
this.moving = false;
extract = substring(this._name, 6, 1);
tweezerOut = "tweezer" + extract;
_root.attachMovie("tweezerOut", tweezerOut, 90 + extract);
_root[tweezerOut]._x = this._x;
_root[tweezerOut]._y = this._y;
_root[tweezerOut]._rotation = this._rotation;
_root[tweezerOut].enemy = this._name;
}
}
}
Instance of Symbol 161 MovieClip "bgLoop" in Frame 544
onClipEvent (load) {
if (_root.music == false) {
this.stop();
}
}
Instance of Symbol 148 MovieClip "MusicButton" in Frame 544
onClipEvent (load) {
if (_root.music == true) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Frame 545
enemyCount = enemyNumber;
_root.attachMovie("countDown", "countDown", 100);
_root.countDown._x = x0;
_root.countDown._y = y0;
_root.countDown._alpha = 40;
_root.ant._visible = true;
_root.ant.moving = false;
_root.ant._x = x0;
_root.ant._y = y0 + 80;
_root.ant._rotation = 0;
posX1 = x0;
posY1 = 140;
rot1 = 180;
posX2 = x0 - 85;
posY2 = 200;
rot2 = 135;
posX3 = x0 + 85;
posY3 = 200;
rot3 = -135;
posX4 = x0 - 35;
posY4 = 160;
rot4 = 165;
posX5 = x0 + 35;
posY5 = 160;
rot5 = -165;
_root.enemy._visible = false;
i = 1;
while (enemyNumber >= i) {
enemy.duplicateMovieClip("enemy" + i, i);
_root["enemy" + i]._visible = true;
_root["enemy" + i].alive = true;
_root["enemy" + i].moveLegs = false;
_root["enemy" + i].moving = false;
_root["enemy" + i]._x = _root["posX" + i];
_root["enemy" + i]._y = _root["posY" + i];
_root["enemy" + i]._rotation = _root["rot" + i];
i++;
}
Instance of Symbol 172 MovieClip "ant" in Frame 545
onClipEvent (load) {
alive = true;
antSpeed = 8;
moveLegs = false;
}
onClipEvent (enterFrame) {
if (Key.isDown(Key.RIGHT) or Key.isDown(65)) {
moveLegs = true;
this._rotation = this._rotation + 15;
} else if (Key.isDown(Key.LEFT) or Key.isDown(68)) {
moveLegs = true;
this._rotation = this._rotation - 15;
}
if (moving == true) {
x1 = this._x;
y1 = this._y;
antRadius = Math.sqrt(((x1 - _root.x0) * (x1 - _root.x0)) + ((y1 - _root.y0) * (y1 - _root.y0))) + (getProperty(this, _height) / 2);
if (_root.clockRadius >= antRadius) {
xmov = antSpeed * Math.sin((Math.PI/180) * this._rotation);
ymov = (-antSpeed) * Math.cos((Math.PI/180) * this._rotation);
if (Key.isDown(Key.UP) or Key.isDown(87)) {
moveLegs = true;
this._x = this._x + xmov;
this._y = this._y + ymov;
} else if (Key.isDown(Key.DOWN) or Key.isDown(83)) {
moveLegs = true;
this._x = this._x - (xmov / 2);
this._y = this._y - (ymov / 2);
}
} else {
ymov = ((antRadius - _root.clockRadius) * (_root.y0 - y1)) / antRadius;
xmov = ((antRadius - _root.clockRadius) * (_root.x0 - x1)) / antRadius;
if (Key.isDown(Key.UP)) {
moveLegs = true;
this._x = this._x + xmov;
this._y = this._y + ymov;
} else if (Key.isDown(Key.DOWN)) {
moveLegs = true;
this._x = this._x + xmov;
this._y = this._y + ymov;
}
}
i = 1;
while (_root.enemyNumber >= i) {
if (this.head.hitTest(_root["enemy" + i].body)) {
if (Key.isDown(Key.UP)) {
moveLegs = true;
this._x = this._x - xmov;
this._y = this._y - ymov;
if (this.alive == true) {
_root["enemy" + i].alive = false;
}
}
} else if (this.body.hitTest(_root["enemy" + i].body)) {
if (Key.isDown(Key.DOWN)) {
moveLegs = true;
this._x = this._x + (xmov + (xmov / 4));
this._y = this._y + (ymov + (ymov / 4));
}
}
i++;
}
}
if (moveLegs == true) {
this.Play();
} else {
this.Stop();
}
if ((this.alive == false) && (dead != true)) {
this.moving = false;
i = 1;
while (_root.enemyNumber >= i) {
_root["enemy" + i].moving = false;
_root["enemy" + i].moveLegs = false;
i++;
}
this._visible = false;
_root.attachMovie("deadAnt", "deadAnt", 90);
_root.deadAnt._x = this._x;
_root.deadAnt._y = this._y;
_root.deadAnt._rotation = this._rotation;
dead = true;
}
if (((_root.enemyCount == 0) && (this.alive == true)) && (won != true)) {
_root.ant.moving = false;
_root.attachMovie("hiScorer", "hiScorer", 100);
_root.hiScorer._x = _root.x0;
_root.hiScorer._y = _root.y0;
_root.hiScorer.play();
won = true;
}
}
onClipEvent (keyUp) {
moveLegs = false;
}
Frame 546
stop();
Frame 547
stop();
Frame 586
stop();
Instance of Symbol 201 MovieClip "badgets" in Frame 598
onClipEvent (load) {
this.gotoAndStop(_root.icon);
}
Frame 643
if (see_scores == true) {
scoreKeeper.gotoAndStop(2);
}
stop();
Instance of Symbol 232 MovieClip "scoreKeeper" in Frame 643
onClipEvent (load) {
sk_url = "http://www.seethru.co.uk/cgi-bin/games/sk.pl";
script_timeout = 10;
game_title = "Ants Arena";
game_author = "Leandro Barreto";
my_name = "";
attempt_to_collect_name = 1;
my_score = "_root.credit";
additional_data_name = new array();
additional_data_name["0"] = "";
additional_data_name["1"] = "";
additional_data_name["2"] = "";
additional_data_name["3"] = "";
additional_data_name["4"] = "";
additional_data_name["5"] = "";
additional_data = new array();
additional_data["0"] = "";
additional_data["1"] = "";
additional_data["2"] = "";
additional_data["3"] = "";
additional_data["4"] = "";
additional_data["5"] = "";
scores_to_return = 100;
scores_per_person = 5;
anonymous_name = "Anonymous";
sort_scores_in_reverse = "";
}
Symbol 15 MovieClip Frame 1
if (_root.enemyCount == 0) {
stop();
}
Symbol 18 MovieClip [tweezerOut] Frame 7
removeMovieClip("_root." + enemy);
_root.enemyCount = _root.enemyCount - 1;
Symbol 18 MovieClip [tweezerOut] Frame 15
removeMovieClip(this);
Symbol 25 MovieClip [deadAnt] Frame 14
if (_root.credit == 0) {
_root.attachMovie("noCredit", "noCredit", 100);
_root.noCredit._x = _root.x0;
_root.noCredit._y = _root.y0;
} else {
_root.attachMovie("youDied", "youDied", 100);
_root.youDied._x = _root.x0;
_root.youDied._y = _root.y0;
}
stop();
Symbol 40 MovieClip [hiScorer] Frame 50
_root.credit = _root.credit + _root.reward;
totalCredit = _root.credit / 100;
_root.play();
Symbol 40 MovieClip [hiScorer] Frame 105
_root.play();
removeMovieClip(this);
Symbol 49 MovieClip [youWon] Frame 60
_root.credit = _root.credit + _root.reward;
_root.play();
removeMovieClip(this);
Symbol 65 Button
on (release, keyPress "<Enter>") {
removeMovieClip(_root.deadAnt);
i = 1;
while (_root.enemyNumber >= i) {
if (_root["enemy" + i]) {
removeMovieClip(_root["enemy" + i]);
}
i++;
}
_root.gotoAndPlay("restart");
removeMovieClip(this);
}
Symbol 73 Button
on (release) {
removeMovieClip(_root.deadAnt);
i = 1;
while (_root.enemyNumber >= i) {
if (_root["enemy" + i]) {
removeMovieClip(_root["enemy" + i]);
}
i++;
}
_root.credit = null;
_root.see_scores = true;
_root.gotoAndStop("sk");
removeMovieClip(this);
}
Symbol 74 MovieClip [noCredit] Frame 51
stop();
Symbol 84 Button
on (release, keyPress "<Enter>") {
_root.credit = _root.credit - 5;
_root.attachMovie("hands", "hands", 110);
removeMovieClip(this);
}
Symbol 93 MovieClip [hands] Frame 1
deadAnt = true;
flag = false;
k = 1;
while (_root.enemyNumber >= k) {
if ((_root["enemy" + k].alive == true) && (flag == false)) {
flag = true;
e = k;
}
k++;
}
Symbol 93 MovieClip [hands] Frame 2
if (_root.enemyNumber >= e) {
this._x = _root["enemy" + e]._x;
this._y = _root["enemy" + e]._y;
} else {
this._x = _root.deadAnt._x;
this._y = _root.deadAnt._y;
}
Symbol 93 MovieClip [hands] Frame 8
if (_root.enemyNumber < e) {
gotoAndPlay (16);
}
Symbol 93 MovieClip [hands] Frame 16
if (_root.enemyNumber >= e) {
removeMovieClip(_root["enemy" + e]);
} else {
deadAnt = false;
removeMovieClip(_root.deadAnt);
}
Symbol 93 MovieClip [hands] Frame 22
oldE = e;
flag = false;
k = e + 1;
while (_root.enemyNumber >= k) {
if ((_root["enemy" + k].alive == true) && (flag == false)) {
flag = true;
e = k;
}
k++;
}
if (e == oldE) {
e = _root.enemyNumber + 1;
}
if (deadAnt) {
gotoAndPlay (2);
} else {
_root.ant.dead = false;
_root.ant.alive = true;
_root.gotoAndPlay("start" + _root.level);
removeMovieClip(this);
}
Symbol 100 MovieClip [countDown] Frame 1
_root.bgSound.play();
Symbol 100 MovieClip [countDown] Frame 35
k = 1;
while (_root.enemyNumber >= k) {
_root["enemy" + k].moving = true;
k++;
}
_root.ant.moving = true;
removeMovieClip(this);
Symbol 107 Button
on (release) {
getURL ("http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash");
}
Symbol 127 Button
on (release, keyPress "<Enter>") {
play();
}
Symbol 137 MovieClip Frame 1
stop();
Symbol 137 MovieClip Frame 21
gotoAndStop (1);
Symbol 142 Button
on (release) {
_root.music = false;
stopAllSounds();
play();
}
Symbol 147 Button
on (release) {
_root.music = true;
_root.bgLoop.play();
play();
}
Symbol 148 MovieClip Frame 1
stop();
Symbol 148 MovieClip Frame 2
stop();
Symbol 152 MovieClip Frame 84
stop();
Symbol 153 MovieClip Frame 1
text = _root.TextLevel;
i = 1;
max = length(text);
kerning = "55";
size = "20";
setProperty("char", _visible , "0");
Symbol 153 MovieClip Frame 2
duplicateMovieClip ("char", "char" + i, i);
Set(("_root.lettering.char" + i) + ".letter.char", substring(text, i, 1));
setProperty("_root.lettering.char" + i, _x , i * kerning);
setProperty("_root.lettering.char" + i, _xscale , 10 * size);
setProperty("_root.lettering.char" + i, _yscale , 10 * size);
i = i + 1;
Symbol 153 MovieClip Frame 3
if (max < i) {
stop();
} else {
gotoAndPlay (2);
}
Symbol 154 MovieClip Frame 1
if (_root.enemyCount == 0) {
stop();
}
Symbol 160 MovieClip Frame 1
stop();
Symbol 160 MovieClip Frame 21
gotoAndStop (1);
Symbol 161 MovieClip Frame 1
stop();
Symbol 161 MovieClip Frame 21
gotoAndStop (1);
Symbol 162 MovieClip Frame 1
if (_root.enemyCount == 0) {
stop();
}
Symbol 164 MovieClip Frame 1
if (_root.enemyCount == 0) {
stop();
}
Symbol 172 MovieClip Frame 1
if (_root.enemyCount == 0) {
stop();
}
Symbol 190 Button
on (release) {
icon = "scorpio";
_root.play();
}
Symbol 191 Button
on (release) {
icon = "skull";
_root.play();
}
Symbol 192 Button
on (release) {
icon = "dragon";
_root.play();
}
Symbol 193 Button
on (release) {
icon = "smiley";
_root.play();
}
Symbol 194 Button
on (release) {
icon = "peace";
_root.play();
}
Symbol 195 Button
on (release) {
icon = "french";
_root.play();
}
Symbol 196 Button
on (release) {
icon = "pegasus";
_root.play();
}
Symbol 197 Button
on (release) {
icon = "nuclear";
_root.play();
}
Symbol 201 MovieClip Frame 6
stop();
Symbol 201 MovieClip Frame 10
stop();
Symbol 201 MovieClip Frame 14
stop();
Symbol 201 MovieClip Frame 19
stop();
Symbol 201 MovieClip Frame 24
stop();
Symbol 201 MovieClip Frame 29
stop();
Symbol 201 MovieClip Frame 34
stop();
Symbol 201 MovieClip Frame 39
stop();
Symbol 205 Button
on (release) {
play();
}
Symbol 215 Button
on (release) {
_root.gotoAndPlay("restart");
}
Symbol 224 Button
on (release) {
_root.gotoAndPlay("restart");
}
Symbol 227 Button
on (press) {
scrollaction.up = true;
}
on (rollOut, release, dragOut, releaseOutside) {
scrollaction.up = false;
}
Symbol 228 Button
on (press) {
scrollaction.down = true;
}
on (rollOut, release, dragOut, releaseOutside) {
scrollaction.down = false;
}
Symbol 229 MovieClip Frame 1
var sk_url = _parent._parent.sk_url;
var return_type = "PLAIN";
var game_title = _parent._parent.game_title;
var game_author = _parent._parent.game_author;
var script_timeout = _parent._parent.script_timeout;
var my_name = _parent._parent.my_name;
if (my_name == "") {
my_name = _parent._parent.anonymous_name;
}
var my_score = _parent._parent.my_score;
i = 0;
while (_parent._parent.additional_data.length >= i) {
if (eval (_parent._parent.additional_data[i]) != "") {
Set(_parent._parent.additional_data_name[i], eval (_parent._parent.additional_data[i]));
}
i++;
}
var scores_to_return = _parent._parent.scores_to_return;
var scores_per_person = _parent._parent.scores_per_person;
var anonymous_name = _parent._parent.anonymous_name;
var sort_scores_in_reverse = _parent._parent.sort_scores_in_reverse;
_parent.rank = "";
_parent.name = "Loading";
_parent.score = "";
_parent.message_text = "";
script_timeout = (getTimer() / 1000) + script_timeout;
loadVariables (sk_url, this, "POST");
play();
Symbol 229 MovieClip Frame 2
test_timeout = getTimer() / 1000;
if (sk_done == "yes") {
sk_done = "no";
_parent.name = "";
gotoAndPlay (4);
} else if (error != null) {
_parent.name = error;
stop();
} else if (test_timeout >= script_timeout) {
_parent.name = "This script has\rtimed out.";
stop();
} else {
if (_parent.name == "Loading....") {
_parent.name = "Loading";
} else {
_parent.name = _parent.name + ".";
}
play();
}
Symbol 229 MovieClip Frame 3
prevFrame();
Symbol 229 MovieClip Frame 4
var pos = my_name.indexOf("|");
while (pos >= 0) {
var start_string = my_name.substr(0, pos);
var end_string = my_name.substr(pos + 1);
my_name = (start_string + "/") + end_string;
pos = my_name.indexOf("|");
}
var i = 1;
var match = 0;
while (eval ("score_" + i) != null) {
_parent.rank = _parent.rank + (i + newline);
_parent.name = _parent.name + (eval ("name_" + i) + newline);
_parent.score = _parent.score + (eval ("score_" + i) + newline);
if (((escape(my_name) == eval ("name_" + i)) && (my_score == eval ("score_" + i))) && (match == 0)) {
match = i;
}
i++;
}
var scores_returned = (i - 1);
if (!score_1) {
_parent.name = "No data yet.";
stop();
}
play();
Symbol 229 MovieClip Frame 5
var n = "";
if (match == 1) {
n = "st";
} else if (match == 2) {
n = "nd";
} else if (match == 3) {
n = "rd";
} else if (20 >= match) {
n = "th";
} else if (Number(match.toString().substr(match.toString().length - 1)) == 1) {
n = "st";
} else if (Number(match.toString().substr(match.toString().length - 1)) == 2) {
n = "nd";
} else if (Number(match.toString().substr(match.toString().length - 1)) == 3) {
n = "rd";
} else {
n = "th";
}
if ((match == 0) && (my_score != null)) {
_parent.message_text = "Sorry.\rYou did not make the\rhigh scores list.";
} else if (my_score == null) {
_parent.message_text = "\r";
} else {
_parent.message_text = ((((("Congratulations!\rYour ranking is " + match) + n) + newline) + "out of ") + scores_returned) + " scores!";
_parent.rank.scroll = match - 3;
_parent.name.scroll = match - 3;
_parent.score.scroll = match - 3;
}
stop();
Symbol 230 MovieClip Frame 1
if (up == true) {
_parent.rank.scroll = _parent.rank.scroll - 1;
_parent.name.scroll = _parent.name.scroll - 1;
_parent.score.scroll = _parent.score.scroll - 1;
} else if (down == true) {
_parent.rank.scroll = _parent.rank.scroll + 1;
_parent.name.scroll = _parent.name.scroll + 1;
_parent.score.scroll = _parent.score.scroll + 1;
}
play();
Symbol 230 MovieClip Frame 2
prevFrame();
Symbol 231 MovieClip Frame 1
title_text = "High Scores\r" + _parent.game_title;
stop();
Symbol 231 MovieClip Frame 2
stop();
Symbol 232 MovieClip Frame 1
stop();
Symbol 232 MovieClip Frame 2
if (_root.see_scores == true) {
_root.see_scores = false;
board.gotoAndStop(2);
}
var my_name = eval (my_name);
if ((my_name == "") or (my_name == null)) {
my_name = anonymous_name;
}
var my_score = eval (my_score);
if (my_name != anonymous_name) {
board.gotoAndStop(2);
} else if (attempt_to_collect_name == 0) {
board.gotoAndStop(2);
} else {
my_name = "";
}
stop();