Frame 1
ready = false;
_root.version = "20040825";
game = "cybermice";
shopUrl = "https://secure.bmtmicro.com/servlets/Orders.ShoppingCart?CID=1465&PRODUCTID=14650001&AID=" + aid;
shopUrl2 = "https://secure.bmtmicro.com/servlets/Orders.ShoppingCart?CID=1465&PRODUCTID=14650004&AID=" + aid;
moreGamesUrl = "http://www.neodelight.com";
Frame 3
_root.api.config.read("config.txt", _root, "medusa");
Frame 4
ready = true;
name = new Array();
mice = new Array();
need = new Array();
time = new Array();
codes = new Array();
name[0] = "The first bite of cheese.";
mice[0] = 20;
need[0] = 10;
time[0] = 120;
codes[0] = "first";
name[1] = "The color of blood.";
mice[1] = 20;
need[1] = 10;
time[1] = 120;
codes[1] = "blood";
name[2] = "Time DOES matter.";
mice[2] = 20;
need[2] = 10;
time[2] = 20;
codes[2] = "time";
name[3] = "North and South";
mice[3] = 20;
need[3] = 10;
time[3] = 120;
codes[3] = "south";
name[4] = "Snakes and Serpents";
mice[4] = 10;
need[4] = 7;
time[4] = 360;
codes[4] = "snakes";
name[5] = "Cats ain't cool.";
mice[5] = 5;
need[5] = 4;
time[5] = 120;
codes[5] = "thecat";
name[6] = "If only I survive!";
mice[6] = 5;
need[6] = 2;
time[6] = 120;
codes[6] = "survive";
name[7] = "The trick with the ace...";
mice[7] = 20;
need[7] = 7;
time[7] = 120;
codes[7] = "ace";
name[8] = "Build quickly!";
mice[8] = 10;
need[8] = 8;
time[8] = 240;
codes[8] = "buildquickly";
name[9] = "Cement Factory";
mice[9] = 5;
need[9] = 3;
time[9] = 120;
codes[9] = "cement";
Frame 38
stop();
Frame 46
_root.api.config.read("config.txt", _root, "medusa");
Frame 53
if (_root.nagIntro == true) {
gotoAndStop (64);
}
Frame 60
stop();
beam = 0;
_root.world.removeMovieClip();
_root.goal.removeMovieClip();
_root.obstacles.removeMovieClip();
_root.bloodandgold.removeMovieClip();
_root.info.removeMovieClip();
Frame 62
result = "";
Selection.setFocus("levelcode");
Frame 63
_root.world.removeMovieClip();
_root.goal.removeMovieClip();
_root.obstacles.removeMovieClip();
_root.bloodandgold.removeMovieClip();
_root.info.removeMovieClip();
stop();
Frame 64
_root.world.removeMovieClip();
_root.goal.removeMovieClip();
_root.obstacles.removeMovieClip();
_root.bloodandgold.removeMovieClip();
_root.info.removeMovieClip();
stop();
Frame 65
stop();
Frame 66
stop();
_root.world.removeMovieClip();
_root.goal.removeMovieClip();
_root.obstacles.removeMovieClip();
gotoAndStop (63);
Symbol 8 MovieClip [fire] Frame 24
this.removeMovieClip();
stop();
Symbol 12 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() {
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 12 MovieClip Frame 3
if (_parent.go == true) {
init();
gotoAndPlay (5);
} else {
gotoAndPlay (2);
}
Symbol 12 MovieClip Frame 5
move();
Symbol 12 MovieClip Frame 6
gotoAndPlay (5);
Symbol 12 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 12 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 14 Button
on (press) {
this.swapDepths(99);
this.startDrag();
}
on (release, releaseOutside) {
stopDrag();
}
Symbol 17 Button
on (press) {
this.swapDepths(99);
this.startDrag();
}
on (release, releaseOutside) {
stopDrag();
}
Symbol 20 Button
on (press) {
this.swapDepths(99);
this.startDrag();
}
on (release, releaseOutside) {
stopDrag();
}
Symbol 23 Button
on (press) {
this.swapDepths(99);
this.startDrag();
}
on (release, releaseOutside) {
stopDrag();
}
Symbol 26 Button
on (press) {
this.swapDepths(99);
this.startDrag();
}
on (release, releaseOutside) {
stopDrag();
}
Symbol 29 Button
on (press) {
trace("hallo");
this.swapDepths(99);
this.startDrag();
}
on (release, releaseOutside) {
stopDrag();
}
Symbol 32 Button
on (press) {
this.swapDepths(99);
this.startDrag();
}
on (release, releaseOutside) {
stopDrag();
}
Symbol 35 Button
on (press) {
this.swapDepths(99);
this.startDrag();
}
on (release, releaseOutside) {
stopDrag();
}
Symbol 39 Button
on (press) {
this.swapDepths(99);
this.startDrag();
}
on (release, releaseOutside) {
stopDrag();
}
Symbol 47 Button
on (press) {
this.swapDepths(99);
this.startDrag();
}
on (release, releaseOutside) {
stopDrag();
nextFrame();
}
Symbol 49 MovieClip Frame 1
stop();
Symbol 50 MovieClip [world] Frame 1
gotoAndStop(_root.master.actLevel + 1);
Symbol 63 MovieClip [obstacles] Frame 1
gotoAndStop(_root.master.actLevel + 1);
Symbol 66 MovieClip [goal] Frame 1
gotoAndStop(_root.master.actLevel + 1);
Symbol 69 MovieClip [gold] Frame 24
stop();
Symbol 72 MovieClip [blood] Frame 10
stop();
Symbol 76 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 87 MovieClip Frame 2
this.display.gotoAndStop(int(((_root.getBytesLoaded() / _root.getBytesTotal()) * 40) + 1));
if (_root.getBytesLoaded() == _root.getBytesTotal()) {
_root.play();
}
Symbol 89 MovieClip Frame 1
go = true;
Symbol 91 Button
on (release) {
getURL (((("http://www.neodelight.com?ref=" + _root.game) + "&ref_ver=") + _root.version) + "&ref_loc=intro", "_BLANK");
}
Symbol 102 MovieClip Frame 1
startFrame = _parent._currentframe;
Symbol 102 MovieClip Frame 2
vol = (1 - ((_parent._currentFrame - startFrame) / (_parent._totalFrames - startFrame))) * 100;
if (vol < 0) {
vol = 0;
}
_parent.snd.setVolume(vol);
Symbol 102 MovieClip Frame 3
gotoAndPlay (2);
Symbol 103 MovieClip Frame 1
snd = new Sound(this);
snd.setVolume(100);
_parent.stop();
Symbol 103 MovieClip Frame 123
stop();
_parent.play();
Symbol 110 Button
on (release) {
gotoAndStop (65);
}
Symbol 112 Button
on (release) {
gotoAndStop (61);
}
Symbol 114 Button
on (release) {
gotoAndStop (62);
}
Symbol 117 Button
on (release) {
gotoAndStop (63);
}
Symbol 120 Button
on (release) {
trace(_root.moreGamesUrl);
getURL (_root.moreGamesUrl, "_blank");
}
Symbol 122 Button
on (release, keyPress "<Escape>") {
fscommand ("quit");
play();
}
Symbol 123 MovieClip Frame 1
stop();
Symbol 123 MovieClip Frame 15
getURL (_root.moreGamesUrl, "_top");
Symbol 126 Button
on (release) {
getURL ((("http://www.neodelight.com?ref=cybermice_trial&ref_ver=" + _root.version) + "&ref_brand=") + _root.branding, "_blank");
}
Symbol 134 Button
on (release, keyPress "<Escape>") {
gotoAndStop (60);
}
Symbol 138 Button
on (press, keyPress "<Enter>") {
var result = false;
trace("checking " + codes.length);
if (levelcode.substr(0, 3) eq "lvl") {
result = "the cheat was deactivated";
} 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 (65);
}
}
Symbol 181 Button
on (release) {
getURL (_root.shopUrl, "_blank");
}
Symbol 183 Button
on (release) {
getURL (_root.shopUrl2, "_blank");
}
Symbol 185 MovieClip Frame 1
stop();
if (_root.funpackOnly eq "true") {
gotoAndStop (2);
}
Symbol 188 Button
on (release, keyPress "<Enter>") {
gotoAndPlay (54);
}
Symbol 190 MovieClip Frame 2
this.unloadMovie();
Symbol 192 MovieClip Frame 1
this.swapDepths(110);
Symbol 195 Button
on (keyPress "<Escape>") {
_root.gotoAndStop("startscreen");
}
Symbol 199 Button
on (release) {
startLevel();
}
Symbol 202 Button
on (release) {
_root.gotoAndStop("startscreen");
}
Symbol 214 Button
on (release) {
_root.world.go = false;
gotoAndStop (75);
}
Symbol 222 Button
on (release) {
gotoAndStop (46);
}
Symbol 230 Button
on (release) {
gotoAndStop (66);
}
Symbol 231 Button
on (release) {
gotoAndPlay (2);
}
Symbol 232 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.attachMovie("world", "world", 100);
_root.attachMovie("goal", "goal", 50);
_root.attachMovie("obstacles", "obstacles", 20);
_root.info.gotoAndStop("levelinfo");
}
function startLevel() {
running = totalmice;
needcounter = needmice;
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("gameover");
}
}
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("gamedone");
}
}
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 232 MovieClip Frame 2
loadLevel();
stop();
Symbol 232 MovieClip Frame 12
resttime = totaltime - int((getTimer() - starttime) / 1000);
Symbol 232 MovieClip Frame 13
if (0 >= resttime) {
gotoAndStop (59);
} else {
gotoAndPlay (12);
}
Symbol 232 MovieClip Frame 22
resttime = totaltime - int((getTimer() - starttime) / 1000);
play();
Symbol 232 MovieClip Frame 23
if (0 >= resttime) {
trace("win");
gotoAndStop (46);
} else {
gotoAndPlay (22);
}
Symbol 232 MovieClip Frame 34
resttime = totaltime - int((getTimer() - starttime) / 1000);
play();
Symbol 232 MovieClip Frame 35
if (0 >= resttime) {
gotoAndStop (66);
} else {
gotoAndPlay (34);
}
Symbol 232 MovieClip Frame 46
_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 232 MovieClip Frame 59
_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 232 MovieClip Frame 66
_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 232 MovieClip Frame 75
_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 253 MovieClip Frame 1
stop();
this.swapDepths(130);
Symbol 253 MovieClip Frame 2
rescue = ((("You have to rescue " + _root.master.needmice) + " of ") + _root.master.totalmice) + " mice.";
level = (_root.master.levelnum + " - ") + _root.master.levelname;