Frame 1
ready = false;
Frame 3
_root.api.config.read("config.txt", _root, "medusa");
version = "v1.05";
Frame 52
stop();
Frame 59
ready = true;
name = new Array();
mice = new Array();
need = new Array();
time = new Array();
codes = new Array();
name[0] = "All mice to the cheese!";
mice[0] = 15;
need[0] = 10;
time[0] = 120;
codes[0] = "first";
name[1] = "Naughty traps";
mice[1] = 15;
need[1] = 10;
time[1] = 120;
codes[1] = "traps";
name[2] = "Close the cage quickly!";
mice[2] = 15;
need[2] = 14;
time[2] = 120;
codes[2] = "cage";
name[3] = "Down the river...";
mice[3] = 15;
need[3] = 10;
time[3] = 180;
codes[3] = "river";
name[4] = "Sunny Hill Beach";
mice[4] = 10;
need[4] = 10;
time[4] = 160;
codes[4] = "beach";
name[5] = "Banana Beach Panic";
mice[5] = 10;
need[5] = 10;
time[5] = 120;
codes[5] = "banana";
name[6] = "They follow the signs";
mice[6] = 10;
need[6] = 6;
time[6] = 120;
codes[6] = "signs";
name[7] = "The button opens the door.";
mice[7] = 8;
need[7] = 6;
time[7] = 180;
codes[7] = "door";
name[8] = "Hunter and prey";
mice[8] = 7;
need[8] = 3;
time[8] = 120;
codes[8] = "prey";
name[9] = "The Chambers of Secrets";
mice[9] = 1;
need[9] = 1;
time[9] = 120;
codes[9] = "secrets";
Frame 62
_root.api.config.read("config.txt", _root, "medusa");
trace("nag: " + _root.nagIntro);
if (_root.nagIntro == true) {
gotoAndStop (73);
}
Frame 69
stop();
_root.world.removeMovieClip();
_root.goal.removeMovieClip();
_root.obstacles.removeMovieClip();
_root.bloodandgold.removeMovieClip();
_root.info.removeMovieClip();
beam = 0;
Frame 71
result = "";
Selection.setFocus("levelcode");
Frame 72
_root.world.removeMovieClip();
_root.goal.removeMovieClip();
_root.obstacles.removeMovieClip();
_root.bloodandgold.removeMovieClip();
_root.info.removeMovieClip();
stop();
Frame 73
_root.world.removeMovieClip();
_root.goal.removeMovieClip();
_root.obstacles.removeMovieClip();
_root.bloodandgold.removeMovieClip();
_root.info.removeMovieClip();
stop();
Frame 74
stop();
Frame 75
stop();
_root.world.removeMovieClip();
_root.goal.removeMovieClip();
_root.obstacles.removeMovieClip();
_root.bloodandgold.removeMovieClip();
_root.info.removeMovieClip();
Symbol 3 MovieClip [gold] Frame 24
stop();
this.removeMovieClip();
Symbol 6 MovieClip [water] Frame 11
stop();
this.removeMovieClip();
Symbol 9 MovieClip [blood] Frame 11
stop();
this.removeMovieClip();
Symbol 14 MovieClip [fire] Frame 24
this.removeMovieClip();
stop();
Symbol 17 MovieClip [abyss] Frame 21
this.removeMovieClip();
stop();
Symbol 19 MovieClip [beam] Frame 21
this.removeMovieClip();
stop();
Symbol 23 MovieClip Frame 1
function setDirection(rad, delta) {
var r = ((Math.random() * 0.1) + 0.95);
direction = rad - (delta * r);
speed_x = Math.sin(direction) * speed;
speed_y = (Math.cos(direction) * speed) * -1;
rotation = (direction / Math.PI) * 180;
}
function newSensor(x, y) {
var newSensor = new Object();
newSensor.x = x;
newSensor.y = y;
sensor.push(newSensor);
}
function init() {
if (init_flag != true) {
speed = 4;
actspeed = 1;
acc = 0.1;
rotspeed = 0.2;
decision = 0;
this.strategy_rad = (_rotation / 180) * Math.PI;
this.strategy_x = _x;
this.strategy_y = _y;
this.strategyQualLong = 50;
this.strategyQualShort = 50;
this.strategy_frames = 0;
this.history = new Array(15);
var i = 0;
while (i < this.history.length) {
this.history[i] = [_x, _y];
i++;
}
this.historyPointer = 0;
setDirection((_rotation / 180) * Math.PI);
sensor = new Array();
newSensor(6, -9);
newSensor(-6, -9);
newSensor(0, -15);
newSensor(0, 0);
init_flag = true;
}
}
function getDirection(x1, y1, x2, y2) {
var dx = (x1 - x2);
var dy = (y1 - y2);
with (Math) {
var sina = (dy / sqrt((dx * dx) + (dy * dy)));
if (dx < 0) {
if (sina < 0) {
var alpha = ((-1 * PI) - asin(sina));
} else {
var alpha = (PI - asin(sina));
}
} else {
var alpha = asin(sina);
}
}
return(alpha);
}
function move() {
if (_parent.go == true) {
var go_x = speed_x;
var go_y = speed_y;
checkDead();
hit_0 = checkHitpoint(0);
hit_1 = checkHitpoint(1);
hit_2 = checkHitpoint(2);
if (((hit_0 == true) && (hit_1 == true)) || (hit_2 == true)) {
if (decision == 0) {
if (0.5 < Math.random()) {
decision = rotspeed * 1.2;
} else {
decision = rotspeed * -1.2;
}
}
setDirection(direction, decision);
go_x = 0;
go_y = 0;
} else if (hit_0 == true) {
decision = 0;
setDirection(direction, rotspeed);
go_x = 0;
go_y = 0;
} else if (hit_1 == true) {
decision = 0;
setDirection(direction, rotspeed * -1);
go_x = 0;
go_y = 0;
} else {
decision = 0;
}
_x = (_x + go_x);
_y = (_y + go_y);
_rotation = rotation;
}
this.history[this.historyPointer] = [_x, _y];
this.historyPointer++;
if (this.historyPointer == this.history.length) {
this.historyPointer = 0;
}
this.strategy_frames++;
}
function checkHitPoint(i) {
var hitPoint = new Object();
hitPoint.x = sensor[i].x;
hitPoint.y = sensor[i].y;
localToGlobal(hitPoint);
return(_root.world.hitTest(hitPoint.x, hitPoint.y, true));
}
function checkDead() {
var hitPoint = new Object();
hitPoint.x = 0;
hitPoint.y = -5;
localToGlobal(hitPoint);
if (_root.goal.hitTest(hitPoint.x, hitPoint.y, true)) {
for (var i in /goal) {
if (_root.goal[i].hitTest(hitPoint.x, hitPoint.y, true)) {
_root.goal[i].onHit(this);
}
}
}
}
function hitGoal() {
gotoAndStop (11);
}
function hitTrap() {
gotoAndStop (7);
}
function hitWater() {
gotoAndStop (8);
}
function hitBridgeWater() {
var hitPoint = new Object();
hitPoint.x = 0;
hitPoint.y = -5;
localToGlobal(hitPoint);
if (!_root.goal.bridge.hitTest(hitPoint.x, hitPoint.y, true)) {
trace("no bridge");
gotoAndStop (8);
} else {
trace("bridge");
}
}
function hitAbyss() {
gotoAndStop (9);
}
function hitFire() {
gotoAndStop (10);
}
function direct(rad, speed) {
setDirection((rad * speed) + (direction * (1 - speed)));
}
function beamTo(x, y) {
_root.bloodandgold.attachMovie("beam", "blood_" + _parent.mice, _parent.mice + 1);
setProperty("/bloodandgold/blood_" + _parent.mice, _x , _x);
setProperty("/bloodandgold/blood_" + _parent.mice, _y , _y);
_x = x;
_y = y;
}
Symbol 23 MovieClip Frame 3
if (_parent.go == true) {
init();
gotoAndPlay (5);
} else {
gotoAndPlay (2);
}
Symbol 23 MovieClip Frame 5
move();
Symbol 23 MovieClip Frame 6
gotoAndPlay (5);
Symbol 23 MovieClip Frame 7
_root.master.die();
hitPoint = new Object();
_root.bloodandgold.attachMovie("blood", "blood_" + _parent.mice, _parent.mice + 1);
setProperty("/bloodandgold/blood_" + _parent.mice, _x , _x);
setProperty("/bloodandgold/blood_" + _parent.mice, _y , _y);
stop();
Symbol 23 MovieClip Frame 8
_root.master.die();
hitPoint = new Object();
_root.bloodandgold.attachMovie("water", "blood_" + _parent.mice, _parent.mice + 1);
setProperty("/bloodandgold/blood_" + _parent.mice, _x , _x);
setProperty("/bloodandgold/blood_" + _parent.mice, _y , _y);
stop();
Symbol 23 MovieClip Frame 9
_root.master.die();
hitPoint = new Object();
_root.bloodandgold.attachMovie("abyss", "blood_" + _parent.mice, _parent.mice + 1);
setProperty("/bloodandgold/blood_" + _parent.mice, _x , _x);
setProperty("/bloodandgold/blood_" + _parent.mice, _y , _y);
stop();
Symbol 23 MovieClip Frame 10
_root.master.die();
hitPoint = new Object();
_root.bloodandgold.attachMovie("fire", "blood_" + _parent.mice, _parent.mice + 1);
setProperty("/bloodandgold/blood_" + _parent.mice, _x , _x);
setProperty("/bloodandgold/blood_" + _parent.mice, _y , _y);
stop();
Symbol 23 MovieClip Frame 11
_root.master.win();
hitPoint = new Object();
_root.bloodandgold.attachMovie("gold", "blood_" + _parent.mice, _parent.mice + 1);
setProperty("/bloodandgold/blood_" + _parent.mice, _x , _x);
setProperty("/bloodandgold/blood_" + _parent.mice, _y , _y);
stop();
Symbol 25 Button
on (press) {
this.swapDepths(99);
this.startDrag();
}
on (release, releaseOutside) {
stopDrag();
}
Symbol 26 MovieClip Frame 10
stop();
Symbol 28 Button
on (press) {
this.swapDepths(99);
this.startDrag();
}
on (release, releaseOutside) {
stopDrag();
}
Symbol 29 MovieClip Frame 10
stop();
Symbol 31 Button
on (press) {
this.swapDepths(99);
this.startDrag();
}
on (release, releaseOutside) {
stopDrag();
}
Symbol 32 MovieClip Frame 10
stop();
Symbol 34 Button
on (press) {
this.swapDepths(99);
this.startDrag();
}
on (release, releaseOutside) {
stopDrag();
}
Symbol 35 MovieClip Frame 10
stop();
Symbol 39 Button
on (press) {
this.swapDepths(99);
this.startDrag();
}
on (release, releaseOutside) {
stopDrag();
}
Symbol 40 MovieClip Frame 10
stop();
Symbol 42 Button
on (press) {
this.swapDepths(99);
this.startDrag();
}
on (release, releaseOutside) {
stopDrag();
}
Symbol 43 MovieClip Frame 10
stop();
Symbol 45 Button
on (press) {
this.swapDepths(99);
this.startDrag();
}
on (release, releaseOutside) {
stopDrag();
}
Symbol 46 MovieClip Frame 10
stop();
Symbol 50 Button
on (press) {
this.swapDepths(99);
this.startDrag();
}
on (release, releaseOutside) {
stopDrag();
}
Symbol 51 MovieClip Frame 10
stop();
Symbol 56 MovieClip Frame 1
function onHit(mouse) {
mouse.hitWater();
}
Symbol 58 Button
on (press) {
this.swapDepths(99);
this.startDrag();
}
on (release, releaseOutside) {
stopDrag();
}
Symbol 59 MovieClip Frame 10
stop();
Symbol 61 Button
on (press) {
this.swapDepths(99);
this.startDrag();
}
on (release, releaseOutside) {
stopDrag();
}
Symbol 62 MovieClip Frame 10
stop();
Symbol 64 Button
on (press) {
this.swapDepths(99);
this.startDrag();
}
on (release, releaseOutside) {
stopDrag();
}
Symbol 65 MovieClip Frame 10
stop();
Symbol 68 MovieClip Frame 1
stop();
trace("bar2: " + _target);
Symbol 70 Button
on (press) {
this.swapDepths(99);
this.startDrag();
}
on (release, releaseOutside) {
stopDrag();
}
Symbol 71 MovieClip Frame 10
stop();
Symbol 74 MovieClip Frame 1
function onHit(mouse) {
mouse.hitWater();
}
Symbol 75 MovieClip [world] Frame 1
gotoAndStop(_root.master.actLevel + 1);
Symbol 81 MovieClip Frame 1
onHit = function (mouse) {
mouse.hitGoal();
};
Symbol 95 MovieClip Frame 1
stop();
Symbol 96 MovieClip Frame 1
function onHit(mouse) {
trace("hit mouse: " + mouse);
mouse.hitTrap();
killer.gotoAndPlay(2);
}
stop();
Symbol 101 MovieClip Frame 1
function onHit(mouse) {
mouse.hitWater();
}
Symbol 103 MovieClip Frame 1
function onHit(mouse) {
mouse.hitWater();
}
Symbol 105 MovieClip Frame 1
function onHit(mouse) {
mouse.hitWater();
}
Symbol 108 MovieClip Frame 1
onHit = function (mouse) {
mouse.hitGoal();
};
Symbol 111 MovieClip Frame 1
function onHit(mouse) {
mouse.direct(0, 1);
}
Symbol 113 MovieClip Frame 1
function onHit(mouse) {
mouse.hitWater();
}
Symbol 115 MovieClip Frame 1
function onHit(mouse) {
mouse.hitWater();
}
Symbol 117 MovieClip Frame 1
function onHit(mouse) {
_root.world.bar.gotoAndStop(2);
gotoAndStop (2);
}
stop();
Symbol 117 MovieClip Frame 2
this.onHit = undefined;
Symbol 119 MovieClip Frame 1
function onHit(mouse) {
mouse.hitTrap();
}
function setDirection(rad, delta) {
var r = ((Math.random() * 0.1) + 0.95);
direction = rad - (delta * r);
speed_x = Math.sin(direction) * speed;
speed_y = (Math.cos(direction) * speed) * -1;
rotation = (direction / Math.PI) * 180;
}
function newSensor(x, y) {
var newSensor = new Object();
newSensor.x = x;
newSensor.y = y;
sensor.push(newSensor);
}
function init() {
if (init_flag != true) {
speed = 5;
actspeed = 1;
acc = 0.1;
rotspeed = 0.2;
decision = 0;
setDirection((_rotation / 180) * Math.PI);
sensor = new Array();
newSensor(6, -9);
newSensor(-6, -9);
newSensor(0, -15);
newSensor(0, 0);
init_flag = true;
}
}
function getDirection(x1, y1, x2, y2) {
var dx = (x1 - x2);
var dy = (y1 - y2);
with (Math) {
var sina = (dy / sqrt((dx * dx) + (dy * dy)));
if (dx < 0) {
if (sina < 0) {
var alpha = ((-1 * PI) - asin(sina));
} else {
var alpha = (PI - asin(sina));
}
} else {
var alpha = asin(sina);
}
}
return(alpha);
}
function move() {
if (_root.world.go == true) {
var go_x = speed_x;
var go_y = speed_y;
var hitPoint = new Object();
hitPoint.x = 0;
hitPoint.y = -5;
localToGlobal(hitPoint);
if (_root.obstacles.goal.hitTest(hitPoint.x, hitPoint.y, true)) {
gotoAndStop (7);
}
hit_0 = checkHitpoint(0) || (checkEvilHitpoint(0));
hit_1 = checkHitpoint(1) || (checkEvilHitpoint(1));
hit_2 = checkHitpoint(2) || (checkEvilHitpoint(2));
if (((hit_0 == true) && (hit_1 == true)) || ((hit_2 == true) && (decision != 0))) {
if (decision == 0) {
if (0.5 < Math.random()) {
decision = rotspeed * 1.2;
} else {
decision = rotspeed * -1.2;
}
}
setDirection(direction, decision);
go_x = 0;
go_y = 0;
} else if (hit_2 == true) {
if (decision == 0) {
if (0.5 < Math.random()) {
decision = rotspeed * 1.2;
} else {
decision = rotspeed * -1.2;
}
}
setDirection(direction, decision);
} else if (hit_0 == true) {
decision = 0;
setDirection(direction, rotspeed);
go_x = 0;
go_y = 0;
} else if (hit_1 == true) {
decision = 0;
setDirection(direction, rotspeed * -1);
go_x = 0;
go_y = 0;
} else {
decision = 0;
}
_x = (_x + go_x);
_y = (_y + go_y);
_rotation = rotation;
}
}
function checkHitPoint(i) {
var hitPoint = new Object();
hitPoint.x = sensor[i].x;
hitPoint.y = sensor[i].y;
localToGlobal(hitPoint);
return(_root.world.hitTest(hitPoint.x, hitPoint.y, true));
}
function checkEvilHitPoint(i) {
var hitPoint = new Object();
hitPoint.x = sensor[i].x;
hitPoint.y = sensor[i].y;
localToGlobal(hitPoint);
var a = _root.goal.hitTest(hitPoint.x, hitPoint.y, true);
var b = _root.obstacles.hitTest(hitPoint.x, hitPoint.y, true);
return(a || (b));
}
Symbol 119 MovieClip Frame 3
if (_root.world.go == true) {
init();
gotoAndPlay (5);
} else {
gotoAndPlay (2);
}
Symbol 119 MovieClip Frame 5
move();
Symbol 119 MovieClip Frame 6
gotoAndPlay (5);
Symbol 119 MovieClip Frame 7
_root.master.Evilwin();
hitPoint = new Object();
_root.bloodandgold.attachMovie("gold", "blood_" + _parent.mice, _parent.mice + 1);
setProperty("/bloodandgold/blood_" + _parent.mice, _x , _x);
setProperty("/bloodandgold/blood_" + _parent.mice, _y , _y);
stop();
Symbol 120 MovieClip Frame 1
function onHit(mouse) {
trace("hit! open bar2");
_root.world.bar2.gotoAndStop(2);
gotoAndStop (2);
}
stop();
Symbol 120 MovieClip Frame 2
this.onHit = undefined;
Symbol 122 MovieClip Frame 1
function onHit(mouse) {
mouse.hitTrap();
}
Symbol 123 MovieClip [goal] Frame 1
gotoAndStop(_root.master.actLevel + 1);
Symbol 127 MovieClip Frame 1
_root.api = new Object();
_root.api.debug = new Object();
_root.api.debug.describe = function (o) {
var d = (("[DESCRIBE: " + o.toString()) + "]");
d = d + "\n---------------------------DESC-START";
for (var i in o) {
d = d + (((newline + i) + ": ") + o[i]);
}
d = d + "\n---------------------------DESC-STOP";
return(d);
};
_root.api.snd = new Object();
_root.api.snd.lib = new Object();
_root.api.snd.load = function (name, url) {
var s = new Sound();
if (url eq "") {
s.attachSound(name);
} else {
s.loadSound(url);
}
_root.api.snd.lib[name] = s;
};
_root.api.snd.play = function (name) {
_root.snd[name].gotoAndPlay(1);
};
_root.api.crypt = new Object();
_root.api.crypt.charTable = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz%";
_root.api.crypt.cryptTable = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_";
_root.api.crypt.init = function () {
this.session = "";
while (this.session.length < 20) {
this.session = this.session + this.charTable.charAt(Math.round(Math.random() * (this.charTable.length - 1)));
}
this.charTableIndex = new Array();
var i = 0;
while (i < this.charTable.length) {
this.charTableIndex[this.charTable.charCodeAt(i)] = i;
i++;
}
this.cryptTableIndex = new Array();
var i = 0;
while (i < this.cryptTable.length) {
this.cryptTableIndex[this.cryptTable.charCodeAt(i)] = i;
i++;
}
};
_root.api.crypt.init();
_root.api.crypt.encrypt = function (text, pKey) {
text = escape(text);
var crypt = "";
var checkSum = 0;
var shift;
var code;
var i = 0;
while (i < text.length) {
char = this.charTableIndex[text.charCodeAt(i)];
shift = this.charTableIndex[pKey.charCodeAt(i % pKey.length)];
code = (char + shift) + checkSum;
code = code % this.charTable.length;
crypt = crypt + this.cryptTable.charAt(code);
checkSum = checkSum + code;
i++;
}
checkSum = checkSum % this.charTable.length;
return((crypt + "") + this.cryptTable.charAt(checkSum));
};
_root.api.crypt.decrypt = function (crypt, pKey) {
var text = "";
var checkSum = 0;
var shift;
var code;
var i = 0;
while (i < (crypt.length - 1)) {
char = this.cryptTableIndex[crypt.charCodeAt(i)];
shift = this.cryptTableIndex[pKey.charCodeAt(i % pKey.length)];
code = (char - shift) - checkSum;
while (code < 0) {
code = code + this.charTable.length;
}
code = code % this.charTable.length;
text = text + this.charTable.charAt(code);
checkSum = checkSum + char;
i++;
}
var checkSumEncode = this.cryptTableIndex[crypt.charCodeAt(crypt.length - 1)];
var checkSumDecode = (checkSum % this.charTable.length);
if (checkSumEncode == checkSumDecode) {
return(unescape(text));
}
trace((("#ERROR: can't decrypt: " + crypt) + " key: ") + pKey);
return(false);
};
_root.api.config = new Object();
_root.api.config.read = function (pFile, pTarget, pKey) {
this.xmlObject.load(pFile);
this.xmlTarget = pTarget;
this.xmlKey = pKey;
};
_root.api.config.parse = function (pXml, pTarget) {
if (pXml.firstChild.nodeName eq "cconfig") {
pXml = new XML(_root.api.crypt.decrypt(pXml.childNodes[0].attributes.d, this.xmlKey));
}
for (attribute in pXml/childNodes/0:attributes) {
var value = pXml.childNodes[0].attributes[attribute];
if (String(Number(value)) eq value) {
value = Number(value);
}
pTarget[attribute] = value;
}
};
_root.api.config.onLoadConfig = function (success) {
if (success) {
_root.api.config.parse(_root.api.config.xmlObject, _root.api.config.xmlTarget);
} else {
trace("#ERROR: xml error while parsing xml config");
}
};
_root.api.config.xmlObject = new XML();
_root.api.config.xmlObject.onLoad = _root.api.config.onLoadConfig;
_visible = false;
Symbol 137 MovieClip Frame 1
stop();
Symbol 138 MovieClip Frame 2
this.display.gotoAndStop(int(((_level0.getBytesLoaded() / _level0.getBytesTotal()) * 40) + 1));
if (_level0.getBytesLoaded() == _level0.getBytesTotal()) {
_root.play();
}
Symbol 141 MovieClip Frame 1
function setDirection(rad, delta) {
var r = ((Math.random() * 0.1) + 0.95);
direction = rad - (delta * r);
speed_x = Math.sin(direction) * speed;
speed_y = (Math.cos(direction) * speed) * -1;
rotation = (direction / Math.PI) * 180;
}
function newSensor(x, y) {
var newSensor = new Object();
newSensor.x = x;
newSensor.y = y;
sensor.push(newSensor);
}
function init() {
if (init_flag != true) {
speed = 4;
actspeed = 1;
acc = 0.1;
rotspeed = 0.2;
decision = 0;
setDirection((_rotation / 180) * Math.PI);
sensor = new Array();
newSensor(6, -9);
newSensor(-6, -9);
newSensor(0, -15);
newSensor(0, 0);
init_flag = true;
}
}
function getDirection(x1, y1, x2, y2) {
var dx = (x1 - x2);
var dy = (y1 - y2);
with (Math) {
var sina = (dy / sqrt((dx * dx) + (dy * dy)));
if (dx < 0) {
if (sina < 0) {
var alpha = ((-1 * PI) - asin(sina));
} else {
var alpha = (PI - asin(sina));
}
} else {
var alpha = asin(sina);
}
}
return(alpha);
}
function move() {
function checkHitPoint(i) {
var hitPoint = new Object();
hitPoint.x = sensor[i].x;
hitPoint.y = sensor[i].y;
localToGlobal(hitPoint);
return(_root.world.hitTest(hitPoint.x, hitPoint.y, true));
}
function checkDead() {
var hitPoint = new Object();
hitPoint.x = 0;
hitPoint.y = -5;
localToGlobal(hitPoint);
if (_root.obstacles.hitTest(hitPoint.x, hitPoint.y, true)) {
gotoAndStop (7);
}
if (_root.goal.hitTest(hitPoint.x, hitPoint.y, true)) {
gotoAndStop (8);
}
}
if (_parent.go == true) {
var go_x = speed_x;
var go_y = speed_y;
checkDead();
hit_0 = checkHitpoint(0);
hit_1 = checkHitpoint(1);
hit_2 = checkHitpoint(2);
if (((hit_0 == true) && (hit_1 == true)) || ((hit_2 == true) && (decision != 0))) {
if (decision == 0) {
if (0.5 < Math.random()) {
decision = rotspeed * 1.2;
} else {
decision = rotspeed * -1.2;
}
}
setDirection(direction, decision);
go_x = 0;
go_y = 0;
} else if (hit_2 == true) {
if (decision == 0) {
if (0.5 < Math.random()) {
decision = rotspeed * 1.2;
} else {
decision = rotspeed * -1.2;
}
}
setDirection(direction, decision);
} else if (hit_0 == true) {
decision = 0;
setDirection(direction, rotspeed);
go_x = 0;
go_y = 0;
} else if (hit_1 == true) {
decision = 0;
setDirection(direction, rotspeed * -1);
go_x = 0;
go_y = 0;
} else {
decision = 0;
}
_x = (_x + go_x);
_y = (_y + go_y);
_rotation = rotation;
}
}
function checkHitPoint(i) {
var hitPoint = new Object();
hitPoint.x = sensor[i].x;
hitPoint.y = sensor[i].y;
localToGlobal(hitPoint);
return(_root.world.hitTest(hitPoint.x, hitPoint.y, true));
}
function checkDead() {
var hitPoint = new Object();
hitPoint.x = 0;
hitPoint.y = -5;
localToGlobal(hitPoint);
if (_root.obstacles.hitTest(hitPoint.x, hitPoint.y, true)) {
gotoAndStop (7);
}
if (_root.goal.hitTest(hitPoint.x, hitPoint.y, true)) {
gotoAndStop (8);
}
}
Symbol 141 MovieClip Frame 3
if (_parent.go == true) {
init();
gotoAndPlay (5);
} else {
gotoAndPlay (2);
}
Symbol 141 MovieClip Frame 5
move();
Symbol 141 MovieClip Frame 6
gotoAndPlay (5);
Symbol 141 MovieClip Frame 7
_root.master.die();
hitPoint = new Object();
_root.bloodandgold.attachMovie("blood", "blood_" + _parent.mice, _parent.mice + 1);
setProperty("/bloodandgold/blood_" + _parent.mice, _x , _x);
setProperty("/bloodandgold/blood_" + _parent.mice, _y , _y);
stop();
Symbol 141 MovieClip Frame 8
_root.master.win();
hitPoint = new Object();
_root.bloodandgold.attachMovie("gold", "blood_" + _parent.mice, _parent.mice + 1);
setProperty("/bloodandgold/blood_" + _parent.mice, _x , _x);
setProperty("/bloodandgold/blood_" + _parent.mice, _y , _y);
stop();
Symbol 142 MovieClip Frame 1
go = true;
Symbol 157 MovieClip Frame 99
stop();
Symbol 158 MovieClip Frame 1
_parent.stop();
Symbol 158 MovieClip Frame 111
_parent.play();
stop();
Symbol 163 Button
on (release) {
getURL ((("http://www.neodelight.com?ref=cm2003trial&ref_ver=" + _root.version) + "&ref_brand=") + _root.branding, "_blank");
}
Symbol 170 MovieClip Frame 1
_parent.stop();
_root.shopUrl = "http://www.miniclip.com/cmfunpack_buy.htm";
_root.shopUrl2 = "http://www.miniclip.com/cmfunpack_buy.htm";
_root.moreGamesUrl = "http://www.miniclip.com/";
_root.nagIntro = false;
_root.funpackOnly = true;
_root.branding = "mc";
Symbol 170 MovieClip Frame 97
_parent.play();
Symbol 170 MovieClip Frame 104
stop();
Symbol 177 MovieClip Frame 2
if (0.006 < Math.random()) {
gotoAndPlay (1);
}
Symbol 187 Button
on (release) {
gotoAndStop (74);
}
Symbol 189 Button
on (release) {
gotoAndStop (70);
}
Symbol 191 Button
on (release) {
gotoAndStop (71);
}
Symbol 193 Button
on (release) {
gotoAndStop (72);
}
Symbol 195 Button
on (release) {
getURL (_root.moreGamesUrl, "_blank");
}
Symbol 197 Button
on (release, keyPress "<Escape>") {
fscommand ("quit");
play();
}
Symbol 198 MovieClip Frame 1
stop();
Symbol 198 MovieClip Frame 20
getURL (_root.moreGamesUrl, "_top");
Symbol 214 Button
on (release) {
gotoAndStop (69);
}
Symbol 218 Button
on (press, keyPress "<Enter>") {
var result = false;
trace("checking " + codes.length);
if (levelcode.substr(0, 3) eq "lvl") {
} else {
var i = 0;
while (i < codes.length) {
if (codes[i] eq levelcode) {
beam = i;
result = true;
break;
}
i++;
}
}
if (result == false) {
result = "bad passwort!";
levelcode = "";
Selection.setSelection("levelcode");
} else {
result = "beam to level " + i;
gotoAndStop (74);
}
}
Symbol 224 Button
on (press) {
_root.goal.field.active = true;
}
on (release, releaseOutside) {
_root.goal.field.active = false;
}
Symbol 260 Button
on (release) {
getURL (_root.shopUrl2, "_blank");
}
Symbol 265 Button
on (release) {
getURL (_root.shopUrl, "_blank");
}
Symbol 268 Button
on (release) {
getURL (_root.shopUrl2, "_blank");
}
Symbol 269 MovieClip Frame 1
stop();
if (_root.funpackOnly ne "true") {
gotoAndStop (2);
}
Symbol 271 Button
on (release) {
gotoAndStop (69);
}
Symbol 273 MovieClip Frame 1
this.swapDepths(110);
Symbol 274 MovieClip Frame 1
stop();
Symbol 274 MovieClip Frame 2
play();
Symbol 274 MovieClip Frame 3
trace("on!");
Symbol 274 MovieClip Frame 500
stop();
Symbol 280 Button
on (release) {
startLevel();
}
Symbol 282 Button
on (release) {
_root.gotoAndStop("startscreen");
}
Symbol 284 Button
on (release) {
_root.world.go = false;
gotoAndStop (75);
}
Symbol 296 Button
on (release) {
gotoAndStop (46);
}
Symbol 299 Button
on (release) {
gotoAndStop (66);
}
Symbol 301 Button
on (release) {
gotoAndPlay (2);
}
Symbol 303 MovieClip Frame 1
function loadLevel() {
totaltime = _root.time[actLevel];
resttime = totaltime;
needmice = _root.need[actLevel];
levelname = _root.name[actLevel];
levelnum = actLevel + 1;
totalmice = _root.mice[actLevel];
levelcode = _root.codes[actLevel];
_root.world.removeMovieClip();
_root.goal.removeMovieClip();
_root.attachMovie("world", "world", 100);
_root.attachMovie("goal", "goal", 50);
_root.info.gotoAndStop("levelinfo");
}
function startLevel() {
running = totalmice;
needcounter = needmice;
this.timeWarning = false;
saved = 0;
dead = 0;
_root.info.gotoAndStop("invisible");
_root.world.go = true;
gotoAndPlay (12);
starttime = getTimer();
}
function die() {
_root.master.dead++;
_root.master.running--;
if (_root.master.running == 0) {
if (_root.master.saved >= _root.master.needmice) {
_root.master.gotoAndStop("win");
} else {
_root.master.gotoAndStop("loose");
}
} else if (_root.master.needcounter == (_root.master.running + 1)) {
_root.master.looseSound.start();
_root.master.gotoAndPlay("dogameover");
}
}
function win() {
_root.master.saved++;
_root.master.running--;
if (0 < _root.master.needcounter) {
_root.master.needcounter--;
}
if (_root.master.running == 0) {
if (_root.master.saved >= _root.master.needmice) {
_root.master.gotoAndStop("win");
} else {
_root.master.gotoAndStop("loose");
}
} else if (_root.master.saved == _root.master.needmice) {
_root.master.winSound.start();
_root.master.gotoAndPlay("gamenowdone");
}
}
function evilwin() {
if (0 < _root.master.saved) {
_root.master.saved--;
}
if (0 < _root.master.needcounter) {
_root.master.needcounter++;
}
if (_root.master.needcounter == (_root.master.running + 1)) {
_root.master.looseSound.start();
_root.master.gotoAndPlay("gameover");
}
}
actLevel = Number(_root.beam);
looseSound = new Sound(this);
looseSound.attachSound("dog");
looseSound.setVolume(90);
winSound = new Sound(this);
winSound.attachSound("horn");
winSound.setVolume(90);
Symbol 303 MovieClip Frame 2
timeWarningSnd.active = false;
timeWarningSnd.gotoAndStop("off");
loadLevel();
resttime = totaltime;
stop();
Symbol 303 MovieClip Frame 12
resttime = resttime - 0.0555555555555556;
if ((resttime < 21) && (!timeWarning)) {
timeWarningSnd.active = true;
timeWarningSnd.gotoAndStop("on");
trace("activate time warning");
timeWarning = true;
}
resttimeDisplay = Math.round(resttime);
Symbol 303 MovieClip Frame 13
if (0 >= resttime) {
gotoAndStop (59);
} else {
gotoAndPlay (12);
}
Symbol 303 MovieClip Frame 21
timeWarningSnd.active = false;
timeWarningSnd.gotoAndStop("off");
Symbol 303 MovieClip Frame 22
resttime = totaltime - int((getTimer() - starttime) / 1000);
play();
Symbol 303 MovieClip Frame 23
if (0 >= resttime) {
trace("win");
gotoAndStop (46);
} else {
gotoAndPlay (22);
}
Symbol 303 MovieClip Frame 33
timeWarningSnd.active = false;
timeWarningSnd.gotoAndStop("off");
Symbol 303 MovieClip Frame 34
resttime = totaltime - int((getTimer() - starttime) / 1000);
play();
Symbol 303 MovieClip Frame 35
if (0 >= resttime) {
gotoAndStop (66);
} else {
gotoAndPlay (34);
}
Symbol 303 MovieClip Frame 46
timeWarningSnd.active = false;
timeWarningSnd.gotoAndStop("off");
_root.world.go = false;
actLevel++;
if (9 < levelnum) {
_root.gotoAndStop("shop");
trace("lastlevel done");
} else {
trace("lastlevel not done - now: " + actLevel);
if (actLevel == name.length) {
actLevel = 0;
_root.info.message = "Wow! You did it! Saved all the mice! Survived alle the levels!\nWhat now? Hope for new levels?";
} else {
_root.info.message = "Congratulations! You did a fine job! Will you survive the next level as well?";
}
_root.info.gotoAndStop("message");
}
Symbol 303 MovieClip Frame 59
timeWarningSnd.active = false;
timeWarningSnd.gotoAndStop("off");
_root.world.go = false;
_root.info.message = "Time out! You should hurry up a little bit, if you want to become a mouse-hero!";
_root.info.gotoAndStop("message");
Symbol 303 MovieClip Frame 66
timeWarningSnd.active = false;
timeWarningSnd.gotoAndStop("off");
_root.world.go = false;
_root.info.message = ((((("Oh boy! You saved only " + saved) + " of ") + totalmice) + " mice, but you need ") + needmice) + " to go on...keep on trying!";
_root.info.gotoAndStop("message");
Symbol 303 MovieClip Frame 75
timeWarningSnd.active = false;
timeWarningSnd.gotoAndStop("off");
_root.world.go = false;
_root.info.message = "You left your mice in the lurch! You gotta make up for that!";
_root.info.gotoAndStop("message");
Symbol 325 MovieClip Frame 1
stop();
this.swapDepths(130);
Symbol 325 MovieClip Frame 2
rescue = ((("You have to rescue " + _root.master.needmice) + " of ") + _root.master.totalmice) + " mice.";
level = (_root.master.levelnum + " - ") + _root.master.levelname;
Symbol 326 MovieClip Frame 2
this.unloadMovie();