Frame 1
MochiAd.showPreGameAd({id:"d0815deaa03e854e", res:"550x400", background:3289650, color:16777215, outline:3289650, no_bg:true});
stop();
Frame 2
var _mochiads_game_id = "d0815deaa03e854e";
_root.attachMovie("frame_", "frejmen", 700000000, {_x:275, _y:200});
_root.attachMovie("q_btn", "q_btn", 50000000, {_x:530, _y:20});
q_btn.onPress = function () {
ddd = _root.attachMovie("q_tt", "q_tt", 50000001, {_x:275, _y:25});
ddd.onEnterFrame = function () {
this._alpha = this._alpha - 2;
if (this._alpha < 0) {
removeMovieClip(this);
}
};
if (_root._quality == "LOW") {
q_tt.gotoAndStop(2);
_root._quality = "MEDIUM";
} else if (_root._quality == "MEDIUM") {
q_tt.gotoAndStop(3);
_root._quality = "HIGH";
} else if (_root._quality == "HIGH") {
_root._quality = "BEST";
q_tt.gotoAndStop(4);
} else if (_root._quality == "BEST") {
_root._quality = "LOW";
q_tt.gotoAndStop(1);
}
};
Frame 3
function noww() {
clearInterval(plio);
thingga = true;
olavi = 0;
}
stop();
var loadedtxt = new Array([1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0], [1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0], [1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0], [1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0], [1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0]);
var loadedtxta = new Array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]);
var totalB = _root.getBytesTotal();
var currentB = _root.getBytesLoaded();
var perc;
var curro = Math.round((currentB / totalB) * 165);
var blocks = 0;
var i = 0;
i = 0;
while (i < curro) {
var y = (Math.round(i / 30) - 1);
var x = (Math.round(i - (y * 30)) - 15);
trace((("Y:" + y) + "X:") + x);
if (loadedtxta[y][x] == 0) {
if (loadedtxt[y][x] == 1) {
var tempo = blom.attachMovie("ploppeli", "b" + blocks, blocks);
tempo.beginFill(47360);
tempo.lineTo(10, 0);
tempo.lineTo(10, 10);
tempo.lineTo(0, 10);
tempo.lineTo(0, 0);
tempo._x = -200;
tempo._y = -200 + (Math.random() * 300);
new mx.transitions.Tween(tempo, "_x", mx.transitions.easing.Strong.easeOut, -200, x * 11, 1, true);
new mx.transitions.Tween(tempo, "_y", mx.transitions.easing.Strong.easeOut, -200, y * 11, 1, true);
trace("YO");
blocks++;
}
loadedtxta[y][x] = 1;
}
i++;
}
var bajs = 0;
bar.onEnterFrame = function () {
if (totalB != currentB) {
currentB = _root.getBytesLoaded();
this._xscale = (currentB / totalB) * 100;
perc = Math.round((currentB / totalB) * 165);
var _local6 = perc;
var _local4 = Math.round(_local6 / 30) - 1;
var _local5 = Math.round(_local6 - (_local4 * 30)) - 15;
trace((("Y:" + _local4) + "X:") + _local5);
if (loadedtxta[_local4][_local5] == 0) {
if (loadedtxt[_local4][_local5] == 1) {
var _local3 = blom.attachMovie("ploppeli", "b" + blocks, blocks);
_local3.beginFill(47360);
_local3.lineTo(10, 0);
_local3.lineTo(10, 10);
_local3.lineTo(0, 10);
_local3.lineTo(0, 0);
_local3._x = -200;
_local3._y = -200 + (Math.random() * 300);
new mx.transitions.Tween(_local3, "_x", mx.transitions.easing.Strong.easeOut, -200, _local5 * 11, 1, true);
new mx.transitions.Tween(_local3, "_y", mx.transitions.easing.Strong.easeOut, -200, _local4 * 11, 1, true);
blocks++;
}
loadedtxta[_local4][_local5] = 1;
}
} else {
if (!IR) {
var _local7 = new Sound();
_local7.attachSound("ayui");
_local7.start();
IR = true;
plio = setInterval(noww, 200);
new mx.transitions.Tween(bar, "_xscale", mx.transitions.easing.Bounce.easeOut, 100, 0, 2, true);
var _local10 = new mx.transitions.Tween(bar, "_x", mx.transitions.easing.Bounce.easeOut, 130, 275, 2, true);
_local10.onMotionFinished = function () {
trace("attaching thing");
attachMovie("tttuu", "c323", 1323239, {_alpha:0});
var _local2 = new mx.transitions.Tween(c323, "_alpha", mx.transitions.easing.Strong.easeOut, 0, 100, 2, true);
_local2.onMotionFinished = function () {
gotoAndStop ("menu");
var _local1 = new mx.transitions.Tween(c323, "_alpha", mx.transitions.easing.Strong.easeOut, 100, 0, 2, true);
_local1.onMotionFinished = function () {
removeMovieClip(c323);
};
};
};
}
if (thingga) {
new mx.transitions.Tween(blom["b" + bajs], "_y", mx.transitions.easing.Strong.easeOut, blom["b" + bajs]._y, -100, 2, true);
new mx.transitions.Tween(blom["b" + bajs], "_alpha", mx.transitions.easing.Strong.easeOut, 100, 0, 2.2, true);
bajs++;
}
}
};
Frame 4
function emailHandler() {
getURL ("http://boxmonster.890m.com/wordpress", "_blank");
}
function showback() {
new mx.transitions.Tween(back_b, "_y", mx.transitions.easing.Strong.easeOut, 264, 318, 1, true);
back_b.useHandCursor = true;
}
function hideback() {
back_b.useHandCursor = false;
if (back_b._y >= 315) {
new mx.transitions.Tween(back_b, "_y", mx.transitions.easing.Strong.easeOut, 318, 264, 1, true);
}
}
function lock() {
one_btn.useHandCursor = false;
two_btn.useHandCursor = false;
three_btn.useHandCursor = false;
hideback();
back_b.useHandCursor = false;
}
function showload() {
one_btn.txt.text = "save 1 - " + so.data.save1.user;
one_btn.txt.setTextFormat(smalltext);
two_btn.txt.text = "save 2 - " + so.data.save2.user;
three_btn.txt.text = "save 3 - " + so.data.save3.user;
if (so.data.save1.user == "empty") {
one_btn.useHandCursor = false;
one_btn.locked._visible = true;
}
if (so.data.save2.user == "empty") {
two_btn.useHandCursor = false;
two_btn.locked._visible = true;
}
if (so.data.save3.user == "empty") {
three_btn.useHandCursor = false;
three_btn.locked._visible = true;
}
}
function showsaves() {
one_btn.txt.text = "file 1 - " + so.data.save1.user;
two_btn.txt.text = "file 2 - " + so.data.save2.user;
three_btn.txt.text = "file 3 - " + so.data.save3.user;
}
function showmenu() {
selectedslot = 0;
allowclick = true;
presss = 0;
one_btn.stop();
two_btn.stop();
three_btn.stop();
one_btn.locked._visible = false;
two_btn.locked._visible = false;
three_btn.locked._visible = false;
one_btn.useHandCursor = true;
two_btn.useHandCursor = true;
three_btn.useHandCursor = true;
one_btn.txt.text = "new game";
two_btn.txt.text = "continue";
three_btn.txt.text = "createror. yayeah";
one_btn.txt.setTextFormat(smalltext);
two_btn.txt.setTextFormat(smalltext);
three_btn.txt.setTextFormat(smalltext);
}
function drawcurts(uchi, texts) {
paus = true;
curts = attachMovie("curts", "curt", 49999999, {_alpha:0});
curt.stuff = 0;
curt.closing_curt = false;
curt.space._visible = false;
curts.onEnterFrame = function () {
if (this.firstChar == "") {
this.space._visible = true;
if (Key.isDown(32)) {
_root.gotoAndStop(uchi);
_root.startgame();
this.closing_curt = true;
this.txt.text = "";
}
}
if (this.closing_curt) {
this._alpha = this._alpha - 5;
if (this._alpha <= 0) {
removeMovieClip(this);
paus = false;
}
}
if (this._alpha <= 100) {
if (!this.closing_curt) {
this._alpha = this._alpha + 2;
}
} else {
i = 0;
while (i < 1) {
this.firstChar = texts.charAt(this.stuff);
this.txt.text = this.txt.text + this.firstChar;
this.stuff++;
i++;
}
}
};
}
stop();
var my_cm = new ContextMenu();
my_cm.hideBuiltInItems();
var menuItem_cmi = new ContextMenuItem("Useless game save files for everyone", emailHandler);
my_cm.customItems.push(menuItem_cmi);
_root.menu = my_cm;
stage.menu = my_cm;
this.menu = my_cm;
var smalltext = new TextFormat();
smalltext.font = "";
smalltext.size = 21;
smalltext.color = 16777215 /* 0xFFFFFF */;
back_b.onRelease = function () {
if (allowclick) {
showmenu();
hideback();
}
};
var so = SharedObject.getLocal("gamesaves");
if (so.data.save1 == undefined) {
so.data.save1 = new Object();
so.data.save1.user = "empty";
so.flush();
}
if (so.data.save2 == undefined) {
so.data.save2 = new Object();
so.data.save2.user = "empty";
so.flush();
}
if (so.data.save3 == undefined) {
so.data.save3 = new Object();
so.data.save3.user = "empty";
so.flush();
}
showmenu();
one_btn.onRelease = function () {
if (allowclick) {
if (presss == 1) {
allowclick = false;
selectedslot = 1;
if (so.data["save" + _root.selectedslot].user != "empty") {
attachMovie("overna", "over_n", 30001, {_x:275, _y:200});
} else {
attachMovie("e_name", "e_name", 30000, {_x:275, _y:200});
}
} else if (presss == 2) {
if (so.data.save1.user != "empty") {
selectedslot = 1;
allowclick = false;
drawcurts("game", "loading game.................... .....game loaded sucessfully");
lock();
}
} else if (presss == 0) {
presss = 1;
showback();
showsaves();
}
one_btn.gotoAndStop(1);
}
};
two_btn.onRelease = function () {
if (allowclick) {
if (presss == 1) {
allowclick = false;
selectedslot = 2;
if (so.data["save" + _root.selectedslot].user != "empty") {
attachMovie("overna", "over_n", 30001, {_x:275, _y:200});
} else {
attachMovie("e_name", "e_name", 30000, {_x:275, _y:200});
}
} else if (presss == 2) {
if (so.data.save2.user != "empty") {
selectedslot = 2;
allowclick = false;
lock();
drawcurts("game", "loading game.................... .....game loaded sucessfully");
}
} else if (presss == 0) {
presss = 2;
showback();
showload();
}
two_btn.gotoAndStop(1);
}
};
three_btn.onRelease = function () {
if (allowclick) {
if (presss == 1) {
selectedslot = 3;
allowclick = false;
if (so.data["save" + _root.selectedslot].user != "empty") {
attachMovie("overna", "over_n", 30001, {_x:275, _y:200});
} else {
attachMovie("e_name", "e_name", 30000, {_x:275, _y:200});
}
} else if (presss == 2) {
if (so.data.save3.user != "empty") {
allowclick = false;
selectedslot = 3;
lock();
drawcurts("game", "loading game.................... .....game loaded sucessfully");
}
} else if (presss == 0) {
getURL ("http://boxmonster.890m.com/wordpress", "_blank");
}
three_btn.gotoAndStop(1);
}
};
one_btn.onRollOut = function () {
one_btn.gotoAndStop(1);
};
three_btn.onRollOut = function () {
three_btn.gotoAndStop(1);
};
two_btn.onRollOut = function () {
two_btn.gotoAndStop(1);
};
two_btn.onPress = function () {
if (presss == 2) {
if (so.data.save2.user != "empty") {
two_btn.gotoAndStop(3);
}
} else {
two_btn.gotoAndStop(3);
}
};
three_btn.onPress = function () {
if (presss == 2) {
if (so.data.save3.user != "empty") {
three_btn.gotoAndStop(3);
}
} else {
three_btn.gotoAndStop(3);
}
};
one_btn.onPress = function () {
if (presss == 2) {
if (so.data.save1.user != "empty") {
one_btn.gotoAndStop(3);
}
} else {
one_btn.gotoAndStop(3);
}
};
Frame 5
function removeall() {
unloadterrain();
removeMovieClip(man);
removeMovieClip(h_bar);
clearInterval(fps);
}
function updatefps() {
FPS.text = "FPS: " + steps;
_root.so.data["save" + _root.selectedslot].second++;
if (!paus) {
steps = 0;
timeplay.text = "Seconds played:" + _root.so.data["save" + _root.selectedslot].second;
}
}
function unloadterrain() {
removeMovieClip(ground);
removeMovieClip(stairs);
removeMovieClip(bg);
}
function attachterrain() {
this.attachMovie(("room" + currentroom[0]) + currentroom[1], "ground", 1000);
this.attachMovie(("stair" + currentroom[0]) + currentroom[1], "stairs", 998);
this.attachMovie(("bg" + currentroom[0]) + currentroom[1], "bg", 997);
}
function updatehealth() {
if (health <= 0) {
health = 0;
removeall();
attachMovie("w_t", "wtt", 99999999999);
getbacko = new mx.transitions.Tween(wtt, "_alpha", mx.transitions.easing.Strong.easeIn, 100, 0, 4, true);
getbacko.onMotionFinished = function () {
removeMovieClip(wtt);
};
gotoAndStop ("gameover");
}
h_bar.bar._xscale = (health / maxhealth) * 100;
}
function hurt(target) {
target._alpha = 30;
target.blendMode = 6;
invisible = true;
getback = new mx.transitions.Tween(target, "_alpha", mx.transitions.easing.Strong.easeOut, 60, 100, 2, true);
getback.onMotionFinished = function () {
target.blendMode = 1;
invisible = false;
};
updatehealth();
}
function startgame() {
attachMovie("Man", "man", 999, {_x:_root.so.data["save" + _root.selectedslot].xpos, _y:_root.so.data["save" + _root.selectedslot].ypos});
attachMovie("h_bar", "h_bar", 1001, {_x:20, _y:20, _alpha:70});
updatehealth();
attachterrain();
man.onEnterFrame = function () {
if (Key.isDown(80)) {
if (!p_down) {
if (paus) {
if (paus_ != undefined) {
p_down = true;
paus = false;
removeMovieClip(paus_);
}
} else if (!paus) {
p_down = true;
paus = true;
attachMovie("pausedd", "paus_", 150000);
}
}
} else if (p_down) {
p_down = false;
}
if (!paus) {
steps++;
if (this._x > 545) {
currentroom[0]++;
this._x = 20;
unloadterrain();
attachterrain();
} else if (this._x < 4) {
currentroom[0]--;
this._x = 535;
unloadterrain();
attachterrain();
}
if (this._y > 395) {
currentroom[1]++;
this._y = 6;
unloadterrain();
attachterrain();
} else if (this._y < 4) {
currentroom[1]--;
this._y = 390;
unloadterrain();
attachterrain();
}
while ((_root.ground.ground.hitTest(this._x, this._y - 1, true) || (_root.ground.ground.hitTest(this._x - 3, this._y - 2, true))) || (_root.ground.ground.hitTest(this._x + 3, this._y - 2, true) && (yspeed >= 0))) {
this._y--;
}
if (!crouching) {
while (_root.ground.ground.hitTest(this._x, this._y - 23, true) && (yspeed <= 0)) {
this._y++;
yspeed = 0;
}
} else {
while (_root.ground.ground.hitTest(this._x, this._y - 17, true)) {
this._y++;
yspeed = 0;
}
}
while (_root.ground.ground.hitTest(this._x + 5, this._y - floorangle, true) && (xspeed >= 0)) {
this._x--;
xspeed = 0;
}
while (_root.ground.ground.hitTest(this._x - 5, this._y - floorangle, true) && (xspeed <= 0)) {
this._x++;
xspeed = 0;
}
if (ground.ground.hitTest(this._x - 5, this._y - floorangle, true)) {
this._x = this._x + 1;
xspeed = 0;
} else if (ground.ground.hitTest(this._x + 5, this._y - floorangle, true)) {
this._x = this._x - 1;
xspeed = 0;
}
if (!crouching) {
if (ground.ground.hitTest(this._x - 5, this._y - 23, true)) {
this._x = this._x + 1;
xspeed = 0;
} else if (ground.ground.hitTest(this._x + 5, this._y - 23, true)) {
this._x = this._x - 1;
xspeed = 0;
}
} else if (ground.ground.hitTest(this._x - 5, this._y - 13, true)) {
this._x = this._x + 1;
xspeed = 0;
} else if (ground.ground.hitTest(this._x + 5, this._y - 13, true)) {
this._x = this._x - 1;
xspeed = 0;
}
this._x = this._x + (xspeed + sxspeed);
this._y = this._y + (yspeed + syspeed);
xspeed = xspeed * friction;
if (Key.isDown(40)) {
if (!block) {
if (!climbing) {
if (!walking) {
crouching = true;
if (!crouched) {
this.gotoAndStop("crouching");
crouched = true;
} else {
this.gotoAndStop("crouching");
this.cr.gotoAndStop(3);
}
}
}
}
} else if (crouching) {
if (!ground.ground.hitTest(this._x - 5, this._y - 23, true)) {
if (!ground.ground.hitTest(this._x + 5, this._y - 23, true)) {
if (!ground.ground.hitTest(this._x, this._y - 23, true)) {
crouching = false;
crouched = false;
} else if (!walking) {
this.gotoAndStop("crouching");
}
} else if (!walking) {
this.gotoAndStop("crouching");
}
} else if (!walking) {
this.gotoAndStop("crouching");
}
}
if (_root.stairs.hitTest(this._x, this._y - (this._height / 2), true)) {
if (!block) {
if (Key.isDown(38)) {
climbing = true;
this.gotoAndStop("climbing");
yspeed = -1;
if (!_root.stairs.hitTest(this._x, (this._y - (this._height / 2)) - 5, true)) {
yspeed = -1.7;
}
this.ani.play();
} else if (Key.isDown(40)) {
if (!crouching) {
if (!_root.ground.ground.hitTest(this._x, this._y + 1, true)) {
climbing = true;
this.gotoAndStop("climbing");
yspeed = 1;
this.ani.play();
} else {
climbing = false;
}
}
} else {
this.ani.stop();
if (climbing) {
yspeed = 0;
}
}
if (Key.isDown(37)) {
if (climbing) {
this.gotoAndStop("climbing");
this.ani.play();
xspeed = -1;
}
} else if (Key.isDown(39)) {
if (climbing) {
this.gotoAndStop("climbing");
this.ani.play();
xspeed = 1;
}
}
}
} else {
climbing = false;
}
if ((_root.ground.ground.hitTest(this._x, this._y - 1, true) || (_root.ground.ground.hitTest(this._x - 3, this._y - 1, true))) || (_root.ground.ground.hitTest(this._x + 3, this._y - 1, true))) {
if (!climbing) {
if (!walking) {
if (!crouching) {
this.gotoAndStop("standby");
}
}
if (yspeed >= 4) {
crash_s.start();
totoro = 0;
while (totoro < 10) {
createblood(this._x, this._y - 10);
totoro++;
}
health = health - Math.round(yspeed / 4);
hurt(man);
updatehealth();
} else if (yspeed > 0.4) {
if (airi) {
iid = 0;
while (iid < 8) {
_root.createdust(this._x, this._y);
iid++;
}
}
}
yspeed = 0;
this._y = this._y - 1;
airi = false;
}
}
if ((_root.ground.ground.hitTest(this._x, this._y, true) || (_root.ground.ground.hitTest(this._x - 3, this._y, true))) || (_root.ground.ground.hitTest(this._x + 3, this._y, true))) {
if (!block) {
if (Key.isDown(38)) {
if (!_root.ground.stairs.hitTest(this._x, this._y - 2, true)) {
if (!_root.ground.ground.hitTest(this._x, this._y - 23, true)) {
if (crouching) {
if (!_root.ground.ground.hitTest(this._x, this._y - 18, true)) {
this._y = this._y - 0.1;
yspeed = jumppower * 0.5;
}
} else {
this._y = this._y - 0.1;
yspeed = jumppower;
}
}
} else {
climbing = true;
this.gotoAndStop("climbing");
yspeed = -1;
}
}
if (Key.isDown(37)) {
if (!crouching) {
this.gotoAndStop("walking");
walking = true;
if (!_root.ground.ground.hitTest(this._x - 6, this._y - 10, true)) {
xspeed = xspeed - walkpower;
}
this._xscale = -100;
} else {
this.gotoAndStop("crouchwalk");
walking = true;
xspeed = xspeed - (walkpower * 0.3);
this._xscale = -100;
}
} else if (Key.isDown(39)) {
if (!crouching) {
walking = true;
this._xscale = 100;
if (!_root.ground.ground.hitTest(this._x + 6, this._y - 10, true)) {
xspeed = xspeed + walkpower;
}
this.gotoAndStop("walking");
} else {
this.gotoAndStop("crouchwalk");
walking = true;
xspeed = xspeed + (walkpower * 0.3);
this._xscale = 100;
}
} else {
walking = false;
if (!crouching) {
this.gotoAndStop("standby");
}
}
}
}
if (((!_root.ground.ground.hitTest(this._x, this._y, true)) || (!_root.ground.ground.hitTest(this._x - 3, this._y, true))) || (!_root.ground.ground.hitTest(this._x + 3, this._y, true))) {
airi = true;
if (!climbing) {
yspeed = yspeed + gravity;
if (!block) {
if (crouching) {
if (crouched) {
this.gotoAndStop("crouching");
this.cr.gotoAndStop(4);
}
}
if (Key.isDown(37)) {
this._xscale = -100;
if (!_root.ground.ground.hitTest(this._x - 6, this._y - 10, true)) {
if (!crouching) {
xspeed = xspeed - walkpower;
} else {
xspeed = xspeed - (walkpower * 0.3);
}
}
} else if (Key.isDown(39)) {
this._xscale = 100;
if (!_root.ground.ground.hitTest(this._x + 6, this._y - 10, true)) {
if (!crouching) {
xspeed = xspeed + walkpower;
} else {
xspeed = xspeed + (walkpower * 0.3);
}
}
}
}
if (!crouching) {
if (yspeed <= -0.5) {
this.gotoAndStop("jumping_up");
} else if (yspeed >= 0.7) {
this.gotoAndStop("jumping_down");
}
}
}
}
}
};
}
function showmessage(texti) {
if (infobox == null) {
if (!paus) {
block = true;
walking = false;
man.gotoAndStop("standby");
infos = attachMovie("infobox", "infobox", 140000, {_alpha:0, _y:300, _x:275});
infobox.stuffs = 0;
infobox.closing_curt = false;
infobox.space._visible = false;
}
infos.onEnterFrame = function () {
if (!paus) {
block = true;
if (this.firstChar == "") {
this.space._visible = true;
if (Key.isDown(32)) {
this.closing_curt = true;
this.txt.text = "";
}
}
if (this.closing_curt) {
this._alpha = this._alpha - 5;
if (this._alpha <= 0) {
removeMovieClip(this);
block = false;
}
}
if (this._alpha <= 100) {
if (!this.closing_curt) {
this._alpha = this._alpha + 5;
}
} else {
i = 0;
while (i < 2) {
block = true;
this.firstChar = texti.charAt(this.stuffs);
this.txt.text = this.txt.text + this.firstChar;
this.stuffs++;
i++;
}
}
}
};
}
}
function save_g() {
if (!paus) {
if (curt == undefined) {
if (blind == undefined) {
paus = true;
fadi = attachMovie("curts", "blind", 120000, {_alpha:0, fadeout:false});
blind.space._visible = false;
fadi.onEnterFrame = function () {
if (!this.fadeout) {
if (this._alpha <= 70) {
this._alpha = this._alpha + 2;
} else {
_root.attachMovie("save_g", "save_g", 120001, {_x:275, _y:200});
}
} else if (this._alpha >= 0) {
this._alpha = this._alpha - 2;
} else {
removeMovieClip(this);
paus = false;
}
};
}
}
}
}
function quake(timeq, afterq) {
block = true;
_root.createEmptyMovieClip("shaker", 10012);
shaker.onEnterFrame = function () {
if (timeq >= 0) {
var _local2 = random(4) - 2;
var _local3 = random(4) - 2;
ground._x = _local3;
ground._y = _local2;
stairs._x = _local3;
stairs._y = _local2;
bg._x = _local3;
bg._y = _local2;
timeq--;
trace(timeq);
}
if (timeq <= 0) {
ground._x = 0;
ground._y = 0;
stairs._x = 0;
stairs._y = 0;
bg._x = 0;
bg._y = 0;
block = false;
removeMovieClip(this);
if (afterq != undefined) {
showmessage(afterq);
}
}
};
}
function attackrand(pooe) {
if (!_root.invisible) {
totoro = 0;
while (totoro < 10) {
createblood(man._x, man._y - 10);
totoro++;
}
_root.health = _root.health - Math.round(Math.floor(Math.random() * pooe) + 1);
_root.updatehealth();
_root.hurt(_root.man);
}
}
function showsign(texti) {
if (infobox == null) {
if (!paus) {
block = true;
walking = false;
man.gotoAndStop("standby");
infos = attachMovie("mine_sign", "infobox", 140000, {_alpha:0, _y:0, _x:0});
infobox.stuffs = 0;
infobox.closing_curt = false;
infobox.space._visible = false;
}
infos.onEnterFrame = function () {
if (!paus) {
if (this.firstChar == "") {
this.space._visible = true;
if (Key.isDown(32)) {
this.closing_curt = true;
this.txt.text = "";
}
}
if (this.closing_curt) {
this._alpha = this._alpha - 5;
if (this._alpha <= 0) {
removeMovieClip(this);
block = false;
}
}
if (this._alpha <= 100) {
if (!this.closing_curt) {
this._alpha = this._alpha + 5;
}
} else {
i = 0;
while (i < 2) {
this.firstChar = texti.charAt(this.stuffs);
this.txt.text = this.txt.text + this.firstChar;
this.stuffs++;
i++;
}
}
}
};
}
}
function addhealth(amountt) {
_root.health = _root.health + amountt;
if (health > 10) {
health = 10;
}
updatehealth();
}
function createdust(x, y) {
if ((_root._quality == "HIGH") || (_root._quality == "BEST")) {
runpart = _root.attachMovie("dust", "dust" + particles, 60100 + particles, {_x:x, _y:y, xspeed:(Math.random() * 2) - 1, yspeed:Math.random() * -2});
particles++;
if (particles > 23) {
particles = 0;
}
runpart.onEnterFrame = function () {
this._alpha = this._alpha - 2;
this._x = this._x + this.xspeed;
this._y = this._y + this.yspeed;
this.yspeed = this.yspeed * 0.9;
this.xspeed = this.xspeed * 0.9;
if (this._alpha < 0) {
removeMovieClip(this);
}
};
}
}
function createblood(x, y) {
if ((_root._quality == "HIGH") || (_root._quality == "BEST")) {
runpart = _root.attachMovie("blood", "blood" + particles, 60100 + particles, {_x:x, _y:y, xspeed:(Math.random() * 2) - 1, yspeed:Math.random() * -2});
particles++;
if (particles > 23) {
particles = 0;
}
runpart.onEnterFrame = function () {
this._alpha = this._alpha - 2;
this._x = this._x + this.xspeed;
this._y = this._y + this.yspeed;
this.yspeed = this.yspeed + 0.1;
this.xspeed = this.xspeed * 0.9;
if (this._alpha < 0) {
removeMovieClip(this);
}
};
}
}
function attachkeypad(lengt) {
if (keypad == undefined) {
paus = true;
supersugen = attachMovie("keypad", "keypad", 50000004, {_x:275, _y:200, _alpha:0, maxcl:lengt});
supersugen.onEnterFrame = function () {
if (this._alpha < 100) {
this._alpha = this._alpha + 2;
}
};
}
}
function drawlite(uchi, texts) {
paus = true;
curts = attachMovie("light_", "curt", 49999999, {_alpha:0});
curt.stuff = 0;
curt.closing_curt = false;
curt.space._visible = false;
curts.onEnterFrame = function () {
if (this.firstChar == "") {
this.space._visible = true;
if (Key.isDown(32)) {
_root.gotoAndStop(uchi);
this.closing_curt = true;
this.txt.text = "";
}
}
if (this.closing_curt) {
this._alpha = this._alpha - 1;
if (this._alpha <= 0) {
removeMovieClip(this);
paus = false;
}
}
if (this._alpha <= 100) {
if (!this.closing_curt) {
this._alpha = this._alpha + 30;
}
} else {
i = 0;
while (i < 1) {
this.firstChar = texts.charAt(this.stuff);
this.txt.text = this.txt.text + this.firstChar;
this.stuff++;
i++;
}
}
};
}
var sounds = new Array();
var crash_s = new Sound();
crash_s.attachSound("crash_s");
crash_s.setVolume(70);
fps = setInterval(updatefps, 1000);
steps = 0;
var asektor = new Object();
asektor.switch1 = _root.so.data["save" + _root.selectedslot].switch1;
asektor.switch2 = _root.so.data["save" + _root.selectedslot].switch2;
asektor.switch3 = _root.so.data["save" + _root.selectedslot].switch3;
asektor.switch4 = _root.so.data["save" + _root.selectedslot].switch4;
asektor.allowinput = _root.so.data["save" + _root.selectedslot].allowinput;
asektor.portopen = _root.so.data["save" + _root.selectedslot].portopen;
asektor.kodl = _root.so.data["save" + _root.selectedslot].kodl;
asektor.kd = _root.so.data["save" + _root.selectedslot].kd;
asektor.h_box1 = _root.so.data["save" + _root.selectedslot].h_box1;
box1 = false;
box2 = false;
paus = false;
p_down = false;
maxhealth = _root.so.data["save" + _root.selectedslot].maxhealth;
health = _root.so.data["save" + _root.selectedslot].health;
var cardsgotten = new Array();
cardsgotten = _root.so.data["save" + _root.selectedslot].cardsgotten.slice(0, so.data["save" + _root.selectedslot].cardsgotten.length);
var cardsused = new Array();
cardsused = _root.so.data["save" + _root.selectedslot].cardsused.slice(0, so.data["save" + _root.selectedslot].cardsused.length);
xspeed = (yspeed = 0);
sxspeed = (syspeed = 0);
block = false;
var currentroom = new Array();
currentroom = _root.so.data["save" + _root.selectedslot].currentroom.slice(0, 2);
trace(currentroom);
gravity = 0.1;
friction = 0.5;
jumppower = -2;
walkpower = 1.1;
floorangle = 3;
climbing = false;
walking = false;
crouching = (crouched = false);
invisible = false;
particles = 0;
airi = false;
fireballs = 0;
Frame 6
btnnn.locked._visible = false;
btnnn.txt.text = "Back To Menu";
gmdd = false;
btnnn.onRelease = function () {
if (!gmdd) {
gmdd = true;
attachMovie("tttuu", "c323", 1323239, {_alpha:0});
var _local2 = new mx.transitions.Tween(c323, "_alpha", mx.transitions.easing.Strong.easeOut, 0, 100, 2, true);
_local2.onMotionFinished = function () {
gotoAndStop ("menu");
var _local1 = new mx.transitions.Tween(c323, "_alpha", mx.transitions.easing.Strong.easeOut, 100, 0, 2, true);
_local1.onMotionFinished = function () {
removeMovieClip(c323);
};
};
}
};
Frame 7
atata = false;
ttt.onEnterFrame = function () {
if (this._y > -800) {
this._y = this._y - 1;
} else if (!atata) {
atata = true;
attachMovie("w_t", "thign", 1231231, {});
thign.onEnterFrame = function () {
if (!this.bled) {
if (this._alpha < 100) {
this._alpha = this._alpha + 30;
} else {
gotoAndStop ("menu");
this.bled = true;
}
} else if (this._alpha >= 0) {
this._alpha--;
} else {
removeMovieClip(this);
}
};
}
};
Symbol 15 MovieClip Frame 3
stop();
Symbol 20 MovieClip Frame 5
stop();
Symbol 45 MovieClip Frame 3
stop();
Symbol 50 MovieClip [Man] Frame 1
stop();
Symbol 77 MovieClip Frame 1
stop();
Symbol 77 MovieClip Frame 2
godo = true;
l_w.onEnterFrame = function () {
if (!_root.paus) {
if (!godo) {
if (this._y <= -33) {
_root.block = false;
_root.ground.openfloor = true;
gotoAndStop (3);
delete l_w.onEnterFrame;
}
}
if (godo) {
if (this._y <= 34) {
this._y = this._y + 2;
} else {
godo = false;
}
} else if (this._y >= -33) {
this._y = this._y - 0.5;
}
}
};
Symbol 78 MovieClip [room11] Frame 1
opening = false;
openingscan = false;
openfloor = false;
this.onEnterFrame = function () {
if (!_root.paus) {
if (Key.isDown(32)) {
if (ac1.hitTest(_root.man._x, _root.man._y)) {
_root.showmessage("probably a fire extinguisher");
}
}
if (_root.man.hitTest(o_p._x, o_p._y)) {
opening = true;
} else if (_root.man.hitTest(c_p._x, c_p._y)) {
opening = false;
}
if (opening) {
if (ground.port2._y >= -30) {
ground.port2._y = ground.port2._y - 2;
}
} else if (ground.port2._y < 7) {
ground.port2._y = ground.port2._y + 3;
}
if (_root.man.hitTest(scan._x, scan._y)) {
if (!openingscan) {
_root.block = true;
laser.gotoAndStop(2);
openingscan = true;
_root.man.gotoAndStop("standby");
}
} else if (_root.man.hitTest(scan2._x, scan2._y)) {
openingscan = false;
}
if (openfloor) {
if (ground.f_trap._x >= 236.5) {
ground.f_trap._x = ground.f_trap._x - 4;
}
}
if (!openingscan) {
if (ground.port3._y >= 126) {
ground.port3._y = ground.port3._y - 2;
}
} else if (ground.port3._y < 154) {
ground.port3._y = ground.port3._y + 3;
}
}
};
Symbol 84 MovieClip [room21] Frame 1
if (_root.cardsused[0]) {
ground.port1._y = -30;
}
this.onEnterFrame = function () {
if (!_root.paus) {
if (openingdoor) {
if (ground.port1._y >= -30) {
ground.port1._y--;
}
}
if (Key.isDown(32)) {
if (ac1.hitTest(_root.man._x, _root.man._y)) {
if ((!_root.cardsgotten[0]) || (_root.cardsused[0])) {
_root.showmessage("This looks like a cardreader");
} else {
_root.showmessage("I'll put this card in here");
openingdoor = true;
_root.cardsused[0] = true;
}
}
}
}
};
Symbol 90 MovieClip [room12] Frame 1
this.onEnterFrame = function () {
if (!_root.paus) {
if (Key.isDown(32)) {
if (ac1.hitTest(_root.man._x, _root.man._y)) {
_root.showmessage("Lockers or some some kind of storage thing");
}
}
if (bounce.hitTest(_root.man._x, _root.man._y)) {
_root.man._y = 72;
if (Key.isDown(38)) {
_root.yspeed = -3.2;
} else if (Key.isDown(32)) {
_root.showmessage("This thing is very bouncy");
_root.yspeed = -1;
} else {
_root.yspeed = -1;
}
}
}
};
Symbol 97 MovieClip [room22] Frame 1
this.onEnterFrame = function () {
if (Key.isDown(32)) {
if (ac1.hitTest(_root.man._x, _root.man._y)) {
_root.showmessage("Whoa, here's a lot of lockers");
}
}
};
Symbol 106 MovieClip [room01] Frame 1
this.onEnterFrame = function () {
if (Key.isDown(32)) {
if (ac1.hitTest(_root.man._x, _root.man._y)) {
_root.showmessage("The exitdoor is locked. There must be another way out from here. Hopefully");
} else if (ac2.hitTest(_root.man._x, _root.man._y)) {
_root.showmessage("A sign that says 'entrance'. what kind of entrance could this be?");
}
}
};
Symbol 160 MovieClip [room32] Frame 1
this.onEnterFrame = function () {
if (!_root.paus) {
if (Key.isDown(32)) {
if (ac1.hitTest(_root.man._x, _root.man._y)) {
_root.showmessage("What happened here?");
}
}
while (ab1.hitTest(_root.man._x - 3, _root.man._y, true) || (ab2.hitTest(_root.man._x - 3, _root.man._y, true))) {
_root.man._x++;
_root.jumping = true;
}
}
};
Symbol 179 MovieClip Frame 1
this.onEnterFrame = function () {
if (!_root.paus) {
if (_root.ground.opn.hitTest(_root.man._x, _root.man._y)) {
opening = true;
}
if (opening) {
if (this.port2._y >= -56) {
this.port2._y = this.port2._y - 2;
}
}
}
};
Symbol 187 MovieClip [room42] Frame 1
if (_root.cardsgotten[0]) {
card._visible = false;
}
this.onEnterFrame = function () {
if (!_root.paus) {
if (Key.isDown(32)) {
if (this.sav.hitTest(_root.man)) {
_root.save_g();
}
}
if (_root.man.hitTest(card._x, card._y)) {
if (!_root.cardsgotten[0]) {
_root.showmessage("this is some kind of keycard. Ill take it with me");
card._visible = false;
_root.cardsgotten[0] = true;
}
}
}
};
Symbol 209 MovieClip [e_name] Frame 1
_root.hideback();
bb.onRelease = function () {
_root.showback();
_root.allowclick = true;
removeMovieClip(this._parent);
};
ok.onRelease = function () {
if (txt.text.length >= 3) {
if (txt.text != "empty") {
_root.so.data["save" + _root.selectedslot].user = txt.text;
_root.so.data["save" + _root.selectedslot].xpos = 50;
_root.so.data["save" + _root.selectedslot].ypos = 251;
_root.so.data["save" + _root.selectedslot].maxhealth = 10;
_root.so.data["save" + _root.selectedslot].health = 10;
_root.so.data["save" + _root.selectedslot].cardsgotten = [false, false];
_root.so.data["save" + _root.selectedslot].cardsused = [false, false];
_root.so.data["save" + _root.selectedslot].xspeed = (yspeed = 0);
_root.so.data["save" + _root.selectedslot].block = false;
_root.so.data["save" + _root.selectedslot].currentroom = [0, 1];
_root.so.data["save" + _root.selectedslot].gravity = 0.1;
_root.so.data["save" + _root.selectedslot].second = 0;
_root.so.data["save" + _root.selectedslot].jumppower = -2;
_root.so.data["save" + _root.selectedslot].walkpower = 1;
_root.so.data["save" + _root.selectedslot].floorangle = 5;
_root.so.data["save" + _root.selectedslot].climbing = false;
_root.so.data["save" + _root.selectedslot].walking = false;
_root.so.data["save" + _root.selectedslot].crouching = (crouched = false);
_root.so.data["save" + _root.selectedslot].invisible = false;
_root.so.data["save" + _root.selectedslot].switch1 = false;
_root.so.data["save" + _root.selectedslot].switch2 = false;
_root.so.data["save" + _root.selectedslot].switch3 = false;
_root.so.data["save" + _root.selectedslot].switch4 = false;
_root.so.data["save" + _root.selectedslot].allowinput = false;
_root.so.data["save" + _root.selectedslot].portopen = false;
_root.so.data["save" + _root.selectedslot].kodl = 0;
_root.so.data["save" + _root.selectedslot].kd = "0";
_root.so.data["save" + _root.selectedslot].h_box1 = false;
_root.so.data["save" + _root.selectedslot].hboxes.box1 = false;
_root.so.data["save" + _root.selectedslot].hboxes.box2 = false;
_root.so.data["save" + _root.selectedslot].hboxes.box3 = false;
_root.so.data["save" + _root.selectedslot].hboxes.box4 = false;
_root.one_btn.useHandCursor = false;
_root.two_btn.useHandCursor = false;
_root.three_btn.useHandCursor = false;
_root.showsaves();
_root.allowclick = false;
_root.drawcurts("game", "'Where am I........................ I should get out from here'");
removeMovieClip(this._parent);
}
}
};
this.onEnterFrame = function () {
if (Key.isDown(13)) {
if (txt.text.length >= 3) {
if (txt.text != "empty") {
_root.so.data["save" + _root.selectedslot].user = txt.text;
_root.so.data["save" + _root.selectedslot].xpos = 50;
_root.so.data["save" + _root.selectedslot].ypos = 251;
_root.so.data["save" + _root.selectedslot].maxhealth = 10;
_root.so.data["save" + _root.selectedslot].health = 10;
_root.so.data["save" + _root.selectedslot].cardsgotten = [false, false];
_root.so.data["save" + _root.selectedslot].cardsused = [false, false];
_root.so.data["save" + _root.selectedslot].xspeed = (yspeed = 0);
_root.so.data["save" + _root.selectedslot].block = false;
_root.so.data["save" + _root.selectedslot].currentroom = [0, 1];
_root.so.data["save" + _root.selectedslot].gravity = 0.1;
_root.so.data["save" + _root.selectedslot].second = 0;
_root.so.data["save" + _root.selectedslot].jumppower = -2;
_root.so.data["save" + _root.selectedslot].walkpower = 1;
_root.so.data["save" + _root.selectedslot].floorangle = 5;
_root.so.data["save" + _root.selectedslot].climbing = false;
_root.so.data["save" + _root.selectedslot].walking = false;
_root.so.data["save" + _root.selectedslot].crouching = (crouched = false);
_root.so.data["save" + _root.selectedslot].invisible = false;
_root.so.data["save" + _root.selectedslot].switch1 = false;
_root.so.data["save" + _root.selectedslot].switch2 = false;
_root.so.data["save" + _root.selectedslot].switch3 = false;
_root.so.data["save" + _root.selectedslot].switch4 = false;
_root.so.data["save" + _root.selectedslot].allowinput = false;
_root.so.data["save" + _root.selectedslot].portopen = false;
_root.so.data["save" + _root.selectedslot].kodl = 0;
_root.so.data["save" + _root.selectedslot].kd = "0";
_root.so.data["save" + _root.selectedslot].h_box1 = false;
_root.one_btn.useHandCursor = false;
_root.two_btn.useHandCursor = false;
_root.three_btn.useHandCursor = false;
_root.showsaves();
_root.allowclick = false;
_root.drawcurts("game", "'Where am I........................ I should get out from here'");
removeMovieClip(this);
}
}
}
};
Symbol 222 MovieClip [save_g] Frame 1
ye.onRelease = function () {
_root.so.data["save" + _root.selectedslot].maxhealth = _root.maxhealth;
_root.so.data["save" + _root.selectedslot].health = _root.health;
_root.so.data["save" + _root.selectedslot].cardsgotten = _root.cardsgotten.slice(0, 4);
_root.so.data["save" + _root.selectedslot].cardsused = _root.cardsused.slice(0, 4);
_root.so.data["save" + _root.selectedslot].currentroom = _root.currentroom.slice(0, 2);
_root.so.data["save" + _root.selectedslot].xpos = _root.man._x;
_root.so.data["save" + _root.selectedslot].ypos = _root.man._y;
_root.so.data["save" + _root.selectedslot].switch1 = _root.asektor.switch1;
_root.so.data["save" + _root.selectedslot].switch2 = _root.asektor.switch2;
_root.so.data["save" + _root.selectedslot].switch3 = _root.asektor.switch3;
_root.so.data["save" + _root.selectedslot].switch4 = _root.asektor.switch4;
_root.so.data["save" + _root.selectedslot].allowinput = _root.asektor.allowinput;
_root.so.data["save" + _root.selectedslot].portopen = _root.asektor.portopen;
_root.so.data["save" + _root.selectedslot].kodl = _root.asektor.kodl;
_root.so.data["save" + _root.selectedslot].kd = _root.asektor.kd;
_root.so.data["save" + _root.selectedslot].h_box1 = _root.asektor.h_box1;
_root.so.data["save" + _root.selectedslot].hboxes = _root.hboxes;
removeMovieClip(this._parent);
_root.blind.fadeout = true;
};
no.onRelease = function () {
removeMovieClip(this._parent);
_root.blind.fadeout = true;
};
Symbol 225 MovieClip [overna] Frame 1
ye.onRelease = function () {
_root.attachMovie("e_name", "e_name", 30000, {_x:275, _y:200});
removeMovieClip(this._parent);
};
no.onRelease = function () {
_root.allowclick = true;
removeMovieClip(this._parent);
};
Symbol 232 MovieClip Frame 1
this.onEnterFrame = function () {
if (!_root.invisible) {
if (this.hitTest(_root.man._x, _root.man._y - 2)) {
totoro = 0;
while (totoro < 10) {
_root.createblood(_root.man._x, _root.man._y - 10);
totoro++;
}
_root.yspeed = _root.yspeed - 1;
attack = Math.round(Math.floor(Math.random() * 2)) + 1;
_root.health = _root.health - attack;
trace("Spikes hit you with a damage of " + attack);
_root.updatehealth();
_root.hurt(_root.man);
}
}
};
Symbol 246 MovieClip [room31] Frame 1
this.onEnterFrame = function () {
if (!shaken) {
if (ac1.hitTest(_root.man._x, _root.man._y)) {
_root.quake(29, "what was that?");
shaken = true;
}
}
};
Symbol 260 MovieClip Frame 1
driving = false;
truck.onEnterFrame = function () {
if (!driving) {
if (_root.ground.ac1.hitTest(_root.man._x, _root.man._y)) {
blocker._x = 10;
driving = true;
_root.block = true;
_root.man._x = this._x + 18.7;
_root.man._y = this._y - 0.5;
_root.jumping = false;
_root.walking = false;
_root.man.gotoAndStop("standby");
}
} else if (this._x < 400) {
_root.yspeed = 0;
_root.xspeed = 0;
_root.block = true;
this._x++;
_root.man._x = this._x + 18.7;
_root.man._y = this._y - 0.5;
} else {
blocker._x = 390;
_root.block = false;
}
if (_root.ground.ac2.hitTest(_root.man._x, _root.man._y)) {
driving = false;
closing = true;
blocker._x = 427.5;
}
if (closing) {
if (this._x > 75) {
this._x--;
}
}
};
Symbol 263 MovieClip Frame 1
this.onEnterFrame = function () {
this._x = this._parent.ground.truck._x;
};
Symbol 264 MovieClip [room41] Frame 1
this.onEnterFrame = function () {
if (ac3.hitTest(_root.man._x, _root.man._y)) {
if (!msgs) {
trace("hit");
_root.showmessage("This place's weird");
msgs = true;
}
}
if (ac4.hitTest(_root.man._x, _root.man._y)) {
if (!mss) {
trace("hit");
poop = _root.attachMovie("falling_human", "fman", 304, {_x:200, _y:-20, yspeed:2});
poop.onEnterFrame = function () {
this._y = this._y + this.yspeed;
this.yspeed = this.yspeed + 0.1;
if (this._y > 400) {
removeMovieClip(this);
}
};
mss = true;
}
}
};
Symbol 278 MovieClip Frame 1
goup = true;
time = 40;
this.onEnterFrame = function () {
if (!_root.paus) {
if (prutt.hitTest(_root.man._x, _root.man._y - 26)) {
if (this._x < _root.man._x) {
_root.man._x = this._x + 10;
} else {
_root.man._x = this._x - 10;
}
if (!goup) {
_root.attackrand(3);
}
}
if (goup) {
if (prutt._y > -37.5) {
prutt._y = prutt._y - 2;
} else if (Math.random() > 0.98) {
goup = false;
}
} else if (prutt._y < 0) {
prutt._y = prutt._y + 3;
} else {
time--;
if (time <= 0) {
time = 40;
goup = true;
}
}
}
};
Symbol 287 MovieClip Frame 1
this.onEnterFrame = function () {
if (this.hitTest(_root.man._x, _root.man._y + 1, true)) {
if (!inverted) {
if (!_root.ground.ground.hitTest(_root.man._x + 5, _root.man._y - 20, true)) {
_root.man._x = _root.man._x + 1;
}
} else if (!_root.ground.ground.hitTest(_root.man._x - 5, _root.man._y - 20, true)) {
_root.man._x = _root.man._x - 1;
}
}
};
Symbol 289 MovieClip [room51] Frame 1
if (_root.asektor.portopen) {
ground.port5._y = -132.8;
}
if (_root.asektor.switch2) {
ground.port1._x = 20;
}
if (_root.asektor.switch1) {
ground.port4._x = 395.3;
}
if (_root.asektor.switch4) {
ground.port3._x = 132.8;
}
Instance of Symbol 287 MovieClip in Symbol 289 MovieClip [room51] Frame 1
onClipEvent (load) {
inverted = true;
}
Symbol 301 MovieClip Frame 1
fadein = false;
tajm = 10;
this.onEnterFrame = function () {
if (!_root.paus) {
if (this._alpha > 50) {
if (this.hitTest(_root.man._x, _root.man._y - 12)) {
_root.attackrand(1);
}
}
if (!fadein) {
this._alpha = this._alpha - 1;
if (this._alpha < 0) {
if (Math.random() > 0.98) {
fadein = true;
}
}
} else if (this._alpha < 100) {
this._alpha = this._alpha + 10;
} else {
tajm--;
if (tajm < 0) {
tajm = 10;
fadein = false;
}
}
}
};
Symbol 312 MovieClip Frame 1
stop();
Symbol 316 MovieClip [room50] Frame 1
if (_root.asektor.h_box1) {
h_box1._visible = false;
}
this.onEnterFrame = function () {
if (h_box1.hitTest(_root.man._x, _root.man._y)) {
if (!_root.asektor.h_box1) {
_root.addhealth(5);
_root.asektor.h_box1 = true;
h_box1._visible = false;
}
}
if (Key.isDown(32)) {
if (sw_2.hitTest(_root.man._x, _root.man._y - 2)) {
sw_2.play();
if (_root.asektor.allowinput) {
if (_root.asektor.kodl == 0) {
_root.asektor.kodl = 1;
_root.asektor.kd = "2";
trace("the code is now " + _root.asektor.kd);
}
} else if (!_root.asektor.switch2) {
_root.asektor.switch2 = true;
sw_2.play();
}
} else if (sw_1.hitTest(_root.man._x, _root.man._y - 2)) {
if (_root.asektor.allowinput) {
if (!spacedown) {
if (_root.asektor.kd == "2") {
_root.asektor.kd = _root.asektor.kd + "1";
_root.asektor.kodl = 2;
sw_1.play();
trace("code so far is " + _root.asektor.kd);
} else if (_root.asektor.kd != "21") {
sw_1.play();
trace("code failed and is now reset");
_root.asektor.kd = "0";
_root.asektor.kodl = 0;
}
}
} else if (!_root.asektor.switch1) {
_root.asektor.switch1 = true;
sw_1.play();
}
}
spacedown = true;
} else {
spacedown = false;
}
};
Symbol 328 MovieClip [room61] Frame 1
this.onEnterFrame = function () {
if (Key.isDown(32)) {
if (sw_4.hitTest(_root.man._x, _root.man._y - 2)) {
if (_root.asektor.allowinput) {
if (!spacedown) {
if (_root.asektor.kd == "213") {
_root.asektor.kd + "4";
_root.asektor.kodl = 4;
sw_4.play();
_root.quake(10);
_root.asektor.allowinput = false;
_root.asektor.portopen = true;
trace("code so far is " + _root.asektor.kd);
} else if (_root.asektor.kd != "2134") {
sw_4.play();
trace("code failed and is now reset");
_root.asektor.kd = "0";
_root.asektor.kodl = 0;
}
}
} else if (!_root.asektor.switch4) {
_root.asektor.switch4 = true;
sw_4.play();
}
} else if (s_spot.hitTest(_root.man._x, _root.man._y)) {
_root.save_g();
}
spacedown = true;
} else {
spacedown = false;
}
};
Symbol 334 MovieClip [room52] Frame 1
this.onEnterFrame = function () {
if (Key.isDown(32)) {
if (sw_3.hitTest(_root.man._x, _root.man._y - 2)) {
if (_root.asektor.allowinput) {
if (!spacedown) {
if (_root.asektor.kd == "21") {
_root.asektor.kd = _root.asektor.kd + "3";
_root.asektor.kodl = 3;
sw_3.play();
trace("code so far is " + _root.asektor.kd);
} else if (_root.asektor.kd != "213") {
sw_3.play();
trace("code failed and is now reset");
_root.asektor.kd = "0";
_root.asektor.kodl = 0;
}
}
} else if (!_root.asektor.switch3) {
_root.asektor.switch3 = true;
_root.asektor.allowinput = true;
sw_3.play();
}
}
if (ac1.hitTest(_root.man._x, _root.man._y)) {
_root.showsign("Bananas Are Cooler than Dadels A=1");
}
spacedown = true;
} else {
spacedown = false;
}
};
Symbol 345 MovieClip [room71] Frame 1
if (!_root.msg100) {
_root.showmessage("I should be careful with these lasers and stuff");
_root.msg100 = true;
}
Symbol 352 MovieClip [room70] Frame 1
if (_root.box1) {
h_box1._visible = false;
}
this.onEnterFrame = function () {
if (h_box1.hitTest(_root.man._x, _root.man._y)) {
if (!_root.box1) {
_root.addhealth(4);
_root.box1 = true;
h_box1._visible = false;
}
}
};
Symbol 365 MovieClip Frame 1
this.onEnterFrame = function () {
if (this.hitTest(_root.man._x, _root.man._y)) {
_root.man._y = (this._y - (this._height / 2)) - 1;
if (Key.isDown(38)) {
if (bouncyness == undefined) {
_root.yspeed = -2;
} else {
_root.yspeed = this.bouncyness * 2;
}
} else if (bouncyness == undefined) {
_root.yspeed = -1;
} else {
_root.yspeed = bouncyness;
}
}
};
Symbol 368 MovieClip [room81] Frame 1
b1.bouncyness = -2;
b2.bouncyness = -2;
b3.bouncyness = -2;
Symbol 376 MovieClip Frame 1
stop();
Symbol 378 MovieClip [room72] Frame 1
this.onEnterFrame = function () {
if (ac2.hitTest(_root.man._x, _root.man._y)) {
if (!msgshown) {
_root.showmessage("heh. a hidden passage");
msgshown = true;
}
}
if (!_root.bigquake1) {
if (ac1.hitTest(_root.man._x, _root.man._y)) {
_root.attachMovie("flash", "flasss", 343249844);
_root.quake(20, "that quake was pretty scary. and now this way is blocked, great");
_root.bigquake1 = true;
ground.gotoAndStop(2);
}
}
};
Symbol 388 MovieClip [q_btn] Frame 1
stop();
Symbol 401 MovieClip [flash] Frame 9
removeMovieClip(this);
Symbol 408 MovieClip [room73] Frame 1
keypadshown = false;
this.onEnterFrame = function () {
if (Key.isDown(32)) {
if (!keypadshown) {
if (ac1.hitTest(_root.man._x, _root.man._y - 5)) {
_root.block = true;
_root.attachkeypad(6);
keypadshown = true;
}
}
}
if (accessdone) {
if (ground.port1._y > 135) {
ground.port1._y = ground.port1._y - 2.5;
}
}
};
Symbol 419 MovieClip Frame 1
stop();
Symbol 421 MovieClip [keypad] Frame 1
function g_rand_c() {
l = 0;
while (l < maxcl) {
rightcode = rightcode + nombers[random(9)];
l++;
}
}
function getc() {
unec = "";
u = 0;
while (u < codel) {
unec = unec + rightcode.charAt(u);
u++;
}
return(unec);
}
function chack() {
if (codel >= maxcl) {
currentcode = finimsg;
codefini = true;
u_c();
this.onEnterFrame = function () {
this._alpha = this._alpha - 2;
if (this._alpha < 0) {
_root.ground.accessdone = true;
_root.block = false;
_root.paus = false;
removeMovieClip(this);
}
};
}
}
function u_c() {
txt.text = currentcode;
}
currentcode = "";
rightcode = "";
nombers = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"];
g_rand_c();
codel = 0;
finimsg = "thank you";
k1.onPress = function () {
if (!codefini) {
if (codel == 0) {
if (rightcode.charAt(0) == "1") {
currentcode = currentcode + "1";
codel++;
}
} else if ((currentcode == getc()) && (rightcode.charAt(codel) == "1")) {
currentcode = currentcode + "1";
codel++;
} else {
codel = 0;
currentcode = "";
}
chack();
u_c();
}
};
k2.onPress = function () {
if (!codefini) {
if (codel == 0) {
if (rightcode.charAt(0) == "2") {
currentcode = currentcode + "2";
codel++;
}
} else if ((currentcode == getc()) && (rightcode.charAt(codel) == "2")) {
currentcode = currentcode + "2";
codel++;
} else {
codel = 0;
currentcode = "";
}
chack();
u_c();
}
};
k3.onPress = function () {
if (!codefini) {
if (codel == 0) {
if (rightcode.charAt(0) == "3") {
currentcode = currentcode + "3";
codel++;
}
} else if ((currentcode == getc()) && (rightcode.charAt(codel) == "3")) {
currentcode = currentcode + "3";
codel++;
} else {
codel = 0;
currentcode = "";
}
chack();
u_c();
}
};
k4.onPress = function () {
if (!codefini) {
if (codel == 0) {
if (rightcode.charAt(0) == "4") {
currentcode = currentcode + "4";
codel++;
}
} else if ((currentcode == getc()) && (rightcode.charAt(codel) == "4")) {
currentcode = currentcode + "4";
codel++;
} else {
codel = 0;
currentcode = "";
}
chack();
u_c();
}
};
k5.onPress = function () {
if (!codefini) {
if (codel == 0) {
if (rightcode.charAt(0) == "5") {
currentcode = currentcode + "5";
codel++;
}
} else if ((currentcode == getc()) && (rightcode.charAt(codel) == "5")) {
currentcode = currentcode + "5";
codel++;
} else {
codel = 0;
currentcode = "";
}
chack();
u_c();
}
};
k6.onPress = function () {
if (!codefini) {
if (codel == 0) {
if (rightcode.charAt(0) == "6") {
currentcode = currentcode + "6";
codel++;
}
} else if ((currentcode == getc()) && (rightcode.charAt(codel) == "6")) {
currentcode = currentcode + "6";
codel++;
} else {
codel = 0;
currentcode = "";
}
chack();
u_c();
}
};
k7.onPress = function () {
if (!codefini) {
if (codel == 0) {
if (rightcode.charAt(0) == "7") {
currentcode = currentcode + "7";
codel++;
}
} else if ((currentcode == getc()) && (rightcode.charAt(codel) == "7")) {
currentcode = currentcode + "7";
codel++;
} else {
codel = 0;
currentcode = "";
}
chack();
u_c();
}
};
k8.onPress = function () {
if (!codefini) {
if (codel == 0) {
if (rightcode.charAt(0) == "8") {
currentcode = currentcode + "8";
codel++;
}
} else if ((currentcode == getc()) && (rightcode.charAt(codel) == "8")) {
currentcode = currentcode + "8";
codel++;
} else {
codel = 0;
currentcode = "";
}
chack();
u_c();
}
};
k9.onPress = function () {
if (!codefini) {
if (codel == 0) {
if (rightcode.charAt(0) == "9") {
currentcode = currentcode + "9";
codel++;
}
} else if ((currentcode == getc()) && (rightcode.charAt(codel) == "9")) {
currentcode = currentcode + "9";
codel++;
} else {
codel = 0;
currentcode = "";
}
chack();
u_c();
}
};
k0.onPress = function () {
if (!codefini) {
if (codel == 0) {
if (rightcode.charAt(0) == "0") {
currentcode = currentcode + "0";
codel++;
}
} else if ((currentcode == getc()) && (rightcode.charAt(codel) == "0")) {
currentcode = currentcode + "0";
codel++;
} else {
codel = 0;
currentcode = "";
}
chack();
u_c();
}
};
i = 0;
while (i < 10) {
this["k" + i].txt.text = i;
i++;
}
Symbol 428 MovieClip [room83] Frame 1
this.onEnterFrame = function () {
if (Key.isDown(32)) {
if (s_game.hitTest(_root.man._x, _root.man._y - 5)) {
_root.save_g();
}
}
if (ac1.hitTest(_root.man._x, _root.man._y)) {
_root.block = true;
_root.man._x = 240;
_root.man._y = ground.el._y;
_root.walking = false;
_root.jumping = false;
_root.man.gotoAndStop("standby");
if (ground.el.door._y < -12.3) {
ground.el.door._y++;
} else {
ground.el._y++;
}
}
};
Symbol 432 MovieClip [room86] Frame 1
ground.el.door._y = -12.3;
yspeed = 16;
go = 0;
msgshown = false;
this.onEnterFrame = function () {
if (ac1.hitTest(_root.man._x, _root.man._y)) {
go = 1;
} else if (ac2.hitTest(_root.man._x, _root.man._y)) {
go = 2;
}
if (go == 2) {
ground.el.door._y = -1212.3;
ground.el._y = 247.5;
yspeed = 0;
} else if (go == 1) {
if (ground.el._y < 247.5) {
_root.man._x = ground.el._x;
_root.man._y = ground.el._y;
ground.el._y = ground.el._y + yspeed;
yspeed = yspeed + 0.1;
} else {
if (!msgshown) {
go = 0;
_root.man._y = ground.el._y - 1;
ground.el.door._y = -1212.3;
_root.quake(10, "phew.... that was evil");
msgshown = true;
ground.el._y = 247.5;
_root.block = false;
iid = 0;
while (iid < 80) {
_root.createdust(ground.el._x, ground.el._y);
iid++;
}
}
yspeed = 0;
}
}
};
Symbol 436 MovieClip [room85] Frame 1
ground.el.door._y = -12.3;
yspeed = 8.8;
this.onEnterFrame = function () {
_root.man._x = ground.el._x;
_root.man._y = ground.el._y;
ground.el._y = ground.el._y + yspeed;
yspeed = yspeed + 0.1;
};
Symbol 437 MovieClip [room84] Frame 1
ground.el.door._y = -12.3;
yspeed = 0;
_root.quake(3);
this.onEnterFrame = function () {
_root.man._x = ground.el._x;
_root.man._y = ground.el._y;
ground.el._y = ground.el._y + yspeed;
yspeed = yspeed + 0.1;
};
Symbol 449 MovieClip Frame 1
this.onEnterFrame = function () {
if (!_root.paus) {
if (Math.random() > 0.995) {
_root.ground.attachMovie("fireball", "fireball" + _root.fireballs, 3333 + _root.fireballs, {_x:this._x, _y:this._y, _rotation:this._rotation});
if (this._rotation == 0) {
_root.ground["fireball" + _root.fireballs].xspeed = 2;
} else if (this._rotation == -90) {
_root.ground["fireball" + _root.fireballs].yspeed = -2;
} else if (this._rotation == 90) {
_root.ground["fireball" + _root.fireballs].yspeed = 2;
} else if ((this._rotation == 180) || (this._rotation == -180)) {
_root.ground["fireball" + _root.fireballs].xspeed = -2;
}
_root.ground["fireball" + _root.fireballs].onEnterFrame = function () {
if (!_root.paus) {
this._x = this._x + this.xspeed;
this._y = this._y + this.yspeed;
if (_root.man.hitTest(this._x, this._y)) {
_root.attackrand(2);
removeMovieClip(this);
}
if ((((this._x <= 0) || (this._x >= 550)) || (this._y <= 0)) || (this._y >= 400)) {
removeMovieClip(this);
}
}
};
_root.fireballs++;
if (_root.fireballs > 10) {
_root.fireballs = 0;
}
}
}
};
Symbol 450 MovieClip [room76] Frame 1
p1right = false;
this.onEnterFrame = function () {
if (ground.p_form.hitTest(_root.man._x, _root.man._y + 2)) {
if (!p1right) {
_root.sxspeed = -1;
} else {
_root.sxspeed = 1;
}
} else {
_root.sxspeed = 0;
}
if (p1right) {
if (ground.p_form._x < 398) {
ground.p_form._x++;
} else {
p1right = false;
}
} else if (ground.p_form._x > 263) {
ground.p_form._x--;
} else {
p1right = true;
}
};
Symbol 469 MovieClip [room65] Frame 1
p1right = false;
p2right = false;
p3right = false;
bt.bouncyness = -5;
if (_root.hbblox2) {
hbox._visible = false;
}
this.onEnterFrame = function () {
if (!_root.hbblox2) {
if (hbox.hitTest(_root.man._x, _root.man._y)) {
_root.addhealth(4);
hbox._visible = false;
_root.hbblox2 = true;
}
}
if (ground.p_form1.hitTest(_root.man._x, _root.man._y + 2)) {
if (!p1right) {
_root.sxspeed = -1;
} else {
_root.sxspeed = 1;
}
} else if (ground.p_form2.hitTest(_root.man._x, _root.man._y + 2)) {
if (!p2right) {
_root.sxspeed = -1;
} else {
_root.sxspeed = 1;
}
} else if (ground.p_form3.hitTest(_root.man._x, _root.man._y + 2)) {
if (!p3right) {
_root.sxspeed = -1;
} else {
_root.sxspeed = 1;
}
} else {
_root.sxspeed = 0;
}
if (p1right) {
if (ground.p_form1._x < 470) {
ground.p_form1._x++;
} else {
p1right = false;
}
} else if (ground.p_form1._x > 230) {
ground.p_form1._x--;
} else {
p1right = true;
}
if (p2right) {
if (ground.p_form2._x < 426) {
ground.p_form2._x++;
} else {
p2right = false;
}
} else if (ground.p_form2._x > 341) {
ground.p_form2._x--;
} else {
p2right = true;
}
if (p3right) {
if (ground.p_form3._x < 280) {
ground.p_form3._x++;
} else {
p3right = false;
}
} else if (ground.p_form3._x > 184) {
ground.p_form3._x--;
} else {
p3right = true;
}
};
Symbol 475 MovieClip [room64] Frame 1
p1right = false;
this.onEnterFrame = function () {
if (ground.p_form1.hitTest(_root.man._x, _root.man._y + 1)) {
if (!p1right) {
_root.syspeed = -1;
} else {
_root.syspeed = 1;
}
} else {
_root.syspeed = 0;
}
if (p1right) {
if (ground.p_form1._y < 269.3) {
ground.p_form1._y++;
} else {
p1right = false;
}
} else if (ground.p_form1._y > 100) {
ground.p_form1._y--;
} else {
p1right = true;
}
};
Symbol 480 MovieClip [room63] Frame 1
keypadshown = false;
this.onEnterFrame = function () {
if (Key.isDown(32)) {
if (!keypadshown) {
if (ac1.hitTest(_root.man._x, _root.man._y - 5)) {
_root.block = true;
_root.attachkeypad(10);
keypadshown = true;
}
}
}
if (accessdone) {
if (ground.port_1._y > 308.3) {
ground.port_1._y = ground.port_1._y - 2.5;
}
}
};
Symbol 489 MovieClip [room53] Frame 1
this.onEnterFrame = function () {
if (ac1.hitTest(_root.man._x, _root.man._y)) {
_root.drawlite("end", "To be continued(?) the save files were pretty useless");
_root.removeall();
}
};
Symbol 519 MovieClip [__Packages.MochiAd] Frame 0
class MochiAd
{
function MochiAd () {
}
static function getVersion() {
return("2.7");
}
static function showPreGameAd(options) {
var _local26 = {clip:_root, ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:16747008, background:16777161, outline:13994812, no_progress_bar:false, ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_loaded:function (width, height) {
}, ad_skipped:function () {
}, ad_progress:function (percent) {
}};
options = _parseOptions(options, _local26);
if ("c862232051e0a94e1c3609b3916ddb17".substr(0) == "dfeada81ac97cde83665f81c12da7def") {
options.ad_started();
options.ad_finished();
return(undefined);
}
var clip = options.clip;
var _local22 = 11000;
var _local25 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local14 = _getRes(options);
var _local4 = _local14[0];
var _local13 = _local14[1];
mc._x = _local4 * 0.5;
mc._y = _local13 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk._x = _local4 * -0.5;
chk._y = _local13 * -0.5;
var _local6 = chk.createEmptyMovieClip("_mochiad_bar", 4);
if (options.no_progress_bar) {
_local6._visible = false;
delete options.no_progress_bar;
} else {
_local6._x = 10;
_local6._y = _local13 - 20;
}
var _local21 = options.color;
delete options.color;
var _local19 = options.background;
delete options.background;
var _local23 = options.outline;
delete options.outline;
var _local5 = _local6.createEmptyMovieClip("_outline", 1);
_local5.beginFill(_local19);
_local5.moveTo(0, 0);
_local5.lineTo(_local4 - 20, 0);
_local5.lineTo(_local4 - 20, 10);
_local5.lineTo(0, 10);
_local5.lineTo(0, 0);
_local5.endFill();
var _local3 = _local6.createEmptyMovieClip("_inside", 2);
_local3.beginFill(_local21);
_local3.moveTo(0, 0);
_local3.lineTo(_local4 - 20, 0);
_local3.lineTo(_local4 - 20, 10);
_local3.lineTo(0, 10);
_local3.lineTo(0, 0);
_local3.endFill();
_local3._xscale = 0;
var _local7 = _local6.createEmptyMovieClip("_outline", 3);
_local7.lineStyle(0, _local23, 100);
_local7.moveTo(0, 0);
_local7.lineTo(_local4 - 20, 0);
_local7.lineTo(_local4 - 20, 10);
_local7.lineTo(0, 10);
_local7.lineTo(0, 0);
chk.ad_msec = _local22;
chk.ad_timeout = _local25;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.regContLC = function (lc_name) {
mc._containerLCName = lc_name;
};
var sendHostProgress = false;
mc.lc.sendHostLoadProgress = function (lc_name) {
sendHostProgress = true;
};
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec;
};
mc.lc.rpc = function (callbackID, arg) {
MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
chk.onEnterFrame = function () {
var _local6 = this._parent._parent;
var _local11 = this._parent._mochiad_ctr;
var _local5 = getTimer() - this.started;
var _local3 = false;
var _local4 = _local6.getBytesTotal();
var _local8 = _local6.getBytesLoaded();
var _local2 = (100 * _local8) / _local4;
var _local10 = (100 * _local5) / chk.ad_msec;
var _local9 = this._mochiad_bar._inside;
var _local13 = Math.min(100, Math.min(_local2 || 0, _local10));
_local13 = Math.max(this.last_pcnt, _local13);
this.last_pcnt = _local13;
_local9._xscale = _local13;
options.ad_progress(_local13);
if (sendHostProgress) {
clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"hostLoadPcnt", pcnt:_local2});
if (_local2 == 100) {
sendHostProgress = false;
}
}
if (!chk.showing) {
var _local7 = _local11.getBytesTotal();
if ((_local7 > 0) || (typeof(_local7) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if ((_local5 > chk.ad_timeout) && (_local2 == 100)) {
options.ad_failed();
_local3 = true;
}
}
if (_local5 > chk.ad_msec) {
_local3 = true;
}
if (((_local4 > 0) && (_local8 >= _local4)) && (_local3)) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
}
}
};
}
static function showClickAwayAd(options) {
var _local9 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showClickAwayAd", res:"300x250", no_bg:true, ad_started:function () {
}, ad_finished:function () {
}, ad_loaded:function (width, height) {
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function () {
}};
options = _parseOptions(options, _local9);
var clip = options.clip;
var _local8 = options.ad_timeout;
delete options.ad_timeout;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local4 = _getRes(options);
var _local10 = _local4[0];
var _local7 = _local4[1];
mc._x = _local10 * 0.5;
mc._y = _local7 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_timeout = _local8;
chk.started = getTimer();
chk.showing = false;
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.rpc = function (callbackID, arg) {
MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
var _local20 = false;
mc.lc.regContLC = function (lc_name) {
mc._containerLCName = lc_name;
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
_local2 = true;
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
options.ad_failed();
_local2 = true;
}
}
if (_local2) {
delete this.onEnterFrame;
}
};
}
static function showInterLevelAd(options) {
var _local13 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_loaded:function (width, height) {
}, ad_skipped:function () {
}};
options = _parseOptions(options, _local13);
var clip = options.clip;
var _local10 = 11000;
var _local12 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local5 = _getRes(options);
var _local14 = _local5[0];
var _local11 = _local5[1];
mc._x = _local14 * 0.5;
mc._y = _local11 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_msec = _local10;
chk.ad_timeout = _local12;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec - 250;
};
mc.lc.rpc = function (callbackID, arg) {
MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
options.ad_failed();
_local2 = true;
}
}
if (_local4 > chk.ad_msec) {
_local2 = true;
}
if (_local2) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
}
}
};
}
static function showPreloaderAd(options) {
trace("[MochiAd] DEPRECATED: showPreloaderAd was renamed to showPreGameAd in 2.0");
showPreGameAd(options);
}
static function showTimedAd(options) {
trace("[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0");
showInterLevelAd(options);
}
static function _allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function load(options) {
var _local13 = {clip:_root, server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = _parseOptions(options, _local13);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local9 = options.clip;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local9._mochiad_loaded) {
return(null);
}
var _local12 = options.depth;
delete options.depth;
var _local6 = _local9.createEmptyMovieClip("_mochiad", _local12);
var _local11 = _getRes(options);
options.res = (_local11[0] + "x") + _local11[1];
options.server = options.server + options.id;
delete options.id;
_local9._mochiad_loaded = true;
var _local4 = _local6.createEmptyMovieClip("_mochiad_ctr", 1);
for (var _local7 in options) {
_local4[_local7] = options[_local7];
}
var _local10 = _local4.server;
delete _local4.server;
var _local14 = _allowDomains(_local10);
_local6.onEnterFrame = function () {
if (this._mochiad_ctr._url != this._url) {
this.onEnterFrame = function () {
if (!this._mochiad_ctr) {
delete this.onEnterFrame;
MochiAd.unload(this._parent);
}
};
}
};
var _local5 = new LocalConnection();
var _local8 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local5.mc = _local6;
_local5.name = _local8;
_local5.hostname = _local14;
_local5.allowDomain = function (d) {
return(true);
};
_local5.allowInsecureDomain = _local5.allowDomain;
_local5.connect(_local8);
_local6.lc = _local5;
_local4.lc = _local8;
_local4.st = getTimer();
_local4.loadMovie(_local10 + ".swf", "POST");
return(_local6);
}
static function unload(clip) {
if (typeof(clip) == "undefined") {
clip = _root;
}
if (clip.clip && (clip.clip._mochiad)) {
clip = clip.clip;
}
if (!clip._mochiad) {
return(false);
}
if (clip._mochiad._containerLCName != undefined) {
clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"unload"});
}
clip._mochiad.removeMovieClip();
delete clip._mochiad_loaded;
delete clip._mochiad;
return(true);
}
static function _isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function _getRes(options) {
var _local3 = options.clip.getBounds();
var _local2 = 0;
var _local1 = 0;
if (typeof(options.res) != "undefined") {
var _local4 = options.res.split("x");
_local2 = parseFloat(_local4[0]);
_local1 = parseFloat(_local4[1]);
} else {
_local2 = _local3.xMax - _local3.xMin;
_local1 = _local3.yMax - _local3.yMin;
}
if ((_local2 == 0) || (_local1 == 0)) {
_local2 = Stage.width;
_local1 = Stage.height;
}
return([_local2, _local1]);
}
static function _parseOptions(options, defaults) {
var _local4 = {};
for (var _local8 in defaults) {
_local4[_local8] = defaults[_local8];
}
if (options) {
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
}
if (_root.mochiad_options) {
var _local5 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local5.length) {
var _local3 = _local5[_local2].split("=");
_local4[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
if (_local4.id == "test") {
trace("[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!");
}
return(_local4);
}
static function rpc(clip, callbackID, arg) {
switch (arg.id) {
case "setValue" :
setValue(clip, arg.objectName, arg.value);
break;
case "getValue" :
var _local4 = getValue(clip, arg.objectName);
clip._mochiad.lc.send(clip._mochiad._containerLCName, "rpcResult", callbackID, _local4);
break;
case "runMethod" :
var _local3 = runMethod(clip, arg.method, arg.args);
clip._mochiad.lc.send(clip._mochiad._containerLCName, "rpcResult", callbackID, _local3);
break;
default :
trace("[mochiads rpc] unknown rpc id: " + arg.id);
}
}
static function setValue(base, objectName, value) {
var _local2 = objectName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
base[_local2[_local1]] = value;
}
static function getValue(base, objectName) {
var _local2 = objectName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
return(base[_local2[_local1]]);
}
static function runMethod(base, methodName, argsArray) {
var _local2 = methodName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
if (typeof(base[_local2[_local1]]) == "function") {
return(base[_local2[_local1]].apply(base, argsArray));
}
return(undefined);
}
}
Symbol 520 MovieClip [__Packages.mx.transitions.OnEnterFrameBeacon] Frame 0
class mx.transitions.OnEnterFrameBeacon
{
function OnEnterFrameBeacon () {
}
static function init() {
var _local4 = _global.MovieClip;
if (!_root.__OnEnterFrameBeacon) {
mx.transitions.BroadcasterMX.initialize(_local4);
var _local3 = _root.createEmptyMovieClip("__OnEnterFrameBeacon", 9876);
_local3.onEnterFrame = function () {
_global.MovieClip.broadcastMessage("onEnterFrame");
};
}
}
static var version = "1.1.0.52";
}
Symbol 521 MovieClip [__Packages.mx.transitions.BroadcasterMX] Frame 0
class mx.transitions.BroadcasterMX
{
var _listeners;
function BroadcasterMX () {
}
static function initialize(o, dontCreateArray) {
if (o.broadcastMessage != undefined) {
delete o.broadcastMessage;
}
o.addListener = mx.transitions.BroadcasterMX.prototype.addListener;
o.removeListener = mx.transitions.BroadcasterMX.prototype.removeListener;
if (!dontCreateArray) {
o._listeners = new Array();
}
}
function addListener(o) {
removeListener(o);
if (broadcastMessage == undefined) {
broadcastMessage = mx.transitions.BroadcasterMX.prototype.broadcastMessage;
}
return(_listeners.push(o));
}
function removeListener(o) {
var _local2 = _listeners;
var _local3 = _local2.length;
while (_local3--) {
if (_local2[_local3] == o) {
_local2.splice(_local3, 1);
if (!_local2.length) {
broadcastMessage = undefined;
}
return(true);
}
}
return(false);
}
function broadcastMessage() {
var _local5 = String(arguments.shift());
var _local4 = _listeners.concat();
var _local6 = _local4.length;
var _local3 = 0;
while (_local3 < _local6) {
_local4[_local3][_local5].apply(_local4[_local3], arguments);
_local3++;
}
}
static var version = "1.1.0.52";
}
Symbol 522 MovieClip [__Packages.mx.transitions.Tween] Frame 0
class mx.transitions.Tween
{
var obj, prop, begin, useSeconds, _listeners, addListener, prevTime, _time, looping, _duration, broadcastMessage, isPlaying, _fps, prevPos, _pos, change, _intervalID, _startTime;
function Tween (obj, prop, func, begin, finish, duration, useSeconds) {
mx.transitions.OnEnterFrameBeacon.init();
if (!arguments.length) {
return;
}
this.obj = obj;
this.prop = prop;
this.begin = begin;
position = (begin);
this.duration = (duration);
this.useSeconds = useSeconds;
if (func) {
this.func = func;
}
this.finish = (finish);
_listeners = [];
addListener(this);
start();
}
function set time(t) {
prevTime = _time;
if (t > duration) {
if (looping) {
rewind(t - _duration);
update();
broadcastMessage("onMotionLooped", this);
} else {
if (useSeconds) {
_time = _duration;
update();
}
stop();
broadcastMessage("onMotionFinished", this);
}
} else if (t < 0) {
rewind();
update();
} else {
_time = t;
update();
}
//return(time);
}
function get time() {
return(_time);
}
function set duration(d) {
_duration = (((d == null) || (d <= 0)) ? (_global.Infinity) : (d));
//return(duration);
}
function get duration() {
return(_duration);
}
function set FPS(fps) {
var _local2 = isPlaying;
stopEnterFrame();
_fps = fps;
if (_local2) {
startEnterFrame();
}
//return(FPS);
}
function get FPS() {
return(_fps);
}
function set position(p) {
setPosition(p);
//return(position);
}
function setPosition(p) {
prevPos = _pos;
obj[prop] = (_pos = p);
broadcastMessage("onMotionChanged", this, _pos);
updateAfterEvent();
}
function get position() {
return(getPosition());
}
function getPosition(t) {
if (t == undefined) {
t = _time;
}
return(func(t, begin, change, _duration));
}
function set finish(f) {
change = f - begin;
//return(finish);
}
function get finish() {
return(begin + change);
}
function continueTo(finish, duration) {
begin = position;
this.finish = (finish);
if (duration != undefined) {
this.duration = (duration);
}
start();
}
function yoyo() {
continueTo(begin, time);
}
function startEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.addListener(this);
} else {
_intervalID = setInterval(this, "onEnterFrame", 1000 / _fps);
}
isPlaying = true;
}
function stopEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.removeListener(this);
} else {
clearInterval(_intervalID);
}
isPlaying = false;
}
function start() {
rewind();
startEnterFrame();
broadcastMessage("onMotionStarted", this);
}
function stop() {
stopEnterFrame();
broadcastMessage("onMotionStopped", this);
}
function resume() {
fixTime();
startEnterFrame();
broadcastMessage("onMotionResumed", this);
}
function rewind(t) {
_time = ((t == undefined) ? 0 : (t));
fixTime();
update();
}
function fforward() {
time = (_duration);
fixTime();
}
function nextFrame() {
if (useSeconds) {
time = ((getTimer() - _startTime) / 1000);
} else {
time = (_time + 1);
}
}
function onEnterFrame() {
nextFrame();
}
function prevFrame() {
if (!useSeconds) {
time = (_time - 1);
}
}
function toString() {
return("[Tween]");
}
function fixTime() {
if (useSeconds) {
_startTime = getTimer() - (_time * 1000);
}
}
function update() {
position = (getPosition(_time));
}
static var version = "1.1.0.52";
static var __initBeacon = mx.transitions.OnEnterFrameBeacon.init();
static var __initBroadcaster = mx.transitions.BroadcasterMX.initialize(mx.transitions.Tween.prototype, true);
function func(t, b, c, d) {
return(((c * t) / d) + b);
}
}
Symbol 523 MovieClip [__Packages.mx.transitions.easing.Strong] Frame 0
class mx.transitions.easing.Strong
{
function Strong () {
}
static function easeIn(t, b, c, d) {
t = t / d;
return((((((c * t) * t) * t) * t) * t) + b);
}
static function easeOut(t, b, c, d) {
t = (t / d) - 1;
return((c * (((((t * t) * t) * t) * t) + 1)) + b);
}
static function easeInOut(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return(((((((c / 2) * t) * t) * t) * t) * t) + b);
}
t = t - 2;
return(((c / 2) * (((((t * t) * t) * t) * t) + 2)) + b);
}
static var version = "1.1.0.52";
}
Symbol 524 MovieClip [__Packages.mx.transitions.easing.Bounce] Frame 0
class mx.transitions.easing.Bounce
{
function Bounce () {
}
static function easeOut(t, b, c, d) {
t = t / d;
if (t < 0.363636363636364) {
return((c * ((7.5625 * t) * t)) + b);
}
if (t < 0.727272727272727) {
t = t - 0.545454545454545;
return((c * (((7.5625 * t) * t) + 0.75)) + b);
}
if (t < 0.909090909090909) {
t = t - 0.818181818181818;
return((c * (((7.5625 * t) * t) + 0.9375)) + b);
}
t = t - 0.954545454545455;
return((c * (((7.5625 * t) * t) + 0.984375)) + b);
}
static function easeIn(t, b, c, d) {
return((c - easeOut(d - t, 0, c, d)) + b);
}
static function easeInOut(t, b, c, d) {
if (t < (d / 2)) {
return((easeIn(t * 2, 0, c, d) * 0.5) + b);
}
return(((easeOut((t * 2) - d, 0, c, d) * 0.5) + (c * 0.5)) + b);
}
static var version = "1.1.0.52";
}
Symbol 507 MovieClip Frame 1
stop();