Frame 1
fscommand ("showmenu", false);
System.security.allowDomain("newgrounds.com");
var MochiId = "4d83195856b7fa2c";
stop();
Frame 2
stop();
Instance of Symbol 284 MovieClip [API Connector (NewgroundsAPI)] in Frame 2
//component parameters
onClipEvent (construct) {
api_id = "20884:ik7xzKSP";
encryption_key = "fmoBn1FRlAaEKDqN8UnieFExtPNOQAkN";
version = "";
fake_session = false;
debug = false;
error_screens = false;
medal_popups = false;
}
Frame 3
stop();
countDown = 80;
onEnterFrame = function () {
if (random(3)) {
thing._xscale = (thing._yscale = (300 + random(21)) - 10);
thing._alpha = random(80) + 20;
}
if (random(3)) {
thing2._xscale = (thing2._yscale = (300 + random(21)) - 10);
thing2._alpha = random(80) + 20;
}
countDown--;
if (countDown <= 0) {
mochi.as2.MochiServices.connect(MochiId, _root);
nextFrame();
delete onEnterFrame;
}
};
Instance of Symbol 338 MovieClip "thing" in Frame 3
on (release) {
getURL ("http://zanzlanz.com/Games", "_blank");
}
Instance of Symbol 338 MovieClip "thing2" in Frame 3
on (release) {
getURL ("http://zanzlanz.com/Games", "_blank");
}
Frame 4
stop();
for (var i in _root) {
delete i;
}
mochi.as2.MochiEvents.endPlay();
clearInterval(onInterval);
delete onEnterFrame;
if (System.capabilities.playerType == "StandAlone") {
alert.gotoAndStop(3);
}
stopAllSounds();
muteSound.setVolume(100);
var so2 = SharedObject.getLocal("MineBlocksWorlds", "/");
if (so2.data.worlds == undefined) {
so2.data.worlds = new Object();
}
if (so2.data.soundVol == undefined) {
so2.data.soundVol = 100;
so2.data.songVol = 50;
}
if (so2.data.keys.length != 5) {
so2.data.keys = [17, 16, 81, 84, 72];
so2.data.keysNames = ["Ctrl", "Shift", "Q", "T", "H"];
}
if (so2.data.qual == undefined) {
so2.data.qual = 2;
}
if (so2.data.diff == undefined) {
so2.data.diff = 2;
}
if (so2.data.score == undefined) {
so2.data.score = 10;
}
Mouse.hide();
onMouseDown = function () {
Mouse.hide();
cursor.gotoAndPlay(1);
};
onMouseUp = function () {
cursor.gotoAndPlay(4);
};
ver = "1.19.4_5";
Instance of Symbol 1126 MovieClip in Frame 4
on (release) {
_root.alert.gotoAndStop(2);
}
Instance of Symbol 1165 MovieClip "cursor" in Frame 4
onClipEvent (enterFrame) {
_x = _root._xmouse;
_y = _root._ymouse;
}
Frame 6
var inventoryList = new Array(44);
var i = 0;
while (i <= 44) {
inventoryList[i] = new Array(3);
i++;
}
mochi.as2.MochiAd.showClickAwayAd({clip:addd, id:MochiId});
Mouse.hide();
muteSound.setVolume(0);
Frame 7
function unlockNewgroundsMedal(aget) {
com.newgrounds.API.unlockMedal(aget);
}
function print_me() {
pn = new PrintScreen();
pn.addListener(listener123);
pn.print(this, 0, 0, Stage.width, Stage.height);
}
function zanzlanzDotCom() {
getURL ("http://zanzlanz.com", "_blank");
}
function getRandom() {
seed = ((seed * 9301) + 49297) % 233280;
return(seed / 233280);
}
function randomNumber(bottom, top) {
return(Math.floor(bottom + (((top - bottom) + 1) * getRandom())));
}
function addToObject(array) {
var _local2 = new Object();
for (var _local3 in array) {
_local2[array[_local3]] = array[_local3];
}
return(_local2);
}
function save() {
so.data.regenerate = regenerate;
so.data.degenerate = degenerate;
so.data.wheat = wheat;
so.data.arrows = arrows;
so.data.arrowNum = arrowNum;
so.data.spiderNum = spiderNum;
so.data.food = food;
so.data.achieve = achieve;
so.data.seed = seed;
so.data.rainDay = rainDay;
so.data.sceneNum = sceneNum;
so.data.sheepNum = sheepNum;
so.data.netherwalkerNum = netherwalkerNum;
so.data.cowNum = cowNum;
so.data.creeperNum = creeperNum;
so.data.pigNum = pigNum;
so.data.chickenNum = chickenNum;
so.data.mobNum = mobNum;
so.data.zombieNum = zombieNum;
so.data.raining = raining;
so.data.rafts = rafts;
so.data.raftNum = raftNum;
so.data.day = day;
so.data.snowRegions = snowRegions;
so.data.firstTimes = firstTimes;
so.data.air = air;
so.data.tim = tim;
so.data.health = health;
so.data.selectedInventoryItem = selectedInventoryItem;
so.data.intervalNum = intervalNum;
so.data.inventoryList = inventoryList;
so.data.xSpeed = xSpeed;
so.data.ySpeed = ySpeed;
so.data.dropNum = dropNum;
so.data.worldWidth = worldWidth;
so.data.worldHeight = worldHeight;
so.data.biomeList = sceneNum;
so.data["water" + sceneNum] = water;
so.data["signs" + sceneNum] = signs;
so.data["mobs" + sceneNum] = mobs;
so.data["drops" + sceneNum] = drops;
so.data["scene" + sceneNum] = scene;
so.data["toSmelt" + sceneNum] = toSmelt;
so.data["chests" + sceneNum] = chests;
so.data["states" + sceneNum] = states;
so.data["toGrow" + sceneNum] = toGrow;
so.data["onFire" + sceneNum] = onFire;
so.data["playingTNT" + sceneNum] = playingTNT;
so.data["hasSignal" + sceneNum] = hasSignal;
so.data["spawnPoint" + sceneNum] = spawnPoint;
so.data["wheat" + sceneNum] = wheat;
so.data.theHeight = theHeight;
so.data.worldX = world._x;
so.data.worldY = world._y;
so.flush(1000000);
}
function makeBlock(x, y) {
tmp = world.attachMovie("block", (("blockX" + x) + "Y") + y, world.getNextHighestDepth());
tmp._x = (x * 30) + 15;
tmp._y = (y * -30) - 15;
tmp.ex = Number(x);
tmp.wy = Number(y);
}
function manageChunks() {
if (usingPortal == false) {
if (making == true) {
making = false;
blackScreen.gotoAndStop(1);
}
chunkSize = 5;
worldXChunk = Math.round(Math.round((-world._x) / 30) / chunkSize);
worldYChunk = Math.round(Math.round(world._y / 30) / chunkSize);
var _local4 = worldXChunk - 1;
while (_local4 <= (worldXChunk + 4)) {
var _local1 = worldYChunk - 4;
while (_local1 <= (worldYChunk + 1)) {
if (CHUNKS[(_local4 + ".") + _local1] != 1) {
CHUNKS[(_local4 + ".") + _local1] = 1;
var _local3 = _local4 * chunkSize;
while (_local3 <= ((_local4 * chunkSize) + chunkSize)) {
var _local2 = _local1 * chunkSize;
while (_local2 <= ((_local1 * chunkSize) + chunkSize)) {
if ((scene[_local3][_local2] != undefined) && (world[(("blockX" + _local3) + "Y") + _local2] == undefined)) {
tmp = world.attachMovie("block", (("blockX" + _local3) + "Y") + _local2, world.getNextHighestDepth());
tmp._x = (_local3 * 30) + 15;
tmp._y = (_local2 * -30) - 15;
tmp.ex = Number(_local3);
tmp.wy = Number(_local2);
}
_local2++;
}
_local3++;
}
}
_local1++;
}
_local4++;
}
for (_local4 in CHUNKS) {
chunk = _local4.split(".");
if ((((chunk[0] < (worldXChunk - 1)) || (chunk[0] > (worldXChunk + 4))) || (chunk[1] < (worldYChunk - 4))) || (chunk[1] > (worldYChunk + 1))) {
if (CHUNKS[_local4] == 1) {
CHUNKS[_local4] = undefined;
var _local3 = chunk[0] * chunkSize;
while (_local3 <= ((chunk[0] * chunkSize) + chunkSize)) {
var _local2 = chunk[1] * chunkSize;
while (_local2 <= ((chunk[1] * chunkSize) + chunkSize)) {
if (world[(("blockX" + _local3) + "Y") + _local2] != undefined) {
world[(("blockX" + _local3) + "Y") + _local2].requestRemove(false, false);
}
_local2++;
}
_local3++;
}
}
}
}
for (_local4 in drops) {
if (world[_local4] == undefined) {
if ((drops[_local4][0] > (((worldXChunk - 4) * chunkSize) * 30)) && (drops[_local4][0] < (((worldXChunk + 8) * chunkSize) * 30))) {
world.attachMovie("drop", _local4, world.getNextHighestDepth());
world[_local4]._x = drops[_local4][0];
world[_local4]._y = drops[_local4][1];
world[_local4].gotoAndStop(drops[_local4][2]);
world[_local4].damage = drops[_local4][3];
}
} else if ((drops[_local4][0] < (((worldXChunk - 4) * chunkSize) * 30)) || (drops[_local4][0] > (((worldXChunk + 8) * chunkSize) * 30))) {
removeMovieClip(world[_local4]);
}
}
}
}
function rTA(sX, sY, ty) {
if (((scene[sX][sY] == undefined) || (scene[sX][sY] == "sl")) || (scene[sX][sY].substr(0, 2) == "lv")) {
scene[sX][sY] = ty;
}
}
function makeCavern(sX, sY, ty) {
waterLevel = sY - 1;
var _local6 = 1;
while (_local6 <= 8) {
sX = sX + 1;
sY = sY + (randomNumber(0, 2) - 1);
var _local2 = -randomNumber(0, 2);
while (_local2 <= randomNumber(1, 3)) {
var _local1 = -randomNumber(0, 2);
while (_local1 <= randomNumber(1, 3)) {
if ((sY + _local1) <= waterLevel) {
scene[sX + _local2][sY + _local1] = ty;
if (ty == "wr") {
firstTimes[(("blockX" + (sX + _local2)) + "Y") + (sY + _local1)] = true;
water[(("blockX" + (sX + _local2)) + "Y") + (sY + _local1)] = [10, 10];
}
} else if ((sY + _local1) == ((waterLevel + randomNumber(0, 1)) + 1)) {
if (scene[sX + _local2][sY + _local1] == "r") {
scene[sX + _local2][sY + _local1] = undefined;
}
}
_local1++;
}
_local2++;
}
_local6++;
}
}
function makeMine(sX, sY, wdth, lgth, ty, underGround, horizont, cavee) {
scene[sX][sY] = ty;
if (horizont == true) {
sYR = 50;
sXR = 10 + (randomNumber(0, 1) * 80);
} else {
sXR = randomNumber(0, 99);
sYR = randomNumber(0, 99);
}
var _local6 = 1;
while (_local6 <= (lgth - 1)) {
if (sXR >= randomNumber(0, 99)) {
sX = sX + 1;
} else if (sXR <= randomNumber(0, 99)) {
sX = sX - 1;
}
if (sYR >= randomNumber(0, 99)) {
sY = sY + 1;
} else if (sYR <= randomNumber(0, 99)) {
sY = sY - 1;
}
var _local5 = 1;
do {
_local5++;
r1 = Math.round(randomNumber(0, wdth - 1));
r2 = Math.round(randomNumber(0, wdth - 1));
if ((ty == "cy") && (scene[sX + r1][sY + r2] == "sd")) {
scene[sX + r1][sY + r2] = ty;
} else if (((((((ty == undefined) || (((scene[sX + r1][sY + r2] != "dirt") && (scene[sX + r1][sY + r2] != "sd")) && (scene[sX + r1][sY + r2] != "ss"))) && (scene[sX + r1][sY + r2] != "lv")) && (scene[sX + r1][(sY + r2) + 1] != "wd1")) && (scene[sX + r1][sY + r2] != "wr")) && (scene[sX + r1][(sY + r2) + 1] != "wr")) && (scene[sX + r1][(sY + r2) + 2] != "wr")) {
if ((underGround == "no") || ((((((((((((scene[sX + r1][sY + r2] != undefined) && (scene[sX + r1][sY + r2] != "wd")) && (scene[sX + r1][sY + r2] != "lv")) && (scene[sX + r1][sY + r2] != "lv1")) && (scene[sX + r1][sY + r2] != "lv2")) && (scene[sX + r1][sY + r2] != "lv3")) && (scene[sX + r1][sY + r2] != "fl1")) && (scene[sX + r1][sY + r2] != "fl2")) && (scene[sX + r1][sY + r2] != "ct")) && (scene[sX + r1][sY + r2] != "sw")) && (scene[sX + r1][sY + r2] != "coral")) && (scene[sX + r1][sY + r2] != "ms"))) {
scene[sX + r1][sY + r2] = ty;
}
} else {
_local5 = (wdth * wdth) + 1;
_local6 = lgth;
}
} while (_local5 <= (wdth * wdth));
_local6++;
}
}
function makeMobSpawner(sX, sY) {
xS = xS - 6;
a1 = randomNumber(0, 1);
var _local1 = -4 - a1;
while (_local1 <= (4 + a1)) {
scene[sX + _local1][sY] = "ms";
delete scene[sX + _local1][sY + 1];
delete scene[sX + _local1][sY + 2];
delete scene[sX + _local1][sY + 3];
delete scene[sX + _local1][sY + 4];
scene[sX + _local1][sY + 5] = "cs";
if ((_local1 == (-4 - a1)) || (_local1 == (4 + a1))) {
scene[sX + _local1][sY + 1] = "cs";
scene[sX + _local1][sY + 2] = "cs";
scene[sX + _local1][sY + 3] = "cs";
scene[sX + _local1][sY + 4] = "cs";
}
_local1++;
}
scene[(sX - 3) - a1][sY + 1] = "chest";
chests[(("blockX" + ((sX - 3) - a1)) + "Y") + (sY + 1)] = new Array(27);
var _local4 = 0;
while (_local4 < 10) {
chestItems = [["wd", randomNumber(1, 5), ""], ["gp", randomNumber(1, 5), ""], ["oddrock", randomNumber(1, 5), ""], ["or", randomNumber(1, 5), ""], ["gap", randomNumber(1, 5), ""], ["topaz", randomNumber(1, 5), ""], ["StonePickaxe", "", randomNumber(0, 20)], ["StoneShovel", "", randomNumber(0, 10)], ["StoneSword", "", randomNumber(0, 10)], ["StoneAxe", "", randomNumber(0, 15)], ["cs", randomNumber(1, 15), ""], ["gi", randomNumber(1, 3), ""], ["dm", randomNumber(1, 3), ""], ["cl", randomNumber(1, 6), ""], ["ii", randomNumber(1, 6), ""], ["rsd", randomNumber(1, 10), ""], ["bb", randomNumber(1, 20), ""], ["sw", randomNumber(1, 9), ""], ["bk", "", ""], ["wp", randomNumber(1, 8), ""], ["fw1", randomNumber(1, 3), ""], ["fw2", randomNumber(1, 3), ""], ["flint", randomNumber(1, 4), ""]];
randomItemNum = randomNumber(0, chestItems.length - 1);
chests[(("blockX" + ((sX - 3) - a1)) + "Y") + (sY + 1)][randomNumber(0, 27)] = chestItems[randomItemNum];
_local4++;
}
scene[sX][sY + 1] = "mobSpawner";
}
function makeTree(sX, sY, useSeed, gap) {
if (useSeed) {
treeTypeNum = randomNumber(0, 19);
} else {
treeTypeNum = rando(20);
}
if (gap) {
treeType = "lv3";
} else if (treeTypeNum < 13) {
treeType = "lv";
} else if (treeTypeNum < 16) {
treeType = "lv1";
} else {
treeType = "lv2";
}
drawTree = false;
if ((world[(("blockX" + (sX - 1)) + "Y") + sY] != undefined) && (useSeed != true)) {
drawTree = true;
}
rTA(sX - 1, sY, "wd1");
rTA(sX - 1, sY + 1, "wd1");
rTA(sX - 1, sY + 2, "wd1");
rTA(sX - 1, sY + 3, "wd1");
rTA(sX - 1, sY + 4, "wd1");
if (drawTree) {
makeBlock(sX - 1, sY);
makeBlock(sX - 1, sY + 1);
makeBlock(sX - 1, sY + 2);
makeBlock(sX - 1, sY + 3);
makeBlock(sX - 1, sY + 4);
}
if (useSeed) {
randomTreeNumber = randomNumber(0, 1);
} else {
randomTreeNumber = random(2);
}
if (randomTreeNumber) {
leaveArray = [[-2, 3], [0, 3], [-2, 4], [0, 4], [-3, 4], [1, 4], [-2, 5], [-3, 5], [-1, 5], [0, 5], [1, 5], [-1, 6], [0, 6], [-2, 6]];
var _local1 = 0;
while (_local1 <= leaveArray.length) {
if (scene[sX + leaveArray[_local1][0]][sY + leaveArray[_local1][1]] == undefined) {
if (randomNumber(0, 3) == 1) {
rTA(sX + leaveArray[_local1][0], sY + leaveArray[_local1][1], treeType);
} else {
rTA(sX + leaveArray[_local1][0], sY + leaveArray[_local1][1], "lv");
}
if (drawTree) {
makeBlock(sX + leaveArray[_local1][0], sY + leaveArray[_local1][1]);
}
}
_local1++;
}
} else {
rTA(sX - 1, sY + 5, "wd1");
if (drawTree) {
makeBlock(sX - 1, sY + 5);
}
leaveArray = [[-2, 3], [0, 3], [-2, 4], [0, 4], [-3, 4], [1, 4], [-4, 5], [-3, 5], [-2, 5], [0, 5], [1, 5], [2, 5], [-1, 6], [-2, 6], [-3, 6], [-4, 6], [0, 6], [1, 6], [2, 6], [-1, 7], [-2, 7], [-3, 7], [0, 7], [1, 7], [-1, 8], [-2, 8], [0, 8]];
var _local1 = 0;
while (_local1 <= leaveArray.length) {
if (scene[sX + leaveArray[_local1][0]][sY + leaveArray[_local1][1]] == undefined) {
if (randomNumber(0, 3) == 1) {
rTA(sX + leaveArray[_local1][0], sY + leaveArray[_local1][1], treeType);
} else {
rTA(sX + leaveArray[_local1][0], sY + leaveArray[_local1][1], "lv");
}
if (drawTree) {
makeBlock(sX + leaveArray[_local1][0], sY + leaveArray[_local1][1]);
}
}
_local1++;
}
}
}
function coordBlock(xOrY, val) {
if (xOrY == "x") {
return(-Math.round(((val - 275) + 15) / 30));
}
return(Math.round(((val - 200) - 15) / 30));
}
function blockCoord(xOrY, val) {
if (xOrY == "x") {
return((((-val) * 30) - 15) + 275);
}
return((((-val) * 30) + 15) + 200);
}
function blockSound(x, y, xDist, yDist) {
madeSound = false;
if ((scene[x][y] != undefined) && (scene[x][y] != "wr")) {
if (!madeSound) {
if (stones[scene[x][y]] != undefined) {
madeSound = true;
requestSound("stone", xDist, yDist);
}
}
if (!madeSound) {
if (grasses[scene[x][y]] != undefined) {
madeSound = true;
requestSound("crunch" + (random(3) + 1), xDist, yDist);
}
}
if (!madeSound) {
if (woods[scene[x][y]] != undefined) {
madeSound = true;
requestSound("wood", xDist, yDist);
}
}
if (!madeSound) {
if (mushes[scene[x][y]] != undefined) {
madeSound = true;
requestSound("smush", xDist, yDist);
}
}
}
}
function requestSound(sndQ, xDist, yDist) {
if (soundAt > 100) {
soundAt = 1;
}
soundPlayer["snd" + soundAt].snd.attachSound(sndQ);
soundPlayer["snd" + soundAt].snd.setVolume(Math.max(Math.min(100 - (Math.sqrt((xDist * xDist) + (yDist * yDist)) / 4), 100) - (deepness * 10), 0) * (so2.data.soundVol / 100));
if (soundPlayer["snd" + soundAt].snd.getVolume() < 0) {
soundPlayer["snd" + soundAt].snd.setVolume(0);
}
soundPlayer["snd" + soundAt].snd.setPan(-xDist);
soundPlayer["snd" + soundAt].snd.start();
soundAt++;
}
function underwaterLoop(toDo) {
if (toDo == "start") {
soundPlayer.underWater.snd.start();
soundPlayer.underWater.snd.onSoundComplete = function () {
soundPlayer.underWater.snd.start();
};
} else {
soundPlayer.underWater.snd.stop();
}
}
function ouch(size) {
if (size == 2) {
requestSound("ouch2", 0, 0);
} else {
requestSound("ouch1", 0, 0);
}
hurtAnimation = true;
screenTilter.play();
}
function pointBlockCheck(xe, yw, walkThrough) {
if ((scene[Math.round((xe - 15) / 30)][Math.round(((-yw) - 15) / 30)] != undefined) && ((!walkThrough) || (walkThroughBlockHit[scene[Math.round((xe - 15) / 30)][Math.round(((-yw) - 15) / 30)]] == undefined))) {
return([true, scene[Math.round((xe - 15) / 30)][Math.round(((-yw) - 15) / 30)]]);
}
return([false, scene[Math.round((xe - 15) / 30)][Math.round(((-yw) - 15) / 30)]]);
}
function getClosestBlock(water2, dontUseSelector) {
amount = reach;
var _local2 = 1;
do {
_local2++;
rotAngle = (Math.atan2(((-world._x) + 275) - (world._xmouse - 7.5), (((-world._y) + 200) - 30) - world._ymouse) * -180) / Math.PI;
_root.rotAngle = rotAngle;
x = (((-reach) * Math.sin(rotAngle / 57.2957795130823)) / (-((amount + 1) / _local2))) + ((-world._x) + 275);
y = ((reach * Math.cos(rotAngle / 57.2957795130823)) / (-((amount + 1) / _local2))) + (((-world._y) + 200) - 30);
if (!dontUseSelector) {
world.blockSelector.gotoAndStop(1);
world.blockSelector._x = ((Math.round((x - 15) / 30) + 1) * 30) - 15;
world.blockSelector._y = (Math.round(y / 30) * 30) - 15;
}
if ((scene[Math.round((x - 15) / 30)][Math.round((-y) / 30)] != undefined) && (((water2 && (water[(("blockX" + Math.round((x - 15) / 30)) + "Y") + Math.round((-y) / 30)][0] == 10)) && (water[(("blockX" + Math.round((x - 15) / 30)) + "Y") + Math.round((-y) / 30)][1] == 10)) || (_root.liquids2[scene[Math.round((x - 15) / 30)][Math.round((-y) / 30)]] == undefined))) {
_local2 = amount + 1;
return([Math.round((x - 15) / 30), Math.round((-y) / 30)]);
}
} while (_local2 <= amount);
if (!dontUseSelector) {
world.blockSelector.gotoAndStop(1);
world.blockSelector._x = -1000;
world.blockSelector._y = -1000;
}
return(undefined);
}
function getClosestMob() {
amount = reach;
var _local1 = 1;
do {
_local1++;
rotAngle = (Math.atan2(((-world._x) + 275) - (world._xmouse - 7.5), (((-world._y) + 200) - 30) - world._ymouse) * -180) / Math.PI;
x = (((-reach) * Math.sin(rotAngle / 57.2957795130823)) / (-((amount + 1) / _local1))) + ((-world._x) + 275);
y = ((reach * Math.cos(rotAngle / 57.2957795130823)) / (-((amount + 1) / _local1))) + (((-world._y) + 200) - 30);
for (var _local2 in mobs) {
if (Math.round(mobs[_local2][3] / 60) == Math.round(x / 60)) {
if (Math.round(mobs[_local2][4] / 60) == Math.round(y / 60)) {
return(_local2);
}
}
}
if (((scene[Math.round(x / 30)][Math.round((-y) / 30)] != undefined) && (liquids2[scene[Math.round(x / 30)][Math.round((-y) / 30)]] == undefined)) && (walkThroughBlockHit[scene[Math.round(x / 30)][Math.round((-y) / 30)]] == undefined)) {
_local1 = amount + 1;
return(undefined);
}
} while (_local1 <= amount);
return(undefined);
}
function getFurthestEmptyBlock(space, dontUseSelector) {
amount = reach + 30;
var _local1 = 1;
do {
_local1++;
rotAngle = (Math.atan2(((-world._x) + 275) - (world._xmouse - 7.5), (((-world._y) + 200) - 30) - world._ymouse) * -180) / Math.PI;
xOld = x;
yOld = y;
x = (((-(reach + 30)) * Math.sin(rotAngle / 57.2957795130823)) / (-((amount + 1) / _local1))) + ((-world._x) + 275);
y = (((reach + 30) * Math.cos(rotAngle / 57.2957795130823)) / (-((amount + 1) / _local1))) + (((-world._y) + 200) - 30);
if (!dontUseSelector) {
world.blockSelector.gotoAndStop(2);
world.blockSelector._x = ((Math.round((xOld - 15) / 30) + 1) * 30) - 15;
world.blockSelector._y = (Math.round(yOld / 30) * 30) - 15;
}
if (((scene[Math.round((x - 15) / 30)][Math.round((-y) / 30)] != undefined) && (liquids2[scene[Math.round((x - 15) / 30)][Math.round((-y) / 30)]] == undefined)) && (replaceBlocks[scene[Math.round((x - 15) / 30)][Math.round((-y) / 30)]] == undefined)) {
_local1 = amount + 1;
return([Math.round((xOld - 15) / 30), Math.round((-yOld) / 30)]);
}
} while (_local1 <= amount);
if (!dontUseSelector) {
world.blockSelector.gotoAndStop(2);
world.blockSelector._x = -1000;
world.blockSelector._y = -1000;
}
if (space != true) {
return(undefined);
}
return([Math.round((xOld - 15) / 30), Math.round((-yOld) / 30)]);
}
function explode(ex, wy, size) {
var _local3 = ex - Math.round(size / 2);
while (_local3 <= (ex + (Math.round(size / 2) * 2))) {
var _local2 = wy - Math.round(size / 2);
while (_local2 <= (wy + (Math.round(size / 2) * 2))) {
if ((ex == _local3) && (wy == _local2)) {
world[(("blockX" + _local3) + "Y") + _local2].mineBlock(true);
} else if (random(5)) {
if (_root.so2.data.qual > 1) {
part = world.attachMovie("smoke", "smoke" + random(100000), world.getNextHighestDepth());
part._x = (world[(("blockX" + _local3) + "Y") + _local2]._x + random(30)) - 15;
part._y = (world[(("blockX" + _local3) + "Y") + _local2]._y + random(30)) - 15;
part = world.attachMovie("smoke", "smoke" + random(100000), world.getNextHighestDepth());
part._x = (world[(("blockX" + _local3) + "Y") + _local2]._x + random(30)) - 15;
part._y = (world[(("blockX" + _local3) + "Y") + _local2]._y + random(30)) - 15;
part = world.attachMovie("smoke", "smoke" + random(100000), world.getNextHighestDepth());
part._x = (world[(("blockX" + _local3) + "Y") + _local2]._x + random(30)) - 15;
part._y = (world[(("blockX" + _local3) + "Y") + _local2]._y + random(30)) - 15;
part = world.attachMovie("smoke", "smoke" + random(100000), world.getNextHighestDepth());
part._x = (world[(("blockX" + _local3) + "Y") + _local2]._x + random(30)) - 15;
part._y = (world[(("blockX" + _local3) + "Y") + _local2]._y + random(30)) - 15;
}
if (scene[_local3][_local2] == "TNT") {
world[(("blockX" + _local3) + "Y") + _local2].blockType.tnt.gotoAndPlay("end");
} else if ((scene[_local3][_local2] != "br") || (liquids2[scene[_local3][_local2]] == true)) {
world[(("blockX" + _local3) + "Y") + _local2].mineBlock(true);
}
}
_local2++;
}
_local3++;
}
}
function findSpawnArea(light, sizeType, justGrass, nether, near) {
var _local2 = 0;
while (_local2 <= 10) {
if (near == true) {
rY = (random(10) - 4) + blockY;
rX = (random(10) - 4) + blockX;
} else {
rX = (random(200) - 100) + blockX;
if (nether == true) {
rY = random(so.data.worldHeight);
} else {
rY = random(so.data.worldHeight + 30);
}
}
fin = false;
rYed = 0;
do {
if (((((((justGrass == false) || (_root.scene[rX][rY - 1] == "dt")) && (_root.scene[rX][rY - 1].substr(0, 2) != "lv")) && ((_root.scene[rX][rY] == undefined) || (walkThroughBlock[_root.scene[rX][rY]] != undefined))) && (liquids[_root.scene[rX][rY]] == undefined)) && (_root.scene[rX][rY - 1] != undefined)) && (walkThroughBlock[_root.scene[rX][rY - 1]] == undefined)) {
keepGoing = false;
notRight = false;
if (light == "dark") {
if (ifDark(rX, rY) != true) {
notRight = true;
}
} else if (light == "light") {
if (ifDark(rX, rY) == true) {
notRight = true;
}
}
if (notRight == false) {
if (sizeType == 2) {
if ((_root.scene[rX][rY + 1] == undefined) || (walkThroughBlockHit[_root.scene[rX][rY + 1]] != undefined)) {
keepGoing = true;
}
} else if (sizeType == 3) {
if ((_root.scene[rX + 1][rY] == undefined) || (walkThroughBlockHit[_root.scene[rX + 1][rY]] != undefined)) {
keepGoing = true;
} else if ((_root.scene[rX - 1][rY] == undefined) || (walkThroughBlockHit[_root.scene[rX - 1][rY]] != undefined)) {
rX--;
keepGoing = true;
}
}
}
if (keepGoing == false) {
fin = true;
continue;
}
return([rX, rY]);
}
rY--;
rYed++;
if (rYed > 20) {
fin = true;
}
} while (fin == false);
_local2++;
}
return(undefined);
}
function ifDark(ex, wy) {
lightness = 0;
var _local2 = ex - 5;
while (_local2 <= (ex + 5)) {
var _local1 = wy - 5;
while (_local1 <= (wy + 5)) {
if (scene[_local2][_local1] == "ortorch") {
lightness = lightness - 1;
}
if (((scene[_local2][_local1] == "th") || (scene[_local2][_local1] == "jl")) || ((scene[_local2][_local1] == "light") && (states[(("blockX" + _local2) + "Y") + _local1] == 1))) {
lightness = lightness + 1;
}
_local1++;
}
_local2++;
}
if (lightness > 0) {
return(false);
}
if (lightness < 0) {
return(true);
}
if ((tim < 50) && (tim >= 0)) {
if (raining == 2) {
return(true);
}
if (raining == 1) {
if (wy >= 40) {
return(false);
}
} else if (wy >= 35) {
return(false);
}
}
return(true);
}
function usePortal() {
usingPortal = true;
if (_root.so.data.scene2 == undefined) {
_root.so.data.scene2 = new Array();
save();
sceneNum = 2;
_root.so.data.sceneNum = 2;
so.data.worldX = (((-worldWidth) / 2) + 10) * 30;
so.data.worldY = 1140;
generateNether = true;
seed = _root.so.data.seed;
loadWorld = true;
gotoAndStop ("portal");
} else if (_root.so.data.sceneNum == 2) {
save();
sceneNum = 1;
_root.so.data.sceneNum = 1;
so.data.worldX = _root.so.data.spawnPoint1[0];
so.data.worldY = _root.so.data.spawnPoint1[1];
loadWorld = true;
gotoAndStop ("portal");
} else if (_root.so.data.sceneNum == 1) {
save();
sceneNum = 2;
_root.so.data.sceneNum = 2;
so.data.worldX = (((-worldWidth) / 2) + 10) * 30;
so.data.worldY = 1140;
so.data.spawnPoint1 = [so.data.worldX, so.data.worldY];
loadWorld = true;
gotoAndStop ("portal");
}
}
function onInterval() {
if (((pawsed == false) && (generatingWorld == false)) && (making == false)) {
if (intervalNum == 1) {
save();
}
if ((intervalNum / 100) == Math.round(intervalNum / 100)) {
var _local5 = new ContextMenuItem(("Use " + whatIsShift()) + "+click instead!", whatIsShift);
men.customItems[0] = _local5;
if (((food / 100) < 1) && (health > 5)) {
ouch(1);
health = health - 1;
}
for (var _local4 in arrows) {
arrows[_local4][6]--;
if (arrows[_local4][6] == 0) {
removeMovieClip(world["arrow" + _local4]);
delete arrows[_local4][6];
}
}
tim++;
if (tim >= 100) {
day++;
tim = 0;
}
}
if ((intervalNum / 50) == Math.round(intervalNum / 50)) {
if (_root.useRelative) {
pxdnes.loadVariables("MBxp.php", "POST");
} else {
pxdnes.loadVariables("http://zanzlanz.com/MBxp.php", "POST");
}
if (((food / 100) >= 6) && ((food / 100) <= 9)) {
health = health + 1;
}
for (var _local4 in toGrow) {
if (random(50) == 1) {
if ((((((((_root.scene[toGrow[_local4][0]][toGrow[_local4][1] - 1] == "dt") && (_root.scene[toGrow[_local4][0]][toGrow[_local4][1] + 1] == undefined)) && (_root.scene[toGrow[_local4][0]][toGrow[_local4][1] + 2] == undefined)) && (_root.scene[toGrow[_local4][0]][toGrow[_local4][1] + 3] == undefined)) && (_root.scene[toGrow[_local4][0]][toGrow[_local4][1] + 4] == undefined)) && (_root.scene[toGrow[_local4][0]][toGrow[_local4][1] + 5] == undefined)) && (_root.scene[toGrow[_local4][0]][toGrow[_local4][1] + 6] == undefined)) && (_root.scene[toGrow[_local4][0]][toGrow[_local4][1] + 7] == undefined)) {
scene[toGrow[_local4][0]][toGrow[_local4][1]] = "wd1";
_root.makeTree(toGrow[_local4][0] + 1, toGrow[_local4][1], false, toGrow[_local4][2]);
world[_local4].blockType.ifGrow();
delete toGrow[_local4];
}
}
}
}
if ((intervalNum / 20) == Math.round(intervalNum / 20)) {
if ((food / 100) > 9) {
health = health + 1;
}
if (doThunder) {
doThunder = false;
requestSound("distantThunder" + (random(10) + 1), (random(2) * 200) - 100, 0);
}
if ((raining == 2) || (sceneNum == 2)) {
if (random(10) == 1) {
if ((blockY > 30) || (sceneNum == 2)) {
lighting.bgLight.play();
}
if ((random(10) == 1) && (sceneNum == 1)) {
requestSound("closeThunder" + (random(4) + 1), 0, 0);
world.lightning.play();
} else {
doThunder = true;
}
}
}
}
if ((intervalNum / 10) == Math.round(intervalNum / 10)) {
if (degenerate > 0) {
degenerate--;
health = health - (1 + random(2));
ouch();
}
if (regenerate > 0) {
regenerate--;
food = food + 100;
health = health + 1;
}
if (keysX) {
food = food - 2;
}
if (leftSprinting || (rightSprinting)) {
food = food - 6;
}
for (var _local4 in toSmelt) {
if (toSmelt[_local4][1] == "") {
toSmelt[_local4][1] = 1;
}
if (toSmelt[_local4][3] == "") {
toSmelt[_local4][3] = 1;
}
if (toSmelt[_local4][7] == "") {
toSmelt[_local4][7] = 1;
}
if (smeltables == undefined) {
smeltables = new Object();
smeltables.in = "ii";
smeltables.gd = "gi";
smeltables.sd = "gs";
smeltables.cs = "r";
smeltables.cy = "brick";
smeltables.pork = "cpork";
smeltables.chicken = "cchicken";
fuels = new Object();
fuels.st = "st";
fuels.bb = "bb";
fuels.wp = "wp";
fuels.wd = "wd";
fuels.cl = "cl";
fuels.lbk = "lbk";
}
if ((((((toSmelt[_local4][4] == 0) || (toSmelt[_local4][4] == undefined)) && (toSmelt[_local4][2] != undefined)) && (toSmelt[_local4][3] >= 1)) && (toSmelt[_local4][0] != undefined)) && (toSmelt[_local4][1] >= 1)) {
var _local3 = new Object(this);
_local3.st = 5;
_local3.bb = 5;
_local3.wp = 10;
_local3.wd = 30;
_local3.cl = 100;
_local3.lbk = 1000;
toSmelt[_local4][8] = _local3[toSmelt[_local4][2]];
toSmelt[_local4][4] = _local3[toSmelt[_local4][2]];
if ((toSmelt[_local4][3] == "") || (toSmelt[_local4][3] == 1)) {
toSmelt[_local4][2] = undefined;
toSmelt[_local4][3] = 0;
} else {
toSmelt[_local4][3]--;
if (toSmelt[_local4][3] == 1) {
toSmelt[_local4][3] = "";
}
}
}
if (toSmelt[_local4][4] > 0) {
toSmelt[_local4][4]--;
_root.world[_local4].blockType.oven.gotoAndStop(2);
if (toSmelt[_local4][0] != undefined) {
if ((((toSmelt[_local4][0] != undefined) && (toSmelt[_local4][1] >= 1)) && (toSmelt[_local4][7] != 64)) && (((toSmelt[_local4][7] == 0) || (toSmelt[_local4][7] == undefined)) || (smeltables[toSmelt[_local4][0]] == toSmelt[_local4][6]))) {
toSmelt[_local4][5]++;
if (toSmelt[_local4][5] == 10) {
toSmelt[_local4][5] = 0;
toSmelt[_local4][1]--;
if (toSmelt[_local4][6] == undefined) {
toSmelt[_local4][6] = smeltables[toSmelt[_local4][0]];
}
if (toSmelt[_local4][1] == 0) {
toSmelt[_local4][0] = undefined;
}
toSmelt[_local4][7]++;
}
}
}
} else {
toSmelt[_local4][5] = 0;
_root.world[_local4].blockType.oven.gotoAndStop(1);
}
if (toSmelt[_local4][1] == 1) {
toSmelt[_local4][1] = "";
}
if (toSmelt[_local4][3] == 1) {
toSmelt[_local4][3] = "";
}
if (toSmelt[_local4][7] == 1) {
toSmelt[_local4][7] = "";
}
if (toSmelt[_local4][1] == 0) {
toSmelt[_local4][0] = undefined;
}
if (toSmelt[_local4][3] == 0) {
toSmelt[_local4][2] = undefined;
}
if (toSmelt[_local4][7] == 0) {
toSmelt[_local4][6] = undefined;
}
}
}
if (intervalNum >= 200) {
for (var _local4 in wheat) {
if (random(10) == 1) {
if (_root.wheat[_local4] < 7) {
_root.wheat[_local4]++;
}
}
}
for (var _local4 in drops) {
drops[_local4][3]++;
if (drops[_local4][3] < 12) {
} else {
delete drops[_local4];
_root.world[_local4].removeMovieClip();
}
}
if (sceneNum == 1) {
if (_root.so2.data.diff == 2) {
if ((spiderNum < 5) && (random(3) == 1)) {
spawnArea = findSpawnArea("dark", 3, false);
if (spawnArea != undefined) {
spiderNum++;
mobNum++;
lastSpider = world.attachMovie("spider", "spider" + mobNum, world.getNextHighestDepth());
mobs[mobNum] = ["spider", "spider" + mobNum, sceneNum, ((spawnArea[0] + 1) * 30) - 15, ((-(spawnArea[1] + 1)) * 30) + 30, 0, 0, 20, false, false, false];
lastSpider.mobNumber = mobNum;
}
}
if ((zombieNum < (10 + ((tim > 53) * 6))) && (random(3) == 1)) {
spawnArea = findSpawnArea("dark", 2, false);
if (spawnArea != undefined) {
zombieNum++;
mobNum++;
lastZombie = world.attachMovie("zombie", "zombie" + mobNum, world.getNextHighestDepth());
mobs[mobNum] = ["zombie", "zombie" + mobNum, sceneNum, ((spawnArea[0] + 1) * 30) - 15, ((-(spawnArea[1] + 1)) * 30) + 30, 0, 0, 20, false, false, false];
lastZombie.mobNumber = mobNum;
}
}
if ((creeperNum < (10 + ((tim > 53) * 6))) && (random(3) == 1)) {
spawnArea = findSpawnArea("dark", 2, false);
if (spawnArea != undefined) {
creeperNum++;
mobNum++;
lastCreeper = world.attachMovie("creeper", "creeper" + mobNum, world.getNextHighestDepth());
mobs[mobNum] = ["creeper", "creeper" + mobNum, sceneNum, ((spawnArea[0] + 1) * 30) - 15, ((-(spawnArea[1] + 1)) * 30) + 30, 0, 0, 20, false, false, false];
lastCreeper.mobNumber = mobNum;
}
}
if ((netherwalkerNum < 4) && (random(3) == 1)) {
spawnArea = findSpawnArea("dark", 2, false);
if (spawnArea != undefined) {
netherwalkerNum++;
mobNum++;
lastNetherwalker = world.attachMovie("netherwalker", "netherwalker" + mobNum, world.getNextHighestDepth());
mobs[mobNum] = ["netherwalker", "netherwalker" + mobNum, sceneNum, ((spawnArea[0] + 1) * 30) - 15, ((-(spawnArea[1] + 1)) * 30) + 30, 0, 0, 20, false, false, false];
lastNetherwalker.mobNumber = mobNum;
}
}
}
if (_root.so2.data.diff != 3) {
if ((pigNum < 4) && (random(3) == 1)) {
spawnArea = findSpawnArea("none", 3, true);
if (spawnArea != undefined) {
pigNum++;
mobNum++;
lastPig = world.attachMovie("pig", "pig" + mobNum, world.getNextHighestDepth());
mobs[mobNum] = ["pig", "pig" + mobNum, sceneNum, ((spawnArea[0] + 1) * 30) - 15, ((-(spawnArea[1] + 1)) * 30) + 30, 0, 0, 10, false, false, false];
lastPig.mobNumber = mobNum;
}
}
if ((cowNum < 4) && (random(3) == 1)) {
spawnArea = findSpawnArea("light", 3, true);
if (spawnArea != undefined) {
cowNum++;
mobNum++;
lastCow = world.attachMovie("cow", "cow" + mobNum, world.getNextHighestDepth());
mobs[mobNum] = ["cow", "cow" + mobNum, sceneNum, ((spawnArea[0] + 1) * 30) - 15, ((-(spawnArea[1] + 1)) * 30) + 30, 0, 0, 10, false, false, false];
lastCow.mobNumber = mobNum;
}
}
if ((sheepNum < 4) && (random(3) == 1)) {
spawnArea = findSpawnArea("light", 3, true);
if (spawnArea != undefined) {
sheepNum++;
mobNum++;
lastSheep = world.attachMovie("sheep", "sheep" + mobNum, world.getNextHighestDepth());
mobs[mobNum] = ["sheep", "sheep" + mobNum, sceneNum, ((spawnArea[0] + 1) * 30) - 15, ((-(spawnArea[1] + 1)) * 30) + 30, 0, 0, 10, false, false, false, "white", false];
lastSheep.mobNumber = mobNum;
}
}
if ((chickenNum < 5) && (random(3) == 1)) {
spawnArea = findSpawnArea("light", 2, true);
if (spawnArea != undefined) {
chickenNum++;
mobNum++;
lastChicken = world.attachMovie("chicken", "chicken" + mobNum, world.getNextHighestDepth());
mobs[mobNum] = ["chicken", "chicken" + mobNum, sceneNum, ((spawnArea[0] + 1) * 30) - 15, ((-(spawnArea[1] + 1)) * 30) + 30, 0, 0, 4, false, false, false];
lastChicken.mobNumber = mobNum;
}
}
}
} else if (_root.so2.data.diff == 2) {
if ((netherwalkerNum < 8) && (random(2) == 1)) {
spawnArea = findSpawnArea("none", 2, false, true);
if (spawnArea != undefined) {
netherwalkerNum++;
mobNum++;
lastNetherwalker = world.attachMovie("netherwalker", "netherwalker" + mobNum, world.getNextHighestDepth());
mobs[mobNum] = ["netherwalker", "netherwalker" + mobNum, sceneNum, ((spawnArea[0] + 1) * 30) - 15, ((-(spawnArea[1] + 1)) * 30) + 30, 0, 0, 20, false, false, false];
lastNetherwalker.mobNumber = mobNum;
}
}
}
if (rainDay != day) {
rainDay = day;
if (random(9) == 1) {
raining = random(2) + 1;
} else {
raining = 0;
}
}
intervalNum = 0;
}
intervalNum++;
if (intervalNum > 100) {
outOf100 = intervalNum - 100;
} else {
outOf100 = intervalNum;
}
}
}
function inGame() {
manageChunks();
if ((food < 0) || (food == undefined)) {
food = 0;
}
if (health > 20) {
health = 20;
}
if ((food > 1000) || (food == undefined)) {
food = 1000;
}
if (pawsed == false) {
muteSound.setVolume(100);
if (so.data.respawn) {
save();
loadWorld = true;
gotoAndStop ("respawn");
delete onEnterFrame;
}
if (health <= 0) {
var _local3 = 0;
while (_local3 <= 44) {
if (inventoryList[_local3][0] != undefined) {
if (inventoryList[_local3][1] > 1) {
var _local4 = 0;
while (_local4 <= inventoryList[_local3][1]) {
_root.dropNum++;
_root.drops["drop" + dropNum] = [((coordBlock("x", world._x) * 30) - 3) - 15, (-((coordBlock("y", world._y) * 30) - 3)) - 15, inventoryList[_local3][0], 0, inventoryList[_local3][2]];
_local4++;
}
} else {
_root.dropNum++;
_root.drops["drop" + dropNum] = [((coordBlock("x", world._x) * 30) - 3) - 15, (-((coordBlock("y", world._y) * 30) - 3)) - 15, inventoryList[_local3][0], 0, inventoryList[_local3][2]];
}
}
_local3++;
}
xSpeed = 0;
ySpeed = 0;
world._x = so.data["spawnPoint" + sceneNum][0];
world._y = so.data["spawnPoint" + sceneNum][1];
so.data.respawn = true;
so.data.health = 20;
so.data.food = 1000;
health = 20;
food = 1000;
cantMove = true;
}
if (!cantMove) {
if (shifting) {
furthestEmptyBlock = getFurthestEmptyBlock();
} else {
closestMinableBlock = getClosestBlock();
}
placeDelay++;
if ((mouseD && (placeDelay >= 10)) && (waitTillMouseIsUp != true)) {
if (pawsed == false) {
if (shifting) {
DONTCONTINUE = false;
if (itemUse[selectedInventoryItemType] != undefined) {
if (((((((((selectedInventoryItemType == "bread") || (selectedInventoryItemType == "gap")) || (selectedInventoryItemType == "ap")) || (selectedInventoryItemType == "soup")) || (selectedInventoryItemType == "cchicken")) || (selectedInventoryItemType == "nugget")) || (selectedInventoryItemType == "or")) || (selectedInventoryItemType == "pork")) || (selectedInventoryItemType == "cpork")) {
if (food <= 900) {
if (selectedInventoryItemType == "soup") {
inventoryList[selectedInventoryItem - 1] = ["bowl", 1, ""];
} else if ((inventoryList[selectedInventoryItem - 1][1] >= 2) && (Number(inventoryList[selectedInventoryItem - 1][1]) == inventoryList[selectedInventoryItem - 1][1])) {
inventoryList[selectedInventoryItem - 1][1]--;
if (inventoryList[selectedInventoryItem - 1][1] == 1) {
inventoryList[selectedInventoryItem - 1][1] = "";
}
} else {
inventoryList[selectedInventoryItem - 1] = [];
}
waitTillMouseIsUp = true;
if ((selectedInventoryItemType == "ap") || (selectedInventoryItemType == "or")) {
food = food + 100;
} else if ((selectedInventoryItemType == "pork") || (selectedInventoryItemType == "nugget")) {
food = food + 200;
} else if (selectedInventoryItemType == "bread") {
food = food + 200;
} else if (selectedInventoryItemType == "cpork") {
food = food + 300;
} else if (selectedInventoryItemType == "soup") {
food = food + 500;
} else if (selectedInventoryItemType == "cchicken") {
food = food + 600;
} else if (selectedInventoryItemType == "gap") {
regenerate = 30;
food = food + 200;
health = health + 2;
}
}
} else if (selectedInventoryItemType == "bk") {
closestKillableMob = getClosestMob();
if (mobs[closestKillableMob][0] == "cow") {
inventoryList[selectedInventoryItem - 1][0] = "mbk";
}
closestLiquid = getClosestBlock(true);
if (closestLiquid != undefined) {
if (scene[closestLiquid[0]][closestLiquid[1]] == "wr") {
inventoryList[selectedInventoryItem - 1][0] = "wbk";
scene[closestLiquid[0]][closestLiquid[1]] = undefined;
world[(("blockX" + closestLiquid[0]) + "Y") + closestLiquid[1]].requestRemove(true);
waitTillMouseIsUp = true;
DONTCONTINUE = true;
} else if (scene[closestLiquid[0]][closestLiquid[1]] == "la") {
inventoryList[selectedInventoryItem - 1][0] = "lbk";
scene[closestLiquid[0]][closestLiquid[1]] = undefined;
world[(("blockX" + closestLiquid[0]) + "Y") + closestLiquid[1]].requestRemove(true);
waitTillMouseIsUp = true;
DONTCONTINUE = true;
} else if (scene[closestLiquid[0]][closestLiquid[1]] == "ad") {
inventoryList[selectedInventoryItem - 1][0] = "abk";
scene[closestLiquid[0]][closestLiquid[1]] = undefined;
world[(("blockX" + closestLiquid[0]) + "Y") + closestLiquid[1]].requestRemove(true);
waitTillMouseIsUp = true;
DONTCONTINUE = true;
}
}
} else if (selectedInventoryItemType == "raft") {
raft = world.attachMovie("raft", "raft" + rafts, world.getNextHighestDepth());
raft._x = furthestEmptyBlock[0] * 30;
raft._y = furthestEmptyBlock[1] * -30;
} else if (selectedInventoryItemType == "fas") {
closestKillableMob = getClosestMob();
if (closestKillableMob != undefined) {
onFire[mobs[closestKillableMob][1]] = true;
} else {
closestMinableBlock = getClosestBlock(null, true);
world[(("blockX" + closestMinableBlock[0]) + "Y") + closestMinableBlock[1]].gotoAndStop("flame");
}
waitTillMouseIsUp = true;
inventoryList[selectedInventoryItem - 1][2]++;
} else if (selectedInventoryItemType == "snowb") {
if ((inventoryList[selectedInventoryItem - 1][1] >= 2) && (Number(inventoryList[selectedInventoryItem - 1][1]) == inventoryList[selectedInventoryItem - 1][1])) {
inventoryList[selectedInventoryItem - 1][1]--;
if (inventoryList[selectedInventoryItem - 1][1] == 1) {
inventoryList[selectedInventoryItem - 1][1] = "";
}
} else {
inventoryList[selectedInventoryItem - 1] = [];
}
waitTillMouseIsUp = true;
snowBall = world.attachMovie("snowball", "snowball" + random(10000000), world.getNextHighestDepth());
snowBall._x = (blockX * 30) + 30;
snowBall._y = (blockY * -30) - 60;
} else if (selectedInventoryItemType == "egg") {
if ((inventoryList[selectedInventoryItem - 1][1] >= 2) && (Number(inventoryList[selectedInventoryItem - 1][1]) == inventoryList[selectedInventoryItem - 1][1])) {
inventoryList[selectedInventoryItem - 1][1]--;
if (inventoryList[selectedInventoryItem - 1][1] == 1) {
inventoryList[selectedInventoryItem - 1][1] = "";
}
} else {
inventoryList[selectedInventoryItem - 1] = [];
}
waitTillMouseIsUp = true;
egg = world.attachMovie("egg", "egg" + random(10000000), world.getNextHighestDepth());
egg._x = (blockX * 30) + 30;
egg._y = (blockY * -30) - 60;
} else if (selectedInventoryItemType == "bow") {
inventoryArrow = "Q";
var _local3 = 0;
while (_local3 <= 44) {
if ((inventoryList[_local3][0] == "arrow") && ((inventoryList[_local3][1] > 1) || (inventoryList[_local3][1] == ""))) {
inventoryArrow = _local3;
_local3 = "45";
}
_local3++;
}
if (inventoryArrow != "Q") {
if ((inventoryList[inventoryArrow][1] >= 2) && (Number(inventoryList[inventoryArrow][1]) == inventoryList[inventoryArrow][1])) {
inventoryList[inventoryArrow][1]--;
if (inventoryList[inventoryArrow][1] == 1) {
inventoryList[inventoryArrow][1] = "";
}
} else {
inventoryList[inventoryArrow] = [];
}
waitTillMouseIsUp = true;
arrowNum++;
arrowTemp = world.attachMovie("arrow", "arrow" + arrowNum, world.getNextHighestDepth());
arrows[arrowNum] = [arrowNum, (-((world._x - 275) + 15)) + 14, (-((world._y - 200) - 15)) - 60, "new", 0, 0, 10, "char"];
}
} else if (selectedInventoryItemType.substr(-3, 3) == "Hoe") {
closestMinableBlock = getClosestBlock(null, true);
if (scene[closestMinableBlock[0]][closestMinableBlock[1]] == "dt") {
scene[closestMinableBlock[0]][closestMinableBlock[1]] = "farm";
world[(("blockX" + closestMinableBlock[0]) + "Y") + closestMinableBlock[1]].blockType.gotoAndStop("farm");
placeDelay = 0;
_root.inventoryList[selectedInventoryItem - 1][2]++;
}
} else if (selectedInventoryItemType == "seed") {
furthestEmptyBlock = getFurthestEmptyBlock(null, true);
if (scene[furthestEmptyBlock[0]][Number(furthestEmptyBlock[1]) - 1] != "farm") {
DONTCONTINUE = true;
}
}
}
if (DONTCONTINUE != true) {
isShiftClick = false;
closestMinableBlock = getClosestBlock(null, true);
if (shiftClickBlock[scene[closestMinableBlock[0]][closestMinableBlock[1]]] != undefined) {
isShiftClick = true;
isShiftClickAndContinue = false;
world[(("blockX" + closestMinableBlock[0]) + "Y") + closestMinableBlock[1]].blockType.shiftClick();
placeDelay = 3;
}
if ((!isShiftClick) || (isShiftClickAndContinue)) {
goAhead = false;
furthestEmptyBlock = getFurthestEmptyBlock(null, false);
if ((!cantMove) && (furthestEmptyBlock != undefined)) {
if (((((furthestEmptyBlock[0] != coordBlock("x", (world._x - 10) - (sneaking * 4))) || ((furthestEmptyBlock[1] != (blockY + 1)) && ((furthestEmptyBlock[0] != coordBlock("x", (world._x - 10) - (sneaking * 4))) || (furthestEmptyBlock[1] != (blockY + 2))))) && ((furthestEmptyBlock[0] != coordBlock("x", (world._x + 10) + (sneaking * 4))) || ((furthestEmptyBlock[1] != (blockY + 1)) && ((furthestEmptyBlock[0] != coordBlock("x", (world._x + 10) + (sneaking * 4))) || (furthestEmptyBlock[1] != (blockY + 2)))))) && (placeableTypes[selectedInventoryItemType] != undefined)) && (((scene[furthestEmptyBlock[0]][furthestEmptyBlock[1]] == undefined) || (liquids2[scene[furthestEmptyBlock[0]][furthestEmptyBlock[1]]] != undefined)) || (replaceBlocks[scene[furthestEmptyBlock[0]][furthestEmptyBlock[1]]] != undefined))) {
goAhead = true;
}
if (goAhead) {
if ((selectedInventoryItem > 0) && (selectedInventoryItem < 10)) {
placeDelay = 0;
whatToPlace = selectedInventoryItemType;
DONTCONTINUE2 = false;
if (selectedInventoryItemType == "wbk") {
water[(("blockX" + furthestEmptyBlock[0]) + "Y") + furthestEmptyBlock[1]] = [10, 10];
world[(("blockX" + furthestEmptyBlock[0]) + "Y") + furthestEmptyBlock[1]].blockType.ifWater();
world[(("blockX" + furthestEmptyBlock[0]) + "Y") + furthestEmptyBlock[1]].updateAround();
whatToPlace = "wr";
} else if (selectedInventoryItemType == "lbk") {
water[(("blockX" + furthestEmptyBlock[0]) + "Y") + furthestEmptyBlock[1]] = [10, 10];
world[(("blockX" + furthestEmptyBlock[0]) + "Y") + furthestEmptyBlock[1]].blockType.ifWater();
world[(("blockX" + furthestEmptyBlock[0]) + "Y") + furthestEmptyBlock[1]].updateAround();
whatToPlace = "la";
} else if (selectedInventoryItemType == "abk") {
water[(("blockX" + furthestEmptyBlock[0]) + "Y") + furthestEmptyBlock[1]] = [10, 10];
world[(("blockX" + furthestEmptyBlock[0]) + "Y") + furthestEmptyBlock[1]].blockType.ifWater();
world[(("blockX" + furthestEmptyBlock[0]) + "Y") + furthestEmptyBlock[1]].updateAround();
whatToPlace = "ad";
} else if (selectedInventoryItemType == "sign") {
if (((_root.scene[furthestEmptyBlock[0]][furthestEmptyBlock[1] - 1] == undefined) || (liquids2[_root.scene[furthestEmptyBlock[0]][furthestEmptyBlock[1] - 1]] != undefined)) || (walkThroughBlock[_root.scene[furthestEmptyBlock[0]][furthestEmptyBlock[1] - 1]] != undefined)) {
DONTCONTINUE2 = true;
} else {
signs[(("blockX" + furthestEmptyBlock[0]) + "Y") + furthestEmptyBlock[1]] = "Enter sign text here";
inventory.sign = (("blockX" + furthestEmptyBlock[0]) + "Y") + furthestEmptyBlock[1];
inventory.gotoAndStop("sign");
}
} else if (((((selectedInventoryItemType == "th") || (selectedInventoryItemType == "ortorch")) || (selectedInventoryItemType == "rstorch")) || (selectedInventoryItemType == "button")) || (selectedInventoryItemType == "lever")) {
if (closestMinableBlock[0] > furthestEmptyBlock[0]) {
states[(("blockX" + furthestEmptyBlock[0]) + "Y") + furthestEmptyBlock[1]] = 3;
} else if (closestMinableBlock[0] < furthestEmptyBlock[0]) {
states[(("blockX" + furthestEmptyBlock[0]) + "Y") + furthestEmptyBlock[1]] = 2;
} else {
states[(("blockX" + furthestEmptyBlock[0]) + "Y") + furthestEmptyBlock[1]] = 1;
}
} else if (selectedInventoryItemType == "piston") {
if (closestMinableBlock[0] > furthestEmptyBlock[0]) {
states[(("blockX" + furthestEmptyBlock[0]) + "Y") + furthestEmptyBlock[1]] = 4;
} else if (closestMinableBlock[0] < furthestEmptyBlock[0]) {
states[(("blockX" + furthestEmptyBlock[0]) + "Y") + furthestEmptyBlock[1]] = 2;
} else if (closestMinableBlock[1] > furthestEmptyBlock[1]) {
states[(("blockX" + furthestEmptyBlock[0]) + "Y") + furthestEmptyBlock[1]] = 3;
} else {
states[(("blockX" + furthestEmptyBlock[0]) + "Y") + furthestEmptyBlock[1]] = 1;
}
}
if (selectedInventoryItemType == "dr") {
if (blockX > furthestEmptyBlock[0]) {
states[(("blockX" + furthestEmptyBlock[0]) + "Y") + furthestEmptyBlock[1]] = 1;
} else {
states[(("blockX" + furthestEmptyBlock[0]) + "Y") + furthestEmptyBlock[1]] = 2;
}
if ((scene[furthestEmptyBlock[0]][furthestEmptyBlock[1] - 1] != undefined) && (scene[furthestEmptyBlock[0]][furthestEmptyBlock[1] + 1] == undefined)) {
scene[furthestEmptyBlock[0]][furthestEmptyBlock[1]] = "dr1";
scene[furthestEmptyBlock[0]][Number(furthestEmptyBlock[1] + 1)] = "dr2";
world.attachMovie("block", (("blockX" + furthestEmptyBlock[0]) + "Y") + furthestEmptyBlock[1], world.getNextHighestDepth());
world[(("blockX" + furthestEmptyBlock[0]) + "Y") + furthestEmptyBlock[1]]._x = (furthestEmptyBlock[0] * 30) + 15;
world[(("blockX" + furthestEmptyBlock[0]) + "Y") + furthestEmptyBlock[1]]._y = (furthestEmptyBlock[1] * -30) - 15;
world[(("blockX" + furthestEmptyBlock[0]) + "Y") + furthestEmptyBlock[1]].ex = furthestEmptyBlock[0];
world[(("blockX" + furthestEmptyBlock[0]) + "Y") + furthestEmptyBlock[1]].wy = furthestEmptyBlock[1];
world.attachMovie("block", (("blockX" + furthestEmptyBlock[0]) + "Y") + Number(furthestEmptyBlock[1] + 1), world.getNextHighestDepth());
world[(("blockX" + furthestEmptyBlock[0]) + "Y") + Number(furthestEmptyBlock[1] + 1)]._x = (furthestEmptyBlock[0] * 30) + 15;
world[(("blockX" + furthestEmptyBlock[0]) + "Y") + Number(furthestEmptyBlock[1] + 1)]._y = (Number(furthestEmptyBlock[1] + 1) * -30) - 15;
world[(("blockX" + furthestEmptyBlock[0]) + "Y") + Number(furthestEmptyBlock[1] + 1)].ex = furthestEmptyBlock[0];
world[(("blockX" + furthestEmptyBlock[0]) + "Y") + Number(furthestEmptyBlock[1] + 1)].wy = Number(furthestEmptyBlock[1] + 1);
} else {
DONTCONTINUE2 = true;
}
} else if (selectedInventoryItemType == "bed") {
if (scene[furthestEmptyBlock[0] + 1][furthestEmptyBlock[1]] == undefined) {
scene[furthestEmptyBlock[0]][furthestEmptyBlock[1]] = "bed1";
scene[furthestEmptyBlock[0] + 1][Number(furthestEmptyBlock[1])] = "bed2";
world.attachMovie("block", (("blockX" + furthestEmptyBlock[0]) + "Y") + furthestEmptyBlock[1], world.getNextHighestDepth());
world[(("blockX" + furthestEmptyBlock[0]) + "Y") + furthestEmptyBlock[1]]._x = (furthestEmptyBlock[0] * 30) + 15;
world[(("blockX" + furthestEmptyBlock[0]) + "Y") + furthestEmptyBlock[1]]._y = (furthestEmptyBlock[1] * -30) - 15;
world[(("blockX" + furthestEmptyBlock[0]) + "Y") + furthestEmptyBlock[1]].ex = furthestEmptyBlock[0];
world[(("blockX" + furthestEmptyBlock[0]) + "Y") + furthestEmptyBlock[1]].wy = furthestEmptyBlock[1];
world.attachMovie("block", (("blockX" + (furthestEmptyBlock[0] + 1)) + "Y") + Number(furthestEmptyBlock[1]), world.getNextHighestDepth());
world[(("blockX" + (furthestEmptyBlock[0] + 1)) + "Y") + Number(furthestEmptyBlock[1])]._x = ((furthestEmptyBlock[0] + 1) * 30) + 15;
world[(("blockX" + (furthestEmptyBlock[0] + 1)) + "Y") + Number(furthestEmptyBlock[1])]._y = (Number(furthestEmptyBlock[1]) * -30) - 15;
world[(("blockX" + (furthestEmptyBlock[0] + 1)) + "Y") + Number(furthestEmptyBlock[1])].ex = furthestEmptyBlock[0] + 1;
world[(("blockX" + (furthestEmptyBlock[0] + 1)) + "Y") + Number(furthestEmptyBlock[1])].wy = Number(furthestEmptyBlock[1]);
} else {
DONTCONTINUE2 = true;
}
} else if (!DONTCONTINUE2) {
scene[furthestEmptyBlock[0]][furthestEmptyBlock[1]] = whatToPlace;
if (world[(("blockX" + furthestEmptyBlock[0]) + "Y") + furthestEmptyBlock[1]] == undefined) {
world.attachMovie("block", (("blockX" + furthestEmptyBlock[0]) + "Y") + furthestEmptyBlock[1], world.getNextHighestDepth());
world[(("blockX" + furthestEmptyBlock[0]) + "Y") + furthestEmptyBlock[1]]._x = (furthestEmptyBlock[0] * 30) + 15;
world[(("blockX" + furthestEmptyBlock[0]) + "Y") + furthestEmptyBlock[1]]._y = (furthestEmptyBlock[1] * -30) - 15;
world[(("blockX" + furthestEmptyBlock[0]) + "Y") + furthestEmptyBlock[1]].ex = furthestEmptyBlock[0];
world[(("blockX" + furthestEmptyBlock[0]) + "Y") + furthestEmptyBlock[1]].wy = furthestEmptyBlock[1];
}
world[(("blockX" + furthestEmptyBlock[0]) + "Y") + furthestEmptyBlock[1]].blockType.gotoAndStop(whatToPlace);
world[(("blockX" + furthestEmptyBlock[0]) + "Y") + furthestEmptyBlock[1]].updateAround();
}
if (achieve == 3) {
achieve = 4;
achieveGet.gotoAndPlay(1);
}
if (!DONTCONTINUE2) {
blockSound(furthestEmptyBlock[0], furthestEmptyBlock[1], ((-world._x) - (furthestEmptyBlock[0] * 30)) + 275, ((-world._y) + (furthestEmptyBlock[1] * 30)) + 200);
if (selectedInventoryItemType.substr(1, 2) != "bk") {
inventoryList[selectedInventoryItem - 1][1]--;
if (inventoryList[selectedInventoryItem - 1][1] <= 0) {
inventoryList[selectedInventoryItem - 1] = new Array(3);
}
} else {
inventoryList[selectedInventoryItem - 1][0] = "bk";
}
}
}
}
}
}
}
} else if (!cantMove) {
closestKillableMob = getClosestMob();
if (closestKillableMob != undefined) {
if (this[selectedInventoryItemType + "Strength"] == undefined) {
_root.world[mobs[closestKillableMob][1]].health = _root.world[mobs[closestKillableMob][1]].health - 1;
} else {
_root.world[mobs[closestKillableMob][1]].health = _root.world[mobs[closestKillableMob][1]].health - this[selectedInventoryItemType + "Strength"];
}
if (_root.world[mobs[closestKillableMob][1]].health <= 0) {
_root.world[mobs[closestKillableMob][1]].giveXP();
}
if (((achieve == 7) && (mobs[closestKillableMob][0] == "pig")) && (_root.world[mobs[closestKillableMob][1]].health <= 0)) {
achieve = 8;
achieveGet.gotoAndPlay(1);
}
if (((achieve == 9) && (((mobs[closestKillableMob][0] == "creeper") || (mobs[closestKillableMob][0] == "zombie")) || (mobs[closestKillableMob][0] == "netherwalker"))) && (_root.world[mobs[closestKillableMob][1]].health <= 0)) {
achieve = 10;
achieveGet.gotoAndPlay(1);
}
if ((mobs[closestKillableMob][0] == "sheep") && (mobs[closestKillableMob][12] == false)) {
_root.world[mobs[closestKillableMob][1]].dropWool();
_root.world[mobs[closestKillableMob][1]].beenHit = true;
}
miningAnimation = true;
stopMiningAnimation = true;
if (_root.world[mobs[closestKillableMob][1]].blockX > (blockX + 2)) {
_root.world[mobs[closestKillableMob][1]].xSpeed = _root.world[mobs[closestKillableMob][1]].xSpeed - (10 + ((leftSprinting || rightSprinting) * 15));
} else if (_root.world[mobs[closestKillableMob][1]].blockX < (blockX - 2)) {
_root.world[mobs[closestKillableMob][1]].xSpeed = _root.world[mobs[closestKillableMob][1]].xSpeed + (10 + ((leftSprinting || rightSprinting) * 15));
}
_root.world[mobs[closestKillableMob][1]].upKey = true;
_root.world[mobs[closestKillableMob][1]].ouch(1);
_root.inventoryList[selectedInventoryItem - 1][2]++;
placeDelay = 0;
}
if (((closestMinableBlock != undefined) && (scene[closestMinableBlock[0]][closestMinableBlock[1]] != "br")) && (liquids2[scene[closestMinableBlock[0]][closestMinableBlock[1]]] == undefined)) {
foundMatch = false;
if (selectedInventoryTool == true) {
var _local3 = 0;
while (_local3 < this["with" + selectedInventoryItemType].length) {
var _local4 = 0;
while (_local4 < this["with" + selectedInventoryItemType][_local3].length) {
if (scene[closestMinableBlock[0]][closestMinableBlock[1]] == this["with" + selectedInventoryItemType][_local3][_local4]) {
if (world[(("blockX" + closestMinableBlock[0]) + "Y") + closestMinableBlock[1]].goingIn != speeds[_local3]) {
world[(("blockX" + closestMinableBlock[0]) + "Y") + closestMinableBlock[1]].gotoAndPlay(speeds[_local3 + inWater]);
}
placeDelay = 0;
foundMatch = true;
_local3 = this["with" + selectedInventoryItemType].length;
_local4 = this["with" + selectedInventoryItemType][_local3].length;
}
_local4++;
}
_local3++;
}
}
if (foundMatch == false) {
var _local3 = 0;
while (_local3 < withNone.length) {
var _local4 = 0;
while (_local4 < withNone[_local3].length) {
if (scene[closestMinableBlock[0]][closestMinableBlock[1]] == withNone[_local3][_local4]) {
if (world[(("blockX" + closestMinableBlock[0]) + "Y") + closestMinableBlock[1]].goingIn != speeds[_local3]) {
world[(("blockX" + closestMinableBlock[0]) + "Y") + closestMinableBlock[1]].gotoAndPlay(speeds[_local3 + inWater]);
}
placeDelay = 0;
_local3 = withNone.length;
_local4 = withNone[_local3].length;
}
_local4++;
}
_local3++;
}
}
}
}
}
}
}
blockX = coordBlock("x", world._x);
isHalfBlock = false;
if (halfBlocks[scene[blockX][coordBlock("y", world._y)]] != undefined) {
isHalfBlock = true;
}
blockY = coordBlock("y", world._y - (isHalfBlock * 14));
if (Key.isDown(83) || (Key.isDown(40))) {
sneaking = true;
} else {
sneaking = false;
}
standingOn1 = scene[coordBlock("x", ((world._x + 10) + (sneaking * 4)) + (isHalfBlock * 14))][blockY];
standingOn2 = scene[coordBlock("x", ((world._x - 10) - (sneaking * 4)) + (isHalfBlock * 14))][blockY];
standingOnSneak1 = scene[coordBlock("x", ((world._x - 10) + (sneaking * 3)) + (isHalfBlock * 14))][blockY];
standingOnSneak2 = scene[coordBlock("x", ((world._x + 10) - (sneaking * 3)) + (isHalfBlock * 14))][blockY];
if ((((standingOn1 == undefined) || (liquids2[standingOn1] != undefined)) || (walkThroughBlockHit[standingOn1] != undefined)) && (((standingOn2 == undefined) || (liquids2[standingOn2] != undefined)) || (walkThroughBlockHit[standingOn2] != undefined))) {
falling = true;
} else {
if (sneaking) {
if (((standingOnSneak1 == undefined) || (liquids2[standingOnSneak1] != undefined)) || (walkThroughBlockHit[standingOnSneak1] != undefined)) {
rightable = false;
}
if (((standingOnSneak2 == undefined) || (liquids2[standingOnSneak2] != undefined)) || (walkThroughBlockHit[standingOnSneak2] != undefined)) {
leftable = false;
}
}
if (wasFalling == true) {
wasFallingSpeed = -ySpeed;
}
ySpeed = 0;
}
if (wasFalling && (!falling)) {
if (wasFallingAndNotFalling <= 0) {
blockSound(blockX, blockY, 0, 0);
}
wasFallingAndNotFalling = 3;
bedded = false;
if (standingOn.substr(0, 3) == "bed") {
bedded = true;
}
if (wasFallingSpeed > (20 + (bedded * 5))) {
if (firstTime) {
firstTime = false;
wasFallingSpeed = 0;
} else {
wasFallingSpeed = wasFallingSpeed - 3.5;
reps = 0;
makeLargeOuch = false;
while (wasFallingSpeed >= 0) {
reps++;
if (reps > 5) {
makeLargeOuch = true;
}
health--;
wasFallingSpeed = wasFallingSpeed - Math.max(10 - reps, 1);
}
ouch(1 + makeLargeOuch);
}
}
world._y = ((Math.round((world._y + 16) / 30) * 30) - 15) - (isHalfBlock * 15);
lighting.l._y = ((Math.round((world._y + 16) / 30) * 30) - 15) - (isHalfBlock * 15);
} else {
wasFallingAndNotFalling--;
}
if (((scene[blockX][blockY + 1] != undefined) && (walkThroughBlockHit[scene[blockX][blockY + 1]] == undefined)) && (liquids2[scene[blockX][blockY + 1]] == undefined)) {
if (scene[blockX - 1][blockY + 1] == undefined) {
xSpeed = xSpeed - 2;
} else if (scene[blockX + 1][blockY + 1] == undefined) {
xSpeed = xSpeed + 2;
} else if (((scene[blockX][blockY + 2] == undefined) || (walkThroughBlockHit[scene[blockX][blockY + 2]] != undefined)) || (liquids2[scene[blockX][blockY + 2]] != undefined)) {
ySpeed = ySpeed + 5;
}
}
if (_root.water[(("blockX" + blockX) + "Y") + (blockY + 1)] != undefined) {
if (_root.water[(("blockX" + blockX) + "Y") + (blockY + 1)][0] > _root.water[(("blockX" + blockX) + "Y") + (blockY + 1)][1]) {
xSpeed = xSpeed - 1;
} else if (_root.water[(("blockX" + blockX) + "Y") + (blockY + 1)][0] < _root.water[(("blockX" + blockX) + "Y") + (blockY + 1)][1]) {
xSpeed = xSpeed + 1;
} else if ((_root.water[(("blockX" + blockX) + "Y") + (blockY + 1)][0] == _root.water[(("blockX" + blockX) + "Y") + (blockY + 1)][1]) == 9) {
ySpeed = ySpeed + 6;
}
}
if (_root.water[(("blockX" + blockX) + "Y") + (blockY + 2)] != undefined) {
if (_root.water[(("blockX" + blockX) + "Y") + (blockY + 2)][0] > _root.water[(("blockX" + blockX) + "Y") + (blockY + 2)][1]) {
xSpeed = xSpeed - 1;
} else if (_root.water[(("blockX" + blockX) + "Y") + (blockY + 2)][0] < _root.water[(("blockX" + blockX) + "Y") + (blockY + 2)][1]) {
xSpeed = xSpeed + 1;
} else if ((_root.water[(("blockX" + blockX) + "Y") + (blockY + 2)][0] == _root.water[(("blockX" + blockX) + "Y") + (blockY + 2)][1]) == 9) {
ySpeed = ySpeed + 6;
}
}
if ((((scene[coordBlock("x", world._x + 10) + 1][coordBlock("y", world._y + (isHalfBlock * 14)) + 1] != undefined) && (walkThroughBlockHit[scene[coordBlock("x", world._x + 10) + 1][coordBlock("y", world._y + (isHalfBlock * 14)) + 1]] == undefined)) && (_root.liquids2[scene[coordBlock("x", world._x + 10) + 1][coordBlock("y", world._y + (isHalfBlock * 14)) + 1]] == undefined)) || (((scene[coordBlock("x", world._x + 10) + 1][coordBlock("y", world._y + (isHalfBlock * 14)) + 2] != undefined) && (liquids2[scene[coordBlock("x", world._x + 10) + 1][coordBlock("y", world._y + (isHalfBlock * 14)) + 2]] == undefined)) && (walkThroughBlockHit[scene[coordBlock("x", world._x + 10) + 1][coordBlock("y", world._y + (isHalfBlock * 14)) + 2]] == undefined))) {
rightable = false;
if (xSpeed < 0) {
xSpeed = 0;
}
}
if ((((scene[coordBlock("x", world._x - 10) - 1][coordBlock("y", world._y + (isHalfBlock * 14)) + 1] != undefined) && (walkThroughBlockHit[scene[coordBlock("x", world._x - 10) - 1][coordBlock("y", world._y + (isHalfBlock * 14)) + 1]] == undefined)) && (_root.liquids2[scene[coordBlock("x", world._x - 10) - 1][coordBlock("y", world._y + (isHalfBlock * 14)) + 1]] == undefined)) || (((scene[coordBlock("x", world._x - 10) - 1][coordBlock("y", world._y + (isHalfBlock * 14)) + 2] != undefined) && (liquids2[scene[coordBlock("x", world._x - 10) - 1][coordBlock("y", world._y + (isHalfBlock * 14)) + 2]] == undefined)) && (walkThroughBlockHit[scene[coordBlock("x", world._x - 10) - 1][coordBlock("y", world._y + (isHalfBlock * 14)) + 2]] == undefined))) {
leftable = false;
if (xSpeed > 0) {
xSpeed = 0;
}
}
if (((scene[coordBlock("x", world._x)][coordBlock("y", world._y + (isHalfBlock * 14)) + 2] != undefined) && (walkThroughBlockHit[scene[coordBlock("x", world._x)][coordBlock("y", world._y + (isHalfBlock * 14)) + 2]] == undefined)) && (liquids2[scene[coordBlock("x", world._x)][coordBlock("y", (world._y + 5) + (isHalfBlock * 14)) + 2]] == undefined)) {
if (ySpeed > 0) {
ySpeed = -Math.abs(ySpeed / 2);
}
}
world._y = world._y + ySpeed;
world._x = world._x + xSpeed;
lighting.l._y = lighting.l._y + ySpeed;
lighting.l._x = lighting.l._x + xSpeed;
distanceX = distanceX + Math.abs(xSpeed);
if (distanceX > 30) {
distanceX = 0;
blockSound(blockX, blockY, 0, 0);
}
deepness = 0;
if ((scene[blockX][blockY + 2] == "wr") && ((water[(("blockX" + blockX) + "Y") + (blockY + 2)][0] >= 9) || (water[(("blockX" + blockX) + "Y") + (blockY + 2)][1] >= 9))) {
startUnderwaterTimer = 5;
airTimer--;
if (airTimer <= 0) {
airTimer = 30;
if (air <= 0) {
ouch(1);
health = health - 1;
} else {
air--;
}
}
if ((!random(10)) && (_root.so2.data.qual != 1)) {
p = world.attachMovie("wPart", "wPart" + random(10000000), world.getNextHighestDepth());
p._x = (blockX * 30) + 15;
p._y = ((-blockY) * 30) - 60;
}
if (inWater == false) {
if (_root.so2.data.qual != 1) {
var _local3 = 1;
while (_local3 <= 10) {
p = world.attachMovie("wPart", "wPart" + random(10000000), world.getNextHighestDepth());
p._x = (blockX * 30) + 15;
p._y = ((-blockY) * 30) - 105;
_local3++;
}
}
underwaterLoop("start");
}
inWater = true;
var _local3 = "1";
do {
deepness++;
_local3++;
} while (scene[blockX][blockY + _local3] == "wr");
soundPlayer.underWater.snd.setVolume(Math.min(deepness * 10, 100));
} else {
air = 11;
airTimer = 30;
if (startUnderwaterTimer <= 0) {
if (inWater == true) {
if (_root.so2.data.qual != 1) {
var _local3 = 1;
while (_local3 <= 20) {
p = world.attachMovie("wPart", "wPart" + random(10000000), world.getNextHighestDepth());
p._x = (blockX * 30) + 15;
p._y = ((-blockY) * 30) - 30;
_local3++;
}
}
requestSound("splash", 0, 0);
}
inWater = false;
underwaterLoop("stop");
} else {
startUnderwaterTimer--;
}
}
if (falling) {
if (liquids2[scene[blockX][blockY + 1]] != undefined) {
xSpeed = xSpeed * 0.8;
}
ySpeed = ySpeed - 2;
xSpeed = xSpeed * 0.6;
} else if (scene[blockX][blockY] == "ice") {
xSpeed = xSpeed * 0.9;
} else {
xSpeed = xSpeed * 0.7;
}
if (((liquids2[scene[blockX][blockY + 1]] != undefined) || (scene[blockX][blockY + 1] == "ladder")) || (scene[blockX][blockY + 1] == "rp")) {
ySpeed = ySpeed * 0.6;
}
if (!cantMove) {
keysX = false;
if (Key.isDown(68) || (Key.isDown(39))) {
rightKey = true;
if (rightable) {
char._xscale = -150;
if (sneaking) {
xSpeed = xSpeed + 1.3;
}
if (rightSprinting) {
xSpeed = xSpeed - 2.2;
}
xSpeed = xSpeed - 2.2;
keysX = true;
}
} else {
rightKey = false;
}
if (Key.isDown(65) || (Key.isDown(37))) {
leftKey = true;
if (leftable) {
char._xscale = 150;
if (sneaking) {
xSpeed = xSpeed - 1.3;
}
if (leftSprinting) {
xSpeed = xSpeed + 2.2;
}
xSpeed = xSpeed + 2.2;
keysX = true;
}
} else {
leftKey = false;
}
if (miningAnimation == true) {
animate = 3;
} else if ((standingOn1 == undefined) && (standingOn2 == undefined)) {
animate = 5;
} else if (keysX == true) {
animate = 2;
} else {
animate = 1;
}
if (hurtAnimation == true) {
animate = 4;
}
if (char._currentframe != animate) {
char.gotoAndStop(animate);
}
if ((Key.isDown(87) || (Key.isDown(32))) || (Key.isDown(38))) {
if ((scene[blockX][blockY].substr(0, 3) == "bed") && (falling == false)) {
ySpeed = ySpeed + 17;
world._y = world._y + (ySpeed / 2);
lighting.l._y = lighting.l._y + (ySpeed / 2);
} else if (((((((((((((((scene[blockX][blockY] == "ladder") || (scene[blockX][blockY] == "rp")) || (liquids2[scene[blockX][blockY]] != undefined)) && (scene[blockX][blockY + 1] != "ladder")) && (scene[blockX][blockY + 1] != "rp")) && (liquids2[scene[blockX][blockY + 1]] == undefined)) && (scene[blockX][blockY + 2] != "ladder")) && (scene[blockX][blockY + 2] != "rp")) && (liquids2[scene[blockX][blockY + 2]] == undefined)) && (scene[blockX][blockY + 3] != "ladder")) && (scene[blockX][blockY + 3] != "rp")) && (liquids2[scene[blockX][blockY + 3]] == undefined)) || (scene[blockX][blockY + 1] == "ladder")) || (scene[blockX][blockY + 1] == "rp")) || (liquids2[scene[blockX][blockY + 1]] != undefined)) {
ySpeed = ySpeed + 3;
world._y = world._y + 1;
lighting.l._y = lighting.l._y + 1;
} else if (falling == false) {
ySpeed = ySpeed + 13;
world._y = world._y + (ySpeed / 2);
lighting.l._y = lighting.l._y + (ySpeed / 2);
}
}
}
if (raining) {
closeRainsX = (closeRainsY = 0);
for (var _local3 in closeRains) {
closeRainsX = closeRainsX + closeRains[_local3][0];
closeRainsY = closeRainsY + closeRains[_local3][1];
}
closeRainsX = Math.round(closeRainsX / closeRains.length);
closeRainsY = Math.round(closeRainsY / closeRains.length);
if (soundPlayer.rain.sounding != 1) {
soundPlayer.rain.sounding = 1;
soundPlayer.rain.snd.stop();
soundPlayer.rain.snd.attachSound("rainSound");
soundPlayer.rain.snd.start();
}
if (lastVol == undefined) {
lastVol = 0;
}
if (lastPan == undefined) {
lastPan = 0;
}
soundPlayer.rain.snd.setVolume((soundPlayer.rain.snd.getVolume() + (((Math.max(Math.min(100 - (Math.sqrt((closeRainsX * closeRainsX) + (closeRainsY * closeRainsY)) / 4), 100), 0) * (so2.data.soundVol / 100)) - lastVol) / 20)) * 0.9);
if (soundPlayer.rain.snd.getVolume() < 0) {
soundPlayer.rain.snd.setVolume(0);
}
bbb = soundPlayer.rain.snd.getVolume();
lastVol = soundPlayer.rain.snd.getVolume();
soundPlayer.rain.snd.setPan(soundPlayer.rain.snd.getPan() + (((-closeRainsX) - lastPan) / 10));
lastPan = soundPlayer.rain.snd.getPan();
do {
closeRains.shift();
} while (closeRains.length > 20);
if (random(10) == 1) {
closeRains.shift();
}
var _local3 = 0;
while (_local3 <= 2) {
pickX = world.clouds._x + random(700);
if (biomeList[Math.round(pickX / 30)] != "desert") {
if (snowRegions[Math.round(pickX / 30)] == undefined) {
rainInstance = world.attachMovie("rain", "rain" + random(1000000), world.getNextHighestDepth());
rainInstance._x = pickX;
rainInstance._y = world.clouds._y;
} else if (random(5) == 1) {
snowInstance = world.attachMovie("snow", "snow" + random(1000000), world.getNextHighestDepth());
snowInstance._x = pickX;
snowInstance._y = world.clouds._y;
}
}
_local3++;
}
} else {
soundPlayer.rain.snd.stop();
soundPlayer.rain.sounding = 0;
}
if (_root.so.data.sceneNum == 2) {
darkness = 80;
lighting.bgLight._alpha = darkness;
} else if (so.data.worldHeight == 70) {
if (blockY >= 50) {
darkness = Math.min(((10 + Math.max(timeDarkness[tim] - 20, 0)) + (deepness * 10)) + (raining * 35), 85);
lighting.bgLight._alpha = darkness;
} else if (blockY <= 30) {
darkness = 90;
lighting.bgLight._alpha = darkness;
} else {
darkness = Math.min((((10 + ((1 - ((blockY - 30) / 20)) * 85)) + Math.max(timeDarkness[tim] - 20, 0)) + (deepness * 10)) + (raining * 35), 85);
lighting.bgLight._alpha = darkness;
}
} else if (blockY >= 90) {
darkness = Math.min(((10 + Math.max(timeDarkness[tim] - 20, 0)) + (deepness * 10)) + (raining * 35), 85);
lighting.bgLight._alpha = darkness;
} else if (blockY <= 70) {
darkness = 90;
lighting.bgLight._alpha = darkness;
} else {
darkness = Math.min((((10 + ((1 - ((blockY - 70) / 20)) * 85)) + Math.max(timeDarkness[tim] - 20, 0)) + (deepness * 10)) + (raining * 35), 85);
lighting.bgLight._alpha = darkness;
}
if (inventory._currentframe == 1) {
if (Key.isDown(_root.so2.data.keys[2])) {
if (dropKeyIsDown == false) {
if (((_root.inventoryList[selectedInventoryItem - 1][0] != undefined) && (_root.inventoryList[selectedInventoryItem - 1][1] != undefined)) && (_root.inventoryList[selectedInventoryItem - 1][1] != 0)) {
_root.dropNum++;
_root.world.attachMovie("drop", "drop" + _root.dropNum, _root.world.getNextHighestDepth());
closestSpace = getFurthestEmptyBlock(true);
_root.world["drop" + _root.dropNum]._x = ((closestSpace[0] + 1) * 30) - 15;
_root.world["drop" + _root.dropNum]._y = ((-(closestSpace[1] + 1)) * 30) + 15;
_root.world["drop" + _root.dropNum].damage = _root.inventoryList[selectedInventoryItem - 1][2];
_root.world["drop" + _root.dropNum].gotoAndStop(_root.inventoryList[selectedInventoryItem - 1][0]);
if (_root.inventoryList[selectedInventoryItem - 1][1] == 1) {
_root.inventoryList[selectedInventoryItem - 1][1] = "";
} else {
_root.inventoryList[selectedInventoryItem - 1][1]--;
}
if ((_root.inventoryList[selectedInventoryItem - 1][1] == "") || (_root.inventoryList[selectedInventoryItem - 1][1] <= 0)) {
_root.inventoryList[selectedInventoryItem - 1] = new Array(3);
}
}
}
dropKeyIsDown = true;
} else {
dropKeyIsDown = false;
}
if (Key.isDown(_root.so2.data.keys[3])) {
if (justPressed3 != true) {
justPressed3 = true;
if (blackScreen._currentframe == 1) {
pawsed = true;
blackScreen.gotoAndStop(7);
}
}
} else {
justPressed3 = false;
}
if (Key.isDown(_root.so2.data.keys[4])) {
if (justPressed4 != true) {
justPressed4 = true;
if (blackScreen._currentframe == 1) {
pawsed = true;
blackScreen.gotoAndStop(5);
}
}
} else {
justPressed4 = false;
}
if (Key.isDown(192)) {
if (justPressed2 != true) {
justPressed2 = true;
if (inventory._currentframe == 1) {
inventory.gotoAndStop("control");
}
}
} else {
justPressed2 = false;
}
}
if (Key.isDown(_root.so2.data.keys[0])) {
if (_root.achieve == 1) {
_root.achieve = 2;
_root.achieveGet.gotoAndPlay(1);
}
if (justPressed != true) {
justPressed = true;
if (inventory._currentframe != 1) {
inventory.requestClose();
} else {
inventory.gotoAndStop(2);
}
}
} else {
justPressed = false;
}
if (inventory._currentframe == 1) {
cantMove = false;
} else {
cantMove = true;
}
} else {
muteSound.setVolume(0);
}
if ((Key.getCode() >= 49) && (Key.getCode() <= 59)) {
if (Key.isDown(Key.getCode())) {
selectedInventoryItem = Key.getCode() - 48;
}
}
var _local3 = 1;
while (_local3 <= 9) {
this["i" + _local3].number = _local3;
if (((_root.inventoryList[_local3 - 1][0] != undefined) && (_root.inventoryList[_local3 - 1][0] != "")) && ((_root.inventoryList[_local3 - 1][1] != 0) || (_root.inventoryList[_local3 - 1][2] > 0))) {
this["i" + _local3].gotoAndStop(2);
this["i" + _local3].ty = _root.inventoryList[_local3 - 1][0];
this["i" + _local3].typ.gotoAndPlay(_root.inventoryList[_local3 - 1][0]);
if (_root.inventoryList[_local3 - 1][1] > 1) {
this["i" + _local3].count = _root.inventoryList[_local3 - 1][1];
} else {
this["i" + _local3].count = "";
}
this["i" + _local3].damage = _root.inventoryList[_local3 - 1][2];
} else {
this["i" + _local3].gotoAndStop(1);
}
_local3++;
}
wasFalling = false;
if (falling == true) {
wasFalling = true;
}
falling = false;
rightable = true;
leftable = true;
if ((rightSprinting == true) || (leftSprinting == true)) {
wasSprinting = true;
} else {
wasSprinting = false;
}
rightSprinting = false;
leftSprinting = false;
if (Key.isDown(27)) {
if (escapeWasntPressed) {
escapeWasntPressed = false;
if (inventory._currentframe != 1) {
inventory.requestClose();
} else if (blackScreen._currentframe == 3) {
pawsed = false;
blackScreen.gotoAndStop(1);
} else {
pawsed = true;
blackScreen.gotoAndStop(3);
}
}
} else {
escapeWasntPressed = true;
}
if (Key.isDown(113) && (generatingScreenShot != true)) {
generatingScreenShot = true;
print_me();
console.newLine("Generating screenshot... please wait...");
}
if (rightClickTimer > 0) {
if (rightClickTimer == 1) {
mouseD = false;
} else {
mouseD = true;
}
rightClickTimer--;
}
if (Key.isDown(_root.so2.data.keys[1]) || (rightClickTimer > 0)) {
shifting = true;
} else {
shifting = false;
}
mouseWheelThing = true;
}
function rc() {
_root.console.newLine(("Use " + whatIsShift()) + "+click instead!");
rightClickTimer = 2;
}
function whatIsShift() {
return(_root.so2.data.keysNames[1]);
}
stop();
Mouse.show();
var muteSound = new Sound(this);
muteSound.setVolume = 100;
delete onEnterFrame;
clearInterval(mainInterval);
var listener123 = new Object();
listener123.onComplete = function (target, load_var) {
printingScreen = false;
load_var.send("http://zanzlanz.com/MBSS.php", "_blank", "POST");
};
var men = new ContextMenu(rc);
men.hideBuiltInItems();
var shif = new ContextMenuItem(("Use " + whatIsShift()) + "+click instead!", whatIsShift);
var zanzlanzCom = new ContextMenuItem("By: Zanzlanz", zanzlanzDotCom);
men.customItems[0] = shif;
men.customItems[1] = zanzlanzCom;
_root.menu = men;
_highquality = _root.so2.data.qual;
WoodenPickaxeStrength = 2;
StonePickaxeStrength = 3;
IronPickaxeStrength = 4;
GoldPickaxeStrength = 4;
DiamondPickaxeStrength = 5;
ObsidianPickaxeStrength = 7;
WoodenAxeStrength = 2;
StoneAxeStrength = 3;
IronAxeStrength = 4;
GoldAxeStrength = 4;
DiamondAxeStrength = 5;
IronShovelStrength = 3;
GoldShovelStrength = 3;
DiamondShovelStrength = 4;
WoodenSwordStrength = 4;
StoneSwordStrength = 6;
IronSwordStrength = 7;
GoldSwordStrength = 8;
DiamondSwordStrength = 9;
WoodenSwordLife = (WoodenAxeLife = (WoodenPickaxeLife = (WoodenHoeLife = (WoodenShovelLife = (ShearLife = 60)))));
StoneSwordLife = (StoneAxeLife = (StonePickaxeLife = (StoneHoeLife = (StoneShovelLife = 132))));
IronSwordLife = (IronAxeLife = (IronPickaxeLife = (IronHoeLife = (IronShovelLife = 251))));
GoldSwordLife = (GoldAxeLife = (GoldPickaxeLife = (GoldHoeLife = (GoldShovelLife = (fasLife = 33)))));
DiamondSwordLife = (DiamondAxeLife = (DiamondPickaxeLife = (DiamondHoeLife = (DiamondShovelLife = 1562))));
ObsidianPickaxeLife = 3000;
timeDarkness = [30, 20, 10, 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, 10, 20, 30, 40, 50, 60, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 60, 50, 40];
cloths = ["clothgreen", "clothwhite", "clothyellow", "clothred", "clothorange"];
speeds = ["fastest", "fast", "normal", "slow", "slower", "slowest"];
withNone = [["sc", "gasd", "shrub", "seed", "lgr", "ortorch", "rstorch", "rsd", "th", "fw1", "fw2", "ms1", "ms2", "sl"], ["sign", "portal", "piston", "piston1", "piston2", "light", "lv", "lv1", "lv2", "lv3", "snow", "snowblock", "rp"], ["cake", "lever", "pp", "button", "gv", "moss", "dt", "farm", "gs", "ice", "TNT"].concat(cloths), ["books", "j", "note", "cy", "bb", "sd", "wd", "wd1", "wp", "ct", "sw"], ["halfcs", "glow", "ladder", "bed1", "bed2", "chest", "oven", "pk", "jl", "craft", "dr1", "dr2", "dr3", "dr4"], ["sb", "nb", "to", "ss", "portalstone", "ob", "n", "os", "mobSpawner", "bricks", "cl", "in", "cs", "r", "ms"]];
withWoodenAxe = [[], ["sign", "bb"], ["books", "note", "wd", "wp", "bb"], ["pk", "jl", "bed1", "bed2"], ["ladder", "chest"], []];
withStoneAxe = [[], ["books", "sign", "note", "wd", "wd1", "wp", "bb"], ["bed1", "bed2"], ["pk", "jl", "ladder", "chest"], [], []];
withIronAxe = [["sign"], ["books", "note", "wd", "wd1", "wp", "bb"], ["pk", "jl", "ladder", "chest", "bed1", "bed2"], [], [], []];
withGoldAxe = [["books", "sign", "note", "wd", "wd1", "wp", "bb"], [], ["pk", "jl", "ladder", "chest", "bed1", "bed2"], [], [], []];
withDiamondAxe = [["sign", "note", "wd", "wd1", "wp", "bb"], ["pk", "jl", "bed1", "bed2"], ["ladder", "chest"], [], [], []];
withObsidianPickaxe = [["snow", "snowblock", "gv", "dt", "cy", "sd", "sign", "note", "wd", "wd1", "wp", "bb", "pk", "jl", "bed1", "bed2", "ladder", "chest", "halfcs", "sb", "nb", "to", "ss", "glow", "n", "os", "lever", "pp", "ms", "r", "bricks", "ice", "cs", "cl", "in", "gd", "dm", "coral", "ob", "ib", "rs", "gb", "db"], [], [], [], [], []];
withWoodenPickaxe = [[], [], ["halfcs", "lever", "pp", "ice"], ["sb", "nb", "ss", "glow", "r", "cs", "ms", "cl", "bricks"], ["n"], ["os", "in", "coral"]];
withStonePickaxe = [[], ["halfcs", "lever", "pp", "ice"], ["sb", "nb", "to", "ss", "glow", "r", "cs", "ms", "cl", "bricks"], ["n", "in"], ["coral"], ["os", "ib", "gb", "rs"]];
withIronPickaxe = [["os"], ["halfcs", "sb", "nb", "to", "ss", "glow", "n", "lever", "pp", "r", "ms", "bricks", "cs", "cl", "ice"], ["in", "gd", "dm"], ["coral"], ["ib", "gb"], ["db", "rs"]];
withGoldPickaxe = [["halfcs", "sb", "nb", "to", "ss", "glow", "n", "os", "lever", "pp", "r", "ms", "bricks", "ice", "cs", "in", "cl"], ["gd", "dm", "coral"], [], ["ib", "gb", "db", "rs"], ["ob"], []];
withDiamondPickaxe = [["halfcs", "sb", "nb", "to", "ss", "glow", "n", "os", "lever", "pp", "ms", "r", "bricks", "ice", "cs", "cl"], ["in", "gd", "dm"], ["coral"], [], ["ob", "ib", "rs", "gb", "db"], []];
withWoodenShovel = [[], ["snow", "dt", "snowblock"], ["gv", "cy", "sd"], [], [], []];
withStoneShovel = [["snow"], ["gv", "cy", "dt", "sd", "snowblock"], [], [], [], []];
withIronShovel = [["snow", "snowblock", "gv", "sd"], ["cy", "dt"], [], [], [], []];
withGoldShovel = [["snow", "snowblock", "gv", "dt", "cy", "sd"], [], [], [], [], []];
withDiamondShovel = [["snow", "snowblock", "gv", "dt", "cy", "sd"], [], [], [], [], []];
withShear = [["moss", "snow"], [], [], [], [], []];
blackScreen.gotoAndStop(2);
var pawsed = false;
usingPortal = false;
if (loadWorld == false) {
var biomes = ["forest", "plain", "desert", "water", "ruins", "mountain"];
randBiomeNum = randomNumber(1, 30);
if (randBiomeNum == 1) {
var biome = biomes[4];
} else if (randBiomeNum < 5) {
var biome = biomes[3];
} else if (randBiomeNum < 10) {
var biome = biomes[2];
} else if (randBiomeNum < 20) {
var biome = biomes[1];
} else if (randBiomeNum < 23) {
var biome = biomes[5];
} else {
var biome = biomes[0];
}
var noWater = true;
var timeUntilNextBiome = (20 + randomNumber(0, 20));
var food = 1000;
var arrows = new Object();
var arrowNum = 0;
var achieve = 0;
var rainDay = 1;
var hasSignal = new Object();
var sceneNum = 1;
var sheepNum = 0;
var cowNum = 0;
var pigNum = 0;
var creeperNum = 0;
var zombieNum = 0;
var chickenNum = 0;
var netherwalkerNum = 0;
var spiderNum = 0;
var mobNum = 0;
var signs = [];
var biomeList = [];
var water = new Object();
var wheat = new Object();
var mobs = new Object();
var states = new Object();
var onFire = new Object();
var raining = 0;
var rafts = new Object();
var raftNum = 0;
var playingTNT = new Object();
var firstTimes = new Object();
var toSmelt = new Object();
var chests = new Object();
var toGrow = new Object();
var day = 1;
var snowRegions = new Object();
var air = 11;
var tim = 4;
var firstTime = true;
var regenerate = false;
var degenerate = false;
var selectedInventoryItem = 1;
var drops = new Object();
var dropNum = 0;
var intervalNum = 0;
var inventoryList = new Array(44);
var i = 0;
while (i <= 44) {
inventoryList[i] = [undefined, undefined, 0];
i++;
}
var health = 20;
var xSpeed = 0;
var ySpeed = 0;
var worldWidth = 1000;
var worldHeight = 120;
var making = false;
var generatingWorld = true;
var scene = [];
var theHeight = (-(250 - (worldHeight * 30)));
world._x = (((-worldWidth) / 2) * 30) + 275;
world._y = (worldHeight * 30) + 200;
var i = -5;
while (i <= (worldWidth + 5)) {
scene[i] = [Void, Void, 0];
i++;
}
} else {
checkVars = [["biomeList", "obj"], ["water1", "arr"], ["water2", "arr"], ["signs1", "arr"], ["signs2", "arr"], ["degenerate", 0], ["regenerate", 0], ["wheat", "obj"], ["arrowNum", 0], ["arrows", "obj"], ["spiderNum", 0], ["food", 1000], ["achieve", 0], ["chickenNum", 0], ["netherwalkerNum", 0], ["seed", random(100000)], ["rainDay", so.data.day], ["hasSignal", "obj", true], ["states", "obj"], ["sceneNum", 1]];
var i = 0;
while (i < checkVars.length) {
if (so.data[checkVars[i][0]] == undefined) {
if (checkVars[i][1] == "obj") {
so.data[checkVars[i][0]] = new Object();
} else if (checkVars[i][1] == "arr") {
so.data[checkVars[i][0]] = new Array();
} else {
so.data[checkVars[i][0]] = checkVars[i][1];
}
}
i++;
}
arrows = so.data.arrows;
arrowNum = so.data.arrowNum;
spiderNum = so.data.spiderNum;
food = so.data.food;
rainDay = so.data.rainDay;
achieve = so.data.achieve;
sceneNum = so.data.sceneNum;
sheepNum = so.data.sheepNum;
netherwalkerNum = so.data.netherwalkerNum;
cowNum = so.data.cowNum;
creeperNum = so.data.creeperNum;
zombieNum = so.data.zombieNum;
chickenNum = so.data.chickenNum;
pigNum = so.data.pigNum;
mobNum = so.data.mobNum;
raining = so.data.raining;
raftNum = so.data.raftNum;
rafts = so.data.rafts;
day = so.data.day;
snowRegions = so.data.snowRegions;
firstTimes = so.data.firstTimes;
air = so.data.air;
tim = so.data.tim;
firstTime = false;
seed = so.data.day;
health = so.data.health;
selectedInventoryItem = so.data.selectedInventoryItem;
intervalNum = so.data.intervalNum;
inventoryList = so.data.inventoryList;
xSpeed = so.data.xSpeed;
ySpeed = so.data.ySpeed;
dropNum = so.data.dropNum;
worldWidth = so.data.worldWidth;
worldHeight = so.data.worldHeight;
regenerate = so.data.regenerate;
degenerate = so.data.degenerate;
generatingWorld = false;
making = true;
biomeList = so.data.sceneNum;
water = so.data["water" + sceneNum];
wheat = so.data["wheat" + sceneNum];
signs = so.data["signs" + sceneNum];
mobs = so.data["mobs" + sceneNum];
drops = so.data["drops" + sceneNum];
scene = so.data["scene" + sceneNum];
toSmelt = so.data["toSmelt" + sceneNum];
chests = so.data["chests" + sceneNum];
states = so.data.states1;
toGrow = so.data["toGrow" + sceneNum];
onFire = so.data["onFire" + sceneNum];
playingTNT = so.data["playingTNT" + sceneNum];
hasSignal = so.data["hasSignal" + sceneNum];
spawnPoint = so.data["spawnPoint" + sceneNum];
theHeight = so.data.theHeight;
if (so.data.respawn == true) {
health = 20;
food = 1000;
so.data.respawn = false;
var inventoryList = new Array(44);
var i = 0;
while (i <= 44) {
inventoryList[i] = new Array(3);
i++;
}
xSpeed = 0;
ySpeed = 0;
world._x = so.data["spawnPoint" + sceneNum][0];
world._y = so.data["spawnPoint" + sceneNum][1];
save();
} else {
world._x = so.data.worldX;
world._y = so.data.worldY;
}
}
shiftClickBlock = addToObject(["cake", "sign", "j", "note", "portalstone", "lever", "button", "craft", "dr1", "dr2", "dr3", "dr4", "oven", "chest", "bed1", "bed2"]);
stones = addToObject(["halfcs", "sb", "nb", "to", "ss", "rail", "piston", "piston1", "piston2", "portalstone", "glow", "n", "os", "light", "lever", "pp", "button", "bricks", "ice", "r", "dm", "cl", "gd", "in", "cs", "ob", "rs", "br", "oven", "coral", "gb", "ib", "db", "gs"]);
grasses = addToObject(["sc", "shrub", "seed", "lgr", "cy", "farm", "dt", "lv", "lv1", "lv2", "lv3", "sl", "fw1", "fw2", "ms1"]);
woods = addToObject(["books", "sign", "note", "ortorch", "rstorch", "raft", "bb", "wd", "wd1", "wp", "th", "craft", "dr1", "dr2", "dr3", "dr4", "pk", "jl", "ladder", "chest", "bed1", "bed2"]);
mushes = addToObject(["cake", "j", "gv", "moss", "ct", "sd", "sw", "snow", "snowblock", "rp"].concat(cloths));
placeableTypes = addToObject(["halfcs", "books", "cake", "sc", "gasd", "sign", "sb", "nb", "seed", "j", "ms1", "ms2", "ss", "rail", "piston", "piston1", "piston2", "note", "portalstone", "glow", "n", "portal", "ortorch", "mobSpawner", "ms", "light", "lever", "pp", "button", "rstorch", "rsd", "gv", "bricks", "lv", "bb", "rp", "TNT", "cloth", "bed", "snowblock", "ice", "wbk", "lbk", "abk", "chest", "db", "pk", "ib", "gb", "oven", "wd", "jl", "coral", "ladder", "gs", "fw1", "fw2", "r", "dt", "gd", "in", "sd", "ct", "cs", "ob", "sl", "br", "wp", "th", "craft", "dr"].concat(cloths));
wtbs = ["cake", "sc", "gasd", "sign", "shrub", "seed", "lgr", "ms1", "ms2", "bb", "rail", "portal", "ortorch", "light", "lever", "pp", "button", "rstorch", "rsd", "sl", "th", "dr1", "dr2", "sw", "fw1", "fw2", "ladder", "snow", "moss", "rp"];
walkThroughBlock = addToObject(wtbs);
walkThroughBlockHit = addToObject(["wd1", "lv", "lv1", "lv2", "lv3"].concat(wtbs));
waterWalkThroughBlock = addToObject(["cake", "sc", "shrub", "seed", "lgr", "ms1", "ms2", "ortorch", "light", "button", "rstorch", "rsd", "moss", "sl", "th", "fw1", "fw2", "snow"]);
flammable = addToObject(["sign", "shrub", "seed", "lgr", "ms1", "ms2", "note", "bb", "wd", "wp", "bed", "ladder", "lv", "lv1", "lv2", "lv3", "fl1", "fl2", "dr1", "dr2", "dr3", "dr4"].concat(cloths));
halfBlocks = addToObject(["halfcs"]);
var flamRate = new Object();
flamRate.pk = 700;
flamRate.note = 600;
flamRate.books = 500;
flamRate.dr1 = 500;
flamRate.dr2 = 500;
flamRate.dr3 = 500;
flamRate.dr4 = 500;
flamRate.bed1 = 500;
flamRate.bed2 = 500;
flamRate.ladder = 400;
flamRate.wd = 300;
flamRate.wd1 = 300;
flamRate.wp = 250;
flamRate.sign = 250;
flamRate.cloth = 100;
flamRate.bb = 100;
flamRate.ms1 = 50;
flamRate.ms2 = 50;
flamRate.fl1 = 50;
flamRate.fl2 = 50;
flamRate.lgr = 50;
flamRate.lv = 50;
flamRate.lv1 = 50;
flamRate.lv2 = 50;
flamRate.lv3 = 50;
flamRate.shrub = 50;
flamRate.seed = 50;
replaceBlocks = addToObject(["shrub", "seed", "lgr", "portal", "moss", "snow"]);
unstackables = addToObject(["ObsidianPickaxe", "cake", "sign", "gap", "bread", "WoodenHoe", "StoneHoe", "IronHoe", "GoldHoe", "DiamondHoe", "j", "soup", "bow", "cart", "fas", "Shear", "raft", "bk", "bed", "wbk", "abk", "lbk", "WoodenSword", "StoneSword", "IronSword", "GoldSword", "DiamondSword", "WoodenPickaxe", "StonePickaxe", "IronPickaxe", "GoldPickaxe", "DiamondPickaxe", "WoodenAxe", "StoneAxe", "IronAxe", "GoldAxe", "DiamondAxe", "WoodenShovel", "StoneShovel", "IronShovel", "GoldShovel", "DiamondShovel"]);
itemUse = addToObject(["ObsidianPickaxe", "gap", "egg", "bread", "seed", "WoodenHoe", "StoneHoe", "IronHoe", "GoldHoe", "DiamondHoe", "soup", "bow", "cart", "nugget", "cchicken", "pork", "cpork", "fas", "or", "ap", "raft", "bk", "snowb"]);
tools = addToObject(["ObsidianPickaxe", "WoodenHoe", "StoneHoe", "IronHoe", "GoldHoe", "DiamondHoe", "fas", "Shear", "WoodenSword", "StoneSword", "IronSword", "GoldSword", "DiamondSword", "WoodenPickaxe", "StonePickaxe", "IronPickaxe", "GoldPickaxe", "DiamondPickaxe", "WoodenAxe", "StoneAxe", "IronAxe", "GoldAxe", "DiamondAxe", "WoodenShovel", "StoneShovel", "IronShovel", "GoldShovel", "DiamondShovel"]);
var dropDifferent = new Object();
dropDifferent.lv1 = "ap";
dropDifferent.lv2 = "or";
dropDifferent.lv3 = "gap";
dropDifferent.r = "cs";
dropDifferent.dr1 = "dr";
dropDifferent.dr2 = "dr";
dropDifferent.dr3 = "dr";
dropDifferent.dr4 = "dr";
dropDifferent.rs = "rsd";
dropDifferent.gs = "gss";
dropDifferent.bed1 = "bed";
dropDifferent.bed2 = "bed";
dropDifferent.snow = "snowb";
dropDifferent.snowblock = "snowb";
dropDifferent.os = "oddrock";
dropDifferent.glow = "yellowdust";
dropDifferent.mobSpawner = "na";
dropDifferent.portal = "na";
dropDifferent.shrub = "na";
dropDifferent.cake = "na";
dropDifferent.piston1 = "piston";
dropDifferent.piston2 = "piston";
dropDifferent.wd1 = "wd";
dropDifferent.to = "topaz";
dropDifferent.farm = "dt";
dropDifferent.books = "book";
liquids = ["wr", "la", "ad"];
liquids2 = addToObject(liquids);
cantMove = false;
var CHUNKS = new Object();
var caves = [];
var closeRains = [[0, 0]];
var placeDelay = 0;
var distanceX = 0;
var distanceY = 0;
var coalIronFrequency = 25;
var redstoneFrequency = 5;
var gravelFrequency = 1;
var diamondFrequency = 2;
var goldFrequency = 3;
var oddStoneFrequency = 4;
var topazFrequency = 4;
var reach = 120;
var lastWorldHeight = ((randomNumber(0, 9) + Math.round(worldHeight * 0.8)) - 10);
var slope = (randomNumber(0, 2) - 1);
var currentY = lastWorldHeight;
var currentX = 0;
var currentLine = (Math.round((-world._x) / 30) - 6);
pxdnes.toAdd = 0;
pxdnes.user = so2.data.USERNAME;
if (generateNether) {
currentY = 60;
}
soundAt = 1;
onEnterFrame = function () {
if (generateNether) {
i = 1;
startTimer = getTimer();
blackScreen.statis = "Generating Nether...";
blackScreen.loadingBar._xscale = (currentX / worldWidth) * 100;
finishedNether = false;
while (i == 1) {
if (scene[currentX] == undefined) {
scene[currentX] = new Array();
}
if (currentY >= 0) {
if (randomNumber(0, 999) <= 10) {
makeMine(currentX - 1, currentY - 1, 3, 2 + randomNumber(0, 2), "ob");
} else {
rTA(currentX - 1, currentY - 1, "n");
}
} else {
if (currentX > worldWidth) {
finishedNether = true;
i = 0;
}
currentY = worldHeight;
currentX++;
if (scene[currentX] == undefined) {
scene[currentX] = new Array();
}
}
currentY--;
if ((startTimer + 500) < getTimer()) {
i = 0;
}
}
if (finishedNether == true) {
var i = 0;
while (i <= (40 + randomNumber(0, 30))) {
makeMine(randomNumber(0, worldWidth - 1), 10 + randomNumber(0, worldHeight - 10), randomNumber(0, 3) + 5, 30, undefined, true, true);
i++;
}
var _local6 = 0;
while (_local6 <= 500) {
r1 = randomNumber(0, worldHeight);
r2 = randomNumber(0, worldWidth);
var _local2 = 0;
while (_local2 >= -20) {
if ((scene[r2][(r1 + 1) + _local2] == "n") && (scene[r2][r1 + _local2] == undefined)) {
makeMine(r2, r1 + _local2, 3, 3, "glow");
_local2 = -21;
}
_local2--;
}
_local6++;
}
var i = 0;
while (i <= (40 + randomNumber(0, 20))) {
makeMine(randomNumber(0, worldWidth - 1), randomNumber(0, worldHeight), 4, 10, "la", true, true);
i++;
}
makeMine(worldWidth / 2, 30, 5, 5, undefined, true, true);
makeMine(worldWidth / 2, 30, 5, 5, undefined, true, true);
makeMine(worldWidth / 2, 30, 5, 5, undefined, true, true);
scene[worldWidth / 2][29] = "portalstone";
scene[(worldWidth / 2) - 1][29] = "portalstone";
scene[(worldWidth / 2) - 2][29] = "portalstone";
scene[(worldWidth / 2) + 1][29] = "portalstone";
scene[(worldWidth / 2) - 2][30] = "portalstone";
scene[(worldWidth / 2) + 1][30] = "portalstone";
scene[worldWidth / 2][30] = "portal";
scene[(worldWidth / 2) - 1][30] = "portal";
scene[worldWidth / 2][31] = undefined;
scene[(worldWidth / 2) - 1][31] = undefined;
scene[(worldWidth / 2) + 1][31] = undefined;
scene[(worldWidth / 2) - 2][31] = undefined;
var _local5 = 0;
while (_local5 <= (worldHeight - 1)) {
scene[0][_local5] = "br";
_local5++;
}
_local5 = 0;
while (_local5 <= (worldWidth - 2)) {
scene[_local5][0] = "br";
_local5++;
}
_local5 = 0;
while (_local5 <= (worldWidth - 2)) {
scene[_local5][worldHeight - 1] = "br";
_local5++;
}
_local5 = 0;
while (_local5 <= (worldHeight - 1)) {
scene[worldWidth - 2][_local5] = "br";
_local5++;
}
generatingWorld = false;
generateNether = false;
making = true;
}
} else if (generatingWorld) {
i = 1;
startTimer = getTimer();
blackScreen.loadingBar._xscale = (currentX / worldWidth) * 100;
do {
if (currentY >= 0) {
if ((lastWorldHeight + slope) >= (worldHeight * 1.1)) {
slope = slope - 1;
}
if ((lastWorldHeight + slope) <= (worldHeight * 0.7)) {
slope = slope + 1;
}
if ((lastWorldHeight + slope) <= (worldHeight * 0.76)) {
slopeNoMatterWhat = 2;
slope = 1;
}
if ((currentY - 1) >= (lastWorldHeight - 2)) {
if (randomNumber(0, 6) == 1) {
ranSlope = randomNumber(0, 50);
if (ranSlope <= 25) {
slope = 0;
} else if (ranSlope <= 40) {
slope = (randomNumber(0, 1) * 2) - 1;
} else {
slope = (randomNumber(0, 1) * 4) - 2;
}
}
timeUntilNextBiome--;
if (timeUntilNextBiome <= 0) {
randBiomeNum = randomNumber(1, 30);
if (randBiomeNum == 1) {
var _local1 = biomes[4];
} else if (randBiomeNum < 5) {
var _local1 = biomes[3];
} else if (randBiomeNum < 10) {
var _local1 = biomes[2];
} else if (randBiomeNum < 20) {
var _local1 = biomes[1];
} else if (randBiomeNum < 23) {
var _local1 = biomes[5];
} else {
var _local1 = biomes[0];
}
var timeUntilNextBiome = (20 + randomNumber(0, 20));
}
if (!randomNumber(0, 100)) {
snowyRegion = false;
}
if (!randomNumber(0, 200)) {
snowyRegion = true;
}
biomeList[currentX] = _local1;
if (_local1 != "water") {
noWater = true;
}
if (_local1 == "ruins") {
slopeNoMatterWhat = 0;
if (inRoom != true) {
if (randomNumber(0, 4) == 1) {
lastPole = currentX - 1;
inRoom = true;
rTA(currentX - 1, currentY, "cs");
rTA(currentX - 1, currentY + 1, "cs");
rTA(currentX - 1, currentY + 2, "cs");
if (randomNumber(0, 2)) {
rTA(currentX - 1, currentY + 3, "cs");
if (randomNumber(0, 2)) {
rTA(currentX - 1, currentY + 4, "cs");
} else {
rTA(currentX - 1, currentY + 4, "moss");
if (randomNumber(0, 2)) {
rTA(currentX, currentY + 3, "cs");
rTA(currentX, currentY + 4, "moss");
}
}
} else {
rTA(currentX - 1, currentY + 3, "moss");
if (randomNumber(0, 2)) {
rTA(currentX, currentY + 2, "cs");
rTA(currentX, currentY + 3, "moss");
}
}
}
} else if (((lastPole + 3) + randomNumber(0, 3)) < (currentX - 1)) {
if (randomNumber(0, 3) == 1) {
lastPole = currentX - 1;
inRoom = true;
rTA(currentX - 1, currentY, "cs");
rTA(currentX - 1, currentY + 1, "cs");
rTA(currentX - 1, currentY + 2, "cs");
if (randomNumber(0, 2)) {
rTA(currentX - 1, currentY + 3, "cs");
if (randomNumber(0, 2)) {
rTA(currentX - 1, currentY + 4, "cs");
} else {
if (inRoom) {
if (randomNumber(0, 2)) {
rTA(currentX, currentY + 4, "moss");
rTA(currentX, currentY + 3, "cs");
}
}
if (randomNumber(0, 2)) {
rTA(currentX - 2, currentY + 4, "moss");
rTA(currentX - 2, currentY + 3, "cs");
}
}
} else {
if (inRoom) {
if (randomNumber(0, 2)) {
rTA(currentX, currentY + 3, "moss");
rTA(currentX, currentY + 2, "cs");
}
}
if (randomNumber(0, 2)) {
rTA(currentX - 2, currentY + 3, "moss");
rTA(currentX - 2, currentY + 2, "cs");
}
}
}
} else if (randomNumber(0, 15) == 1) {
hasChest = true;
rTA(currentX - 1, currentY, "chest");
chests[(("blockX" + (currentX - 1)) + "Y") + currentY] = new Array(27);
var _local4 = 0;
while (_local4 < 10) {
chestItems = [["wd", randomNumber(1, 5), ""], ["gp", "", ""], ["oddrock", randomNumber(1, 5), ""], ["or", randomNumber(1, 5), ""], ["gap", randomNumber(1, 5), ""], ["topaz", randomNumber(1, 5), ""], ["StonePickaxe", "", randomNumber(0, 20)], ["StoneShovel", "", randomNumber(0, 10)], ["StoneSword", "", randomNumber(0, 10)], ["StoneAxe", "", randomNumber(0, 15)], ["cs", randomNumber(1, 15), ""], ["gi", randomNumber(1, 3), ""], ["dm", randomNumber(1, 3), ""], ["cl", randomNumber(1, 6), ""], ["ii", randomNumber(1, 6), ""], ["rsd", randomNumber(1, 10), ""], ["bb", randomNumber(1, 20), ""], ["sw", randomNumber(1, 9), ""], ["bk", "", ""], ["wp", randomNumber(1, 8), ""], ["fw1", randomNumber(1, 3), ""], ["fw2", randomNumber(1, 3), ""], ["flint", randomNumber(1, 4), ""]];
randomItemNum = randomNumber(0, chestItems.length - 1);
chests[(("blockX" + (currentX - 1)) + "Y") + currentY][randomNumber(0, 27)] = chestItems[randomItemNum];
_local4++;
}
}
} else if (_local1 == "water") {
if (noWater == true) {
noWater = false;
waterHeight = currentY - lastSlope;
slope = -2;
slopeNoMatterWhat = -1;
} else {
var _local3 = waterHeight;
while (_local3 > 50) {
if (waterHeight > lastWorldHeight) {
timeUntilNextBiome = 0;
} else if (_local3 > (lastWorldHeight + slope)) {
rTA(currentX - 1, _local3, "wr");
} else {
_local3 = 0;
}
_local3--;
}
if (timeUntilNextBiome > 20) {
slope = Math.min(slope + randomNumber(-1, 2), 2);
} else {
slope = Math.max(slope - randomNumber(-1, 2), -2);
}
}
} else if (_local1 == "mountain") {
if (timeUntilNextBiome > 20) {
slopeNoMatterWhat = Math.min(slope + randomNumber(-1, 2), 4);
slope = slopeNoMatterWhat;
} else {
slopeNoMatterWhat = Math.max(slope - randomNumber(-1, 2), -4);
slope = slopeNoMatterWhat;
}
}
if ((snowRegions[currentX - 5] == true) && (_local1 != "desert")) {
rTA(currentX - 5, scene[currentX - 5].length, "snow");
}
if (((_local1 != "desert") && (snowyRegion != true)) && (randomNumber(0, 150) == 1)) {
snowyRegion = true;
}
if (snowyRegion) {
snowRegions[currentX - 1] = true;
if (randomNumber(0, 50) == 1) {
snowyRegion = false;
}
}
doSand = false;
if ((_local1 == "desert") || (_local1 == "water")) {
rTA(currentX - 1, currentY - 1, "sd");
} else if (_local1 == "ruins") {
rTA(currentX - 1, currentY - 1, "cs");
if (scene[currentX - 1][currentY] == undefined) {
rTA(currentX - 1, currentY, "moss");
}
} else {
rTA(currentX - 1, currentY - 1, "dt");
}
if ((randomNumber(0, 100) == 1) || (((startBamboo == true) && (_local1 != "desert")) && (_local1 != "water"))) {
if (startBamboo != true) {
startBamboo = true;
numBamboo = randomNumber(3, 7);
}
numBamboo--;
rTA(currentX - 1, currentY, "bb");
firstTimes[(("blockX" + (currentX - 1)) + "Y") + currentY] = true;
rTA(currentX - 1, currentY + 1, "bb");
firstTimes[(("blockX" + (currentX - 1)) + "Y") + (currentY + 1)] = true;
rTA(currentX - 1, currentY + 2, "bb");
firstTimes[(("blockX" + (currentX - 1)) + "Y") + (currentY + 2)] = true;
rTA(currentX - 1, currentY + 3, "bb");
firstTimes[(("blockX" + (currentX - 1)) + "Y") + (currentY + 3)] = true;
rTA(currentX - 1, currentY + 4, "bb");
firstTimes[(("blockX" + (currentX - 1)) + "Y") + (currentY + 4)] = true;
rTA(currentX - 1, currentY + 5, "bb");
firstTimes[(("blockX" + (currentX - 1)) + "Y") + (currentY + 5)] = true;
rTA(currentX - 1, currentY + 6, "bb");
firstTimes[(("blockX" + (currentX - 1)) + "Y") + (currentY + 6)] = true;
if (randomNumber(0, 2)) {
rTA(currentX - 1, currentY + 7, "bb");
firstTimes[(("blockX" + (currentX - 1)) + "Y") + (currentY + 7)] = true;
if (randomNumber(0, 2)) {
rTA(currentX - 1, currentY + 8, "bb");
firstTimes[(("blockX" + (currentX - 1)) + "Y") + (currentY + 8)] = true;
if (randomNumber(0, 2)) {
rTA(currentX - 1, currentY + 9, "bb");
firstTimes[(("blockX" + (currentX - 1)) + "Y") + (currentY + 9)] = true;
if (randomNumber(0, 2)) {
rTA(currentX - 1, currentY + 10, "bb");
firstTimes[(("blockX" + (currentX - 1)) + "Y") + (currentY + 10)] = true;
}
}
}
}
if (numBamboo <= 0) {
startBamboo = false;
}
} else if ((randomNumber(0, 200) == 1) || ((((startPumpkinPatch == true) && (randomNumber(0, 2) == 1)) && (_local1 != "desert")) && (_local1 != "water"))) {
if (startPumpkinPatch != true) {
startPumpkinPatch = true;
numPumpkins = randomNumber(7, 10);
}
numPumpkins--;
rTA(currentX - 1, currentY, "pk");
if (numPumpkins <= 0) {
startPumpkinPatch = false;
}
} else if (_local1 == "desert") {
startPumpkinPatch = false;
if (randomNumber(0, 6) == 1) {
rTA(currentX - 1, currentY, "ct");
firstTimes[(("blockX" + (currentX - 1)) + "Y") + currentY] = true;
rTA(currentX - 1, currentY + 1, "ct");
firstTimes[(("blockX" + (currentX - 1)) + "Y") + (currentY + 1)] = true;
if (randomNumber(0, 2)) {
rTA(currentX - 1, currentY + 2, "ct");
firstTimes[(("blockX" + (currentX - 1)) + "Y") + (currentY + 2)] = true;
}
} else if (randomNumber(0, 2) != 0) {
if (randomNumber(1, 2) == 1) {
rTA(currentX - 1, currentY, "shrub");
}
}
} else if ((((_local1 == "forest") && (randomNumber(0, 4) == 0)) && (scene[currentX - 1][currentY] != "wd1")) && (scene[currentX - 2][currentY] != "wd1")) {
makeTree(currentX, currentY, true);
} else if ((_local1 == "plain") || (_local1 == "forest")) {
if (randomNumber(0, 100) == 1) {
rTA(currentX - 1, currentY, "sc");
rTA(currentX - 1, currentY + 1, "sc");
rTA(currentX - 1, currentY + 2, "sc");
} else if (randomNumber(0, 5) == 1) {
if (randomNumber(1, 4) != 1) {
rTA(currentX - 1, currentY, "fw" + randomNumber(1, 2));
} else if (randomNumber(1, 2) == 1) {
rTA(currentX - 1, currentY, "ms" + randomNumber(1, 2));
}
} else if (randomNumber(0, 5) != 0) {
if (randomNumber(1, 2) == 1) {
rTA(currentX - 1, currentY, "lgr");
}
} else if (randomNumber(0, 3) != 0) {
if (randomNumber(1, 2) == 1) {
rTA(currentX - 1, currentY, "shrub");
}
}
}
} else if (randomNumber(0, 999) <= coalIronFrequency) {
if (randomNumber(0, 1) == 1) {
makeMine(currentX - 1, currentY - 1, 2, 2 + randomNumber(0, 2), "cl");
} else {
makeMine(currentX - 1, currentY - 1, 2, 2 + randomNumber(0, 2), "in");
}
} else if ((randomNumber(0, 999) <= goldFrequency) && (currentY < 60)) {
makeMine(currentX - 1, currentY - 1, 2, 3 + randomNumber(0, 2), "gd");
} else if ((randomNumber(0, 999) <= redstoneFrequency) && (currentY < 50)) {
makeMine(currentX - 1, currentY - 1, 2, 2 + randomNumber(0, 2), "rs");
} else if ((randomNumber(0, 999) <= diamondFrequency) && (currentY < 40)) {
makeMine(currentX - 1, currentY - 1, 2, 2 + randomNumber(0, 1), "dm");
} else if ((randomNumber(0, 999) <= topazFrequency) && (currentY < 50)) {
makeMine(currentX - 1, currentY - 1, 2, 2 + randomNumber(0, 1), "to");
} else if ((randomNumber(0, 999) <= oddStoneFrequency) && (currentY < 60)) {
makeMine(currentX - 1, currentY - 1, 3, 2 + randomNumber(0, 2), "os");
} else if (randomNumber(0, 999) <= gravelFrequency) {
makeMine(currentX - 1, currentY - 1, 5, 5, "gv");
} else if ((currentY - 1) >= ((((lastWorldHeight - 2) - randomNumber(0, 3)) - ((_local1 == "desert") * 3)) + ((_local1 == "mountain") * 3))) {
if ((_local1 == "desert") || (_local1 == "water")) {
if ((currentY - 1) <= (((lastWorldHeight - 2) - randomNumber(0, 2)) - ((_local1 == "desert") * 3))) {
rTA(currentX - 1, currentY - 1, "ss");
} else {
rTA(currentX - 1, currentY - 1, "sd");
}
if (((_local1 == "desert") || (_local1 == "water")) && (randomNumber(0, 40) == 1)) {
makeMine(currentX - 1, currentY - 1, 3, 5, "cy");
}
} else {
rTA(currentX - 1, currentY - 1, "dt");
}
} else {
rTA(currentX - 1, currentY - 1, "r");
}
} else {
if (currentX > worldWidth) {
generatingWorld = false;
i = 0;
making = true;
}
if (((_local1 == "desert") || (_local1 == "plain")) || (_local1 == "water")) {
slope = Math.round(slope / 3);
}
lastSlope = 0;
if (slopeNoMatterWhat != undefined) {
lastSlope = slopeNoMatterWhat;
lastWorldHeight = lastWorldHeight + slopeNoMatterWhat;
slopeNoMatterWhat = undefined;
} else if (randomNumber(0, 2)) {
if (randomNumber(0, 40) == 1) {
if (lastWorldHeight <= (worldHeight * 0.7)) {
largeSlope = randomNumber(7, 10);
lastWorldHeight = lastWorldHeight + largeSlope;
lastSlope = largeSlope;
if (randomNumber(0, 1) == 1) {
caves.push([currentX + 2, Math.round(lastWorldHeight + (largeSlope / 2)), largeSlope]);
}
} else if (lastWorldHeight >= (worldHeight * 1.1)) {
largeSlope = -randomNumber(7, 10);
lastWorldHeight = lastWorldHeight + largeSlope;
lastSlope = largeSlope;
if (randomNumber(0, 1) == 1) {
caves.push([currentX - 2, Math.round(lastWorldHeight + (largeSlope / 2)), largeSlope]);
}
} else {
largeSlope = ((randomNumber(0, 1) * 2) - 1) * randomNumber(7, 10);
lastWorldHeight = lastWorldHeight + largeSlope;
lastSlope = largeSlope;
if (randomNumber(0, 1) == 1) {
caves.push([currentX + (largeSlope > 0), Math.round(lastWorldHeight + (largeSlope / 2)), largeSlope]);
}
}
} else {
lastSlope = slope;
lastWorldHeight = lastWorldHeight + slope;
}
}
currentY = lastWorldHeight;
currentX++;
}
currentY--;
if ((startTimer + 500) < getTimer()) {
i = 0;
}
} while (i == 1);
if (generatingWorld == false) {
var i = 0;
while (i <= randomNumber(10, 15)) {
makeMobSpawner(randomNumber(0, worldWidth - 1), randomNumber(0, 59));
i++;
}
var i = 0;
while (i <= randomNumber(50, 40)) {
mineWidth = randomNumber(0, 2);
makeMine(randomNumber(0, worldWidth - 1), randomNumber(0, 60), 3 + mineWidth, 30 + ((2 - mineWidth) * 5), undefined);
i++;
}
var i = 0;
while (i <= randomNumber(70, 80)) {
makeCavern(randomNumber(0, worldWidth - 1), randomNumber(0, 50), liquids[randomNumber(0, liquids.length - 1)]);
i++;
}
var i = 0;
while (i < caves.length) {
makeMine(caves[i][0], caves[i][1] + 4, 4, 7, undefined);
i++;
}
madeJ = false;
do {
rn1 = randomNumber(0, worldWidth - 1);
rn2 = randomNumber(0, 39);
if (scene[rn1][rn2] == "r") {
scene[rn1][rn2] = "j";
madeJ = true;
}
} while (madeJ != true);
var _local5 = 0;
while (_local5 <= 300) {
scene[0][_local5] = "br";
_local5++;
}
_local5 = 0;
while (_local5 <= (worldWidth - 2)) {
scene[_local5][0] = "br";
_local5++;
}
_local5 = 0;
while (_local5 <= 300) {
scene[worldWidth - 1][_local5] = "br";
_local5++;
}
_local5 = 0;
while (_local5 <= 300) {
scene[-1][_local5] = "br";
_local5++;
}
_local5 = 0;
while (_local5 <= 300) {
scene[worldWidth][_local5] = "br";
_local5++;
}
}
} else if (making == true) {
blackScreen.statis = "Get ready...";
if (firstTime) {
world._y = (scene[(worldWidth / 2) + 4].length + 6) * 30;
world._x = world._x - 15;
spawnPoint = [world._x, world._y];
save();
}
manageChunks();
for (var i in mobs) {
world.attachMovie(mobs[i][0], mobs[i][1], world.getNextHighestDepth());
world[mobs[i][1]].mobNumber = i;
}
for (var i in arrows) {
world.attachMovie("arrow", "arrow" + arrows[i][0], world.getNextHighestDepth());
}
making = false;
onEnterFrame = inGame;
}
};
if (!befe) {
befe = true;
mainInterval = setInterval(onInterval, 100);
}
onMouseDown = function () {
mouseD = true;
};
onMouseUp = function () {
mouseD = false;
waitTillMouseIsUp = false;
};
var ONSCROLL = new Object();
ONSCROLL.onMouseWheel = function (delta) {
if (mouseWheelThing) {
requestSound("tick", 0, 0);
if ((selectedInventoryItem == 9) && (delta < 0)) {
selectedInventoryItem = 1;
} else if ((selectedInventoryItem == 1) && (delta > 0)) {
selectedInventoryItem = 9;
} else {
selectedInventoryItem = selectedInventoryItem + (((delta < 0) * 2) - 1);
}
}
mouseWheelThing = false;
};
Mouse.addListener(ONSCROLL);
stopAllSounds();
Instance of Symbol 1405 MovieClip "i1" in Frame 7
onClipEvent (load) {
mini = true;
}
on (release) {
_root.selectedInventoryItem = Number(substring(_name, 2, 1));
}
Instance of Symbol 1405 MovieClip "i2" in Frame 7
onClipEvent (load) {
mini = true;
}
on (release) {
_root.selectedInventoryItem = Number(substring(_name, 2, 1));
}
Instance of Symbol 1405 MovieClip "i3" in Frame 7
onClipEvent (load) {
mini = true;
}
on (release) {
_root.selectedInventoryItem = Number(substring(_name, 2, 1));
}
Instance of Symbol 1405 MovieClip "i4" in Frame 7
onClipEvent (load) {
mini = true;
}
on (release) {
_root.selectedInventoryItem = Number(substring(_name, 2, 1));
}
Instance of Symbol 1405 MovieClip "i5" in Frame 7
onClipEvent (load) {
mini = true;
}
on (release) {
_root.selectedInventoryItem = Number(substring(_name, 2, 1));
}
Instance of Symbol 1405 MovieClip "i6" in Frame 7
onClipEvent (load) {
mini = true;
}
on (release) {
_root.selectedInventoryItem = Number(substring(_name, 2, 1));
}
Instance of Symbol 1405 MovieClip "i7" in Frame 7
onClipEvent (load) {
mini = true;
}
on (release) {
_root.selectedInventoryItem = Number(substring(_name, 2, 1));
}
Instance of Symbol 1405 MovieClip "i8" in Frame 7
onClipEvent (load) {
mini = true;
}
on (release) {
_root.selectedInventoryItem = Number(substring(_name, 2, 1));
}
Instance of Symbol 1405 MovieClip "i9" in Frame 7
onClipEvent (load) {
mini = true;
}
on (release) {
_root.selectedInventoryItem = Number(substring(_name, 2, 1));
}
Instance of Symbol 1129 MovieClip "pxdnes" in Frame 7
onClipEvent (data) {
_root.so2.data.score = endScore;
toAdd = 0;
}
Frame 8
gotoAndStop ("game");
Symbol 137 MovieClip [lavabubble] Frame 1
_x = (_x + (random(_root.blockSize) - (_root.blockSize / 2)));
_y = (_y + (random(_root.blockSize) - (_root.blockSize / 2)));
ySpeed = -5;
xSpeed = ((random(2) * 2) - 1) * 5;
onEnterFrame = function () {
ySpeed = ySpeed + 1;
xSpeed = xSpeed * 0.95;
_x = (_x + xSpeed);
_y = (_y + ySpeed);
_alpha = (_alpha - 10);
if (_alpha <= 0) {
removeMovieClip(this);
}
};
Symbol 141 MovieClip [cm] Frame 1
timer = 0;
onEnterFrame = function () {
timer++;
if ((timer > 300) || (_y < -105)) {
_alpha = (_alpha - 5);
if (_alpha <= 0) {
delete _parent.messages[_name];
removeMovieClip(this);
}
}
};
Symbol 152 MovieClip [CheckThemeColor1] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "themeColor");
Symbol 163 MovieClip [CheckBoxAssets] Frame 1
#initclip 77
mx.controls.CheckBox.prototype.adjustFocusRect = function () {
var _local4 = this._parent.focus_mc;
var _local2 = this.iconName;
var _local3 = this.getStyle("themeColor");
if (_local3 == undefined) {
_local3 = 8453965 /* 0x80FF4D */;
}
var _local8 = _local2._width + 4;
var _local5 = _local2._height + 4;
_local4.setSize(_local8, _local5, 0, 100, _local3);
var _local7 = _local2._x;
var _local6 = _local2._y;
_local4.move((this.x - 2) + _local7, (this.y + _local6) - 2);
};
#endinitclip
Symbol 165 MovieClip [BrdrShdw] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "shadowColor");
Symbol 167 MovieClip [BrdrFace] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "buttonColor");
Symbol 170 MovieClip [BrdrBlk] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "borderColor");
Symbol 172 MovieClip [BrdrHilght] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "highlightColor");
Symbol 175 MovieClip [Defaults] Frame 1
#initclip 78
Object.registerClass("Defaults", mx.skins.halo.Defaults);
#endinitclip
Symbol 176 MovieClip [UIObjectExtensions] Frame 1
#initclip 79
Object.registerClass("UIObjectExtensions", mx.core.ext.UIObjectExtensions);
#endinitclip
Symbol 177 MovieClip [UIObject] Frame 1
#initclip 80
Object.registerClass("UIObject", mx.core.UIObject);
#endinitclip
stop();
Symbol 180 Button
on (keyPress "<Tab>") {
this.tabHandler();
}
Symbol 181 MovieClip Frame 1
#initclip 81
Object.registerClass("FocusManager", mx.managers.FocusManager);
if (_root.focusManager == undefined) {
_root.createClassObject(mx.managers.FocusManager, "focusManager", mx.managers.DepthManager.highestDepth--);
}
#endinitclip
Symbol 182 MovieClip [FocusRect] Frame 1
#initclip 82
Object.registerClass("FocusRect", mx.skins.halo.FocusRect);
#endinitclip
Symbol 183 MovieClip [FocusManager] Frame 1
#initclip 83
Object.registerClass("FocusManager", mx.managers.FocusManager);
#endinitclip
stop();
Symbol 184 MovieClip [UIComponentExtensions] Frame 1
#initclip 84
Object.registerClass("UIComponentExtensions", mx.core.ext.UIComponentExtensions);
#endinitclip
Symbol 185 MovieClip [UIComponent] Frame 1
#initclip 85
Object.registerClass("UIComponent", mx.core.UIComponent);
#endinitclip
stop();
Symbol 186 MovieClip [SimpleButton] Frame 1
#initclip 86
Object.registerClass("SimpleButton", mx.controls.SimpleButton);
#endinitclip
stop();
Symbol 187 MovieClip [Border] Frame 1
#initclip 87
Object.registerClass("Border", mx.skins.Border);
#endinitclip
stop();
Symbol 188 MovieClip [RectBorder] Frame 1
#initclip 88
mx.skins.SkinElement.registerElement(mx.skins.RectBorder.symbolName, Object(mx.skins.RectBorder));
Object.registerClass("RectBorder", mx.skins.halo.RectBorder);
#endinitclip
stop();
Symbol 189 MovieClip [ButtonSkin] Frame 1
#initclip 89
Object.registerClass("ButtonSkin", mx.skins.halo.ButtonSkin);
#endinitclip
Symbol 190 MovieClip [Button] Frame 1
#initclip 90
Object.registerClass("Button", mx.controls.Button);
#endinitclip
stop();
Instance of Symbol 186 MovieClip [SimpleButton] in Symbol 190 MovieClip [Button] Frame 2
//component parameters
onClipEvent (initialize) {
selected = false;
toggle = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 191 MovieClip [CheckBox] Frame 1
#initclip 91
Object.registerClass("CheckBox", mx.controls.CheckBox);
#endinitclip
stop();
Instance of Symbol 190 MovieClip [Button] in Symbol 191 MovieClip [CheckBox] Frame 2
//component parameters
onClipEvent (initialize) {
icon = "";
label = "Button";
labelPlacement = "right";
selected = false;
toggle = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 220 MovieClip Frame 1
onEnterFrame = function () {
if (_visible) {
_rotation = (_rotation + 30);
} else {
delete onEnterFrame;
}
};
Symbol 222 MovieClip Frame 10
stop();
Symbol 224 MovieClip Frame 37
_parent.setGotoFrame("done");
stop();
Symbol 236 MovieClip [NewgroundsAPIAsset_Medal_Popup] Frame 1
function endDelay() {
clearInterval(pop_delay);
gotoAndPlay ("closeme");
}
_visible = true;
icon._visible = false;
pop_delay = setInterval(endDelay, 3000);
Symbol 236 MovieClip [NewgroundsAPIAsset_Medal_Popup] Frame 2
medal.attachIcon(icon);
Symbol 236 MovieClip [NewgroundsAPIAsset_Medal_Popup] Frame 10
icon._visible = true;
medal_name = medal.getName();
medal_value = medal.getValue() + "pts";
stop();
Symbol 236 MovieClip [NewgroundsAPIAsset_Medal_Popup] Frame 21
this.removeMovieClip();
_visible = false;
stop();
Symbol 242 MovieClip [NewgroundsAPIAsset_Login_Warning] Frame 1
function endDelay() {
clearInterval(pop_delay);
gotoAndPlay ("closeme");
}
_x = 0;
_y = 0;
_visible = true;
pop_delay = setInterval(endDelay, 6000);
Symbol 242 MovieClip [NewgroundsAPIAsset_Login_Warning] Frame 10
stop();
Symbol 242 MovieClip [NewgroundsAPIAsset_Login_Warning] Frame 21
this.removeMovieClip();
_visible = false;
stop();
Symbol 245 MovieClip [NewgroundsAPIAsset_Connection_Error] Frame 1
function endDelay() {
clearInterval(pop_delay);
gotoAndPlay ("closeme");
}
_x = 0;
_y = 0;
_visible = true;
pop_delay = setInterval(endDelay, 6000);
Symbol 245 MovieClip [NewgroundsAPIAsset_Connection_Error] Frame 10
stop();
Symbol 245 MovieClip [NewgroundsAPIAsset_Connection_Error] Frame 21
this.removeMovieClip();
_visible = false;
stop();
Symbol 266 MovieClip [NewgroundsAPIAsset_big_popup_background] Frame 1
var w = Math.round(this._width);
var h = Math.round(this._height);
if (w < 80) {
w = 80;
}
if (h < 80) {
h = 80;
}
this._width = 350;
this._height = 120;
t._width = w - 2;
t._x = 1;
b._width = w - 2;
b._x = 1;
c._width = w - 2;
c._x = 1;
c._height = h - 2;
c._y = 1;
l._height = h - 2;
l._y = 1;
r._height = h - 2;
r._y = 1;
tr._x = w - 7;
r._x = w - 7;
br._x = w - 7;
b._y = h - 7;
bl._y = h - 7;
br._y = h - 7;
shadow._width = w + 10;
shadow._height = h + 10;
Symbol 270 Button
on (release) {
this._visible = false;
this.removeMovieClip();
}
Symbol 276 Button
on (release) {
getURL (official_version_url, "_blank");
}
Symbol 278 MovieClip [NewgroundsAsset_New_Version_Available] Frame 1
_x = (Stage.width / 2);
_y = (Stage.height / 2);
background._width = Stage.width + 200;
background._height = Stage.height + 200;
background._x = -(_x + 100);
background._y = -(_y + 100);
Symbol 279 Button
on (release) {
getURL (official_version_url, "_blank");
}
Symbol 283 MovieClip [NewgroundsAsset_Illegal_Host] Frame 1
_x = (Stage.width / 2);
_y = (Stage.height / 2);
background._width = Stage.width + 200;
background._height = Stage.height + 200;
background._x = -(_x + 100);
background._y = -(_y + 100);
Symbol 284 MovieClip [API Connector (NewgroundsAPI)] Frame 1
#initclip 92
Object.registerClass("API Connector (NewgroundsAPI)", com.newgrounds.components.APIConnector);
#endinitclip
Symbol 284 MovieClip [API Connector (NewgroundsAPI)] Frame 20
_visible = false;
Symbol 318 MovieClip Frame 1
stop();
onEnterFrame = function () {
gotoAndStop(Math.round((_root.getBytesLoaded() / _root.getBytesTotal()) * 50));
};
Symbol 318 MovieClip Frame 50
_root.play();
Symbol 1830 MovieClip [__Packages.mochi.as2.MochiEventDispatcher] Frame 0
class mochi.as2.MochiEventDispatcher
{
var eventTable;
function MochiEventDispatcher () {
eventTable = {};
}
function buildDelegate(thisObject, thatObject) {
var _local2 = {thisObject:thisObject, thatObject:thatObject};
if (thatObject != undefined) {
var funct = ((typeof(thatObject) == "string") ? (thisObject[thatObject]) : (thatObject));
_local2.delegate = function (args) {
funct.call(thisObject, args);
};
} else {
_local2.delegate = thisObject;
}
return(_local2);
}
function compareDelegate(d_A, d_B) {
if ((d_A.thisObject != d_B.thisObject) || (d_A.thatObject != d_B.thatObject)) {
return(false);
}
return(true);
}
function addEventListener(event, thisObject, thatObject) {
removeEventListener(event, thisObject, thatObject);
eventTable[event].push(buildDelegate(thisObject, thatObject));
}
function removeEventListener(event, thisObject, thatObject) {
var _local3 = buildDelegate(thisObject, thatObject);
if (eventTable[event] == undefined) {
eventTable[event] = [];
return(undefined);
}
for (var _local4 in eventTable[event]) {
if (!compareDelegate(eventTable[event][_local4], _local3)) {
continue;
}
eventTable[event].splice(Number(_local4), 1);
}
}
function triggerEvent(event, args) {
if (eventTable[event] == undefined) {
return(undefined);
}
for (var _local4 in eventTable[event]) {
eventTable[event][_local4].delegate(args);
}
}
}
Symbol 1831 MovieClip [__Packages.mochi.as2.MochiServices] Frame 0
class mochi.as2.MochiServices
{
static var _id, _container, _clip, _sendChannelName, __get__comChannelName, onError, _listenChannel, _sendChannel;
function MochiServices () {
}
static function get id() {
return(_id);
}
static function get clip() {
return(_container);
}
static function get childClip() {
return(_clip);
}
static function getVersion() {
return("3.9.4 as2");
}
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 get isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function set comChannelName(val) {
if (val != undefined) {
if (val.length > 3) {
_sendChannelName = val + "_fromgame";
initComChannels();
}
}
//return(__get__comChannelName());
}
static function get connected() {
return(_connected);
}
static function connect(id, clip, onError) {
if (onError != undefined) {
mochi.as2.MochiServices.onError = onError;
} else if (mochi.as2.MochiServices.onError == undefined) {
mochi.as2.MochiServices.onError = function (errorCode) {
trace(errorCode);
};
}
warnID(id, false);
if ((!_connected) && (_clip == undefined)) {
trace("MochiServices Connecting...");
_connecting = true;
init(id, clip);
}
}
static function disconnect() {
if (_connected || (_connecting)) {
_connecting = (_connected = false);
flush(true);
if (_clip != undefined) {
_clip.removeMovieClip();
delete _clip;
}
_listenChannel.close();
}
}
static function init(id, clip) {
_id = id;
if (clip != undefined) {
_container = clip;
} else {
_container = _root;
}
loadCommunicator(id, _container);
}
static function loadCommunicator(id, clip) {
var _local6 = "_mochiservices_com_" + id;
var _local5 = new MovieClipLoader();
var _local3 = {};
if (_clip != null) {
return(_clip);
}
if (!isNetworkAvailable) {
onError("NotConnected");
return(null);
}
if (urlOptions().servURL) {
_servURL = urlOptions().servURL;
}
var _local4 = _servURL + _services;
if (urlOptions().servicesURL) {
_local4 = urlOptions().servicesURL;
}
allowDomains(_local4);
_clip = clip.createEmptyMovieClip(_local6, 10336, false);
_listenChannelName = _listenChannelName + ((Math.floor(new Date().getTime()) + "_") + Math.floor(Math.random() * 99999));
listen();
if (_local3.waitInterval != null) {
clearInterval(_local3.waitInterval);
}
_local3.onLoadError = loadError;
_local3.onLoadStart = function (target_mc) {
this.isLoading = true;
};
_local3.onLoadComplete = function (target_mc) {
target_mc.MochiServices = mochi.as2.MochiServices;
};
_local3.startTime = getTimer();
_local3.wait = function () {
if ((getTimer() - this.startTime) > 10000) {
if (!this.isLoading) {
mochi.as2.MochiServices.disconnect();
mochi.as2.MochiServices.onError("IOError");
}
clearInterval(this.waitInterval);
}
};
_local3.waitInterval = setInterval(_local3, "wait", 1000);
_local5.addListener(_local3);
_local5.loadClip((((((_local4 + "?listenLC=") + _listenChannelName) + "&mochiad_options=") + escape(_root.mochiad_options)) + "&api_version=") + getVersion(), _clip);
_sendChannel = new LocalConnection();
_sendChannel._queue = [];
return(_clip);
}
static function loadError(target_mc, errorCode, httpStatus) {
trace("MochiServices could not load.");
disconnect();
onError(errorCode);
}
static function onStatus(infoObject) {
if (!(infoObject.level === "error")) {
} else {
_connected = false;
_listenChannel.connect(_listenChannelName);
}
}
static function listen() {
_listenChannel = new LocalConnection();
_listenChannel.handshake = function (args) {
mochi.as2.MochiServices.__set__comChannelName(args.newChannel);
};
_listenChannel.allowDomain = function (d) {
return(true);
};
_listenChannel.allowInsecureDomain = _listenChannel.allowDomain;
_listenChannel._nextcallbackID = 0;
_listenChannel._callbacks = {};
_listenChannel.connect(_listenChannelName);
trace("Waiting for MochiAds services to connect...");
}
static function initComChannels() {
if (!_connected) {
_sendChannel.onStatus = function (infoObject) {
mochi.as2.MochiServices.onStatus(infoObject);
};
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"});
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"registerGame", id:_id, version:getVersion()});
_listenChannel.onStatus = function (infoObject) {
mochi.as2.MochiServices.onStatus(infoObject);
};
_listenChannel.onReceive = function (pkg) {
var _local5 = pkg.callbackID;
var _local4 = this._callbacks[_local5];
if (!_local4) {
return(undefined);
}
var _local2 = _local4.callbackMethod;
var _local3 = _local4.callbackObject;
if (_local3 && (typeof(_local2) == "string")) {
_local2 = _local3[_local2];
}
if (_local2 != undefined) {
_local2.apply(_local3, pkg.args);
}
delete this._callbacks[_local5];
};
_listenChannel.onEvent = function (pkg) {
switch (pkg.target) {
case "services" :
mochi.as2.MochiServices.triggerEvent(pkg.event, pkg.args);
break;
case "events" :
mochi.as2.MochiEvents.triggerEvent(pkg.event, pkg.args);
break;
case "coins" :
mochi.as2.MochiCoins.triggerEvent(pkg.event, pkg.args);
break;
case "social" :
mochi.as2.MochiSocial.triggerEvent(pkg.event, pkg.args);
}
};
_listenChannel.onError = function () {
mochi.as2.MochiServices.onError("IOError");
};
trace("[SERVICES_API] connected!");
_connecting = false;
_connected = true;
while (_sendChannel._queue.length > 0) {
_sendChannel.send(_sendChannelName, "onReceive", _sendChannel._queue.shift());
}
}
}
static function flush(error) {
var _local1;
var _local2;
while (_sendChannel._queue.length > 0) {
_local1 = _sendChannel._queue.shift();
if (_local1.callbackID != null) {
_local2 = _listenChannel._callbacks[_local1.callbackID];
}
delete _listenChannel._callbacks[_local1.callbackID];
if (error) {
handleError(_local1.args, _local2.callbackObject, _local2.callbackMethod);
}
}
}
static function handleError(args, callbackObject, callbackMethod) {
if (args != null) {
if (args.onError != null) {
args.onError("NotConnected");
}
if ((args.options != null) && (args.options.onError != null)) {
args.options.onError("NotConnected");
}
}
if (callbackMethod != null) {
args = {};
args.error = true;
args.errorCode = "NotConnected";
if ((callbackObject != null) && (typeof(callbackMethod) == "string")) {
callbackObject[callbackMethod](args);
} else if (callbackMethod != null) {
callbackMethod.apply(args);
}
}
}
static function send(methodName, args, callbackObject, callbackMethod) {
if (_connected) {
_sendChannel.send(_sendChannelName, "onReceive", {methodName:methodName, args:args, callbackID:_listenChannel._nextcallbackID});
} else {
if ((_clip == undefined) || (!_connecting)) {
trace("Error: MochiServices not connected. Please call MochiServices.connect(). Function: " + methodName);
handleError(args, callbackObject, callbackMethod);
flush(true);
return(undefined);
}
_sendChannel._queue.push({methodName:methodName, args:args, callbackID:_listenChannel._nextcallbackID});
}
_listenChannel._callbacks[_listenChannel._nextcallbackID] = {callbackObject:callbackObject, callbackMethod:callbackMethod};
_listenChannel._nextcallbackID++;
}
static function urlOptions() {
var _local5 = {};
var _local6;
if (_root._url.indexOf("mochiad_options") != -1) {
var _local2 = (_root._url.indexOf("mochiad_options") + "mochiad_options".length) + 1;
_local6 = _root._url.substr(_local2, _root._url.length);
} else if (_root.mochiad_options) {
_local6 = _root.mochiad_options;
}
if (_local6) {
var _local4 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = _local4[_local2].split("=");
_local5[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
return(_local5);
}
static function warnID(bid, leaderboard) {
bid = bid.toLowerCase();
if (bid.length != 16) {
trace(("WARNING: " + (leaderboard ? "board" : "game")) + " ID is not the appropriate length");
return(undefined);
}
if (bid == "1e113c7239048b3f") {
if (leaderboard) {
trace("WARNING: Using testing board ID");
} else {
trace("WARNING: Using testing board ID as game ID");
}
return(undefined);
}
if (bid == "84993a1de4031cd8") {
if (leaderboard) {
trace("WARNING: Using testing game ID as board ID");
} else {
trace("WARNING: Using testing game ID");
}
return(undefined);
}
var _local1 = 0;
while (_local1 < bid.length) {
switch (bid.charAt(_local1)) {
case "0" :
case "1" :
case "2" :
case "3" :
case "4" :
case "5" :
case "6" :
case "7" :
case "8" :
case "9" :
case "a" :
case "b" :
case "c" :
case "d" :
case "e" :
case "f" :
break;
default :
trace("WARNING: Board ID contains illegal characters: " + bid);
return(undefined);
}
_local1++;
}
}
static function addLinkEvent(url, burl, btn, onClick) {
var timeout = 1500;
var t0 = getTimer();
var _local2 = new Object();
_local2.mav = getVersion();
_local2.swfv = btn.getSWFVersion() || 6;
_local2.swfurl = btn._url;
_local2.fv = System.capabilities.version;
_local2.os = System.capabilities.os;
_local2.lang = System.capabilities.language;
_local2.scres = (System.capabilities.screenResolutionX + "x") + System.capabilities.screenResolutionY;
var s = "?";
var _local3 = 0;
for (var _local6 in _local2) {
if (_local3 != 0) {
s = s + "&";
}
_local3++;
s = ((s + _local6) + "=") + escape(_local2[_local6]);
}
if (!(netupAttempted || (_connected))) {
var ping = btn.createEmptyMovieClip("ping", 777);
var _local7 = btn.createEmptyMovieClip("nettest", 778);
netupAttempted = true;
ping.loadMovie("http://link.mochiads.com/linkping.swf?t=" + getTimer());
_local7.onEnterFrame = function () {
if ((ping._totalframes > 0) && (ping._totalframes == ping._framesloaded)) {
delete this.onEnterFrame;
} else if ((getTimer() - t0) > timeout) {
delete this.onEnterFrame;
mochi.as2.MochiServices.netup = false;
}
};
}
var _local4 = btn.createEmptyMovieClip("clk", 1001);
_local4._alpha = 0;
_local4.beginFill(1044735);
_local4.moveTo(0, 0);
_local4.lineTo(0, btn._height);
_local4.lineTo(btn._width, btn._height);
_local4.lineTo(btn._width, 0);
_local4.lineTo(0, 0);
_local4.endFill();
_local4.onRelease = function () {
if (mochi.as2.MochiServices.netup) {
getURL (url + s, "_blank");
} else {
getURL (burl, "_blank");
}
if (onClick != undefined) {
onClick();
}
};
}
static function setContainer(clip) {
}
static function stayOnTop(clip) {
}
static function addEventListener(eventType, thisObject, thatObject) {
_dispatcher.addEventListener(eventType, thisObject, thatObject);
}
static function triggerEvent(eventType, args) {
_dispatcher.triggerEvent(eventType, args);
}
static function removeEventListener(eventType, thisObject, thatObject) {
_dispatcher.removeEventListener(eventType, thisObject, thatObject);
}
static var CONNECTED = "onConnected";
static var _servURL = "http://www.mochiads.com/static/lib/services/";
static var _services = "services.swf";
static var _mochiLC = "MochiLC.swf";
static var _listenChannelName = "__ms_";
static var _connecting = false;
static var _connected = false;
static var netup = true;
static var netupAttempted = false;
static var _dispatcher = new mochi.as2.MochiEventDispatcher();
}
Symbol 1832 MovieClip [__Packages.mochi.as2.MochiEvents] Frame 0
class mochi.as2.MochiEvents
{
function MochiEvents () {
}
static function getVersion() {
return(mochi.as2.MochiServices.getVersion());
}
static function getAchievements(properties) {
mochi.as2.MochiServices.send("events_getAchievements", properties);
}
static function unlockAchievement(properties) {
mochi.as2.MochiServices.send("events_unlockAchievement", properties);
}
static function startSession(achievementID) {
mochi.as2.MochiServices.send("events_beginSession", {achievementID:achievementID}, null, null);
}
static function showAwards(options) {
mochi.as2.MochiServices.send("events_showAwards", options, null, null);
}
static function setNotifications(style) {
mochi.as2.MochiServices.send("events_setNotifications", style, null, null);
}
static function addEventListener(eventType, thisObject, thatObject) {
_dispatcher.addEventListener(eventType, thisObject, thatObject);
}
static function triggerEvent(eventType, args) {
_dispatcher.triggerEvent(eventType, args);
}
static function removeEventListener(eventType, thisObject, thatObject) {
_dispatcher.removeEventListener(eventType, thisObject, thatObject);
}
static function startPlay(tag) {
if (tag == undefined) {
tag = "gameplay";
}
mochi.as2.MochiServices.send("events_setRoundID", {tag:String(tag)}, null, null);
}
static function endPlay() {
mochi.as2.MochiServices.send("events_clearRoundID", null, null, null);
}
static function trackEvent(tag, value) {
mochi.as2.MochiServices.send("events_trackEvent", {tag:tag, value:value}, null, null);
}
static var ACHIEVEMENTS_OWNED = "AchievementOwned";
static var ACHIEVEMENT_NEW = "AchievementReceived";
static var GAME_ACHIEVEMENTS = "GameAchievements";
static var ERROR = "Error";
static var IO_ERROR = "IOError";
static var IO_PENDING = "IOPending";
static var ALIGN_TOP_LEFT = "ALIGN_TL";
static var ALIGN_TOP = "ALIGN_T";
static var ALIGN_TOP_RIGHT = "ALIGN_TR";
static var ALIGN_LEFT = "ALIGN_L";
static var ALIGN_CENTER = "ALIGN_C";
static var ALIGN_RIGHT = "ALIGN_R";
static var ALIGN_BOTTOM_LEFT = "ALIGN_BL";
static var ALIGN_BOTTOM = "ALIGN_B";
static var ALIGN_BOTTOM_RIGHT = "ALIGN_BR";
static var FORMAT_SHORT = "ShortForm";
static var FORMAT_LONG = "LongForm";
static var FORMAT_NONE = "NoForm";
static var _dispatcher = new mochi.as2.MochiEventDispatcher();
}
Symbol 1833 MovieClip [__Packages.mochi.as2.MochiCoins] Frame 0
class mochi.as2.MochiCoins
{
function MochiCoins () {
}
static function getVersion() {
return(mochi.as2.MochiServices.getVersion());
}
static function showStore(options) {
mochi.as2.MochiServices.send("coins_showStore", {options:options}, null, null);
}
static function showItem(options) {
if ((options == undefined) || (typeof(options.item) != "string")) {
trace("ERROR: showItem call must pass an Object with an item key");
return(undefined);
}
mochi.as2.MochiServices.send("coins_showItem", {options:options}, null, null);
}
static function showVideo(options) {
if ((options == undefined) || (typeof(options.item) != "string")) {
trace("ERROR: showVideo call must pass an Object with an item key");
return(undefined);
}
mochi.as2.MochiServices.send("coins_showVideo", {options:options}, null, null);
}
static function getStoreItems() {
mochi.as2.MochiServices.send("coins_getStoreItems");
}
static function requestFunding(properties) {
mochi.as2.MochiServices.send("social_requestFunding", properties);
}
static function addEventListener(eventType, delegate) {
_dispatcher.addEventListener(eventType, delegate);
}
static function triggerEvent(eventType, args) {
_dispatcher.triggerEvent(eventType, args);
}
static function removeEventListener(eventType, delegate) {
_dispatcher.removeEventListener(eventType, delegate);
}
static var STORE_SHOW = "StoreShow";
static var STORE_HIDE = "StoreHide";
static var ITEM_OWNED = "ItemOwned";
static var ITEM_NEW = "ItemNew";
static var STORE_ITEMS = "StoreItems";
static var ERROR = "Error";
static var IO_ERROR = "IOError";
static var NO_USER = "NoUser";
static var _dispatcher = new mochi.as2.MochiEventDispatcher();
}
Symbol 1834 MovieClip [__Packages.mochi.as2.MochiSocial] Frame 0
class mochi.as2.MochiSocial
{
function MochiSocial () {
}
static function getVersion() {
return(mochi.as2.MochiServices.getVersion());
}
static function showLoginWidget(options) {
mochi.as2.MochiServices.setContainer();
mochi.as2.MochiServices.stayOnTop();
mochi.as2.MochiServices.send("social_showLoginWidget", {options:options});
}
static function hideLoginWidget() {
mochi.as2.MochiServices.send("social_hideLoginWidget");
}
static function requestLogin(properties) {
mochi.as2.MochiServices.send("social_requestLogin", properties);
}
static function getFriendsList(properties) {
mochi.as2.MochiServices.send("social_getFriendsList", properties);
}
static function showProfile(options) {
mochi.as2.MochiServices.setContainer();
mochi.as2.MochiServices.stayOnTop();
mochi.as2.MochiServices.send("social_showProfile", options);
}
static function postToStream(properties) {
mochi.as2.MochiServices.send("social_postToStream", properties);
}
static function inviteFriends(properties) {
mochi.as2.MochiServices.send("social_inviteFriends", properties);
}
static function requestFan(properties) {
mochi.as2.MochiServices.send("social_requestFan", properties);
}
static function saveUserProperties(properties) {
mochi.as2.MochiServices.send("social_saveUserProperties", properties);
}
static function addEventListener(eventType, delegate) {
_dispatcher.addEventListener(eventType, delegate);
}
static function triggerEvent(eventType, args) {
_dispatcher.triggerEvent(eventType, args);
}
static function removeEventListener(eventType, delegate) {
_dispatcher.removeEventListener(eventType, delegate);
}
static var LOGGED_IN = "LoggedIn";
static var LOGGED_OUT = "LoggedOut";
static var LOGIN_SHOW = "LoginShow";
static var LOGIN_HIDE = "LoginHide";
static var LOGIN_SHOWN = "LoginShown";
static var PROFILE_SHOW = "ProfileShow";
static var PROFILE_HIDE = "ProfileHide";
static var PROPERTIES_SAVED = "PropertySaved";
static var WIDGET_LOADED = "WidgetLoaded";
static var FRIEND_LIST = "FriendsList";
static var PROFILE_DATA = "ProfileData";
static var GAMEPLAY_DATA = "GameplayData";
static var ACTION_CANCELED = "onCancel";
static var ACTION_COMPLETE = "onComplete";
static var USER_INFO = "UserInfo";
static var ERROR = "Error";
static var IO_ERROR = "IOError";
static var NO_USER = "NoUser";
static var PROPERTIES_SIZE = "PropertiesSize";
static var _dispatcher = new mochi.as2.MochiEventDispatcher();
}
Symbol 1835 MovieClip [__Packages.mochi.as2.MochiAd] Frame 0
class mochi.as2.MochiAd
{
function MochiAd () {
}
static function getVersion() {
return(mochi.as2.MochiServices.getVersion());
}
static function showPreGameAd(options) {
var _local27 = {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, _local27);
if ("c862232051e0a94e1c3609b3916ddb17".substr(0) == "dfeada81ac97cde83665f81c12da7def") {
options.ad_started();
options.ad_finished();
return(undefined);
}
var clip = options.clip;
var _local24 = 11000;
var _local19 = options.ad_timeout;
if (options.skip) {
_local19 = 0;
}
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 _local15 = _getRes(options);
var _local5 = _local15[0];
var _local14 = _local15[1];
mc._x = _local5 * 0.5;
mc._y = _local14 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk._x = _local5 * -0.5;
chk._y = _local14 * -0.5;
var _local7 = chk.createEmptyMovieClip("_mochiad_bar", 4);
if (options.no_progress_bar) {
_local7._visible = false;
delete options.no_progress_bar;
} else {
_local7._x = 10;
_local7._y = _local14 - 20;
}
var _local23 = options.color;
delete options.color;
var _local21 = options.background;
delete options.background;
var _local25 = options.outline;
delete options.outline;
var _local6 = _local7.createEmptyMovieClip("_outline", 1);
_local6.beginFill(_local21);
_local6.moveTo(0, 0);
_local6.lineTo(_local5 - 20, 0);
_local6.lineTo(_local5 - 20, 10);
_local6.lineTo(0, 10);
_local6.lineTo(0, 0);
_local6.endFill();
var _local4 = _local7.createEmptyMovieClip("_inside", 2);
_local4.beginFill(_local23);
_local4.moveTo(0, 0);
_local4.lineTo(_local5 - 20, 0);
_local4.lineTo(_local5 - 20, 10);
_local4.lineTo(0, 10);
_local4.lineTo(0, 0);
_local4.endFill();
_local4._xscale = 0;
var _local8 = _local7.createEmptyMovieClip("_outline", 3);
_local8.lineStyle(0, _local25, 100);
_local8.moveTo(0, 0);
_local8.lineTo(_local5 - 20, 0);
_local8.lineTo(_local5 - 20, 10);
_local8.lineTo(0, 10);
_local8.lineTo(0, 0);
chk.ad_msec = _local24;
chk.ad_timeout = _local19;
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;
mochi.as2.MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
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) {
mochi.as2.MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
chk.onEnterFrame = function () {
var _local10 = this._parent._parent;
var _local3 = _local10;
while ((!_local3.getBytesTotal()) && (_local3)) {
_local3 = _local3._parent;
}
if (!_local3) {
_local3 = _root;
}
var _local13 = this._parent._mochiad_ctr;
var _local7 = getTimer() - this.started;
var _local5 = false;
var _local6 = _local3.getBytesTotal();
var _local9 = _local3.getBytesLoaded();
var _local4 = (100 * _local9) / _local6;
var _local12 = (100 * _local7) / chk.ad_msec;
var _local11 = this._mochiad_bar._inside;
var _local15 = Math.min(100, Math.min(_local4 || 0, _local12));
_local15 = Math.max(this.last_pcnt, _local15);
this.last_pcnt = _local15;
_local11._xscale = _local15;
options.ad_progress(_local15);
if (sendHostProgress) {
mochi.as2.MochiAd.containerNotify(clip, {id:"hostLoadPcnt", pcnt:_local4}, clip._mochiad._containerLCName);
if (_local4 == 100) {
sendHostProgress = false;
}
}
if (!chk.showing) {
var _local8 = _local13.getBytesTotal();
if ((_local8 > 0) || (typeof(_local8) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if ((_local7 > chk.ad_timeout) && (_local4 == 100)) {
options.ad_failed();
_local5 = true;
}
}
if (_local7 > chk.ad_msec) {
_local5 = true;
}
if (((_local6 > 0) && (_local9 >= _local6)) && (_local5)) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
}
}
};
}
static function showClickAwayAd(options) {
var _local10 = {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, _local10);
var clip = options.clip;
var _local9 = options.ad_timeout;
delete options.ad_timeout;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var _local3 = clip._mochiad;
_local3.onUnload = function () {
options.ad_finished();
};
var _local5 = _getRes(options);
var _local11 = _local5[0];
var _local8 = _local5[1];
_local3._x = _local11 * 0.5;
_local3._y = _local8 * 0.5;
var chk = _local3.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_timeout = _local9;
chk.started = getTimer();
chk.showing = false;
_local3.lc.adLoaded = options.ad_loaded;
_local3.lc.adSkipped = options.ad_skipped;
_local3.lc.rpc = function (callbackID, arg) {
mochi.as2.MochiAd.rpc(clip, callbackID, arg);
};
_local3.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
var _local21 = false;
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;
mochi.as2.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) {
mochi.as2.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 _local12 = {clip:_root, server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = _parseOptions(options, _local12);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local6 = options.clip;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local6._mochiad_loaded) {
return(null);
}
var _local11 = options.depth;
delete options.depth;
var mc = _local6.createEmptyMovieClip("_mochiad", _local11);
var _local10 = _getRes(options);
options.res = (_local10[0] + "x") + _local10[1];
options.server = options.server + options.id;
delete options.id;
_local6._mochiad_loaded = true;
if (_local6._url.indexOf("http") != 0) {
trace("[MochiAd] NOTE: Security Sandbox Violation errors below are normal");
}
var _local4 = mc.createEmptyMovieClip("_mochiad_ctr", 1);
for (var _local7 in options) {
_local4[_local7] = options[_local7];
}
var _local9 = _local4.server;
delete _local4.server;
var _local13 = _allowDomains(_local9);
mc.onEnterFrame = function () {
if (this._mochiad_ctr._url != this._url) {
this.onEnterFrame = function () {
if (!this._mochiad_ctr) {
delete this.onEnterFrame;
mochi.as2.MochiAd.unload(this._parent);
}
};
}
};
var _local5 = new Object();
var _local8 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local5.mc = mc;
_local5.name = _local8;
_local5.hostname = _local13;
_local5.allowDomain = function (d) {
return(true);
};
_local5.allowInsecureDomain = _local5.allowDomain;
_local5.connect(_local8);
mc.lc = _local5;
mc.lc.regContLC = function (lc_name) {
mc._containerLCName = lc_name;
};
_local4.lc = _local8;
_local4.st = getTimer();
if (!options.skip) {
_local4.loadMovie(_local9 + ".swf", "POST");
}
return(mc);
}
static function unload(clip) {
if (typeof(clip) == "undefined") {
clip = _root;
}
if (clip.clip && (clip.clip._mochiad)) {
clip = clip.clip;
}
if (!clip._mochiad) {
return(false);
}
containerNotify(clip, {id:"unload"}, clip._mochiad._containerLCName);
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);
containerRpcResult(clip, callbackID, _local4, clip._mochiad._containerLCName);
break;
case "runMethod" :
var _local3 = runMethod(clip, arg.method, arg.args);
containerRpcResult(clip, callbackID, _local3, clip._mochiad._containerLCName);
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);
}
static function containerNotify(clip, args, lcName) {
var _local1 = clip._mochiad._mochiad_ctr.ad.app;
if (_local1.notify) {
_local1.notify(args);
} else {
new LocalConnection().send(lcName, "notify", args);
}
}
static function containerRpcResult(clip, callbackID, val, lcName) {
var _local1 = clip._mochiad._mochiad_ctr.ad.app;
if (_local1.rpcResult) {
_local1.rpcResult(callbackID, val);
} else {
new LocalConnection().send(lcName, "rpcResult", callbackID, val);
}
}
}
Symbol 287 MovieClip [__Packages.com.newgrounds.Bridge] Frame 0
class com.newgrounds.Bridge
{
var widget_id, receiver, transmitter;
function Bridge (id) {
widget_id = id;
receiver = new LocalConnection();
transmitter = new LocalConnection();
receiver.receiveEvent = function (event, params) {
com.newgrounds.API.callListener(event, params.success, params.data);
};
try {
receiver.connect("rec_" + widget_id);
} catch(error:Error) {
}
}
function sendEvent(event, params) {
if (widget_id) {
transmitter.send(widget_id, "sendEvent", event, validateParams(params));
}
}
function sendCommand(command, params) {
if (widget_id) {
transmitter.send(widget_id, "sendCommand", command, validateParams(params));
}
}
function validateParams(params) {
var _local2 = {};
for (var _local3 in params) {
if ((typeof(params[_local3]) == "string") || (typeof(params[_local3]) == "number")) {
_local2[_local3] = params[_local3];
}
}
return(_local2);
}
}
Symbol 285 MovieClip [__Packages.com.newgrounds.APIError] Frame 0
class com.newgrounds.APIError
{
var message, name, alias;
function APIError (error, msg) {
if (Number(error).toString() == String(error)) {
error = Number(error);
} else if (error_codes[String(error)]) {
error = error_codes[String(error)];
} else {
error = 0;
}
code = error;
message = msg;
name = error_names[error];
alias = aliases[error];
}
static function init_codes() {
var _local2 = new Object();
var _local1 = 0;
while (_local1 < aliases.length) {
_local2[aliases[_local1]] = _local1;
_local1++;
}
return(_local2);
}
static function init_names() {
var _local5 = new Array();
var _local3 = 0;
while (_local3 < aliases.length) {
var _local2 = aliases[_local3].toLowerCase().split("_");
var _local1 = 0;
while (_local1 < _local2.length) {
_local2[_local1] = _local2[_local1].substr(0, 1).toUpperCase() + _local2[_local1].substr(1, _local2[_local1].length);
for (var _local4 in always_caps) {
if (_local2[_local1].toUpperCase() == always_caps[_local4]) {
_local2[_local1] = _local2[_local1].toUpperCase();
}
}
_local1++;
}
_local5[_local3] = _local2.join(" ");
_local3++;
}
return(_local5);
}
function isError() {
return(true);
}
static var aliases = new Array("UNKNOWN_ERROR", "INVALID_API_ID", "MISSING_PARAM", "INVALID_STAT_ID", "INVALID_COMMAND_ID", "FLASH_ADS_NOT_APPROVED", "PERMISSION_DENIED", "IDENTIFICATION_REQUIRED", "INVALID_EMAIL_ADDRESS", "BANNED_USER", "SESSION_EXPIRED", "INVALID_SCORE", "INVALID_MEDAL", "INVALID_SAVE_GROUP", "FILE_NOT_FOUND", "SITE_ID_REQUIRED", "UPLOAD_IN_PROGRESS", "USER_CANCELLED", "CONFIRM_REQUEST", "ILLEGAL_REQUEST", "CONNECTION_FAILED", "QUERY_INCOMPLETE", "SAVE_FILE_ERROR", "INVALID_VALUE", "SERVER_ERROR", "INVALID_SCOREBOARD");
static var always_caps = new Array("API", "URL", "ID");
static var error_codes = init_codes();
static var error_names = init_names();
var code = 0;
}
Symbol 286 MovieClip [__Packages.com.newgrounds.API] Frame 0
class com.newgrounds.API
{
static var version, user_email, movie_id, debug, session_id, connected, tracker_id, user_id, user_name, timeout, encryption_key, host, remote_auth, ad_url, eventDispatcher, last_command, ad_swf_url;
function API () {
}
static function setVersion(v) {
version = v;
}
static function setUserEmail(e) {
user_email = e;
}
static function setFakeSession(fake) {
fake_session = fake;
}
static function setPreload(p) {
preload = p;
}
static function getPercentLoaded() {
var _local2;
if (preload && (preload_items > 0)) {
_local2 = 80;
var _local4 = Math.round((preload_items_loaded / preload_items) * 20);
var _local3 = Math.round((_root.getBytesLoaded() / _root.getBytesTotal()) * _local2) + _local4;
} else {
_local2 = 100;
var _local3 = Math.round((_root.getBytesLoaded() / _root.getBytesTotal()) * _local2);
}
return(_local3);
}
static function reportNewAsset() {
if (preload) {
preload_items++;
}
}
static function reportAssetLoaded() {
if (preload) {
preload_items_loaded++;
}
}
static function populateMedals(medal_list) {
if (medals === null) {
medals = new Array();
var _local2 = 0;
while (_local2 < medal_list.length) {
var _local1 = medal_list[_local2];
medals.push(new com.newgrounds.Medal(_local1.medal_id, _local1.medal_name, _local1.medal_value, _local1.medal_difficulty, _local1.medal_unlocked, _local1.medal_icon));
_local2++;
}
}
}
static function populateSaveGroups(save_group_list, file_path, image_path) {
com.newgrounds.SaveFile.setFilePath(file_path);
com.newgrounds.SaveFile.setImagePath(image_path);
save_groups = new Array();
var _local6 = 0;
while (_local6 < save_group_list.length) {
var _local2 = save_group_list[_local6];
var _local5 = new com.newgrounds.SaveGroup(_local2.group_id, _local2.group_name, _local2.group_type);
var _local4 = 0;
while (_local4 < _local2.keys.length) {
var _local3 = _local2.keys[_local4];
_local5.addKey(_local3.id, _local3.name, _local3.type);
_local4++;
}
_local4 = 0;
while (_local4 < _local2.ratings.length) {
var _local1 = _local2.ratings[_local4];
_local5.addRating(_local1.id, _local1.name, _local1.min, _local1.max, _local1.float);
_local4++;
}
save_groups.push(_local5);
_local6++;
}
}
static function populateScoreBoards(score_boards) {
scoreboards = new Array();
var _local1 = 0;
while (_local1 < score_boards.length) {
scoreboards.push(new com.newgrounds.ScoreBoard(score_boards[_local1].id, score_boards[_local1].name));
_local1++;
}
}
static function getOfficialURL() {
var _local1 = (((GATEWAY_URL + "?tracker_id=") + movie_id) + "&command_id=loadOfficalVersion&seed=") + Math.random();
if (debug) {
_local1 = _local1 + "&debug=1";
}
return(_local1);
}
static function loadOfficialURL() {
getURL (getOfficialURL(), "_blank");
}
static function hasUserSession() {
if (session_id && (publisher_id)) {
return(true);
}
if (_root.NewgroundsAPI_PublisherID && (_root.NewgroundsAPI_SessionID)) {
return(true);
}
return(false);
}
static function hostIsCompatible() {
return(!(_root.NewgroundsAPI_PublisherID === undefined));
}
static function isNewgrounds() {
return((((publisher_id == 1) || (_root.NewgroundsAPI_PublisherID == 1)) || (getHost().toLowerCase().indexOf("ungrounded.net") > -1)) || (getHost().toLowerCase().indexOf("newgrounds.com") > -1));
}
static function hasPublisher() {
return(publisher_id || (_root.NewgroundsAPI_PublisherID));
}
static function hasUserEmail() {
if (user_email) {
return(true);
}
return(false);
}
static function isConnected() {
return(connected);
}
static function getID() {
return(getTrackerID());
}
static function getTrackerID() {
return(tracker_id);
}
static function getUserID() {
return(user_id);
}
static function getUserName() {
return(user_name);
}
static function connectionTimeOut() {
reportAssetLoaded();
clearInterval(timeout);
callListener(com.newgrounds.APIEvent.API_CONNECTED, false, new com.newgrounds.APIError("CONNECTION_FAILED", "Connection to API gateway timed out."));
}
static function connect(m_id, encrypt_key, debug_mode) {
if (connected) {
return(undefined);
}
sendMessage("Connecting to the Newgrounds API Gateway...");
var _local2 = function () {
com.newgrounds.API.connectionTimeOut();
};
timeout = setInterval(_local2, 10000, null);
if (!m_id) {
fatalError("API.connect() - missing required movie_id parameter", "connect");
}
movie_id = String(m_id);
tracker_id = Number(movie_id.substring(0, movie_id.indexOf(":")));
encryption_key = encrypt_key;
debug = debug_mode;
user_id = 0;
user_name = "Guest";
if (_root.NewgroundsAPI_PublisherID) {
publisher_id = _root.NewgroundsAPI_PublisherID;
if (_root.NewgroundsAPI_SessionID) {
session_id = _root.NewgroundsAPI_SessionID;
}
} else if (fake_session) {
publisher_id = 1;
session_id = "D3bu64p1U53R";
user_id = 10;
user_name = "API-Debugger";
} else {
if (debug) {
publisher_id = 1;
}
session_id = null;
}
if (_root.NewgroundsAPI_UserName) {
user_name = _root.NewgroundsAPI_UserName;
}
if (_root.NewgroundsAPI_UserID) {
user_id = _root.NewgroundsAPI_UserID;
}
if (_root.NewgroundsAPI_UserpageFormat) {
userpage_format = _root.NewgroundsAPI_UserpageFormat;
}
reportNewAsset();
connected = true;
sendCommand("connectMovie", {host:getHost(), movie_version:version});
}
static function getHost() {
if (!host) {
var _local1 = _url;
if ((_local1.toLowerCase().indexOf("http://") > -1) or (_local1.toLowerCase().indexOf("https://") > -1)) {
if (_local1.toLowerCase().indexOf(NEWGROUNDS_PREVIEW) > -1) {
host = NEWGROUNDS_PREVIEW;
} else {
host = _local1.split("/")[2].toLowerCase();
}
} else {
host = LOCAL_HOST;
}
}
return(host);
}
static function isPublishedHost() {
for (var _local1 in PREVIEW_HOSTS) {
if (getHost() == PREVIEW_HOSTS[_local1]) {
return(false);
}
}
return(true);
}
static function loadUserPage(u_id, u_name) {
if ((u_id == undefined) && (u_name == undefined)) {
if (hasUserSession()) {
u_id = user_id;
u_name = user_name;
} else {
return(false);
}
}
if (publisher_id == 1) {
var _local1 = ("http://" + user_name.toLowerCase()) + ".newgrounds.com";
getURL (_local1, "_blank");
return(true);
}
if (userpage_format) {
var _local1 = userpage_format;
_local1 = _local1.split(":user_id:").join(u_id.toString());
_local1 = _local1.split(":user_name:").join(escape(u_name));
getURL (_local1, "_blank");
return(true);
}
return(false);
}
static function loadNewgrounds() {
sendCommand("loadNewgrounds", {host:getHost()}, true);
}
static function loadMySite() {
sendCommand("loadMySite", {host:getHost()}, true);
}
static function loadCustomLink(link) {
sendCommand("loadCustomLink", {host:getHost(), link:link}, true);
}
static function logCustomEvent(event) {
sendCommand("logCustomEvent", {host:getHost(), event:event});
}
static function getScoreBoard(board) {
if ((!scoreboards) || (scoreboards.length < 1)) {
sendWarning("You do not have any scoreboards configured in your API setup.");
return(null);
}
for (var _local2 in scoreboards) {
if ((typeof(board) == "string") && (scoreboards[_local2].name == board)) {
return(scoreboards[_local2]);
}
if ((typeof(board) == "number") && (scoreboards[_local2].id == board)) {
return(scoreboards[_local2]);
}
}
sendWarning(("Could not find any scoreboards named '" + board) + "'.");
return(null);
}
static function postScore(board_name, value, tag) {
var _local3 = getScoreBoard(board_name);
if (tag === undefined) {
tag = "";
}
if (!_local3) {
sendError({command_id:"postScore"}, new com.newgrounds.APIError("INVALID_SCOREBOARD", "Failed to post score. Check the spelling of your board name."));
return(undefined);
}
if (value == undefined) {
sendError({command_id:"postScore"}, new com.newgrounds.APIError("MISSING_PARAM", "Missing score value"));
return(undefined);
}
sendSecureCommand("postScore", {user_name:user_name, board:_local3.id, value:value, tag:tag, publisher_id:publisher_id});
}
static function loadScores(board_name, period, tag) {
var _local3 = "loadScores";
var _local2 = getScoreBoard(board_name);
if (!_local2) {
sendError({command_id:_local3}, new com.newgrounds.APIError("INVALID_SCOREBOARD", "Failed to load scores. Check the spelling of your board name."));
return(undefined);
}
var _local1 = {};
_local1.publisher_id = publisher_id;
_local1.board = _local2.id;
_local1.num_results = _local2.num_results;
_local1.page = _local2.page;
if (period === undefined) {
_local1.period = _local2.period;
} else {
_local1.period = period;
}
if (tag === undefined) {
_local1.tag = _local2.tag;
} else {
_local1.tag = tag;
}
sendCommand(_local3, _local1);
}
static function unlockMedal(medal, x, y) {
if (!medal) {
sendError({command_id:"unlockMedal"}, new com.newgrounds.APIError("MISSING_PARAM", "missing required medal name"));
return(undefined);
}
if (typeof(medal) != "object") {
medal = getMedal(medal);
}
if (!medal) {
sendError({command_id:"unlockMedal"}, new com.newgrounds.APIError("INVALID_MEDAL", "medal unlock failed, check your medal name for correct spelling."));
return(undefined);
}
callListener(com.newgrounds.APIEvent.UNLOCK_MEDAL, true, {medal:medal, x:x, y:y});
if (hasUserSession() or debug) {
sendMessage(("Attempting to unlock '" + medal.getName()) + "'");
var _local3 = new Object();
_local3.medal_id = medal.getID();
sendSecureCommand("unlockMedal", _local3);
} else {
sendMessage(("Unlocking '" + medal.getName()) + "'");
medal.setUnlocked(true);
var _local2 = loadLocal("medals_unlocked");
if (!_local2) {
_local2 = new Object();
}
_local2[medal.getID()] = true;
saveLocal("medals_unlocked", _local2);
}
}
static function loadMedals() {
if (medals) {
callListener(com.newgrounds.APIEvent.MEDALS_LOADED, true, {medals:medals});
return(undefined);
}
var _local1 = new Object();
if (hasUserSession()) {
_local1.publisher_id = publisher_id;
_local1.user_id = user_id;
}
sendCommand("getMedals", _local1);
}
static function getMedals() {
return(medals);
}
static function getMedal(identifier) {
if ((!medals) || (medals.length < 1)) {
sendWarning("You do not have any medals configured on your API setup!");
return(false);
}
for (var _local3 in medals) {
var _local1 = medals[_local3];
if ((typeof(identifier) == "string") && (_local1.getName() == identifier)) {
return(_local1);
}
if (_local1.getID() == identifier) {
return(_local1);
}
}
sendWarning(("Could not find any medals named '" + identifier) + "'.");
return(false);
}
static function saveLocal(save_id, save_data, size_allocation) {
if (!sharedObjects[save_id]) {
sharedObjects[save_id] = SharedObject.getLocal((("ng_ap_secure_" + movie_id) + "_") + save_id);
}
sharedObjects[save_id].data[save_id] = encodeData(save_data);
sharedObjects[save_id].flush();
}
static function loadLocal(save_id) {
if (!sharedObjects[save_id]) {
sharedObjects[save_id] = SharedObject.getLocal((("ng_ap_secure_" + movie_id) + "_") + save_id);
}
sharedObjects[save_id].flush();
echo((("sharedobject " + save_id) + " is: ") + sharedObjects[save_id].data[save_id]);
if (sharedObjects[save_id].data[save_id]) {
echo("decoded: " + decodeData(sharedObjects[save_id].data[save_id]));
return(decodeData(sharedObjects[save_id].data[save_id]));
}
return(null);
}
static function encodeData(data) {
return(compressHex(com.newgrounds.encoders.RC4.encrypt(com.newgrounds.encoders.JSON.encode(data), encryption_key)));
}
static function decodeData(base) {
return(com.newgrounds.encoders.JSON.decode(com.newgrounds.encoders.RC4.decrypt(uncompressHex(base), encryption_key)));
}
static function compressHex(hex_value) {
var _local6 = hex_value.length % 6;
var _local4 = "";
var _local5 = new com.newgrounds.encoders.BaseN(compression_radix);
var _local1 = 0;
while (_local1 < hex_value.length) {
var _local2 = Number("0x" + hex_value.substr(_local1, 6));
_local4 = _local4 + _local5.encode(_local2, 4);
_local1 = _local1 + 6;
}
return(_local6 + _local4);
}
static function uncompressHex(base_value) {
var _local9 = Number(base_value.charAt(0));
var _local7 = "";
var _local3;
var _local8 = new com.newgrounds.encoders.BaseN(compression_radix);
var _local2 = 1;
while (_local2 < base_value.length) {
var _local6 = base_value.substr(_local2, 4);
var _local5 = _local8.decode(_local6);
var _local1 = dec2hex(_local5);
if ((_local2 + 4) < base_value.length) {
_local3 = 6;
} else {
_local3 = _local9;
}
while (_local1.length < _local3) {
_local1 = "0" + _local1;
}
_local7 = _local7 + _local1;
_local2 = _local2 + 4;
}
return(_local7);
}
static function dec2hex(dec) {
var _local4 = "0123456789ABCDEF";
var _local3 = "";
while (dec > 0) {
var _local2 = dec % 16;
_local3 = _local4.charAt(_local2) + _local3;
dec = (dec - _local2) / 16;
}
return(_local3);
}
static function getSaveGroup(group) {
if ((save_groups == null) || (save_groups.length < 1)) {
sendWarning("You do not have any save groups configured in your API setup!");
return(null);
}
var _local1 = 0;
while (_local1 <= save_groups.length) {
if ((typeof(group) == "number") or (Number(group).toString() == String(group))) {
if (save_groups[_local1].getID() == Number(group)) {
return(save_groups[_local1]);
}
} else if (typeof(group) == "string") {
if (save_groups[_local1].getName().toLowerCase() == group.toLowerCase()) {
return(save_groups[_local1]);
}
}
_local1++;
}
sendWarning(("Could not find any save groups named '" + group) + "'.");
return(null);
}
static function getCurrentSaveFile() {
return(save_file);
}
static function setCurrentSaveFile(current) {
save_file = current;
}
static function loadSaveFile(save_id, get_contents) {
if (get_contents === undefined) {
get_contents = true;
}
var _local1 = "loadSaveFile";
var _local2 = {publisher_id:publisher_id, save_id:save_id, get_contents:get_contents};
save_file = null;
sendCommand(_local1, _local2);
}
static function loadFilesByDate(group_name, sort_descending, key_name, key_value) {
if (sort_descending === undefined) {
sort_descending = true;
}
var _local2 = getSaveGroup(group_name);
if (!_local2) {
var _local3 = new com.newgrounds.APIError("QUERY_INCOMPLETE", "The query could not be preformed, check the spelling of your save group name.");
sendError({command_id:"loadFilesByDate"}, _local3);
return(undefined);
}
var _local1 = new com.newgrounds.SaveGroupQuery(_local2);
if (key_name) {
_local1.addKeyCondition(key_name, "=", key_value);
}
_local1.sortOn("CREATED_ON", (sort_descending ? "DESC" : "ASC"));
_local1.execute();
}
static function loadFilesByViews(group_name, sort_descending, key_name, key_value) {
if (sort_descending === undefined) {
sort_descending = true;
}
var _local2 = getSaveGroup(group_name);
if (!_local2) {
var _local3 = new com.newgrounds.APIError("QUERY_INCOMPLETE", "The query could not be preformed, check the spelling of your save group name.");
sendError({command_id:"loadFilesByViews"}, _local3);
return(undefined);
}
var _local1 = new com.newgrounds.SaveGroupQuery(_local2);
if (key_name) {
_local1.addKeyCondition(key_name, "=", key_value);
}
_local1.sortOn("TOTAL_VIEWS", (sort_descending ? "DESC" : "ASC"));
_local1.execute();
}
static function loadFilesByRating(group_name, rating_name, sort_descending, key_name, key_value) {
if (sort_descending === undefined) {
sort_descending = true;
}
var _local2 = getSaveGroup(group_name);
if (!_local2) {
var _local3 = new com.newgrounds.APIError("QUERY_INCOMPLETE", "The query could not be preformed, check the spelling of your save group name.");
sendError({command_id:"loadFilesByRating"}, _local3);
return(undefined);
}
var _local1 = new com.newgrounds.SaveGroupQuery(_local2);
if (key_name) {
_local1.addKeyCondition(key_name, "=", key_value);
}
_local1.sortOnRating(rating_name, (sort_descending ? "DESC" : "ASC"), "score");
_local1.execute();
}
static function lookupSaveFiles(save_group) {
var _local1 = "lookupSaveFiles";
var _local2 = {publisher_id:publisher_id, group_id:save_group.getID(), query:com.newgrounds.encoders.JSON.encode(save_group.getQuery(true))};
sendCommand(_local1, _local2);
}
static function newSaveFile(group) {
var _local1 = getSaveGroup(group);
if (_local1) {
return(_local1.newFile());
}
var _local2 = new com.newgrounds.APIError("INVALID_SAVE_GROUP", "You can not create new files in invalid groups.");
sendError({command_id:"newSaveFile"}, _local2);
}
static function newSaveQuery(group) {
var _local1 = getSaveGroup(group);
if (_local1) {
return(_local1.newQuery());
}
var _local2 = new com.newgrounds.APIError("INVALID_SAVE_GROUP", ("'" + group) + "' is not a valid save group.");
sendError({command_id:"newSaveQuery"}, _local2);
}
static function checkFilePrivs(file) {
if (user_id) {
var _local1 = user_id;
} else {
var _local1 = 0;
}
var _local2 = {group:file.getGroup().getID(), filename:file.getName(), user_id:_local1, publisher_id:publisher_id};
sendCommand("checkFilePrivs", _local2);
}
static function saveFile(file, overwrite) {
var _local1;
_local1 = {group:file.getGroup().getID(), filename:file.getName(), description:file.getDescription(), draft:file.__get__draft(), user_name:user_name};
if (overwrite) {
_local1.overwrite = overwrite;
}
if (file.getDuplicateID()) {
_local1.save_id = file.getDuplicateID();
}
if (file.getKeys().length > 0) {
_local1.keys = file.getKeys();
}
var _local3;
_local3 = {file:file.getRawContents()};
if (file.getThumbnailImageScan()) {
_local3.thumbnail = file.getThumbnailImageScan();
}
save_file = file;
sendSecureCommand("saveFile", _local1, null, _local3);
}
static function rateSaveFile(file, rating, vote) {
var _local1 = {group:file.getGroup().getID(), save_id:file.getID(), rating_id:rating.rating_id, vote:vote, user_id:user_id};
sendSecureCommand("rateSaveFile", _local1);
}
static function getConfirmation(command_name, event, msg, target, confirm, cancel) {
var _local1 = new com.newgrounds.APIError("CONFIRM_REQUEST", msg);
_local1.confirm = function () {
target[confirm]();
};
_local1.cancel = function () {
target[cancel]();
};
_local1.command = command_name;
callListener(event, false, _local1);
}
static function onRemoteAuthentication(auth_result) {
var _local1 = com.newgrounds.encoders.JSON.decode(com.newgrounds.encoders.RC4.decrypt(auth_result, encryption_key));
delete remote_auth;
user_id = _local1.NewgroundsAPI_UserID;
user_name = _local1.NewgroundsAPI_UserName;
session_id = _local1.NewgroundsAPI_SessionID;
publisher_id = _local1.NewgroundsAPI_PublisherID;
}
static function doEvent(e) {
switch (e.command_id) {
case "connectMovie" :
clearInterval(timeout);
sendMessage("You have successfully connected to the Newgrounds API Gateway");
sendMessage(("Movie identified as \"" + e.movie_name) + "\"");
callListener(com.newgrounds.APIEvent.API_CONNECTED, e.success, {title:e.movie_name});
var _local7 = false;
if (e.ad_status === -1) {
var _local11 = "This movie was not approved to run Flash Ads.";
sendWarning(_local11);
sendWarning(("visit " + AD_TERMS_URL) + " to view our approval guidelines");
if (!e.ad_url) {
callListener(com.newgrounds.APIEvent.ADS_APPROVED, false, new com.newgrounds.APIError("FLASH_ADS_NOT_APPROVED", _local11));
} else {
_local7 = true;
}
} else if (e.ad_status === 0) {
var _local11 = "Flash Ads are currently awaiting approval.";
sendNotice(_local11);
if (!e.ad_url) {
callListener(com.newgrounds.APIEvent.ADS_APPROVED, false, new com.newgrounds.APIError("FLASH_ADS_NOT_APPROVED", _local11));
} else {
_local7 = true;
}
}
if (e.ad_url) {
ad_url = unescape(e.ad_url);
if (!_local7) {
sendMessage("This movie has been approved to run Flash Ads!");
}
callListener(com.newgrounds.APIEvent.ADS_APPROVED, true);
}
if (e.deny_host) {
var _local11 = getHost() + " does not have permission to run this movie!";
sendWarning(_local11);
sendWarning("\tUpdate your API configuration to unblock " + getHost());
callListener(com.newgrounds.APIEvent.HOST_BLOCKED, true, {real_url:unescape(e.movie_url), url:getOfficialURL()});
} else if (e.movie_version) {
sendWarning("According to your API Configuration, this version is out of date.");
if (version) {
sendWarning("\tThe this movie is version " + version);
}
sendWarning("\tThe most current version is " + e.movie_version);
callListener(com.newgrounds.APIEvent.NEW_VERSION_AVAILABLE, true, {version:e.movie_version, real_url:unescape(e.movie_url), url:getOfficialURL()});
}
if (e.request_portal_url) {
sendCommand("setPortalID", {portal_url:_url});
}
if (preload) {
reportNewAsset();
var _local8 = {};
if (hasUserSession()) {
_local8.publisher_id = publisher_id;
_local8.user_id = user_id;
}
sendCommand("preloadSettings", _local8);
}
reportAssetLoaded();
break;
case "preloadSettings" :
if (e.medals) {
populateMedals(e.medals);
if ((!hasUserSession()) and (!debug)) {
echo("checking for sharedobject medals...");
var _local4 = loadLocal("medals_unlocked");
if (_local4) {
for (var _local32 in _local4) {
var _local32 = Number(_local32);
if (_local4[_local32]) {
var _local3 = getMedal(_local32);
echo("now unlocking " + _local3.getName());
_local3.setUnlocked(true);
}
}
}
}
}
if (e.save_groups) {
populateSaveGroups(e.save_groups, e.save_file_path);
}
if (e.score_boards) {
populateScoreBoards(e.score_boards);
}
if (_root.NewgroundsAPI_SaveFileID && (_root.NewgroundsAPI_SaveGroupID)) {
callListener(com.newgrounds.APIEvent.FILE_REQUESTED, true, {save_id:_root.NewgroundsAPI_SaveFileID, group:getSaveGroup(_root.NewgroundsAPI_SaveGroupID)});
}
callListener(com.newgrounds.APIEvent.METADATA_LOADED, true);
reportAssetLoaded();
break;
case "logCustomEvent" :
if (e.success) {
sendMessage(("Event '" + e.event) + "' was logged.");
}
callListener(com.newgrounds.APIEvent.EVENT_LOGGED, e.success, {event:e.event});
break;
case "postScore" :
var _local9;
if (e.success) {
var _local5 = "User";
if (user_email) {
_local5 = user_email;
} else if (user_name) {
_local5 = user_name;
}
var _local19 = getScoreBoard(e.board);
sendMessage(((((_local5 + " posted ") + e.value) + " to '") + _local19.name) + "'");
_local9 = {board:_local19, value:e.value, username:_local5};
}
callListener(com.newgrounds.APIEvent.SCORE_POSTED, e.success, _local9);
break;
case "loadScores" :
_local9 = new Object();
var _local19 = getScoreBoard(e.board);
if (_local19.exists()) {
_local19.setScores(e.scores, e.period, e.page, e.num_results);
}
callListener(com.newgrounds.APIEvent.SCORES_LOADED, e.success, {board:_local19});
break;
case "unlockMedal" :
var _local24 = getMedal(e.medal_name);
_local24.setUnlocked(true);
sendMessage(("Successfuly unlocked '" + _local24.getName()) + "'");
callListener(com.newgrounds.APIEvent.MEDAL_UNLOCKED, e.success, {medal_id:_local24.id, medal:_local24});
break;
case "getMedals" :
populateMedals(e.medals);
callListener(com.newgrounds.APIEvent.MEDALS_LOADED, e.success, {medals:medals});
break;
case "loadSaveFile" :
var _local16 = getSaveGroup(e.group_id);
var _local14 = new com.newgrounds.SaveFile(_local16);
_local14.id = e.file.save_id;
_local14.name = e.file.filename;
_local14.fileUrl = e.file.file;
_local14.thumbnailUrl = e.file.thumb;
_local14.authorName = e.file.user_name;
_local14.authorId = e.file.user_id;
_local14.description = e.file.description;
_local14.setPermissions(e.file.status, e.file.locked);
for (var _local6 in e.file.keys) {
_local14.setKey(e.file.keys[_local6].id, e.file.keys[_local6].value);
}
for (var _local6 in e.file.ratings) {
_local14.setRating(e.file.ratings[_local6].id, e.file.ratings[_local6].votes, e.file.ratings[_local6].score);
}
if (e.get_contents) {
_local14.loadContents();
}
callListener(com.newgrounds.APIEvent.FILE_INITIALIZED, e.success, {save_id:_local14.id, file:_local14});
save_file = _local14;
break;
case "lookupSaveFiles" :
var _local12 = getSaveGroup(e.group_id).getQuery();
_local12.onExecuted(e.files);
break;
case "rateSaveFile" :
_local16 = getSaveGroup(e.group_id);
_local14 = _local16.getFile(e.save_id);
if (e.already_voted) {
var _local27 = new com.newgrounds.APIError("PERMISSION_DENIED", "You have already voted on this item today");
callListener(com.newgrounds.APIEvent.VOTE_COMPLETE, false, {error:_local27, file:_local14, save_id:_local14.id});
return(undefined);
}
if (e.success) {
var _local10 = _local14.onVoted(e);
callListener(com.newgrounds.APIEvent.VOTE_COMPLETE, e.success, {rating:_local10, file:_local14, save_id:_local14.id});
} else {
callListener(com.newgrounds.APIEvent.VOTE_COMPLETE, e.success, {file:_local14, save_id:_local14.id});
sendError("Your vote was not accepted.");
}
break;
case "saveFile" :
if (save_file) {
if (!save_file.exists()) {
save_file.setID(e.save_id, true);
}
save_file.onSaved(e);
callListener(com.newgrounds.APIEvent.FILE_SAVED, e.success, {save_id:save_file.__get__id(), file:save_file});
if (e.success) {
sendMessage(((("You just saved a new file (id #" + e.save_id) + ") to the '") + save_file.__get__group().__get__name()) + "' save group.");
}
}
save_file = null;
break;
case "checkFilePrivs" :
_local9 = {file:save_file, filename:e.filename, group:e.group, exists:e.exists, can_write:e.can_write};
if (e.duplicate_id) {
_local9.duplicate_id = e.duplicate_id;
}
if (!e.success) {
sendWarning("You do not have permission to save this file!");
}
callListener(com.newgrounds.APIEvent.FILE_PRIVS_LOADED, e.success, _local9);
}
}
static function getDispatcher() {
if (!eventDispatcher) {
eventDispatcher = new com.newgrounds.APIEventDispatcher();
}
return(eventDispatcher);
}
static function hasEventListener(event) {
return(getDispatcher().hasEventListener(event));
}
static function addEventListener(event, listener, target) {
echo(("Adding a listener for '" + event) + "'");
getDispatcher().addEventListener(event, listener, target);
}
static function removeEventListener(event, target) {
getDispatcher().removeEventListener(event, target);
}
static function callListener(event, success, data, target) {
echo("Fired Event: " + event);
var _local2 = new com.newgrounds.APIEvent(event, success, data);
getDispatcher().dispatchEvent(_local2);
if ((event == com.newgrounds.APIEvent.API_CONNECTED) && (!success)) {
connected = false;
}
bridge.sendEvent(event, {success:success, data:data});
}
static function sendError(c, e) {
switch (c.command_id) {
case "connectMovie" :
clearInterval(timeout);
callListener(com.newgrounds.APIEvent.API_CONNECTED, false, {error:e, response:c});
break;
case "saveFile" :
callListener(com.newgrounds.APIEvent.FILE_SAVED, false, {error:e, file:save_file, response:c});
save_file = null;
}
var _local3 = (((((("[Newgrounds API ERROR] :: " + c.command_id) + "() - ") + e.name) + ":") + newline) + "\t\t\t\t") + e.message;
trace(_local3);
bridge.sendEvent("trace", {data:_local3});
}
static function sendWarning(m, c) {
if (c) {
m = m + ((("\r[Newgrounds API WARNING] :: \tSee " + COMMANDS_WIKI_URL) + c.toLowerCase()) + " for additional information.");
}
var _local1 = "[Newgrounds API WARNING] :: " + m;
trace(_local1);
bridge.sendEvent("trace", {data:_local1});
}
static function sendNotice(m, c) {
if (c) {
m = m + ((("\r[Newgrounds API NOTICE] :: \tSee " + COMMANDS_WIKI_URL) + c.toLowerCase()) + " for additional information.");
}
trace("[Newgrounds API NOTICE] :: " + m);
}
static function fatalError(m, c) {
if (c) {
m = m + ((("\r\tSee " + COMMANDS_WIKI_URL) + c.toLowerCase()) + " for additional information.");
}
throw (((("***ERROR*** frame=" + _root._currentframe) + ", class=API") + newline) + newline) + m;
}
static function openLoginPage() {
if (hasUserSession()) {
return(undefined);
}
if (!remote_auth) {
var _local1 = com.newgrounds.encoders.MD5.calculate((Math.random() + "a") + movie_id);
_local1 = "POOPYPANTS";
remote_auth = new com.newgrounds.RemoteAuth(_local1);
}
var _local2 = com.newgrounds.encoders.RC4.encrypt(remote_auth.__get__token(), encryption_key);
getURL ((((LOGIN_URL + "?api_auth_id=") + movie_id) + "&api_auth_key=") + _local2, "_blank");
}
static function sendSecureCommand(command, secure_params, unsecure_params, files) {
if (((!debug) && (!hasUserSession())) && (!hasUserEmail())) {
sendError({command_id:command}, new com.newgrounds.APIError("IDENTIFICATION_REQUIRED", ("You must be logged in, or provide an e-mail address using 'API.setUserEmail(\"name@domain.com\");' to use " + command) + "()."));
return(undefined);
}
if (!command) {
fatalError("Missing command", "sendSecureCommand");
}
if (!secure_params) {
fatalError("Missing secure_params", "sendSecureCommand");
}
if (!unsecure_params) {
unsecure_params = new Object();
}
var _local2 = "";
var _local1 = 0;
while (_local1 < 16) {
_local2 = _local2 + compression_radix.charAt(Math.floor(Math.random() * compression_radix.length));
_local1++;
}
if ((debug && (!fake_session)) && (!session_id)) {
secure_params.session_id = "";
} else {
secure_params.session_id = session_id;
}
secure_params.as_version = 2;
secure_params.user_email = user_email;
secure_params.publisher_id = publisher_id;
secure_params.seed = _local2;
secure_params.command_id = command;
var _local8 = com.newgrounds.encoders.JSON.encode(secure_params);
var _local9 = com.newgrounds.encoders.MD5.calculate(_local2);
var _local6 = com.newgrounds.encoders.RC4.encrypt(_local8, encryption_key);
var _local7 = _local9 + _local6;
unsecure_params.secure = compressHex(_local7);
sendCommand("securePacket", unsecure_params, false, files);
}
static function sendCommand(command, params, open_browser, files) {
if ((!connected) and (command != "connectMovie")) {
var _local12 = (("API." + command) + "() - API.connect() must be called before this command can be called") + newline;
fatalError(_local12, "connect");
}
if (open_browser) {
var _local2 = new Object();
} else {
var _local2 = new LoadVars();
}
_local2.command_id = command;
_local2.tracker_id = movie_id;
if (debug) {
_local2.debug = debug;
}
if (params) {
for (var _local9 in params) {
_local2[_local9] = params[_local9];
}
}
if (files) {
for (var _local9 in files) {
_local2[_local9] = files[_local9];
}
}
if (open_browser) {
var _local6 = (GATEWAY_URL + "?seed=") + Math.random();
for (var _local9 in _local2) {
_local6 = _local6 + ((("&" + escape(_local9)) + "=") + escape(_local2[_local9]));
}
trace("OPENING " + _local6);
getURL (_local6, "_blank");
_local2.removeMovieClip();
} else {
var _local10 = new LoadVars();
_local10.remember_command_id = _local2.command_id;
_local10.onData = function (data) {
com.newgrounds.API.echo(("INPUT: \r" + data) + newline);
if (data) {
var _local2 = com.newgrounds.encoders.JSON.decode(data);
} else {
var _local2 = {success:false};
}
if (!_local2.success) {
if ((!_local2.error_code) && (!_local2.error_msg)) {
_local2.error_code = "CONNECTION_FAILED";
_local2.error_msg = "Could not contact the API Gateway";
_local2.command_id = this.remember_command_id;
}
var _local4 = new com.newgrounds.APIError(_local2.error_code, _local2.error_msg);
com.newgrounds.API.sendError(_local2, _local4);
} else {
com.newgrounds.API.doEvent(_local2);
}
};
var _local7 = new Array();
for (var _local8 in _local2) {
_local7.push((_local8 + "=") + escape(_local2[_local8]));
}
echo((("POST " + GATEWAY_URL) + "?") + _local7.join("&"));
_local2.sendAndLoad((GATEWAY_URL + "?seed=") + Math.random(), _local10, "POST");
last_command = _local2.command_id;
}
}
static function renderAd(target) {
if (ad_swf_url) {
target.background = target.createEmptyMovieClip("background", 100);
target.background.beginFill(0);
target.background.moveTo(0, 0);
target.background.lineTo(300, 0);
target.background.lineTo(300, 250);
target.background.lineTo(0, 250);
target.background.lineTo(0, 0);
target.background.endFill();
target.mask = target.createEmptyMovieClip("mask", 101);
target.mask.beginFill(0);
target.mask.moveTo(0, 0);
target.mask.lineTo(300, 0);
target.mask.lineTo(300, 250);
target.mask.lineTo(0, 250);
target.mask.lineTo(0, 0);
target.mask.endFill();
target.clip = target.createEmptyMovieClip("clip", 102);
target.clip.ad = target.clip.createEmptyMovieClip("ad", 100);
target.clip.setMask(target.mask);
target.clip.ad._lockroot = true;
loadMovie (ad_swf_url, target.clip.ad);
callListener(com.newgrounds.APIEvent.AD_ATTACHED, true, {target:target});
} else {
callListener(com.newgrounds.APIEvent.AD_ATTACHED, false, new com.newgrounds.APIError("FLASH_ADS_NOT_APPROVED", "Unable to render ad"));
}
}
static function attachFlashAd(target) {
System.security.allowDomain("http://server.cpmstar.com");
System.security.allowDomain("http://www.cpmstar.com");
System.security.allowDomain("https://server.cpmstar.com");
System.security.allowDomain("https://www.cpmstar.com");
System.security.allowInsecureDomain("http://server.cpmstar.com");
System.security.allowInsecureDomain("http://www.cpmstar.com");
System.security.allowInsecureDomain("https://server.cpmstar.com");
System.security.allowInsecureDomain("https://www.cpmstar.com");
if (checkAdFlood()) {
ad_swf_url = null;
} else if (checkAdCache()) {
reportNewAsset();
var _local1 = new LoadVars();
_local1.onData = function (data) {
if (data) {
com.newgrounds.API.ad_swf_url = data;
} else {
com.newgrounds.API.ad_swf_url = null;
}
com.newgrounds.API.reportAssetLoaded();
com.newgrounds.API.renderAd(target);
};
if (ad_url.indexOf("?") > -1) {
_local1.load((ad_url + "&random=") + Math.random());
} else {
_local1.load((ad_url + "?random=") + Math.random());
}
if (!ad_warning) {
ad_warning = true;
sendMessage("You may get a security sandbox violation from this ad. This is nothing to worry about!");
}
} else if (ad_swf_url) {
renderAd(target);
}
}
static function checkAdFlood() {
if (!ad_url) {
return(false);
}
var _local2 = new Date();
var _local1 = _local2.getTime();
if (_local1 >= ad_flood) {
if ((_local1 - ad_flood) > 1000) {
ad_flood = _local1 + 1000;
} else {
ad_flood = _local1;
sendWarning("This movie is attempting to load multiple ads at too high of a frequency; you may have a bad preloader loop.");
return(true);
}
}
return(false);
}
static function checkAdCache() {
if (!ad_url) {
return(false);
}
var _local2 = new Date();
var _local1 = _local2.getTime();
if (_local1 >= ad_url_cache) {
ad_url_cache = _local1 + 300000;
return(true);
}
return(false);
}
static function sendMessage(m, r) {
var _local1 = "[Newgrounds API] :: " + m;
if (r) {
return(_local1);
}
trace(_local1);
bridge.sendEvent("trace", {data:_local1});
}
static function echo(m) {
if (do_echo) {
trace(m);
}
}
static var LOGIN_URL = "http://ng-local.newgrounds.com/apilogin/";
static var do_echo = true;
static var GATEWAY_URL = "http://www.ngads.com/gateway_v2.php";
static var NEWGROUNDS_PREVIEW = "uploads.ungrounded.net/previews";
static var AD_TERMS_URL = "http://www.newgrounds.com/wiki/using-the-site/terms-of-use/flash-ads/";
static var COMMANDS_WIKI_URL = "http://www.newgrounds.com/wiki/developer-resources/flash-api/commands/";
static var LOCAL_HOST = "localhost";
static var NEWGROUNDS_WWW = "www.newgrounds.com";
static var PREVIEW_HOSTS = new Array(LOCAL_HOST, NEWGROUNDS_PREVIEW);
static var ad_url_cache = 0;
static var ad_flood = 0;
static var ad_warning = false;
static var save_file = null;
static var publisher_id = 1;
static var fake_session = false;
static var medals = null;
static var userpage_format = null;
static var scoreboards = new Array();
static var save_groups = null;
static var compression_radix = "/g8236klvBQ#&|;Zb*7CEA59%s`Oue1wziFp$rDVY@TKxUPWytSaGHJ>dmoMR^<0~4qNLhc(I+fjn)X";
static var errors = com.newgrounds.APIError.init_codes();
static var sharedObjects = new Object();
static var bridge = new com.newgrounds.Bridge(_root.NewgroundsAPI_SandboxID);
static var preload = true;
static var preload_items = 0;
static var preload_items_loaded = 0;
}
Symbol 288 MovieClip [__Packages.com.newgrounds.SaveFile] Frame 0
class com.newgrounds.SaveFile
{
static var file_path, image_path;
var _group, _filename, _file_id, _contents, _thumbnail, _thumbnail_url, raw, img, _file_url, _description, scanner;
function SaveFile (_group) {
this._group = _group;
_filename = null;
_file_id = null;
_contents = null;
_thumbnail = null;
_thumbnail_url = null;
raw = null;
img = null;
_draft = false;
_keys = new Array();
_ratings = new Array();
_file_url = null;
com.newgrounds.API.addEventListener(com.newgrounds.APIEvent.FILE_PRIVS_LOADED, checkPrivs, this);
}
static function setFilePath(path) {
file_path = path + "/";
}
static function setImagePath(path) {
image_path = path + "/";
}
function get name() {
return(_filename);
}
function set name(s) {
_filename = s;
//return(name);
}
function get id() {
return(_file_id);
}
function get description() {
return(_description);
}
function set description(s) {
_description = s;
//return(description);
}
function get contents() {
return(_contents);
}
function set contents(o) {
_contents = o;
//return(contents);
}
function get thumbnailUrl() {
return(image_path + _thumbnail_url);
}
function set thumbnailUrl(s) {
_thumbnail_url = s;
//return(thumbnailUrl);
}
function get fileUrl() {
return(file_path + _file_url);
}
function set fileUrl(s) {
_file_url = s;
//return(fileUrl);
}
function get authorID() {
return(_author_id);
}
function set authorID(i) {
_author_id = i;
//return(authorID);
}
function get authorName() {
return(_author_name);
}
function set authorName(n) {
_author_name = n;
//return(authorName);
}
function get views() {
return(_views);
}
function get draft() {
return(_draft);
}
function set draft(d) {
_draft = d;
//return(draft);
}
function get group() {
return(_group);
}
function get groupId() {
return(_group.getID());
}
function get groupName() {
return(_group.getName());
}
function get groupType() {
return(_group.getType());
}
function get locked() {
return(_locked);
}
function get shared() {
return(_isShared());
}
function get isPrivate() {
return(_isPrivate());
}
function get isPublic() {
return(_isPublic());
}
function get approved() {
return(_isApproved());
}
function get keys() {
return(_keys);
}
function get ratings() {
return(_ratings);
}
function loadAuthorPage() {
com.newgrounds.API.loadUserPage(_author_id, _author_name);
}
function getID() {
return(_file_id);
}
function exists() {
return(!(_file_id === null));
}
function getGroup() {
return(_group);
}
function getName() {
return(_filename);
}
function _isPrivate() {
return(status == STATUS.PRIVATE);
}
function _isShared() {
return(status > STATUS.PRIVATE);
}
function _isApproved() {
return(status > STATUS.UNAPPROVED);
}
function _isPublic() {
if (_isPrivate()) {
return(false);
}
if (_group.isType("SYSTEM") or _group.isType("PRIVATE")) {
return(false);
}
if (_group.isType("PUBLIC")) {
return(true);
}
if (_isApproved()) {
return(true);
}
return(false);
}
function isLocked() {
return(_locked);
}
function getDescription() {
return(_description);
}
function getShared() {
return(_draft);
}
function getThumbnailImageScan() {
return(img);
}
function getRawContents() {
return(raw);
}
function getDuplicateID() {
return(duplicate_id);
}
function getKeys() {
return(_keys);
}
function getKey(key) {
var _local3 = getGroup().getKey(key);
var _local2 = 0;
while (_local2 < _keys.length) {
if (_keys[_local2].id == _local3.key_id) {
return(_keys[_local2].value);
}
_local2++;
}
}
function getRating(rating) {
var _local2 = getGroup().getRating(rating);
if (_ratings[_local2.rating_id]) {
return(_ratings[_local2.rating_id]);
}
return(null);
}
function overwriteAllowed() {
return(overwrite);
}
function getFileURL() {
return(file_path + _file_url);
}
function getThumbnailURL() {
return(image_path + _thumbnail_url);
}
function overwriteExisting() {
overwrite = true;
}
function setID(id, add_to_group) {
_file_id = id;
if (add_to_group) {
getGroup().addFile(this);
}
}
function setName(filename, locked) {
_filename = filename;
_locked = locked;
}
function setDescription(description) {
_description = description;
}
function setDraft(draft) {
_draft = draft;
}
function setContents(_contents) {
this._contents = _contents;
}
function setThumbnail(thumb) {
if (thumb) {
_thumbnail = thumb;
} else {
_thumbnail = null;
}
}
function setThumbnailURL(url) {
_thumbnail_url = url;
}
function setFileURL(url) {
_file_url = url;
}
function setPermissions(status, _locked) {
this._locked = _locked;
this.status = status;
}
function setKey(key, val) {
var _local4 = getGroup().getKeyID(key);
var _local2;
if (!_local4) {
onError(((("'" + key) + "' is not a valid key for the '") + _group.__get__name()) + "' save group", "setKey", "INVALID_VALUE", true);
return(undefined);
}
if ((!_group.keyValueIsValid(key, val)) && (!(val === null))) {
onError((("'" + val) + "' is not a valid ") + _group.getKeyType(key, true), "setKey", "INVALID_VALUE", true);
return(undefined);
}
switch (_group.getKeyType(key, true)) {
case "string" :
if (val) {
val = String(val);
} else {
val = undefined;
}
break;
default :
val = Number(val);
}
var _local5 = {id:_local4, value:val};
for (var _local6 in _keys) {
_local2 = _keys[_local6];
if (_local2.id == _local4) {
_keys[_local6] = _local5;
return(undefined);
}
}
_keys.push(_local5);
}
function setRating(rating, votes, score) {
var _local2 = getGroup().getRating(rating);
if (!votes) {
votes = 0;
}
if (!score) {
score = 0;
}
if (!_local2.is_float) {
score = Math.round(Number(score));
}
_ratings[_local2.rating_id] = {id:Number(_local2.rating_id), name:_local2.rating_name, votes:Number(votes), score:Number(score)};
return(_ratings[_local2.rating_id]);
}
function clearBuffer() {
_contents = null;
raw = null;
img = null;
scanner = null;
overwrite = false;
duplicate_id = null;
}
function onError(msg, funct, code) {
busy = false;
if (!code) {
code = "SAVE_FILE_ERROR";
}
if (!funct) {
funct = "unknown_function";
}
var _local3 = ("getSaveGroup('" + _group.getName()) + "')";
if (exists()) {
funct = (((_local3 + ".getFile('") + getName()) + "').") + funct;
} else {
funct = (_local3 + ".getNewFile().") + funct;
}
var _local5 = new com.newgrounds.APIError(code, msg);
com.newgrounds.API.sendError({command_id:funct}, _local5);
}
function onSaved(p) {
busy = false;
if (!exists()) {
setID(p.save_id, true);
}
setName(p.filename);
setFileURL(p.file_url);
if (p.thumbnail) {
_thumbnail_url = p.thumbnail;
}
}
function onVoted(p) {
trace("ONVOTED WAS CALLED");
return(setRating(p.rating_id, p.votes, p.score));
}
function sendRating(rating, vote) {
var _local6 = null;
if (!com.newgrounds.API.hasUserSession()) {
_local6 = new com.newgrounds.APIError("PERMISSION_DENIED", "You must be logged in to vote on save files");
}
var _local2 = _group.getRating(rating);
if (!_local2) {
_local6 = new com.newgrounds.APIError("PERMISSION_DENIED", ((("'" + rating) + "' is not a valid rating for the '") + _group.getName()) + "' save group");
}
if (voted === true) {
_local6 = new com.newgrounds.APIError("PERMISSION_DENIED", "You have already voted on this item today");
}
if ((vote < _local2.min_value) or (vote > _local2.max_value)) {
_local6 = new com.newgrounds.APIError("PERMISSION_DENIED", (((("'" + rating) + "' votes must be between ") + _local2.min_value) + " and ") + _local2.max_value);
}
if (_local6) {
com.newgrounds.API.callListener(com.newgrounds.APIEvent.VOTE_COMPLETE, false, {error:_local6, file:this});
return(undefined);
}
voted = true;
com.newgrounds.API.rateSaveFile(this, _local2, vote);
}
function replace() {
if (busy) {
onError("Another file is currently being saved, please try again later", "replace");
return(undefined);
}
overwriteExisting();
save();
}
function save() {
if ((com.newgrounds.API.hasUserSession() && (!_author_id)) && (!_author_name)) {
_author_id = com.newgrounds.API.getUserID();
_author_name = com.newgrounds.API.getUserName();
}
if (busy) {
onError("Another file is currently being saved, please try again later", "save", "UPLOAD_IN_PROGRESS");
return(undefined);
}
busy = true;
if (isLocked()) {
onError("This file is _locked and cannot be overwritten.", "save", "PERMISSION_DENIED");
return(undefined);
}
if (!_filename) {
onError("Please provide a name for your file.", "save", "MISSING_PARAM");
return(undefined);
}
if (!_contents) {
onError("The file is empty.", "save", "MISSING_PARAM");
return(undefined);
}
img = null;
com.newgrounds.API.checkFilePrivs(this);
}
function checkPrivs(e) {
if (e.data.file.id != id) {
return(undefined);
}
if (e.success) {
if (e.data.can_write) {
can_write = e.data.can_write;
if (e.data.duplicate_id) {
duplicate_id = e.data.duplicate_id;
}
if (e.data.exists && (!overwriteAllowed())) {
onError(("You already have a file named '" + getName()) + "'", "save", "CONFIRM_REQUEST");
} else {
startFile();
}
} else {
onError("This file is _locked and cannot be overwritten", "save", "PERMISSION_DENIED");
}
} else {
onError("There was a problem looking up your file's details. The server may be down.", "save", "UNKNOWN_ERROR");
}
}
function startFile() {
if (can_write) {
if (_thumbnail) {
scanner = new com.newgrounds.encoders.ImageScanner(_thumbnail);
scanner.setCallback(this, "encodeFile");
scanner.startScan(100, 100, true);
} else {
encodeFile();
}
} else {
onError("You do not have permission to save this file.", "save", "PERMISSION_DENIED");
}
}
function encodeFile(img) {
this.img = img;
raw = com.newgrounds.encoders.SerialXML.encode(_contents).toString();
compressFile();
}
function compressFile() {
com.newgrounds.encoders.LZW2.compress(raw, function (s, p) {
p.file.onCompressed(s);
}, {file:this});
}
function onCompressed(compressed) {
raw = escape(compressed);
writeFile();
}
function getProgress() {
}
function writeFile() {
getGroup().getQuery().clearCache();
com.newgrounds.API.saveFile(this);
clearBuffer();
}
function loadContents() {
if (_contents) {
com.newgrounds.API.setCurrentSaveFile(this);
com.newgrounds.API.callListener(com.newgrounds.APIEvent.FILE_LOADED, true, {file:this});
return(undefined);
}
if (!getFileURL()) {
var _local4 = new com.newgrounds.APIError("FILE_NOT_FOUND", "Attempted to load contents of an unsaved file.");
com.newgrounds.API.callListener(com.newgrounds.APIEvent.FILE_LOADED, false, {file:this, error:_local4});
return(undefined);
}
var _local2 = new LoadVars();
_local2.target = this;
var target = this;
_local2.onData = function (encoded) {
target.onLoaded(encoded);
};
_local2.load(getFileURL());
}
function onLoaded(encoded) {
if (encoded == undefined) {
var _local3 = new com.newgrounds.APIError("FILE_NOT_FOUND", "We could not find the contents for this file. It may have been deleted.");
com.newgrounds.API.callListener(com.newgrounds.APIEvent.FILE_LOADED, false, {file:this, error:_local3});
return(undefined);
}
com.newgrounds.encoders.LZW.setXMLSafe(true);
_contents = com.newgrounds.encoders.SerialXML.decode(com.newgrounds.encoders.LZW.decompress(encoded));
com.newgrounds.API.callListener(com.newgrounds.APIEvent.FILE_LOADED, true, {file:this});
}
function setViews(n) {
_views = n;
}
static var busy = false;
var can_write = false;
var _draft = false;
var status = 0;
var voted = false;
var _views = 0;
var _locked = false;
var overwrite = false;
var duplicate_id = null;
var _keys = null;
var _ratings = null;
var _author_id = null;
var _author_name = null;
static var STATUS = {PRIVATE:1, PUBLIC:2, UNAPPROVED:3, APPROVED:4};
}
Symbol 289 MovieClip [__Packages.com.newgrounds.SaveGroup] Frame 0
class com.newgrounds.SaveGroup
{
var group_name, group_id, group_type, query, ratings, keys, files;
function SaveGroup (group_id, group_name, group_type) {
this.group_name = group_name;
this.group_id = group_id;
this.group_type = group_type;
query = new com.newgrounds.SaveGroupQuery(this);
ratings = new Array();
keys = new Array();
files = new Array();
}
function get id() {
return(group_id);
}
function get name() {
return(group_name);
}
function get type() {
return(group_type);
}
function addFile(file) {
var _local2 = 0;
while (_local2 < files.length) {
if (files[_local2].getID() == file.getID()) {
files[_local2] = file;
return(undefined);
}
_local2++;
}
files.push(file);
}
function getFile(file_id) {
trace("getting the file " + file_id);
var _local2 = 0;
while (_local2 < files.length) {
trace((((("Looking up " + file_id) + " :: ") + files[_local2].getID()) + " || ") + files[_local2].getName());
if (isNumeric(file_id) and (files[_local2].getID() == Number(file_id))) {
return(files[_local2]);
}
if (files[_local2].getName() == file_id) {
return(files[_local2]);
}
_local2++;
}
return(null);
}
function addRating(rating_id, rating_name, min_value, max_value, is_float) {
var _local3 = {rating_id:rating_id, rating_name:rating_name, min_value:min_value, max_value:max_value, is_float:is_float};
if (!getRatingID(rating_name)) {
ratings.push(_local3);
}
}
function getRating(rating_id) {
var _local2 = 0;
while (_local2 < ratings.length) {
if (isNumeric(rating_id) and (ratings[_local2].rating_id == rating_id)) {
return(ratings[_local2]);
}
if (ratings[_local2].rating_name == rating_id) {
return(ratings[_local2]);
}
_local2++;
}
return(null);
}
function getRatingID(rating_id) {
var _local2 = getRating(rating_id);
if (_local2) {
return(_local2.rating_id);
}
return(null);
}
function getRatingName(rating_id) {
var _local2 = getRating(rating_id);
if (_local2) {
return(_local2.rating_name);
}
return(null);
}
function addKey(key_id, key_name, key_type) {
trace(((((">>>>>>>>>>> ADDING KEY " + key_id) + " ") + key_name) + " ") + key_type);
var _local2 = {key_id:key_id, key_name:key_name, key_type:key_type};
if (!getKey(key_name)) {
keys.push(_local2);
}
}
function getKey(key_id) {
var _local2 = 0;
while (_local2 < keys.length) {
if (isNumeric(key_id) and (keys[_local2].key_id == key_id)) {
return(keys[_local2]);
}
if (keys[_local2].key_name == key_id) {
return(keys[_local2]);
}
_local2++;
}
return(null);
}
function getKeyType(key_name, as_string) {
var _local2 = getKey(key_name);
if (_local2) {
return((as_string ? (KEY_TYPES[_local2.key_type]) : (_local2.key_type)));
}
return(null);
}
function getKeyID(key_id) {
var _local2 = getKey(key_id);
if (_local2) {
return(_local2.key_id);
}
return(null);
}
function getKeyName(key_id) {
var _local2 = getKey(key_id);
if (_local2) {
return(_local2.key_name);
}
return(null);
}
function keyValueIsValid(key, value) {
var _local4;
var _local7;
if ((typeof(value) == "number") or (Number(value).toString() == String(value))) {
value = Number(value);
_local4 = ((Math.round(value) === value) ? "integer" : "float");
} else {
_local4 = typeof(value);
if (_local4 == "string") {
var _local6 = "01234567890.-";
var _local5 = true;
var _local2 = 0;
while (_local2 < value.length) {
if (_local6.indexOf(value.charAt(_local2)) < 0) {
_local5 = false;
break;
}
_local2++;
}
if (_local5) {
value = Number(value);
_local4 = "float";
}
}
}
switch (getKeyType(key, true)) {
case "integer" :
_local7 = (_local4 == "integer") or (_local4 == "boolean");
break;
case "float" :
_local7 = ((_local4 == "float") or (_local4 == "integer")) or (_local4 == "boolean");
break;
case "string" :
_local7 = (((_local4 == "string") or (_local4 == "float")) or (_local4 == "integer")) or (_local4 == "boolean");
break;
case "boolean" :
_local7 = (((_local4 == "boolean") or (value == 1)) or (value == 0)) or (value == "");
break;
default :
_local7 = false;
}
return(_local7);
}
function isType(type) {
return(group_type == TYPES[type.toUpperCase()]);
}
function getID() {
return(group_id);
}
function getName() {
return(group_name);
}
function getType() {
return(group_type);
}
function isSystem() {
return(undefined);
}
function getQuery(as_object) {
if (as_object) {
return(query.toObject());
}
return(query);
}
function newQuery() {
query.reset();
return(query);
}
function clearQuery() {
query.reset();
}
function newFile() {
var _local2 = new com.newgrounds.SaveFile(this);
return(_local2);
}
static function isNumeric(value) {
return((typeof(value) == "number") or (Number(value).toString() == String(value)));
}
static var KEY_TYPES = [null, "float", "integer", "string", "boolean"];
static var TYPES = {SYSTEM:0, PRIVATE:1, PUBLIC:2, MODERATED:3};
}
Symbol 292 MovieClip [__Packages.com.newgrounds.SaveGroupQuery] Frame 0
class com.newgrounds.SaveGroupQuery
{
var _group, _num_results, _pages, _page, _randomize_results, file_conditions, key_conditions, rating_conditions, sort_conditions, lookup_keys, lookup_ratings, _group_by;
function SaveGroupQuery (_group) {
this._group = _group;
reset();
}
function get group() {
return(_group);
}
function get groupId() {
return(_group.getID());
}
function get resultsPerPage() {
return(_num_results);
}
function set resultsPerPage(n) {
_num_results = n;
//return(resultsPerPage);
}
function get pages() {
return(_pages);
}
function get page() {
return(_page);
}
function set page(n) {
_page = n;
//return(page);
}
function get randomize() {
return(_randomize_results);
}
function set randomize(b) {
_randomize_results = b;
//return(randomize);
}
function get results() {
return(_results);
}
function clearCache() {
_results = [];
}
function reset() {
file_conditions = new Array();
key_conditions = new Array();
rating_conditions = new Array();
sort_conditions = new Array();
lookup_keys = new Object();
lookup_ratings = new Object();
_num_results = 20;
_page = 1;
_randomize_results = false;
_group_by = new Array();
clearCache();
}
function getGroup() {
return(_group);
}
function getGroupID() {
return(_group.getID());
}
function isRandomized() {
return(_randomize_results);
}
function toObject() {
var _local2;
var _local11 = {page:_page, num_results:_num_results};
if (_randomize_results) {
_local11.randomize = 1;
}
if (!com.newgrounds.ValidationTools.isEmpty(file_conditions)) {
var _local12 = [];
_local2 = 0;
while (_local2 < file_conditions.length) {
var _local6 = file_conditions[_local2];
_local12.push({field:file_fields[_local6.field.toUpperCase()].id, operator:_local6.operator, value:_local6.value});
_local2++;
}
_local11.file_conditions = _local12;
}
if (!com.newgrounds.ValidationTools.isEmpty(key_conditions)) {
_local11.key_conditions = key_conditions;
}
if (!com.newgrounds.ValidationTools.isEmpty(rating_conditions)) {
_local11.rating_conditions = rating_conditions;
}
if (!com.newgrounds.ValidationTools.isEmpty(sort_conditions)) {
var _local14 = [];
_local2 = 0;
while (_local2 < sort_conditions.length) {
var _local3 = sort_conditions[_local2];
if (_local3.table == TABLE_FILES) {
var _local8 = file_fields[_local3.field.toUpperCase()].id;
} else {
var _local8 = _local3.field;
}
var _local5 = {field:_local8, table:_local3.table};
if (_local3.desc) {
_local5.desc = 1;
}
if (_local3.extra) {
_local5.extra = _local3.extra;
}
_local14.push(_local5);
_local2++;
}
_local11.sort_conditions = _local14;
}
if (!com.newgrounds.ValidationTools.isEmpty(lookup_keys)) {
var _local15 = [];
for (_local2 in lookup_keys) {
_local15.push(_local2);
}
_local11.lookup_keys = _local15;
}
if (!com.newgrounds.ValidationTools.isEmpty(lookup_ratings)) {
var _local13 = [];
for (_local2 in lookup_ratings) {
_local13.push(_local2);
}
_local11.lookup_ratings = _local13;
}
if (!com.newgrounds.ValidationTools.isEmpty(_group_by)) {
var _local16 = [];
_local2 = 0;
while (_local2 < _group_by.length) {
var _local4 = _group_by[_local2];
if (_local4.table == TABLE_FILES) {
var _local8 = file_fields[_local4.field.toUpperCase()].id;
} else {
var _local8 = _local4.field;
}
_local16.push({field:_local8, table:_local4.table});
_local2++;
}
_local11.group_by = _local16;
}
return(_local11);
}
function toString() {
var _local9;
var _local2;
var _local11 = [];
_local9 = "Lookup:\r";
var _local14 = [];
for (var _local6 in file_fields) {
_local14.push(" " + _local6);
_local2 = true;
}
_local9 = _local9 + _local14.join(newline);
_local11.push(_local9);
_local9 = "";
_local2 = false;
var _local16 = [];
for (var _local6 in lookup_keys) {
_local16.push((" KEY '" + _group.getKeyName(_local6)) + "'");
_local2 = true;
}
if (_local2) {
_local9 = _local9 + _local16.join(newline);
_local11.push(_local9);
}
_local9 = "";
_local2 = false;
var _local15 = [];
for (var _local6 in lookup_ratings) {
_local15.push((" RATING '" + _group.getRatingName(_local6)) + "'");
_local2 = true;
}
if (_local2) {
_local9 = _local9 + _local15.join(newline);
_local11.push(_local9);
}
_local9 = "Where:\r";
_local2 = false;
var _local8 = [];
var _local6 = 0;
while (_local6 < file_conditions.length) {
var _local7 = file_conditions[_local6];
var _local10 = ((((" " + _local7.field) + " ") + _local7.operator) + " ") + _local7.value;
_local8.push(_local10);
_local2 = true;
_local6++;
}
_local6 = 0;
while (_local6 < key_conditions.length) {
var _local7 = key_conditions[_local6];
var _local10 = ((((" KEY '" + _group.getKeyName(_local7.key_id)) + "' ") + _local7.operator) + " ") + _local7.value;
_local8.push(_local10);
_local2 = true;
_local6++;
}
_local6 = 0;
while (_local6 < rating_conditions.length) {
var _local7 = rating_conditions[_local6];
var _local10 = ((((" RATING '" + _group.getRatingName(_local7.rating_id)) + "' ") + _local7.operator) + " ") + _local7.value;
_local8.push(_local10);
_local2 = true;
_local6++;
}
if (_local2) {
_local9 = _local9 + _local8.join(newline);
_local11.push(_local9);
}
_local9 = "Group By:\r";
_local2 = false;
var _local13 = [];
_local6 = 0;
while (_local6 < _group_by.length) {
var _local4 = _group_by[_local6];
var _local5;
if (_local4.table == TABLE_KEYS) {
_local5 = (" KEY '" + _group.getKeyName(_local4.field)) + "'";
} else if (_local4.table == TABLE_RATINGS) {
_local5 = (" RATING '" + _group.getRatingName(_local4.field)) + "'";
} else {
_local5 = " " + _local4.field;
}
_local13.push(_local5);
_local2 = true;
_local6++;
}
if (_local2) {
_local9 = _local9 + _local13.join(newline);
_local11.push(_local9);
}
_local9 = "Order By:\r";
_local2 = false;
var _local12 = [];
if (isRandomized()) {
_local12.push(" RANDOM");
_local2 = true;
}
_local6 = 0;
while (_local6 < sort_conditions.length) {
var _local3 = sort_conditions[_local6];
if (_local3.table == TABLE_KEYS) {
var _local5 = (" KEY '" + _group.getKeyName(_local3.field)) + "'";
} else if (_local3.table == TABLE_RATINGS) {
var _local5 = ((" RATING '" + _group.getRatingName(_local3.field)) + "' ") + ((_local3.extra == "votes") ? "VOTES" : "SCORE");
} else {
var _local5 = " " + _local3.field;
}
var _local5 = _local5 + (_local3.desc ? " (DESCENDING)" : "");
_local12.push(_local5);
_local2 = true;
_local6++;
}
if (_local2) {
_local9 = _local9 + _local12.join(newline);
_local11.push(_local9);
}
_local11.push("Page:\r " + _page);
_local11.push("Results Per Page:\r " + _num_results);
return(_local11.join(newline));
}
function setResultsPerPage(r) {
_num_results = r;
clearCache();
}
function setPage(p) {
_page = p;
clearCache();
}
function setRandomize(bool) {
_randomize_results = ((bool === false) ? false : true);
}
function includeKey(key) {
if (!_group.getKeyID(key)) {
trace(((("[SaveGroupQuery Error] :: '" + key) + "' is not a valid key for the '") + _group.__get__name()) + "' group.");
return(undefined);
}
lookup_keys[_group.getKeyID(key)] = 1;
clearCache();
}
function includeRating(rating) {
if (!_group.getRatingID(rating)) {
trace(((("[SaveGroupQuery Error] :: '" + rating) + "' is not a valid rating for the '") + _group.__get__name()) + "' group.");
return(undefined);
}
lookup_ratings[_group.getRatingID(rating)] = 1;
clearCache();
}
function groupBy(field) {
addGroupItem(TABLE_FILES, field);
}
function groupByKey(key) {
if (!_group.getKeyID(key)) {
error(((("'" + key) + "' is not a valid key for the '") + _group.getName()) + "' _group");
return(undefined);
}
addGroupItem(TABLE_KEYS, _group.getKeyID(key));
}
function groupByRating(rating) {
if (!_group.getRatingID(rating)) {
error(((("'" + rating) + "' is not a valid rating for the '") + _group.getName()) + "' _group");
return(undefined);
}
addGroupItem(TABLE_RATINGS, _group.getRatingID(rating));
}
function addGroupItem(table, field) {
_group_by.push({table:table, field:field});
clearCache();
}
function excludeKey(key) {
delete lookup_keys[_group.getKeyID(key)];
clearCache();
}
function excludeRating(rating) {
delete lookup_ratings[_group.getRatingID(rating)];
clearCache();
}
function addCondition(field, operator, value) {
if (((field == "FILE_STATUS") && (typeof(value) == "string")) && (!(com.newgrounds.SaveFile.STATUS[value.toUpperCase()] === undefined))) {
value = com.newgrounds.SaveFile.STATUS[value.toUpperCase()];
}
if (operator == "==") {
operator = "=";
}
if ((!validateOperator(operator)) or (!validateValue(field, value))) {
return(undefined);
}
file_conditions.push({field:field, operator:operator, value:value});
clearCache();
}
function addKeyCondition(key, operator, value) {
if (!_group.getKeyID(key)) {
error(((("'" + key) + "' is not a valid key for the '") + _group.getName()) + "' save _group");
} else if ((!validateOperator(operator)) or (!validateKeyValue(key, value))) {
return(undefined);
}
key_conditions.push({key_id:_group.getKeyID(key), operator:operator, value:value});
clearCache();
}
function addRatingCondition(rating, operator, value, column) {
if (!column) {
column = "SCORE";
}
if (!_group.getRatingID(rating)) {
error(((("'" + rating) + "' is not a valid rating for the '") + _group.getName()) + "' save _group");
} else {
if (!validateOperator(operator)) {
return(undefined);
}
if (!com.newgrounds.ValidationTools.isNumber(value)) {
error(("Expected numeric value for rating '" + rating) + "'");
return(undefined);
}
}
if (!rating_columns[column]) {
var _local2 = [];
for (var _local3 in rating_columns) {
_local2.push(_local3);
}
error((("Invalid rating column '" + column) + "'. Valid columns are ") + _local2.join(", "));
return(undefined);
}
rating_conditions.push({rating_id:_group.getRatingID(rating), operator:operator, value:value, column:rating_columns[column]});
clearCache();
}
function sortOn(field, order) {
if (!file_fields[field]) {
var _local2 = [];
for (var _local3 in file_fields) {
_local2.push(_local3);
}
error((("'" + field) + "' is not a valid sort field. Valid fields are: ") + _local2.join(", "));
return(undefined);
}
addSortCondition(TABLE_FILES, field, order);
}
function sortOnKey(key, order) {
if (!_group.getKeyID(key)) {
error(((("'" + key) + "' is not a valid key for the '") + _group.getName()) + "' _group");
return(undefined);
}
addSortCondition(TABLE_KEYS, _group.getKeyID(key), order);
}
function sortOnRating(rating, order, column) {
if (!_group.getRatingID(rating)) {
error(((("'" + rating) + "' is not a valid rating for the '") + _group.getName()) + "' _group");
return(undefined);
}
if (!column) {
column = "score";
}
addSortCondition(TABLE_RATINGS, _group.getRatingID(rating), order, column);
}
function sortOnRatingScore(rating, order) {
sortOnRating(rating, order, "score");
}
function sortOnRatingVotes(rating, order) {
sortOnRating(rating, order, "votes");
}
function addSortCondition(table, field, order, extra) {
var _local7;
if (((!order) or (order == "")) or (order.toUpperCase() == "ASC")) {
_local7 = false;
} else if (order.toUpperCase() == "DESC") {
_local7 = true;
} else {
error(("'" + order) + "' is not a valid sort order!");
return(undefined);
}
var _local3 = {table:table, field:field, desc:_local7};
if (extra) {
_local3.extra = extra;
}
sort_conditions.push(_local3);
clearCache();
}
function onExecuted(results) {
_results = [];
var _local6 = 0;
while (_local6 < results.length) {
var _local2 = results[_local6];
var _local3 = new com.newgrounds.SaveFile(_group);
_local3.setName(_local2.filename);
_local3.setID(_local2.save_id);
_local3.setDescription(_local2.description);
_local3.setThumbnailURL(_local2.thumb);
_local3.setFileURL(_local2.file);
if (_local2.views) {
_local3.setViews(_local2.views);
}
_local3.setPermissions(_local2.status, _local2.locked);
_local3.authorName = _local2.user_name;
_local3.authorID = _local2.user_id;
var _local5 = 0;
while (_local5 < _local2.keys.length) {
_local3.setKey(_local2.keys[_local5].id, _local2.keys[_local5].value);
_local5++;
}
var _local4 = 0;
while (_local4 < _local2.ratings.length) {
_local3.setRating(_local2.ratings[_local4].id, _local2.ratings[_local4].votes, _local2.ratings[_local4].score);
_local4++;
}
getGroup().addFile(_local3);
_results.push(_local3);
_local6++;
}
callEventDispatcher();
}
function hasResults() {
return(_results && (_results.length > 0));
}
function callEventDispatcher() {
com.newgrounds.API.callListener(com.newgrounds.APIEvent.QUERY_COMPLETE, true, {query:this});
}
function execute() {
if (hasResults() && (!isRandomized())) {
callEventDispatcher();
return(undefined);
}
_group.query = this;
com.newgrounds.API.lookupSaveFiles(_group);
}
function processResults(files) {
return(null);
}
function validateKeyValue(key, value) {
var _local3 = _group.getKeyType(key);
if (_local3) {
var _local2 = com.newgrounds.SaveGroup.KEY_TYPES[_local3];
if ((_local2 == "float") and com.newgrounds.ValidationTools.isFloat(value)) {
return(true);
}
if ((_local2 == "integer") and com.newgrounds.ValidationTools.isInteger(value)) {
return(true);
}
if ((_local2 == "string") and com.newgrounds.ValidationTools.isString(value)) {
return(true);
}
error(((("Expected type " + _local2) + " for key '") + key) + "'");
}
return(false);
}
function validateValue(field, value) {
if (file_fields[field]) {
if ((file_fields[field].type == "integer") and com.newgrounds.ValidationTools.isInteger(value)) {
return(true);
}
if ((file_fields[field].type == "float") and com.newgrounds.ValidationTools.isFloat(value)) {
return(true);
}
if ((file_fields[field].type == "string") and com.newgrounds.ValidationTools.isString(value)) {
return(true);
}
error(((("Expecting " + file_fields[field].type) + " value on '") + field) + "' condition");
} else {
var _local2 = [];
for (var _local4 in file_fields) {
_local2.push(_local4);
}
error((("'" + field) + "' is not a searchable field. Valid fields are: ") + _local2.join(", "));
}
return(false);
}
function validateOperator(operator) {
var _local2 = 0;
while (_local2 < valid_operators.length) {
if (operator == valid_operators[_local2]) {
return(true);
}
_local2++;
}
error((("'" + operator) + "' is not a valid lookup operation. Valid operations are: ") + valid_operators.join(", "));
return(false);
}
function error(msg) {
trace("[QUERY ERROR] :: " + msg);
}
static var TABLE_FILES = 1;
static var TABLE_KEYS = 2;
static var TABLE_RATINGS = 3;
var _results = [];
static var file_fields = {FILE_ID:{id:0, field:"file_id", type:"integer"}, AUTHOR_ID:{id:1, field:"user_id", type:"integer"}, AUTHOR_NAME:{id:2, field:"user_name", type:"string"}, FILE_NAME:{id:3, field:"file_name", type:"string"}, CREATED_ON:{id:4, field:"created", type:"string"}, UPDATED_ON:{id:5, field:"last_update", type:"string"}, TOTAL_VIEWS:{id:6, field:"views", type:"integer"}, FILE_STATUS:{id:7, field:"status", type:"integer"}};
static var rating_columns = {TOTAL_VOTES:"votes", SCORE:"score"};
static var valid_operators = ["=", "<", ">", "!=", "<>", "<=", ">=", "*", "!*", "!*=", "!=*", "*=", "=*"];
}
Symbol 294 MovieClip [__Packages.com.newgrounds.encoders.ImageScanner] Frame 0
class com.newgrounds.encoders.ImageScanner
{
var image_source, source_width, source_height, sourceBitmap, callback_target, callback_function, hash, cube, basen, xpos, ypos, pixels, busy, canvas_width, canvas_height, resizedBitmap, copyBitmap, output, draw_interval, callback_interval;
function ImageScanner (the_source) {
if (the_source) {
image_source = the_source;
} else {
image_source = _root;
}
reset();
if (typeof(image_source) == "movieclip") {
if (image_source == _root) {
source_width = Stage.width;
source_height = Stage.height;
} else {
source_width = Math.floor(image_source._width);
source_height = Math.floor(image_source._height);
}
sourceBitmap = new flash.display.BitmapData(source_width, source_height, false, 4294967295);
sourceBitmap.draw(_root);
} else if (image_source.width) {
source_width = image_source.width;
source_height = image_source.height;
sourceBitmap = image_source;
} else {
error("You can only use BitMaptData and MovieClip objects to create images");
}
}
function setCallback(target, funct) {
if (target && (funct)) {
callback_target = target;
callback_function = funct;
}
}
function reset() {
callback_target = null;
callback_function = null;
debug.bad_pixels = 0;
hash = "0123456789aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ<>?:;-_=+()!&";
var _local3 = Math.pow(hash.length, 2);
trace("MAX COLORS: " + _local3);
var _local2 = Math.floor(Math.pow(_local3, 0.333333333333333)) - 1;
var _local4 = Math.pow(_local2, 3);
cube = _local2;
basen = new com.newgrounds.encoders.BaseN(hash);
xpos = 0;
ypos = 0;
pixels = 0;
busy = false;
}
function startScan(w, h, s) {
if (w) {
image_width = w;
}
if (h) {
image_height = h;
}
if (s != undefined) {
crop = s;
}
var _local7 = _root.getNextHighestDepth();
var _local6 = _root.createEmptyMovieClip("API_image_container_" + _local7, _local7);
var _local5 = _local6.createEmptyMovieClip("canvas", 100);
_local5.attachBitmap(sourceBitmap, 100);
if (crop) {
if ((image_width / source_width) > (image_height / source_height)) {
canvas_width = image_width;
canvas_height = Math.ceil(source_height * (image_width / source_width));
} else {
canvas_height = image_height;
canvas_width = Math.ceil(source_width * (image_height / source_height));
}
} else {
canvas_width = image_width;
canvas_height = image_height;
}
_local5._x = Math.round((image_width - canvas_width) / 2);
_local5._width = canvas_width;
_local5._height = canvas_height;
resizedBitmap = new flash.display.BitmapData(image_width, image_height, false, 4294967295);
resizedBitmap.draw(_local6);
_local6.removeMovieClip();
copyBitmap = new flash.display.BitmapData(image_width, image_height, false, 4294967295);
var _local3 = "" + image_width;
while (_local3.length < 3) {
_local3 = "0" + _local3;
}
var _local4 = "" + image_height;
while (_local4.length < 3) {
_local4 = "0" + _local4;
}
output = _local3 + _local4;
draw_interval = setInterval(this, "drawChunk", 10);
busy = false;
return(resizedBitmap);
}
function getBitmapData() {
return(copyBitmap);
}
function getBytesTotal() {
return((image_width * image_height) * 2);
}
function getBytesScanned() {
return(pixels * 2);
}
function getProgress() {
return(Math.round((getBytesScanned() / getBytesTotal()) * 100));
}
function drawChunk() {
if (!busy) {
busy = true;
var _local2 = 0;
while (_local2 < pixels_per_chunk) {
if (!nextPixel()) {
trace(output.length);
clearInterval(draw_interval);
callback_interval = setInterval(this, "doCallback", 25);
busy = true;
break;
}
_local2++;
}
busy = false;
}
}
function doCallback() {
busy = false;
clearInterval(callback_interval);
if (callback_target and callback_function) {
callback_target[callback_function](output);
} else {
onScanComplete(output);
}
}
function onScanComplete(packet) {
sendMessage(("packet size: " + output.length) + " bytes", "onScanComplete");
}
function nextPixel() {
var _local15 = xpos;
var _local14 = ypos;
var _local7 = resizedBitmap.getPixel(_local15, _local14);
var _local17 = (_local7 >> 16) & 255;
var _local20 = (_local7 >> 8) & 255;
var _local16 = (_local7 >> 0) & 255;
var _local11 = Math.round(((_local17 + 1) / 256) * cube);
var _local10 = Math.round(((_local20 + 1) / 256) * cube);
var _local13 = Math.round(((_local16 + 1) / 256) * cube);
var _local12 = (((_local11 * (cube + 1)) * (cube + 1)) + (_local10 * (cube + 1))) + _local13;
var _local6 = basen.encode(_local12, 2);
output = output + _local6;
if (_local6.length != 2) {
trace("bad pixel " + _local6);
}
var _local5 = basen.decode(_local6);
var _local18 = _local5;
var _local8 = _local5 % (cube + 1);
_local5 = (_local5 - _local8) / (cube + 1);
var _local9 = _local5 % (cube + 1);
var _local19 = (_local5 - _local9) / (cube + 1);
if (((_local13 != _local8) and (_local10 != _local9)) and (_local11 != _local10)) {
debug.bad_pixels++;
trace((((((("BAD PIXEL " + debug.bad_pixels) + ") ") + _local12) + " != ") + _local18) + " ") + _local6);
trace(basen.debug.lastencode);
}
var _local2 = Math.round((_local19 / cube) * 255).toString(16);
var _local4 = Math.round((_local9 / cube) * 255).toString(16);
var _local3 = Math.round((_local8 / cube) * 255).toString(16);
while (_local2.length < 2) {
_local2 = "0" + _local2;
}
while (_local4.length < 2) {
_local4 = "0" + _local4;
}
while (_local3.length < 2) {
_local3 = "0" + _local3;
}
copyBitmap.setPixel(_local15, _local14, Number((("0x" + _local2) + _local4) + _local3));
pixels++;
if (pixels >= (image_width * image_height)) {
return(false);
}
xpos++;
if (xpos >= image_width) {
xpos = 0;
ypos++;
}
return(true);
}
function error(e, f) {
sendMessage(e, f, "ERROR");
}
function sendMessage(msg, func, type) {
var _local1 = "ImageScanner";
if (func) {
_local1 = _local1 + (("." + func) + "()");
}
if (type) {
_local1 = (type + " in ") + _local1;
}
_local1 = _local1 + (" :: " + msg);
trace(_local1);
}
var image_width = 100;
var image_height = 100;
var crop = true;
var pixels_per_chunk = 500;
var debug = new Object();
}
Symbol 293 MovieClip [__Packages.com.newgrounds.encoders.BaseN] Frame 0
class com.newgrounds.encoders.BaseN
{
var ceiling, hashIndex, bitSize, hashVal, i;
function BaseN (hash) {
ceiling = 100000000000000;
if (hash) {
hashIndex = hash;
} else {
hashIndex = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ`~@#$%^&*()+|;/";
}
bitSize = hashIndex.length;
hashVal = new Object();
i = 0;
while (i < bitSize) {
hashVal[hashIndex.charAt(i)] = i;
i++;
}
}
function verify(s) {
if (hashVal[s] != undefined) {
return(true);
}
return(false);
}
function encode(n, minchars) {
debug.lastencode = "";
if (typeof(i) != "string") {
n = n.toString();
}
if (n.charAt(0) == "-") {
var _local3 = "-";
n = n.substring(1);
} else {
var _local3 = "";
}
if (String(n).indexOf(".") > -1) {
var _local4 = String(n).split(".", 2);
return(((_local3 + baseNEncoder(_local4[0], minchars)) + ".") + baseNEncoder(_local4[1]));
}
debug.lastencode = debug.lastencode + "\tNo decimal\r";
return(_local3 + baseNEncoder(n, minchars));
}
function decode(s) {
var _local4 = 1;
if (s.charAt(0) == "-") {
_local4 = -1;
s = s.substring(1, s.length);
}
var _local3 = s.indexOf(".");
if (_local3 > -1) {
var _local5 = Math.pow(10, baseNDecoder(s.substring(_local3 + 1, s.length)));
return((baseNDecoder(s.substring(0, _local3)) / _local5) * _local4);
}
return(baseNDecoder(s) * _local4);
}
function baseNEncoder(n, minchars) {
if (!minchars) {
minchars = 1;
}
var _local4 = "";
while (n != 0) {
n = Math.round(n);
var _local3 = n % bitSize;
if (Math.round(_local3) != _local3) {
trace((((((((("BaseN failed on " + n) + "%") + bitSize) + " = ") + _local3) + " ") + int(n)) + " ") + int(bitSize));
}
_local4 = hashIndex.charAt(_local3) + _local4;
debug.lastencode = debug.lastencode + (((((((("\t-> n:" + n) + " % bitSize:") + bitSize) + " = ") + _local3) + ", final char=") + _local4) + newline);
n = n - _local3;
n = n / bitSize;
}
if (minchars) {
while (_local4.length < minchars) {
_local4 = hashIndex.charAt(0) + _local4;
}
}
return(_local4);
}
function baseNDecoder(s) {
var _local2 = 0;
var _local6 = 0;
i = 0;
while (i < s.length) {
var _local3 = s.charAt((s.length - i) - 1);
if (_local3 == hashIndex.charAt(0)) {
var _local5 = 0;
} else {
var _local5 = hashVal[_local3] * Math.pow(bitSize, i);
}
_local2 = _local2 + _local5;
if (_local2 >= ceiling) {
_local6 = _local6 + ((_local2 - (_local2 % ceiling)) / ceiling);
_local2 = _local2 % ceiling;
}
i++;
}
if (_local6 > 0) {
_local2 = "" + _local2;
while (_local2.length < (ceiling.toString().length - 1)) {
_local2 = "0" + _local2;
}
_local2 = ("" + _local6) + _local2;
}
return(_local2);
}
var debug = new Object();
}
Symbol 304 MovieClip [__Packages.com.newgrounds.APIEventDispatcher] Frame 0
class com.newgrounds.APIEventDispatcher
{
function APIEventDispatcher () {
}
function addEventListener(event, callback, target) {
if (!target) {
throw "Attempted to create a listener without providing a target object.";
}
if (!listeners[event]) {
listeners[event] = [];
} else {
removeEventListener(event, target);
}
listeners[event].push({target:target, callback:callback});
}
function removeEventListener(event, target) {
if (!target) {
throw "Attempted to remove a listener without providing a target object.";
}
if ((!listeners[event]) || (listeners[event].length < 1)) {
return(undefined);
}
var _local4 = [];
var _local2 = 0;
while (_local2 < listeners[event].length) {
if (listeners[event][_local2].target != target) {
_local4.push(listeners[event][_local2]);
}
_local2++;
}
listeners[event] = _local4;
}
function dispatchEvent(event) {
if (!hasEventListener(event.__get__type())) {
return(false);
}
collectGarbage(event.__get__type());
var _local2 = 0;
while (_local2 < listeners[event.__get__type()].length) {
var _local4 = listeners[event.__get__type()][_local2].callback;
if (listeners[event.__get__type()][_local2].target) {
var _local5 = listeners[event.__get__type()][_local2].target;
_local4.call(_local5, event);
} else {
_local4(event);
}
_local2++;
}
return(true);
}
function hasEventListener(event) {
return((listeners[event] != undefined) && (listeners[event].length > 0));
}
function collectGarbage(event) {
var _local5 = [];
if (!hasEventListener) {
return(undefined);
}
var _local2 = 0;
while (_local2 < listeners[event].length) {
var _local4 = listeners[event][_local2].target;
if (_local4) {
_local5.push(listeners[event][_local2]);
}
_local2++;
}
listeners[event] = _local5;
}
var listeners = {};
}
Symbol 291 MovieClip [__Packages.com.newgrounds.APIEvent] Frame 0
class com.newgrounds.APIEvent
{
var _type, _success, _error, data;
function APIEvent (type, success, data) {
_type = type;
_success = success;
if (data.isError()) {
_error = data;
this.data = null;
} else if (data.error && (data.error.isError())) {
_error = data.error;
this.data = data;
} else {
this.data = data;
_error = null;
}
}
function get error() {
return(_error);
}
function get type() {
return(_type);
}
function get success() {
return(_success);
}
static var API_CONNECTED = "apiConnected";
static var ADS_APPROVED = "adsApproved";
static var AD_ATTACHED = "adAttached";
static var HOST_BLOCKED = "hostBlocked";
static var NEW_VERSION_AVAILABLE = "newVersionAvailable";
static var EVENT_LOGGED = "eventLogged";
static var SCORE_POSTED = "scorePosted";
static var SCORES_LOADED = "scoresLoaded";
static var UNLOCK_MEDAL = "unlockMedal";
static var MEDAL_UNLOCKED = "medalUnlocked";
static var MEDALS_LOADED = "medalsLoaded";
static var METADATA_LOADED = "metadataLoaded";
static var FILE_PRIVS_LOADED = "filePrivsLoaded";
static var FILE_SAVED = "fileSaved";
static var FILE_LOADED = "fileLoaded";
static var FILE_INITIALIZED = "fileInitialized";
static var FILE_REQUESTED = "fileRequested";
static var QUERY_COMPLETE = "queryComplete";
static var VOTE_COMPLETE = "voteComplete";
static var API_ERROR = "apiError";
static var UNCAUGHT_EVENT = "uncaughtEvent";
}
Symbol 298 MovieClip [__Packages.com.newgrounds.RemoteAuth] Frame 0
class com.newgrounds.RemoteAuth
{
var auth_token, receiver;
function RemoteAuth (id) {
auth_token = id;
System.security.allowDomain("*");
receiver = new LocalConnection();
receiver.allowDomain = function () {
return(true);
};
receiver.onAuth = function (auth_result) {
trace("remote login is a success! " + auth_result);
com.newgrounds.API.onRemoteAuthentication(auth_result);
};
receiver.connect("_" + auth_token);
}
function get token() {
return(auth_token);
}
}
Symbol 1836 MovieClip [__Packages.PrintScreen] Frame 0
class PrintScreen
{
var broadcastMessage, record, id;
function PrintScreen () {
AsBroadcaster.initialize(this);
}
function print(mc, x, y, w, h) {
broadcastMessage("onStart", mc);
if (x == undefined) {
x = 0;
}
if (y == undefined) {
y = 0;
}
if (w == undefined) {
w = mc._width;
}
if (h == undefined) {
h = mc._height;
}
var _local6 = new flash.display.BitmapData(w, h, false);
record = new LoadVars();
record.width = w;
record.height = h;
record.cols = 0;
record.rows = 0;
var _local5 = new flash.geom.Matrix();
_local5.translate(-x, -y);
_local6.draw(mc, _local5, new flash.geom.ColorTransform(), 1, new flash.geom.Rectangle(0, 0, w, h));
id = setInterval(copysource, 5, this, mc, _local6);
}
function copysource(scope, movie, bit) {
var _local4;
var _local5;
scope.record["px" + scope.record.rows] = new Array();
var _local2 = 0;
while (_local2 < bit.width) {
_local4 = bit.getPixel(_local2, scope.record.rows);
_local5 = _local4.toString(16);
if (_local4 == 16777215) {
_local5 = "";
}
scope.record["px" + scope.record.rows].push(_local5);
_local2++;
}
scope.record.rows = scope.record.rows + 1;
if (scope.record.rows == 275) {
_root.console.addLine("Screenshot is 50% complete, please wait...");
}
if (scope.record.rows >= bit.height) {
clearInterval(scope.id);
scope.broadcastMessage("onComplete", movie, scope.record);
_root.generatingScreenShot = false;
bit.dispose();
}
}
}
Symbol 142 MovieClip [__Packages.mx.core.UIObject] Frame 0
class mx.core.UIObject extends MovieClip
{
var _width, _height, _x, _y, _parent, _minHeight, _minWidth, _visible, dispatchEvent, _xscale, _yscale, methodTable, onEnterFrame, tfList, __width, __height, moveTo, lineTo, createTextField, attachMovie, buildDepthTable, findNextAvailableDepth, idNames, childrenCreated, _name, createAccessibilityImplementation, _endInit, validateNow, hasOwnProperty, initProperties, stylecache, className, ignoreClassStyleDeclaration, _tf, fontFamily, fontSize, color, marginLeft, marginRight, fontStyle, fontWeight, textAlign, textIndent, textDecoration, embedFonts, styleName, enabled;
function UIObject () {
super();
constructObject();
}
function get width() {
return(_width);
}
function get height() {
return(_height);
}
function get left() {
return(_x);
}
function get x() {
return(_x);
}
function get top() {
return(_y);
}
function get y() {
return(_y);
}
function get right() {
return(_parent.width - (_x + width));
}
function get bottom() {
return(_parent.height - (_y + height));
}
function getMinHeight(Void) {
return(_minHeight);
}
function setMinHeight(h) {
_minHeight = h;
}
function get minHeight() {
return(getMinHeight());
}
function set minHeight(h) {
setMinHeight(h);
//return(minHeight);
}
function getMinWidth(Void) {
return(_minWidth);
}
function setMinWidth(w) {
_minWidth = w;
}
function get minWidth() {
return(getMinWidth());
}
function set minWidth(w) {
setMinWidth(w);
//return(minWidth);
}
function setVisible(x, noEvent) {
if (x != _visible) {
_visible = x;
if (noEvent != true) {
dispatchEvent({type:(x ? "reveal" : "hide")});
}
}
}
function get visible() {
return(_visible);
}
function set visible(x) {
setVisible(x, false);
//return(visible);
}
function get scaleX() {
return(_xscale);
}
function set scaleX(x) {
_xscale = x;
//return(scaleX);
}
function get scaleY() {
return(_yscale);
}
function set scaleY(y) {
_yscale = y;
//return(scaleY);
}
function doLater(obj, fn) {
if (methodTable == undefined) {
methodTable = new Array();
}
methodTable.push({obj:obj, fn:fn});
onEnterFrame = doLaterDispatcher;
}
function doLaterDispatcher(Void) {
delete onEnterFrame;
if (invalidateFlag) {
redraw();
}
var _local3 = methodTable;
methodTable = new Array();
if (_local3.length > 0) {
var _local2;
while (_local2 = _local3.shift() , _local2 != undefined) {
_local2.obj[_local2.fn]();
}
}
}
function cancelAllDoLaters(Void) {
delete onEnterFrame;
methodTable = new Array();
}
function invalidate(Void) {
invalidateFlag = true;
onEnterFrame = doLaterDispatcher;
}
function invalidateStyle(Void) {
invalidate();
}
function redraw(bAlways) {
if (invalidateFlag || (bAlways)) {
invalidateFlag = false;
var _local2;
for (_local2 in tfList) {
tfList[_local2].draw();
}
draw();
dispatchEvent({type:"draw"});
}
}
function draw(Void) {
}
function move(x, y, noEvent) {
var _local3 = _x;
var _local2 = _y;
_x = x;
_y = y;
if (noEvent != true) {
dispatchEvent({type:"move", oldX:_local3, oldY:_local2});
}
}
function setSize(w, h, noEvent) {
var _local2 = __width;
var _local3 = __height;
__width = w;
__height = h;
size();
if (noEvent != true) {
dispatchEvent({type:"resize", oldWidth:_local2, oldHeight:_local3});
}
}
function size(Void) {
_width = __width;
_height = __height;
}
function drawRect(x1, y1, x2, y2) {
moveTo(x1, y1);
lineTo(x2, y1);
lineTo(x2, y2);
lineTo(x1, y2);
lineTo(x1, y1);
}
function createLabel(name, depth, text) {
createTextField(name, depth, 0, 0, 0, 0);
var _local2 = this[name];
_local2._color = textColorList;
_local2._visible = false;
_local2.__text = text;
if (tfList == undefined) {
tfList = new Object();
}
tfList[name] = _local2;
_local2.invalidateStyle();
invalidate();
_local2.styleName = this;
return(_local2);
}
function createObject(linkageName, id, depth, initobj) {
return(attachMovie(linkageName, id, depth, initobj));
}
function createClassObject(className, id, depth, initobj) {
var _local3 = className.symbolName == undefined;
if (_local3) {
Object.registerClass(className.symbolOwner.symbolName, className);
}
var _local4 = createObject(className.symbolOwner.symbolName, id, depth, initobj);
if (_local3) {
Object.registerClass(className.symbolOwner.symbolName, className.symbolOwner);
}
return(_local4);
}
function createEmptyObject(id, depth) {
return(createClassObject(mx.core.UIObject, id, depth));
}
function destroyObject(id) {
var _local2 = this[id];
if (_local2.getDepth() < 0) {
var _local4 = buildDepthTable();
var _local5 = findNextAvailableDepth(0, _local4, "up");
var _local3 = _local5;
_local2.swapDepths(_local3);
}
_local2.removeMovieClip();
delete this[id];
}
function getSkinIDName(tag) {
return(idNames[tag]);
}
function setSkin(tag, linkageName, initObj) {
if (_global.skinRegistry[linkageName] == undefined) {
mx.skins.SkinElement.registerElement(linkageName, mx.skins.SkinElement);
}
return(createObject(linkageName, getSkinIDName(tag), tag, initObj));
}
function createSkin(tag) {
var _local2 = getSkinIDName(tag);
createEmptyObject(_local2, tag);
return(this[_local2]);
}
function createChildren(Void) {
}
function _createChildren(Void) {
createChildren();
childrenCreated = true;
}
function constructObject(Void) {
if (_name == undefined) {
return(undefined);
}
init();
_createChildren();
createAccessibilityImplementation();
_endInit();
if (validateNow) {
redraw(true);
} else {
invalidate();
}
}
function initFromClipParameters(Void) {
var _local4 = false;
var _local2;
for (_local2 in clipParameters) {
if (hasOwnProperty(_local2)) {
_local4 = true;
this["def_" + _local2] = this[_local2];
delete this[_local2];
}
}
if (_local4) {
for (_local2 in clipParameters) {
var _local3 = this["def_" + _local2];
if (_local3 != undefined) {
this[_local2] = _local3;
}
}
}
}
function init(Void) {
__width = _width;
__height = _height;
if (initProperties == undefined) {
initFromClipParameters();
} else {
initProperties();
}
if (_global.cascadingStyles == true) {
stylecache = new Object();
}
}
function getClassStyleDeclaration(Void) {
var _local4 = this;
var _local3 = className;
while (_local3 != undefined) {
if (ignoreClassStyleDeclaration[_local3] == undefined) {
if (_global.styles[_local3] != undefined) {
return(_global.styles[_local3]);
}
}
_local4 = _local4.__proto__;
_local3 = _local4.className;
}
}
function setColor(color) {
}
function __getTextFormat(tf, bAll) {
var _local8 = stylecache.tf;
if (_local8 != undefined) {
var _local3;
for (_local3 in mx.styles.StyleManager.TextFormatStyleProps) {
if (bAll || (mx.styles.StyleManager.TextFormatStyleProps[_local3])) {
if (tf[_local3] == undefined) {
tf[_local3] = _local8[_local3];
}
}
}
return(false);
}
var _local6 = false;
for (var _local3 in mx.styles.StyleManager.TextFormatStyleProps) {
if (bAll || (mx.styles.StyleManager.TextFormatStyleProps[_local3])) {
if (tf[_local3] == undefined) {
var _local5 = _tf[_local3];
if (_local5 != undefined) {
tf[_local3] = _local5;
} else if ((_local3 == "font") && (fontFamily != undefined)) {
tf[_local3] = fontFamily;
} else if ((_local3 == "size") && (fontSize != undefined)) {
tf[_local3] = fontSize;
} else if ((_local3 == "color") && (color != undefined)) {
tf[_local3] = color;
} else if ((_local3 == "leftMargin") && (marginLeft != undefined)) {
tf[_local3] = marginLeft;
} else if ((_local3 == "rightMargin") && (marginRight != undefined)) {
tf[_local3] = marginRight;
} else if ((_local3 == "italic") && (fontStyle != undefined)) {
tf[_local3] = fontStyle == _local3;
} else if ((_local3 == "bold") && (fontWeight != undefined)) {
tf[_local3] = fontWeight == _local3;
} else if ((_local3 == "align") && (textAlign != undefined)) {
tf[_local3] = textAlign;
} else if ((_local3 == "indent") && (textIndent != undefined)) {
tf[_local3] = textIndent;
} else if ((_local3 == "underline") && (textDecoration != undefined)) {
tf[_local3] = textDecoration == _local3;
} else if ((_local3 == "embedFonts") && (embedFonts != undefined)) {
tf[_local3] = embedFonts;
} else {
_local6 = true;
}
}
}
}
if (_local6) {
var _local9 = styleName;
if (_local9 != undefined) {
if (typeof(_local9) != "string") {
_local6 = _local9.__getTextFormat(tf, true, this);
} else if (_global.styles[_local9] != undefined) {
_local6 = _global.styles[_local9].__getTextFormat(tf, true, this);
}
}
}
if (_local6) {
var _local10 = getClassStyleDeclaration();
if (_local10 != undefined) {
_local6 = _local10.__getTextFormat(tf, true, this);
}
}
if (_local6) {
if (_global.cascadingStyles) {
if (_parent != undefined) {
_local6 = _parent.__getTextFormat(tf, false);
}
}
}
if (_local6) {
_local6 = _global.style.__getTextFormat(tf, true, this);
}
return(_local6);
}
function _getTextFormat(Void) {
var _local2 = stylecache.tf;
if (_local2 != undefined) {
return(_local2);
}
_local2 = new TextFormat();
__getTextFormat(_local2, true);
stylecache.tf = _local2;
if (enabled == false) {
var _local3 = getStyle("disabledColor");
_local2.color = _local3;
}
return(_local2);
}
function getStyleName(Void) {
var _local2 = styleName;
if (_local2 != undefined) {
if (typeof(_local2) != "string") {
return(_local2.getStyleName());
}
return(_local2);
}
if (_parent != undefined) {
return(_parent.getStyleName());
}
return(undefined);
}
function getStyle(styleProp) {
var _local3;
_global.getStyleCounter++;
if (this[styleProp] != undefined) {
return(this[styleProp]);
}
var _local6 = styleName;
if (_local6 != undefined) {
if (typeof(_local6) != "string") {
_local3 = _local6.getStyle(styleProp);
} else {
var _local7 = _global.styles[_local6];
_local3 = _local7.getStyle(styleProp);
}
}
if (_local3 != undefined) {
return(_local3);
}
var _local7 = getClassStyleDeclaration();
if (_local7 != undefined) {
_local3 = _local7[styleProp];
}
if (_local3 != undefined) {
return(_local3);
}
if (_global.cascadingStyles) {
if (mx.styles.StyleManager.isInheritingStyle(styleProp) || (mx.styles.StyleManager.isColorStyle(styleProp))) {
var _local5 = stylecache;
if (_local5 != undefined) {
if (_local5[styleProp] != undefined) {
return(_local5[styleProp]);
}
}
if (_parent != undefined) {
_local3 = _parent.getStyle(styleProp);
} else {
_local3 = _global.style[styleProp];
}
if (_local5 != undefined) {
_local5[styleProp] = _local3;
}
return(_local3);
}
}
if (_local3 == undefined) {
_local3 = _global.style[styleProp];
}
return(_local3);
}
static function mergeClipParameters(o, p) {
for (var _local3 in p) {
o[_local3] = p[_local3];
}
return(true);
}
static var symbolName = "UIObject";
static var symbolOwner = mx.core.UIObject;
static var version = "2.0.2.126";
static var textColorList = {color:1, disabledColor:1};
var invalidateFlag = false;
var lineWidth = 1;
var lineColor = 0;
var tabEnabled = false;
var clipParameters = {visible:1, minHeight:1, minWidth:1, maxHeight:1, maxWidth:1, preferredHeight:1, preferredWidth:1};
}
Symbol 143 MovieClip [__Packages.mx.core.UIComponent] Frame 0
class mx.core.UIComponent extends mx.core.UIObject
{
var __width, __height, invalidate, stylecache, removeEventListener, dispatchEvent, drawFocus, addEventListener, _xscale, _yscale, _focusrect, watch, enabled;
function UIComponent () {
super();
}
function get width() {
return(__width);
}
function get height() {
return(__height);
}
function setVisible(x, noEvent) {
super.setVisible(x, noEvent);
}
function enabledChanged(id, oldValue, newValue) {
setEnabled(newValue);
invalidate();
delete stylecache.tf;
return(newValue);
}
function setEnabled(enabled) {
invalidate();
}
function getFocus() {
var selFocus = Selection.getFocus();
return(((selFocus === null) ? null : (eval (selFocus))));
}
function setFocus() {
Selection.setFocus(this);
}
function getFocusManager() {
var _local2 = this;
while (_local2 != undefined) {
if (_local2.focusManager != undefined) {
return(_local2.focusManager);
}
_local2 = _local2._parent;
}
return(undefined);
}
function onKillFocus(newFocus) {
removeEventListener("keyDown", this);
removeEventListener("keyUp", this);
dispatchEvent({type:"focusOut"});
drawFocus(false);
}
function onSetFocus(oldFocus) {
addEventListener("keyDown", this);
addEventListener("keyUp", this);
dispatchEvent({type:"focusIn"});
if (getFocusManager().bDrawFocus != false) {
drawFocus(true);
}
}
function findFocusInChildren(o) {
if (o.focusTextField != undefined) {
return(o.focusTextField);
}
if (o.tabEnabled == true) {
return(o);
}
return(undefined);
}
function findFocusFromObject(o) {
if (o.tabEnabled != true) {
if (o._parent == undefined) {
return(undefined);
}
if (o._parent.tabEnabled == true) {
o = o._parent;
} else if (o._parent.tabChildren) {
o = findFocusInChildren(o._parent);
} else {
o = findFocusFromObject(o._parent);
}
}
return(o);
}
function pressFocus() {
var _local3 = findFocusFromObject(this);
var _local2 = getFocus();
if (_local3 != _local2) {
_local2.drawFocus(false);
if (getFocusManager().bDrawFocus != false) {
_local3.drawFocus(true);
}
}
}
function releaseFocus() {
var _local2 = findFocusFromObject(this);
if (_local2 != getFocus()) {
_local2.setFocus();
}
}
function isParent(o) {
while (o != undefined) {
if (o == this) {
return(true);
}
o = o._parent;
}
return(false);
}
function size() {
}
function init() {
super.init();
_xscale = 100;
_yscale = 100;
_focusrect = _global.useFocusRect == false;
watch("enabled", enabledChanged);
if (enabled == false) {
setEnabled(false);
}
}
function dispatchValueChangedEvent(value) {
dispatchEvent({type:"valueChanged", value:value});
}
static var symbolName = "UIComponent";
static var symbolOwner = mx.core.UIComponent;
static var version = "2.0.2.126";
static var kStretch = 5000;
var focusEnabled = true;
var tabEnabled = true;
var origBorderStyles = {themeColor:16711680};
var clipParameters = {};
static var mergedClipParameters = mx.core.UIObject.mergeClipParameters(mx.core.UIComponent.prototype.clipParameters, mx.core.UIObject.prototype.clipParameters);
}
Symbol 144 MovieClip [__Packages.mx.controls.SimpleButton] Frame 0
class mx.controls.SimpleButton extends mx.core.UIComponent
{
static var emphasizedStyleDeclaration;
var preset, boundingBox_mc, useHandCursor, skinName, linkLength, iconName, destroyObject, __width, _width, __height, _height, __emphaticStyleName, styleName, enabled, invalidate, pressFocus, dispatchEvent, autoRepeat, interval, getStyle, releaseFocus, createLabel, invalidateStyle;
function SimpleButton () {
super();
}
function init(Void) {
super.init();
if (preset == undefined) {
boundingBox_mc._visible = false;
boundingBox_mc._width = (boundingBox_mc._height = 0);
}
useHandCursor = false;
}
function createChildren(Void) {
if (preset != undefined) {
var _local2 = this[idNames[preset]];
this[refNames[preset]] = _local2;
skinName = _local2;
if (falseOverSkin.length == 0) {
rolloverSkin = fus;
}
if (falseOverIcon.length == 0) {
rolloverIcon = fui;
}
initializing = false;
} else if (__state == true) {
setStateVar(true);
} else {
if (falseOverSkin.length == 0) {
rolloverSkin = fus;
}
if (falseOverIcon.length == 0) {
rolloverIcon = fui;
}
}
}
function setIcon(tag, linkageName) {
return(setSkin(tag + 8, linkageName));
}
function changeIcon(tag, linkageName) {
linkLength = linkageName.length;
var _local2 = stateNames[tag] + "Icon";
this[_local2] = linkageName;
this[idNames[tag + 8]] = _local2;
setStateVar(getState());
}
function changeSkin(tag, linkageName) {
var _local2 = stateNames[tag] + "Skin";
this[_local2] = linkageName;
this[idNames[tag]] = _local2;
setStateVar(getState());
}
function viewIcon(varName) {
var _local4 = varName + "Icon";
var _local3 = this[_local4];
if (typeof(_local3) == "string") {
var _local5 = _local3;
if (__emphasized) {
if (this[_local3 + "Emphasized"].length > 0) {
_local3 = _local3 + "Emphasized";
}
}
if (this[_local3].length == 0) {
return(undefined);
}
_local3 = setIcon(tagMap[_local5], this[_local3]);
if ((_local3 == undefined) && (_global.isLivePreview)) {
_local3 = setIcon(0, "ButtonIcon");
}
this[_local4] = _local3;
}
iconName._visible = false;
iconName = _local3;
iconName._visible = true;
}
function removeIcons() {
var _local3 = 0;
while (_local3 < 2) {
var _local2 = 8;
while (_local2 < 16) {
destroyObject(idNames[_local2]);
this[stateNames[_local2 - 8] + "Icon"] = "";
_local2++;
}
_local3++;
}
refresh();
}
function setSkin(tag, linkageName, initobj) {
var _local3 = super.setSkin(tag, linkageName, ((initobj != undefined) ? (initobj) : ({styleName:this})));
calcSize(tag, _local3);
return(_local3);
}
function calcSize(Void) {
__width = _width;
__height = _height;
}
function viewSkin(varName, initObj) {
var _local3 = varName + "Skin";
var _local2 = this[_local3];
if (typeof(_local2) == "string") {
var _local4 = _local2;
if (__emphasized) {
if (this[_local2 + "Emphasized"].length > 0) {
_local2 = _local2 + "Emphasized";
}
}
if (this[_local2].length == 0) {
return(undefined);
}
_local2 = setSkin(tagMap[_local4], this[_local2], ((initObj != undefined) ? (initObj) : ({styleName:this})));
this[_local3] = _local2;
}
skinName._visible = false;
skinName = _local2;
skinName._visible = true;
}
function showEmphasized(e) {
if (e && (!__emphatic)) {
if (emphasizedStyleDeclaration != undefined) {
__emphaticStyleName = styleName;
styleName = emphasizedStyleDeclaration;
}
__emphatic = true;
} else {
if (__emphatic) {
styleName = __emphaticStyleName;
}
__emphatic = false;
}
}
function refresh(Void) {
var _local2 = getState();
if (enabled == false) {
viewIcon("disabled");
viewSkin("disabled");
} else {
viewSkin(phase);
viewIcon(phase);
}
setView(phase == "down");
iconName.enabled = enabled;
}
function setView(offset) {
if (iconName == undefined) {
return(undefined);
}
var _local2 = (offset ? (btnOffset) : 0);
iconName._x = ((__width - iconName._width) / 2) + _local2;
iconName._y = ((__height - iconName._height) / 2) + _local2;
}
function setStateVar(state) {
if (state) {
if (trueOverSkin.length == 0) {
rolloverSkin = tus;
} else {
rolloverSkin = trs;
}
if (trueOverIcon.length == 0) {
rolloverIcon = tui;
} else {
rolloverIcon = tri;
}
upSkin = tus;
downSkin = tds;
disabledSkin = dts;
upIcon = tui;
downIcon = tdi;
disabledIcon = dti;
} else {
if (falseOverSkin.length == 0) {
rolloverSkin = fus;
} else {
rolloverSkin = frs;
}
if (falseOverIcon.length == 0) {
rolloverIcon = fui;
} else {
rolloverIcon = fri;
}
upSkin = fus;
downSkin = fds;
disabledSkin = dfs;
upIcon = fui;
downIcon = fdi;
disabledIcon = dfi;
}
__state = state;
}
function setState(state) {
if (state != __state) {
setStateVar(state);
invalidate();
}
}
function size(Void) {
refresh();
}
function draw(Void) {
if (initializing) {
initializing = false;
skinName.visible = true;
iconName.visible = true;
}
size();
}
function getState(Void) {
return(__state);
}
function setToggle(val) {
__toggle = val;
if (__toggle == false) {
setState(false);
}
}
function getToggle(Void) {
return(__toggle);
}
function set toggle(val) {
setToggle(val);
//return(toggle);
}
function get toggle() {
return(getToggle());
}
function set value(val) {
setSelected(val);
//return(value);
}
function get value() {
return(getSelected());
}
function set selected(val) {
setSelected(val);
//return(selected);
}
function get selected() {
return(getSelected());
}
function setSelected(val) {
if (__toggle) {
setState(val);
} else {
setState((initializing ? (val) : (__state)));
}
}
function getSelected() {
return(__state);
}
function setEnabled(val) {
if (enabled != val) {
super.setEnabled(val);
invalidate();
}
}
function onPress(Void) {
pressFocus();
phase = "down";
refresh();
dispatchEvent({type:"buttonDown"});
if (autoRepeat) {
interval = setInterval(this, "onPressDelay", getStyle("repeatDelay"));
}
}
function onPressDelay(Void) {
dispatchEvent({type:"buttonDown"});
if (autoRepeat) {
clearInterval(interval);
interval = setInterval(this, "onPressRepeat", getStyle("repeatInterval"));
}
}
function onPressRepeat(Void) {
dispatchEvent({type:"buttonDown"});
updateAfterEvent();
}
function onRelease(Void) {
releaseFocus();
phase = "rollover";
if (interval != undefined) {
clearInterval(interval);
delete interval;
}
if (getToggle()) {
setState(!getState());
} else {
refresh();
}
dispatchEvent({type:"click"});
}
function onDragOut(Void) {
phase = "up";
refresh();
dispatchEvent({type:"buttonDragOut"});
}
function onDragOver(Void) {
if (phase != "up") {
onPress();
return(undefined);
}
phase = "down";
refresh();
}
function onReleaseOutside(Void) {
releaseFocus();
phase = "up";
if (interval != undefined) {
clearInterval(interval);
delete interval;
}
}
function onRollOver(Void) {
phase = "rollover";
refresh();
}
function onRollOut(Void) {
phase = "up";
refresh();
}
function getLabel(Void) {
return(fui.text);
}
function setLabel(val) {
if (typeof(fui) == "string") {
createLabel("fui", 8, val);
fui.styleName = this;
} else {
fui.text = val;
}
var _local4 = fui._getTextFormat();
var _local2 = _local4.getTextExtent2(val);
fui._width = _local2.width + 5;
fui._height = _local2.height + 5;
iconName = fui;
setView(__state);
}
function get emphasized() {
return(__emphasized);
}
function set emphasized(val) {
__emphasized = val;
var _local2 = 0;
while (_local2 < 8) {
this[idNames[_local2]] = stateNames[_local2] + "Skin";
if (typeof(this[idNames[_local2 + 8]]) == "movieclip") {
this[idNames[_local2 + 8]] = stateNames[_local2] + "Icon";
}
_local2++;
}
showEmphasized(__emphasized);
setStateVar(__state);
invalidateStyle();
//return(emphasized);
}
function keyDown(e) {
if (e.code == 32) {
onPress();
}
}
function keyUp(e) {
if (e.code == 32) {
onRelease();
}
}
function onKillFocus(newFocus) {
super.onKillFocus();
if (phase != "up") {
phase = "up";
refresh();
}
}
static var symbolName = "SimpleButton";
static var symbolOwner = mx.controls.SimpleButton;
static var version = "2.0.2.126";
var className = "SimpleButton";
var style3dInset = 4;
var btnOffset = 1;
var __toggle = false;
var __state = false;
var __emphasized = false;
var __emphatic = false;
static var falseUp = 0;
static var falseDown = 1;
static var falseOver = 2;
static var falseDisabled = 3;
static var trueUp = 4;
static var trueDown = 5;
static var trueOver = 6;
static var trueDisabled = 7;
var falseUpSkin = "SimpleButtonUp";
var falseDownSkin = "SimpleButtonIn";
var falseOverSkin = "";
var falseDisabledSkin = "SimpleButtonUp";
var trueUpSkin = "SimpleButtonIn";
var trueDownSkin = "";
var trueOverSkin = "";
var trueDisabledSkin = "SimpleButtonIn";
var falseUpIcon = "";
var falseDownIcon = "";
var falseOverIcon = "";
var falseDisabledIcon = "";
var trueUpIcon = "";
var trueDownIcon = "";
var trueOverIcon = "";
var trueDisabledIcon = "";
var phase = "up";
var fui = "falseUpIcon";
var fus = "falseUpSkin";
var fdi = "falseDownIcon";
var fds = "falseDownSkin";
var frs = "falseOverSkin";
var fri = "falseOverIcon";
var dfi = "falseDisabledIcon";
var dfs = "falseDisabledSkin";
var tui = "trueUpIcon";
var tus = "trueUpSkin";
var tdi = "trueDownIcon";
var tds = "trueDownSkin";
var trs = "trueOverSkin";
var tri = "trueOverIcon";
var dts = "trueDisabledSkin";
var dti = "trueDisabledIcon";
var rolloverSkin = mx.controls.SimpleButton.prototype.frs;
var rolloverIcon = mx.controls.SimpleButton.prototype.fri;
var upSkin = mx.controls.SimpleButton.prototype.fus;
var downSkin = mx.controls.SimpleButton.prototype.fds;
var disabledSkin = mx.controls.SimpleButton.prototype.dfs;
var upIcon = mx.controls.SimpleButton.prototype.fui;
var downIcon = mx.controls.SimpleButton.prototype.fdi;
var disabledIcon = mx.controls.SimpleButton.prototype.dfi;
var initializing = true;
var idNames = ["fus", "fds", "frs", "dfs", "tus", "tds", "trs", "dts", "fui", "fdi", "fri", "dfi", "tui", "tdi", "tri", "dti"];
var stateNames = ["falseUp", "falseDown", "falseOver", "falseDisabled", "trueUp", "trueDown", "trueOver", "trueDisabled"];
var refNames = ["upSkin", "downSkin", "rolloverSkin", "disabledSkin"];
var tagMap = {falseUpSkin:0, falseDownSkin:1, falseOverSkin:2, falseDisabledSkin:3, trueUpSkin:4, trueDownSkin:5, trueOverSkin:6, trueDisabledSkin:7, falseUpIcon:0, falseDownIcon:1, falseOverIcon:2, falseDisabledIcon:3, trueUpIcon:4, trueDownIcon:5, trueOverIcon:6, trueDisabledIcon:7};
}
Symbol 145 MovieClip [__Packages.mx.controls.Button] Frame 0
class mx.controls.Button extends mx.controls.SimpleButton
{
var initializing, labelPath, initIcon, getState, enabled, phase, idNames, __width, __height, setState, invalidate, iconName, refresh, createLabel, _iconLinkageName, removeIcons, hitArea_mc, createEmptyObject;
function Button () {
super();
}
function init(Void) {
super.init();
}
function draw() {
if (initializing) {
labelPath.visible = true;
}
super.draw();
if (initIcon != undefined) {
_setIcon(initIcon);
}
delete initIcon;
}
function onRelease(Void) {
super.onRelease();
}
function createChildren(Void) {
super.createChildren();
}
function setSkin(tag, linkageName, initobj) {
return(super.setSkin(tag, linkageName, initobj));
}
function viewSkin(varName) {
var _local3 = (getState() ? "true" : "false");
_local3 = _local3 + (enabled ? (phase) : "disabled");
super.viewSkin(varName, {styleName:this, borderStyle:_local3});
}
function invalidateStyle(c) {
labelPath.invalidateStyle(c);
super.invalidateStyle(c);
}
function setColor(c) {
var _local2 = 0;
while (_local2 < 8) {
this[idNames[_local2]].redraw(true);
_local2++;
}
}
function setEnabled(enable) {
labelPath.enabled = enable;
super.setEnabled(enable);
}
function calcSize(tag, ref) {
if ((__width == undefined) || (__height == undefined)) {
return(undefined);
}
if (tag < 7) {
ref.setSize(__width, __height, true);
}
}
function size(Void) {
setState(getState());
setHitArea(__width, __height);
var _local3 = 0;
while (_local3 < 8) {
var _local4 = idNames[_local3];
if (typeof(this[_local4]) == "movieclip") {
this[_local4].setSize(__width, __height, true);
}
_local3++;
}
super.size();
}
function set labelPlacement(val) {
__labelPlacement = val;
invalidate();
//return(labelPlacement);
}
function get labelPlacement() {
return(__labelPlacement);
}
function getLabelPlacement(Void) {
return(__labelPlacement);
}
function setLabelPlacement(val) {
__labelPlacement = val;
invalidate();
}
function getBtnOffset(Void) {
if (getState()) {
var _local2 = btnOffset;
} else if (phase == "down") {
var _local2 = btnOffset;
} else {
var _local2 = 0;
}
return(_local2);
}
function setView(offset) {
var _local16 = (offset ? (btnOffset) : 0);
var _local12 = getLabelPlacement();
var _local7 = 0;
var _local6 = 0;
var _local9 = 0;
var _local8 = 0;
var _local5 = 0;
var _local4 = 0;
var _local3 = labelPath;
var _local2 = iconName;
var _local15 = _local3.textWidth;
var _local14 = _local3.textHeight;
var _local10 = (__width - borderW) - borderW;
var _local11 = (__height - borderW) - borderW;
if (_local2 != undefined) {
_local7 = _local2._width;
_local6 = _local2._height;
}
if ((_local12 == "left") || (_local12 == "right")) {
if (_local3 != undefined) {
_local9 = Math.min(_local10 - _local7, _local15 + 5);
_local3._width = _local9;
_local8 = Math.min(_local11, _local14 + 5);
_local3._height = _local8;
}
if (_local12 == "right") {
_local5 = _local7;
if (centerContent) {
_local5 = _local5 + (((_local10 - _local9) - _local7) / 2);
}
_local2._x = _local5 - _local7;
} else {
_local5 = (_local10 - _local9) - _local7;
if (centerContent) {
_local5 = _local5 / 2;
}
_local2._x = _local5 + _local9;
}
_local4 = 0;
_local2._y = _local4;
if (centerContent) {
_local2._y = (_local11 - _local6) / 2;
_local4 = (_local11 - _local8) / 2;
}
if (!centerContent) {
_local2._y = _local2._y + Math.max(0, (_local8 - _local6) / 2);
}
} else {
if (_local3 != undefined) {
_local9 = Math.min(_local10, _local15 + 5);
_local3._width = _local9;
_local8 = Math.min(_local11 - _local6, _local14 + 5);
_local3._height = _local8;
}
_local5 = (_local10 - _local9) / 2;
_local2._x = (_local10 - _local7) / 2;
if (_local12 == "top") {
_local4 = (_local11 - _local8) - _local6;
if (centerContent) {
_local4 = _local4 / 2;
}
_local2._y = _local4 + _local8;
} else {
_local4 = _local6;
if (centerContent) {
_local4 = _local4 + (((_local11 - _local8) - _local6) / 2);
}
_local2._y = _local4 - _local6;
}
}
var _local13 = borderW + _local16;
_local3._x = _local5 + _local13;
_local3._y = _local4 + _local13;
_local2._x = _local2._x + _local13;
_local2._y = _local2._y + _local13;
}
function set label(lbl) {
setLabel(lbl);
//return(label);
}
function setLabel(label) {
if (label == "") {
labelPath.removeTextField();
refresh();
return(undefined);
}
if (labelPath == undefined) {
var _local2 = createLabel("labelPath", 200, label);
_local2._width = _local2.textWidth + 5;
_local2._height = _local2.textHeight + 5;
if (initializing) {
_local2.visible = false;
}
} else {
delete labelPath.__text;
labelPath.text = label;
refresh();
}
}
function getLabel(Void) {
return(((labelPath.__text != undefined) ? (labelPath.__text) : (labelPath.text)));
}
function get label() {
return(getLabel());
}
function _getIcon(Void) {
return(_iconLinkageName);
}
function get icon() {
if (initializing) {
return(initIcon);
}
return(_iconLinkageName);
}
function _setIcon(linkage) {
if (initializing) {
if (linkage == "") {
return(undefined);
}
initIcon = linkage;
} else {
if (linkage == "") {
removeIcons();
return(undefined);
}
super.changeIcon(0, linkage);
super.changeIcon(1, linkage);
super.changeIcon(3, linkage);
super.changeIcon(4, linkage);
super.changeIcon(5, linkage);
_iconLinkageName = linkage;
refresh();
}
}
function set icon(linkage) {
_setIcon(linkage);
//return(icon);
}
function setHitArea(w, h) {
if (hitArea_mc == undefined) {
createEmptyObject("hitArea_mc", 100);
}
var _local2 = hitArea_mc;
_local2.clear();
_local2.beginFill(16711680);
_local2.drawRect(0, 0, w, h);
_local2.endFill();
_local2.setVisible(false);
}
static var symbolName = "Button";
static var symbolOwner = mx.controls.Button;
var className = "Button";
static var version = "2.0.2.126";
var btnOffset = 0;
var _color = "buttonColor";
var __label = "default value";
var __labelPlacement = "right";
var falseUpSkin = "ButtonSkin";
var falseDownSkin = "ButtonSkin";
var falseOverSkin = "ButtonSkin";
var falseDisabledSkin = "ButtonSkin";
var trueUpSkin = "ButtonSkin";
var trueDownSkin = "ButtonSkin";
var trueOverSkin = "ButtonSkin";
var trueDisabledSkin = "ButtonSkin";
var falseUpIcon = "";
var falseDownIcon = "";
var falseOverIcon = "";
var falseDisabledIcon = "";
var trueUpIcon = "";
var trueDownIcon = "";
var trueOverIcon = "";
var trueDisabledIcon = "";
var clipParameters = {labelPlacement:1, icon:1, toggle:1, selected:1, label:1};
static var mergedClipParameters = mx.core.UIObject.mergeClipParameters(mx.controls.Button.prototype.clipParameters, mx.controls.SimpleButton.prototype.clipParameters);
var centerContent = true;
var borderW = 1;
}
Symbol 146 MovieClip [__Packages.mx.controls.CheckBox] Frame 0
class mx.controls.CheckBox extends mx.controls.Button
{
var _getTextFormat, labelPath, iconName;
function CheckBox () {
super();
}
function onRelease() {
super.onRelease();
}
function init() {
super.init();
}
function size() {
super.size();
}
function get emphasized() {
return(undefined);
}
function calcPreferredHeight() {
var _local5 = _getTextFormat();
var _local3 = _local5.getTextExtent2(labelPath.text).height;
var _local4 = iconName._height;
var _local2 = 0;
if ((__labelPlacement == "left") || (__labelPlacement == "right")) {
_local2 = Math.max(_local3, _local4);
} else {
_local2 = _local3 + _local4;
}
return(Math.max(14, _local2));
}
function set toggle(v) {
//return(toggle);
}
function get toggle() {
}
function set icon(v) {
//return(icon);
}
function get icon() {
}
static var symbolName = "CheckBox";
static var symbolOwner = mx.controls.CheckBox;
static var version = "2.0.2.126";
var className = "CheckBox";
var ignoreClassStyleDeclaration = {Button:1};
var btnOffset = 0;
var __toggle = true;
var __selected = false;
var __labelPlacement = "right";
var __label = "CheckBox";
var falseUpSkin = "";
var falseDownSkin = "";
var falseOverSkin = "";
var falseDisabledSkin = "";
var trueUpSkin = "";
var trueDownSkin = "";
var trueOverSkin = "";
var trueDisabledSkin = "";
var falseUpIcon = "CheckFalseUp";
var falseDownIcon = "CheckFalseDown";
var falseOverIcon = "CheckFalseOver";
var falseDisabledIcon = "CheckFalseDisabled";
var trueUpIcon = "CheckTrueUp";
var trueDownIcon = "CheckTrueDown";
var trueOverIcon = "CheckTrueOver";
var trueDisabledIcon = "CheckTrueDisabled";
var clipParameters = {label:1, labelPlacement:1, selected:1};
static var mergedClipParameters = mx.core.UIObject.mergeClipParameters(mx.controls.CheckBox.prototype.clipParameters, mx.controls.Button.prototype.clipParameters);
var centerContent = false;
var borderW = 0;
}
Symbol 192 MovieClip [__Packages.mx.skins.SkinElement] Frame 0
class mx.skins.SkinElement extends MovieClip
{
var _visible, _x, _y, _width, _height;
function SkinElement () {
super();
}
static function registerElement(name, className) {
Object.registerClass(name, ((className == undefined) ? (mx.skins.SkinElement) : (className)));
_global.skinRegistry[name] = true;
}
function __set__visible(visible) {
_visible = visible;
}
function move(x, y) {
_x = x;
_y = y;
}
function setSize(w, h) {
_width = w;
_height = h;
}
}
Symbol 193 MovieClip [__Packages.mx.styles.CSSTextStyles] Frame 0
class mx.styles.CSSTextStyles
{
function CSSTextStyles () {
}
static function addTextStyles(o, bColor) {
o.addProperty("textAlign", function () {
return(this._tf.align);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.align = x;
});
o.addProperty("fontWeight", function () {
return(((this._tf.bold != undefined) ? ((this._tf.bold ? "bold" : "none")) : undefined));
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.bold = x == "bold";
});
if (bColor) {
o.addProperty("color", function () {
return(this._tf.color);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.color = x;
});
}
o.addProperty("fontFamily", function () {
return(this._tf.font);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.font = x;
});
o.addProperty("textIndent", function () {
return(this._tf.indent);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.indent = x;
});
o.addProperty("fontStyle", function () {
return(((this._tf.italic != undefined) ? ((this._tf.italic ? "italic" : "none")) : undefined));
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.italic = x == "italic";
});
o.addProperty("marginLeft", function () {
return(this._tf.leftMargin);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.leftMargin = x;
});
o.addProperty("marginRight", function () {
return(this._tf.rightMargin);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.rightMargin = x;
});
o.addProperty("fontSize", function () {
return(this._tf.size);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.size = x;
});
o.addProperty("textDecoration", function () {
return(((this._tf.underline != undefined) ? ((this._tf.underline ? "underline" : "none")) : undefined));
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.underline = x == "underline";
});
o.addProperty("embedFonts", function () {
return(this._tf.embedFonts);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.embedFonts = x;
});
}
}
Symbol 194 MovieClip [__Packages.mx.styles.StyleManager] Frame 0
class mx.styles.StyleManager
{
function StyleManager () {
}
static function registerInheritingStyle(styleName) {
inheritingStyles[styleName] = true;
}
static function isInheritingStyle(styleName) {
return(inheritingStyles[styleName] == true);
}
static function registerColorStyle(styleName) {
colorStyles[styleName] = true;
}
static function isColorStyle(styleName) {
return(colorStyles[styleName] == true);
}
static function registerColorName(colorName, colorValue) {
colorNames[colorName] = colorValue;
}
static function isColorName(colorName) {
return(colorNames[colorName] != undefined);
}
static function getColorName(colorName) {
return(colorNames[colorName]);
}
static var inheritingStyles = {color:true, direction:true, fontFamily:true, fontSize:true, fontStyle:true, fontWeight:true, textAlign:true, textIndent:true};
static var colorStyles = {barColor:true, trackColor:true, borderColor:true, buttonColor:true, color:true, dateHeaderColor:true, dateRollOverColor:true, disabledColor:true, fillColor:true, highlightColor:true, scrollTrackColor:true, selectedDateColor:true, shadowColor:true, strokeColor:true, symbolBackgroundColor:true, symbolBackgroundDisabledColor:true, symbolBackgroundPressedColor:true, symbolColor:true, symbolDisabledColor:true, themeColor:true, todayIndicatorColor:true, shadowCapColor:true, borderCapColor:true, focusColor:true};
static var colorNames = {black:0, white:16777215, red:16711680, green:65280, blue:255, magenta:16711935, yellow:16776960, cyan:65535, haloGreen:8453965, haloBlue:2881013, haloOrange:16761344};
static var TextFormatStyleProps = {font:true, size:true, color:true, leftMargin:false, rightMargin:false, italic:true, bold:true, align:true, indent:true, underline:false, embedFonts:false};
static var TextStyleMap = {textAlign:true, fontWeight:true, color:true, fontFamily:true, textIndent:true, fontStyle:true, lineHeight:true, marginLeft:true, marginRight:true, fontSize:true, textDecoration:true, embedFonts:true};
}
Symbol 195 MovieClip [__Packages.mx.styles.CSSStyleDeclaration] Frame 0
class mx.styles.CSSStyleDeclaration
{
var _tf;
function CSSStyleDeclaration () {
}
function __getTextFormat(tf, bAll) {
var _local5 = false;
if (_tf != undefined) {
var _local2;
for (_local2 in mx.styles.StyleManager.TextFormatStyleProps) {
if (bAll || (mx.styles.StyleManager.TextFormatStyleProps[_local2])) {
if (tf[_local2] == undefined) {
var _local3 = _tf[_local2];
if (_local3 != undefined) {
tf[_local2] = _local3;
} else {
_local5 = true;
}
}
}
}
} else {
_local5 = true;
}
return(_local5);
}
function getStyle(styleProp) {
var _local2 = this[styleProp];
var _local3 = mx.styles.StyleManager.getColorName(_local2);
return(((_local3 == undefined) ? (_local2) : (_local3)));
}
static function classConstruct() {
mx.styles.CSSTextStyles.addTextStyles(mx.styles.CSSStyleDeclaration.prototype, true);
return(true);
}
static var classConstructed = classConstruct();
static var CSSTextStylesDependency = mx.styles.CSSTextStyles;
}
Symbol 196 MovieClip [__Packages.mx.events.EventDispatcher] Frame 0
class mx.events.EventDispatcher
{
function EventDispatcher () {
}
static function _removeEventListener(queue, event, handler) {
if (queue != undefined) {
var _local4 = queue.length;
var _local1;
_local1 = 0;
while (_local1 < _local4) {
var _local2 = queue[_local1];
if (_local2 == handler) {
queue.splice(_local1, 1);
return(undefined);
}
_local1++;
}
}
}
static function initialize(object) {
if (_fEventDispatcher == undefined) {
_fEventDispatcher = new mx.events.EventDispatcher();
}
object.addEventListener = _fEventDispatcher.addEventListener;
object.removeEventListener = _fEventDispatcher.removeEventListener;
object.dispatchEvent = _fEventDispatcher.dispatchEvent;
object.dispatchQueue = _fEventDispatcher.dispatchQueue;
}
function dispatchQueue(queueObj, eventObj) {
var _local7 = "__q_" + eventObj.type;
var _local4 = queueObj[_local7];
if (_local4 != undefined) {
var _local5;
for (_local5 in _local4) {
var _local1 = _local4[_local5];
var _local3 = typeof(_local1);
if ((_local3 == "object") || (_local3 == "movieclip")) {
if (_local1.handleEvent != undefined) {
_local1.handleEvent(eventObj);
}
if (_local1[eventObj.type] != undefined) {
if (exceptions[eventObj.type] == undefined) {
_local1[eventObj.type](eventObj);
}
}
} else {
_local1.apply(queueObj, [eventObj]);
}
}
}
}
function dispatchEvent(eventObj) {
if (eventObj.target == undefined) {
eventObj.target = this;
}
this[eventObj.type + "Handler"](eventObj);
dispatchQueue(this, eventObj);
}
function addEventListener(event, handler) {
var _local3 = "__q_" + event;
if (this[_local3] == undefined) {
this[_local3] = new Array();
}
_global.ASSetPropFlags(this, _local3, 1);
_removeEventListener(this[_local3], event, handler);
this[_local3].push(handler);
}
function removeEventListener(event, handler) {
var _local2 = "__q_" + event;
_removeEventListener(this[_local2], event, handler);
}
static var _fEventDispatcher = undefined;
static var exceptions = {move:1, draw:1, load:1};
}
Symbol 197 MovieClip [__Packages.mx.events.UIEventDispatcher] Frame 0
class mx.events.UIEventDispatcher extends mx.events.EventDispatcher
{
var dispatchQueue, owner, __sentLoadEvent, __origAddEventListener;
function UIEventDispatcher () {
super();
}
static function addKeyEvents(obj) {
if (obj.keyHandler == undefined) {
var _local1 = (obj.keyHandler = new Object());
_local1.owner = obj;
_local1.onKeyDown = _fEventDispatcher.onKeyDown;
_local1.onKeyUp = _fEventDispatcher.onKeyUp;
}
Key.addListener(obj.keyHandler);
}
static function removeKeyEvents(obj) {
Key.removeListener(obj.keyHandler);
}
static function addLoadEvents(obj) {
if (obj.onLoad == undefined) {
obj.onLoad = _fEventDispatcher.onLoad;
obj.onUnload = _fEventDispatcher.onUnload;
if (obj.getBytesTotal() == obj.getBytesLoaded()) {
obj.doLater(obj, "onLoad");
}
}
}
static function removeLoadEvents(obj) {
delete obj.onLoad;
delete obj.onUnload;
}
static function initialize(obj) {
if (_fEventDispatcher == undefined) {
_fEventDispatcher = new mx.events.UIEventDispatcher();
}
obj.addEventListener = _fEventDispatcher.__addEventListener;
obj.__origAddEventListener = _fEventDispatcher.addEventListener;
obj.removeEventListener = _fEventDispatcher.removeEventListener;
obj.dispatchEvent = _fEventDispatcher.dispatchEvent;
obj.dispatchQueue = _fEventDispatcher.dispatchQueue;
}
function dispatchEvent(eventObj) {
if (eventObj.target == undefined) {
eventObj.target = this;
}
this[eventObj.type + "Handler"](eventObj);
dispatchQueue(mx.events.EventDispatcher, eventObj);
dispatchQueue(this, eventObj);
}
function onKeyDown(Void) {
owner.dispatchEvent({type:"keyDown", code:Key.getCode(), ascii:Key.getAscii(), shiftKey:Key.isDown(16), ctrlKey:Key.isDown(17)});
}
function onKeyUp(Void) {
owner.dispatchEvent({type:"keyUp", code:Key.getCode(), ascii:Key.getAscii(), shiftKey:Key.isDown(16), ctrlKey:Key.isDown(17)});
}
function onLoad(Void) {
if (__sentLoadEvent != true) {
dispatchEvent({type:"load"});
}
__sentLoadEvent = true;
}
function onUnload(Void) {
dispatchEvent({type:"unload"});
}
function __addEventListener(event, handler) {
__origAddEventListener(event, handler);
var _local3 = lowLevelEvents;
for (var _local5 in _local3) {
if (mx.events.UIEventDispatcher[_local5][event] != undefined) {
var _local2 = _local3[_local5][0];
mx.events.UIEventDispatcher[_local2](this);
}
}
}
function removeEventListener(event, handler) {
var _local6 = "__q_" + event;
mx.events.EventDispatcher._removeEventListener(this[_local6], event, handler);
if (this[_local6].length == 0) {
var _local2 = lowLevelEvents;
for (var _local5 in _local2) {
if (mx.events.UIEventDispatcher[_local5][event] != undefined) {
var _local3 = _local2[_local5][1];
mx.events.UIEventDispatcher[_local2[_local5][1]](this);
}
}
}
}
static var keyEvents = {keyDown:1, keyUp:1};
static var loadEvents = {load:1, unload:1};
static var lowLevelEvents = {keyEvents:["addKeyEvents", "removeKeyEvents"], loadEvents:["addLoadEvents", "removeLoadEvents"]};
static var _fEventDispatcher = undefined;
}
Symbol 198 MovieClip [__Packages.mx.skins.ColoredSkinElement] Frame 0
class mx.skins.ColoredSkinElement
{
var getStyle, _color, onEnterFrame;
function ColoredSkinElement () {
}
function setColor(c) {
if (c != undefined) {
var _local2 = new Color(this);
_local2.setRGB(c);
}
}
function draw(Void) {
setColor(getStyle(_color));
onEnterFrame = undefined;
}
function invalidateStyle(Void) {
onEnterFrame = draw;
}
static function setColorStyle(p, colorStyle) {
if (p._color == undefined) {
p._color = colorStyle;
}
p.setColor = mixins.setColor;
p.invalidateStyle = mixins.invalidateStyle;
p.draw = mixins.draw;
p.setColor(p.getStyle(colorStyle));
}
static var mixins = new mx.skins.ColoredSkinElement();
}
Symbol 199 MovieClip [__Packages.mx.core.ext.UIObjectExtensions] Frame 0
class mx.core.ext.UIObjectExtensions
{
function UIObjectExtensions () {
}
static function addGeometry(tf, ui) {
tf.addProperty("width", ui.__get__width, null);
tf.addProperty("height", ui.__get__height, null);
tf.addProperty("left", ui.__get__left, null);
tf.addProperty("x", ui.__get__x, null);
tf.addProperty("top", ui.__get__top, null);
tf.addProperty("y", ui.__get__y, null);
tf.addProperty("right", ui.__get__right, null);
tf.addProperty("bottom", ui.__get__bottom, null);
tf.addProperty("visible", ui.__get__visible, ui.__set__visible);
}
static function Extensions() {
if (bExtended == true) {
return(true);
}
bExtended = true;
var _local6 = mx.core.UIObject.prototype;
var _local9 = mx.skins.SkinElement.prototype;
addGeometry(_local9, _local6);
mx.events.UIEventDispatcher.initialize(_local6);
var _local13 = mx.skins.ColoredSkinElement;
mx.styles.CSSTextStyles.addTextStyles(_local6);
var _local5 = MovieClip.prototype;
_local5.getTopLevel = _local6.getTopLevel;
_local5.createLabel = _local6.createLabel;
_local5.createObject = _local6.createObject;
_local5.createClassObject = _local6.createClassObject;
_local5.createEmptyObject = _local6.createEmptyObject;
_local5.destroyObject = _local6.destroyObject;
_global.ASSetPropFlags(_local5, "getTopLevel", 1);
_global.ASSetPropFlags(_local5, "createLabel", 1);
_global.ASSetPropFlags(_local5, "createObject", 1);
_global.ASSetPropFlags(_local5, "createClassObject", 1);
_global.ASSetPropFlags(_local5, "createEmptyObject", 1);
_global.ASSetPropFlags(_local5, "destroyObject", 1);
_local5.__getTextFormat = _local6.__getTextFormat;
_local5._getTextFormat = _local6._getTextFormat;
_local5.getStyleName = _local6.getStyleName;
_local5.getStyle = _local6.getStyle;
_global.ASSetPropFlags(_local5, "__getTextFormat", 1);
_global.ASSetPropFlags(_local5, "_getTextFormat", 1);
_global.ASSetPropFlags(_local5, "getStyleName", 1);
_global.ASSetPropFlags(_local5, "getStyle", 1);
var _local7 = TextField.prototype;
addGeometry(_local7, _local6);
_local7.addProperty("enabled", function () {
return(this.__enabled);
}, function (x) {
this.__enabled = x;
this.invalidateStyle();
});
_local7.move = _local9.move;
_local7.setSize = _local9.setSize;
_local7.invalidateStyle = function () {
this.invalidateFlag = true;
};
_local7.draw = function () {
if (this.invalidateFlag) {
this.invalidateFlag = false;
var _local2 = this._getTextFormat();
this.setTextFormat(_local2);
this.setNewTextFormat(_local2);
this.embedFonts = _local2.embedFonts == true;
if (this.__text != undefined) {
if (this.text == "") {
this.text = this.__text;
}
delete this.__text;
}
this._visible = true;
}
};
_local7.setColor = function (color) {
this.textColor = color;
};
_local7.getStyle = _local5.getStyle;
_local7.__getTextFormat = _local6.__getTextFormat;
_local7.setValue = function (v) {
this.text = v;
};
_local7.getValue = function () {
return(this.text);
};
_local7.addProperty("value", function () {
return(this.getValue());
}, function (v) {
this.setValue(v);
});
_local7._getTextFormat = function () {
var _local2 = this.stylecache.tf;
if (_local2 != undefined) {
return(_local2);
}
_local2 = new TextFormat();
this.__getTextFormat(_local2);
this.stylecache.tf = _local2;
if (this.__enabled == false) {
if (this.enabledColor == undefined) {
var _local4 = this.getTextFormat();
this.enabledColor = _local4.color;
}
var _local3 = this.getStyle("disabledColor");
_local2.color = _local3;
} else if (this.enabledColor != undefined) {
if (_local2.color == undefined) {
_local2.color = this.enabledColor;
}
}
return(_local2);
};
_local7.getPreferredWidth = function () {
this.draw();
return(this.textWidth + 4);
};
_local7.getPreferredHeight = function () {
this.draw();
return(this.textHeight + 4);
};
TextFormat.prototype.getTextExtent2 = function (s) {
var _local3 = _root._getTextExtent;
if (_local3 == undefined) {
_root.createTextField("_getTextExtent", -2, 0, 0, 1000, 100);
_local3 = _root._getTextExtent;
_local3._visible = false;
}
_root._getTextExtent.text = s;
var _local4 = this.align;
this.align = "left";
_root._getTextExtent.setTextFormat(this);
this.align = _local4;
return({width:_local3.textWidth, height:_local3.textHeight});
};
if (_global.style == undefined) {
_global.style = new mx.styles.CSSStyleDeclaration();
_global.cascadingStyles = true;
_global.styles = new Object();
_global.skinRegistry = new Object();
if (_global._origWidth == undefined) {
_global.origWidth = Stage.width;
_global.origHeight = Stage.height;
}
}
var _local4 = _root;
while (_local4._parent != undefined) {
_local4 = _local4._parent;
}
_local4.addProperty("width", function () {
return(Stage.width);
}, null);
_local4.addProperty("height", function () {
return(Stage.height);
}, null);
_global.ASSetPropFlags(_local4, "width", 1);
_global.ASSetPropFlags(_local4, "height", 1);
return(true);
}
static var bExtended = false;
static var UIObjectExtended = Extensions();
static var UIObjectDependency = mx.core.UIObject;
static var SkinElementDependency = mx.skins.SkinElement;
static var CSSTextStylesDependency = mx.styles.CSSTextStyles;
static var UIEventDispatcherDependency = mx.events.UIEventDispatcher;
}
Symbol 200 MovieClip [__Packages.mx.skins.halo.Defaults] Frame 0
class mx.skins.halo.Defaults
{
var beginGradientFill, beginFill, moveTo, lineTo, curveTo, endFill;
function Defaults () {
}
static function setThemeDefaults() {
var _local2 = _global.style;
_local2.themeColor = 8453965 /* 0x80FF4D */;
_local2.disabledColor = 8684164 /* 0x848284 */;
_local2.modalTransparency = 0;
_local2.filled = true;
_local2.stroked = true;
_local2.strokeWidth = 1;
_local2.strokeColor = 0;
_local2.fillColor = 16777215 /* 0xFFFFFF */;
_local2.repeatInterval = 35;
_local2.repeatDelay = 500;
_local2.fontFamily = "_sans";
_local2.fontSize = 12;
_local2.selectionColor = 13500353 /* 0xCDFFC1 */;
_local2.rollOverColor = 14942166 /* 0xE3FFD6 */;
_local2.useRollOver = true;
_local2.backgroundDisabledColor = 14540253 /* 0xDDDDDD */;
_local2.selectionDisabledColor = 14540253 /* 0xDDDDDD */;
_local2.selectionDuration = 200;
_local2.openDuration = 250;
_local2.borderStyle = "inset";
_local2.color = 734012 /* 0x0B333C */;
_local2.textSelectedColor = 24371;
_local2.textRollOverColor = 2831164 /* 0x2B333C */;
_local2.textDisabledColor = 16777215 /* 0xFFFFFF */;
_local2.vGridLines = true;
_local2.hGridLines = false;
_local2.vGridLineColor = 6710886 /* 0x666666 */;
_local2.hGridLineColor = 6710886 /* 0x666666 */;
_local2.headerColor = 15395562 /* 0xEAEAEA */;
_local2.indentation = 17;
_local2.folderOpenIcon = "TreeFolderOpen";
_local2.folderClosedIcon = "TreeFolderClosed";
_local2.defaultLeafIcon = "TreeNodeIcon";
_local2.disclosureOpenIcon = "TreeDisclosureOpen";
_local2.disclosureClosedIcon = "TreeDisclosureClosed";
_local2.popupDuration = 150;
_local2.todayColor = 6710886 /* 0x666666 */;
_local2 = (_global.styles.ScrollSelectList = new mx.styles.CSSStyleDeclaration());
_local2.backgroundColor = 16777215 /* 0xFFFFFF */;
_local2.borderColor = 13290186 /* 0xCACACA */;
_local2.borderStyle = "inset";
_local2 = (_global.styles.ComboBox = new mx.styles.CSSStyleDeclaration());
_local2.borderStyle = "inset";
_local2 = (_global.styles.NumericStepper = new mx.styles.CSSStyleDeclaration());
_local2.textAlign = "center";
_local2 = (_global.styles.RectBorder = new mx.styles.CSSStyleDeclaration());
_local2.borderColor = 14015965 /* 0xD5DDDD */;
_local2.buttonColor = 7305079 /* 0x6F7777 */;
_local2.shadowColor = 15658734 /* 0xEEEEEE */;
_local2.highlightColor = 12897484 /* 0xC4CCCC */;
_local2.shadowCapColor = 14015965 /* 0xD5DDDD */;
_local2.borderCapColor = 9542041 /* 0x919999 */;
var _local4 = new Object();
_local4.borderColor = 16711680 /* 0xFF0000 */;
_local4.buttonColor = 16711680 /* 0xFF0000 */;
_local4.shadowColor = 16711680 /* 0xFF0000 */;
_local4.highlightColor = 16711680 /* 0xFF0000 */;
_local4.shadowCapColor = 16711680 /* 0xFF0000 */;
_local4.borderCapColor = 16711680 /* 0xFF0000 */;
mx.core.UIComponent.prototype.origBorderStyles = _local4;
var _local3;
_local3 = (_global.styles.TextInput = new mx.styles.CSSStyleDeclaration());
_local3.backgroundColor = 16777215 /* 0xFFFFFF */;
_local3.borderStyle = "inset";
_global.styles.TextArea = _global.styles.TextInput;
_local3 = (_global.styles.Window = new mx.styles.CSSStyleDeclaration());
_local3.borderStyle = "default";
_local3 = (_global.styles.windowStyles = new mx.styles.CSSStyleDeclaration());
_local3.fontWeight = "bold";
_local3 = (_global.styles.dataGridStyles = new mx.styles.CSSStyleDeclaration());
_local3.fontWeight = "bold";
_local3 = (_global.styles.Alert = new mx.styles.CSSStyleDeclaration());
_local3.borderStyle = "alert";
_local3 = (_global.styles.ScrollView = new mx.styles.CSSStyleDeclaration());
_local3.borderStyle = "inset";
_local3 = (_global.styles.View = new mx.styles.CSSStyleDeclaration());
_local3.borderStyle = "none";
_local3 = (_global.styles.ProgressBar = new mx.styles.CSSStyleDeclaration());
_local3.color = 11187123 /* 0xAAB3B3 */;
_local3.fontWeight = "bold";
_local3 = (_global.styles.AccordionHeader = new mx.styles.CSSStyleDeclaration());
_local3.fontWeight = "bold";
_local3.fontSize = "11";
_local3 = (_global.styles.Accordion = new mx.styles.CSSStyleDeclaration());
_local3.borderStyle = "solid";
_local3.backgroundColor = 16777215 /* 0xFFFFFF */;
_local3.borderColor = 9081738 /* 0x8A938A */;
_local3.headerHeight = 22;
_local3.marginLeft = (_local3.marginRight = (_local3.marginTop = (_local3.marginBottom = -1)));
_local3.verticalGap = -1;
_local3 = (_global.styles.DateChooser = new mx.styles.CSSStyleDeclaration());
_local3.borderColor = 9542041 /* 0x919999 */;
_local3.headerColor = 16777215 /* 0xFFFFFF */;
_local3 = (_global.styles.CalendarLayout = new mx.styles.CSSStyleDeclaration());
_local3.fontSize = 10;
_local3.textAlign = "right";
_local3.color = 2831164 /* 0x2B333C */;
_local3 = (_global.styles.WeekDayStyle = new mx.styles.CSSStyleDeclaration());
_local3.fontWeight = "bold";
_local3.fontSize = 11;
_local3.textAlign = "center";
_local3.color = 2831164 /* 0x2B333C */;
_local3 = (_global.styles.TodayStyle = new mx.styles.CSSStyleDeclaration());
_local3.color = 16777215 /* 0xFFFFFF */;
_local3 = (_global.styles.HeaderDateText = new mx.styles.CSSStyleDeclaration());
_local3.fontSize = 12;
_local3.fontWeight = "bold";
_local3.textAlign = "center";
}
function drawRoundRect(x, y, w, h, r, c, alpha, rot, gradient, ratios) {
if (typeof(r) == "object") {
var _local18 = r.br;
var _local16 = r.bl;
var _local15 = r.tl;
var _local10 = r.tr;
} else {
var _local10 = r;
var _local15 = _local10;
var _local16 = _local15;
var _local18 = _local16;
}
if (typeof(c) == "object") {
if (typeof(alpha) != "object") {
var _local9 = [alpha, alpha];
} else {
var _local9 = alpha;
}
if (ratios == undefined) {
ratios = [0, 255];
}
var _local14 = h * 0.7;
if (typeof(rot) != "object") {
var _local11 = {matrixType:"box", x:-_local14, y:_local14, w:w * 2, h:h * 4, r:rot * 0.0174532925199433 /* Math.PI/180 */};
} else {
var _local11 = rot;
}
if (gradient == "radial") {
beginGradientFill("radial", c, _local9, ratios, _local11);
} else {
beginGradientFill("linear", c, _local9, ratios, _local11);
}
} else if (c != undefined) {
beginFill(c, alpha);
}
r = _local18;
var _local13 = r - (r * 0.707106781186547);
var _local12 = r - (r * 0.414213562373095);
moveTo(x + w, (y + h) - r);
lineTo(x + w, (y + h) - r);
curveTo(x + w, (y + h) - _local12, (x + w) - _local13, (y + h) - _local13);
curveTo((x + w) - _local12, y + h, (x + w) - r, y + h);
r = _local16;
_local13 = r - (r * 0.707106781186547);
_local12 = r - (r * 0.414213562373095);
lineTo(x + r, y + h);
curveTo(x + _local12, y + h, x + _local13, (y + h) - _local13);
curveTo(x, (y + h) - _local12, x, (y + h) - r);
r = _local15;
_local13 = r - (r * 0.707106781186547);
_local12 = r - (r * 0.414213562373095);
lineTo(x, y + r);
curveTo(x, y + _local12, x + _local13, y + _local13);
curveTo(x + _local12, y, x + r, y);
r = _local10;
_local13 = r - (r * 0.707106781186547);
_local12 = r - (r * 0.414213562373095);
lineTo((x + w) - r, y);
curveTo((x + w) - _local12, y, (x + w) - _local13, y + _local13);
curveTo(x + w, y + _local12, x + w, y + r);
lineTo(x + w, (y + h) - r);
if (c != undefined) {
endFill();
}
}
static function classConstruct() {
mx.core.ext.UIObjectExtensions.Extensions();
setThemeDefaults();
mx.core.UIObject.prototype.drawRoundRect = mx.skins.halo.Defaults.prototype.drawRoundRect;
return(true);
}
static var classConstructed = classConstruct();
static var CSSStyleDeclarationDependency = mx.styles.CSSStyleDeclaration;
static var UIObjectExtensionsDependency = mx.core.ext.UIObjectExtensions;
static var UIObjectDependency = mx.core.UIObject;
}
Symbol 201 MovieClip [__Packages.mx.managers.DepthManager] Frame 0
class mx.managers.DepthManager
{
var _childCounter, createClassObject, createObject, _parent, swapDepths, _topmost, getDepth;
function DepthManager () {
MovieClip.prototype.createClassChildAtDepth = createClassChildAtDepth;
MovieClip.prototype.createChildAtDepth = createChildAtDepth;
MovieClip.prototype.setDepthTo = setDepthTo;
MovieClip.prototype.setDepthAbove = setDepthAbove;
MovieClip.prototype.setDepthBelow = setDepthBelow;
MovieClip.prototype.findNextAvailableDepth = findNextAvailableDepth;
MovieClip.prototype.shuffleDepths = shuffleDepths;
MovieClip.prototype.getDepthByFlag = getDepthByFlag;
MovieClip.prototype.buildDepthTable = buildDepthTable;
_global.ASSetPropFlags(MovieClip.prototype, "createClassChildAtDepth", 1);
_global.ASSetPropFlags(MovieClip.prototype, "createChildAtDepth", 1);
_global.ASSetPropFlags(MovieClip.prototype, "setDepthTo", 1);
_global.ASSetPropFlags(MovieClip.prototype, "setDepthAbove", 1);
_global.ASSetPropFlags(MovieClip.prototype, "setDepthBelow", 1);
_global.ASSetPropFlags(MovieClip.prototype, "findNextAvailableDepth", 1);
_global.ASSetPropFlags(MovieClip.prototype, "shuffleDepths", 1);
_global.ASSetPropFlags(MovieClip.prototype, "getDepthByFlag", 1);
_global.ASSetPropFlags(MovieClip.prototype, "buildDepthTable", 1);
}
static function sortFunction(a, b) {
if (a.getDepth() > b.getDepth()) {
return(1);
}
return(-1);
}
static function test(depth) {
if (depth == reservedDepth) {
return(false);
}
return(true);
}
static function createClassObjectAtDepth(className, depthSpace, initObj) {
var _local1;
switch (depthSpace) {
case kCursor :
_local1 = holder.createClassChildAtDepth(className, kTopmost, initObj);
break;
case kTooltip :
_local1 = holder.createClassChildAtDepth(className, kTop, initObj);
break;
}
return(_local1);
}
static function createObjectAtDepth(linkageName, depthSpace, initObj) {
var _local1;
switch (depthSpace) {
case kCursor :
_local1 = holder.createChildAtDepth(linkageName, kTopmost, initObj);
break;
case kTooltip :
_local1 = holder.createChildAtDepth(linkageName, kTop, initObj);
break;
}
return(_local1);
}
function createClassChildAtDepth(className, depthFlag, initObj) {
if (_childCounter == undefined) {
_childCounter = 0;
}
var _local3 = buildDepthTable();
var _local2 = getDepthByFlag(depthFlag, _local3);
var _local6 = "down";
if (depthFlag == kBottom) {
_local6 = "up";
}
var _local5;
if (_local3[_local2] != undefined) {
_local5 = _local2;
_local2 = findNextAvailableDepth(_local2, _local3, _local6);
}
var _local4 = createClassObject(className, "depthChild" + (_childCounter++), _local2, initObj);
if (_local5 != undefined) {
_local3[_local2] = _local4;
shuffleDepths(_local4, _local5, _local3, _local6);
}
if (depthFlag == kTopmost) {
_local4._topmost = true;
}
return(_local4);
}
function createChildAtDepth(linkageName, depthFlag, initObj) {
if (_childCounter == undefined) {
_childCounter = 0;
}
var _local3 = buildDepthTable();
var _local2 = getDepthByFlag(depthFlag, _local3);
var _local6 = "down";
if (depthFlag == kBottom) {
_local6 = "up";
}
var _local5;
if (_local3[_local2] != undefined) {
_local5 = _local2;
_local2 = findNextAvailableDepth(_local2, _local3, _local6);
}
var _local4 = createObject(linkageName, "depthChild" + (_childCounter++), _local2, initObj);
if (_local5 != undefined) {
_local3[_local2] = _local4;
shuffleDepths(_local4, _local5, _local3, _local6);
}
if (depthFlag == kTopmost) {
_local4._topmost = true;
}
return(_local4);
}
function setDepthTo(depthFlag) {
var _local2 = _parent.buildDepthTable();
var _local3 = _parent.getDepthByFlag(depthFlag, _local2);
if (_local2[_local3] != undefined) {
shuffleDepths(this, _local3, _local2, undefined);
} else {
swapDepths(_local3);
}
if (depthFlag == kTopmost) {
_topmost = true;
} else {
delete _topmost;
}
}
function setDepthAbove(targetInstance) {
if (targetInstance._parent != _parent) {
return(undefined);
}
var _local2 = targetInstance.getDepth() + 1;
var _local3 = _parent.buildDepthTable();
if ((_local3[_local2] != undefined) && (getDepth() < _local2)) {
_local2 = _local2 - 1;
}
if (_local2 > highestDepth) {
_local2 = highestDepth;
}
if (_local2 == highestDepth) {
_parent.shuffleDepths(this, _local2, _local3, "down");
} else if (_local3[_local2] != undefined) {
_parent.shuffleDepths(this, _local2, _local3, undefined);
} else {
swapDepths(_local2);
}
}
function setDepthBelow(targetInstance) {
if (targetInstance._parent != _parent) {
return(undefined);
}
var _local6 = targetInstance.getDepth() - 1;
var _local3 = _parent.buildDepthTable();
if ((_local3[_local6] != undefined) && (getDepth() > _local6)) {
_local6 = _local6 + 1;
}
var _local4 = lowestDepth + numberOfAuthortimeLayers;
var _local5;
for (_local5 in _local3) {
var _local2 = _local3[_local5];
if (_local2._parent != undefined) {
_local4 = Math.min(_local4, _local2.getDepth());
}
}
if (_local6 < _local4) {
_local6 = _local4;
}
if (_local6 == _local4) {
_parent.shuffleDepths(this, _local6, _local3, "up");
} else if (_local3[_local6] != undefined) {
_parent.shuffleDepths(this, _local6, _local3, undefined);
} else {
swapDepths(_local6);
}
}
function findNextAvailableDepth(targetDepth, depthTable, direction) {
var _local5 = lowestDepth + numberOfAuthortimeLayers;
if (targetDepth < _local5) {
targetDepth = _local5;
}
if (depthTable[targetDepth] == undefined) {
return(targetDepth);
}
var _local2 = targetDepth;
var _local1 = targetDepth;
if (direction == "down") {
while (depthTable[_local1] != undefined) {
_local1--;
}
return(_local1);
}
while (depthTable[_local2] != undefined) {
_local2++;
}
return(_local2);
}
function shuffleDepths(subject, targetDepth, depthTable, direction) {
var _local9 = lowestDepth + numberOfAuthortimeLayers;
var _local8 = _local9;
var _local5;
for (_local5 in depthTable) {
var _local7 = depthTable[_local5];
if (_local7._parent != undefined) {
_local9 = Math.min(_local9, _local7.getDepth());
}
}
if (direction == undefined) {
if (subject.getDepth() > targetDepth) {
direction = "up";
} else {
direction = "down";
}
}
var _local1 = new Array();
for (_local5 in depthTable) {
var _local7 = depthTable[_local5];
if (_local7._parent != undefined) {
_local1.push(_local7);
}
}
_local1.sort(sortFunction);
if (direction == "up") {
var _local3;
var _local11;
do {
if (_local1.length <= 0) {
break;
}
_local3 = _local1.pop();
} while (_local3 != subject);
do {
if (_local1.length <= 0) {
break;
}
_local11 = subject.getDepth();
_local3 = _local1.pop();
var _local4 = _local3.getDepth();
if (_local11 > (_local4 + 1)) {
if (_local4 >= 0) {
subject.swapDepths(_local4 + 1);
} else if ((_local11 > _local8) && (_local4 < _local8)) {
subject.swapDepths(_local8);
}
}
subject.swapDepths(_local3);
} while (_local4 != targetDepth);
} else if (direction == "down") {
var _local3;
do {
if (_local1.length <= 0) {
break;
}
_local3 = _local1.shift();
} while (_local3 != subject);
do {
if (_local1.length <= 0) {
break;
}
var _local11 = _local3.getDepth();
_local3 = _local1.shift();
var _local4 = _local3.getDepth();
if ((_local11 < (_local4 - 1)) && (_local4 > 0)) {
subject.swapDepths(_local4 - 1);
}
subject.swapDepths(_local3);
} while (_local4 != targetDepth);
}
}
function getDepthByFlag(depthFlag, depthTable) {
var _local2 = 0;
if ((depthFlag == kTop) || (depthFlag == kNotopmost)) {
var _local5 = 0;
var _local7 = false;
var _local8;
for (_local8 in depthTable) {
var _local9 = depthTable[_local8];
var _local3 = typeof(_local9);
if ((_local3 == "movieclip") || ((_local3 == "object") && (_local9.__getTextFormat != undefined))) {
if (_local9.getDepth() <= highestDepth) {
if (!_local9._topmost) {
_local2 = Math.max(_local2, _local9.getDepth());
} else if (!_local7) {
_local5 = _local9.getDepth();
_local7 = true;
} else {
_local5 = Math.min(_local5, _local9.getDepth());
}
}
}
}
_local2 = _local2 + 20;
if (_local7) {
if (_local2 >= _local5) {
_local2 = _local5 - 1;
}
}
} else if (depthFlag == kBottom) {
for (var _local8 in depthTable) {
var _local9 = depthTable[_local8];
var _local3 = typeof(_local9);
if ((_local3 == "movieclip") || ((_local3 == "object") && (_local9.__getTextFormat != undefined))) {
if (_local9.getDepth() <= highestDepth) {
_local2 = Math.min(_local2, _local9.getDepth());
}
}
}
_local2 = _local2 - 20;
} else if (depthFlag == kTopmost) {
for (var _local8 in depthTable) {
var _local9 = depthTable[_local8];
var _local3 = typeof(_local9);
if ((_local3 == "movieclip") || ((_local3 == "object") && (_local9.__getTextFormat != undefined))) {
if (_local9.getDepth() <= highestDepth) {
_local2 = Math.max(_local2, _local9.getDepth());
}
}
}
_local2 = _local2 + 100;
}
if (_local2 >= highestDepth) {
_local2 = highestDepth;
}
var _local6 = lowestDepth + numberOfAuthortimeLayers;
for (var _local9 in depthTable) {
var _local4 = depthTable[_local9];
if (_local4._parent != undefined) {
_local6 = Math.min(_local6, _local4.getDepth());
}
}
if (_local2 <= _local6) {
_local2 = _local6;
}
return(_local2);
}
function buildDepthTable(Void) {
var _local5 = new Array();
var _local4;
for (_local4 in this) {
var _local2 = this[_local4];
var _local3 = typeof(_local2);
if ((_local3 == "movieclip") || ((_local3 == "object") && (_local2.__getTextFormat != undefined))) {
if (_local2._parent == this) {
_local5[_local2.getDepth()] = _local2;
}
}
}
return(_local5);
}
static var reservedDepth = 1048575;
static var highestDepth = 1048574;
static var lowestDepth = -16383;
static var numberOfAuthortimeLayers = 383;
static var kCursor = 101;
static var kTooltip = 102;
static var kTop = 201;
static var kBottom = 202;
static var kTopmost = 203;
static var kNotopmost = 204;
static var holder = _root.createEmptyMovieClip("reserved", reservedDepth);
static var __depthManager = new mx.managers.DepthManager();
}
Symbol 202 MovieClip [__Packages.mx.managers.SystemManager] Frame 0
class mx.managers.SystemManager
{
static var _xAddEventListener, addEventListener, __addEventListener, _xRemoveEventListener, removeEventListener, __removeEventListener, form, __screen, dispatchEvent;
function SystemManager () {
}
static function init(Void) {
if (_initialized == false) {
_initialized = true;
mx.events.EventDispatcher.initialize(mx.managers.SystemManager);
Mouse.addListener(mx.managers.SystemManager);
Stage.addListener(mx.managers.SystemManager);
_xAddEventListener = addEventListener;
addEventListener = __addEventListener;
_xRemoveEventListener = removeEventListener;
removeEventListener = __removeEventListener;
}
}
static function addFocusManager(f) {
form = f;
f.focusManager.activate();
}
static function removeFocusManager(f) {
}
static function onMouseDown(Void) {
var _local1 = form;
_local1.focusManager._onMouseDown();
}
static function onResize(Void) {
var _local7 = Stage.width;
var _local6 = Stage.height;
var _local9 = _global.origWidth;
var _local8 = _global.origHeight;
var _local3 = Stage.align;
var _local5 = (_local9 - _local7) / 2;
var _local4 = (_local8 - _local6) / 2;
if (_local3 == "T") {
_local4 = 0;
} else if (_local3 == "B") {
_local4 = _local8 - _local6;
} else if (_local3 == "L") {
_local5 = 0;
} else if (_local3 == "R") {
_local5 = _local9 - _local7;
} else if (_local3 == "LT") {
_local4 = 0;
_local5 = 0;
} else if (_local3 == "TR") {
_local4 = 0;
_local5 = _local9 - _local7;
} else if (_local3 == "LB") {
_local4 = _local8 - _local6;
_local5 = 0;
} else if (_local3 == "RB") {
_local4 = _local8 - _local6;
_local5 = _local9 - _local7;
}
if (__screen == undefined) {
__screen = new Object();
}
__screen.x = _local5;
__screen.y = _local4;
__screen.width = _local7;
__screen.height = _local6;
_root.focusManager.relocate();
dispatchEvent({type:"resize"});
}
static function get screen() {
init();
if (__screen == undefined) {
onResize();
}
return(__screen);
}
static var _initialized = false;
static var idleFrames = 0;
static var isMouseDown = false;
static var forms = new Array();
}
Symbol 203 MovieClip [__Packages.mx.managers.FocusManager] Frame 0
class mx.managers.FocusManager extends mx.core.UIComponent
{
var __defaultPushButton, defPushButton, form, move, tabEnabled, _width, _height, _x, _y, _alpha, _parent, tabCapture, watch, lastMouse, _visible, lastFocus, doLater, lastSelFocus, cancelAllDoLaters, _searchKey, _lastTarget, _firstNode, _nextIsNext, _nextNode, _lastx, _prevNode, _needPrev, _foundList, _prevObj, _nextObj, _firstObj, _lastObj, _lastNode, lastTabFocus, findFocusFromObject;
function FocusManager () {
super();
}
function get defaultPushButton() {
return(__defaultPushButton);
}
function set defaultPushButton(x) {
if (x != __defaultPushButton) {
__defaultPushButton.__set__emphasized(false);
__defaultPushButton = x;
defPushButton = x;
x.__set__emphasized(true);
}
//return(defaultPushButton);
}
function getMaxTabIndex(o) {
var _local3 = 0;
var _local6;
for (_local6 in o) {
var _local2 = o[_local6];
if (_local2._parent == o) {
if (_local2.tabIndex != undefined) {
if (_local2.tabIndex > _local3) {
_local3 = _local2.tabIndex;
}
}
if (_local2.tabChildren == true) {
var _local4 = getMaxTabIndex(_local2);
if (_local4 > _local3) {
_local3 = _local4;
}
}
}
}
return(_local3);
}
function getNextTabIndex(Void) {
return(getMaxTabIndex(form) + 1);
}
function get nextTabIndex() {
return(getNextTabIndex());
}
function relocate(Void) {
var _local2 = mx.managers.SystemManager.__get__screen();
move(_local2.x - 1, _local2.y - 1);
}
function init(Void) {
super.init();
tabEnabled = false;
_width = (_height = 1);
_x = (_y = -1);
_alpha = 0;
_parent.focusManager = this;
_parent.tabChildren = true;
_parent.tabEnabled = false;
form = _parent;
_parent.addEventListener("hide", this);
_parent.addEventListener("reveal", this);
mx.managers.SystemManager.init();
mx.managers.SystemManager.addFocusManager(form);
tabCapture.tabIndex = 0;
watch("enabled", enabledChanged);
Selection.addListener(this);
lastMouse = new Object();
_global.ASSetPropFlags(_parent, "focusManager", 1);
_global.ASSetPropFlags(_parent, "tabChildren", 1);
_global.ASSetPropFlags(_parent, "tabEnabled", 1);
}
function enabledChanged(id, oldValue, newValue) {
_visible = newValue;
return(newValue);
}
function activate(Void) {
Key.addListener(this);
activated = (_visible = true);
if (lastFocus != undefined) {
bNeedFocus = true;
if (!mx.managers.SystemManager.isMouseDown) {
doLater(this, "restoreFocus");
}
}
}
function deactivate(Void) {
Key.removeListener(this);
activated = (_visible = false);
var _local2 = getSelectionFocus();
var _local3 = getActualFocus(_local2);
if (isOurFocus(_local3)) {
lastSelFocus = _local2;
lastFocus = _local3;
}
cancelAllDoLaters();
}
function isOurFocus(o) {
if (o.focusManager == this) {
return(true);
}
while (o != undefined) {
if (o.focusManager != undefined) {
return(false);
}
if (o._parent == _parent) {
return(true);
}
o = o._parent;
}
return(false);
}
function onSetFocus(o, n) {
if (n == null) {
if (activated) {
bNeedFocus = true;
}
} else {
var _local2 = getFocus();
if (isOurFocus(_local2)) {
bNeedFocus = false;
lastFocus = _local2;
lastSelFocus = n;
}
}
}
function restoreFocus(Void) {
var _local2 = lastSelFocus.hscroll;
if (_local2 != undefined) {
var _local5 = lastSelFocus.scroll;
var _local4 = lastSelFocus.background;
}
lastFocus.setFocus();
var _local3 = Selection;
Selection.setSelection(_local3.lastBeginIndex, _local3.lastEndIndex);
if (_local2 != undefined) {
lastSelFocus.scroll = _local5;
lastSelFocus.hscroll = _local2;
lastSelFocus.background = _local4;
}
}
function onUnload(Void) {
mx.managers.SystemManager.removeFocusManager(form);
}
function setFocus(o) {
if (o == null) {
Selection.setFocus(null);
} else if (o.setFocus == undefined) {
Selection.setFocus(o);
} else {
o.setFocus();
}
}
function getActualFocus(o) {
var _local1 = o._parent;
while (_local1 != undefined) {
if (_local1.focusTextField != undefined) {
while (_local1.focusTextField != undefined) {
o = _local1;
_local1 = _local1._parent;
if (_local1 == undefined) {
return(undefined);
}
if (_local1.focusTextField == undefined) {
return(o);
}
}
}
if (_local1.tabEnabled != true) {
return(o);
}
o = _local1;
_local1 = o._parent;
}
return(undefined);
}
function getSelectionFocus() {
var m = Selection.getFocus();
var o = eval (m);
return(o);
}
function getFocus(Void) {
var _local2 = getSelectionFocus();
return(getActualFocus(_local2));
}
function walkTree(p, index, groupName, dir, lookup, firstChild) {
var _local5 = true;
var _local11;
for (_local11 in p) {
var _local2 = p[_local11];
if ((((_local2._parent == p) && (_local2.enabled != false)) && (_local2._visible != false)) && ((_local2.tabEnabled == true) || ((_local2.tabEnabled != false) && ((((((((_local2.onPress != undefined) || (_local2.onRelease != undefined)) || (_local2.onReleaseOutside != undefined)) || (_local2.onDragOut != undefined)) || (_local2.onDragOver != undefined)) || (_local2.onRollOver != undefined)) || (_local2.onRollOut != undefined)) || (_local2 instanceof TextField))))) {
if (_local2._searchKey == _searchKey) {
continue;
}
_local2._searchKey = _searchKey;
if (_local2 != _lastTarget) {
if (((_local2.groupName != undefined) || (groupName != undefined)) && (_local2.groupName == groupName)) {
continue;
}
if ((_local2 instanceof TextField) && (_local2.selectable == false)) {
continue;
}
if (_local5 || (((_local2.groupName != undefined) && (_local2.groupName == _firstNode.groupName)) && (_local2.selected == true))) {
if (firstChild) {
_firstNode = _local2;
firstChild = false;
}
}
if (_nextIsNext == true) {
if ((((_local2.groupName != undefined) && (_local2.groupName == _nextNode.groupName)) && (_local2.selected == true)) || ((_nextNode == undefined) && ((_local2.groupName == undefined) || ((_local2.groupName != undefined) && (_local2.groupName != groupName))))) {
_nextNode = _local2;
}
}
if ((_local2.groupName == undefined) || (groupName != _local2.groupName)) {
if (((_lastx.groupName != undefined) && (_local2.groupName == _lastx.groupName)) && (_lastx.selected == true)) {
} else {
_lastx = _local2;
}
}
} else {
_prevNode = _lastx;
_needPrev = false;
_nextIsNext = true;
}
if (_local2.tabIndex != undefined) {
if (_local2.tabIndex == index) {
if (_foundList[_local2._name] == undefined) {
if (_needPrev) {
_prevObj = _local2;
_needPrev = false;
}
_nextObj = _local2;
}
}
if (dir && (_local2.tabIndex > index)) {
if (((_nextObj == undefined) || ((_nextObj.tabIndex > _local2.tabIndex) && (((_local2.groupName == undefined) || (_nextObj.groupName == undefined)) || (_local2.groupName != _nextObj.groupName)))) || ((((_nextObj.groupName != undefined) && (_nextObj.groupName == _local2.groupName)) && (_nextObj.selected != true)) && ((_local2.selected == true) || (_nextObj.tabIndex > _local2.tabIndex)))) {
_nextObj = _local2;
}
} else if ((!dir) && (_local2.tabIndex < index)) {
if (((_prevObj == undefined) || ((_prevObj.tabIndex < _local2.tabIndex) && (((_local2.groupName == undefined) || (_prevObj.groupName == undefined)) || (_local2.groupName != _prevObj.groupName)))) || ((((_prevObj.groupName != undefined) && (_prevObj.groupName == _local2.groupName)) && (_prevObj.selected != true)) && ((_local2.selected == true) || (_prevObj.tabIndex < _local2.tabIndex)))) {
_prevObj = _local2;
}
}
if (((_firstObj == undefined) || ((_local2.tabIndex < _firstObj.tabIndex) && (((_local2.groupName == undefined) || (_firstObj.groupName == undefined)) || (_local2.groupName != _firstObj.groupName)))) || ((((_firstObj.groupName != undefined) && (_firstObj.groupName == _local2.groupName)) && (_firstObj.selected != true)) && ((_local2.selected == true) || (_local2.tabIndex < _firstObj.tabIndex)))) {
_firstObj = _local2;
}
if (((_lastObj == undefined) || ((_local2.tabIndex > _lastObj.tabIndex) && (((_local2.groupName == undefined) || (_lastObj.groupName == undefined)) || (_local2.groupName != _lastObj.groupName)))) || ((((_lastObj.groupName != undefined) && (_lastObj.groupName == _local2.groupName)) && (_lastObj.selected != true)) && ((_local2.selected == true) || (_local2.tabIndex > _lastObj.tabIndex)))) {
_lastObj = _local2;
}
}
if (_local2.tabChildren) {
getTabCandidateFromChildren(_local2, index, groupName, dir, _local5 && (firstChild));
}
_local5 = false;
} else if (((_local2._parent == p) && (_local2.tabChildren == true)) && (_local2._visible != false)) {
if (_local2 == _lastTarget) {
if (_local2._searchKey == _searchKey) {
continue;
}
_local2._searchKey = _searchKey;
if (_prevNode == undefined) {
var _local3 = _lastx;
var _local7 = false;
while (_local3 != undefined) {
if (_local3 == _local2) {
_local7 = true;
break;
}
_local3 = _local3._parent;
}
if (_local7 == false) {
_prevNode = _lastx;
}
}
_needPrev = false;
if (_nextNode == undefined) {
_nextIsNext = true;
}
} else if (!((_local2.focusManager != undefined) && (_local2.focusManager._parent == _local2))) {
if (_local2._searchKey == _searchKey) {
continue;
}
_local2._searchKey = _searchKey;
getTabCandidateFromChildren(_local2, index, groupName, dir, _local5 && (firstChild));
}
_local5 = false;
}
}
_lastNode = _lastx;
if (lookup) {
if (p._parent != undefined) {
if (p != _parent) {
if ((_prevNode == undefined) && (dir)) {
_needPrev = true;
} else if ((_nextNode == undefined) && (!dir)) {
_nextIsNext = false;
}
_lastTarget = _lastTarget._parent;
getTabCandidate(p._parent, index, groupName, dir, true);
}
}
}
}
function getTabCandidate(o, index, groupName, dir, firstChild) {
var _local2;
var _local3 = true;
if (o == _parent) {
_local2 = o;
_local3 = false;
} else {
_local2 = o._parent;
if (_local2 == undefined) {
_local2 = o;
_local3 = false;
}
}
walkTree(_local2, index, groupName, dir, _local3, firstChild);
}
function getTabCandidateFromChildren(o, index, groupName, dir, firstChild) {
walkTree(o, index, groupName, dir, false, firstChild);
}
function getFocusManagerFromObject(o) {
while (o != undefined) {
if (o.focusManager != undefined) {
return(o.focusManager);
}
o = o._parent;
}
return(undefined);
}
function tabHandler(Void) {
bDrawFocus = true;
var _local5 = getSelectionFocus();
var _local4 = getActualFocus(_local5);
if (_local4 != _local5) {
_local5 = _local4;
}
if (getFocusManagerFromObject(_local5) != this) {
_local5 == undefined;
}
if (_local5 == undefined) {
_local5 = form;
} else if (_local5.tabIndex != undefined) {
if ((_foundList != undefined) || (_foundList.tabIndex != _local5.tabIndex)) {
_foundList = new Object();
_foundList.tabIndex = _local5.tabIndex;
}
_foundList[_local5._name] = _local5;
}
var _local3 = Key.isDown(16) != true;
_searchKey = getTimer();
_needPrev = true;
_nextIsNext = false;
_lastx = undefined;
_firstNode = undefined;
_lastNode = undefined;
_nextNode = undefined;
_prevNode = undefined;
_firstObj = undefined;
_lastObj = undefined;
_nextObj = undefined;
_prevObj = undefined;
_lastTarget = _local5;
var _local6 = _local5;
getTabCandidate(_local6, ((_local5.tabIndex == undefined) ? 0 : (_local5.tabIndex)), _local5.groupName, _local3, true);
var _local2;
if (_local3) {
if (_nextObj != undefined) {
_local2 = _nextObj;
} else {
_local2 = _firstObj;
}
} else if (_prevObj != undefined) {
_local2 = _prevObj;
} else {
_local2 = _lastObj;
}
if (_local2.tabIndex != _local5.tabIndex) {
_foundList = new Object();
_foundList.tabIndex = _local2.tabIndex;
_foundList[_local2._name] = _local2;
} else {
if (_foundList == undefined) {
_foundList = new Object();
_foundList.tabIndex = _local2.tabIndex;
}
_foundList[_local2._name] = _local2;
}
if (_local2 == undefined) {
if (_local3 == false) {
if (_nextNode != undefined) {
_local2 = _nextNode;
} else {
_local2 = _firstNode;
}
} else if ((_prevNode == undefined) || (_local5 == form)) {
_local2 = _lastNode;
} else {
_local2 = _prevNode;
}
}
if (_local2 == undefined) {
return(undefined);
}
lastTabFocus = _local2;
setFocus(_local2);
if (_local2.emphasized != undefined) {
if (defPushButton != undefined) {
_local5 = defPushButton;
defPushButton = _local2;
_local5.emphasized = false;
_local2.emphasized = true;
}
} else if ((defPushButton != undefined) && (defPushButton != __defaultPushButton)) {
_local5 = defPushButton;
defPushButton = __defaultPushButton;
_local5.emphasized = false;
__defaultPushButton.__set__emphasized(true);
}
}
function onKeyDown(Void) {
mx.managers.SystemManager.idleFrames = 0;
if (defaultPushButtonEnabled) {
if (Key.getCode() == 13) {
if (defaultPushButton != undefined) {
doLater(this, "sendDefaultPushButtonEvent");
}
}
}
}
function sendDefaultPushButtonEvent(Void) {
defPushButton.dispatchEvent({type:"click"});
}
function getMousedComponentFromChildren(x, y, o) {
for (var _local7 in o) {
var _local2 = o[_local7];
if (((_local2._visible && (_local2.enabled)) && (_local2._parent == o)) && (_local2._searchKey != _searchKey)) {
_local2._searchKey = _searchKey;
if (_local2.hitTest(x, y, true)) {
if ((_local2.onPress != undefined) || (_local2.onRelease != undefined)) {
return(_local2);
}
var _local3 = getMousedComponentFromChildren(x, y, _local2);
if (_local3 != undefined) {
return(_local3);
}
return(_local2);
}
}
}
return(undefined);
}
function mouseActivate(Void) {
if (!bNeedFocus) {
return(undefined);
}
_searchKey = getTimer();
var _local2 = getMousedComponentFromChildren(lastMouse.x, lastMouse.y, form);
if (_local2 instanceof mx.core.UIComponent) {
return(undefined);
}
_local2 = findFocusFromObject(_local2);
if (_local2 == lastFocus) {
return(undefined);
}
if (_local2 == undefined) {
doLater(this, "restoreFocus");
return(undefined);
}
var _local3 = _local2.hscroll;
if (_local3 != undefined) {
var _local6 = _local2.scroll;
var _local5 = _local2.background;
}
setFocus(_local2);
var _local4 = Selection;
Selection.setSelection(_local4.lastBeginIndex, _local4.lastEndIndex);
if (_local3 != undefined) {
_local2.scroll = _local6;
_local2.hscroll = _local3;
_local2.background = _local5;
}
}
function _onMouseDown(Void) {
bDrawFocus = false;
if (lastFocus != undefined) {
lastFocus.drawFocus(false);
}
mx.managers.SystemManager.idleFrames = 0;
var _local3 = Selection;
_local3.lastBeginIndex = Selection.getBeginIndex();
_local3.lastEndIndex = Selection.getEndIndex();
lastMouse.x = _root._xmouse;
lastMouse.y = _root._ymouse;
_root.localToGlobal(lastMouse);
}
function onMouseUp(Void) {
if (_visible) {
doLater(this, "mouseActivate");
}
}
function handleEvent(e) {
if (e.type == "reveal") {
mx.managers.SystemManager.activate(form);
} else {
mx.managers.SystemManager.deactivate(form);
}
}
static function enableFocusManagement() {
if (!initialized) {
initialized = true;
Object.registerClass("FocusManager", mx.managers.FocusManager);
if (_root.focusManager == undefined) {
_root.createClassObject(mx.managers.FocusManager, "focusManager", mx.managers.DepthManager.highestDepth--);
}
}
}
static var symbolName = "FocusManager";
static var symbolOwner = mx.managers.FocusManager;
static var version = "2.0.2.126";
var className = "FocusManager";
var bNeedFocus = false;
var bDrawFocus = false;
var defaultPushButtonEnabled = true;
var activated = true;
static var initialized = false;
static var UIObjectExtensionsDependency = mx.core.ext.UIObjectExtensions;
}
Symbol 204 MovieClip [__Packages.mx.skins.halo.FocusRect] Frame 0
class mx.skins.halo.FocusRect extends mx.skins.SkinElement
{
var boundingBox_mc, _xscale, _yscale, clear, beginFill, drawRoundRect, endFill, _visible;
function FocusRect () {
super();
boundingBox_mc._visible = false;
boundingBox_mc._width = (boundingBox_mc._height = 0);
}
function draw(o) {
o.adjustFocusRect();
}
function setSize(w, h, r, a, rectCol) {
_xscale = (_yscale = 100);
clear();
if (typeof(r) == "object") {
r.br = ((r.br > 2) ? (r.br - 2) : 0);
r.bl = ((r.bl > 2) ? (r.bl - 2) : 0);
r.tr = ((r.tr > 2) ? (r.tr - 2) : 0);
r.tl = ((r.tl > 2) ? (r.tl - 2) : 0);
beginFill(rectCol, a * 0.3);
drawRoundRect(0, 0, w, h, r);
drawRoundRect(2, 2, w - 4, h - 4, r);
endFill();
r.br = ((r.br > 1) ? (r.br + 1) : 0);
r.bl = ((r.bl > 1) ? (r.bl + 1) : 0);
r.tr = ((r.tr > 1) ? (r.tr + 1) : 0);
r.tl = ((r.tl > 1) ? (r.tl + 1) : 0);
beginFill(rectCol, a * 0.3);
drawRoundRect(1, 1, w - 2, h - 2, r);
r.br = ((r.br > 1) ? (r.br - 1) : 0);
r.bl = ((r.bl > 1) ? (r.bl - 1) : 0);
r.tr = ((r.tr > 1) ? (r.tr - 1) : 0);
r.tl = ((r.tl > 1) ? (r.tl - 1) : 0);
drawRoundRect(2, 2, w - 4, h - 4, r);
endFill();
} else {
var _local5;
if (r != 0) {
_local5 = r - 2;
} else {
_local5 = 0;
}
beginFill(rectCol, a * 0.3);
drawRoundRect(0, 0, w, h, r);
drawRoundRect(2, 2, w - 4, h - 4, _local5);
endFill();
beginFill(rectCol, a * 0.3);
if (r != 0) {
_local5 = r - 2;
r = r - 1;
} else {
_local5 = 0;
r = 0;
}
drawRoundRect(1, 1, w - 2, h - 2, r);
drawRoundRect(2, 2, w - 4, h - 4, _local5);
endFill();
}
}
function handleEvent(e) {
if (e.type == "unload") {
_visible = true;
} else if (e.type == "resize") {
e.target.adjustFocusRect();
} else if (e.type == "move") {
e.target.adjustFocusRect();
}
}
static function classConstruct() {
mx.core.UIComponent.prototype.drawFocus = function (focused) {
var _local2 = this._parent.focus_mc;
if (!focused) {
_local2._visible = false;
this.removeEventListener("unload", _local2);
this.removeEventListener("move", _local2);
this.removeEventListener("resize", _local2);
} else {
if (_local2 == undefined) {
_local2 = this._parent.createChildAtDepth("FocusRect", mx.managers.DepthManager.kTop);
_local2.tabEnabled = false;
this._parent.focus_mc = _local2;
} else {
_local2._visible = true;
}
_local2.draw(this);
if (_local2.getDepth() < this.getDepth()) {
_local2.setDepthAbove(this);
}
this.addEventListener("unload", _local2);
this.addEventListener("move", _local2);
this.addEventListener("resize", _local2);
}
};
mx.core.UIComponent.prototype.adjustFocusRect = function () {
var _local2 = this.getStyle("themeColor");
if (_local2 == undefined) {
_local2 = 8453965 /* 0x80FF4D */;
}
var _local3 = this._parent.focus_mc;
_local3.setSize(this.width + 4, this.height + 4, 0, 100, _local2);
_local3.move(this.x - 2, this.y - 2);
};
TextField.prototype.drawFocus = mx.core.UIComponent.prototype.drawFocus;
TextField.prototype.adjustFocusRect = mx.core.UIComponent.prototype.adjustFocusRect;
mx.skins.halo.FocusRect.prototype.drawRoundRect = mx.skins.halo.Defaults.prototype.drawRoundRect;
return(true);
}
static var classConstructed = classConstruct();
static var DefaultsDependency = mx.skins.halo.Defaults;
static var UIComponentDependency = mx.core.UIComponent;
}
Symbol 205 MovieClip [__Packages.mx.managers.OverlappedWindows] Frame 0
class mx.managers.OverlappedWindows
{
function OverlappedWindows () {
}
static function checkIdle(Void) {
if (mx.managers.SystemManager.idleFrames > 10) {
mx.managers.SystemManager.dispatchEvent({type:"idle"});
} else {
mx.managers.SystemManager.idleFrames++;
}
}
static function __addEventListener(e, o, l) {
if (e == "idle") {
if (mx.managers.SystemManager.interval == undefined) {
mx.managers.SystemManager.interval = setInterval(mx.managers.SystemManager.checkIdle, 100);
}
}
mx.managers.SystemManager._xAddEventListener(e, o, l);
}
static function __removeEventListener(e, o, l) {
if (e == "idle") {
if (mx.managers.SystemManager._xRemoveEventListener(e, o, l) == 0) {
clearInterval(mx.managers.SystemManager.interval);
}
} else {
mx.managers.SystemManager._xRemoveEventListener(e, o, l);
}
}
static function onMouseDown(Void) {
mx.managers.SystemManager.idleFrames = 0;
mx.managers.SystemManager.isMouseDown = true;
var _local5 = _root;
var _local3;
var _local8 = _root._xmouse;
var _local7 = _root._ymouse;
if (mx.managers.SystemManager.form.modalWindow == undefined) {
if (mx.managers.SystemManager.forms.length > 1) {
var _local6 = mx.managers.SystemManager.forms.length;
var _local4;
_local4 = 0;
while (_local4 < _local6) {
var _local2 = mx.managers.SystemManager.forms[_local4];
if (_local2._visible) {
if (_local2.hitTest(_local8, _local7)) {
if (_local3 == undefined) {
_local3 = _local2.getDepth();
_local5 = _local2;
} else if (_local3 < _local2.getDepth()) {
_local3 = _local2.getDepth();
_local5 = _local2;
}
}
}
_local4++;
}
if (_local5 != mx.managers.SystemManager.form) {
mx.managers.SystemManager.activate(_local5);
}
}
}
var _local9 = mx.managers.SystemManager.form;
_local9.focusManager._onMouseDown();
}
static function onMouseMove(Void) {
mx.managers.SystemManager.idleFrames = 0;
}
static function onMouseUp(Void) {
mx.managers.SystemManager.isMouseDown = false;
mx.managers.SystemManager.idleFrames = 0;
}
static function activate(f) {
if (mx.managers.SystemManager.form != undefined) {
if ((mx.managers.SystemManager.form != f) && (mx.managers.SystemManager.forms.length > 1)) {
var _local1 = mx.managers.SystemManager.form;
_local1.focusManager.deactivate();
}
}
mx.managers.SystemManager.form = f;
f.focusManager.activate();
}
static function deactivate(f) {
if (mx.managers.SystemManager.form != undefined) {
if ((mx.managers.SystemManager.form == f) && (mx.managers.SystemManager.forms.length > 1)) {
var _local5 = mx.managers.SystemManager.form;
_local5.focusManager.deactivate();
var _local3 = mx.managers.SystemManager.forms.length;
var _local1;
var _local2;
_local1 = 0;
while (_local1 < _local3) {
if (mx.managers.SystemManager.forms[_local1] == f) {
_local1 = _local1 + 1;
while (_local1 < _local3) {
if (mx.managers.SystemManager.forms[_local1]._visible == true) {
_local2 = mx.managers.SystemManager.forms[_local1];
}
_local1++;
}
mx.managers.SystemManager.form = _local2;
break;
}
if (mx.managers.SystemManager.forms[_local1]._visible == true) {
_local2 = mx.managers.SystemManager.forms[_local1];
}
_local1++;
}
_local5 = mx.managers.SystemManager.form;
_local5.focusManager.activate();
}
}
}
static function addFocusManager(f) {
mx.managers.SystemManager.forms.push(f);
mx.managers.SystemManager.activate(f);
}
static function removeFocusManager(f) {
var _local3 = mx.managers.SystemManager.forms.length;
var _local1;
_local1 = 0;
while (_local1 < _local3) {
if (mx.managers.SystemManager.forms[_local1] == f) {
if (mx.managers.SystemManager.form == f) {
mx.managers.SystemManager.deactivate(f);
}
mx.managers.SystemManager.forms.splice(_local1, 1);
return(undefined);
}
_local1++;
}
}
static function enableOverlappedWindows() {
if (!initialized) {
initialized = true;
mx.managers.SystemManager.checkIdle = checkIdle;
mx.managers.SystemManager.__addEventListener = __addEventListener;
mx.managers.SystemManager.__removeEventListener = __removeEventListener;
mx.managers.SystemManager.onMouseDown = onMouseDown;
mx.managers.SystemManager.onMouseMove = onMouseMove;
mx.managers.SystemManager.onMouseUp = onMouseUp;
mx.managers.SystemManager.activate = activate;
mx.managers.SystemManager.deactivate = deactivate;
mx.managers.SystemManager.addFocusManager = addFocusManager;
mx.managers.SystemManager.removeFocusManager = removeFocusManager;
}
}
static var initialized = false;
static var SystemManagerDependency = mx.managers.SystemManager;
}
Symbol 206 MovieClip [__Packages.mx.styles.CSSSetStyle] Frame 0
class mx.styles.CSSSetStyle
{
var styleName, stylecache, _color, setColor, invalidateStyle;
function CSSSetStyle () {
}
function _setStyle(styleProp, newValue) {
this[styleProp] = newValue;
if (mx.styles.StyleManager.TextStyleMap[styleProp] != undefined) {
if (styleProp == "color") {
if (isNaN(newValue)) {
newValue = mx.styles.StyleManager.getColorName(newValue);
this[styleProp] = newValue;
if (newValue == undefined) {
return(undefined);
}
}
}
_level0.changeTextStyleInChildren(styleProp);
return(undefined);
}
if (mx.styles.StyleManager.isColorStyle(styleProp)) {
if (isNaN(newValue)) {
newValue = mx.styles.StyleManager.getColorName(newValue);
this[styleProp] = newValue;
if (newValue == undefined) {
return(undefined);
}
}
if (styleProp == "themeColor") {
var _local7 = mx.styles.StyleManager.colorNames.haloBlue;
var _local6 = mx.styles.StyleManager.colorNames.haloGreen;
var _local8 = mx.styles.StyleManager.colorNames.haloOrange;
var _local4 = {};
_local4[_local7] = 12188666 /* 0xB9FBFA */;
_local4[_local6] = 13500353 /* 0xCDFFC1 */;
_local4[_local8] = 16766319 /* 0xFFD56F */;
var _local5 = {};
_local5[_local7] = 13958653 /* 0xD4FDFD */;
_local5[_local6] = 14942166 /* 0xE3FFD6 */;
_local5[_local8] = 16772787 /* 0xFFEEB3 */;
var _local9 = _local4[newValue];
var _local10 = _local5[newValue];
if (_local9 == undefined) {
_local9 = newValue;
}
if (_local10 == undefined) {
_local10 = newValue;
}
setStyle("selectionColor", _local9);
setStyle("rollOverColor", _local10);
}
_level0.changeColorStyleInChildren(styleName, styleProp, newValue);
} else {
if ((styleProp == "backgroundColor") && (isNaN(newValue))) {
newValue = mx.styles.StyleManager.getColorName(newValue);
this[styleProp] = newValue;
if (newValue == undefined) {
return(undefined);
}
}
_level0.notifyStyleChangeInChildren(styleName, styleProp, newValue);
}
}
function changeTextStyleInChildren(styleProp) {
var _local4 = getTimer();
var _local5;
for (_local5 in this) {
var _local2 = this[_local5];
if (_local2._parent == this) {
if (_local2.searchKey != _local4) {
if (_local2.stylecache != undefined) {
delete _local2.stylecache.tf;
delete _local2.stylecache[styleProp];
}
_local2.invalidateStyle(styleProp);
_local2.changeTextStyleInChildren(styleProp);
_local2.searchKey = _local4;
}
}
}
}
function changeColorStyleInChildren(sheetName, colorStyle, newValue) {
var _local6 = getTimer();
var _local7;
for (_local7 in this) {
var _local2 = this[_local7];
if (_local2._parent == this) {
if (_local2.searchKey != _local6) {
if (((_local2.getStyleName() == sheetName) || (sheetName == undefined)) || (sheetName == "_global")) {
if (_local2.stylecache != undefined) {
delete _local2.stylecache[colorStyle];
}
if (typeof(_local2._color) == "string") {
if (_local2._color == colorStyle) {
var _local4 = _local2.getStyle(colorStyle);
if (colorStyle == "color") {
if (stylecache.tf.color != undefined) {
stylecache.tf.color = _local4;
}
}
_local2.setColor(_local4);
}
} else if (_local2._color[colorStyle] != undefined) {
if (typeof(_local2) != "movieclip") {
_local2._parent.invalidateStyle();
} else {
_local2.invalidateStyle(colorStyle);
}
}
}
_local2.changeColorStyleInChildren(sheetName, colorStyle, newValue);
_local2.searchKey = _local6;
}
}
}
}
function notifyStyleChangeInChildren(sheetName, styleProp, newValue) {
var _local5 = getTimer();
var _local6;
for (_local6 in this) {
var _local2 = this[_local6];
if (_local2._parent == this) {
if (_local2.searchKey != _local5) {
if (((_local2.styleName == sheetName) || ((_local2.styleName != undefined) && (typeof(_local2.styleName) == "movieclip"))) || (sheetName == undefined)) {
if (_local2.stylecache != undefined) {
delete _local2.stylecache[styleProp];
delete _local2.stylecache.tf;
}
delete _local2.enabledColor;
_local2.invalidateStyle(styleProp);
}
_local2.notifyStyleChangeInChildren(sheetName, styleProp, newValue);
_local2.searchKey = _local5;
}
}
}
}
function setStyle(styleProp, newValue) {
if (stylecache != undefined) {
delete stylecache[styleProp];
delete stylecache.tf;
}
this[styleProp] = newValue;
if (mx.styles.StyleManager.isColorStyle(styleProp)) {
if (isNaN(newValue)) {
newValue = mx.styles.StyleManager.getColorName(newValue);
this[styleProp] = newValue;
if (newValue == undefined) {
return(undefined);
}
}
if (styleProp == "themeColor") {
var _local10 = mx.styles.StyleManager.colorNames.haloBlue;
var _local9 = mx.styles.StyleManager.colorNames.haloGreen;
var _local11 = mx.styles.StyleManager.colorNames.haloOrange;
var _local6 = {};
_local6[_local10] = 12188666 /* 0xB9FBFA */;
_local6[_local9] = 13500353 /* 0xCDFFC1 */;
_local6[_local11] = 16766319 /* 0xFFD56F */;
var _local7 = {};
_local7[_local10] = 13958653 /* 0xD4FDFD */;
_local7[_local9] = 14942166 /* 0xE3FFD6 */;
_local7[_local11] = 16772787 /* 0xFFEEB3 */;
var _local12 = _local6[newValue];
var _local13 = _local7[newValue];
if (_local12 == undefined) {
_local12 = newValue;
}
if (_local13 == undefined) {
_local13 = newValue;
}
setStyle("selectionColor", _local12);
setStyle("rollOverColor", _local13);
}
if (typeof(_color) == "string") {
if (_color == styleProp) {
if (styleProp == "color") {
if (stylecache.tf.color != undefined) {
stylecache.tf.color = newValue;
}
}
setColor(newValue);
}
} else if (_color[styleProp] != undefined) {
invalidateStyle(styleProp);
}
changeColorStyleInChildren(undefined, styleProp, newValue);
} else {
if ((styleProp == "backgroundColor") && (isNaN(newValue))) {
newValue = mx.styles.StyleManager.getColorName(newValue);
this[styleProp] = newValue;
if (newValue == undefined) {
return(undefined);
}
}
invalidateStyle(styleProp);
}
if (mx.styles.StyleManager.isInheritingStyle(styleProp) || (styleProp == "styleName")) {
var _local8;
var _local5 = newValue;
if (styleProp == "styleName") {
_local8 = ((typeof(newValue) == "string") ? (_global.styles[newValue]) : (_local5));
_local5 = _local8.themeColor;
if (_local5 != undefined) {
_local8.rollOverColor = (_local8.selectionColor = _local5);
}
}
notifyStyleChangeInChildren(undefined, styleProp, newValue);
}
}
static function enableRunTimeCSS() {
}
static function classConstruct() {
var _local2 = MovieClip.prototype;
var _local3 = mx.styles.CSSSetStyle.prototype;
mx.styles.CSSStyleDeclaration.prototype.setStyle = _local3._setStyle;
_local2.changeTextStyleInChildren = _local3.changeTextStyleInChildren;
_local2.changeColorStyleInChildren = _local3.changeColorStyleInChildren;
_local2.notifyStyleChangeInChildren = _local3.notifyStyleChangeInChildren;
_local2.setStyle = _local3.setStyle;
_global.ASSetPropFlags(_local2, "changeTextStyleInChildren", 1);
_global.ASSetPropFlags(_local2, "changeColorStyleInChildren", 1);
_global.ASSetPropFlags(_local2, "notifyStyleChangeInChildren", 1);
_global.ASSetPropFlags(_local2, "setStyle", 1);
var _local4 = TextField.prototype;
_local4.setStyle = _local2.setStyle;
_local4.changeTextStyleInChildren = _local3.changeTextStyleInChildren;
return(true);
}
static var classConstructed = classConstruct();
static var CSSStyleDeclarationDependency = mx.styles.CSSStyleDeclaration;
}
Symbol 207 MovieClip [__Packages.mx.core.ext.UIComponentExtensions] Frame 0
class mx.core.ext.UIComponentExtensions
{
function UIComponentExtensions () {
}
static function Extensions() {
if (bExtended == true) {
return(true);
}
bExtended = true;
TextField.prototype.setFocus = function () {
Selection.setFocus(this);
};
TextField.prototype.onSetFocus = function (oldFocus) {
if (this.tabEnabled != false) {
if (this.getFocusManager().bDrawFocus) {
this.drawFocus(true);
}
}
};
TextField.prototype.onKillFocus = function (oldFocus) {
if (this.tabEnabled != false) {
this.drawFocus(false);
}
};
TextField.prototype.drawFocus = mx.core.UIComponent.prototype.drawFocus;
TextField.prototype.getFocusManager = mx.core.UIComponent.prototype.getFocusManager;
mx.managers.OverlappedWindows.enableOverlappedWindows();
mx.styles.CSSSetStyle.enableRunTimeCSS();
mx.managers.FocusManager.enableFocusManagement();
}
static var bExtended = false;
static var UIComponentExtended = Extensions();
static var UIComponentDependency = mx.core.UIComponent;
static var FocusManagerDependency = mx.managers.FocusManager;
static var OverlappedWindowsDependency = mx.managers.OverlappedWindows;
}
Symbol 208 MovieClip [__Packages.mx.skins.Border] Frame 0
class mx.skins.Border extends mx.core.UIObject
{
function Border () {
super();
}
function init(Void) {
super.init();
}
static var symbolName = "Border";
static var symbolOwner = mx.skins.Border;
var className = "Border";
var tagBorder = 0;
var idNames = new Array("border_mc");
}
Symbol 209 MovieClip [__Packages.mx.skins.RectBorder] Frame 0
class mx.skins.RectBorder extends mx.skins.Border
{
var __width, __height, offset, __borderMetrics;
function RectBorder () {
super();
}
function get width() {
return(__width);
}
function get height() {
return(__height);
}
function init(Void) {
super.init();
}
function draw(Void) {
size();
}
function getBorderMetrics(Void) {
var _local2 = offset;
if (__borderMetrics == undefined) {
__borderMetrics = {left:_local2, top:_local2, right:_local2, bottom:_local2};
} else {
__borderMetrics.left = _local2;
__borderMetrics.top = _local2;
__borderMetrics.right = _local2;
__borderMetrics.bottom = _local2;
}
return(__borderMetrics);
}
function get borderMetrics() {
return(getBorderMetrics());
}
function drawBorder(Void) {
}
function size(Void) {
drawBorder();
}
function setColor(Void) {
drawBorder();
}
static var symbolName = "RectBorder";
static var symbolOwner = mx.skins.RectBorder;
static var version = "2.0.2.126";
var className = "RectBorder";
var borderStyleName = "borderStyle";
var borderColorName = "borderColor";
var shadowColorName = "shadowColor";
var highlightColorName = "highlightColor";
var buttonColorName = "buttonColor";
var backgroundColorName = "backgroundColor";
}
Symbol 210 MovieClip [__Packages.mx.skins.halo.RectBorder] Frame 0
class mx.skins.halo.RectBorder extends mx.skins.RectBorder
{
var offset, getStyle, borderStyleName, __borderMetrics, className, borderColorName, backgroundColorName, shadowColorName, highlightColorName, buttonColorName, __get__width, __get__height, clear, _color, drawRoundRect, beginFill, drawRect, endFill;
function RectBorder () {
super();
}
function init(Void) {
borderWidths.default = 3;
super.init();
}
function getBorderMetrics(Void) {
if (offset == undefined) {
var _local3 = getStyle(borderStyleName);
offset = borderWidths[_local3];
}
if ((getStyle(borderStyleName) == "default") || (getStyle(borderStyleName) == "alert")) {
__borderMetrics = {left:3, top:1, right:3, bottom:3};
return(__borderMetrics);
}
return(super.getBorderMetrics());
}
function drawBorder(Void) {
var _local6 = _global.styles[className];
if (_local6 == undefined) {
_local6 = _global.styles.RectBorder;
}
var _local5 = getStyle(borderStyleName);
var _local7 = getStyle(borderColorName);
if (_local7 == undefined) {
_local7 = _local6[borderColorName];
}
var _local8 = getStyle(backgroundColorName);
if (_local8 == undefined) {
_local8 = _local6[backgroundColorName];
}
var _local16 = getStyle("backgroundImage");
if (_local5 != "none") {
var _local14 = getStyle(shadowColorName);
if (_local14 == undefined) {
_local14 = _local6[shadowColorName];
}
var _local13 = getStyle(highlightColorName);
if (_local13 == undefined) {
_local13 = _local6[highlightColorName];
}
var _local12 = getStyle(buttonColorName);
if (_local12 == undefined) {
_local12 = _local6[buttonColorName];
}
var _local11 = getStyle(borderCapColorName);
if (_local11 == undefined) {
_local11 = _local6[borderCapColorName];
}
var _local10 = getStyle(shadowCapColorName);
if (_local10 == undefined) {
_local10 = _local6[shadowCapColorName];
}
}
offset = borderWidths[_local5];
var _local9 = offset;
var _local3 = __get__width();
var _local4 = __get__height();
clear();
_color = undefined;
if (_local5 == "none") {
} else if (_local5 == "inset") {
_color = colorList;
draw3dBorder(_local11, _local12, _local7, _local13, _local14, _local10);
} else if (_local5 == "outset") {
_color = colorList;
draw3dBorder(_local11, _local7, _local12, _local14, _local13, _local10);
} else if (_local5 == "alert") {
var _local15 = getStyle("themeColor");
drawRoundRect(0, 5, _local3, _local4 - 5, 5, 6184542, 10);
drawRoundRect(1, 4, _local3 - 2, _local4 - 5, 4, [6184542, 6184542], 10, 0, "radial");
drawRoundRect(2, 0, _local3 - 4, _local4 - 2, 3, [0, 14342874], 100, 0, "radial");
drawRoundRect(2, 0, _local3 - 4, _local4 - 2, 3, _local15, 50);
drawRoundRect(3, 1, _local3 - 6, _local4 - 4, 2, 16777215, 100);
} else if (_local5 == "default") {
drawRoundRect(0, 5, _local3, _local4 - 5, {tl:5, tr:5, br:0, bl:0}, 6184542, 10);
drawRoundRect(1, 4, _local3 - 2, _local4 - 5, {tl:4, tr:4, br:0, bl:0}, [6184542, 6184542], 10, 0, "radial");
drawRoundRect(2, 0, _local3 - 4, _local4 - 2, {tl:3, tr:3, br:0, bl:0}, [12897484, 11844796], 100, 0, "radial");
drawRoundRect(3, 1, _local3 - 6, _local4 - 4, {tl:2, tr:2, br:0, bl:0}, 16777215, 100);
} else if (_local5 == "dropDown") {
drawRoundRect(0, 0, _local3 + 1, _local4, {tl:4, tr:0, br:0, bl:4}, [13290186, 7895160], 100, -10, "linear");
drawRoundRect(1, 1, _local3 - 1, _local4 - 2, {tl:3, tr:0, br:0, bl:3}, 16777215, 100);
} else if (_local5 == "menuBorder") {
var _local15 = getStyle("themeColor");
drawRoundRect(4, 4, _local3 - 2, _local4 - 3, 0, [6184542, 6184542], 10, 0, "radial");
drawRoundRect(4, 4, _local3 - 1, _local4 - 2, 0, 6184542, 10);
drawRoundRect(0, 0, _local3 + 1, _local4, 0, [0, 14342874], 100, 250, "linear");
drawRoundRect(0, 0, _local3 + 1, _local4, 0, _local15, 50);
drawRoundRect(2, 2, _local3 - 3, _local4 - 4, 0, 16777215, 100);
} else if (_local5 == "comboNonEdit") {
} else {
beginFill(_local7);
drawRect(0, 0, _local3, _local4);
drawRect(1, 1, _local3 - 1, _local4 - 1);
endFill();
_color = borderColorName;
}
if (_local8 != undefined) {
beginFill(_local8);
drawRect(_local9, _local9, __get__width() - _local9, __get__height() - _local9);
endFill();
}
}
function draw3dBorder(c1, c2, c3, c4, c5, c6) {
var _local3 = __get__width();
var _local2 = __get__height();
beginFill(c1);
drawRect(0, 0, _local3, _local2);
drawRect(1, 0, _local3 - 1, _local2);
endFill();
beginFill(c2);
drawRect(1, 0, _local3 - 1, 1);
endFill();
beginFill(c3);
drawRect(1, _local2 - 1, _local3 - 1, _local2);
endFill();
beginFill(c4);
drawRect(1, 1, _local3 - 1, 2);
endFill();
beginFill(c5);
drawRect(1, _local2 - 2, _local3 - 1, _local2 - 1);
endFill();
beginFill(c6);
drawRect(1, 2, _local3 - 1, _local2 - 2);
drawRect(2, 2, _local3 - 2, _local2 - 2);
endFill();
}
static function classConstruct() {
mx.core.ext.UIObjectExtensions.Extensions();
_global.styles.rectBorderClass = mx.skins.halo.RectBorder;
_global.skinRegistry.RectBorder = true;
return(true);
}
static var symbolName = "RectBorder";
static var symbolOwner = mx.skins.halo.RectBorder;
static var version = "2.0.2.126";
var borderCapColorName = "borderCapColor";
var shadowCapColorName = "shadowCapColor";
var colorList = {highlightColor:0, borderColor:0, buttonColor:0, shadowColor:0, borderCapColor:0, shadowCapColor:0};
var borderWidths = {none:0, solid:1, inset:2, outset:2, alert:3, dropDown:2, menuBorder:2, comboNonEdit:2};
static var classConstructed = classConstruct();
static var UIObjectExtensionsDependency = mx.core.ext.UIObjectExtensions;
}
Symbol 211 MovieClip [__Packages.mx.skins.halo.ButtonSkin] Frame 0
class mx.skins.halo.ButtonSkin extends mx.skins.RectBorder
{
var __get__width, __get__height, getStyle, _parent, clear, drawRoundRect, __get__x, __get__y;
function ButtonSkin () {
super();
}
function init() {
super.init();
}
function size() {
drawHaloRect(__get__width(), __get__height());
}
function drawHaloRect(w, h) {
var _local6 = getStyle("borderStyle");
var _local4 = getStyle("themeColor");
var _local5 = _parent.emphasized;
clear();
switch (_local6) {
case "falseup" :
if (_local5) {
drawRoundRect(__get__x(), __get__y(), w, h, 5, 9542041, 100);
drawRoundRect(__get__x(), __get__y(), w, h, 5, _local4, 75);
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, [3355443, 16777215], 85, 0, "radial");
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, [0, 14342874], 100, 0, "radial");
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, _local4, 75);
drawRoundRect(__get__x() + 3, __get__y() + 3, w - 6, h - 6, 2, 16777215, 100);
drawRoundRect(__get__x() + 3, __get__y() + 4, w - 6, h - 7, 2, 16316664, 100);
} else {
drawRoundRect(0, 0, w, h, 5, 9542041, 100);
drawRoundRect(1, 1, w - 2, h - 2, 4, [13291985, 16250871], 100, 0, "radial");
drawRoundRect(2, 2, w - 4, h - 4, 3, [9542041, 13818586], 100, 0, "radial");
drawRoundRect(3, 3, w - 6, h - 6, 2, 16777215, 100);
drawRoundRect(3, 4, w - 6, h - 7, 2, 16316664, 100);
}
break;
case "falsedown" :
drawRoundRect(__get__x(), __get__y(), w, h, 5, 9542041, 100);
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, [3355443, 16579836], 100, 0, "radial");
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, _local4, 50);
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, [0, 14342874], 100, 0, "radial");
drawRoundRect(__get__x(), __get__y(), w, h, 5, _local4, 40);
drawRoundRect(__get__x() + 3, __get__y() + 3, w - 6, h - 6, 2, 16777215, 100);
drawRoundRect(__get__x() + 3, __get__y() + 4, w - 6, h - 7, 2, _local4, 20);
break;
case "falserollover" :
drawRoundRect(__get__x(), __get__y(), w, h, 5, 9542041, 100);
drawRoundRect(__get__x(), __get__y(), w, h, 5, _local4, 50);
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, [3355443, 16777215], 100, 0, "radial");
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, [0, 14342874], 100, 0, "radial");
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, _local4, 50);
drawRoundRect(__get__x() + 3, __get__y() + 3, w - 6, h - 6, 2, 16777215, 100);
drawRoundRect(__get__x() + 3, __get__y() + 4, w - 6, h - 7, 2, 16316664, 100);
break;
case "falsedisabled" :
drawRoundRect(0, 0, w, h, 5, 13159628, 100);
drawRoundRect(1, 1, w - 2, h - 2, 4, 15921906, 100);
drawRoundRect(2, 2, w - 4, h - 4, 3, 13949401, 100);
drawRoundRect(3, 3, w - 6, h - 6, 2, 15921906, 100);
break;
case "trueup" :
drawRoundRect(__get__x(), __get__y(), w, h, 5, 10066329, 100);
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, [3355443, 16579836], 100, 0, "radial");
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, _local4, 50);
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, [0, 14342874], 100, 0, "radial");
drawRoundRect(__get__x(), __get__y(), w, h, 5, _local4, 40);
drawRoundRect(__get__x() + 3, __get__y() + 3, w - 6, h - 6, 2, 16777215, 100);
drawRoundRect(__get__x() + 3, __get__y() + 4, w - 6, h - 7, 2, 16250871, 100);
break;
case "truedown" :
drawRoundRect(__get__x(), __get__y(), w, h, 5, 10066329, 100);
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, [3355443, 16579836], 100, 0, "radial");
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, _local4, 50);
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, [0, 14342874], 100, 0, "radial");
drawRoundRect(__get__x(), __get__y(), w, h, 5, _local4, 40);
drawRoundRect(__get__x() + 3, __get__y() + 3, w - 6, h - 6, 2, 16777215, 100);
drawRoundRect(__get__x() + 3, __get__y() + 4, w - 6, h - 7, 2, _local4, 20);
break;
case "truerollover" :
drawRoundRect(__get__x(), __get__y(), w, h, 5, 9542041, 100);
drawRoundRect(__get__x(), __get__y(), w, h, 5, _local4, 50);
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, [3355443, 16777215], 100, 0, "radial");
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, _local4, 40);
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, [0, 14342874], 100, 0, "radial");
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, _local4, 40);
drawRoundRect(__get__x() + 3, __get__y() + 3, w - 6, h - 6, 2, 16777215, 100);
drawRoundRect(__get__x() + 3, __get__y() + 4, w - 6, h - 7, 2, 16316664, 100);
break;
case "truedisabled" :
drawRoundRect(0, 0, w, h, 5, 13159628, 100);
drawRoundRect(1, 1, w - 2, h - 2, 4, 15921906, 100);
drawRoundRect(2, 2, w - 4, h - 4, 3, 13949401, 100);
drawRoundRect(3, 3, w - 6, h - 6, 2, 15921906, 100);
}
}
static function classConstruct() {
mx.core.ext.UIObjectExtensions.Extensions();
_global.skinRegistry.ButtonSkin = true;
return(true);
}
static var symbolName = "ButtonSkin";
static var symbolOwner = mx.skins.halo.ButtonSkin;
var className = "ButtonSkin";
var backgroundColorName = "buttonColor";
static var classConstructed = classConstruct();
static var UIObjectExtensionsDependency = mx.core.ext.UIObjectExtensions;
}
Symbol 212 MovieClip [__Packages.com.newgrounds.components.APIConnector] Frame 0
class com.newgrounds.components.APIConnector extends MovieClip
{
var _x, _y, fake_session, api_id, nextFrame, _visible, error_screens, medal_popups, debug, version, local_data, encryption_key, stop, gotoframe_interval, _totalframes, _framesloaded, gotoAndStop;
function APIConnector () {
super();
_x = Math.round(_x);
_y = Math.round(_y);
if (fake_session and (com.newgrounds.API.getHost() == "localhost")) {
com.newgrounds.API.setFakeSession(true);
}
if (api_id && (!com.newgrounds.API.isConnected())) {
(nextFrame());// not popped
_visible = false;
setGotoFrame("connecting");
if (error_screens) {
com.newgrounds.API.addEventListener(com.newgrounds.APIEvent.NEW_VERSION_AVAILABLE, onNewVersion, this);
com.newgrounds.API.addEventListener(com.newgrounds.APIEvent.HOST_BLOCKED, onBadHost, this);
}
if (medal_popups) {
com.newgrounds.API.addEventListener(com.newgrounds.APIEvent.UNLOCK_MEDAL, doUnlock, this);
}
com.newgrounds.API.addEventListener(com.newgrounds.APIEvent.API_CONNECTED, onConnected, this);
if (com.newgrounds.API.isPublishedHost()) {
debug = false;
}
if (version) {
com.newgrounds.API.setVersion(version);
}
if (!com.newgrounds.API.hasUserSession()) {
var _local3 = com.newgrounds.API.loadLocal("api_connector_data");
if (_local3) {
local_data = _local3;
} else {
local_data = {medals_unlocked:new Array()};
}
}
com.newgrounds.API.setPreload(true);
com.newgrounds.API.connect(api_id, encryption_key, debug);
} else if (api_id && (com.newgrounds.API.isConnected())) {
_visible = false;
setGotoFrame("done");
}
(stop());// not popped
}
function doUnlock(e) {
var _local5 = _root.attachMovie("NewgroundsAPIAsset_Medal_Popup", "medal_pop_" + e.data.medal.getID(), _root.getNextHighestDepth());
if (e.data.x != undefined) {
_local5._x = e.data.x + 254;
} else {
_local5._x = Stage.width;
}
if (e.data.x != undefined) {
_local5._y = e.data.y + 73;
} else {
_local5._y = Stage.height;
}
_local5.medal = e.data.medal;
var _local3 = com.newgrounds.API.getMedals();
var _local2 = 0;
while (_local2 < _local3.length) {
if ((_local3[_local2].getID() != e.data.medal.getID()) && (_root["medal_pop_" + _local3[_local2].getID()])) {
_root["medal_pop_" + _local3[_local2].getID()]._y = _root["medal_pop_" + _local3[_local2].getID()]._y - 70;
}
_local2++;
}
}
function onLoginError() {
var _local2 = _root.attachMovie("Asset_Login_Warning", "Asset_Login_Warning", _root.getNextHighestDepth());
}
function onConnectionError() {
var _local3 = _root.attachMovie("Asset_Connection_Error", "Asset_Connection_Error", _root.getNextHighestDepth());
setGotoFrame("done");
}
function onConnected(event, params) {
if (event.success) {
setGotoFrame("connected");
if (((error_screens && (com.newgrounds.API.isPublishedHost())) && (com.newgrounds.API.hasPublisher())) && (!com.newgrounds.API.hasUserSession())) {
onLoginError();
}
} else if (error_screens) {
onConnectionError();
}
}
function onNewVersion() {
var _local2 = _root.attachMovie("NewgroundsAsset_New_Version_Available", "NewgroundsAsset_New_Version_Available", _root.getNextHighestDepth());
_local2.official_version_url = com.newgrounds.API.getOfficialURL();
}
function onBadHost() {
var _local2 = _root.attachMovie("NewgroundsAsset_Illegal_Host", "NewgroundsAsset_Illegal_Host", _root.getNextHighestDepth());
_local2.official_version_url = com.newgrounds.API.getOfficialURL();
}
function setGotoFrame(frame) {
if (goto_frame == null) {
goto_frame = frame;
gotoframe_interval = setInterval(this, "gotoFrameIfLoaded", 50);
}
}
function gotoFrameIfLoaded() {
if ((goto_frame != null) && (_framesloaded == _totalframes)) {
_visible = true;
gotoAndStop(goto_frame);
goto_frame = null;
clearInterval(gotoframe_interval);
}
}
var goto_frame = null;
}
Symbol 290 MovieClip [__Packages.com.newgrounds.ValidationTools] Frame 0
class com.newgrounds.ValidationTools
{
function ValidationTools () {
}
static function isNumber(v) {
if (typeof(v) == "number") {
return(true);
}
if ((typeof(v) == "string") and (Number(v).toString() == v)) {
return(true);
}
return(false);
}
static function isInteger(v) {
if (isNumber(v)) {
v = Number(v);
return(Math.floor(v) == v);
}
return(false);
}
static function isFloat(v) {
return(isNumber(v));
}
static function isString(v) {
if ((typeof(v) == "string") or (typeof(v) == "number")) {
return(true);
}
return(false);
}
static function isEmpty(o) {
for (var _local2 in o) {
return(false);
}
return(true);
}
}
Symbol 295 MovieClip [__Packages.com.newgrounds.encoders.SerialXML] Frame 0
class com.newgrounds.encoders.SerialXML
{
function SerialXML () {
}
static function decode(xml) {
if (!(xml instanceof XML)) {
xml = new XML(xml);
}
var _local2 = populateObject(xml.firstChild, {});
return(_local2.DATA);
}
static function encode(obj) {
var _local1 = new XML();
populateXML(_local1, obj, "DATA");
return(_local1);
}
static function populateObject(child, object) {
var _local6 = child.nodeName;
var _local5 = getValue(_local6, child.attributes.v);
var _local4 = child.attributes.n;
if (object instanceof Array) {
_local4 = object.length;
object.push(_local5);
} else {
object[_local4] = _local5;
}
if (child.hasChildNodes()) {
var _local1 = 0;
while (_local1 < child.childNodes.length) {
populateObject(child.childNodes[_local1], object[_local4]);
_local1++;
}
}
return(object);
}
static function populateXML(child, obj, name) {
if (obj === undefined) {
return(undefined);
}
var _local5 = new XML();
var _local2;
if (obj instanceof Array) {
_local2 = _local5.createElement(getType(obj));
if (name) {
_local2.attributes.n = name;
}
child.appendChild(_local2);
var _local4 = 0;
while (_local4 < obj.length) {
populateXML(_local2, obj[_local4]);
_local4++;
}
} else if (typeof(obj) == "object") {
_local2 = _local5.createElement(getType(obj));
if (name) {
_local2.attributes.n = name;
}
child.appendChild(_local2);
for (var _local4 in obj) {
populateXML(_local2, obj[_local4], _local4);
}
} else {
_local2 = _local5.createElement(getType(obj));
if (name) {
_local2.attributes.n = name;
}
if (getType(obj).length == 1) {
_local2.attributes.v = obj;
}
child.appendChild(_local2);
}
}
static function getValue(type, stringval) {
switch (type.toUpperCase()) {
case "O" :
return(new Object());
case "A" :
return(new Array());
case "N" :
return(Number(stringval));
case "S" :
return(String(stringval));
case "TRUE" :
return(true);
case "FALSE" :
return(false);
}
return(null);
}
static function getType(obj) {
switch (((obj instanceof Array) ? "array" : (typeof(obj)))) {
case "array" :
return("A");
case "object" :
return("O");
case "string" :
return("S");
case "number" :
return("N");
case "boolean" :
return(((obj === true) ? "TRUE" : "FALSE"));
}
return("NULL");
}
}
Symbol 296 MovieClip [__Packages.com.newgrounds.encoders.LZW2] Frame 0
class com.newgrounds.encoders.LZW2
{
static var comp_dict, pos, result, buffer, nbChar, splitStr, len, local, interval;
function LZW2 () {
}
static function doCompressorConfig() {
comp_dict = [];
var _local1 = 0;
while (_local1 < 256) {
comp_dict[String.fromCharCode(_local1)] = _local1;
_local1++;
}
comp_dict["<"] = 256;
comp_dict[">"] = 257;
comp_dict["&"] = 258;
comp_dict["\""] = 259;
comp_dict["'"] = 260;
pos = 0;
result = "";
buffer = "";
nbChar = 256 + skipnum;
}
static function compress(string, callback, callback_params) {
doCompressorConfig();
if (busy) {
trace("[LZW COMPRESSOR] :: Compression can not begin until previous compression or decompression is complete!");
return(undefined);
}
splitStr = string.split("");
string = "";
len = splitStr.length;
local = {delay:30, callback:callback, callback_params:callback_params, compress_chunk:function () {
com.newgrounds.encoders.LZW2.compress_chunk();
}, busy:false, complete:false};
interval = setInterval(local, "compress_chunk", 5);
}
static function getProgress() {
return(Math.round((pos / len) * 100));
}
static function compress_chunk() {
if (local.delay > 0) {
local.delay--;
} else if (!local.busy) {
local.busy = true;
var _local1 = 0;
while (_local1 < max_chunk_length) {
encode_next();
if (local.complete) {
break;
}
_local1++;
}
local.busy = false;
}
if (local.complete) {
trace((((((((("LZW2 complete " + nbChar) + " ") + comp_dict.length) + " ") + len) + " ") + pos) + " ") + skipnum);
clearInterval(interval);
local.callback(result, local.callback_params);
result = "";
buffer = "";
}
}
static function encode_next() {
if (pos <= len) {
var _local1 = splitStr[pos];
if (!(comp_dict[buffer + _local1] === undefined)) {
buffer = buffer + _local1;
} else {
result = result + String.fromCharCode(comp_dict[buffer]);
comp_dict[buffer + _local1] = nbChar;
nbChar++;
buffer = _local1;
}
pos++;
} else {
local.complete = true;
return(undefined);
}
}
static var comp_config = false;
static var skipnum = 5;
static var busy = false;
static var max_chunk_length = 12000;
}
Symbol 297 MovieClip [__Packages.com.newgrounds.encoders.LZW] Frame 0
class com.newgrounds.encoders.LZW
{
function LZW () {
}
static function setXMLSafe(x) {
xmlsafe = x;
}
static function compress(str, escape_chars) {
var _local2 = new Array();
var _local11 = (xmlsafe ? 5 : 0);
var _local5 = 0;
while (_local5 < 256) {
_local2[String.fromCharCode(_local5)] = _local5;
_local5++;
}
if (xmlsafe) {
_local2["<"] = 256;
_local2[">"] = 257;
_local2["&"] = 258;
_local2["\""] = 259;
_local2["'"] = 260;
}
var _local7 = "";
var _local8 = str.split("");
var _local9 = _local8.length;
var _local6 = 256 + _local11;
var _local1 = "";
var _local4;
_local5 = 0;
while (_local5 <= _local9) {
var _local3 = _local8[_local5];
if (!(_local2[_local1 + _local3] === undefined)) {
_local1 = _local1 + _local3;
} else {
_local4 = String.fromCharCode(_local2[_local1]);
if (escape_chars and (((_local2[_local1] < 33) or (_local2[_local1] > 126)) or (_local4 == "%"))) {
_local4 = escape(_local4);
}
_local7 = _local7 + _local4;
_local2[_local1 + _local3] = _local6;
_local6++;
_local1 = _local3;
}
_local5++;
}
return(_local7);
}
static function decompress(str) {
var _local4 = new Array();
var _local10 = (xmlsafe ? 5 : 0);
var _local6 = 0;
while (_local6 < 256) {
var _local9 = String.fromCharCode(_local6);
_local4[_local6] = _local9;
_local6++;
}
if (xmlsafe) {
_local4[256] = "<";
_local4[257] = ">";
_local4[258] = "&";
_local4[259] = "\"";
_local4[260] = "'";
}
var _local11 = str;
var _local13 = _local11.split("");
var _local12 = _local13.length;
var _local7 = 256 + _local10;
var _local1 = "";
var _local2 = "";
var _local8 = "";
_local6 = 0;
while (_local6 < _local12) {
var _local5 = _local11.charCodeAt(_local6);
var _local3 = _local4[_local5];
if (_local1 == "") {
_local1 = _local3;
_local8 = _local8 + _local3;
} else if (_local5 <= (255 + _local10)) {
_local8 = _local8 + _local3;
_local2 = _local1 + _local3;
_local4[_local7] = _local2;
_local7++;
_local1 = _local3;
} else {
_local2 = _local4[_local5];
if (_local2 == undefined) {
_local2 = _local1 + _local1.slice(0, 1);
}
_local8 = _local8 + _local2;
_local4[_local7] = _local1 + _local2.slice(0, 1);
_local7++;
_local1 = _local2;
}
_local6++;
}
return(_local8);
}
static function compress_fp6(str) {
var _local3 = new Array();
var _local10 = (xmlsafe ? 5 : 0);
var _local4 = 0;
while (_local4 < 256) {
_local3[String(_local4)] = _local4;
_local4++;
}
if (xmlsafe) {
var _local14 = String(new String("<").charCodeAt(0));
var _local11 = String(new String(">").charCodeAt(0));
var _local13 = String(new String("&").charCodeAt(0));
var _local15 = String(new String("\"").charCodeAt(0));
var _local12 = String(new String("'").charCodeAt(0));
_local3[_local14] = 256;
_local3[_local11] = 257;
_local3[_local13] = 258;
_local3[_local15] = 259;
_local3[_local12] = 260;
}
var _local7 = "";
var _local16 = str;
var _local8 = _local16.split("");
var _local9 = _local8.length;
var _local6 = 256 + _local10;
var _local1 = new Array();
_local4 = 0;
while (_local4 <= _local9) {
var _local2 = _local8[_local4];
if (_local1.length == 0) {
var _local5 = String(_local2.charCodeAt(0));
} else {
var _local5 = (_local1.join("-") + "-") + String(_local2.charCodeAt(0));
}
if (!(_local3[_local5] === undefined)) {
_local1.push(_local2.charCodeAt(0));
} else {
_local7 = _local7 + String.fromCharCode(_local3[_local1.join("-")]);
_local3[_local5] = _local6;
_local6++;
_local1 = new Array();
_local1.push(_local2.charCodeAt(0));
}
_local4++;
}
return(_local7);
}
static var xmlsafe = false;
}
Symbol 299 MovieClip [__Packages.com.newgrounds.Medal] Frame 0
class com.newgrounds.Medal
{
var _medal_id, _medal_name, _medal_value, _medal_difficulty;
function Medal (id, name, value, difficulty, unlocked, _icon_url) {
if ((((id == undefined) || (name == undefined)) || (value == undefined)) || (difficulty == undefined)) {
com.newgrounds.API.fatalError("Medal instances require an id, name, value and difficulty");
}
_medal_id = id;
_medal_name = name;
_medal_value = value;
_medal_difficulty = difficulty;
if (unlocked) {
_medal_unlocked = true;
}
if (_icon_url) {
this._icon_url = _icon_url;
}
}
function get difficulty() {
return(difficulty_names[_medal_difficulty]);
}
function get difficultyId() {
return(_medal_difficulty);
}
function get icon_url() {
return(_icon_url);
}
function get id() {
return(_medal_id);
}
function get name() {
return(_medal_name);
}
function get unlocked() {
return(_medal_unlocked);
}
function get value() {
return(_medal_value);
}
function isUnlocked() {
return(_medal_unlocked);
}
function unlock() {
if (!isUnlocked()) {
com.newgrounds.API.unlockMedal(this);
}
}
function setUnlocked(u) {
_medal_unlocked = u;
}
function attachIcon(target, depth) {
if (!depth) {
depth = target.getNextHighestDepth();
}
var _local3 = target.createEmptyMovieClip("Asset_Medal_Icon_" + getID(), depth);
if (_icon_url) {
_local3.loadMovie(_icon_url);
} else {
var _local4 = flash.display.BitmapData.loadBitmap("Asset_default_medal_icon_" + getDifficulty(), depth);
_local3.attachBitmap(_local4, depth, true);
}
}
function getID() {
return(_medal_id);
}
function getName() {
return(_medal_name);
}
function getValue() {
return(_medal_value);
}
function getDifficulty(as_string) {
if (as_string) {
return(difficulty_names[_medal_difficulty]);
}
return(_medal_difficulty);
}
var _medal_unlocked = false;
var _icon_loaded = false;
var _icon_width = 50;
var _icon_height = 50;
var _icon_url = null;
static var difficulty_names = new Array(null, "Easy", "Moderate", "Challenging", "Difficult", "Brutal");
}
Symbol 300 MovieClip [__Packages.com.newgrounds.ScoreBoard] Frame 0
class com.newgrounds.ScoreBoard
{
var _name, _id, _scores;
function ScoreBoard (id, name, tag) {
_name = name;
_id = id;
if (!(tag === undefined)) {
_tag = tag;
}
}
function exists() {
return(Number(_id) > 0);
}
function get id() {
return(_id);
}
function get name() {
return(_name);
}
function get period() {
return(_period);
}
function get tag() {
return(_tag);
}
function get page() {
return(_page);
}
function get num_results() {
return(_num_results);
}
function get scores() {
return(_scores);
}
function postScore(value, tag) {
if (!(tag === undefined)) {
_tag = tag;
}
com.newgrounds.API.postScore(_name, value, _tag);
}
function loadScores(period, page, num_results, tag) {
if (period) {
_period = period;
}
if (page) {
_page = page;
}
if (num_results) {
_num_results = num_results;
}
_scores = [];
com.newgrounds.API.loadScores(_name, _period, tag);
}
function setScores(scores, period, page, num_results) {
if (period) {
_period = period;
}
if (page) {
_page = page;
}
if (num_results) {
_num_results = num_results;
}
_scores = [];
var _local2 = 0;
while (_local2 < scores.length) {
var _local4 = ((_num_results * (_page - 1)) + 1) + _local2;
_scores.push(new com.newgrounds.Score(this, _local4, scores[_local2].username, scores[_local2].value, scores[_local2].numeric_value));
_local2++;
}
}
var _period = "Today";
var _num_results = 10;
var _page = 1;
var _tag = "";
}
Symbol 301 MovieClip [__Packages.com.newgrounds.Score] Frame 0
class com.newgrounds.Score
{
var _board, _position, _username, _value, _numeric_value;
function Score (board, position, username, value, numeric_value) {
_board = board;
_position = position;
_username = username;
_value = value;
_numeric_value = numeric_value;
}
function get board() {
return(_board);
}
function get position() {
return(_position);
}
function get username() {
return(_username);
}
function get value() {
return(_value);
}
function get numeric_value() {
return(_numeric_value);
}
static function fromTime(time) {
var _local1 = time.split(":");
var _local2 = Math.round(Number(_local1.pop()) * 1000);
if (_local1.length > 0) {
_local2 = _local2 + (Number(_local1.pop()) * 60);
}
if (_local1.length > 0) {
_local2 = _local2 + (Number(_local1.pop()) * 3600);
}
return(_local2);
}
static function fromDistance(distance) {
var _local1 = distance.indexOf("'");
var _local5 = distance.indexOf("\"", _local1);
var _local3 = Number(distance.substr(0, _local1));
var _local4 = Number(distance.substring(_local1 + 1, _local5));
return(Math.round((_local3 * 12) + _local4));
}
}
Symbol 302 MovieClip [__Packages.com.newgrounds.encoders.RC4] Frame 0
class com.newgrounds.encoders.RC4
{
function RC4 () {
}
static function encrypt(src, key) {
var _local3 = strToChars(src);
var _local1 = strToChars(key);
var _local2 = calculate(_local3, _local1);
return(charsToHex(_local2));
}
static function encryptbin(src, key) {
var _local3 = strToChars(src);
var _local1 = strToChars(key);
var _local2 = calculate(_local3, _local1);
return(_local2);
}
static function decrypt(src, key) {
var _local3 = hexToChars(src);
var _local1 = strToChars(key);
var _local2 = calculate(_local3, _local1);
return(charsToStr(_local2));
}
static function initialize(pwd) {
var _local2 = 0;
var _local3;
var _local4 = pwd.length;
var _local1 = 0;
while (_local1 <= 255) {
mykey[_local1] = pwd[_local1 % _local4];
sbox[_local1] = _local1;
_local1++;
}
_local1 = 0;
while (_local1 <= 255) {
_local2 = ((_local2 + sbox[_local1]) + mykey[_local1]) % 256;
_local3 = sbox[_local1];
sbox[_local1] = sbox[_local2];
sbox[_local2] = _local3;
_local1++;
}
}
static function calculate(plaintxt, psw) {
initialize(psw);
var _local1 = 0;
var _local2 = 0;
var _local9 = new Array();
var _local7;
var _local5;
var _local6;
var _local3 = 0;
while (_local3 < plaintxt.length) {
_local1 = (_local1 + 1) % 256;
_local2 = (_local2 + sbox[_local1]) % 256;
_local5 = sbox[_local1];
sbox[_local1] = sbox[_local2];
sbox[_local2] = _local5;
var _local4 = (sbox[_local1] + sbox[_local2]) % 256;
_local7 = sbox[_local4];
_local6 = plaintxt[_local3] ^ _local7;
_local9.push(_local6);
_local3++;
}
return(_local9);
}
static function charsToHex(chars) {
var _local4 = new String("");
var _local3 = new Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f");
var _local1 = 0;
while (_local1 < chars.length) {
_local4 = _local4 + (_local3[chars[_local1] >> 4] + _local3[chars[_local1] & 15]);
_local1++;
}
return(_local4);
}
static function hexToChars(hex) {
var _local3 = new Array();
var _local1 = ((hex.substr(0, 2) == "0x") ? 2 : 0);
while (_local1 < hex.length) {
_local3.push(parseInt(hex.substr(_local1, 2), 16));
_local1 = _local1 + 2;
}
return(_local3);
}
static function charsToStr(chars) {
var _local3 = new String("");
var _local1 = 0;
while (_local1 < chars.length) {
_local3 = _local3 + String.fromCharCode(chars[_local1]);
_local1++;
}
return(_local3);
}
static function strToChars(str) {
var _local3 = new Array();
var _local1 = 0;
while (_local1 < str.length) {
_local3.push(str.charCodeAt(_local1));
_local1++;
}
return(_local3);
}
static var sbox = new Array(255);
static var mykey = new Array(255);
}
Symbol 303 MovieClip [__Packages.com.newgrounds.encoders.JSON] Frame 0
class com.newgrounds.encoders.JSON
{
static var start, cache, interval;
function JSON () {
}
static function encode(arg, noquotes) {
var _local3;
var _local2;
var _local6;
var _local1 = "";
var _local4;
if (arg.isSServerVar()) {
var _local8 = "sservervariable";
} else {
var _local8 = typeof(arg);
}
switch (_local8) {
case "sservervariable" :
return("?" + arg.getEncodedValue());
case "object" :
if (arg) {
if (arg instanceof Array) {
_local2 = 0;
while (_local2 < arg.length) {
_local4 = encode(arg[_local2]);
if (_local1) {
_local1 = _local1 + ",";
}
_local1 = _local1 + _local4;
_local2++;
}
return(("[" + _local1) + "]");
}
if (typeof(arg.toString) != "undefined") {
for (_local2 in arg) {
_local4 = arg[_local2];
if ((typeof(_local4) != "undefined") && (typeof(_local4) != "function")) {
_local4 = encode(_local4);
if (_local1) {
_local1 = _local1 + ",";
}
_local1 = _local1 + ((encode(_local2) + ":") + _local4);
}
}
return(("{" + _local1) + "}");
}
}
return("null");
case "number" :
return((isFinite(arg) ? (String(arg)) : "null"));
case "string" :
_local6 = arg.length;
if (noquotes) {
var _local7 = "";
} else {
var _local7 = "\"";
}
_local1 = _local7;
_local2 = 0;
while (_local2 < _local6) {
_local3 = arg.charAt(_local2);
if (_local3 >= " ") {
if ((_local3 == "\\") || (_local3 == "\"")) {
_local1 = _local1 + "\\";
}
_local1 = _local1 + _local3;
} else {
switch (_local3) {
case "\b" :
_local1 = _local1 + "\\b";
break;
case "\f" :
_local1 = _local1 + "\\f";
break;
case newline :
_local1 = _local1 + "\\n";
break;
case "\r" :
_local1 = _local1 + "\\r";
break;
case "\t" :
_local1 = _local1 + "\\t";
break;
default :
_local3 = _local3.charCodeAt();
_local1 = _local1 + (("\\u00" + Math.floor(_local3 / 16).toString(16)) + (_local3 % 16).toString(16));
}
}
_local2 = _local2 + 1;
}
return(_local1 + _local7);
case "boolean" :
return(String(arg));
}
return("null");
}
static function background_encode(arg, callback) {
if (busy) {
trace("[Newgrounds Encoder] :: Cannot encode a new file until the previous file is completed");
return(false);
}
if (!callback) {
trace("[Newgrounds Encoder] :: Missing a callback function, skipping encode");
return(false);
}
busy = true;
var _local2 = new Date();
start = _local2.getTime();
cache = {busy:false, complete:false, arg:arg, target:arg, parents:[], encoded:"", callback:callback, encode_chunk:function () {
com.newgrounds.encoders.JSON.encode_chunk();
}};
if (getType(arg) == "object") {
cache.encoded = "{";
} else if (getType(arg) == "array") {
cache.encoded = "[";
}
interval = setInterval(cache, "encode_chunk", 25);
return(true);
}
static function background_decode(arg, callback) {
if (busy) {
trace("[Newgrounds Encoder] :: Cannot decode a new file until the previous file is completed");
return(false);
}
if (!callback) {
trace("[Newgrounds Encoder] :: Missing a callback function, skipping decode");
return(false);
}
busy = true;
var _local1 = new Date();
start = _local1.getTime();
cache = {busy:false, callback:callback, complete:false, arg:arg, pos:0, parents:["root"], target:null, scratch:"", decode_chunk:function () {
com.newgrounds.encoders.JSON.decode_chunk();
}};
interval = setInterval(cache, "decode_chunk", 25);
return(true);
}
static function decode(text) {
var at = 0;
var ch = " ";
var _value;
var _error = function (m) {
throw {name:"JSONError", message:m, at:at - 1, text:text};
};
var _next = function () {
ch = text.charAt(at);
at = at + 1;
return(ch);
};
var _white = function () {
while (ch) {
if (ch <= " ") {
_next();
} else if (ch == "/") {
switch (_next()) {
case "/" :
while ((_next() && (ch != newline)) && (ch != "\r")) {
}
break;
case "*" :
_next();
for(;;){
if (ch) {
if (ch == "*") {
if (_next() == "/") {
_next();
// unexpected jump
}
} else {
_next();
}
} else {
_error("Unterminated comment");
}
};
break;
default :
_error("Syntax error");
}
} else {
return;
}
}
};
var _string = function () {
var _local4;
var _local1 = "";
var _local3;
var _local2;
var _local5 = false;
if (ch == "\"") {
while (_next()) {
if (ch == "\"") {
_next();
return(_local1);
}
if (ch == "\\") {
switch (_next()) {
case "b" :
_local1 = _local1 + "\b";
break;
case "f" :
_local1 = _local1 + "\f";
break;
case "n" :
_local1 = _local1 + newline;
break;
case "r" :
_local1 = _local1 + "\r";
break;
case "t" :
_local1 = _local1 + "\t";
break;
case "u" :
_local2 = 0;
_local4 = 0;
while (_local4 < 4) {
_local3 = parseInt(_next(), 16);
if (!isFinite(_local3)) {
_local5 = true;
break;
}
_local2 = (_local2 * 16) + _local3;
_local4 = _local4 + 1;
}
if (_local5) {
_local5 = false;
break;
}
_local1 = _local1 + String.fromCharCode(_local2);
break;
default :
_local1 = _local1 + ch;
}
} else {
_local1 = _local1 + ch;
}
}
}
_error("Bad string");
};
var _array = function () {
var _local1 = [];
if (ch == "[") {
_next();
_white();
if (ch == "]") {
_next();
return(_local1);
}
while (ch) {
_local1.push(_value());
_white();
if (ch == "]") {
_next();
return(_local1);
}
if (ch != ",") {
break;
}
_next();
_white();
}
}
_error("Bad array");
};
var _object = function () {
var _local2;
var _local1 = {};
if (ch == "{") {
_next();
_white();
if (ch == "}") {
_next();
return(_local1);
}
while (ch) {
_local2 = _string();
_white();
if (ch != ":") {
break;
}
_next();
_local1[_local2] = _value();
_white();
if (ch == "}") {
_next();
return(_local1);
}
if (ch != ",") {
break;
}
_next();
_white();
}
}
_error("Bad object");
};
var _number = function () {
var _local1 = "";
var _local2;
if (ch == "-") {
_local1 = "-";
_next();
}
while ((ch >= "0") && (ch <= "9")) {
_local1 = _local1 + ch;
_next();
}
if (ch == ".") {
_local1 = _local1 + ".";
while ((_next() && (ch >= "0")) && (ch <= "9")) {
_local1 = _local1 + ch;
}
}
_local2 = 1 * _local1;
if (!isFinite(_local2)) {
_error("Bad number");
} else {
return(_local2);
}
};
var _word = function () {
switch (ch) {
case "t" :
if (((_next() == "r") && (_next() == "u")) && (_next() == "e")) {
_next();
return(true);
}
break;
case "f" :
if ((((_next() == "a") && (_next() == "l")) && (_next() == "s")) && (_next() == "e")) {
_next();
return(false);
}
break;
case "n" :
if (!(((_next() == "u") && (_next() == "l")) && (_next() == "l"))) {
break;
}
_next();
return(null);
}
_error("Syntax error");
};
_value = function () {
_white();
switch (ch) {
case "{" :
return(_object());
case "[" :
return(_array());
case "\"" :
return(_string());
case "-" :
return(_number());
}
return((((ch >= "0") && (ch <= "9")) ? (_number()) : (_word())));
};
return(_value());
}
static function getType(v) {
if (v instanceof Array) {
return("array");
}
return(typeof(v));
}
static function decode_chunk() {
if ((!cache.busy) && (!cache.complete)) {
cache.busy = true;
var _local1 = 0;
while (_local1 < decode_chunks) {
chunk_decoder();
if (cache.complete) {
break;
}
_local1++;
}
trace(Math.round((cache.pos / cache.arg.length) * 100) + "% decoded");
cache.busy = false;
}
if (cache.complete) {
var _local2 = new Date();
busy = false;
clearInterval(interval);
cache.callback(cache.root, _local2.getTime() - start);
cache.arg = "";
}
}
static function encode_chunk() {
if ((!cache.busy) && (!cache.complete)) {
cache.busy = true;
var _local1 = 0;
while (_local1 < encode_chunks) {
chunk_encoder();
if (cache.complete) {
break;
}
_local1++;
}
cache.busy = false;
}
if (cache.complete) {
var _local3 = new Date();
var _local2 = _local3.getTime();
busy = false;
clearInterval(interval);
cache.callback(cache.encoded, _local2 - start);
cache.encoded = "";
}
}
static function chunk_decoder() {
function _object() {
var _local1 = com.newgrounds.encoders.JSON.cache.arg.charAt(com.newgrounds.encoders.JSON.cache.pos);
if (!com.newgrounds.encoders.JSON.cache.mode) {
com.newgrounds.encoders.JSON.cache.mode = "object";
com.newgrounds.encoders.JSON.cache.pos++;
_local1 = com.newgrounds.encoders.JSON.cache.arg.charAt(com.newgrounds.encoders.JSON.cache.pos);
if (_local1 != "\"") {
throw "Malformed object key in encoded string. Keys must be wrapped in quotes (\"\")";
}
com.newgrounds.encoders.JSON.cache.scratch = "";
_setTargetValue({});
} else if (_local1 == ",") {
com.newgrounds.encoders.JSON.cache.pos++;
_local1 = com.newgrounds.encoders.JSON.cache.arg.charAt(com.newgrounds.encoders.JSON.cache.pos);
if (_local1 != "\"") {
throw "Malformed object key in encoded string. Keys must be wrapped in quotes (\"\")";
}
com.newgrounds.encoders.JSON.cache.scratch = "";
} else if (_local1 == "}") {
_useParent();
} else if (_local1 == "\"") {
com.newgrounds.encoders.JSON.cache.pos++;
_local1 = com.newgrounds.encoders.JSON.cache.arg.charAt(com.newgrounds.encoders.JSON.cache.pos);
if (_local1 != ":") {
throw "Malformed object notation. Object keys and values must be separated by colons(:)";
}
_addParent(com.newgrounds.encoders.JSON.cache.scratch);
com.newgrounds.encoders.JSON.cache.mode = null;
} else {
if (_local1 == "\\") {
com.newgrounds.encoders.JSON.cache.pos++;
_local1 = com.newgrounds.encoders.JSON.cache.arg.charAt(com.newgrounds.encoders.JSON.cache.pos);
}
com.newgrounds.encoders.JSON.cache.scratch = com.newgrounds.encoders.JSON.cache.scratch + _local1;
}
com.newgrounds.encoders.JSON.cache.pos++;
}
function _array() {
var _local1 = com.newgrounds.encoders.JSON.cache.arg.charAt(com.newgrounds.encoders.JSON.cache.pos);
if (!com.newgrounds.encoders.JSON.cache.mode) {
com.newgrounds.encoders.JSON.cache.mode = "array";
com.newgrounds.encoders.JSON.cache.pos++;
_local1 = com.newgrounds.encoders.JSON.cache.arg.charAt(com.newgrounds.encoders.JSON.cache.pos);
_setTargetValue([]);
if (_local1 != "]") {
_addArrayKey();
} else {
_useParent();
}
return(undefined);
}
if (_local1 == ",") {
_addArrayKey();
} else if (_local1 == "]") {
_useParent();
}
com.newgrounds.encoders.JSON.cache.pos++;
}
function _boolean() {
var _local1 = com.newgrounds.encoders.JSON.cache.arg.charAt(com.newgrounds.encoders.JSON.cache.pos);
if (_local1 == "t") {
_setTargetValue(true);
com.newgrounds.encoders.JSON.cache.pos = com.newgrounds.encoders.JSON.cache.pos + 3;
} else if (_local1 == "f") {
_setTargetValue(false);
com.newgrounds.encoders.JSON.cache.pos = com.newgrounds.encoders.JSON.cache.pos + 4;
} else {
throw "Bool values must be true or false";
}
_useParent();
}
function _null() {
var _local1 = com.newgrounds.encoders.JSON.cache.arg.charAt(com.newgrounds.encoders.JSON.cache.pos);
if (_local1 == "n") {
_setTargetValue(null);
com.newgrounds.encoders.JSON.cache.pos = com.newgrounds.encoders.JSON.cache.pos + 2;
} else {
throw "Null values must be null";
}
_useParent();
}
function _string() {
var _local1 = com.newgrounds.encoders.JSON.cache.arg.charAt(com.newgrounds.encoders.JSON.cache.pos);
if (!com.newgrounds.encoders.JSON.cache.mode) {
if (_local1 != "\"") {
throw "Strings must be wrapped in quotes (\"\")";
}
com.newgrounds.encoders.JSON.cache.scratch = "";
com.newgrounds.encoders.JSON.cache.mode = "string";
} else if (_local1 == "\"") {
_setTargetValue(com.newgrounds.encoders.JSON.cache.scratch);
_useParent();
} else {
if (_local1 == "\\") {
com.newgrounds.encoders.JSON.cache.pos++;
_local1 = com.newgrounds.encoders.JSON.cache.arg.charAt(com.newgrounds.encoders.JSON.cache.pos);
switch (_local1) {
case "n" :
_local1 = newline;
break;
case "r" :
_local1 = newline;
break;
case "t" :
_local1 = "\t";
break;
case "u" :
_local1 = "\\" + _local1;
}
}
com.newgrounds.encoders.JSON.cache.scratch = com.newgrounds.encoders.JSON.cache.scratch + _local1;
}
com.newgrounds.encoders.JSON.cache.pos++;
}
function _number() {
var _local1 = com.newgrounds.encoders.JSON.cache.arg.charAt(com.newgrounds.encoders.JSON.cache.pos);
var _local2 = "01234567890.-";
if (!com.newgrounds.encoders.JSON.cache.mode) {
com.newgrounds.encoders.JSON.cache.mode = "number";
com.newgrounds.encoders.JSON.cache.scratch = "";
}
if (_local2.indexOf(_local1) < 0) {
_setTargetValue(Number(com.newgrounds.encoders.JSON.cache.scratch));
_useParent();
} else {
com.newgrounds.encoders.JSON.cache.scratch = com.newgrounds.encoders.JSON.cache.scratch + _local1;
com.newgrounds.encoders.JSON.cache.pos++;
}
}
function _setTargetValue(newval) {
var _local2 = _getParent().obj;
var _local1 = com.newgrounds.encoders.JSON.cache.parents[com.newgrounds.encoders.JSON.cache.parents.length - 1];
_local2[_local1] = newval;
}
function _useParent() {
com.newgrounds.encoders.JSON.cache.mode = com.newgrounds.encoders.JSON.getType(_getParent().obj);
com.newgrounds.encoders.JSON.cache.parents.pop();
}
function _getParent() {
var _local2 = com.newgrounds.encoders.JSON.cache;
var _local1 = 0;
while (_local1 < (com.newgrounds.encoders.JSON.cache.parents.length - 1)) {
_local2 = _local2[com.newgrounds.encoders.JSON.cache.parents[_local1]];
_local1++;
}
return({obj:_local2, name:com.newgrounds.encoders.JSON.cache.parents[_local1]});
}
function _getCurrent() {
var _local2 = com.newgrounds.encoders.JSON.cache;
var _local1 = 0;
while (_local1 < com.newgrounds.encoders.JSON.cache.parents.length) {
_local2 = _local2[com.newgrounds.encoders.JSON.cache.parents[_local1]];
_local1++;
}
return({obj:_local2, name:com.newgrounds.encoders.JSON.cache.parents[_local1]});
}
function _addParent(child) {
com.newgrounds.encoders.JSON.cache.parents.push(child);
}
function _addArrayKey() {
var _local1 = _getCurrent().obj.length;
com.newgrounds.encoders.JSON.cache.parents.push(_local1);
com.newgrounds.encoders.JSON.cache.mode = null;
}
if (cache.pos >= cache.arg.length) {
cache.complete = true;
return(undefined);
}
if (cache.mode) {
eval ("_" + cache.mode)();
} else {
var char = cache.arg.charAt(cache.pos);
switch (char) {
case "{" :
_object();
return;
case "[" :
_array();
return;
case "\"" :
_string();
return;
case "n" :
_null();
return;
case "t" :
_boolean();
return;
case "f" :
_boolean();
return;
default :
_number();
}
}
}
static function chunk_encoder() {
if (cache.complete) {
return(undefined);
}
var _local2 = getType(cache.target);
switch (_local2) {
case "number" :
cache.encoded = cache.encoded + cache.target;
getParent();
break;
case "string" :
cache.encoded = cache.encoded + (("\"" + cache.target.split("\"").join("\\\"")) + "\"");
getParent();
break;
case "boolean" :
cache.encoded = cache.encoded + ((cache.target == true) ? "true" : "false");
getParent();
break;
case "null" :
cache.encoded = cache.encoded + "null";
getParent();
break;
case "array" :
if (cache.target.length < 1) {
cache.encoded = cache.encoded + "]";
getParent();
} else {
cache.parents.push(cache.target);
cache.target = cache.target[0];
if (getType(cache.target) == "array") {
cache.encoded = cache.encoded + "[";
} else if (getType(cache.target) == "object") {
cache.encoded = cache.encoded + "{";
}
}
break;
case "object" :
for (var _local1 in cache.target) {
break;
}
if (_local1 === undefined) {
cache.encoded = cache.encoded + "}";
getParent();
} else {
cache.parents.push(cache.target);
cache.target = cache.target[_local1];
cache.encoded = cache.encoded + (("\"" + _local1.split("\"").join("\\\"")) + "\":");
if (getType(cache.target) == "array") {
cache.encoded = cache.encoded + "[";
} else if (getType(cache.target) == "object") {
cache.encoded = cache.encoded + "{";
}
}
break;
default :
cache.encoded = cache.encoded + "null";
getParent();
}
}
static function getParent() {
if (cache.parents.length > 0) {
var _local1 = cache.parents.pop();
if (getType(_local1) == "array") {
_local1.shift();
} else {
for (var _local3 in _local1) {
delete _local1[_local3];
break;
}
}
if ((getType(_local1) == "object") or (getType(_local1) == "array")) {
for (var _local2 in _local1) {
break;
}
if (!(_local2 === undefined)) {
cache.encoded = cache.encoded + ",";
}
}
cache.target = _local1;
} else {
cache.complete = true;
}
}
static var encode_chunks = 20000;
static var decode_chunks = 20000;
static var busy = false;
}
Symbol 305 MovieClip [__Packages.com.newgrounds.encoders.MD5] Frame 0
class com.newgrounds.encoders.MD5
{
function MD5 () {
}
static function calculate(src) {
return(hex_md5(src));
}
static function hex_md5(src) {
return(binl2hex(core_md5(str2binl(src), src.length * 8)));
}
static function core_md5(x, len) {
x[len >> 5] = x[len >> 5] | (128 << (len % 32));
x[(((len + 64) >>> 9) << 4) + 14] = len;
var _local4 = 1732584193 /* 0x67452301 */;
var _local3 = -271733879;
var _local2 = -1732584194;
var _local1 = 271733878 /* 0x10325476 */;
var _local5 = 0;
while (_local5 < x.length) {
var _local10 = _local4;
var _local9 = _local3;
var _local8 = _local2;
var _local7 = _local1;
_local4 = md5_ff(_local4, _local3, _local2, _local1, x[_local5 + 0], 7, -680876936);
_local1 = md5_ff(_local1, _local4, _local3, _local2, x[_local5 + 1], 12, -389564586);
_local2 = md5_ff(_local2, _local1, _local4, _local3, x[_local5 + 2], 17, 606105819);
_local3 = md5_ff(_local3, _local2, _local1, _local4, x[_local5 + 3], 22, -1044525330);
_local4 = md5_ff(_local4, _local3, _local2, _local1, x[_local5 + 4], 7, -176418897);
_local1 = md5_ff(_local1, _local4, _local3, _local2, x[_local5 + 5], 12, 1200080426);
_local2 = md5_ff(_local2, _local1, _local4, _local3, x[_local5 + 6], 17, -1473231341);
_local3 = md5_ff(_local3, _local2, _local1, _local4, x[_local5 + 7], 22, -45705983);
_local4 = md5_ff(_local4, _local3, _local2, _local1, x[_local5 + 8], 7, 1770035416);
_local1 = md5_ff(_local1, _local4, _local3, _local2, x[_local5 + 9], 12, -1958414417);
_local2 = md5_ff(_local2, _local1, _local4, _local3, x[_local5 + 10], 17, -42063);
_local3 = md5_ff(_local3, _local2, _local1, _local4, x[_local5 + 11], 22, -1990404162);
_local4 = md5_ff(_local4, _local3, _local2, _local1, x[_local5 + 12], 7, 1804603682);
_local1 = md5_ff(_local1, _local4, _local3, _local2, x[_local5 + 13], 12, -40341101);
_local2 = md5_ff(_local2, _local1, _local4, _local3, x[_local5 + 14], 17, -1502002290);
_local3 = md5_ff(_local3, _local2, _local1, _local4, x[_local5 + 15], 22, 1236535329);
_local4 = md5_gg(_local4, _local3, _local2, _local1, x[_local5 + 1], 5, -165796510);
_local1 = md5_gg(_local1, _local4, _local3, _local2, x[_local5 + 6], 9, -1069501632);
_local2 = md5_gg(_local2, _local1, _local4, _local3, x[_local5 + 11], 14, 643717713);
_local3 = md5_gg(_local3, _local2, _local1, _local4, x[_local5 + 0], 20, -373897302);
_local4 = md5_gg(_local4, _local3, _local2, _local1, x[_local5 + 5], 5, -701558691);
_local1 = md5_gg(_local1, _local4, _local3, _local2, x[_local5 + 10], 9, 38016083);
_local2 = md5_gg(_local2, _local1, _local4, _local3, x[_local5 + 15], 14, -660478335);
_local3 = md5_gg(_local3, _local2, _local1, _local4, x[_local5 + 4], 20, -405537848);
_local4 = md5_gg(_local4, _local3, _local2, _local1, x[_local5 + 9], 5, 568446438);
_local1 = md5_gg(_local1, _local4, _local3, _local2, x[_local5 + 14], 9, -1019803690);
_local2 = md5_gg(_local2, _local1, _local4, _local3, x[_local5 + 3], 14, -187363961);
_local3 = md5_gg(_local3, _local2, _local1, _local4, x[_local5 + 8], 20, 1163531501);
_local4 = md5_gg(_local4, _local3, _local2, _local1, x[_local5 + 13], 5, -1444681467);
_local1 = md5_gg(_local1, _local4, _local3, _local2, x[_local5 + 2], 9, -51403784);
_local2 = md5_gg(_local2, _local1, _local4, _local3, x[_local5 + 7], 14, 1735328473);
_local3 = md5_gg(_local3, _local2, _local1, _local4, x[_local5 + 12], 20, -1926607734);
_local4 = md5_hh(_local4, _local3, _local2, _local1, x[_local5 + 5], 4, -378558);
_local1 = md5_hh(_local1, _local4, _local3, _local2, x[_local5 + 8], 11, -2022574463);
_local2 = md5_hh(_local2, _local1, _local4, _local3, x[_local5 + 11], 16, 1839030562);
_local3 = md5_hh(_local3, _local2, _local1, _local4, x[_local5 + 14], 23, -35309556);
_local4 = md5_hh(_local4, _local3, _local2, _local1, x[_local5 + 1], 4, -1530992060);
_local1 = md5_hh(_local1, _local4, _local3, _local2, x[_local5 + 4], 11, 1272893353);
_local2 = md5_hh(_local2, _local1, _local4, _local3, x[_local5 + 7], 16, -155497632);
_local3 = md5_hh(_local3, _local2, _local1, _local4, x[_local5 + 10], 23, -1094730640);
_local4 = md5_hh(_local4, _local3, _local2, _local1, x[_local5 + 13], 4, 681279174);
_local1 = md5_hh(_local1, _local4, _local3, _local2, x[_local5 + 0], 11, -358537222);
_local2 = md5_hh(_local2, _local1, _local4, _local3, x[_local5 + 3], 16, -722521979);
_local3 = md5_hh(_local3, _local2, _local1, _local4, x[_local5 + 6], 23, 76029189);
_local4 = md5_hh(_local4, _local3, _local2, _local1, x[_local5 + 9], 4, -640364487);
_local1 = md5_hh(_local1, _local4, _local3, _local2, x[_local5 + 12], 11, -421815835);
_local2 = md5_hh(_local2, _local1, _local4, _local3, x[_local5 + 15], 16, 530742520);
_local3 = md5_hh(_local3, _local2, _local1, _local4, x[_local5 + 2], 23, -995338651);
_local4 = md5_ii(_local4, _local3, _local2, _local1, x[_local5 + 0], 6, -198630844);
_local1 = md5_ii(_local1, _local4, _local3, _local2, x[_local5 + 7], 10, 1126891415);
_local2 = md5_ii(_local2, _local1, _local4, _local3, x[_local5 + 14], 15, -1416354905);
_local3 = md5_ii(_local3, _local2, _local1, _local4, x[_local5 + 5], 21, -57434055);
_local4 = md5_ii(_local4, _local3, _local2, _local1, x[_local5 + 12], 6, 1700485571);
_local1 = md5_ii(_local1, _local4, _local3, _local2, x[_local5 + 3], 10, -1894986606);
_local2 = md5_ii(_local2, _local1, _local4, _local3, x[_local5 + 10], 15, -1051523);
_local3 = md5_ii(_local3, _local2, _local1, _local4, x[_local5 + 1], 21, -2054922799);
_local4 = md5_ii(_local4, _local3, _local2, _local1, x[_local5 + 8], 6, 1873313359);
_local1 = md5_ii(_local1, _local4, _local3, _local2, x[_local5 + 15], 10, -30611744);
_local2 = md5_ii(_local2, _local1, _local4, _local3, x[_local5 + 6], 15, -1560198380);
_local3 = md5_ii(_local3, _local2, _local1, _local4, x[_local5 + 13], 21, 1309151649);
_local4 = md5_ii(_local4, _local3, _local2, _local1, x[_local5 + 4], 6, -145523070);
_local1 = md5_ii(_local1, _local4, _local3, _local2, x[_local5 + 11], 10, -1120210379);
_local2 = md5_ii(_local2, _local1, _local4, _local3, x[_local5 + 2], 15, 718787259);
_local3 = md5_ii(_local3, _local2, _local1, _local4, x[_local5 + 9], 21, -343485551);
_local4 = safe_add(_local4, _local10);
_local3 = safe_add(_local3, _local9);
_local2 = safe_add(_local2, _local8);
_local1 = safe_add(_local1, _local7);
_local5 = _local5 + 16;
}
return(new Array(_local4, _local3, _local2, _local1));
}
static function md5_cmn(q, a, b, x, s, t) {
return(safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s), b));
}
static function md5_ff(a, b, c, d, x, s, t) {
return(md5_cmn((b & c) | ((~b) & d), a, b, x, s, t));
}
static function md5_gg(a, b, c, d, x, s, t) {
return(md5_cmn((b & d) | (c & (~d)), a, b, x, s, t));
}
static function md5_hh(a, b, c, d, x, s, t) {
return(md5_cmn((b ^ c) ^ d, a, b, x, s, t));
}
static function md5_ii(a, b, c, d, x, s, t) {
return(md5_cmn(c ^ (b | (~d)), a, b, x, s, t));
}
static function bit_rol(num, cnt) {
return((num << cnt) | (num >>> (32 - cnt)));
}
static function safe_add(x, y) {
var _local1 = (x & 65535) + (y & 65535);
var _local2 = ((x >> 16) + (y >> 16)) + (_local1 >> 16);
return((_local2 << 16) | (_local1 & 65535));
}
static function str2binl(str) {
var _local3 = new Array();
var _local4 = 255;
var _local1 = 0;
while (_local1 < (str.length * 8)) {
_local3[_local1 >> 5] = _local3[_local1 >> 5] | ((str.charCodeAt(_local1 / 8) & _local4) << (_local1 % 32));
_local1 = _local1 + 8;
}
return(_local3);
}
static function binl2hex(binarray) {
var _local4 = new String("");
var _local3 = new String("0123456789abcdef");
var _local1 = 0;
while (_local1 < (binarray.length * 4)) {
_local4 = _local4 + (_local3.charAt((binarray[_local1 >> 2] >> (((_local1 % 4) * 8) + 4)) & 15) + _local3.charAt((binarray[_local1 >> 2] >> ((_local1 % 4) * 8)) & 15));
_local1++;
}
return(_local4);
}
}
Symbol 782 MovieClip [__Packages.mx.controls.listclasses.DataSelector] Frame 0
class mx.controls.listclasses.DataSelector extends Object
{
var __vPosition, setVPosition, __dataProvider, enabled, lastSelID, lastSelected, selected, invUpdateControl, invalidate, multipleSelection, updateControl, __rowCount, rows;
function DataSelector () {
super();
}
static function Initialize(obj) {
var _local3 = mixinProps;
var _local4 = _local3.length;
obj = obj.prototype;
var _local1 = 0;
while (_local1 < _local4) {
obj[_local3[_local1]] = mixins[_local3[_local1]];
_local1++;
}
mixins.createProp(obj, "dataProvider", true);
mixins.createProp(obj, "length", false);
mixins.createProp(obj, "value", false);
mixins.createProp(obj, "selectedIndex", true);
mixins.createProp(obj, "selectedIndices", true);
mixins.createProp(obj, "selectedItems", false);
mixins.createProp(obj, "selectedItem", true);
return(true);
}
function createProp(obj, propName, setter) {
var p = (propName.charAt(0).toUpperCase() + propName.substr(1));
var _local2 = null;
var _local4 = function (Void) {
return(this["get" + p]());
};
if (setter) {
_local2 = function (val) {
this["set" + p](val);
};
}
obj.addProperty(propName, _local4, _local2);
}
function setDataProvider(dP) {
if (__vPosition != 0) {
setVPosition(0);
}
clearSelected();
__dataProvider.removeEventListener(this);
__dataProvider = dP;
dP.addEventListener("modelChanged", this);
dP.addView(this);
modelChanged({eventName:"updateAll"});
}
function getDataProvider(Void) {
return(__dataProvider);
}
function addItemAt(index, label, data) {
if ((index < 0) || (!enabled)) {
return(undefined);
}
var _local2 = __dataProvider;
if (_local2 == undefined) {
_local2 = (__dataProvider = new Array());
_local2.addEventListener("modelChanged", this);
index = 0;
}
if ((typeof(label) == "object") || (typeof(_local2.getItemAt(0)) == "string")) {
_local2.addItemAt(index, label);
} else {
_local2.addItemAt(index, {label:label, data:data});
}
}
function addItem(label, data) {
addItemAt(__dataProvider.length, label, data);
}
function removeItemAt(index) {
return(__dataProvider.removeItemAt(index));
}
function removeAll(Void) {
__dataProvider.removeAll();
}
function replaceItemAt(index, newLabel, newData) {
if (typeof(newLabel) == "object") {
__dataProvider.replaceItemAt(index, newLabel);
} else {
__dataProvider.replaceItemAt(index, {label:newLabel, data:newData});
}
}
function sortItemsBy(fieldName, order) {
lastSelID = __dataProvider.getItemID(lastSelected);
__dataProvider.sortItemsBy(fieldName, order);
}
function sortItems(compareFunc, order) {
lastSelID = __dataProvider.getItemID(lastSelected);
__dataProvider.sortItems(compareFunc, order);
}
function getLength(Void) {
return(__dataProvider.length);
}
function getItemAt(index) {
return(__dataProvider.getItemAt(index));
}
function modelChanged(eventObj) {
var _local3 = eventObj.firstItem;
var _local6 = eventObj.lastItem;
var _local7 = eventObj.eventName;
if (_local7 == undefined) {
_local7 = eventObj.event;
_local3 = eventObj.firstRow;
_local6 = eventObj.lastRow;
if (_local7 == "addRows") {
_local7 = (eventObj.eventName = "addItems");
} else if (_local7 == "deleteRows") {
_local7 = (eventObj.eventName = "removeItems");
} else if (_local7 == "updateRows") {
_local7 = (eventObj.eventName = "updateItems");
}
}
if (_local7 == "addItems") {
for (var _local2 in selected) {
var _local5 = selected[_local2];
if ((_local5 != undefined) && (_local5 >= _local3)) {
selected[_local2] = selected[_local2] + ((_local6 - _local3) + 1);
}
}
} else if (_local7 == "removeItems") {
if (__dataProvider.length == 0) {
delete selected;
} else {
var _local9 = eventObj.removedIDs;
var _local10 = _local9.length;
var _local2 = 0;
while (_local2 < _local10) {
var _local4 = _local9[_local2];
if (selected[_local4] != undefined) {
delete selected[_local4];
}
_local2++;
}
for (_local2 in selected) {
if (selected[_local2] >= _local3) {
selected[_local2] = selected[_local2] - ((_local6 - _local3) + 1);
}
}
}
} else if (_local7 == "sort") {
if (typeof(__dataProvider.getItemAt(0)) != "object") {
delete selected;
} else {
var _local10 = __dataProvider.length;
var _local2 = 0;
while (_local2 < _local10) {
if (isSelected(_local2)) {
var _local4 = __dataProvider.getItemID(_local2);
if (_local4 == lastSelID) {
lastSelected = _local2;
}
selected[_local4] = _local2;
}
_local2++;
}
}
} else if (_local7 == "filterModel") {
setVPosition(0);
}
invUpdateControl = true;
invalidate();
}
function getValue(Void) {
var _local2 = getSelectedItem();
if (typeof(_local2) != "object") {
return(_local2);
}
return(((_local2.data == undefined) ? (_local2.label) : (_local2.data)));
}
function getSelectedIndex(Void) {
for (var _local3 in selected) {
var _local2 = selected[_local3];
if (_local2 != undefined) {
return(_local2);
}
}
}
function setSelectedIndex(index) {
if (((index >= 0) && (index < __dataProvider.length)) && (enabled)) {
delete selected;
selectItem(index, true);
lastSelected = index;
invUpdateControl = true;
invalidate();
} else if (index == undefined) {
clearSelected();
}
}
function getSelectedIndices(Void) {
var _local2 = new Array();
for (var _local3 in selected) {
_local2.push(selected[_local3]);
}
_local2.reverse();
return(((_local2.length > 0) ? (_local2) : undefined));
}
function setSelectedIndices(indexArray) {
if (multipleSelection != true) {
return(undefined);
}
delete selected;
var _local3 = 0;
while (_local3 < indexArray.length) {
var _local2 = indexArray[_local3];
if ((_local2 >= 0) && (_local2 < __dataProvider.length)) {
selectItem(_local2, true);
}
_local3++;
}
invUpdateControl = true;
updateControl();
}
function getSelectedItems(Void) {
var _local3 = getSelectedIndices();
var _local4 = new Array();
var _local2 = 0;
while (_local2 < _local3.length) {
_local4.push(getItemAt(_local3[_local2]));
_local2++;
}
return(((_local4.length > 0) ? (_local4) : undefined));
}
function getSelectedItem(Void) {
return(__dataProvider.getItemAt(getSelectedIndex()));
}
function selectItem(index, selectedFlag) {
if (selected == undefined) {
selected = new Object();
}
var _local2 = __dataProvider.getItemID(index);
if (_local2 == undefined) {
return(undefined);
}
if (selectedFlag && (!isSelected(index))) {
selected[_local2] = index;
} else if (!selectedFlag) {
delete selected[_local2];
}
}
function isSelected(index) {
var _local2 = __dataProvider.getItemID(index);
if (_local2 == undefined) {
return(false);
}
return(selected[_local2] != undefined);
}
function clearSelected(transition) {
var _local3 = 0;
for (var _local4 in selected) {
var _local2 = selected[_local4];
if (((_local2 != undefined) && (__vPosition <= _local2)) && (_local2 < (__vPosition + __rowCount))) {
rows[_local2 - __vPosition].drawRow(rows[_local2 - __vPosition].item, "normal", transition && ((_local3 % 3) == 0));
}
_local3++;
}
delete selected;
}
static var mixins = new mx.controls.listclasses.DataSelector();
static var mixinProps = ["setDataProvider", "getDataProvider", "addItem", "addItemAt", "removeAll", "removeItemAt", "replaceItemAt", "sortItemsBy", "sortItems", "getLength", "getItemAt", "modelChanged", "calcPreferredWidthFromData", "calcPreferredHeightFromData", "getValue", "getSelectedIndex", "getSelectedItem", "getSelectedIndices", "getSelectedItems", "selectItem", "isSelected", "clearSelected", "setSelectedIndex", "setSelectedIndices"];
}
Symbol 783 MovieClip [__Packages.mx.controls.ComboBase] Frame 0
class mx.controls.ComboBase extends mx.core.UIComponent
{
var getValue, tabEnabled, tabChildren, boundingBox_mc, downArrow_mc, createClassObject, onDownArrow, border_mc, __border, text_mc, focusTextField, __width, __height, getFocusManager, __get__height, height, _parent;
function ComboBase () {
super();
getValue = _getValue;
}
function init() {
super.init();
tabEnabled = !_editable;
tabChildren = _editable;
boundingBox_mc._visible = false;
boundingBox_mc._width = (boundingBox_mc._height = 0);
}
function createChildren() {
var _local3 = new Object();
_local3.styleName = this;
if (downArrow_mc == undefined) {
_local3.falseUpSkin = downArrowUpName;
_local3.falseOverSkin = downArrowOverName;
_local3.falseDownSkin = downArrowDownName;
_local3.falseDisabledSkin = downArrowDisabledName;
_local3.validateNow = true;
_local3.tabEnabled = false;
createClassObject(mx.controls.SimpleButton, "downArrow_mc", 19, _local3);
downArrow_mc.buttonDownHandler = onDownArrow;
downArrow_mc.useHandCursor = false;
downArrow_mc.onPressWas = downArrow_mc.onPress;
downArrow_mc.onPress = function () {
this.trackAsMenuWas = this.trackAsMenu;
this.trackAsMenu = true;
if (!this._editable) {
this._parent.text_mc.trackAsMenu = this.trackAsMenu;
}
this.onPressWas();
};
downArrow_mc.onDragOutWas = downArrow_mc.onDragOut;
downArrow_mc.onDragOut = function () {
this.trackAsMenuWas = this.trackAsMenu;
this.trackAsMenu = false;
if (!this._editable) {
this._parent.text_mc.trackAsMenu = this.trackAsMenu;
}
this.onDragOutWas();
};
downArrow_mc.onDragOverWas = downArrow_mc.onDragOver;
downArrow_mc.onDragOver = function () {
this.trackAsMenu = this.trackAsMenuWas;
if (!this._editable) {
this._parent.text_mc.trackAsMenu = this.trackAsMenu;
}
this.onDragOverWas();
};
}
if (border_mc == undefined) {
_local3.tabEnabled = false;
createClassObject(_global.styles.rectBorderClass, "border_mc", 17, _local3);
border_mc.move(0, 0);
__border = border_mc;
}
_local3.borderStyle = "none";
_local3.readOnly = !_editable;
_local3.tabEnabled = _editable;
if (text_mc == undefined) {
createClassObject(mx.controls.TextInput, "text_mc", 18, _local3);
text_mc.move(0, 0);
text_mc.addEnterEvents();
text_mc.enterHandler = _enterHandler;
text_mc.changeHandler = _changeHandler;
text_mc.oldOnSetFocus = text_mc.onSetFocus;
text_mc.onSetFocus = function () {
this.oldOnSetFocus();
this._parent.onSetFocus();
};
text_mc.__set__restrict("^\x1B");
text_mc.oldOnKillFocus = text_mc.onKillFocus;
text_mc.onKillFocus = function (n) {
this.oldOnKillFocus(n);
this._parent.onKillFocus(n);
};
text_mc.drawFocus = function (b) {
this._parent.drawFocus(b);
};
delete text_mc.borderStyle;
}
focusTextField = text_mc;
text_mc.owner = this;
layoutChildren(__width, __height);
}
function onKillFocus() {
super.onKillFocus();
Key.removeListener(text_mc);
getFocusManager().defaultPushButtonEnabled = true;
}
function onSetFocus() {
super.onSetFocus();
getFocusManager().defaultPushButtonEnabled = false;
Key.addListener(text_mc);
}
function setFocus() {
if (_editable) {
Selection.setFocus(text_mc);
} else {
Selection.setFocus(this);
}
}
function setSize(w, h, noEvent) {
super.setSize(w, ((h == undefined) ? (__get__height()) : (h)), noEvent);
}
function setEnabled(enabledFlag) {
super.setEnabled(enabledFlag);
downArrow_mc.enabled = enabledFlag;
text_mc.enabled = enabledFlag;
}
function setEditable(e) {
_editable = e;
if (wrapDownArrowButton == false) {
if (e) {
border_mc.borderStyle = "inset";
text_mc.borderStyle = "inset";
symbolName = "ComboBox";
invalidateStyle();
} else {
border_mc.borderStyle = "comboNonEdit";
text_mc.borderStyle = "dropDown";
symbolName = "DropDown";
invalidateStyle();
}
}
tabEnabled = !e;
tabChildren = e;
text_mc.tabEnabled = e;
if (e) {
delete text_mc.onPress;
delete text_mc.onRelease;
delete text_mc.onReleaseOutside;
delete text_mc.onDragOut;
delete text_mc.onDragOver;
delete text_mc.onRollOver;
delete text_mc.onRollOut;
} else {
text_mc.onPress = function () {
this._parent.downArrow_mc.onPress();
};
text_mc.onRelease = function () {
this._parent.downArrow_mc.onRelease();
};
text_mc.onReleaseOutside = function () {
this._parent.downArrow_mc.onReleaseOutside();
};
text_mc.onDragOut = function () {
this._parent.downArrow_mc.onDragOut();
};
text_mc.onDragOver = function () {
this._parent.downArrow_mc.onDragOver();
};
text_mc.onRollOver = function () {
this._parent.downArrow_mc.onRollOver();
};
text_mc.onRollOut = function () {
this._parent.downArrow_mc.onRollOut();
};
text_mc.useHandCursor = false;
}
}
function get editable() {
return(_editable);
}
function set editable(e) {
setEditable(e);
//return(editable);
}
function _getValue() {
return((_editable ? (text_mc.getText()) : (DSgetValue())));
}
function draw() {
downArrow_mc.draw();
border_mc.draw();
}
function size() {
layoutChildren(__width, __height);
}
function setTheme(t) {
downArrowUpName = (t + "downArrow") + "Up_mc";
downArrowDownName = (t + "downArrow") + "Down_mc";
downArrowDisabledName = (t + "downArrow") + "Disabled_mc";
}
function get text() {
return(text_mc.getText());
}
function set text(t) {
setText(t);
//return(text);
}
function setText(t) {
text_mc.setText(t);
}
function get textField() {
return(text_mc);
}
function get restrict() {
return(text_mc.__get__restrict());
}
function set restrict(w) {
text_mc.__set__restrict(w);
//return(restrict);
}
function invalidateStyle() {
downArrow_mc.invalidateStyle();
text_mc.invalidateStyle();
border_mc.invalidateStyle();
}
function layoutChildren(w, h) {
if (downArrow_mc == undefined) {
return(undefined);
}
if (wrapDownArrowButton) {
var _local2 = border_mc.__get__borderMetrics();
downArrow_mc._width = (downArrow_mc._height = (h - _local2.top) - _local2.bottom);
downArrow_mc.move((w - downArrow_mc._width) - _local2.right, _local2.top);
border_mc.setSize(w, h);
text_mc.setSize(w - downArrow_mc._width, h);
} else {
downArrow_mc.move(w - downArrow_mc._width, 0);
border_mc.setSize(w - downArrow_mc.width, h);
text_mc.setSize(w - downArrow_mc._width, h);
downArrow_mc._height = height;
}
}
function _changeHandler(obj) {
}
function _enterHandler(obj) {
var _local2 = _parent;
obj.target = _local2;
_local2.dispatchEvent(obj);
}
function get tabIndex() {
return(text_mc.__get__tabIndex());
}
function set tabIndex(w) {
text_mc.__set__tabIndex(w);
//return(tabIndex);
}
static var mixIt1 = mx.controls.listclasses.DataSelector.Initialize(mx.controls.ComboBase);
static var symbolName = "ComboBase";
static var symbolOwner = mx.controls.ComboBase;
static var version = "2.0.2.126";
var _editable = false;
var downArrowUpName = "ScrollDownArrowUp";
var downArrowDownName = "ScrollDownArrowDown";
var downArrowOverName = "ScrollDownArrowOver";
var downArrowDisabledName = "ScrollDownArrowDisabled";
var wrapDownArrowButton = true;
var DSgetValue = mx.controls.listclasses.DataSelector.prototype.getValue;
var multipleSelection = false;
}
Symbol 784 MovieClip [__Packages.mx.controls.ComboBox] Frame 0
class mx.controls.ComboBox extends mx.controls.ComboBase
{
var __set__editable, editable, __labels, data, __dropdownWidth, __width, _editable, selectedIndex, __dropdown, dataProvider, __labelFunction, createObject, border_mc, mask, text_mc, dispatchValueChangedEvent, getValue, length, selectedItem, _y, isPressed, owner, __set__visible, height, localToGlobal, __selectedIndexOnDropdown, __initialSelectedIndexOnDropdown, __get__height, getStyle, _parent, width, __dataProvider, selected, dispatchEvent;
function ComboBox () {
super();
}
function init() {
super.init();
}
function createChildren() {
super.createChildren();
__set__editable(editable);
if (__labels.length > 0) {
var _local6 = new Array();
var _local3 = 0;
while (_local3 < labels.length) {
_local6.addItem({label:labels[_local3], data:data[_local3]});
_local3++;
}
setDataProvider(_local6);
}
dropdownWidth = (((typeof(__dropdownWidth) == "number") ? (__dropdownWidth) : (__width)));
if (!_editable) {
selectedIndex = 0;
}
initializing = false;
}
function onKillFocus(n) {
if (_showingDropdown && (n != null)) {
displayDropdown(false);
}
super.onKillFocus();
}
function getDropdown() {
if (initializing) {
return(undefined);
}
if (!hasDropdown()) {
var _local3 = new Object();
_local3.styleName = this;
if (dropdownBorderStyle != undefined) {
_local3.borderStyle = dropdownBorderStyle;
}
_local3._visible = false;
__dropdown = mx.managers.PopUpManager.createPopUp(this, mx.controls.List, false, _local3, true);
__dropdown.scroller.mask.removeMovieClip();
if (dataProvider == undefined) {
dataProvider = new Array();
}
__dropdown.setDataProvider(dataProvider);
__dropdown.selectMultiple = false;
__dropdown.rowCount = __rowCount;
__dropdown.selectedIndex = selectedIndex;
__dropdown.vScrollPolicy = "auto";
__dropdown.labelField = __labelField;
__dropdown.labelFunction = __labelFunction;
__dropdown.owner = this;
__dropdown.changeHandler = _changeHandler;
__dropdown.scrollHandler = _scrollHandler;
__dropdown.itemRollOverHandler = _itemRollOverHandler;
__dropdown.itemRollOutHandler = _itemRollOutHandler;
__dropdown.resizeHandler = _resizeHandler;
__dropdown.mouseDownOutsideHandler = function (eventObj) {
var _local3 = this.owner;
var _local4 = new Object();
_local4.x = _local3._root._xmouse;
_local4.y = _local3._root._ymouse;
_local3._root.localToGlobal(_local4);
if (_local3.hitTest(_local4.x, _local4.y, false)) {
} else if ((!this.wrapDownArrowButton) && (this.owner.downArrow_mc.hitTest(_root._xmouse, _root._ymouse, false))) {
} else {
_local3.displayDropdown(false);
}
};
__dropdown.onTweenUpdate = function (v) {
this._y = v;
};
__dropdown.setSize(__dropdownWidth, __dropdown.height);
createObject("BoundingBox", "mask", 20);
mask._y = border_mc.height;
mask._width = __dropdownWidth;
mask._height = __dropdown.height;
mask._visible = false;
__dropdown.setMask(mask);
}
return(__dropdown);
}
function setSize(w, h, noEvent) {
super.setSize(w, h, noEvent);
__dropdownWidth = w;
__dropdown.rowHeight = h;
__dropdown.setSize(__dropdownWidth, __dropdown.height);
}
function setEditable(e) {
super.setEditable(e);
if (e) {
text_mc.setText("");
} else {
text_mc.setText(selectedLabel);
}
}
function get labels() {
return(__labels);
}
function set labels(lbls) {
__labels = lbls;
setDataProvider(lbls);
//return(labels);
}
function getLabelField() {
return(__labelField);
}
function get labelField() {
return(getLabelField());
}
function setLabelField(s) {
__dropdown.labelField = (__labelField = s);
text_mc.setText(selectedLabel);
}
function set labelField(s) {
setLabelField(s);
//return(labelField);
}
function getLabelFunction() {
return(__labelFunction);
}
function get labelFunction() {
return(getLabelFunction());
}
function set labelFunction(f) {
__dropdown.labelFunction = (__labelFunction = f);
text_mc.setText(selectedLabel);
//return(labelFunction);
}
function setSelectedItem(v) {
super.setSelectedItem(v);
__dropdown.selectedItem = v;
text_mc.setText(selectedLabel);
}
function setSelectedIndex(v) {
super.setSelectedIndex(v);
__dropdown.selectedIndex = v;
if (v != undefined) {
text_mc.setText(selectedLabel);
}
dispatchValueChangedEvent(getValue());
}
function setRowCount(count) {
if (isNaN(count)) {
return(undefined);
}
__rowCount = count;
__dropdown.setRowCount(count);
}
function get rowCount() {
return(Math.max(1, Math.min(length, __rowCount)));
}
function set rowCount(v) {
setRowCount(v);
//return(rowCount);
}
function setDropdownWidth(w) {
__dropdownWidth = w;
__dropdown.setSize(w, __dropdown.height);
}
function get dropdownWidth() {
return(__dropdownWidth);
}
function set dropdownWidth(v) {
setDropdownWidth(v);
//return(dropdownWidth);
}
function get dropdown() {
return(getDropdown());
}
function setDataProvider(dp) {
super.setDataProvider(dp);
__dropdown.setDataProvider(dp);
if (!_editable) {
selectedIndex = 0;
}
}
function open() {
displayDropdown(true);
}
function close() {
displayDropdown(false);
}
function get selectedLabel() {
var _local2 = selectedItem;
if (_local2 == undefined) {
return("");
}
if (labelFunction != undefined) {
return(labelFunction(_local2));
}
if (typeof(_local2) != "object") {
return(_local2);
}
if (_local2[labelField] != undefined) {
return(_local2[labelField]);
}
if (_local2.label != undefined) {
return(_local2.label);
}
var _local3 = " ";
for (var _local4 in _local2) {
if (_local4 != "__ID__") {
_local3 = (_local2[_local4] + ", ") + _local3;
}
}
_local3 = _local3.substring(0, _local3.length - 3);
return(_local3);
}
function hasDropdown() {
return((__dropdown != undefined) && (__dropdown.valueOf() != undefined));
}
function tweenEndShow(value) {
_y = value;
isPressed = true;
owner.dispatchEvent({type:"open", target:owner});
}
function tweenEndHide(value) {
_y = value;
__set__visible(false);
owner.dispatchEvent({type:"close", target:owner});
}
function displayDropdown(show) {
if (show == _showingDropdown) {
return(undefined);
}
var _local3 = new Object();
_local3.x = 0;
_local3.y = height;
localToGlobal(_local3);
if (show) {
__selectedIndexOnDropdown = selectedIndex;
__initialSelectedIndexOnDropdown = selectedIndex;
getDropdown();
var _local2 = __dropdown;
_local2.isPressed = true;
_local2.rowCount = rowCount;
_local2.visible = show;
_local2._parent.globalToLocal(_local3);
_local2.onTweenEnd = tweenEndShow;
var _local5;
var _local8;
if ((_local3.y + _local2.height) > Stage.height) {
_local5 = _local3.y - __get__height();
_local8 = _local5 - _local2.height;
mask._y = -_local2.height;
} else {
_local5 = _local3.y - _local2.height;
_local8 = _local3.y;
mask._y = border_mc.height;
}
var _local6 = _local2.selectedIndex;
if (_local6 == undefined) {
_local6 = 0;
}
var _local4 = _local2.vPosition;
_local4 = _local6 - 1;
_local4 = Math.min(Math.max(_local4, 0), _local2.length - _local2.rowCount);
_local2.vPosition = _local4;
_local2.move(_local3.x, _local5);
_local2.tween = new mx.effects.Tween(__dropdown, _local5, _local8, getStyle("openDuration"));
} else {
__dropdown._parent.globalToLocal(_local3);
delete __dropdown.dragScrolling;
__dropdown.onTweenEnd = tweenEndHide;
__dropdown.tween = new mx.effects.Tween(__dropdown, __dropdown._y, _local3.y - __dropdown.height, getStyle("openDuration"));
if (__initialSelectedIndexOnDropdown != selectedIndex) {
dispatchChangeEvent(undefined, __initialSelectedIndexOnDropdown, selectedIndex);
}
}
var _local9 = getStyle("openEasing");
if (_local9 != undefined) {
__dropdown.tween.easingEquation = _local9;
}
_showingDropdown = show;
}
function onDownArrow() {
_parent.displayDropdown(!_parent._showingDropdown);
}
function keyDown(e) {
if (e.ctrlKey && (e.code == 40)) {
displayDropdown(true);
} else if (e.ctrlKey && (e.code == 38)) {
displayDropdown(false);
dispatchChangeEvent(undefined, __selectedIndexOnDropdown, selectedIndex);
} else if (e.code == 27) {
displayDropdown(false);
} else if (e.code == 13) {
if (_showingDropdown) {
selectedIndex = __dropdown.selectedIndex;
displayDropdown(false);
}
} else if (((((!_editable) || (e.code == 38)) || (e.code == 40)) || (e.code == 33)) || (e.code == 34)) {
selectedIndex = 0 + selectedIndex;
bInKeyDown = true;
var _local3 = dropdown;
_local3.keyDown(e);
bInKeyDown = false;
selectedIndex = __dropdown.selectedIndex;
}
}
function invalidateStyle(styleProp) {
__dropdown.invalidateStyle(styleProp);
super.invalidateStyle(styleProp);
}
function changeTextStyleInChildren(styleProp) {
if (dropdown.stylecache != undefined) {
delete dropdown.stylecache[styleProp];
delete dropdown.stylecache.tf;
}
__dropdown.changeTextStyleInChildren(styleProp);
super.changeTextStyleInChildren(styleProp);
}
function changeColorStyleInChildren(sheetName, styleProp, newValue) {
if (dropdown.stylecache != undefined) {
delete dropdown.stylecache[styleProp];
delete dropdown.stylecache.tf;
}
__dropdown.changeColorStyleInChildren(sheetName, styleProp, newValue);
super.changeColorStyleInChildren(sheetName, styleProp, newValue);
}
function notifyStyleChangeInChildren(sheetName, styleProp, newValue) {
if (dropdown.stylecache != undefined) {
delete dropdown.stylecache[styleProp];
delete dropdown.stylecache.tf;
}
__dropdown.notifyStyleChangeInChildren(sheetName, styleProp, newValue);
super.notifyStyleChangeInChildren(sheetName, styleProp, newValue);
}
function onUnload() {
__dropdown.removeMovieClip();
}
function _resizeHandler() {
var _local2 = owner;
_local2.mask._width = width;
_local2.mask._height = height;
}
function _changeHandler(obj) {
var _local2 = owner;
var _local3 = _local2.selectedIndex;
obj.target = _local2;
if (this == owner.text_mc) {
_local2.selectedIndex = undefined;
_local2.dispatchChangeEvent(obj, -1, -2);
} else {
_local2.selectedIndex = selectedIndex;
if (!_local2._showingDropdown) {
_local2.dispatchChangeEvent(obj, _local3, _local2.selectedIndex);
} else if (!_local2.bInKeyDown) {
_local2.displayDropdown(false);
}
}
}
function _scrollHandler(obj) {
var _local2 = owner;
obj.target = _local2;
_local2.dispatchEvent(obj);
}
function _itemRollOverHandler(obj) {
var _local2 = owner;
obj.target = _local2;
_local2.dispatchEvent(obj);
}
function _itemRollOutHandler(obj) {
var _local2 = owner;
obj.target = _local2;
_local2.dispatchEvent(obj);
}
function modelChanged(eventObj) {
super.modelChanged(eventObj);
if (0 == __dataProvider.length) {
text_mc.setText("");
delete selected;
} else if ((__dataProvider.length == ((eventObj.lastItem - eventObj.firstItem) + 1)) && (eventObj.eventName == "addItems")) {
selectedIndex = 0;
}
}
function dispatchChangeEvent(obj, prevValue, newValue) {
var _local2;
if (prevValue != newValue) {
if ((obj != undefined) && (obj.type == "change")) {
_local2 = obj;
} else {
_local2 = {type:"change"};
}
dispatchEvent(_local2);
}
}
static var symbolName = "ComboBox";
static var symbolOwner = mx.controls.ComboBox;
static var version = "2.0.2.126";
var clipParameters = {labels:1, data:1, editable:1, rowCount:1, dropdownWidth:1};
static var mergedClipParameters = mx.core.UIObject.mergeClipParameters(mx.controls.ComboBox.prototype.clipParameters, mx.controls.ComboBase.prototype.clipParameters);
var className = "ComboBox";
var _showingDropdown = false;
var __rowCount = 5;
var dropdownBorderStyle = undefined;
var initializing = true;
var __labelField = "label";
var bInKeyDown = false;
}
Symbol 868 MovieClip [__Packages.mx.controls.TextInput] Frame 0
class mx.controls.TextInput extends mx.core.UIComponent
{
var owner, enterListener, label, tabChildren, tabEnabled, focusTextField, _color, _parent, border_mc, createClassObject, dispatchValueChangedEvent, __get__width, __get__height, tfx, tfy, tfw, tfh, getStyle, bind, updateModel, _getTextFormat, enabled;
function TextInput () {
super();
}
function addEventListener(event, handler) {
if (event == "enter") {
addEnterEvents();
}
super.addEventListener(event, handler);
}
function enterOnKeyDown() {
if (Key.getAscii() == 13) {
owner.dispatchEvent({type:"enter"});
}
}
function addEnterEvents() {
if (enterListener == undefined) {
enterListener = new Object();
enterListener.owner = this;
enterListener.onKeyDown = enterOnKeyDown;
}
}
function init(Void) {
super.init();
label.styleName = this;
tabChildren = true;
tabEnabled = false;
focusTextField = label;
_color = mx.core.UIObject.textColorList;
label.onSetFocus = function () {
this._parent.onSetFocus();
};
label.onKillFocus = function (n) {
this._parent.onKillFocus(n);
};
label.drawFocus = function (b) {
this._parent.drawFocus(b);
};
label.onChanged = onLabelChanged;
}
function setFocus() {
Selection.setFocus(label);
}
function onLabelChanged(Void) {
_parent.dispatchEvent({type:"change"});
_parent.dispatchValueChangedEvent(text);
}
function createChildren(Void) {
super.createChildren();
if (border_mc == undefined) {
createClassObject(_global.styles.rectBorderClass, "border_mc", 0, {styleName:this});
}
border_mc.swapDepths(label);
label.autoSize = "none";
}
function get html() {
return(getHtml());
}
function set html(value) {
setHtml(value);
//return(html);
}
function getHtml() {
return(label.html);
}
function setHtml(value) {
if (value != label.html) {
label.html = value;
}
}
function get text() {
return(getText());
}
function set text(t) {
setText(t);
//return(text);
}
function getText() {
if (initializing) {
return(initText);
}
if (label.html == true) {
return(label.htmlText);
}
return(label.text);
}
function setText(t) {
if (initializing) {
initText = t;
} else {
var _local2 = label;
if (_local2.html == true) {
_local2.htmlText = t;
} else {
_local2.text = t;
}
}
dispatchValueChangedEvent(t);
}
function size(Void) {
border_mc.setSize(__get__width(), __get__height());
var _local2 = border_mc.__get__borderMetrics();
var _local6 = _local2.left + _local2.right;
var _local3 = _local2.top + _local2.bottom;
var _local5 = _local2.left;
var _local4 = _local2.top;
tfx = _local5;
tfy = _local4;
tfw = __get__width() - _local6;
tfh = __get__height() - _local3;
label.move(tfx, tfy);
label.setSize(tfw, tfh + 1);
}
function setEnabled(enable) {
label.type = (((__editable == true) || (enable == false)) ? "input" : "dynamic");
label.selectable = enable;
var _local2 = getStyle((enable ? "color" : "disabledColor"));
if (_local2 == undefined) {
_local2 = (enable ? 0 : 8947848);
}
setColor(_local2);
}
function setColor(col) {
label.textColor = col;
}
function onKillFocus(newFocus) {
if (enterListener != undefined) {
Key.removeListener(enterListener);
}
if (bind != undefined) {
updateModel(text);
}
super.onKillFocus(newFocus);
}
function onSetFocus(oldFocus) {
var f = Selection.getFocus();
var o = eval (f);
if (o != label) {
Selection.setFocus(label);
return(undefined);
}
if (enterListener != undefined) {
Key.addListener(enterListener);
}
super.onSetFocus(oldFocus);
}
function draw(Void) {
var _local2 = label;
var _local4 = getText();
if (initializing) {
initializing = false;
delete initText;
}
var _local3 = _getTextFormat();
_local2.embedFonts = _local3.embedFonts == true;
if (_local3 != undefined) {
_local2.setTextFormat(_local3);
_local2.setNewTextFormat(_local3);
}
_local2.multiline = false;
_local2.wordWrap = false;
if (_local2.html == true) {
_local2.setTextFormat(_local3);
_local2.htmlText = _local4;
} else {
_local2.text = _local4;
}
_local2.type = (((__editable == true) || (enabled == false)) ? "input" : "dynamic");
size();
}
function setEditable(s) {
__editable = s;
label.type = (s ? "input" : "dynamic");
}
function get maxChars() {
return(label.maxChars);
}
function set maxChars(w) {
label.maxChars = w;
//return(maxChars);
}
function get length() {
return(label.length);
}
function get restrict() {
return(label.restrict);
}
function set restrict(w) {
label.restrict = ((w == "") ? null : (w));
//return(restrict);
}
function get hPosition() {
return(label.hscroll);
}
function set hPosition(w) {
label.hscroll = w;
//return(hPosition);
}
function get maxHPosition() {
return(label.maxhscroll);
}
function get editable() {
return(__editable);
}
function set editable(w) {
setEditable(w);
//return(editable);
}
function get password() {
return(label.password);
}
function set password(w) {
label.password = w;
//return(password);
}
function get tabIndex() {
return(label.tabIndex);
}
function set tabIndex(w) {
label.tabIndex = w;
//return(tabIndex);
}
function set _accProps(val) {
label._accProps = val;
//return(_accProps);
}
function get _accProps() {
return(label._accProps);
}
static var symbolName = "TextInput";
static var symbolOwner = mx.controls.TextInput;
static var version = "2.0.2.126";
var className = "TextInput";
var initializing = true;
var clipParameters = {text:1, editable:1, password:1, maxChars:1, restrict:1};
static var mergedClipParameters = mx.core.UIObject.mergeClipParameters(mx.controls.TextInput.prototype.clipParameters, mx.core.UIComponent.prototype.clipParameters);
var _maxWidth = mx.core.UIComponent.kStretch;
var __editable = true;
var initText = "";
}
Symbol 869 MovieClip [__Packages.mx.managers.PopUpManager] Frame 0
class mx.managers.PopUpManager
{
var popUp, setSize, move, modalWindow, _parent, _name, _visible, owner;
function PopUpManager () {
}
static function createModalWindow(parent, o, broadcastOutsideEvents) {
var _local2 = parent.createChildAtDepth("Modal", mx.managers.DepthManager.kTopmost);
_local2.setDepthBelow(o);
o.modalID = _local2._name;
_local2._alpha = _global.style.modalTransparency;
_local2.tabEnabled = false;
if (broadcastOutsideEvents) {
_local2.onPress = mixins.onPress;
} else {
_local2.onPress = mixins.nullFunction;
}
_local2.onRelease = mixins.nullFunction;
_local2.resize = mixins.resize;
mx.managers.SystemManager.init();
mx.managers.SystemManager.addEventListener("resize", _local2);
_local2.resize();
_local2.useHandCursor = false;
_local2.popUp = o;
o.modalWindow = _local2;
o.deletePopUp = mixins.deletePopUp;
o.setVisible = mixins.setVisible;
o.getVisible = mixins.getVisible;
o.addProperty("visible", o.getVisible, o.setVisible);
}
static function createPopUp(parent, className, modal, initobj, broadcastOutsideEvents) {
if (mixins == undefined) {
mixins = new mx.managers.PopUpManager();
}
if (broadcastOutsideEvents == undefined) {
broadcastOutsideEvents = false;
}
var _local5 = parent._root;
if (_local5 == undefined) {
_local5 = _root;
}
while (parent != _local5) {
parent = parent._parent;
}
initobj.popUp = true;
var _local4 = parent.createClassChildAtDepth(className, ((broadcastOutsideEvents || (modal)) ? (mx.managers.DepthManager.kTopmost) : (mx.managers.DepthManager.kTop)), initobj);
var _local2 = _root;
var _local6 = _local2.focusManager != undefined;
while (_local2._parent != undefined) {
_local2 = _local2._parent._root;
if (_local2.focusManager != undefined) {
_local6 = true;
break;
}
}
if (_local6) {
_local4.createObject("FocusManager", "focusManager", -1);
if (_local4._visible == false) {
mx.managers.SystemManager.deactivate(_local4);
}
}
if (modal) {
createModalWindow(parent, _local4, broadcastOutsideEvents);
} else {
if (broadcastOutsideEvents) {
_local4.mouseListener = new Object();
_local4.mouseListener.owner = _local4;
_local4.mouseListener.onMouseDown = mixins.onMouseDown;
Mouse.addListener(_local4.mouseListener);
}
_local4.deletePopUp = mixins.deletePopUp;
}
return(_local4);
}
function onPress(Void) {
var _local3 = popUp._root;
if (_local3 == undefined) {
_local3 = _root;
}
if (popUp.hitTest(_local3._xmouse, _local3._ymouse, false)) {
return(undefined);
}
popUp.dispatchEvent({type:"mouseDownOutside"});
}
function nullFunction(Void) {
}
function resize(Void) {
var _local2 = mx.managers.SystemManager.__get__screen();
setSize(_local2.width, _local2.height);
move(_local2.x, _local2.y);
}
function deletePopUp(Void) {
if (modalWindow != undefined) {
_parent.destroyObject(modalWindow._name);
}
_parent.destroyObject(_name);
}
function setVisible(v, noEvent) {
super.setVisible(v, noEvent);
modalWindow._visible = v;
}
function getVisible(Void) {
return(_visible);
}
function onMouseDown(Void) {
var _local3 = owner._root;
if (_local3 == undefined) {
_local3 = _root;
}
var _local4 = new Object();
_local4.x = _local3._xmouse;
_local4.y = _local3._ymouse;
_local3.localToGlobal(_local4);
if (owner.hitTest(_local4.x, _local4.y, false)) {
} else {
owner.mouseDownOutsideHandler(owner);
}
}
static var version = "2.0.2.126";
static var mixins = undefined;
}
Symbol 870 MovieClip [__Packages.mx.core.View] Frame 0
class mx.core.View extends mx.core.UIComponent
{
var tabChildren, tabEnabled, boundingBox_mc, border_mc, __get__width, __get__height, __tabIndex, depth, createObject, createClassObject, loadExternal, destroyObject, createClassChildAtDepth, doLater;
function View () {
super();
}
function init() {
super.init();
tabChildren = true;
tabEnabled = false;
boundingBox_mc._visible = false;
boundingBox_mc._width = (boundingBox_mc._height = 0);
}
function size() {
border_mc.move(0, 0);
border_mc.setSize(__get__width(), __get__height());
doLayout();
}
function draw() {
size();
}
function get numChildren() {
var _local3 = childNameBase;
var _local2 = 0;
while (true) {
if (this[_local3 + _local2] == undefined) {
return(_local2);
}
_local2++;
}
}
function get tabIndex() {
return((tabEnabled ? (__tabIndex) : undefined));
}
function addLayoutObject(object) {
}
function createChild(className, instanceName, initProps) {
if (depth == undefined) {
depth = 1;
}
var _local2;
if (typeof(className) == "string") {
_local2 = createObject(className, instanceName, depth++, initProps);
} else {
_local2 = createClassObject(className, instanceName, depth++, initProps);
}
if (_local2 == undefined) {
_local2 = loadExternal(className, _loadExternalClass, instanceName, depth++, initProps);
} else {
this[childNameBase + numChildren] = _local2;
_local2._complete = true;
childLoaded(_local2);
}
addLayoutObject(_local2);
return(_local2);
}
function getChildAt(childIndex) {
return(this[childNameBase + childIndex]);
}
function destroyChildAt(childIndex) {
if (!((childIndex >= 0) && (childIndex < numChildren))) {
return(undefined);
}
var _local4 = childNameBase + childIndex;
var _local6 = numChildren;
var _local3;
for (_local3 in this) {
if (_local3 == _local4) {
_local4 = "";
destroyObject(_local3);
break;
}
}
var _local2 = Number(childIndex);
while (_local2 < (_local6 - 1)) {
this[childNameBase + _local2] = this[childNameBase + (_local2 + 1)];
_local2++;
}
delete this[childNameBase + (_local6 - 1)];
depth--;
}
function initLayout() {
if (!hasBeenLayedOut) {
doLayout();
}
}
function doLayout() {
hasBeenLayedOut = true;
}
function createChildren() {
if (border_mc == undefined) {
border_mc = createClassChildAtDepth(_global.styles.rectBorderClass, mx.managers.DepthManager.kBottom, {styleName:this});
}
doLater(this, "initLayout");
}
function convertToUIObject(obj) {
}
function childLoaded(obj) {
convertToUIObject(obj);
}
static function extension() {
mx.core.ExternalContent.enableExternalContent();
}
static var symbolName = "View";
static var symbolOwner = mx.core.View;
static var version = "2.0.2.126";
var className = "View";
static var childNameBase = "_child";
var hasBeenLayedOut = false;
var _loadExternalClass = "UIComponent";
}
Symbol 871 MovieClip [__Packages.mx.core.ExternalContent] Frame 0
class mx.core.ExternalContent
{
var createObject, numChildren, prepList, doLater, loadList, dispatchEvent, loadedList, childLoaded;
function ExternalContent () {
}
function loadExternal(url, placeholderClassName, instanceName, depth, initProps) {
var _local2;
_local2 = createObject(placeholderClassName, instanceName, depth, initProps);
this[mx.core.View.childNameBase + numChildren] = _local2;
if (prepList == undefined) {
prepList = new Object();
}
prepList[instanceName] = {obj:_local2, url:url, complete:false, initProps:initProps};
prepareToLoadMovie(_local2);
return(_local2);
}
function prepareToLoadMovie(obj) {
obj.unloadMovie();
doLater(this, "waitForUnload");
}
function waitForUnload() {
var _local3;
for (_local3 in prepList) {
var _local2 = prepList[_local3];
if (_local2.obj.getBytesTotal() == 0) {
if (loadList == undefined) {
loadList = new Object();
}
loadList[_local3] = _local2;
_local2.obj.loadMovie(_local2.url);
delete prepList[_local3];
doLater(this, "checkLoadProgress");
} else {
doLater(this, "waitForUnload");
}
}
}
function checkLoadProgress() {
var _local8 = false;
var _local3;
for (_local3 in loadList) {
var _local2 = loadList[_local3];
_local2.loaded = _local2.obj.getBytesLoaded();
_local2.total = _local2.obj.getBytesTotal();
if (_local2.total > 0) {
_local2.obj._visible = false;
dispatchEvent({type:"progress", target:_local2.obj, current:_local2.loaded, total:_local2.total});
if (_local2.loaded == _local2.total) {
if (loadedList == undefined) {
loadedList = new Object();
}
loadedList[_local3] = _local2;
delete loadList[_local3];
doLater(this, "contentLoaded");
}
} else if (_local2.total == -1) {
if (_local2.failedOnce != undefined) {
_local2.failedOnce++;
if (_local2.failedOnce > 3) {
dispatchEvent({type:"complete", target:_local2.obj, current:_local2.loaded, total:_local2.total});
delete loadList[_local3];
}
} else {
_local2.failedOnce = 0;
}
}
_local8 = true;
}
if (_local8) {
doLater(this, "checkLoadProgress");
}
}
function contentLoaded() {
var _local4;
for (_local4 in loadedList) {
var _local2 = loadedList[_local4];
_local2.obj._visible = true;
_local2.obj._complete = true;
var _local3;
for (_local3 in _local2.initProps) {
_local2.obj[_local3] = _local2.initProps[_local3];
}
childLoaded(_local2.obj);
dispatchEvent({type:"complete", target:_local2.obj, current:_local2.loaded, total:_local2.total});
delete loadedList[_local4];
}
}
function convertToUIObject(obj) {
if (obj.setSize == undefined) {
var _local2 = mx.core.UIObject.prototype;
obj.addProperty("width", _local2.__get__width, null);
obj.addProperty("height", _local2.__get__height, null);
obj.addProperty("left", _local2.__get__left, null);
obj.addProperty("x", _local2.__get__x, null);
obj.addProperty("top", _local2.__get__top, null);
obj.addProperty("y", _local2.__get__y, null);
obj.addProperty("right", _local2.__get__right, null);
obj.addProperty("bottom", _local2.__get__bottom, null);
obj.addProperty("visible", _local2.__get__visible, _local2.__set__visible);
obj.move = mx.core.UIObject.prototype.move;
obj.setSize = mx.core.UIObject.prototype.setSize;
obj.size = mx.core.UIObject.prototype.size;
mx.events.UIEventDispatcher.initialize(obj);
}
}
static function enableExternalContent() {
}
static function classConstruct() {
var _local1 = mx.core.View.prototype;
var _local2 = mx.core.ExternalContent.prototype;
_local1.loadExternal = _local2.loadExternal;
_local1.prepareToLoadMovie = _local2.prepareToLoadMovie;
_local1.waitForUnload = _local2.waitForUnload;
_local1.checkLoadProgress = _local2.checkLoadProgress;
_local1.contentLoaded = _local2.contentLoaded;
_local1.convertToUIObject = _local2.convertToUIObject;
return(true);
}
static var classConstructed = classConstruct();
static var ViewDependency = mx.core.View;
}
Symbol 872 MovieClip [__Packages.mx.skins.CustomBorder] Frame 0
class mx.skins.CustomBorder extends mx.skins.Border
{
var __width, __height, l_mc, setSkin, minHeight, minWidth, m_mc, r_mc;
function CustomBorder () {
super();
}
function get width() {
return(__width);
}
function get height() {
return(__height);
}
function init(Void) {
super.init();
}
function createChildren(Void) {
}
function draw(Void) {
if (l_mc == undefined) {
var _local2 = setSkin(tagL, leftSkin);
if (horizontal) {
minHeight = l_mc._height;
minWidth = l_mc._width;
} else {
minHeight = l_mc._height;
minWidth = l_mc._width;
}
}
if (m_mc == undefined) {
setSkin(tagM, middleSkin);
if (horizontal) {
minHeight = m_mc._height;
minWidth = minWidth + m_mc._width;
} else {
minHeight = minHeight + m_mc._height;
minWidth = m_mc._width;
}
}
if (r_mc == undefined) {
setSkin(tagR, rightSkin);
if (horizontal) {
minHeight = r_mc._height;
minWidth = minWidth + r_mc._width;
} else {
minHeight = minHeight + r_mc._height;
minWidth = r_mc._width;
}
}
size();
}
function size(Void) {
l_mc.move(0, 0);
if (horizontal) {
r_mc.move(width - r_mc.width, 0);
m_mc.move(l_mc.width, 0);
m_mc.setSize(r_mc.x - m_mc.x, m_mc.height);
} else {
r_mc.move(0, height - r_mc.height, 0);
m_mc.move(0, l_mc.height);
m_mc.setSize(m_mc.width, r_mc.y - m_mc.y);
}
}
static var symbolName = "CustomBorder";
static var symbolOwner = mx.skins.CustomBorder;
static var version = "2.0.2.126";
var className = "CustomBorder";
static var tagL = 0;
static var tagM = 1;
static var tagR = 2;
var idNames = new Array("l_mc", "m_mc", "r_mc");
var leftSkin = "F3PieceLeft";
var middleSkin = "F3PieceMiddle";
var rightSkin = "F3PieceRight";
var horizontal = true;
}
Symbol 873 MovieClip [__Packages.mx.controls.scrollClasses.ScrollThumb] Frame 0
class mx.controls.scrollClasses.ScrollThumb extends mx.skins.CustomBorder
{
var useHandCursor, ymin, ymax, datamin, datamax, scrollMove, lastY, _ymouse, _y, _parent, onMouseMove, grip_mc, setSkin, gripSkin, __get__width, __get__height;
function ScrollThumb () {
super();
}
function createChildren(Void) {
super.createChildren();
useHandCursor = false;
}
function setRange(_ymin, _ymax, _datamin, _datamax) {
ymin = _ymin;
ymax = _ymax;
datamin = _datamin;
datamax = _datamax;
}
function dragThumb(Void) {
scrollMove = _ymouse - lastY;
scrollMove = scrollMove + _y;
if (scrollMove < ymin) {
scrollMove = ymin;
} else if (scrollMove > ymax) {
scrollMove = ymax;
}
_parent.isScrolling = true;
_y = scrollMove;
var _local2 = Math.round(((datamax - datamin) * (_y - ymin)) / (ymax - ymin)) + datamin;
_parent.scrollPosition = _local2;
_parent.dispatchScrollEvent("ThumbTrack");
updateAfterEvent();
}
function stopDragThumb(Void) {
_parent.isScrolling = false;
_parent.dispatchScrollEvent("ThumbPosition");
_parent.dispatchScrollChangedEvent();
delete onMouseMove;
}
function onPress(Void) {
_parent.pressFocus();
lastY = _ymouse;
onMouseMove = dragThumb;
super.onPress();
}
function onRelease(Void) {
_parent.releaseFocus();
stopDragThumb();
super.onRelease();
}
function onReleaseOutside(Void) {
_parent.releaseFocus();
stopDragThumb();
super.onReleaseOutside();
}
function draw() {
super.draw();
if (grip_mc == undefined) {
setSkin(3, gripSkin);
}
}
function size() {
super.size();
grip_mc.move((__get__width() - grip_mc.width) / 2, (__get__height() - grip_mc.height) / 2);
}
static var symbolOwner = mx.skins.CustomBorder.symbolOwner;
var className = "ScrollThumb";
var btnOffset = 0;
var horizontal = false;
var idNames = new Array("l_mc", "m_mc", "r_mc", "grip_mc");
}
Symbol 874 MovieClip [__Packages.mx.controls.scrollClasses.ScrollBar] Frame 0
class mx.controls.scrollClasses.ScrollBar extends mx.core.UIComponent
{
var isScrolling, scrollTrack_mc, scrollThumb_mc, __height, tabEnabled, focusEnabled, boundingBox_mc, setSkin, upArrow_mc, _minHeight, _minWidth, downArrow_mc, createObject, createClassObject, enabled, _height, dispatchEvent, minMode, maxMode, plusMode, minusMode, _parent, getStyle, scrolling, _ymouse;
function ScrollBar () {
super();
}
function get scrollPosition() {
return(_scrollPosition);
}
function set scrollPosition(pos) {
_scrollPosition = pos;
if (isScrolling != true) {
pos = Math.min(pos, maxPos);
pos = Math.max(pos, minPos);
var _local3 = (((pos - minPos) * (scrollTrack_mc.height - scrollThumb_mc._height)) / (maxPos - minPos)) + scrollTrack_mc.top;
scrollThumb_mc.move(0, _local3);
}
//return(scrollPosition);
}
function get pageScrollSize() {
return(largeScroll);
}
function set pageScrollSize(lScroll) {
largeScroll = lScroll;
//return(pageScrollSize);
}
function set lineScrollSize(sScroll) {
smallScroll = sScroll;
//return(lineScrollSize);
}
function get lineScrollSize() {
return(smallScroll);
}
function get virtualHeight() {
return(__height);
}
function init(Void) {
super.init();
_scrollPosition = 0;
tabEnabled = false;
focusEnabled = false;
boundingBox_mc._visible = false;
boundingBox_mc._width = (boundingBox_mc._height = 0);
}
function createChildren(Void) {
if (scrollTrack_mc == undefined) {
setSkin(skinIDTrack, scrollTrackName);
}
scrollTrack_mc.visible = false;
var _local3 = new Object();
_local3.enabled = false;
_local3.preset = mx.controls.SimpleButton.falseDisabled;
_local3.initProperties = 0;
_local3.autoRepeat = true;
_local3.tabEnabled = false;
var _local2;
if (upArrow_mc == undefined) {
_local2 = createButton(upArrowName, "upArrow_mc", skinIDUpArrow, _local3);
}
_local2.buttonDownHandler = onUpArrow;
_local2.clickHandler = onScrollChanged;
_minHeight = _local2.height;
_minWidth = _local2.width;
if (downArrow_mc == undefined) {
_local2 = createButton(downArrowName, "downArrow_mc", skinIDDownArrow, _local3);
}
_local2.buttonDownHandler = onDownArrow;
_local2.clickHandler = onScrollChanged;
_minHeight = _minHeight + _local2.height;
}
function createButton(linkageName, id, skinID, o) {
if (skinID == skinIDUpArrow) {
o.falseUpSkin = upArrowUpName;
o.falseDownSkin = upArrowDownName;
o.falseOverSkin = upArrowOverName;
} else {
o.falseUpSkin = downArrowUpName;
o.falseDownSkin = downArrowDownName;
o.falseOverSkin = downArrowOverName;
}
var _local3 = createObject(linkageName, id, skinID, o);
this[id].visible = false;
this[id].useHandCursor = false;
return(_local3);
}
function createThumb(Void) {
var _local2 = new Object();
_local2.validateNow = true;
_local2.tabEnabled = false;
_local2.leftSkin = thumbTopName;
_local2.middleSkin = thumbMiddleName;
_local2.rightSkin = thumbBottomName;
_local2.gripSkin = thumbGripName;
createClassObject(mx.controls.scrollClasses.ScrollThumb, "scrollThumb_mc", skinIDThumb, _local2);
}
function setScrollProperties(pSize, mnPos, mxPos, ls) {
var _local4;
var _local2 = scrollTrack_mc;
pageSize = pSize;
largeScroll = (((ls != undefined) && (ls > 0)) ? (ls) : (pSize));
minPos = Math.max(mnPos, 0);
maxPos = Math.max(mxPos, 0);
_scrollPosition = Math.max(minPos, _scrollPosition);
_scrollPosition = Math.min(maxPos, _scrollPosition);
if (((maxPos - minPos) > 0) && (enabled)) {
var _local5 = _scrollPosition;
if (!initializing) {
upArrow_mc.enabled = true;
downArrow_mc.enabled = true;
}
_local2.onPress = (_local2.onDragOver = startTrackScroller);
_local2.onRelease = releaseScrolling;
_local2.onDragOut = (_local2.stopScrolling = stopScrolling);
_local2.onReleaseOutside = releaseScrolling;
_local2.useHandCursor = false;
if (scrollThumb_mc == undefined) {
createThumb();
}
var _local3 = scrollThumb_mc;
if (scrollTrackOverName.length > 0) {
_local2.onRollOver = trackOver;
_local2.onRollOut = trackOut;
}
_local4 = (pageSize / ((maxPos - minPos) + pageSize)) * _local2.height;
if (_local4 < _local3.minHeight) {
if (_local2.height < _local3.minHeight) {
_local3.__set__visible(false);
} else {
_local4 = _local3.minHeight;
_local3.__set__visible(true);
_local3.setSize(_minWidth, _local3.minHeight + 0);
}
} else {
_local3.__set__visible(true);
_local3.setSize(_minWidth, _local4);
}
_local3.setRange(upArrow_mc.__get__height() + 0, (virtualHeight - downArrow_mc.__get__height()) - _local3.__get__height(), minPos, maxPos);
_local5 = Math.min(_local5, maxPos);
scrollPosition = (Math.max(_local5, minPos));
} else {
scrollThumb_mc.__set__visible(false);
if (!initializing) {
upArrow_mc.enabled = false;
downArrow_mc.enabled = false;
}
delete _local2.onPress;
delete _local2.onDragOver;
delete _local2.onRelease;
delete _local2.onDragOut;
delete _local2.onRollOver;
delete _local2.onRollOut;
delete _local2.onReleaseOutside;
}
if (initializing) {
scrollThumb_mc.__set__visible(false);
}
}
function setEnabled(enabledFlag) {
super.setEnabled(enabledFlag);
setScrollProperties(pageSize, minPos, maxPos, largeScroll);
}
function draw(Void) {
if (initializing) {
initializing = false;
scrollTrack_mc.visible = true;
upArrow_mc.__set__visible(true);
downArrow_mc.__set__visible(true);
}
size();
}
function size(Void) {
if (_height == 1) {
return(undefined);
}
if (upArrow_mc == undefined) {
return(undefined);
}
var _local3 = upArrow_mc.__get__height();
var _local2 = downArrow_mc.__get__height();
upArrow_mc.move(0, 0);
var _local4 = scrollTrack_mc;
_local4._y = _local3;
_local4._height = (virtualHeight - _local3) - _local2;
downArrow_mc.move(0, virtualHeight - _local2);
setScrollProperties(pageSize, minPos, maxPos, largeScroll);
}
function dispatchScrollEvent(detail) {
dispatchEvent({type:"scroll", detail:detail});
}
function isScrollBarKey(k) {
if (k == 36) {
if (scrollPosition != 0) {
scrollPosition = (0);
dispatchScrollEvent(minMode);
}
return(true);
}
if (k == 35) {
if (scrollPosition < maxPos) {
scrollPosition = (maxPos);
dispatchScrollEvent(maxMode);
}
return(true);
}
return(false);
}
function scrollIt(inc, mode) {
var _local3 = smallScroll;
if (inc != "Line") {
_local3 = ((largeScroll == 0) ? (pageSize) : (largeScroll));
}
var _local2 = _scrollPosition + (mode * _local3);
if (_local2 > maxPos) {
_local2 = maxPos;
} else if (_local2 < minPos) {
_local2 = minPos;
}
if (scrollPosition != _local2) {
scrollPosition = (_local2);
var _local4 = ((mode < 0) ? (minusMode) : (plusMode));
dispatchScrollEvent(inc + _local4);
}
}
function startTrackScroller(Void) {
_parent.pressFocus();
if (_parent.scrollTrackDownName.length > 0) {
if (_parent.scrollTrackDown_mc == undefined) {
_parent.setSkin(skinIDTrackDown, scrollTrackDownName);
} else {
_parent.scrollTrackDown_mc.visible = true;
}
}
_parent.trackScroller();
_parent.scrolling = setInterval(_parent, "scrollInterval", getStyle("repeatDelay"), "Page", -1);
}
function scrollInterval(inc, mode) {
clearInterval(scrolling);
if (inc == "Page") {
trackScroller();
} else {
scrollIt(inc, mode);
}
scrolling = setInterval(this, "scrollInterval", getStyle("repeatInterval"), inc, mode);
}
function trackScroller(Void) {
if ((scrollThumb_mc._y + scrollThumb_mc.__get__height()) < _ymouse) {
scrollIt("Page", 1);
} else if (scrollThumb_mc._y > _ymouse) {
scrollIt("Page", -1);
}
}
function dispatchScrollChangedEvent(Void) {
dispatchEvent({type:"scrollChanged"});
}
function stopScrolling(Void) {
clearInterval(_parent.scrolling);
_parent.scrollTrackDown_mc.visible = false;
}
function releaseScrolling(Void) {
_parent.releaseFocus();
stopScrolling();
_parent.dispatchScrollChangedEvent();
}
function trackOver(Void) {
if (_parent.scrollTrackOverName.length > 0) {
if (_parent.scrollTrackOver_mc == undefined) {
_parent.setSkin(skinIDTrackOver, scrollTrackOverName);
} else {
_parent.scrollTrackOver_mc.visible = true;
}
}
}
function trackOut(Void) {
_parent.scrollTrackOver_mc.visible = false;
}
function onUpArrow(Void) {
_parent.scrollIt("Line", -1);
}
function onDownArrow(Void) {
_parent.scrollIt("Line", 1);
}
function onScrollChanged(Void) {
_parent.dispatchScrollChangedEvent();
}
static var symbolOwner = mx.core.UIComponent;
var className = "ScrollBar";
var minPos = 0;
var maxPos = 0;
var pageSize = 0;
var largeScroll = 0;
var smallScroll = 1;
var _scrollPosition = 0;
var scrollTrackName = "ScrollTrack";
var scrollTrackOverName = "";
var scrollTrackDownName = "";
var upArrowName = "BtnUpArrow";
var upArrowUpName = "ScrollUpArrowUp";
var upArrowOverName = "ScrollUpArrowOver";
var upArrowDownName = "ScrollUpArrowDown";
var downArrowName = "BtnDownArrow";
var downArrowUpName = "ScrollDownArrowUp";
var downArrowOverName = "ScrollDownArrowOver";
var downArrowDownName = "ScrollDownArrowDown";
var thumbTopName = "ScrollThumbTopUp";
var thumbMiddleName = "ScrollThumbMiddleUp";
var thumbBottomName = "ScrollThumbBottomUp";
var thumbGripName = "ScrollThumbGripUp";
static var skinIDTrack = 0;
static var skinIDTrackOver = 1;
static var skinIDTrackDown = 2;
static var skinIDUpArrow = 3;
static var skinIDDownArrow = 4;
static var skinIDThumb = 5;
var idNames = new Array("scrollTrack_mc", "scrollTrackOver_mc", "scrollTrackDown_mc", "upArrow_mc", "downArrow_mc");
var clipParameters = {minPos:1, maxPos:1, pageSize:1, scrollPosition:1, lineScrollSize:1, pageScrollSize:1, visible:1, enabled:1};
static var mergedClipParameters = mx.core.UIObject.mergeClipParameters(mx.controls.scrollClasses.ScrollBar.prototype.clipParameters, mx.core.UIComponent.prototype.clipParameters);
var initializing = true;
}
Symbol 875 MovieClip [__Packages.mx.core.ScrollView] Frame 0
class mx.core.ScrollView extends mx.core.View
{
var __width, hScroller, vScroller, __maxHPosition, propsInited, scrollAreaChanged, specialHScrollCase, createObject, viewableColumns, __height, oldRndUp, viewableRows, __viewMetrics, owner, enabled, border_mc, __get__width, __get__height, invLayout, mask_mc, _parent, dispatchEvent;
function ScrollView () {
super();
}
function getHScrollPolicy(Void) {
return(__hScrollPolicy);
}
function setHScrollPolicy(policy) {
__hScrollPolicy = policy.toLowerCase();
if (__width == undefined) {
return(undefined);
}
setScrollProperties(numberOfCols, columnWidth, rowC, rowH, heightPadding, widthPadding);
}
function get hScrollPolicy() {
return(getHScrollPolicy());
}
function set hScrollPolicy(policy) {
setHScrollPolicy(policy);
//return(hScrollPolicy);
}
function getVScrollPolicy(Void) {
return(__vScrollPolicy);
}
function setVScrollPolicy(policy) {
__vScrollPolicy = policy.toLowerCase();
if (__width == undefined) {
return(undefined);
}
setScrollProperties(numberOfCols, columnWidth, rowC, rowH, heightPadding, widthPadding);
}
function get vScrollPolicy() {
return(getVScrollPolicy());
}
function set vScrollPolicy(policy) {
setVScrollPolicy(policy);
//return(vScrollPolicy);
}
function get hPosition() {
return(getHPosition());
}
function set hPosition(pos) {
setHPosition(pos);
//return(hPosition);
}
function getHPosition(Void) {
return(__hPosition);
}
function setHPosition(pos) {
hScroller.__set__scrollPosition(pos);
__hPosition = pos;
}
function get vPosition() {
return(getVPosition());
}
function set vPosition(pos) {
setVPosition(pos);
//return(vPosition);
}
function getVPosition(Void) {
return(__vPosition);
}
function setVPosition(pos) {
vScroller.__set__scrollPosition(pos);
__vPosition = pos;
}
function get maxVPosition() {
var _local2 = vScroller.maxPos;
return(((_local2 == undefined) ? 0 : (_local2)));
}
function get maxHPosition() {
return(getMaxHPosition());
}
function set maxHPosition(pos) {
setMaxHPosition(pos);
//return(maxHPosition);
}
function getMaxHPosition(Void) {
if (__maxHPosition != undefined) {
return(__maxHPosition);
}
var _local2 = hScroller.maxPos;
return(((_local2 == undefined) ? 0 : (_local2)));
}
function setMaxHPosition(pos) {
__maxHPosition = pos;
}
function setScrollProperties(colCount, colWidth, rwCount, rwHeight, hPadding, wPadding) {
var _local3 = getViewMetrics();
if (hPadding == undefined) {
hPadding = 0;
}
if (wPadding == undefined) {
wPadding = 0;
}
propsInited = true;
delete scrollAreaChanged;
heightPadding = hPadding;
widthPadding = wPadding;
if (colWidth == 0) {
colWidth = 1;
}
if (rwHeight == 0) {
rwHeight = 1;
}
var _local5 = Math.ceil((((__width - _local3.left) - _local3.right) - widthPadding) / colWidth);
if ((__hScrollPolicy == "on") || ((_local5 < colCount) && (__hScrollPolicy == "auto"))) {
if ((hScroller == undefined) || (specialHScrollCase)) {
delete specialHScrollCase;
hScroller = createObject("HScrollBar", "hSB", 1001);
hScroller.__set__lineScrollSize(20);
hScroller.scrollHandler = scrollProxy;
hScroller.__set__scrollPosition(__hPosition);
scrollAreaChanged = true;
}
if ((((numberOfCols != colCount) || (columnWidth != colWidth)) || (viewableColumns != _local5)) || (scrollAreaChanged)) {
hScroller.setScrollProperties(_local5, 0, colCount - _local5);
viewableColumns = _local5;
numberOfCols = colCount;
columnWidth = colWidth;
}
} else if (((__hScrollPolicy == "auto") || (__hScrollPolicy == "off")) && (hScroller != undefined)) {
hScroller.removeMovieClip();
delete hScroller;
scrollAreaChanged = true;
}
if (heightPadding == undefined) {
heightPadding = 0;
}
var _local4 = Math.ceil((((__height - _local3.top) - _local3.bottom) - heightPadding) / rwHeight);
var _local8 = (((__height - _local3.top) - _local3.bottom) % rwHeight) != 0;
if ((__vScrollPolicy == "on") || ((_local4 < (rwCount + _local8)) && (__vScrollPolicy == "auto"))) {
if (vScroller == undefined) {
vScroller = createObject("VScrollBar", "vSB", 1002);
vScroller.scrollHandler = scrollProxy;
vScroller.__set__scrollPosition(__vPosition);
scrollAreaChanged = true;
rowH = 0;
}
if ((((rowC != rwCount) || (rowH != rwHeight)) || ((viewableRows + _local8) != (_local4 + oldRndUp))) || (scrollAreaChanged)) {
vScroller.setScrollProperties(_local4, 0, (rwCount - _local4) + _local8);
viewableRows = _local4;
rowC = rwCount;
rowH = rwHeight;
oldRndUp = _local8;
}
} else if (((__vScrollPolicy == "auto") || (__vScrollPolicy == "off")) && (vScroller != undefined)) {
vScroller.removeMovieClip();
delete vScroller;
scrollAreaChanged = true;
}
numberOfCols = colCount;
columnWidth = colWidth;
if (scrollAreaChanged) {
doLayout();
var _local2 = __viewMetrics;
var _local12 = ((owner != undefined) ? (owner) : this);
_local12.layoutContent(_local2.left, _local2.top, ((columnWidth * numberOfCols) - _local2.left) - _local2.right, rowC * rowH, (__width - _local2.left) - _local2.right, (__height - _local2.top) - _local2.bottom);
}
if (!enabled) {
setEnabled(false);
}
}
function getViewMetrics(Void) {
var _local2 = __viewMetrics;
var _local3 = border_mc.__get__borderMetrics();
_local2.left = _local3.left;
_local2.right = _local3.right;
if (vScroller != undefined) {
_local2.right = _local2.right + vScroller.minWidth;
}
_local2.top = _local3.top;
if ((hScroller == undefined) && ((__hScrollPolicy == "on") || (__hScrollPolicy == true))) {
hScroller = createObject("FHScrollBar", "hSB", 1001);
specialHScrollCase = true;
}
_local2.bottom = _local3.bottom;
if (hScroller != undefined) {
_local2.bottom = _local2.bottom + hScroller.minHeight;
}
return(_local2);
}
function doLayout(Void) {
var _local10 = __get__width();
var _local8 = __get__height();
delete invLayout;
var _local3 = (__viewMetrics = getViewMetrics());
var _local2 = _local3.left;
var _local9 = _local3.right;
var _local5 = _local3.top;
var _local11 = _local3.bottom;
var _local7 = hScroller;
var _local6 = vScroller;
_local7.setSize((_local10 - _local2) - _local9, _local7.minHeight + 0);
_local7.move(_local2, _local8 - _local11);
_local6.setSize(_local6.minWidth + 0, (_local8 - _local5) - _local11);
_local6.move(_local10 - _local9, _local5);
var _local4 = mask_mc;
_local4._width = (_local10 - _local2) - _local9;
_local4._height = (_local8 - _local5) - _local11;
_local4._x = _local2;
_local4._y = _local5;
}
function createChild(id, name, props) {
var _local2 = super.createChild(id, name, props);
return(_local2);
}
function init(Void) {
super.init();
__viewMetrics = new Object();
if (_global.__SVMouseWheelManager == undefined) {
var _local4 = (_global.__SVMouseWheelManager = new Object());
_local4.onMouseWheel = __onMouseWheel;
Mouse.addListener(_local4);
}
}
function __onMouseWheel(delta, scrollTarget) {
var _local4 = scrollTarget;
var _local1;
while (_local4 != undefined) {
if (_local4 instanceof mx.core.ScrollView) {
_local1 = _local4;
}
_local4 = _local4._parent;
}
if (_local1 != undefined) {
_local4 = ((delta <= 0) ? 1 : -1);
var _local2 = _local1.vScroller.lineScrollSize;
if (_local2 == undefined) {
_local2 = 0;
}
_local2 = Math.max(Math.abs(delta), _local2);
var _local3 = _local1.vPosition + (_local2 * _local4);
_local1.vPosition = Math.max(0, Math.min(_local3, _local1.maxVPosition));
_local1.dispatchEvent({type:"scroll", direction:"vertical", position:_local1.vPosition});
}
}
function createChildren(Void) {
super.createChildren();
if (mask_mc == undefined) {
mask_mc = createObject("BoundingBox", "mask_mc", MASK_DEPTH);
}
mask_mc._visible = false;
}
function invalidate(Void) {
super.invalidate();
}
function draw(Void) {
size();
}
function size(Void) {
super.size();
}
function scrollProxy(docObj) {
_parent.onScroll(docObj);
}
function onScroll(docObj) {
var _local3 = docObj.target;
var _local2 = _local3.scrollPosition;
if (_local3 == vScroller) {
var _local4 = "vertical";
var _local5 = "__vPosition";
} else {
var _local4 = "horizontal";
var _local5 = "__hPosition";
}
this[_local5] = _local2;
dispatchEvent({type:"scroll", direction:_local4, position:_local2});
}
function setEnabled(v) {
vScroller.enabled = (hScroller.enabled = v);
}
function childLoaded(obj) {
super.childLoaded(obj);
obj.setMask(mask_mc);
}
static var symbolName = "ScrollView";
static var symbolOwner = mx.core.ScrollView;
static var version = "2.0.2.126";
var className = "ScrollView";
var __vScrollPolicy = "auto";
var __hScrollPolicy = "off";
var __vPosition = 0;
var __hPosition = 0;
var numberOfCols = 0;
var rowC = 0;
var columnWidth = 1;
var rowH = 0;
var heightPadding = 0;
var widthPadding = 0;
var MASK_DEPTH = 10000;
}
Symbol 876 MovieClip [__Packages.mx.controls.listclasses.DataProvider] Frame 0
class mx.controls.listclasses.DataProvider extends Object
{
var length, splice, dispatchEvent, sortOn, reverse, sort;
function DataProvider (obj) {
super();
}
static function Initialize(obj) {
var _local4 = mixinProps;
var _local6 = _local4.length;
obj = obj.prototype;
var _local3 = 0;
while (_local3 < _local6) {
obj[_local4[_local3]] = mixins[_local4[_local3]];
_global.ASSetPropFlags(obj, _local4[_local3], 1);
_local3++;
}
mx.events.EventDispatcher.initialize(obj);
_global.ASSetPropFlags(obj, "addEventListener", 1);
_global.ASSetPropFlags(obj, "removeEventListener", 1);
_global.ASSetPropFlags(obj, "dispatchEvent", 1);
_global.ASSetPropFlags(obj, "dispatchQueue", 1);
Object.prototype.LargestID = 0;
Object.prototype.getID = function () {
if (this.__ID__ == undefined) {
this.__ID__ = Object.prototype.LargestID++;
_global.ASSetPropFlags(this, "__ID__", 1);
}
return(this.__ID__);
};
_global.ASSetPropFlags(Object.prototype, "LargestID", 1);
_global.ASSetPropFlags(Object.prototype, "getID", 1);
return(true);
}
function addItemAt(index, value) {
if (index < length) {
splice(index, 0, value);
} else if (index > length) {
trace("Cannot add an item past the end of the DataProvider");
return(undefined);
}
this[index] = value;
updateViews("addItems", index, index);
}
function addItem(value) {
addItemAt(length, value);
}
function addItemsAt(index, newItems) {
index = Math.min(length, index);
newItems.unshift(index, 0);
splice.apply(this, newItems);
newItems.splice(0, 2);
updateViews("addItems", index, (index + newItems.length) - 1);
}
function removeItemsAt(index, len) {
var _local3 = new Array();
var _local2 = 0;
while (_local2 < len) {
_local3.push(getItemID(index + _local2));
_local2++;
}
var _local6 = splice(index, len);
dispatchEvent({type:"modelChanged", eventName:"removeItems", firstItem:index, lastItem:(index + len) - 1, removedItems:_local6, removedIDs:_local3});
}
function removeItemAt(index) {
var _local2 = this[index];
removeItemsAt(index, 1);
return(_local2);
}
function removeAll(Void) {
splice(0);
updateViews("removeItems", 0, length - 1);
}
function replaceItemAt(index, itemObj) {
if ((index < 0) || (index >= length)) {
return(undefined);
}
var _local3 = getItemID(index);
this[index] = itemObj;
this[index].__ID__ = _local3;
updateViews("updateItems", index, index);
}
function getItemAt(index) {
return(this[index]);
}
function getItemID(index) {
var _local2 = this[index];
if ((typeof(_local2) != "object") && (_local2 != undefined)) {
return(index);
}
return(_local2.getID());
}
function sortItemsBy(fieldName, order) {
if (typeof(order) == "string") {
sortOn(fieldName);
if (order.toUpperCase() == "DESC") {
reverse();
}
} else {
sortOn(fieldName, order);
}
updateViews("sort");
}
function sortItems(compareFunc, optionFlags) {
sort(compareFunc, optionFlags);
updateViews("sort");
}
function editField(index, fieldName, newData) {
this[index][fieldName] = newData;
dispatchEvent({type:"modelChanged", eventName:"updateField", firstItem:index, lastItem:index, fieldName:fieldName});
}
function getEditingData(index, fieldName) {
return(this[index][fieldName]);
}
function updateViews(event, first, last) {
dispatchEvent({type:"modelChanged", eventName:event, firstItem:first, lastItem:last});
}
static var mixinProps = ["addView", "addItem", "addItemAt", "removeAll", "removeItemAt", "replaceItemAt", "getItemAt", "getItemID", "sortItemsBy", "sortItems", "updateViews", "addItemsAt", "removeItemsAt", "getEditingData", "editField"];
static var evtDipatcher = mx.events.EventDispatcher;
static var mixins = new mx.controls.listclasses.DataProvider();
}
Symbol 877 MovieClip [__Packages.mx.controls.listclasses.ScrollSelectList] Frame 0
class mx.controls.listclasses.ScrollSelectList extends mx.core.ScrollView
{
var invLayoutContent, rows, topRowZ, listContent, __dataProvider, __vPosition, tW, layoutX, layoutY, tH, invRowHeight, invalidate, __height, invUpdateControl, __cellRenderer, __labelFunction, __iconField, __iconFunction, getLength, baseRowZ, lastPosition, propertyTable, isSelected, wasKeySelected, changeFlag, clearSelected, selectItem, lastSelected, dispatchEvent, dragScrolling, _ymouse, scrollInterval, isPressed, onMouseUp, getSelectedIndex, enabled, tabEnabled, tabChildren, createEmptyMovieClip, border_mc;
function ScrollSelectList () {
super();
}
function layoutContent(x, y, w, h) {
delete invLayoutContent;
var _local4 = Math.ceil(h / __rowHeight);
roundUp = (h % __rowHeight) != 0;
var _local12 = _local4 - __rowCount;
if (_local12 < 0) {
var _local3 = _local4;
while (_local3 < __rowCount) {
rows[_local3].removeMovieClip();
delete rows[_local3];
_local3++;
}
topRowZ = topRowZ + _local12;
} else if (_local12 > 0) {
if (rows == undefined) {
rows = new Array();
}
var _local3 = __rowCount;
while (_local3 < _local4) {
var _local2 = (rows[_local3] = listContent.createObject(__rowRenderer, "listRow" + (topRowZ++), topRowZ, {owner:this, styleName:this, rowIndex:_local3}));
_local2._x = x;
_local2._y = Math.round((_local3 * __rowHeight) + y);
_local2.setSize(w, __rowHeight);
_local2.drawRow(__dataProvider.getItemAt(__vPosition + _local3), getStateAt(__vPosition + _local3));
_local2.lastY = _local2._y;
_local3++;
}
}
if (w != tW) {
var _local11 = ((_local12 > 0) ? (__rowCount) : (_local4));
var _local3 = 0;
while (_local3 < _local11) {
rows[_local3].setSize(w, __rowHeight);
_local3++;
}
}
if ((layoutX != x) || (layoutY != y)) {
var _local3 = 0;
while (_local3 < _local4) {
rows[_local3]._x = x;
rows[_local3]._y = Math.round((_local3 * __rowHeight) + y);
_local3++;
}
}
__rowCount = _local4;
layoutX = x;
layoutY = y;
tW = w;
tH = h;
}
function getRowHeight(Void) {
return(__rowHeight);
}
function setRowHeight(v) {
__rowHeight = v;
invRowHeight = true;
invalidate();
}
function get rowHeight() {
return(getRowHeight());
}
function set rowHeight(w) {
setRowHeight(w);
//return(rowHeight);
}
function setRowCount(v) {
__rowCount = v;
}
function getRowCount(Void) {
var _local2 = ((__rowCount == 0) ? (Math.ceil(__height / __rowHeight)) : (__rowCount));
return(_local2);
}
function get rowCount() {
return(getRowCount());
}
function set rowCount(w) {
setRowCount(w);
//return(rowCount);
}
function setEnabled(v) {
super.setEnabled(v);
invUpdateControl = true;
invalidate();
}
function setCellRenderer(cR) {
__cellRenderer = cR;
var _local2 = 0;
while (_local2 < rows.length) {
rows[_local2].setCellRenderer(true);
_local2++;
}
invUpdateControl = true;
invalidate();
}
function set cellRenderer(cR) {
setCellRenderer(cR);
//return(cellRenderer);
}
function get cellRenderer() {
return(__cellRenderer);
}
function set labelField(field) {
setLabelField(field);
//return(labelField);
}
function setLabelField(field) {
__labelField = field;
invUpdateControl = true;
invalidate();
}
function get labelField() {
return(__labelField);
}
function set labelFunction(func) {
setLabelFunction(func);
//return(labelFunction);
}
function setLabelFunction(func) {
__labelFunction = func;
invUpdateControl = true;
invalidate();
}
function get labelFunction() {
return(__labelFunction);
}
function set iconField(field) {
setIconField(field);
//return(iconField);
}
function setIconField(field) {
__iconField = field;
invUpdateControl = true;
invalidate();
}
function get iconField() {
return(__iconField);
}
function set iconFunction(func) {
setIconFunction(func);
//return(iconFunction);
}
function setIconFunction(func) {
__iconFunction = func;
invUpdateControl = true;
invalidate();
}
function get iconFunction() {
return(__iconFunction);
}
function setVPosition(pos) {
if (pos < 0) {
return(undefined);
}
if ((pos > 0) && (pos > ((getLength() - __rowCount) + roundUp))) {
return(undefined);
}
var _local8 = pos - __vPosition;
if (_local8 == 0) {
return(undefined);
}
__vPosition = pos;
var _local10 = _local8 > 0;
_local8 = Math.abs(_local8);
if (_local8 >= __rowCount) {
updateControl();
} else {
var _local4 = new Array();
var _local9 = __rowCount - _local8;
var _local12 = _local8 * __rowHeight;
var _local11 = _local9 * __rowHeight;
var _local6 = (_local10 ? 1 : -1);
var _local3 = 0;
while (_local3 < __rowCount) {
if (((_local3 < _local8) && (_local10)) || ((_local3 >= _local9) && (!_local10))) {
rows[_local3]._y = rows[_local3]._y + Math.round(_local6 * _local11);
var _local5 = _local3 + (_local6 * _local9);
var _local7 = __vPosition + _local5;
_local4[_local5] = rows[_local3];
_local4[_local5].rowIndex = _local5;
_local4[_local5].drawRow(__dataProvider.getItemAt(_local7), getStateAt(_local7), false);
} else {
rows[_local3]._y = rows[_local3]._y - Math.round(_local6 * _local12);
var _local5 = _local3 - (_local6 * _local8);
_local4[_local5] = rows[_local3];
_local4[_local5].rowIndex = _local5;
}
_local3++;
}
rows = _local4;
_local3 = 0;
while (_local3 < __rowCount) {
rows[_local3].swapDepths(baseRowZ + _local3);
_local3++;
}
}
lastPosition = pos;
super.setVPosition(pos);
}
function setPropertiesAt(index, obj) {
var _local2 = __dataProvider.getItemID(index);
if (_local2 == undefined) {
return(undefined);
}
if (propertyTable == undefined) {
propertyTable = new Object();
}
propertyTable[_local2] = obj;
rows[index - __vPosition].drawRow(__dataProvider.getItemAt(index), getStateAt(index));
}
function getPropertiesAt(index) {
var _local2 = __dataProvider.getItemID(index);
if (_local2 == undefined) {
return(undefined);
}
return(propertyTable[_local2]);
}
function getPropertiesOf(obj) {
var _local2 = obj.getID();
if (_local2 == undefined) {
return(undefined);
}
return(propertyTable[_local2]);
}
function getStyle(styleProp) {
var _local2 = super.getStyle(styleProp);
var _local3 = mx.styles.StyleManager.colorNames[_local2];
if (_local3 != undefined) {
_local2 = _local3;
}
return(_local2);
}
function updateControl(Void) {
var _local2 = 0;
while (_local2 < __rowCount) {
rows[_local2].drawRow(__dataProvider.getItemAt(_local2 + __vPosition), getStateAt(_local2 + __vPosition));
_local2++;
}
delete invUpdateControl;
}
function getStateAt(index) {
return((isSelected(index) ? "selected" : "normal"));
}
function selectRow(rowIndex, transition, allowChangeEvent) {
if (!selectable) {
return(undefined);
}
var _local3 = __vPosition + rowIndex;
var _local8 = __dataProvider.getItemAt(_local3);
var _local5 = rows[rowIndex];
if (_local8 == undefined) {
return(undefined);
}
if (transition == undefined) {
transition = true;
}
if (allowChangeEvent == undefined) {
allowChangeEvent = wasKeySelected;
}
changeFlag = true;
if (((!multipleSelection) && (!Key.isDown(17))) || ((!Key.isDown(16)) && (!Key.isDown(17)))) {
clearSelected(transition);
selectItem(_local3, true);
lastSelected = _local3;
_local5.drawRow(_local5.item, getStateAt(_local3), transition);
} else if (Key.isDown(16) && (multipleSelection)) {
if (lastSelected == undefined) {
lastSelected = _local3;
}
var _local4 = ((lastSelected < _local3) ? 1 : -1);
clearSelected(false);
var _local2 = lastSelected;
while (_local2 != _local3) {
selectItem(_local2, true);
if ((_local2 >= __vPosition) && (_local2 < (__vPosition + __rowCount))) {
rows[_local2 - __vPosition].drawRow(rows[_local2 - __vPosition].item, "selected", false);
}
_local2 = _local2 + _local4;
}
selectItem(_local3, true);
_local5.drawRow(_local5.item, "selected", transition);
} else if (Key.isDown(17)) {
var _local7 = isSelected(_local3);
if ((!multipleSelection) || (wasKeySelected)) {
clearSelected(transition);
}
if (!((!multipleSelection) && (_local7))) {
selectItem(_local3, !_local7);
var _local9 = ((!_local7) ? "selected" : "normal");
_local5.drawRow(_local5.item, _local9, transition);
}
lastSelected = _local3;
}
if (allowChangeEvent) {
dispatchEvent({type:"change"});
}
delete wasKeySelected;
}
function dragScroll(Void) {
clearInterval(dragScrolling);
if (_ymouse < 0) {
setVPosition(__vPosition - 1);
selectRow(0, false);
var _local2 = Math.min((-_ymouse) - 30, 0);
scrollInterval = (((0.593 * _local2) * _local2) + 1) + minScrollInterval;
dragScrolling = setInterval(this, "dragScroll", scrollInterval);
dispatchEvent({type:"scroll", direction:"vertical", position:__vPosition});
} else if (_ymouse > __height) {
var _local3 = __vPosition;
setVPosition(__vPosition + 1);
if (_local3 != __vPosition) {
selectRow((__rowCount - 1) - roundUp, false);
}
var _local2 = Math.min((_ymouse - __height) - 30, 0);
scrollInterval = (((0.593 * _local2) * _local2) + 1) + minScrollInterval;
dragScrolling = setInterval(this, "dragScroll", scrollInterval);
dispatchEvent({type:"scroll", direction:"vertical", position:__vPosition});
} else {
dragScrolling = setInterval(this, "dragScroll", 15);
}
updateAfterEvent();
}
function __onMouseUp(Void) {
clearInterval(dragScrolling);
delete dragScrolling;
delete dragScrolling;
delete isPressed;
delete onMouseUp;
if (!selectable) {
return(undefined);
}
if (changeFlag) {
dispatchEvent({type:"change"});
}
delete changeFlag;
}
function moveSelBy(incr) {
if (!selectable) {
setVPosition(__vPosition + incr);
return(undefined);
}
var _local3 = getSelectedIndex();
if (_local3 == undefined) {
_local3 = -1;
}
var _local2 = _local3 + incr;
_local2 = Math.max(0, _local2);
_local2 = Math.min(getLength() - 1, _local2);
if (_local2 == _local3) {
return(undefined);
}
if ((_local3 < __vPosition) || (_local3 >= (__vPosition + __rowCount))) {
setVPosition(_local3);
}
if ((_local2 >= ((__vPosition + __rowCount) - roundUp)) || (_local2 < __vPosition)) {
setVPosition(__vPosition + incr);
}
wasKeySelected = true;
selectRow(_local2 - __vPosition, false);
}
function keyDown(e) {
if (selectable) {
if (findInputText()) {
return(undefined);
}
}
if (e.code == 40) {
moveSelBy(1);
} else if (e.code == 38) {
moveSelBy(-1);
} else if (e.code == 34) {
if (selectable) {
var _local3 = getSelectedIndex();
if (_local3 == undefined) {
_local3 = 0;
}
setVPosition(_local3);
}
moveSelBy((__rowCount - 1) - roundUp);
} else if (e.code == 33) {
if (selectable) {
var _local3 = getSelectedIndex();
if (_local3 == undefined) {
_local3 = 0;
}
setVPosition(_local3);
}
moveSelBy((1 - __rowCount) + roundUp);
} else if (e.code == 36) {
moveSelBy(-__dataProvider.length);
} else if (e.code == 35) {
moveSelBy(__dataProvider.length);
}
}
function findInputText(Void) {
var _local2 = Key.getAscii();
if ((_local2 >= 33) && (_local2 <= 126)) {
findString(String.fromCharCode(_local2));
return(true);
}
}
function findString(str) {
if (__dataProvider.length == 0) {
return(undefined);
}
var _local4 = getSelectedIndex();
if (_local4 == undefined) {
_local4 = 0;
}
var _local6 = 0;
var _local3 = _local4 + 1;
while (_local3 != _local4) {
var _local2 = __dataProvider.getItemAt(_local3);
if (_local2 instanceof XMLNode) {
_local2 = _local2.attributes[__labelField];
} else if (typeof(_local2) != "string") {
_local2 = String(_local2[__labelField]);
}
_local2 = _local2.substring(0, str.length);
if ((str == _local2) || (str.toUpperCase() == _local2.toUpperCase())) {
_local6 = _local3 - _local4;
break;
}
if (_local3 >= (getLength() - 1)) {
_local3 = -1;
}
_local3++;
}
if (_local6 != 0) {
moveSelBy(_local6);
}
}
function onRowPress(rowIndex) {
if (!enabled) {
return(undefined);
}
isPressed = true;
dragScrolling = setInterval(this, "dragScroll", 15);
onMouseUp = __onMouseUp;
if (!selectable) {
return(undefined);
}
selectRow(rowIndex);
}
function onRowRelease(rowIndex) {
}
function onRowRollOver(rowIndex) {
if (!enabled) {
return(undefined);
}
var _local2 = rows[rowIndex].item;
if (getStyle("useRollOver") && (_local2 != undefined)) {
rows[rowIndex].drawRow(_local2, "highlighted", false);
}
dispatchEvent({type:"itemRollOver", index:rowIndex + __vPosition});
}
function onRowRollOut(rowIndex) {
if (!enabled) {
return(undefined);
}
if (getStyle("useRollOver")) {
rows[rowIndex].drawRow(rows[rowIndex].item, getStateAt(rowIndex + __vPosition), false);
}
dispatchEvent({type:"itemRollOut", index:rowIndex + __vPosition});
}
function onRowDragOver(rowIndex) {
if (((!enabled) || (isPressed != true)) || (!selectable)) {
return(undefined);
}
if (dropEnabled) {
} else if (dragScrolling) {
selectRow(rowIndex, false);
} else {
onMouseUp = __onMouseUp;
onRowPress(rowIndex);
}
}
function onRowDragOut(rowIndex) {
if (!enabled) {
return(undefined);
}
if (dragEnabled) {
} else {
onRowRollOut(rowIndex);
}
}
function init(Void) {
super.init();
tabEnabled = true;
tabChildren = false;
if (__dataProvider == undefined) {
__dataProvider = new Array();
__dataProvider.addEventListener("modelChanged", this);
}
baseRowZ = (topRowZ = 10);
}
function createChildren(Void) {
super.createChildren();
listContent = createEmptyMovieClip("content_mc", CONTENTDEPTH);
invLayoutContent = true;
invalidate();
}
function draw(Void) {
if (invRowHeight) {
delete invRowHeight;
__rowCount = 0;
listContent.removeMovieClip();
listContent = createEmptyMovieClip("content_mc", CONTENTDEPTH);
}
if (invUpdateControl) {
updateControl();
}
border_mc.draw();
}
function invalidateStyle(propName) {
if (isRowStyle[propName]) {
invUpdateControl = true;
invalidate();
} else {
var _local3 = 0;
while (_local3 < __rowCount) {
rows[_local3].invalidateStyle(propName);
_local3++;
}
}
super.invalidateStyle(propName);
}
static var mixIt1 = mx.controls.listclasses.DataSelector.Initialize(mx.controls.listclasses.ScrollSelectList);
static var mixIt2 = mx.controls.listclasses.DataProvider.Initialize(Array);
var CONTENTDEPTH = 100;
var __hPosition = 0;
var __rowRenderer = "SelectableRow";
var __rowHeight = 22;
var __rowCount = 0;
var __labelField = "label";
var minScrollInterval = 30;
var dropEnabled = false;
var dragEnabled = false;
var className = "ScrollSelectList";
var isRowStyle = {styleName:true, backgroundColor:true, selectionColor:true, rollOverColor:true, selectionDisabledColor:true, backgroundDisabledColor:true, textColor:true, textSelectedColor:true, textRollOverColor:true, textDisabledColor:true, alternatingRowColors:true, defaultIcon:true};
var roundUp = 0;
var selectable = true;
var multipleSelection = false;
}
Symbol 878 MovieClip [__Packages.mx.controls.List] Frame 0
class mx.controls.List extends mx.controls.listclasses.ScrollSelectList
{
var border_mc, __labels, setDataProvider, roundUp, __get__rowCount, __dataProvider, __maxHPosition, invScrollProps, invalidate, __vPosition, getViewMetrics, setSize, __width, __rowHeight, totalWidth, totalHeight, displayWidth, __hScrollPolicy, vScroller, __hPosition, listContent, data, mask_mc, __height, __rowCount, invRowHeight, invLayoutContent, setScrollProperties, oldVWidth;
function List () {
super();
}
function setEnabled(v) {
super.setEnabled(v);
border_mc.backgroundColorName = (v ? "backgroundColor" : "backgroundDisabledColor");
border_mc.invalidate();
}
function get labels() {
return(__labels);
}
function set labels(lbls) {
__labels = lbls;
setDataProvider(lbls);
//return(labels);
}
function setVPosition(pos) {
pos = Math.min((__dataProvider.length - __get__rowCount()) + roundUp, pos);
pos = Math.max(0, pos);
super.setVPosition(pos);
}
function setHPosition(pos) {
pos = Math.max(Math.min(__maxHPosition, pos), 0);
super.setHPosition(pos);
hScroll(pos);
}
function setMaxHPosition(pos) {
__maxHPosition = pos;
invScrollProps = true;
invalidate();
}
function setHScrollPolicy(policy) {
if ((policy.toLowerCase() == "auto") && (!autoHScrollAble)) {
return(undefined);
}
super.setHScrollPolicy(policy);
if (policy == "off") {
setHPosition(0);
setVPosition(Math.min((__dataProvider.length - __get__rowCount()) + roundUp, __vPosition));
}
}
function setRowCount(rC) {
if (isNaN(rC)) {
return(undefined);
}
var _local2 = getViewMetrics();
setSize(__width, ((__rowHeight * rC) + _local2.top) + _local2.bottom);
}
function layoutContent(x, y, tW, tH, dW, dH) {
totalWidth = tW;
totalHeight = tH;
displayWidth = dW;
var _local4 = (((__hScrollPolicy == "on") || (__hScrollPolicy == "auto")) ? (Math.max(tW, dW)) : (dW));
super.layoutContent(x, y, _local4, dH);
}
function modelChanged(eventObj) {
super.modelChanged(eventObj);
var _local3 = eventObj.eventName;
if ((((_local3 == "addItems") || (_local3 == "removeItems")) || (_local3 == "updateAll")) || (_local3 == "filterModel")) {
invScrollProps = true;
invalidate("invScrollProps");
}
}
function onScroll(eventObj) {
var _local3 = eventObj.target;
if (_local3 == vScroller) {
setVPosition(_local3.scrollPosition);
} else {
hScroll(_local3.scrollPosition);
}
super.onScroll(eventObj);
}
function hScroll(pos) {
__hPosition = pos;
listContent._x = -pos;
}
function init(Void) {
super.init();
if (labels.length > 0) {
var _local6 = new Array();
var _local3 = 0;
while (_local3 < labels.length) {
_local6.addItem({label:labels[_local3], data:data[_local3]});
_local3++;
}
setDataProvider(_local6);
}
__maxHPosition = 0;
}
function createChildren(Void) {
super.createChildren();
listContent.setMask(mask_mc);
border_mc.move(0, 0);
border_mc.setSize(__width, __height);
}
function getRowCount(Void) {
var _local2 = getViewMetrics();
return(((__rowCount == 0) ? (Math.ceil(((__height - _local2.top) - _local2.bottom) / __rowHeight)) : (__rowCount)));
}
function size(Void) {
super.size();
configureScrolling();
var _local3 = getViewMetrics();
layoutContent(_local3.left, _local3.top, __width + __maxHPosition, totalHeight, (__width - _local3.left) - _local3.right, (__height - _local3.top) - _local3.bottom);
}
function draw(Void) {
if (invRowHeight) {
invScrollProps = true;
super.draw();
listContent.setMask(mask_mc);
invLayoutContent = true;
}
if (invScrollProps) {
configureScrolling();
delete invScrollProps;
}
if (invLayoutContent) {
var _local3 = getViewMetrics();
layoutContent(_local3.left, _local3.top, __width + __maxHPosition, totalHeight, (__width - _local3.left) - _local3.right, (__height - _local3.top) - _local3.bottom);
}
super.draw();
}
function configureScrolling(Void) {
var _local2 = __dataProvider.length;
if (__vPosition > Math.max(0, (_local2 - getRowCount()) + roundUp)) {
setVPosition(Math.max(0, Math.min((_local2 - getRowCount()) + roundUp, __vPosition)));
}
var _local3 = getViewMetrics();
var _local4 = ((__hScrollPolicy != "off") ? (((__maxHPosition + __width) - _local3.left) - _local3.right) : ((__width - _local3.left) - _local3.right));
if (_local2 == undefined) {
_local2 = 0;
}
setScrollProperties(_local4, 1, _local2, __rowHeight);
if (oldVWidth != _local4) {
invLayoutContent = true;
}
oldVWidth = _local4;
}
static var symbolOwner = mx.controls.List;
static var symbolName = "List";
var className = "List";
static var version = "2.0.2.126";
var clipParameters = {rowHeight:1, enabled:1, visible:1, labels:1};
var scrollDepth = 1;
var __vScrollPolicy = "on";
var autoHScrollAble = false;
}
Symbol 879 MovieClip [__Packages.mx.effects.Tween] Frame 0
class mx.effects.Tween extends Object
{
static var IntervalToken;
var arrayMode, listener, initVal, endVal, startTime, updateFunc, endFunc, ID;
function Tween (listenerObj, init, end, dur) {
super();
if (listenerObj == undefined) {
return;
}
if (typeof(init) != "number") {
arrayMode = true;
}
listener = listenerObj;
initVal = init;
endVal = end;
if (dur != undefined) {
duration = dur;
}
startTime = getTimer();
if (duration == 0) {
endTween();
} else {
AddTween(this);
}
}
static function AddTween(tween) {
tween.ID = ActiveTweens.length;
ActiveTweens.push(tween);
if (IntervalToken == undefined) {
Dispatcher.DispatchTweens = DispatchTweens;
IntervalToken = setInterval(Dispatcher, "DispatchTweens", Interval);
}
}
static function RemoveTweenAt(index) {
var _local2 = ActiveTweens;
if (((index >= _local2.length) || (index < 0)) || (index == undefined)) {
return(undefined);
}
_local2.splice(index, 1);
var _local4 = _local2.length;
var _local1 = index;
while (_local1 < _local4) {
_local2[_local1].ID--;
_local1++;
}
if (_local4 == 0) {
clearInterval(IntervalToken);
delete IntervalToken;
}
}
static function DispatchTweens(Void) {
var _local2 = ActiveTweens;
var _local3 = _local2.length;
var _local1 = 0;
while (_local1 < _local3) {
_local2[_local1].doInterval();
_local1++;
}
updateAfterEvent();
}
function doInterval() {
var _local2 = getTimer() - startTime;
var _local3 = getCurVal(_local2);
if (_local2 >= duration) {
endTween();
} else if (updateFunc != undefined) {
listener[updateFunc](_local3);
} else {
listener.onTweenUpdate(_local3);
}
}
function getCurVal(curTime) {
if (arrayMode) {
var _local3 = new Array();
var _local2 = 0;
while (_local2 < initVal.length) {
_local3[_local2] = easingEquation(curTime, initVal[_local2], endVal[_local2] - initVal[_local2], duration);
_local2++;
}
return(_local3);
}
return(easingEquation(curTime, initVal, endVal - initVal, duration));
}
function endTween() {
if (endFunc != undefined) {
listener[endFunc](endVal);
} else {
listener.onTweenEnd(endVal);
}
RemoveTweenAt(ID);
}
function setTweenHandlers(update, end) {
updateFunc = update;
endFunc = end;
}
function easingEquation(t, b, c, d) {
return(((c / 2) * (Math.sin(Math.PI * ((t / d) - 0.5)) + 1)) + b);
}
static var ActiveTweens = new Array();
static var Interval = 10;
static var Dispatcher = new Object();
var duration = 3000;
}
Symbol 880 MovieClip [__Packages.mx.controls.listclasses.SelectableRow] Frame 0
class mx.controls.listclasses.SelectableRow extends mx.core.UIComponent
{
var __height, cell, owner, rowIndex, icon_mc, createObject, __width, backGround, highlight, highlightColor, createLabel, createClassObject, listOwner, tabEnabled, item, createEmptyMovieClip, drawRect, isChangedToSelected, bGTween, grandOwner;
function SelectableRow () {
super();
}
function setValue(itmObj, state) {
var _local7 = __height;
var _local2 = cell;
var _local5 = owner;
var _local8 = itemToString(itmObj);
if (_local2.getValue() != _local8) {
_local2.setValue(_local8, itmObj, state);
}
var _local4 = _local5.getPropertiesAt(rowIndex + _local5.__vPosition).icon;
if (_local4 == undefined) {
_local4 = _local5.__iconFunction(itmObj);
if (_local4 == undefined) {
_local4 = itmObj[_local5.__iconField];
if (_local4 == undefined) {
_local4 = _local5.getStyle("defaultIcon");
}
}
}
var _local3 = icon_mc;
if ((_local4 != undefined) && (itmObj != undefined)) {
_local3 = createObject(_local4, "icon_mc", 20);
_local3._x = 2;
_local3._y = (_local7 - _local3._height) / 2;
_local2._x = 4 + _local3._width;
} else {
_local3.removeMovieClip();
_local2._x = 2;
}
var _local9 = ((_local3 == undefined) ? 0 : (_local3._width));
_local2.setSize(__width - _local9, Math.min(_local7, _local2.getPreferredHeight()));
_local2._y = (_local7 - _local2._height) / 2;
}
function size(Void) {
var _local3 = backGround;
var _local2 = cell;
var _local4 = __height;
var _local5 = __width;
var _local6 = ((icon_mc == undefined) ? 0 : (icon_mc._width));
_local2.setSize(_local5 - _local6, Math.min(_local4, _local2.getPreferredHeight()));
_local2._y = (_local4 - _local2._height) / 2;
icon_mc._y = (_local4 - icon_mc._height) / 2;
_local3._x = 0;
_local3._width = _local5;
_local3._height = _local4;
drawRowFill(_local3, normalColor);
drawRowFill(highlight, highlightColor);
}
function setCellRenderer(forceSizing) {
var _local3 = owner.__cellRenderer;
var _local4;
if (cell != undefined) {
_local4 = cell._x;
cell.removeMovieClip();
cell.removeTextField();
}
var _local2;
if (_local3 == undefined) {
_local2 = (cell = createLabel("cll", 0, {styleName:this}));
_local2.styleName = owner;
_local2.selectable = false;
_local2.tabEnabled = false;
_local2.background = false;
_local2.border = false;
} else if (typeof(_local3) == "string") {
_local2 = (cell = createObject(_local3, "cll", 0, {styleName:this}));
} else {
_local2 = (cell = createClassObject(_local3, "cll", 0, {styleName:this}));
}
_local2.owner = this;
_local2.listOwner = owner;
_local2.getCellIndex = getCellIndex;
_local2.getDataLabel = getDataLabel;
if (_local4 != undefined) {
_local2._x = _local4;
}
if (forceSizing) {
size();
}
}
function getCellIndex(Void) {
return({columnIndex:0, itemIndex:owner.rowIndex + listOwner.__vPosition});
}
function getDataLabel() {
return(listOwner.labelField);
}
function init(Void) {
super.init();
tabEnabled = false;
}
function createChildren(Void) {
setCellRenderer(false);
setupBG();
setState(state, false);
}
function drawRow(itmObj, state, transition) {
item = itmObj;
setState(state, transition);
setValue(itmObj, state, transition);
}
function itemToString(itmObj) {
if (itmObj == undefined) {
return(" ");
}
var _local2 = owner.__labelFunction(itmObj);
if (_local2 == undefined) {
_local2 = ((itmObj instanceof XMLNode) ? (itmObj.attributes[owner.__labelField]) : (itmObj[owner.__labelField]));
if (_local2 == undefined) {
_local2 = " ";
if (typeof(itmObj) == "object") {
for (var _local4 in itmObj) {
if (_local4 != "__ID__") {
_local2 = (itmObj[_local4] + ", ") + _local2;
}
}
_local2 = _local2.substring(0, _local2.length - 2);
} else {
_local2 = itmObj;
}
}
}
return(_local2);
}
function setupBG(Void) {
var _local2 = (backGround = createEmptyMovieClip("bG_mc", LOWEST_DEPTH));
drawRowFill(_local2, normalColor);
highlight = createEmptyMovieClip("tran_mc", LOWEST_DEPTH + 10);
_local2.owner = this;
_local2.grandOwner = owner;
_local2.onPress = bGOnPress;
_local2.onRelease = bGOnRelease;
_local2.onRollOver = bGOnRollOver;
_local2.onRollOut = bGOnRollOut;
_local2.onDragOver = bGOnDragOver;
_local2.onDragOut = bGOnDragOut;
_local2.useHandCursor = false;
_local2.trackAsMenu = true;
_local2.drawRect = drawRect;
highlight.drawRect = drawRect;
}
function drawRowFill(mc, newClr) {
mc.clear();
mc.beginFill(newClr);
mc.drawRect(1, 0, __width, __height);
mc.endFill();
mc._width = __width;
mc._height = __height;
}
function setState(newState, transition) {
var _local2 = highlight;
var _local8 = backGround;
var _local4 = __height;
var _local3 = owner;
if (!_local3.enabled) {
if ((newState == "selected") || (state == "selected")) {
highlightColor = _local3.getStyle("selectionDisabledColor");
drawRowFill(_local2, highlightColor);
_local2._visible = true;
_local2._y = 0;
_local2._height = _local4;
} else {
_local2._visible = false;
normalColor = _local3.getStyle("backgroundDisabledColor");
drawRowFill(_local8, normalColor);
}
cell.__enabled = false;
cell.setColor(_local3.getStyle("disabledColor"));
} else {
cell.__enabled = true;
if (transition && ((newState == state) || ((newState == "highlighted") && (state == "selected")))) {
isChangedToSelected = true;
return(undefined);
}
var _local6 = _local3.getStyle("selectionDuration");
var _local7 = 0;
if (isChangedToSelected && (newState == "selected")) {
transition = false;
}
var _local10 = transition && (_local6 != 0);
if (newState == "normal") {
_local7 = _local3.getStyle("color");
normalColor = getNormalColor();
drawRowFill(_local8, normalColor);
if (_local10) {
_local6 = _local6 / 2;
_local2._height = _local4;
_local2._width = __width;
_local2._y = 0;
bGTween = new mx.effects.Tween(this, _local4 + 2, _local4 * 0.2, _local6, 5);
} else {
_local2._visible = false;
}
delete isChangedToSelected;
} else {
highlightColor = _local3.getStyle(((newState == "highlighted") ? "rollOverColor" : "selectionColor"));
drawRowFill(_local2, highlightColor);
_local2._visible = true;
_local7 = _local3.getStyle(((newState == "highlighted") ? "textRollOverColor" : "textSelectedColor"));
if (_local10) {
_local2._height = _local4 * 0.5;
_local2._y = (_local4 - _local2._height) / 2;
bGTween = new mx.effects.Tween(this, _local2._height, _local4 + 2, _local6, 5);
var _local9 = _local3.getStyle("selectionEasing");
if (_local9 != undefined) {
bGTween.easingEquation = _local9;
}
} else {
_local2._y = 0;
_local2._height = _local4;
}
}
cell.setColor(_local7);
}
state = newState;
}
function onTweenUpdate(val) {
highlight._height = val;
highlight._y = (__height - val) / 2;
}
function onTweenEnd(val) {
onTweenUpdate(val);
highlight._visible = state != "normal";
}
function getNormalColor(Void) {
var _local3;
var _local2 = owner;
if (!owner.enabled) {
_local3 = _local2.getStyle("backgroundDisabledColor");
} else {
var _local5 = rowIndex + _local2.__vPosition;
if (rowIndex == undefined) {
_local3 = _local2.getPropertiesOf(item).backgroundColor;
} else {
_local3 = _local2.getPropertiesAt(_local5).backgroundColor;
}
if (_local3 == undefined) {
var _local4 = _local2.getStyle("alternatingRowColors");
if (_local4 == undefined) {
_local3 = _local2.getStyle("backgroundColor");
} else {
_local3 = _local4[_local5 % _local4.length];
}
}
}
return(_local3);
}
function invalidateStyle(propName) {
cell.invalidateStyle(propName);
super.invalidateStyle(propName);
}
function bGOnPress(Void) {
grandOwner.pressFocus();
grandOwner.onRowPress(owner.rowIndex);
}
function bGOnRelease(Void) {
grandOwner.releaseFocus();
grandOwner.onRowRelease(owner.rowIndex);
}
function bGOnRollOver(Void) {
grandOwner.onRowRollOver(owner.rowIndex);
}
function bGOnRollOut(Void) {
grandOwner.onRowRollOut(owner.rowIndex);
}
function bGOnDragOver(Void) {
grandOwner.onRowDragOver(owner.rowIndex);
}
function bGOnDragOut(Void) {
grandOwner.onRowDragOut(owner.rowIndex);
}
static var LOWEST_DEPTH = -16384;
var state = "normal";
var disabledColor = 15263976;
var normalColor = 16777215;
}
Symbol 881 MovieClip [__Packages.mx.controls.HScrollBar] Frame 0
class mx.controls.HScrollBar extends mx.controls.scrollClasses.ScrollBar
{
var _minHeight, _minWidth, _xscale, _rotation, __width, scrollIt;
function HScrollBar () {
super();
}
function getMinWidth(Void) {
return(_minHeight);
}
function getMinHeight(Void) {
return(_minWidth);
}
function init(Void) {
super.init();
_xscale = -100;
_rotation = -90;
}
function get virtualHeight() {
return(__width);
}
function isScrollBarKey(k) {
if (k == 37) {
scrollIt("Line", -1);
return(true);
}
if (k == 39) {
scrollIt("Line", 1);
return(true);
}
return(super.isScrollBarKey(k));
}
static var symbolName = "HScrollBar";
static var symbolOwner = mx.core.UIComponent;
static var version = "2.0.2.126";
var className = "HScrollBar";
var minusMode = "Left";
var plusMode = "Right";
var minMode = "AtLeft";
var maxMode = "AtRight";
}
Symbol 882 MovieClip [__Packages.mx.controls.VScrollBar] Frame 0
class mx.controls.VScrollBar extends mx.controls.scrollClasses.ScrollBar
{
var scrollIt;
function VScrollBar () {
super();
}
function init(Void) {
super.init();
}
function isScrollBarKey(k) {
if (k == 38) {
scrollIt("Line", -1);
return(true);
}
if (k == 40) {
scrollIt("Line", 1);
return(true);
}
if (k == 33) {
scrollIt("Page", -1);
return(true);
}
if (k == 34) {
scrollIt("Page", 1);
return(true);
}
return(super.isScrollBarKey(k));
}
static var symbolName = "VScrollBar";
static var symbolOwner = mx.core.UIComponent;
static var version = "2.0.2.126";
var className = "VScrollBar";
var minusMode = "Up";
var plusMode = "Down";
var minMode = "AtTop";
var maxMode = "AtBottom";
}
Symbol 1105 MovieClip [__Packages.mx.controls.TextArea] Frame 0
class mx.controls.TextArea extends mx.core.ScrollView
{
var label, invalidate, initText, dispatchValueChangedEvent, getHPosition, setHPosition, getVPosition, setVPosition, _color, focusTextField, tfx, tfy, tfw, tfh, doLater, _vpos, _hpos, hookedV, vScroller, hookedH, hScroller, getViewMetrics, __get__width, __get__height, hScrollPolicy, vScrollPolicy, getStyle, getFocusManager, addEventListener, removeEventListener, _getTextFormat;
function TextArea () {
super();
}
function get maxChars() {
return(label.maxChars);
}
function set maxChars(x) {
label.maxChars = x;
//return(maxChars);
}
function get length() {
return(label.length);
}
function get restrict() {
return(label.restrict);
}
function set restrict(s) {
label.restrict = ((s == "") ? null : (s));
//return(restrict);
}
function get wordWrap() {
return(label.wordWrap);
}
function set wordWrap(s) {
label.wordWrap = s;
invalidate();
//return(wordWrap);
}
function get editable() {
return(__editable);
}
function set editable(x) {
__editable = x;
label.type = (x ? "input" : "dynamic");
//return(editable);
}
function get password() {
return(label.password);
}
function set password(s) {
label.password = s;
//return(password);
}
function get html() {
return(getHtml());
}
function set html(value) {
setHtml(value);
//return(html);
}
function getHtml() {
return(label.html);
}
function setHtml(value) {
if (value != label.html) {
label.html = value;
}
}
function get text() {
return(getText());
}
function set text(t) {
setText(t);
//return(text);
}
function getText() {
if (initializing) {
return(initText);
}
var _local2 = label;
if (_local2.html == true) {
return(_local2.htmlText);
}
return(_local2.text);
}
function setText(t) {
if (initializing) {
initText = t;
} else {
var _local2 = label;
if (_local2.html == true) {
_local2.htmlText = t;
} else {
_local2.text = t;
}
invalidate();
}
dispatchValueChangedEvent(t);
}
function get hPosition() {
return(getHPosition());
}
function set hPosition(pos) {
setHPosition(pos);
label.hscroll = pos;
label.background = false;
//return(hPosition);
}
function get vPosition() {
return(getVPosition());
}
function set vPosition(pos) {
setVPosition(pos);
label.scroll = pos + 1;
label.background = false;
//return(vPosition);
}
function get maxVPosition() {
var _local2 = label.maxscroll - 1;
return(((_local2 == undefined) ? 0 : (_local2)));
}
function get maxHPosition() {
var _local2 = label.maxhscroll;
return(((_local2 == undefined) ? 0 : (_local2)));
}
function init(Void) {
super.init();
label.styleName = this;
_color = mx.core.UIObject.textColorList;
focusTextField = label;
label.owner = this;
label.onSetFocus = function (x) {
this._parent.onSetFocus(x);
};
label.onKillFocus = function (x) {
this._parent.onKillFocus(x);
};
label.drawFocus = function (b) {
this._parent.drawFocus(b);
};
label.onChanged = function () {
this.owner.adjustScrollBars();
this.owner.dispatchEvent({type:"change"});
this.owner.dispatchValueChangedEvent(this.owner.text);
};
label.onScroller = function () {
this.owner.hPosition = this.hscroll;
this.owner.vPosition = this.scroll - 1;
};
if (text == undefined) {
text = ("");
}
}
function createChildren(Void) {
super.createChildren();
label.autoSize = "none";
}
function layoutContent(x, y, totalW, totalH, displayW, displayH) {
var _local2 = label;
if ((((tfx != x) || (tfy != y)) || (tfw != displayW)) || (tfh != displayH)) {
tfx = x;
tfy = y;
tfw = displayW;
tfh = displayH;
_local2.move(tfx, tfy);
_local2.setSize(tfw, tfh);
doLater(this, "adjustScrollBars");
}
}
function scrollChanged(Void) {
var _local2 = Selection;
if (_local2.lastBeginIndex != undefined) {
restoreSelection();
}
label.background = false;
}
function onScroll(docObj) {
var _local3 = label;
super.onScroll(docObj);
_local3.hscroll = hPosition + 0;
_local3.scroll = vPosition + 1;
_vpos = _local3.scroll;
_hpos = _local3.hscroll;
_local3.background = false;
if (hookedV != true) {
vScroller.addEventListener("scrollChanged", this);
hookedV = true;
}
if (hookedH != true) {
hScroller.addEventListener("scrollChanged", this);
hookedH = true;
}
}
function size(Void) {
var _local3 = getViewMetrics();
var _local7 = _local3.left + _local3.right;
var _local4 = _local3.top + _local3.bottom;
var _local6 = _local3.left;
var _local5 = _local3.top;
tfx = _local6;
tfy = _local5;
tfw = __get__width() - _local7;
tfh = __get__height() - _local4;
super.size();
label.move(tfx, tfy);
label.setSize(tfw, tfh);
if (__get__height() <= 40) {
hScrollPolicy = "off";
vScrollPolicy = "off";
}
doLater(this, "adjustScrollBars");
}
function setEnabled(enable) {
vScroller.enabled = enable;
hScroller.enabled = enable;
label.type = (((editable == false) || (enable == false)) ? "dynamic" : "input");
label.selectable = enable;
var _local3 = getStyle((enable ? "color" : "disabledColor"));
if (_local3 == undefined) {
_local3 = (enable ? 0 : 8947848);
}
setColor(_local3);
}
function setColor(col) {
label.textColor = col;
}
function setFocus(Void) {
Selection.setFocus(label);
}
function onSetFocus(x) {
var f = Selection.getFocus();
var o = eval (f);
if (o != label) {
Selection.setFocus(label);
return(undefined);
}
getFocusManager().defaultPushButtonEnabled = false;
addEventListener("keyDown", this);
super.onSetFocus(x);
}
function onKillFocus(x) {
getFocusManager().defaultPushButtonEnabled = true;
removeEventListener("keyDown", this);
super.onKillFocus(x);
}
function restoreSelection(x) {
var _local2 = Selection;
Selection.setSelection(_local2.lastBeginIndex, _local2.lastEndIndex);
label.scroll = _vpos;
label.hscroll = _hpos;
}
function getLineOffsets(Void) {
var _local16 = _getTextFormat();
var _local18 = _local16.getTextExtent2(label.text);
var _local5 = _root._getTextExtent;
_local5.setNewTextFormat(_local16);
var _local14 = label.wordWrap;
var _local9 = 0;
var _local7 = (label._width - 2) - 2;
var _local12 = new Array();
var _local17 = new String(label.text);
var _local15 = _local17.split("\r");
var _local11 = 0;
while (_local11 < _local15.length) {
_local12.push(_local9);
var _local4 = _local15[_local11];
_local5.text = _local4;
var _local13 = Math.ceil(_local5.textWidth / _local7);
var _local10 = Math.floor(_local4.length / _local13);
var _local3;
while (_local14 && (_local5.textWidth > _local7)) {
_local3 = _local4.indexOf(" ", _local10);
var _local6;
if (_local3 == -1) {
_local3 = _local4.lastIndexOf(" ");
if (_local3 == -1) {
_local3 = _local10;
}
}
_local6 = _local4.substr(0, _local3);
_local5.text = _local6;
if (_local5.textWidth > _local7) {
while (_local5.textWidth > _local7) {
var _local8 = _local3;
_local3 = _local4.lastIndexOf(" ", _local3 - 1);
if (_local3 == -1) {
_local3 = _local8 - 1;
}
_local6 = _local4.substr(0, _local3);
_local5.text = _local6;
}
} else if (_local5.textWidth < _local7) {
var _local8 = _local3;
while (_local5.textWidth < _local7) {
_local8 = _local3;
_local3 = _local4.indexOf(" ", _local3 + 1);
if (_local3 == -1) {
if (_local4.indexOf(" ", 0) != -1) {
break;
}
_local3 = _local8 + 1;
}
_local6 = _local4.substr(0, _local3);
_local5.text = _local6;
}
_local3 = _local8;
}
_local9 = _local9 + _local3;
_local12.push(_local9 + 1);
_local4 = _local4.substr(_local3);
if (_local4.charAt(0) == " ") {
_local4 = _local4.substr(1, _local4.length - 1);
_local9 = _local9 + 1;
}
_local5.text = _local4;
}
_local9 = _local9 + (_local4.length + 1);
_local11++;
}
return(_local12);
}
function keyDown(e) {
var _local5 = e.code;
if (_local5 == 34) {
var _local6 = (label.bottomScroll - label.scroll) + 1;
var _local3 = getLineOffsets();
var _local2 = Math.min(label.bottomScroll + 1, label.maxscroll);
if (_local2 == label.maxscroll) {
var _local4 = label.length;
Selection.setSelection(_local4, _local4);
} else {
label.scroll = _local2;
Selection.setSelection(_local3[_local2 - 1], _local3[_local2 - 1]);
}
} else if (_local5 == 33) {
var _local6 = (label.bottomScroll - label.scroll) + 1;
var _local3 = getLineOffsets();
var _local2 = label.scroll - 1;
if (_local2 < 1) {
Selection.setSelection(0, 0);
} else {
Selection.setSelection(_local3[_local2 - 1], _local3[_local2 - 1]);
label.scroll = Math.max(_local2 - _local6, 1);
}
}
}
function draw(Void) {
var _local2 = label;
var _local4 = getText();
if (initializing) {
initializing = false;
delete initText;
}
var _local3 = _getTextFormat();
_local2.embedFonts = _local3.embedFonts == true;
if (_local3 != undefined) {
_local2.setTextFormat(_local3);
_local2.setNewTextFormat(_local3);
}
_local2.multiline = true;
_local2.wordWrap = wordWrap == true;
if (_local2.html == true) {
_local2.setTextFormat(_local3);
_local2.htmlText = _local4;
} else {
_local2.text = _local4;
}
_local2.type = ((editable == true) ? "input" : "dynamic");
size();
_local2.background = false;
}
function adjustScrollBars() {
var _local2 = label;
var _local4 = (_local2.bottomScroll - _local2.scroll) + 1;
var _local3 = (_local4 + _local2.maxscroll) - 1;
if (_local3 < 1) {
_local3 = 1;
}
var _local5 = 0;
if ((_local2.textWidth + 5) > _local2._width) {
if (!_local2.wordWrap) {
_local5 = _local2._width + _local2.maxhscroll;
}
} else {
_local2.hscroll = 0;
_local2.background = false;
}
if ((_local2.height / _local4) != Math.round(_local2.height / _local4)) {
_local3--;
}
setScrollProperties(_local5, 1, _local3, _local2.height / _local4);
}
function setScrollProperties(colCount, colWidth, rwCount, rwHeight, hPadding, wPadding) {
super.setScrollProperties(colCount, colWidth, rwCount, rwHeight, hPadding, wPadding);
if (vScroller == undefined) {
hookedV = false;
}
if (hScroller == undefined) {
hookedH = false;
}
}
function get tabIndex() {
return(label.tabIndex);
}
function set tabIndex(w) {
label.tabIndex = w;
//return(tabIndex);
}
function set _accProps(val) {
label._accProps = val;
//return(_accProps);
}
function get _accProps() {
return(label._accProps);
}
function get styleSheet() {
return(label.styleSheet);
}
function set styleSheet(v) {
label.styleSheet = v;
//return(styleSheet);
}
static var symbolName = "TextArea";
static var symbolOwner = mx.controls.TextArea;
static var version = "2.0.2.126";
var className = "TextArea";
var initializing = true;
var clipParameters = {text:1, wordWrap:1, editable:1, maxChars:1, restrict:1, html:1, password:1};
static var mergedClipParameters = mx.core.UIObject.mergeClipParameters(mx.controls.TextArea.prototype.clipParameters, mx.core.ScrollView.prototype.clipParameters);
var __vScrollPolicy = "auto";
var __hScrollPolicy = "auto";
var __editable = true;
}
Symbol 1483 MovieClip [__Packages.mx.controls.RadioButton] Frame 0
class mx.controls.RadioButton extends mx.controls.Button
{
var setToggle, __value, selected, releaseFocus, phase, dispatchEvent, _parent, __data, setState, __state, getFocusManager;
function RadioButton () {
super();
}
function init(Void) {
setToggle(__toggle);
__value = this;
super.init();
}
function size(Void) {
super.size();
}
function onRelease() {
if (selected) {
return(undefined);
}
releaseFocus();
phase = "up";
setSelected(true);
dispatchEvent({type:"click"});
_parent[__groupName].dispatchEvent({type:"click"});
}
function setData(val) {
__data = val;
}
function set data(val) {
__data = val;
//return(data);
}
function getData(val) {
return(__data);
}
function get data() {
return(__data);
}
function onUnload() {
if (_parent[__groupName].selectedRadio == this) {
_parent[__groupName].selectedRadio = undefined;
}
_parent[__groupName].radioList[indexNumber] = null;
delete _parent[__groupName].radioList[indexNumber];
}
function setSelected(val) {
var _local2 = _parent[__groupName];
var _local4 = _local2.selectedRadio.__width;
var _local5 = _local2.selectedRadio.__height;
if (val) {
_local2.selectedRadio.setState(false);
_local2.selectedRadio = this;
} else if (_local2.selectedRadio == this) {
_local2.selectedRadio.setState(false);
_local2.selectedRadio = undefined;
}
setState(val);
}
function deleteGroupObj(groupName) {
delete _parent[groupName];
}
function getGroupName() {
return(__groupName);
}
function get groupName() {
return(__groupName);
}
function setGroupName(groupName) {
if ((groupName == undefined) || (groupName == "")) {
return(undefined);
}
delete _parent[__groupName].radioList[__data];
addToGroup(groupName);
__groupName = groupName;
}
function set groupName(groupName) {
setGroupName(groupName);
//return(this.groupName);
}
function addToGroup(groupName) {
if ((groupName == "") || (groupName == undefined)) {
return(undefined);
}
var _local2 = _parent[groupName];
if (_local2 == undefined) {
_local2 = (_parent[groupName] = new mx.controls.RadioButtonGroup());
_local2.__groupName = groupName;
}
_local2.addInstance(this);
if (__state) {
_local2.selectedRadio.setState(false);
_local2.selectedRadio = this;
}
}
function get emphasized() {
return(undefined);
}
function keyDown(e) {
switch (e.code) {
case 40 :
setNext();
break;
case 38 :
setPrev();
break;
case 37 :
setPrev();
break;
case 39 :
setNext();
}
}
function setNext() {
var _local2 = _parent[groupName];
if ((_local2.selectedRadio.indexNumber + 1) == _local2.radioList.length) {
return(undefined);
}
var _local4 = (_local2.selectedRadio ? (_local2.selectedRadio.indexNumber) : -1);
var _local3 = 1;
while (_local3 < _local2.radioList.length) {
if ((_local2.radioList[_local4 + _local3] != undefined) && (_local2.radioList[_local4 + _local3].enabled)) {
var _local5 = getFocusManager();
_local2.radioList[_local4 + _local3].selected = true;
_local5.setFocus(_local2.radioList[_local2.selectedRadio.indexNumber]);
_local2.dispatchEvent({type:"click"});
break;
}
_local3++;
}
}
function setPrev() {
var _local2 = _parent[groupName];
if (_local2.selectedRadio.indexNumber == 0) {
return(undefined);
}
var _local4 = (_local2.selectedRadio ? (_local2.selectedRadio.indexNumber) : 1);
var _local3 = 1;
while (_local3 < _local2.radioList.length) {
if ((_local2.radioList[_local4 - _local3] != undefined) && (_local2.radioList[_local4 - _local3].enabled)) {
var _local5 = getFocusManager();
_local2.radioList[_local4 - _local3].selected = true;
_local5.setFocus(_local2.radioList[_local2.selectedRadio.indexNumber]);
_local2.dispatchEvent({type:"click"});
break;
}
_local3++;
}
}
function set toggle(v) {
//return(toggle);
}
function get toggle() {
}
function set icon(v) {
//return(icon);
}
function get icon() {
}
static var symbolName = "RadioButton";
static var symbolOwner = mx.controls.RadioButton;
static var version = "2.0.2.126";
var className = "RadioButton";
var btnOffset = 0;
var __toggle = true;
var __label = "Radio Button";
var __labelPlacement = "right";
var ignoreClassStyleDeclaration = {Button:1};
var __groupName = "radioGroup";
var indexNumber = 0;
var offset = false;
var falseUpSkin = "";
var falseDownSkin = "";
var falseOverSkin = "";
var falseDisabledSkin = "";
var trueUpSkin = "";
var trueDownSkin = "";
var trueOverSkin = "";
var trueDisabledSkin = "";
var falseUpIcon = "RadioFalseUp";
var falseDownIcon = "RadioFalseDown";
var falseOverIcon = "RadioFalseOver";
var falseDisabledIcon = "RadioFalseDisabled";
var trueUpIcon = "RadioTrueUp";
var trueDownIcon = "";
var trueOverIcon = "";
var trueDisabledIcon = "RadioTrueDisabled";
var centerContent = false;
var borderW = 0;
var clipParameters = {labelPlacement:1, data:1, label:1, groupName:1, selected:1};
static var mergedClipParameters = mx.core.UIObject.mergeClipParameters(mx.controls.RadioButton.prototype.clipParameters, mx.controls.Button.prototype.clipParameters);
}
Symbol 1500 MovieClip [__Packages.mx.controls.RadioButtonGroup] Frame 0
class mx.controls.RadioButtonGroup
{
var radioList, __groupName, selectedRadio;
function RadioButtonGroup () {
init();
mx.events.UIEventDispatcher.initialize(this);
}
function init(Void) {
radioList = new Array();
}
function setGroupName(groupName) {
if ((groupName == undefined) || (groupName == "")) {
return(undefined);
}
var _local6 = __groupName;
_parent[groupName] = this;
for (var _local5 in radioList) {
radioList[_local5].groupName = groupName;
var _local3 = radioList[_local5];
}
_local3.deleteGroupObj(_local6);
}
function getGroupName() {
return(__groupName);
}
function addInstance(instance) {
instance.indexNumber = indexNumber++;
radioList.push(instance);
}
function getValue() {
if (selectedRadio.data == "") {
return(selectedRadio.label);
}
return(selectedRadio.__data);
}
function getLabelPlacement() {
for (var _local3 in radioList) {
var _local2 = radioList[_local3].getLabelPlacement();
}
return(_local2);
}
function setLabelPlacement(pos) {
for (var _local3 in radioList) {
radioList[_local3].setLabelPlacement(pos);
}
}
function setEnabled(val) {
for (var _local3 in radioList) {
radioList[_local3].enabled = val;
}
}
function setSize(val, val1) {
for (var _local3 in radioList) {
radioList[_local3].setSize(val, val1);
}
}
function getEnabled() {
for (var _local4 in radioList) {
var _local2 = radioList[_local4].enabled;
var _local3 = t + (_local2 + 0);
}
if (_local3 == radioList.length) {
return(true);
}
if (_local3 == 0) {
return(false);
}
}
function setStyle(name, val) {
for (var _local4 in radioList) {
radioList[_local4].setStyle(name, val);
}
}
function setInstance(val) {
for (var _local3 in radioList) {
if (radioList[_local3] == val) {
radioList[_local3].selected = true;
}
}
}
function getInstance() {
return(selectedRadio);
}
function setValue(val) {
for (var _local4 in radioList) {
if ((radioList[_local4].__data == val) || (radioList[_local4].label == val)) {
var _local2 = _local4;
break;
}
}
if (_local2 != undefined) {
selectedRadio.setState(false);
selectedRadio.hitArea_mc._height = selectedRadio.__height;
selectedRadio.hitArea_mc._width = selectedRadio.__width;
selectedRadio = radioList[_local2];
selectedRadio.setState(true);
selectedRadio.hitArea_mc._height = (selectedRadio.hitArea_mc._width = 0);
}
}
function set groupName(groupName) {
if ((groupName == undefined) || (groupName == "")) {
return;
}
var _local6 = __groupName;
_parent[groupName] = this;
for (var _local5 in radioList) {
radioList[_local5].groupName = groupName;
var _local3 = radioList[_local5];
}
_local3.deleteGroupObj(_local6);
//return(this.groupName);
}
function get groupName() {
return(__groupName);
}
function set selectedData(val) {
for (var _local4 in radioList) {
if ((radioList[_local4].__data == val) || (radioList[_local4].label == val)) {
var _local2 = _local4;
break;
}
}
if (_local2 != undefined) {
selectedRadio.setState(false);
selectedRadio = radioList[_local2];
selectedRadio.setState(true);
}
//return(selectedData);
}
function get selectedData() {
if ((selectedRadio.data == "") || (selectedRadio.data == undefined)) {
return(selectedRadio.label);
}
return(selectedRadio.__data);
}
function get selection() {
return(selectedRadio);
}
function set selection(val) {
for (var _local3 in radioList) {
if (radioList[_local3] == val) {
radioList[_local3].selected = true;
}
}
//return(selection);
}
function set labelPlacement(pos) {
for (var _local3 in radioList) {
radioList[_local3].setLabelPlacement(pos);
}
//return(labelPlacement);
}
function get labelPlacement() {
for (var _local3 in radioList) {
var _local2 = radioList[_local3].getLabelPlacement();
}
return(_local2);
}
function set enabled(val) {
for (var _local3 in radioList) {
radioList[_local3].enabled = val;
}
//return(enabled);
}
function get enabled() {
var _local2 = 0;
for (var _local3 in radioList) {
_local2 = _local2 + radioList[_local3].enabled;
}
if (_local2 == 0) {
return(false);
}
if (_local2 == radioList.length) {
return(true);
}
}
static var symbolName = "RadioButtonGroup";
static var symbolOwner = mx.controls.RadioButtonGroup;
static var version = "2.0.2.126";
var className = "RadioButtonGroup";
var indexNumber = 0;
}
Symbol 1633 MovieClip [__Packages.mx.controls.NumericStepper] Frame 0
class mx.controls.NumericStepper extends mx.core.UIComponent
{
var boundingBox_mc, _visible, tabEnabled, tabChildren, nextButton_mc, __width, prevButton_mc, __height, inputField, StepTrack_mc, focusTextField, createObject, enabled, __set__visible, setSize, createClassObject, __maxChars, dispatchEvent;
function NumericStepper () {
super();
}
function init() {
super.init();
boundingBox_mc._visible = false;
boundingBox_mc._width = (boundingBox_mc._height = 0);
_visible = false;
tabEnabled = false;
tabChildren = true;
}
function setVisible(x, noEvent) {
super.setVisible(x, noEvent);
if (initializing) {
__visible = x;
}
}
function layoutControl() {
nextButton_mc._x = __width - nextButton_mc.__width;
nextButton_mc._y = 0;
prevButton_mc._x = __width - prevButton_mc.__width;
prevButton_mc._y = __height - prevButton_mc.__height;
inputField.setSize(__width - nextButton_mc.__width, __height);
StepTrack_mc._width = Math.max(nextButton_mc.__width, prevButton_mc.__width);
StepTrack_mc._x = __width - StepTrack_mc._width;
StepTrack_mc._height = __height - (nextButton_mc._height + prevButton_mc._height);
StepTrack_mc._y = nextButton_mc.__height;
}
function createChildren() {
super.createChildren();
addAsset("nextButton_mc", skinIDUpArrow);
addAsset("prevButton_mc", skinIDDownArrow);
addAsset("inputField", skinIDInput);
focusTextField = inputField.label;
createObject("StepTrack", "StepTrack_mc", 2);
size();
}
function draw() {
prevButton_mc.enabled = enabled;
nextButton_mc.enabled = enabled;
inputField.enabled = enabled;
size();
initializing = false;
__set__visible(__visible);
}
function size() {
var _local2 = calcMinHeight();
var _local3 = calcMinWidth();
if (__height < _local2) {
setSize(__width, _local2);
}
if (__width < _local3) {
setSize(_local3, __height);
}
layoutControl();
}
function calcMinHeight() {
return(22);
}
function calcMinWidth() {
return(40);
}
function addAsset(id, skinID) {
var _local2 = new Object();
_local2.styleName = this;
if (skinID == 10) {
_local2.falseUpSkin = upArrowUp;
_local2.falseOverSkin = upArrowOver;
_local2.falseDownSkin = upArrowDown;
_local2.falseDisabledSkin = upArrowDisabled;
createClassObject(mx.controls.SimpleButton, id, skinID, _local2);
var _local5 = nextButton_mc;
_local5.tabEnabled = false;
_local5.styleName = this;
_local5._x = __width - _local5.__width;
_local5._y = 0;
_local5.owner = this;
_local5.autoRepeat = true;
_local5.clickHandler = function () {
Selection.setSelection(0, 0);
};
_local5.buttonDownHandler = function () {
this.owner.buttonPress(this);
};
} else if (skinID == 11) {
_local2.falseUpSkin = downArrowUp;
_local2.falseOverSkin = downArrowOver;
_local2.falseDownSkin = downArrowDown;
_local2.falseDisabledSkin = downArrowDisabled;
createClassObject(mx.controls.SimpleButton, id, skinID, _local2);
var _local3 = prevButton_mc;
_local3.tabEnabled = false;
_local3.styleName = this;
_local3._x = __width - _local3.__width;
_local3._y = __height - _local3.__height;
_local3.owner = this;
_local3.autoRepeat = true;
_local3.clickHandler = function () {
Selection.setSelection(0, 0);
};
_local3.buttonDownHandler = function () {
this.owner.buttonPress(this);
};
} else if (skinID == 9) {
createClassObject(mx.controls.TextInput, id, skinID);
var _local4 = inputField;
_local4.styleName = this;
_local4.setSize(__width - nextButton_mc.__width, __height);
_local4.restrict = "0-9\\-\\.\\,";
_local4.maxChars = __maxChars;
_local4.text = value;
_local4.onSetFocus = function () {
this._parent.onSetFocus();
};
_local4.onKillFocus = function () {
this._parent.onKillFocus();
};
_local4.drawFocus = function (b) {
this._parent.drawFocus(b);
};
_local4.onKeyDown = function () {
this._parent.onFieldKeyDown();
};
}
}
function setFocus() {
Selection.setFocus(inputField);
}
function onKillFocus() {
mx.managers.SystemManager.form.focusManager.defaultPushButtonEnabled = true;
super.onKillFocus();
Key.removeListener(inputField);
if (Number(inputField.text) != value) {
var _local3 = checkValidValue(Number(inputField.text));
inputField.text = _local3;
value = (_local3);
dispatchEvent({type:"change"});
}
}
function onSetFocus() {
super.onSetFocus();
Key.addListener(inputField);
mx.managers.SystemManager.form.focusManager.defaultPushButtonEnabled = false;
}
function onFieldKeyDown() {
var _local2 = value;
switch (Key.getCode()) {
case 40 :
var _local3 = value - stepSize;
value = (_local3);
if (_local2 != value) {
dispatchEvent({type:"change"});
}
break;
case 38 :
_local3 = stepSize + value;
value = (_local3);
if (_local2 != value) {
dispatchEvent({type:"change"});
}
break;
case 36 :
inputField.text = minimum;
value = (minimum);
if (_local2 != value) {
dispatchEvent({type:"change"});
}
break;
case 35 :
inputField.text = maximum;
value = (maximum);
if (_local2 != value) {
dispatchEvent({type:"change"});
}
break;
case 13 :
value = (Number(inputField.text));
if (_local2 == value) {
break;
}
dispatchEvent({type:"change"});
}
}
function get nextValue() {
if (checkRange(value + stepSize)) {
__nextValue = value + stepSize;
return(__nextValue);
}
}
function get previousValue() {
if (checkRange(__value - stepSize)) {
__previousValue = value - stepSize;
return(__previousValue);
}
}
function set maxChars(num) {
__maxChars = num;
inputField.maxChars = __maxChars;
//return(maxChars);
}
function get maxChars() {
return(__maxChars);
}
function get value() {
return(__value);
}
function set value(v) {
var _local2 = checkValidValue(v);
if (_local2 == __value) {
return;
}
inputField.text = (__value = _local2);
//return(value);
}
function get minimum() {
return(__minimum);
}
function set minimum(v) {
__minimum = v;
//return(minimum);
}
function get maximum() {
return(__maximum);
}
function set maximum(v) {
__maximum = v;
//return(maximum);
}
function get stepSize() {
return(__stepSize);
}
function set stepSize(v) {
__stepSize = v;
//return(stepSize);
}
function onFocus() {
}
function buttonPress(button) {
var _local2 = value;
if (button._name == "nextButton_mc") {
value = value + stepSize;
} else {
value = value - stepSize;
}
if (_local2 != value) {
dispatchEvent({type:"change"});
Selection.setSelection(0, 0);
}
}
function checkRange(v) {
return((v >= minimum) and (v <= maximum));
}
function checkValidValue(val) {
var _local7 = val / stepSize;
var _local9 = Math.floor(_local7);
var _local2 = stepSize;
var _local6 = minimum;
var _local5 = maximum;
if ((val > _local6) and (val < _local5)) {
if ((_local7 - _local9) == 0) {
return(val);
}
var _local8 = Math.floor(val / _local2);
var _local4 = _local8 * _local2;
if (((((val - _local4) >= (_local2 / 2)) && (_local5 >= (_local4 + _local2))) && (_local6 <= (_local4 - _local2))) || (((val + _local2) == _local5) && (((_local5 - _local4) - _local2) > 1E-14))) {
_local4 = _local4 + _local2;
}
return(_local4);
}
if (val >= _local5) {
return(_local5);
}
return(_local6);
}
function onLabelChanged(o) {
var _local2 = checkValidValue(Number(o.__get__text()));
o.__set__text(_local2);
value = (_local2);
}
function get tabIndex() {
return(inputField.tabIndex);
}
function set tabIndex(w) {
inputField.tabIndex = w;
//return(tabIndex);
}
static var symbolName = "NumericStepper";
static var symbolOwner = mx.controls.NumericStepper;
static var version = "2.0.2.126";
var className = "NumericStepper";
var upArrowUp = "StepUpArrowUp";
var upArrowDown = "StepUpArrowDown";
var upArrowOver = "StepUpArrowOver";
var upArrowDisabled = "StepUpArrowDisabled";
var downArrowUp = "StepDownArrowUp";
var downArrowDown = "StepDownArrowDown";
var downArrowOver = "StepDownArrowOver";
var downArrowDisabled = "StepDownArrowDisabled";
var skinIDUpArrow = 10;
var skinIDDownArrow = 11;
var skinIDInput = 9;
var initializing = true;
var __visible = true;
var __minimum = 0;
var __maximum = 10;
var __stepSize = 1;
var __value = 0;
var __nextValue = 0;
var __previousValue = 0;
var clipParameters = {minimum:1, maximum:1, stepSize:1, value:1, maxChars:1};
static var mergedClipParameters = mx.core.UIObject.mergeClipParameters(mx.controls.NumericStepper.prototype.clipParameters, mx.core.UIComponent.prototype.clipParameters);
}
Symbol 331 Button
on (release) {
_root.nextFrame();
}
Symbol 333 MovieClip Frame 125
stop();
Symbol 347 MovieClip [light1] Frame 1
block = _root.world[_name.substr(5, _name.length)].blockType.ty;
onEnterFrame = function () {
if (((((((!random(100)) || ((_y + _parent._y) > 550)) || ((_y + _parent._y) < -150)) || ((_x + _parent._x) > 650)) || ((_x + _parent._x) < -150)) || (_root.world[_name.substr(5, _name.length)].blockType.ty != block)) || (block == undefined)) {
removeMovieClip(this);
}
};
Symbol 350 MovieClip [light2] Frame 1
block = _root.world[_name.substr(5, _name.length)].blockType.ty;
onEnterFrame = function () {
if (fire == true) {
if (_root.onFire[_name.substr(5, _name.length)] != true) {
removeMovieClip(this);
}
}
if (((((((!random(200)) || ((_y + _parent._y) > 550)) || ((_y + _parent._y) < -150)) || ((_x + _parent._x) > 650)) || ((_x + _parent._x) < -150)) || (_root.world[_name.substr(5, _name.length)].blockType.ty != block)) || (block == undefined)) {
removeMovieClip(this);
}
};
Symbol 352 MovieClip [light3] Frame 1
block = _root.world[_name.substr(5, _name.length)].blockType.ty;
onEnterFrame = function () {
if (((((((!random(200)) || ((_y + _parent._y) > 550)) || ((_y + _parent._y) < -150)) || ((_x + _parent._x) > 650)) || ((_x + _parent._x) < -150)) || (_root.world[_name.substr(5, _name.length)].blockType.ty != block)) || (block == undefined)) {
removeMovieClip(this);
}
};
Symbol 355 MovieClip [light4] Frame 1
block = _root.world[_name.substr(5, _name.length)].blockType.ty;
onEnterFrame = function () {
if (((((((!random(200)) || ((_y + _parent._y) > 550)) || ((_y + _parent._y) < -150)) || ((_x + _parent._x) > 650)) || ((_x + _parent._x) < -150)) || (_root.world[_name.substr(5, _name.length)].blockType.ty != block)) || (block == undefined)) {
removeMovieClip(this);
}
};
Symbol 359 MovieClip Frame 1
onEnterFrame = function () {
if (_root.onFire[_parent._parent._name] == true) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
};
Symbol 367 MovieClip Frame 1
onEnterFrame = function () {
if (_root.pawsed == true) {
stop();
} else {
play();
}
};
Symbol 374 MovieClip Frame 1
onEnterFrame = function () {
if (_root.pawsed == true) {
stop();
} else {
play();
}
};
Symbol 376 MovieClip [chicken] Frame 1
function ouch(size) {
_root.requestSound("chicken" + (random(3) + 1), ((-_root.world._x) - _x) + 275, (_root.world._y + _y) - 200);
hurtAnimation = true;
}
function giveXP() {
_root.pxdnes.toAdd = _root.pxdnes.toAdd + 2;
}
stop();
_name = _root.mobs[mobNumber][1];
sceneNum = _root.mobs[mobNumber][2];
_x = _root.mobs[mobNumber][3];
_y = _root.mobs[mobNumber][4];
xSpeed = _root.mobs[mobNumber][5];
ySpeed = _root.mobs[mobNumber][6];
health = _root.mobs[mobNumber][7];
leftKey = _root.mobs[mobNumber][8];
rightKey = _root.mobs[mobNumber][9];
upKey = _root.mobs[mobNumber][10];
onEnterFrame = function () {
if (((((!_root.pawsed) && ((_x + _parent._x) > -400)) && ((_x + _parent._x) < 1000)) && ((_y + _parent._y) > -400)) && ((_y + _parent._y) < 850)) {
if (_root.so2.data.diff == 3) {
delete _root.onFire[_name];
_root.chickenNum--;
delete _root.mobs[mobNumber];
removeMovieClip(this);
}
if (health <= 0) {
var _local4 = 1;
while (_local4 <= (random(2) + 1)) {
_root.dropNum++;
_root.world.attachMovie("drop", "drop" + _root.dropNum, _root.world.getNextHighestDepth());
_root.world["drop" + _root.dropNum]._x = _x;
_root.world["drop" + _root.dropNum]._y = _y;
if (random(4) == 1) {
if (_root.onFire[_name] == true) {
_root.world["drop" + _root.dropNum].gotoAndStop("cchicken");
} else {
_root.world["drop" + _root.dropNum].gotoAndStop("chicken");
}
} else {
_root.world["drop" + _root.dropNum].gotoAndStop("feather");
}
_local4++;
}
delete _root.onFire[_name];
_root.chickenNum--;
delete _root.mobs[mobNumber];
removeMovieClip(this);
}
if (random(300) == 1) {
_root.requestSound("chicken" + (random(3) + 1), ((-_root.world._x) - _x) + 275, (_root.world._y + _y) - 200);
}
if (random(9000) == 1) {
_root.requestSound("layEgg", ((-_root.world._x) - _x) + 275, (_root.world._y + _y) - 200);
_root.dropNum++;
_root.world.attachMovie("drop", "drop" + _root.dropNum, _root.world.getNextHighestDepth());
_root.world["drop" + _root.dropNum]._x = _x;
_root.world["drop" + _root.dropNum]._y = _y;
_root.world["drop" + _root.dropNum].gotoAndStop("egg");
}
blockX = Math.round((_x - 15) / 30);
blockY = Math.round((-(_y + 15)) / 30);
_root.mobs[mobNumber] = ["chicken", _name, sceneNum, _x, _y, xSpeed, ySpeed, health, leftKey, rightKey, upKey];
if (wait == undefined) {
wait = 10;
}
wait--;
if ((_root.onFire[_name] == true) && (wait <= 0)) {
ouch(1);
wait = 20;
health--;
}
if ((((_root.scene[blockX][blockY + 1] == "la") || (_root.scene[blockX][blockY + 1] == "ad")) || (_root.scene[blockX + 1][blockY + 1] == "la")) || (_root.scene[blockX + 1][blockY + 1] == "ad")) {
health--;
ouch(random(2) + 1);
}
swapDepths(_parent.getNextHighestDepth());
if (random(10) == 1) {
if (random(7) == 1) {
leftKey = true;
rightKey = false;
} else if (random(7) == 1) {
rightKey = true;
leftKey = false;
} else if (random(7) == 1) {
rightKey = false;
leftKey = false;
}
if (random(50) == 1) {
upKey = true;
} else {
upKey = false;
}
}
if (((_root.scene[blockX][blockY] == undefined) || (_root.liquids2[_root.scene[blockX][blockY]] != undefined)) || (_root.walkThroughBlockHit[_root.scene[blockX][blockY]] != undefined)) {
falling = true;
} else {
if (wasFalling == true) {
wasFallingSpeed = -ySpeed;
}
ySpeed = 0;
}
if (wasFalling && (!falling)) {
if (wasFallingAndNotFalling <= 0) {
_root.blockSound(blockX, blockY, ((-_root.world._x) - _x) + 275, (_root.world._y + _y) - 200);
}
wasFallingAndNotFalling = 3;
bedded = false;
if (_root.scene[blockX][blockY].substr(0, 3) == "bed") {
bedded = true;
}
_y = ((Math.round(_y / 30) * 30) + 5);
} else {
wasFallingAndNotFalling--;
}
if (_root.water[(("blockX" + blockX) + "Y") + (blockY + 1)] != undefined) {
if (_root.water[(("blockX" + blockX) + "Y") + (blockY + 1)][0] > _root.water[(("blockX" + blockX) + "Y") + (blockY + 1)][1]) {
xSpeed = xSpeed - 1;
} else if (_root.water[(("blockX" + blockX) + "Y") + (blockY + 1)][0] < _root.water[(("blockX" + blockX) + "Y") + (blockY + 1)][1]) {
xSpeed = xSpeed + 1;
} else if ((_root.water[(("blockX" + blockX) + "Y") + (blockY + 1)][0] == _root.water[(("blockX" + blockX) + "Y") + (blockY + 1)][1]) == 9) {
ySpeed = ySpeed + 6;
}
}
if (_root.water[(("blockX" + blockX) + "Y") + (blockY + 2)] != undefined) {
if (_root.water[(("blockX" + blockX) + "Y") + (blockY + 2)][0] > _root.water[(("blockX" + blockX) + "Y") + (blockY + 2)][1]) {
xSpeed = xSpeed - 1;
} else if (_root.water[(("blockX" + blockX) + "Y") + (blockY + 2)][0] < _root.water[(("blockX" + blockX) + "Y") + (blockY + 2)][1]) {
xSpeed = xSpeed + 1;
} else if ((_root.water[(("blockX" + blockX) + "Y") + (blockY + 2)][0] == _root.water[(("blockX" + blockX) + "Y") + (blockY + 2)][1]) == 9) {
ySpeed = ySpeed + 6;
}
}
if (((_root.scene[blockX][blockY + 1] != undefined) && (_root.walkThroughBlockHit[_root.scene[blockX][blockY + 1]] == undefined)) && (_root.liquids2[_root.scene[blockX][blockY + 1]] == undefined)) {
if (_root.scene[blockX - 1][blockY + 1] == undefined) {
xSpeed = xSpeed - 1;
} else if (_root.scene[blockX + 1][blockY + 1] == undefined) {
xSpeed = xSpeed + 1;
} else {
falling = true;
}
}
if (((_root.scene[Math.round((_x + 30) / 30)][blockY + 1] != undefined) && (_root.walkThroughBlockHit[_root.scene[Math.round((_x + 30) / 30)][blockY + 1]] == undefined)) && (_root.liquids2[_root.scene[Math.round((_x + 30) / 30)][blockY + 1]] == undefined)) {
rightable = false;
if (random(10) == 1) {
upKey = false;
}
if (random(10) == 1) {
upKey = true;
}
if (xSpeed < 0) {
xSpeed = 0;
}
}
if (((_root.scene[Math.round((_x - 30) / 30) - 1][blockY + 1] != undefined) && (_root.walkThroughBlockHit[_root.scene[Math.round((_x - 30) / 30) - 1][blockY + 1]] == undefined)) && (_root.liquids2[_root.scene[Math.round((_x - 30) / 30) - 1][blockY + 1]] == undefined)) {
leftable = false;
if (random(10) == 1) {
upKey = false;
}
if (random(10) == 1) {
upKey = true;
}
if (xSpeed > 0) {
xSpeed = 0;
}
}
if (((_root.scene[blockX][blockY + 1] != undefined) && (_root.walkThroughBlockHit[_root.scene[blockX][blockY + 1]] == undefined)) && (_root.liquids2[_root.scene[blockX][Math.round((_y - 5) / 30) + 1]] == undefined)) {
if (ySpeed > 0) {
ySpeed = -Math.abs(ySpeed / 2);
}
}
_y = (_y - ySpeed);
_x = (_x - xSpeed);
distanceX = distanceX + Math.abs(xSpeed);
if (distanceX > _root.blockSize) {
distanceX = 0;
_root.blockSound(blockX, blockY, ((-_root.world._x) - _x) + 275, (_root.world._y + _y) - 200);
}
deepness = 0;
if (_root.scene[blockX][blockY + 2] == "wr") {
startUnderwaterTimer = 5;
airTimer--;
if (airTimer <= 0) {
airTimer = 10;
if (air <= 0) {
ouch(1);
health = health - 1;
} else {
air--;
}
}
upKey = true;
if ((_root.so2.data.qual != 1) && (!random(10))) {
p = _root.world.attachMovie("wPart", "wPart" + random(10000000), _root.world.getNextHighestDepth());
p._x = (blockX * _root.blockSize) + (_root.blockSize / 2);
p._y = ((-blockY) * _root.blockSize) - (_root.blockSize * 2);
}
if ((_root.so2.data.qual != 1) && (inWater == false)) {
delete _root.onFire[_name];
var _local4 = 1;
while (_local4 <= 10) {
p = _root.world.attachMovie("wPart", "wPart" + random(10000000), _root.world.getNextHighestDepth());
p._x = (blockX * _root.blockSize) + (_root.blockSize / 2);
p._y = ((-blockY) * _root.blockSize) - (_root.blockSize * 3.5);
_local4++;
}
}
inWater = true;
var _local4 = 1;
while (_root.scene[blockX][blockY + _local4] == "wr") {
deepness++;
_local4++;
}
} else {
air = 11;
airTimer = 10;
if (startUnderwaterTimer <= 0) {
if (inWater == true) {
if (_root.so2.data.qual != 1) {
var _local4 = 1;
while (_local4 <= 20) {
p = _root.world.attachMovie("wPart", "wPart" + random(10000000), _root.world.getNextHighestDepth());
p._x = (blockX * _root.blockSize) + (_root.blockSize / 2);
p._y = ((-blockY) * _root.blockSize) - (_root.blockSize / 2);
_local4++;
}
}
_root.requestSound("splash", ((-_root.world._x) - _x) + 275, (_root.world._y + _y) - 200);
}
inWater = false;
} else {
startUnderwaterTimer--;
}
}
if (falling) {
if (_root.liquids2[_root.scene[blockX][blockY + 1]] != undefined) {
xSpeed = xSpeed * 0.8;
}
ySpeed = ySpeed - 0.5;
xSpeed = xSpeed * 0.65;
} else if (scene[blockX][blockY] == "ice") {
xSpeed = xSpeed * 0.9;
} else {
xSpeed = xSpeed * 0.7;
}
if (((((_root.scene[blockX][blockY + 1] == "wr") || (_root.scene[blockX][blockY + 1] == "la")) || (_root.scene[blockX][blockY + 1] == "ad")) || (_root.scene[blockX][blockY + 1] == "ladder")) || (_root.scene[blockX][blockY + 1] == "rp")) {
ySpeed = ySpeed * 0.8;
}
keysX = false;
if (rightKey) {
if (rightable) {
char._xscale = -100;
xSpeed = xSpeed - 0.6;
keysX = true;
}
}
if (leftKey) {
if (leftable) {
char._xscale = 100;
xSpeed = xSpeed + 0.6;
keysX = true;
}
}
if (falling == true) {
animate = 3;
} else if (keysX == true) {
animate = 2;
} else {
animate = 1;
}
if (hurtAnimation == true) {
animate = 4;
}
if (char._currentframe != animate) {
char.gotoAndStop(animate);
}
if (upKey) {
if ((_root.scene[blockX][blockY].substr(0, 3) == "bed") && (falling == false)) {
ySpeed = ySpeed + 12;
_y = (_y - (ySpeed / 2));
} else if ((((((((((_root.scene[blockX][blockY] == "ladder") || (_root.scene[blockX][blockY] == "rp")) && (_root.scene[blockX][blockY + 1] != "ladder")) && (_root.scene[blockX][blockY + 1] != "rp")) && (_root.scene[blockX][blockY + 2] != "ladder")) && (_root.scene[blockX][blockY + 2] != "rp")) && (_root.scene[blockX][blockY + 3] != "ladder")) && (_root.scene[blockX][blockY + 3] != "rp")) || (_root.scene[blockX][blockY + 1] == "ladder")) || (_root.scene[blockX][blockY + 1] == "rp")) {
ySpeed = ySpeed + 3;
_y = (_y - 0.5);
} else if (((_root.scene[blockX][blockY + 1] == "wr") || (_root.scene[blockX][blockY + 1] == "la")) || (_root.scene[blockX][blockY + 1] == "ad")) {
ySpeed = ySpeed + 4;
_y = (_y - 10);
} else if (falling == false) {
ySpeed = ySpeed + 7;
_y = (_y - (ySpeed / 2));
}
}
wasFalling = false;
if (falling == true) {
wasFalling = true;
}
falling = false;
rightable = true;
leftable = true;
} else if (random(5000) == 1) {
delete _root.onFire[_name];
_root.chickenNum--;
delete _root.mobs[mobNumber];
removeMovieClip(this);
}
};
Symbol 384 MovieClip Frame 1
onEnterFrame = function () {
if (_root.pawsed == true) {
stop();
} else {
play();
}
};
Symbol 386 MovieClip [cow] Frame 1
function ouch(size) {
_root.requestSound("cowhurt" + (random(1) + 1), ((-_root.world._x) - _x) + 275, (_root.world._y + _y) - 200);
hurtAnimation = true;
}
function giveXP() {
_root.pxdnes.toAdd = _root.pxdnes.toAdd + 3;
}
stop();
_name = _root.mobs[mobNumber][1];
sceneNum = _root.mobs[mobNumber][2];
_x = _root.mobs[mobNumber][3];
_y = _root.mobs[mobNumber][4];
xSpeed = _root.mobs[mobNumber][5];
ySpeed = _root.mobs[mobNumber][6];
health = _root.mobs[mobNumber][7];
leftKey = _root.mobs[mobNumber][8];
rightKey = _root.mobs[mobNumber][9];
upKey = _root.mobs[mobNumber][10];
onEnterFrame = function () {
if (((((!_root.pawsed) && ((_x + _parent._x) > -400)) && ((_x + _parent._x) < 1000)) && ((_y + _parent._y) > -400)) && ((_y + _parent._y) < 850)) {
if (_root.so2.data.diff == 3) {
delete _root.onFire[_name];
_root.cowNum--;
delete _root.mobs[mobNumber];
removeMovieClip(this);
}
if (health <= 0) {
var _local4 = 1;
while (_local4 <= (random(2) + 1)) {
_root.dropNum++;
_root.world.attachMovie("drop", "drop" + _root.dropNum, _root.world.getNextHighestDepth());
_root.world["drop" + _root.dropNum]._x = _x;
_root.world["drop" + _root.dropNum]._y = _y;
_root.world["drop" + _root.dropNum].gotoAndStop("leather");
_local4++;
}
delete _root.onFire[_name];
_root.cowNum--;
delete _root.mobs[mobNumber];
removeMovieClip(this);
}
if (random(500) == 1) {
_root.requestSound("cow" + (random(4) + 1), ((-_root.world._x) - _x) + 275, (_root.world._y + _y) - 200);
}
blockX = Math.round((_x - 15) / 30);
blockY = Math.round((-(_y + 15)) / 30);
_root.mobs[mobNumber] = ["cow", _name, sceneNum, _x, _y, xSpeed, ySpeed, health, leftKey, rightKey, upKey];
if (wait == undefined) {
wait = 10;
}
wait--;
if ((_root.onFire[_name] == true) && (wait <= 0)) {
ouch(1);
wait = 20;
health--;
}
if ((((_root.scene[blockX][blockY + 1] == "la") || (_root.scene[blockX][blockY + 1] == "ad")) || (_root.scene[blockX + 1][blockY + 1] == "la")) || (_root.scene[blockX + 1][blockY + 1] == "ad")) {
health--;
ouch(random(2) + 1);
}
swapDepths(_parent.getNextHighestDepth());
if (random(10) == 1) {
if (random(7) == 1) {
leftKey = true;
rightKey = false;
} else if (random(7) == 1) {
rightKey = true;
leftKey = false;
} else if (random(7) == 1) {
rightKey = false;
leftKey = false;
}
if (random(80) == 1) {
upKey = true;
} else {
upKey = false;
}
}
if (leftKey) {
l = 1;
} else {
l = 0;
}
if (rightKey) {
r = 1;
} else {
r = 0;
}
if ((_root.scene[(blockX - l) + r][blockY] == undefined) || (_root.walkThroughBlockHit[_root.scene[(blockX - l) + r][blockY]] != undefined)) {
if ((_root.scene[(blockX - l) + r][blockY - 1] == undefined) || (_root.walkThroughBlockHit[_root.scene[(blockX - l) + r][blockY - 1]] != undefined)) {
if ((_root.scene[(blockX - l) + r][blockY - 2] == undefined) || (_root.walkThroughBlockHit[_root.scene[(blockX - l) + r][blockY - 2]] != undefined)) {
if (random(4) == 1) {
if (((blockX - l) + r) > blockX) {
rightKey = false;
leftKey = true;
}
if (((blockX - l) + r) < blockX) {
leftKey = false;
rightKey = true;
}
} else {
leftKey = false;
rightKey = false;
}
}
}
}
if ((_root.liquids[_root.scene[blockX][blockY + 1]] != undefined) || (_root.liquids[_root.scene[blockX + 1][blockY + 1]] != undefined)) {
upKey = true;
}
if (((_root.scene[blockX][blockY] == undefined) || (_root.liquids2[_root.scene[blockX][blockY]] != undefined)) || (_root.walkThroughBlockHit[_root.scene[blockX][blockY]] != undefined)) {
falling = true;
} else {
if (wasFalling == true) {
wasFallingSpeed = -ySpeed;
}
ySpeed = 0;
}
if (wasFalling && (!falling)) {
if (wasFallingAndNotFalling <= 0) {
_root.blockSound(blockX, blockY, ((-_root.world._x) - _x) + 275, (_root.world._y + _y) - 200);
}
wasFallingAndNotFalling = 3;
bedded = false;
if (_root.scene[blockX][blockY].substr(0, 3) == "bed") {
bedded = true;
}
if (wasFallingSpeed > (19 + (bedded * 5))) {
wasFallingSpeed = wasFallingSpeed - 3;
reps = 0;
makeLargeOuch = false;
while (wasFallingSpeed >= 0) {
reps++;
if (reps > 5) {
makeLargeOuch = true;
}
health--;
wasFallingSpeed = wasFallingSpeed - Math.max(10 - reps, 1);
}
ouch(1 + makeLargeOuch);
}
_y = ((Math.round(_y / 30) * 30) + 5);
} else {
wasFallingAndNotFalling--;
}
if (((_root.scene[blockX][blockY + 1] != undefined) && (_root.walkThroughBlockHit[_root.scene[blockX][blockY + 1]] == undefined)) && (_root.liquids2[_root.scene[blockX][blockY + 1]] == undefined)) {
if (_root.scene[blockX - 1][blockY + 1] == undefined) {
xSpeed = xSpeed - 1;
} else if (_root.scene[blockX + 1][blockY + 1] == undefined) {
xSpeed = xSpeed + 1;
} else {
falling = true;
}
}
if (((_root.scene[Math.round((_x + 30) / 30)][blockY + 1] != undefined) && (_root.walkThroughBlockHit[_root.scene[Math.round((_x + 30) / 30)][blockY + 1]] == undefined)) && (_root.liquids2[_root.scene[Math.round((_x + 30) / 30)][blockY + 1]] == undefined)) {
rightable = false;
if (random(10) == 1) {
upKey = false;
}
if (random(10) == 1) {
upKey = true;
}
if (xSpeed < 0) {
xSpeed = 0;
}
}
if (((_root.scene[Math.round((_x - 30) / 30) - 1][blockY + 1] != undefined) && (_root.walkThroughBlockHit[_root.scene[Math.round((_x - 30) / 30) - 1][blockY + 1]] == undefined)) && (_root.liquids2[_root.scene[Math.round((_x - 30) / 30) - 1][blockY + 1]] == undefined)) {
leftable = false;
if (random(10) == 1) {
upKey = false;
}
if (random(10) == 1) {
upKey = true;
}
if (xSpeed > 0) {
xSpeed = 0;
}
}
if (((_root.scene[blockX][blockY + 1] != undefined) && (_root.walkThroughBlockHit[_root.scene[blockX][blockY + 1]] == undefined)) && (_root.liquids2[_root.scene[blockX][Math.round((_y - 5) / 30) + 1]] == undefined)) {
if (ySpeed > 0) {
ySpeed = -Math.abs(ySpeed / 2);
}
}
_y = (_y - ySpeed);
_x = (_x - xSpeed);
distanceX = distanceX + Math.abs(xSpeed);
if (distanceX > _root.blockSize) {
distanceX = 0;
_root.blockSound(blockX, blockY, ((-_root.world._x) - _x) + 275, (_root.world._y + _y) - 200);
}
deepness = 0;
if (_root.scene[blockX][blockY + 2] == "wr") {
startUnderwaterTimer = 5;
airTimer--;
if (airTimer <= 0) {
airTimer = 10;
if (air <= 0) {
ouch(1);
health = health - 1;
} else {
air--;
}
}
upKey = true;
if ((_root.so2.data.qual != 1) && (!random(10))) {
p = _root.world.attachMovie("wPart", "wPart" + random(10000000), _root.world.getNextHighestDepth());
p._x = (blockX * _root.blockSize) + (_root.blockSize / 2);
p._y = ((-blockY) * _root.blockSize) - (_root.blockSize * 2);
}
if ((_root.so2.data.qual != 1) && (inWater == false)) {
delete _root.onFire[_name];
var _local4 = 1;
while (_local4 <= 10) {
p = _root.world.attachMovie("wPart", "wPart" + random(10000000), _root.world.getNextHighestDepth());
p._x = (blockX * _root.blockSize) + (_root.blockSize / 2);
p._y = ((-blockY) * _root.blockSize) - (_root.blockSize * 3.5);
_local4++;
}
}
inWater = true;
var _local4 = 1;
while (_root.scene[blockX][blockY + _local4] == "wr") {
deepness++;
_local4++;
}
} else {
air = 11;
airTimer = 10;
if (startUnderwaterTimer <= 0) {
if (inWater == true) {
if (_root.so2.data.qual != 1) {
var _local4 = 1;
while (_local4 <= 20) {
p = _root.world.attachMovie("wPart", "wPart" + random(10000000), _root.world.getNextHighestDepth());
p._x = (blockX * _root.blockSize) + (_root.blockSize / 2);
p._y = ((-blockY) * _root.blockSize) - (_root.blockSize / 2);
_local4++;
}
}
_root.requestSound("splash", ((-_root.world._x) - _x) + 275, (_root.world._y + _y) - 200);
}
inWater = false;
} else {
startUnderwaterTimer--;
}
}
if (falling) {
if (_root.liquids2[_root.scene[blockX][blockY + 1]] != undefined) {
xSpeed = xSpeed * 0.8;
}
ySpeed = ySpeed - 2;
xSpeed = xSpeed * 0.65;
} else if (scene[blockX][blockY] == "ice") {
xSpeed = xSpeed * 0.9;
} else {
xSpeed = xSpeed * 0.7;
}
if (((((_root.scene[blockX][blockY + 1] == "wr") || (_root.scene[blockX][blockY + 1] == "la")) || (_root.scene[blockX][blockY + 1] == "ad")) || (_root.scene[blockX][blockY + 1] == "ladder")) || (_root.scene[blockX][blockY + 1] == "rp")) {
ySpeed = ySpeed * 0.8;
}
keysX = false;
if (rightKey) {
if (rightable) {
char._xscale = -100;
xSpeed = xSpeed - 1;
keysX = true;
}
}
if (leftKey) {
if (leftable) {
char._xscale = 100;
xSpeed = xSpeed + 1;
keysX = true;
}
}
if (keysX == true) {
if (Math.abs(xSpeed) > 2) {
animate = 2;
}
} else {
animate = 1;
}
if (hurtAnimation == true) {
animate = 3;
}
if (char._currentframe != animate) {
char.gotoAndStop(animate);
}
if (upKey) {
if ((_root.scene[blockX][blockY].substr(0, 3) == "bed") && (falling == false)) {
ySpeed = ySpeed + 15;
_y = (_y - (ySpeed / 2));
} else if ((((((((((_root.scene[blockX][blockY] == "ladder") || (_root.scene[blockX][blockY] == "rp")) && (_root.scene[blockX][blockY + 1] != "ladder")) && (_root.scene[blockX][blockY + 1] != "rp")) && (_root.scene[blockX][blockY + 2] != "ladder")) && (_root.scene[blockX][blockY + 2] != "rp")) && (_root.scene[blockX][blockY + 3] != "ladder")) && (_root.scene[blockX][blockY + 3] != "rp")) || (_root.scene[blockX][blockY + 1] == "ladder")) || (_root.scene[blockX][blockY + 1] == "rp")) {
ySpeed = ySpeed + 3;
_y = (_y - 0.5);
} else if (((_root.scene[blockX][blockY + 1] == "wr") || (_root.scene[blockX][blockY + 1] == "la")) || (_root.scene[blockX][blockY + 1] == "ad")) {
ySpeed = ySpeed + 6;
_y = (_y - 10);
} else if (falling == false) {
ySpeed = ySpeed + 10;
_y = (_y - (ySpeed / 2));
}
}
wasFalling = false;
if (falling == true) {
wasFalling = true;
}
falling = false;
rightable = true;
leftable = true;
} else if (random(5000) == 1) {
delete _root.onFire[_name];
_root.cowNum--;
delete _root.mobs[mobNumber];
removeMovieClip(this);
}
};
Symbol 389 MovieClip [creeper] Frame 1
function ouch(size) {
_root.requestSound("creeper" + (random(4) + 1), ((-_root.world._x) - _x) + 275, (_root.world._y + _y) - 200);
hurtAnimation = true;
}
function giveXP() {
_root.pxdnes.toAdd = _root.pxdnes.toAdd + 15;
}
stop();
_name = _root.mobs[mobNumber][1];
sceneNum = _root.mobs[mobNumber][2];
_x = _root.mobs[mobNumber][3];
_y = _root.mobs[mobNumber][4];
xSpeed = _root.mobs[mobNumber][5];
ySpeed = _root.mobs[mobNumber][6];
health = _root.mobs[mobNumber][7];
leftKey = _root.mobs[mobNumber][8];
rightKey = _root.mobs[mobNumber][9];
upKey = _root.mobs[mobNumber][10];
countDown = _root.mobs[mobNumber][11];
onEnterFrame = function () {
if (_root.so2.data.diff != 2) {
delete _root.onFire[_name];
_root.creeperNum--;
delete _root.mobs[mobNumber];
removeMovieClip(this);
}
if (((((!_root.pawsed) && ((_x + _parent._x) > -400)) && ((_x + _parent._x) < 1000)) && ((_y + _parent._y) > -400)) && ((_y + _parent._y) < 850)) {
if (health <= 0) {
var _local4 = 1;
while (_local4 <= (random(2) + 1)) {
_root.dropNum++;
_root.world.attachMovie("drop", "drop" + _root.dropNum, _root.world.getNextHighestDepth());
_root.world["drop" + _root.dropNum]._x = _x;
_root.world["drop" + _root.dropNum]._y = _y;
_root.world["drop" + _root.dropNum].gotoAndStop("gp");
_local4++;
}
_root.requestSound("creeperdeath", ((-_root.world._x) - _x) + 275, (_root.world._y + _y) - 200);
delete _root.onFire[_name];
_root.creeperNum--;
delete _root.mobs[mobNumber];
removeMovieClip(this);
}
blockX = Math.round((_x - 15) / 30);
blockY = Math.round((-(_y + 15)) / 30);
_root.mobs[mobNumber] = ["creeper", _name, sceneNum, _x, _y, xSpeed, ySpeed, health, leftKey, rightKey, upKey, countDown];
if (wait == undefined) {
wait = 10;
}
wait--;
if (wait <= 0) {
wait = 20;
if (_root.onFire[_name] == true) {
ouch(1);
health--;
}
if ((((_root.scene[blockX][blockY + 1] == "la") || (_root.scene[blockX][blockY + 1] == "ad")) || (_root.scene[blockX][blockY + 2] == "la")) || (_root.scene[blockX][blockY + 2] == "ad")) {
health--;
ouch(random(2) + 1);
}
}
swapDepths(_parent.getNextHighestDepth());
if (random(10) == 1) {
if (random(7) == 1) {
leftKey = true;
rightKey = false;
} else if (random(7) == 1) {
rightKey = true;
leftKey = false;
} else if (random(7) == 1) {
rightKey = false;
leftKey = false;
}
if (random(30) == 1) {
upKey = true;
} else {
upKey = false;
}
}
if (((blockX - _root.blockX) < 6) && ((blockX - _root.blockX) > 0)) {
leftKey = true;
rightKey = false;
}
if (((blockX - _root.blockX) > -6) && ((blockX - _root.blockX) < 0)) {
rightKey = true;
leftKey = false;
}
if (leftKey) {
l = 1;
} else {
l = 0;
}
if (rightKey) {
r = 1;
} else {
r = 0;
}
if ((_root.scene[(blockX - l) + r][blockY] == undefined) || (_root.walkThroughBlockHit[_root.scene[(blockX - l) + r][blockY]] != undefined)) {
if ((_root.scene[(blockX - l) + r][blockY - 1] == undefined) || (_root.walkThroughBlockHit[_root.scene[(blockX - l) + r][blockY - 1]] != undefined)) {
if ((_root.scene[(blockX - l) + r][blockY - 2] == undefined) || (_root.walkThroughBlockHit[_root.scene[(blockX - l) + r][blockY - 2]] != undefined)) {
if (random(4) == 1) {
if (((blockX - l) + r) > blockX) {
rightKey = false;
leftKey = true;
}
if (((blockX - l) + r) < blockX) {
leftKey = false;
rightKey = true;
}
} else {
leftKey = false;
rightKey = false;
}
}
}
}
if ((_root.liquids[_root.scene[blockX][blockY + 1]] != undefined) || (_root.liquids[_root.scene[blockX][blockY + 2]] != undefined)) {
upKey = true;
}
if (((_root.scene[blockX][blockY] == undefined) || (_root.liquids2[_root.scene[blockX][blockY]] != undefined)) || (_root.walkThroughBlockHit[_root.scene[blockX][blockY]] != undefined)) {
falling = true;
} else {
if (wasFalling == true) {
wasFallingSpeed = -ySpeed;
}
ySpeed = 0;
}
if (wasFalling && (!falling)) {
if (wasFallingAndNotFalling <= 0) {
_root.blockSound(blockX, blockY, ((-_root.world._x) - _x) + 275, (_root.world._y + _y) - 200);
}
wasFallingAndNotFalling = 3;
bedded = false;
if (_root.scene[blockX][blockY].substr(0, 3) == "bed") {
bedded = true;
}
if (wasFallingSpeed > (19 + (bedded * 5))) {
wasFallingSpeed = wasFallingSpeed - 3;
reps = 0;
makeLargeOuch = false;
while (wasFallingSpeed >= 0) {
reps++;
if (reps > 5) {
makeLargeOuch = true;
}
health--;
wasFallingSpeed = wasFallingSpeed - Math.max(10 - reps, 1);
}
ouch(1 + makeLargeOuch);
}
_y = ((Math.round(_y / 30) * 30) + 5);
} else {
wasFallingAndNotFalling--;
}
if (_root.water[(("blockX" + blockX) + "Y") + (blockY + 1)] != undefined) {
if (_root.water[(("blockX" + blockX) + "Y") + (blockY + 1)][0] > _root.water[(("blockX" + blockX) + "Y") + (blockY + 1)][1]) {
xSpeed = xSpeed - 1;
} else if (_root.water[(("blockX" + blockX) + "Y") + (blockY + 1)][0] < _root.water[(("blockX" + blockX) + "Y") + (blockY + 1)][1]) {
xSpeed = xSpeed + 1;
} else if ((_root.water[(("blockX" + blockX) + "Y") + (blockY + 1)][0] == _root.water[(("blockX" + blockX) + "Y") + (blockY + 1)][1]) == 9) {
ySpeed = ySpeed + 6;
}
}
if (_root.water[(("blockX" + blockX) + "Y") + (blockY + 2)] != undefined) {
if (_root.water[(("blockX" + blockX) + "Y") + (blockY + 2)][0] > _root.water[(("blockX" + blockX) + "Y") + (blockY + 2)][1]) {
xSpeed = xSpeed - 1;
} else if (_root.water[(("blockX" + blockX) + "Y") + (blockY + 2)][0] < _root.water[(("blockX" + blockX) + "Y") + (blockY + 2)][1]) {
xSpeed = xSpeed + 1;
} else if ((_root.water[(("blockX" + blockX) + "Y") + (blockY + 2)][0] == _root.water[(("blockX" + blockX) + "Y") + (blockY + 2)][1]) == 9) {
ySpeed = ySpeed + 6;
}
}
if (((_root.scene[blockX][blockY + 1] != undefined) && (_root.walkThroughBlockHit[_root.scene[blockX][blockY + 1]] == undefined)) && (_root.liquids2[_root.scene[blockX][blockY + 1]] == undefined)) {
if (_root.scene[blockX - 1][blockY + 1] == undefined) {
xSpeed = xSpeed - 1;
} else if (_root.scene[blockX + 1][blockY + 1] == undefined) {
xSpeed = xSpeed + 1;
} else {
falling = true;
}
}
if ((((_root.scene[Math.round((_x + 7) / 30)][blockY + 1] != undefined) && (_root.walkThroughBlockHit[_root.scene[Math.round((_x + 7) / 30)][blockY + 1]] == undefined)) && (_root.liquids2[_root.scene[Math.round((_x + 7) / 30)][blockY + 1]] == undefined)) || (((_root.scene[Math.round((_x + 7) / 30)][blockY + 2] != undefined) && (_root.walkThroughBlockHit[_root.scene[Math.round((_x + 7) / 30)][blockY + 2]] == undefined)) && (_root.liquids2[_root.scene[Math.round((_x + 7) / 30)][blockY + 2]] == undefined))) {
rightable = false;
if (random(10) == 1) {
upKey = false;
}
if (random(10) == 1) {
upKey = true;
}
if (xSpeed < 0) {
xSpeed = 0;
}
}
if ((((_root.scene[Math.round((_x - 7) / 30) - 1][blockY + 1] != undefined) && (_root.walkThroughBlockHit[_root.scene[Math.round((_x - 7) / 30) - 1][blockY + 1]] == undefined)) && (_root.liquids2[_root.scene[Math.round((_x - 7) / 30) - 1][blockY + 1]] == undefined)) || (((_root.scene[Math.round((_x - 7) / 30) - 1][blockY + 2] != undefined) && (_root.walkThroughBlockHit[_root.scene[Math.round((_x - 7) / 30) - 1][blockY + 2]] == undefined)) && (_root.liquids2[_root.scene[Math.round((_x - 7) / 30) - 1][blockY + 2]] == undefined))) {
leftable = false;
if (random(10) == 1) {
upKey = false;
}
if (random(10) == 1) {
upKey = true;
}
if (xSpeed > 0) {
xSpeed = 0;
}
}
if (((_root.scene[blockX][Math.round(((blockY * 30) - 5) / 30) + 2] != undefined) && (_root.walkThroughBlockHit[_root.scene[blockX][Math.round(((blockY * 30) - 5) / 30) + 2]] == undefined)) && (_root.liquids2[_root.scene[blockX][Math.round((_y - 5) / 30) + 2]] == undefined)) {
if (ySpeed > 0) {
ySpeed = -Math.abs(ySpeed / 2);
}
}
_y = (_y - ySpeed);
_x = (_x - xSpeed);
distanceX = distanceX + Math.abs(xSpeed);
if (distanceX > _root.blockSize) {
distanceX = 0;
_root.blockSound(blockX, blockY, ((-_root.world._x) - _x) + 275, (_root.world._y + _y) - 200);
}
deepness = 0;
if (_root.scene[blockX][blockY + 2] == "wr") {
startUnderwaterTimer = 5;
airTimer--;
if (airTimer <= 0) {
airTimer = 10;
if (air <= 0) {
ouch(1);
health = health - 1;
} else {
air--;
}
}
upKey = true;
if ((_root.so2.data.qual != 1) && (!random(10))) {
p = _root.world.attachMovie("wPart", "wPart" + random(10000000), _root.world.getNextHighestDepth());
p._x = (blockX * _root.blockSize) + (_root.blockSize / 2);
p._y = ((-blockY) * _root.blockSize) - (_root.blockSize * 2);
}
if ((_root.so2.data.qual != 1) && (inWater == false)) {
delete _root.onFire[_name];
var _local4 = 1;
while (_local4 <= 10) {
p = _root.world.attachMovie("wPart", "wPart" + random(10000000), _root.world.getNextHighestDepth());
p._x = (blockX * _root.blockSize) + (_root.blockSize / 2);
p._y = ((-blockY) * _root.blockSize) - (_root.blockSize * 3.5);
_local4++;
}
}
inWater = true;
var _local4 = 1;
while (_root.scene[blockX][blockY + _local4] == "wr") {
deepness++;
_local4++;
}
} else {
air = 11;
airTimer = 10;
if (startUnderwaterTimer <= 0) {
if (inWater == true) {
if (_root.so2.data.qual != 1) {
var _local4 = 1;
while (_local4 <= 20) {
p = _root.world.attachMovie("wPart", "wPart" + random(10000000), _root.world.getNextHighestDepth());
p._x = (blockX * _root.blockSize) + (_root.blockSize / 2);
p._y = ((-blockY) * _root.blockSize) - (_root.blockSize / 2);
_local4++;
}
}
_root.requestSound("splash", ((-_root.world._x) - _x) + 275, (_root.world._y + _y) - 200);
}
inWater = false;
} else {
startUnderwaterTimer--;
}
}
if (falling) {
if (_root.liquids2[_root.scene[blockX][blockY + 1]] != undefined) {
xSpeed = xSpeed * 0.8;
}
ySpeed = ySpeed - 2;
xSpeed = xSpeed * 0.7;
} else if (scene[blockX][blockY] == "ice") {
xSpeed = xSpeed * 0.9;
} else {
xSpeed = xSpeed * 0.8;
}
if (((((_root.scene[blockX][blockY + 1] == "wr") || (_root.scene[blockX][blockY + 1] == "la")) || (_root.scene[blockX][blockY + 1] == "ad")) || (_root.scene[blockX][blockY + 1] == "ladder")) || (_root.scene[blockX][blockY + 1] == "rp")) {
ySpeed = ySpeed * 0.6;
}
keysX = false;
if (rightKey) {
if (rightable) {
char._xscale = -100;
xSpeed = xSpeed - 1.2;
keysX = true;
}
}
if (leftKey) {
if (leftable) {
char._xscale = 100;
xSpeed = xSpeed + 1.2;
keysX = true;
}
}
if (keysX == true) {
if (Math.abs(xSpeed) > 2) {
animate = 2;
}
} else {
animate = 1;
}
if (hurtAnimation == true) {
animate = 3;
}
if (char._currentframe != animate) {
char.gotoAndStop(animate);
}
if ((Math.abs(_root.blockX - blockX) > 5) || (Math.abs(_root.blockY - blockY) > 5)) {
countDown++;
if (countDown >= 50) {
countDown = undefined;
}
} else if (countDown != undefined) {
countDown--;
if (countDown <= 0) {
_root.requestSound("boom", ((-_root.world._x) - _x) + 275, (_root.world._y + _y) - 200);
severe = false;
if ((Math.abs(Math.round((((-_root.world._x) - _x) + 275) / 30)) < 3) && (Math.abs(Math.round(((_root.world._y + _y) - 200) / 30)) < 3)) {
_root.health = _root.health - 1;
if ((Math.abs(Math.round((((-_root.world._x) - _x) + 275) / 30)) < 2) && (Math.abs(Math.round(((_root.world._y + _y) - 200) / 30)) < 2)) {
_root.health = _root.health - 3;
if ((Math.abs(Math.round((((-_root.world._x) - _x) + 275) / 30)) < 1) && (Math.abs(Math.round(((_root.world._y + _y) - 200) / 30)) < 1)) {
_root.health = _root.health - 4;
severe = true;
}
}
_root.ouch(1 + severe);
}
for (var _local4 in _root.mobs) {
severe = false;
if ((Math.abs(Math.round((_root.world[_root.mobs[_local4][1]]._x - _x) / 30)) < 3) && (Math.abs(Math.round((_root.world[_root.mobs[_local4][1]]._y - _y) / 30)) < 3)) {
_root.world[_root.mobs[_local4][1]].health = _root.world[_root.mobs[_local4][1]].health - 1;
if ((Math.abs(Math.round((_root.world[_root.mobs[_local4][1]]._x - _x) / 30)) < 2) && (Math.abs(Math.round((_root.world[_root.mobs[_local4][1]]._y - _y) / 30)) < 2)) {
_root.world[_root.mobs[_local4][1]].health = _root.world[_root.mobs[_local4][1]].health - 3;
if ((Math.abs(Math.round((_root.world[_root.mobs[_local4][1]]._x - _x) / 30)) < 1) && (Math.abs(Math.round((_root.world[_root.mobs[_local4][1]]._y - _y) / 30)) < 1)) {
_root.world[_root.mobs[_local4][1]].health = _root.world[_root.mobs[_local4][1]].health - 4;
severe = true;
}
}
_root.world[_root.mobs[_local4][1]].ouch(1 + severe);
}
}
_root.explode(blockX, blockY, 3);
_root.creeperNum--;
delete _root.mobs[mobNumber];
removeMovieClip(this);
}
}
if (this.hitTest(_root.char)) {
if (countDown == undefined) {
_root.requestSound("fuse", ((-_root.world._x) - _x) + 275, (_root.world._y + _y) - 200);
countDown = 50;
}
}
if (upKey) {
if ((_root.scene[blockX][blockY].substr(0, 3) == "bed") && (falling == false)) {
ySpeed = ySpeed + 17;
_y = (_y - (ySpeed / 2));
} else if ((((((((((_root.scene[blockX][blockY] == "ladder") || (_root.scene[blockX][blockY] == "rp")) && (_root.scene[blockX][blockY + 1] != "ladder")) && (_root.scene[blockX][blockY + 1] != "rp")) && (_root.scene[blockX][blockY + 2] != "ladder")) && (_root.scene[blockX][blockY + 2] != "rp")) && (_root.scene[blockX][blockY + 3] != "ladder")) && (_root.scene[blockX][blockY + 3] != "rp")) || (_root.scene[blockX][blockY + 1] == "ladder")) || (_root.scene[blockX][blockY + 1] == "rp")) {
ySpeed = ySpeed + 3;
_y = (_y - 0.5);
} else if (((_root.scene[blockX][blockY + 1] == "wr") || (_root.scene[blockX][blockY + 1] == "la")) || (_root.scene[blockX][blockY + 1] == "ad")) {
ySpeed = ySpeed + 6;
_y = (_y - (ySpeed / 2));
} else if (falling == false) {
ySpeed = ySpeed + 13;
_y = (_y - (ySpeed / 2));
}
}
wasFalling = false;
if (falling == true) {
wasFalling = true;
}
falling = false;
rightable = true;
leftable = true;
} else if (random(5000) == 1) {
delete _root.onFire[_name];
_root.creeperNum--;
delete _root.mobs[mobNumber];
removeMovieClip(this);
}
};
Symbol 392 MovieClip Frame 1
stop();
Symbol 393 MovieClip [netherwalker] Frame 1
function ouch(size) {
_root.requestSound("netherwalker" + (random(2) + 1), ((-_root.world._x) - _x) + 275, (_root.world._y + _y) - 200);
hurtAnimation = true;
}
function giveXP() {
_root.pxdnes.toAdd = _root.pxdnes.toAdd + 13;
}
stop();
_name = _root.mobs[mobNumber][1];
sceneNum = _root.mobs[mobNumber][2];
_x = _root.mobs[mobNumber][3];
_y = _root.mobs[mobNumber][4];
xSpeed = _root.mobs[mobNumber][5];
ySpeed = _root.mobs[mobNumber][6];
health = _root.mobs[mobNumber][7];
leftKey = _root.mobs[mobNumber][8];
rightKey = _root.mobs[mobNumber][9];
upKey = _root.mobs[mobNumber][10];
onEnterFrame = function () {
if (((((!_root.pawsed) && ((_x + _parent._x) > -400)) && ((_x + _parent._x) < 1000)) && ((_y + _parent._y) > -400)) && ((_y + _parent._y) < 850)) {
if (_root.so2.data.diff != 2) {
delete _root.onFire[_name];
_root.netherwalkerNum--;
delete _root.mobs[mobNumber];
removeMovieClip(this);
}
if (health <= 0) {
var _local4 = 1;
while (_local4 <= (random(2) + 1)) {
_root.dropNum++;
_root.world.attachMovie("drop", "drop" + _root.dropNum, _root.world.getNextHighestDepth());
_root.world["drop" + _root.dropNum]._x = _x;
_root.world["drop" + _root.dropNum]._y = _y;
if (random(20) == 1) {
_root.world["drop" + _root.dropNum].gotoAndStop("b");
} else if (random(4) == 1) {
_root.world["drop" + _root.dropNum].gotoAndStop("ob");
} else {
_root.world["drop" + _root.dropNum].gotoAndStop("n");
}
_local4++;
}
delete _root.onFire[_name];
_root.netherwalkerNum--;
delete _root.mobs[mobNumber];
removeMovieClip(this);
}
if (((blockX - _root.blockX) < 6) && ((blockX - _root.blockX) > 0)) {
leftKey = true;
rightKey = false;
} else if (((blockX - _root.blockX) > -6) && ((blockX - _root.blockX) < 0)) {
rightKey = true;
leftKey = false;
}
if (((blockY - _root.blockY) > -6) && ((blockY - _root.blockY) < 0)) {
upKey = true;
}
if (((blockY - _root.blockY) < 6) && ((blockY - _root.blockY) > 0)) {
upKey = false;
}
if (random(300) == 1) {
_root.requestSound("netherwalker" + (random(3) + 1), ((-_root.world._x) - _x) + 275, (_root.world._y + _y) - 200);
}
blockX = Math.round((_x - 15) / 30);
blockY = Math.round((-(_y + 15)) / 30);
_root.mobs[mobNumber] = ["netherwalker", _name, sceneNum, _x, _y, xSpeed, ySpeed, health, leftKey, rightKey, upKey];
if (wait == undefined) {
wait = 10;
}
wait--;
if ((_root.onFire[_name] == true) && (wait <= 0)) {
ouch(1);
wait = 20;
health--;
}
if ((((_root.scene[blockX][blockY + 1] == "la") || (_root.scene[blockX][blockY + 1] == "ad")) || (_root.scene[blockX + 1][blockY + 1] == "la")) || (_root.scene[blockX + 1][blockY + 1] == "ad")) {
health--;
ouch(random(2) + 1);
upKey = true;
}
swapDepths(_parent.getNextHighestDepth());
if (random(10) == 1) {
if (random(7) == 1) {
leftKey = true;
rightKey = false;
} else if (random(7) == 1) {
rightKey = true;
leftKey = false;
} else if (random(7) == 1) {
rightKey = false;
leftKey = false;
}
if (random(30) == 1) {
upKey = !upKey;
}
}
if (((_root.scene[Math.round((_x + 30) / 30)][blockY + 1] != undefined) && (_root.walkThroughBlockHit[_root.scene[Math.round((_x + 30) / 30)][blockY + 1]] == undefined)) && (_root.liquids2[_root.scene[Math.round((_x + 30) / 30)][blockY + 1]] == undefined)) {
rightable = false;
if (random(10) == 1) {
upKey = false;
}
if (random(10) == 1) {
upKey = true;
}
if (xSpeed < 0) {
xSpeed = 0;
}
}
if (((_root.scene[Math.round((_x - 30) / 30) - 1][blockY + 1] != undefined) && (_root.walkThroughBlockHit[_root.scene[Math.round((_x - 30) / 30) - 1][blockY + 1]] == undefined)) && (_root.liquids2[_root.scene[Math.round((_x - 30) / 30) - 1][blockY + 1]] == undefined)) {
leftable = false;
if (random(10) == 1) {
upKey = false;
}
if (random(10) == 1) {
upKey = true;
}
if (xSpeed > 0) {
xSpeed = 0;
}
}
if (((_root.scene[blockX][blockY] != undefined) && (_root.liquids2[_root.scene[blockX][blockY]] == undefined)) && (_root.walkThroughBlockHit[_root.scene[blockX][blockY]] == undefined)) {
upKey = true;
ySpeed = 0;
}
if (((_root.scene[blockX][blockY] != undefined) && (_root.walkThroughBlockHit[_root.scene[blockX][blockY]] == undefined)) && (_root.liquids2[_root.scene[blockX][blockY]] == undefined)) {
ySpeed = ySpeed + 0.5;
} else if (((_root.scene[blockX][blockY + 1] == undefined) || (_root.walkThroughBlockHit[_root.scene[blockX][blockY + 1]] != undefined)) || (_root.liquids2[_root.scene[blockX][blockY + 1]] != undefined)) {
ySpeed = ySpeed - 0.25;
}
if (((_root.scene[blockX][blockY + 1] != undefined) && (_root.walkThroughBlockHit[_root.scene[blockX][blockY + 1]] == undefined)) && (_root.liquids2[_root.scene[blockX][Math.round((_y - 5) / 30) + 1]] == undefined)) {
if (ySpeed > 0) {
upKey = false;
ySpeed = -Math.abs(ySpeed / 2);
}
}
_y = (_y - Math.min(Math.max(ySpeed, -10), 10));
_x = (_x - xSpeed);
distanceX = distanceX + Math.abs(xSpeed);
if (distanceX > _root.blockSize) {
distanceX = 0;
_root.blockSound(blockX, blockY, ((-_root.world._x) - _x) + 275, (_root.world._y + _y) - 200);
}
deepness = 0;
if (_root.scene[blockX][blockY + 2] == "wr") {
startUnderwaterTimer = 5;
airTimer--;
if (airTimer <= 0) {
airTimer = 10;
if (air <= 0) {
ouch(1);
health = health - 1;
} else {
air--;
}
}
upKey = true;
if ((_root.so2.data.qual != 1) && (!random(10))) {
p = _root.world.attachMovie("wPart", "wPart" + random(10000000), _root.world.getNextHighestDepth());
p._x = (blockX * _root.blockSize) + (_root.blockSize / 2);
p._y = ((-blockY) * _root.blockSize) - (_root.blockSize * 2);
}
if ((_root.so2.data.qual != 1) && (inWater == false)) {
delete _root.onFire[_name];
var _local4 = 1;
while (_local4 <= 10) {
p = _root.world.attachMovie("wPart", "wPart" + random(10000000), _root.world.getNextHighestDepth());
p._x = (blockX * _root.blockSize) + (_root.blockSize / 2);
p._y = ((-blockY) * _root.blockSize) - (_root.blockSize * 3.5);
_local4++;
}
}
inWater = true;
var _local4 = 1;
while (_root.scene[blockX][blockY + _local4] == "wr") {
deepness++;
_local4++;
}
} else {
air = 11;
airTimer = 10;
if (startUnderwaterTimer <= 0) {
if (inWater == true) {
if (_root.so2.data.qual != 1) {
var _local4 = 1;
while (_local4 <= 20) {
p = _root.world.attachMovie("wPart", "wPart" + random(10000000), _root.world.getNextHighestDepth());
p._x = (blockX * _root.blockSize) + (_root.blockSize / 2);
p._y = ((-blockY) * _root.blockSize) - (_root.blockSize / 2);
_local4++;
}
}
_root.requestSound("splash", ((-_root.world._x) - _x) + 275, (_root.world._y + _y) - 200);
}
inWater = false;
} else {
startUnderwaterTimer--;
}
}
if (((((_root.scene[blockX][blockY + 1] == "wr") || (_root.scene[blockX][blockY + 1] == "la")) || (_root.scene[blockX][blockY + 1] == "ad")) || (_root.scene[blockX][blockY + 1] == "ladder")) || (_root.scene[blockX][blockY + 1] == "rp")) {
ySpeed = ySpeed * 0.8;
}
char._rotation = ((-Math.atan2(_x - (_x + xSpeed), _y - (_y + ySpeed))) * 180) / Math.PI;
keysX = false;
if (rightKey) {
if (rightable) {
xSpeed = xSpeed - 0.1;
keysX = true;
}
}
if (leftKey) {
if (leftable) {
xSpeed = xSpeed + 0.1;
keysX = true;
}
}
if (upKey) {
ySpeed = ySpeed + 1;
_y = (_y - (ySpeed / 2));
}
rightable = true;
leftable = true;
if (hitDelay == undefined) {
hitDelay = 0;
}
hitDelay--;
if (this.hitTest(_root.char.hit) && (hitDelay <= 0)) {
hitDelay = 10;
_root.health--;
_root.ouch(1);
}
} else if (random(5000) == 1) {
delete _root.onFire[_name];
_root.netherwalkerNum--;
delete _root.mobs[mobNumber];
removeMovieClip(this);
}
};
Symbol 401 MovieClip Frame 1
onEnterFrame = function () {
if (_root.pawsed == true) {
stop();
} else {
play();
}
};
Symbol 403 MovieClip [pig] Frame 1
function ouch(size) {
_root.requestSound("pig" + (random(5) + 1), ((-_root.world._x) - _x) + 275, (_root.world._y + _y) - 200);
hurtAnimation = true;
}
function giveXP() {
_root.pxdnes.toAdd = _root.pxdnes.toAdd + 3;
}
stop();
_name = _root.mobs[mobNumber][1];
sceneNum = _root.mobs[mobNumber][2];
_x = _root.mobs[mobNumber][3];
_y = _root.mobs[mobNumber][4];
xSpeed = _root.mobs[mobNumber][5];
ySpeed = _root.mobs[mobNumber][6];
health = _root.mobs[mobNumber][7];
leftKey = _root.mobs[mobNumber][8];
rightKey = _root.mobs[mobNumber][9];
upKey = _root.mobs[mobNumber][10];
onEnterFrame = function () {
if (((((!_root.pawsed) && ((_x + _parent._x) > -400)) && ((_x + _parent._x) < 1000)) && ((_y + _parent._y) > -400)) && ((_y + _parent._y) < 850)) {
if (_root.so2.data.diff == 3) {
delete _root.onFire[_name];
_root.pigNum--;
delete _root.mobs[mobNumber];
removeMovieClip(this);
}
if (health <= 0) {
var _local4 = 1;
while (_local4 <= (random(2) + 1)) {
_root.dropNum++;
_root.world.attachMovie("drop", "drop" + _root.dropNum, _root.world.getNextHighestDepth());
_root.world["drop" + _root.dropNum]._x = _x;
_root.world["drop" + _root.dropNum]._y = _y;
if (_root.onFire[_name] == true) {
_root.world["drop" + _root.dropNum].gotoAndStop("cpork");
} else {
_root.world["drop" + _root.dropNum].gotoAndStop("pork");
}
_local4++;
}
delete _root.onFire[_name];
_root.pigNum--;
delete _root.mobs[mobNumber];
removeMovieClip(this);
}
if (random(300) == 1) {
_root.requestSound("pig" + (random(5) + 1), ((-_root.world._x) - _x) + 275, (_root.world._y + _y) - 200);
}
blockX = Math.round((_x - 15) / 30);
blockY = Math.round((-(_y + 15)) / 30);
_root.mobs[mobNumber] = ["pig", _name, sceneNum, _x, _y, xSpeed, ySpeed, health, leftKey, rightKey, upKey];
if (wait == undefined) {
wait = 10;
}
wait--;
if ((_root.onFire[_name] == true) && (wait <= 0)) {
ouch(1);
wait = 20;
health--;
}
if ((((_root.scene[blockX][blockY + 1] == "la") || (_root.scene[blockX][blockY + 1] == "ad")) || (_root.scene[blockX + 1][blockY + 1] == "la")) || (_root.scene[blockX + 1][blockY + 1] == "ad")) {
health--;
ouch(random(2) + 1);
}
swapDepths(_parent.getNextHighestDepth());
if (random(10) == 1) {
if (random(7) == 1) {
leftKey = true;
rightKey = false;
} else if (random(7) == 1) {
rightKey = true;
leftKey = false;
} else if (random(7) == 1) {
rightKey = false;
leftKey = false;
}
if (random(50) == 1) {
upKey = true;
} else {
upKey = false;
}
}
if (leftKey) {
l = 1;
} else {
l = 0;
}
if (rightKey) {
r = 1;
} else {
r = 0;
}
if ((_root.scene[(blockX - l) + r][blockY] == undefined) || (_root.walkThroughBlockHit[_root.scene[(blockX - l) + r][blockY]] != undefined)) {
if ((_root.scene[(blockX - l) + r][blockY - 1] == undefined) || (_root.walkThroughBlockHit[_root.scene[(blockX - l) + r][blockY - 1]] != undefined)) {
if ((_root.scene[(blockX - l) + r][blockY - 2] == undefined) || (_root.walkThroughBlockHit[_root.scene[(blockX - l) + r][blockY - 2]] != undefined)) {
if (random(4) == 1) {
if (((blockX - l) + r) > blockX) {
rightKey = false;
leftKey = true;
}
if (((blockX - l) + r) < blockX) {
leftKey = false;
rightKey = true;
}
} else {
leftKey = false;
rightKey = false;
}
}
}
}
if ((_root.liquids[_root.scene[blockX][blockY + 1]] != undefined) || (_root.liquids[_root.scene[blockX + 1][blockY + 1]] != undefined)) {
upKey = true;
}
if (((_root.scene[blockX][blockY] == undefined) || (_root.liquids2[_root.scene[blockX][blockY]] != undefined)) || (_root.walkThroughBlockHit[_root.scene[blockX][blockY]] != undefined)) {
falling = true;
} else {
if (wasFalling == true) {
wasFallingSpeed = -ySpeed;
}
ySpeed = 0;
}
if (wasFalling && (!falling)) {
if (wasFallingAndNotFalling <= 0) {
_root.blockSound(blockX, blockY, ((-_root.world._x) - _x) + 275, (_root.world._y + _y) - 200);
}
wasFallingAndNotFalling = 3;
bedded = false;
if (_root.scene[blockX][blockY].substr(0, 3) == "bed") {
bedded = true;
}
if (wasFallingSpeed > (19 + (bedded * 5))) {
wasFallingSpeed = wasFallingSpeed - 3;
reps = 0;
makeLargeOuch = false;
while (wasFallingSpeed >= 0) {
reps++;
if (reps > 5) {
makeLargeOuch = true;
}
health--;
wasFallingSpeed = wasFallingSpeed - Math.max(10 - reps, 1);
}
ouch(1 + makeLargeOuch);
}
_y = ((Math.round(_y / 30) * 30) + 5);
} else {
wasFallingAndNotFalling--;
}
if (_root.water[(("blockX" + blockX) + "Y") + (blockY + 1)] != undefined) {
if (_root.water[(("blockX" + blockX) + "Y") + (blockY + 1)][0] > _root.water[(("blockX" + blockX) + "Y") + (blockY + 1)][1]) {
xSpeed = xSpeed - 1;
} else if (_root.water[(("blockX" + blockX) + "Y") + (blockY + 1)][0] < _root.water[(("blockX" + blockX) + "Y") + (blockY + 1)][1]) {
xSpeed = xSpeed + 1;
} else if ((_root.water[(("blockX" + blockX) + "Y") + (blockY + 1)][0] == _root.water[(("blockX" + blockX) + "Y") + (blockY + 1)][1]) == 9) {
ySpeed = ySpeed + 6;
}
}
if (_root.water[(("blockX" + blockX) + "Y") + (blockY + 2)] != undefined) {
if (_root.water[(("blockX" + blockX) + "Y") + (blockY + 2)][0] > _root.water[(("blockX" + blockX) + "Y") + (blockY + 2)][1]) {
xSpeed = xSpeed - 1;
} else if (_root.water[(("blockX" + blockX) + "Y") + (blockY + 2)][0] < _root.water[(("blockX" + blockX) + "Y") + (blockY + 2)][1]) {
xSpeed = xSpeed + 1;
} else if ((_root.water[(("blockX" + blockX) + "Y") + (blockY + 2)][0] == _root.water[(("blockX" + blockX) + "Y") + (blockY + 2)][1]) == 9) {
ySpeed = ySpeed + 6;
}
}
if (((_root.scene[blockX][blockY + 1] != undefined) && (_root.walkThroughBlockHit[_root.scene[blockX][blockY + 1]] == undefined)) && (_root.liquids2[_root.scene[blockX][blockY + 1]] == undefined)) {
if (_root.scene[blockX - 1][blockY + 1] == undefined) {
xSpeed = xSpeed - 1;
} else if (_root.scene[blockX + 1][blockY + 1] == undefined) {
xSpeed = xSpeed + 1;
} else {
falling = true;
}
}
if (((_root.scene[Math.round((_x + 30) / 30)][blockY + 1] != undefined) && (_root.walkThroughBlockHit[_root.scene[Math.round((_x + 30) / 30)][blockY + 1]] == undefined)) && (_root.liquids2[_root.scene[Math.round((_x + 30) / 30)][blockY + 1]] == undefined)) {
rightable = false;
if (random(10) == 1) {
upKey = false;
}
if (random(10) == 1) {
upKey = true;
}
if (xSpeed < 0) {
xSpeed = 0;
}
}
if (((_root.scene[Math.round((_x - 30) / 30) - 1][blockY + 1] != undefined) && (_root.walkThroughBlockHit[_root.scene[Math.round((_x - 30) / 30) - 1][blockY + 1]] == undefined)) && (_root.liquids2[_root.scene[Math.round((_x - 30) / 30) - 1][blockY + 1]] == undefined)) {
leftable = false;
if (random(10) == 1) {
upKey = false;
}
if (random(10) == 1) {
upKey = true;
}
if (xSpeed > 0) {
xSpeed = 0;
}
}
if (((_root.scene[blockX][blockY + 1] != undefined) && (_root.walkThroughBlockHit[_root.scene[blockX][blockY + 1]] == undefined)) && (_root.liquids2[_root.scene[blockX][Math.round((_y - 5) / 30) + 1]] == undefined)) {
if (ySpeed > 0) {
ySpeed = -Math.abs(ySpeed / 2);
}
}
_y = (_y - ySpeed);
_x = (_x - xSpeed);
distanceX = distanceX + Math.abs(xSpeed);
if (distanceX > _root.blockSize) {
distanceX = 0;
_root.blockSound(blockX, blockY, ((-_root.world._x) - _x) + 275, (_root.world._y + _y) - 200);
}
deepness = 0;
if (_root.scene[blockX][blockY + 2] == "wr") {
startUnderwaterTimer = 5;
airTimer--;
if (airTimer <= 0) {
airTimer = 10;
if (air <= 0) {
ouch(1);
health = health - 1;
} else {
air--;
}
}
upKey = true;
if ((_root.so2.data.qual != 1) && (!random(10))) {
p = _root.world.attachMovie("wPart", "wPart" + random(10000000), _root.world.getNextHighestDepth());
p._x = (blockX * _root.blockSize) + (_root.blockSize / 2);
p._y = ((-blockY) * _root.blockSize) - (_root.blockSize * 2);
}
if ((_root.so2.data.qual != 1) && (inWater == false)) {
delete _root.onFire[_name];
var _local4 = 1;
while (_local4 <= 10) {
p = _root.world.attachMovie("wPart", "wPart" + random(10000000), _root.world.getNextHighestDepth());
p._x = (blockX * _root.blockSize) + (_root.blockSize / 2);
p._y = ((-blockY) * _root.blockSize) - (_root.blockSize * 3.5);
_local4++;
}
}
inWater = true;
var _local4 = 1;
while (_root.scene[blockX][blockY + _local4] == "wr") {
deepness++;
_local4++;
}
} else {
air = 11;
airTimer = 10;
if (startUnderwaterTimer <= 0) {
if (inWater == true) {
if (_root.so2.data.qual != 1) {
var _local4 = 1;
while (_local4 <= 20) {
p = _root.world.attachMovie("wPart", "wPart" + random(10000000), _root.world.getNextHighestDepth());
p._x = (blockX * _root.blockSize) + (_root.blockSize / 2);
p._y = ((-blockY) * _root.blockSize) - (_root.blockSize / 2);
_local4++;
}
}
_root.requestSound("splash", ((-_root.world._x) - _x) + 275, (_root.world._y + _y) - 200);
}
inWater = false;
} else {
startUnderwaterTimer--;
}
}
if (falling) {
if (_root.liquids2[_root.scene[blockX][blockY + 1]] != undefined) {
xSpeed = xSpeed * 0.8;
}
ySpeed = ySpeed - 2;
xSpeed = xSpeed * 0.65;
} else if (scene[blockX][blockY] == "ice") {
xSpeed = xSpeed * 0.9;
} else {
xSpeed = xSpeed * 0.7;
}
if (((((_root.scene[blockX][blockY + 1] == "wr") || (_root.scene[blockX][blockY + 1] == "la")) || (_root.scene[blockX][blockY + 1] == "ad")) || (_root.scene[blockX][blockY + 1] == "ladder")) || (_root.scene[blockX][blockY + 1] == "rp")) {
ySpeed = ySpeed * 0.8;
}
keysX = false;
if (rightKey) {
if (rightable) {
char._xscale = -100;
xSpeed = xSpeed - 1;
keysX = true;
}
}
if (leftKey) {
if (leftable) {
char._xscale = 100;
xSpeed = xSpeed + 1;
keysX = true;
}
}
if (keysX == true) {
if (Math.abs(xSpeed) > 2) {
animate = 2;
}
} else {
animate = 1;
}
if (hurtAnimation == true) {
animate = 3;
}
if (char._currentframe != animate) {
char.gotoAndStop(animate);
}
if (upKey) {
if ((_root.scene[blockX][blockY].substr(0, 3) == "bed") && (falling == false)) {
ySpeed = ySpeed + 15;
_y = (_y - (ySpeed / 2));
} else if ((((((((((_root.scene[blockX][blockY] == "ladder") || (_root.scene[blockX][blockY] == "rp")) && (_root.scene[blockX][blockY + 1] != "ladder")) && (_root.scene[blockX][blockY + 1] != "rp")) && (_root.scene[blockX][blockY + 2] != "ladder")) && (_root.scene[blockX][blockY + 2] != "rp")) && (_root.scene[blockX][blockY + 3] != "ladder")) && (_root.scene[blockX][blockY + 3] != "rp")) || (_root.scene[blockX][blockY + 1] == "ladder")) || (_root.scene[blockX][blockY + 1] == "rp")) {
ySpeed = ySpeed + 3;
_y = (_y - 0.5);
} else if (((_root.scene[blockX][blockY + 1] == "wr") || (_root.scene[blockX][blockY + 1] == "la")) || (_root.scene[blockX][blockY + 1] == "ad")) {
ySpeed = ySpeed + 6;
_y = (_y - 10);
} else if (falling == false) {
ySpeed = ySpeed + 10;
_y = (_y - (ySpeed / 2));
}
}
wasFalling = false;
if (falling == true) {
wasFalling = true;
}
falling = false;
rightable = true;
leftable = true;
} else if (random(5000) == 1) {
delete _root.onFire[_name];
_root.pigNum--;
delete _root.mobs[mobNumber];
removeMovieClip(this);
}
};
Symbol 412 MovieClip Frame 1
onEnterFrame = function () {
if (_root.pawsed == true) {
stop();
} else {
play();
}
};
Symbol 417 MovieClip Frame 1
onEnterFrame = function () {
if (_root.pawsed == true) {
stop();
} else {
play();
}
};
Symbol 419 MovieClip [sheep] Frame 1
function ouch(size) {
_root.requestSound("sheep" + (random(3) + 1), ((-_root.world._x) - _x) + 275, (_root.world._y + _y) - 200);
hurtAnimation = true;
}
function giveXP() {
_root.pxdnes.toAdd = _root.pxdnes.toAdd + 3;
}
function dropWool() {
var _local2 = 1;
while (_local2 <= (random(2) + 1)) {
_root.dropNum++;
_root.world.attachMovie("drop", "drop" + _root.dropNum, _root.world.getNextHighestDepth());
_root.world["drop" + _root.dropNum]._x = _x;
_root.world["drop" + _root.dropNum]._y = _y;
_root.world["drop" + _root.dropNum].gotoAndStop("cloth" + colour);
_local2++;
}
}
stop();
_name = _root.mobs[mobNumber][1];
sceneNum = _root.mobs[mobNumber][2];
_x = _root.mobs[mobNumber][3];
_y = _root.mobs[mobNumber][4];
xSpeed = _root.mobs[mobNumber][5];
ySpeed = _root.mobs[mobNumber][6];
health = _root.mobs[mobNumber][7];
leftKey = _root.mobs[mobNumber][8];
rightKey = _root.mobs[mobNumber][9];
upKey = _root.mobs[mobNumber][10];
colour = _root.mobs[mobNumber][11];
beenHit = _root.mobs[mobNumber][12];
onEnterFrame = function () {
if (((((!_root.pawsed) && ((_x + _parent._x) > -200)) && ((_x + _parent._x) < 800)) && ((_y + _parent._y) > -200)) && ((_y + _parent._y) < 650)) {
if (_root.so2.data.diff == 3) {
delete _root.onFire[_name];
_root.sheepNum--;
delete _root.mobs[mobNumber];
removeMovieClip(this);
}
if (health <= 0) {
if (_root.mobs[mobNumber][11] == false) {
dropWool();
}
delete _root.onFire[_name];
_root.sheepNum--;
delete _root.mobs[mobNumber];
removeMovieClip(this);
}
if (random(500) == 1) {
_root.requestSound("sheep" + (random(3) + 1), ((-_root.world._x) - _x) + 275, (_root.world._y + _y) - 200);
}
blockX = Math.round((_x - 15) / 30);
blockY = Math.round((-(_y + 15)) / 30);
_root.mobs[mobNumber] = ["sheep", _name, sceneNum, _x, _y, xSpeed, ySpeed, health, leftKey, rightKey, upKey, colour, beenHit];
if (wait == undefined) {
wait = 10;
}
wait--;
if ((_root.onFire[_name] == true) && (wait <= 0)) {
ouch(1);
wait = 20;
health--;
}
if ((((_root.scene[blockX][blockY + 1] == "la") || (_root.scene[blockX][blockY + 1] == "ad")) || (_root.scene[blockX + 1][blockY + 1] == "la")) || (_root.scene[blockX + 1][blockY + 1] == "ad")) {
health--;
ouch(random(2) + 1);
}
swapDepths(_parent.getNextHighestDepth());
if (random(10) == 1) {
if (random(7) == 1) {
leftKey = true;
rightKey = false;
} else if (random(7) == 1) {
rightKey = true;
leftKey = false;
} else if (random(7) == 1) {
rightKey = false;
leftKey = false;
}
if (random(50) == 1) {
upKey = true;
} else {
upKey = false;
}
}
if (leftKey) {
l = 1;
} else {
l = 0;
}
if (rightKey) {
r = 1;
} else {
r = 0;
}
if ((_root.scene[(blockX - l) + r][blockY] == undefined) || (_root.walkThroughBlockHit[_root.scene[(blockX - l) + r][blockY]] != undefined)) {
if ((_root.scene[(blockX - l) + r][blockY - 1] == undefined) || (_root.walkThroughBlockHit[_root.scene[(blockX - l) + r][blockY - 1]] != undefined)) {
if ((_root.scene[(blockX - l) + r][blockY - 2] == undefined) || (_root.walkThroughBlockHit[_root.scene[(blockX - l) + r][blockY - 2]] != undefined)) {
if (random(4) == 1) {
if (((blockX - l) + r) > blockX) {
rightKey = false;
leftKey = true;
}
if (((blockX - l) + r) < blockX) {
leftKey = false;
rightKey = true;
}
} else {
leftKey = false;
rightKey = false;
}
}
}
}
if ((_root.liquids[_root.scene[blockX][blockY + 1]] != undefined) || (_root.liquids[_root.scene[blockX + 1][blockY + 1]] != undefined)) {
upKey = true;
}
if (((_root.scene[blockX][blockY] == undefined) || (_root.liquids2[_root.scene[blockX][blockY]] != undefined)) || (_root.walkThroughBlockHit[_root.scene[blockX][blockY]] != undefined)) {
falling = true;
} else {
if (wasFalling == true) {
wasFallingSpeed = -ySpeed;
}
ySpeed = 0;
}
if (wasFalling && (!falling)) {
if (wasFallingAndNotFalling <= 0) {
_root.blockSound(blockX, blockY, ((-_root.world._x) - _x) + 275, (_root.world._y + _y) - 200);
}
wasFallingAndNotFalling = 3;
bedded = false;
if (_root.scene[blockX][blockY].substr(0, 3) == "bed") {
bedded = true;
}
if (wasFallingSpeed > (19 + (bedded * 5))) {
wasFallingSpeed = wasFallingSpeed - 3;
reps = 0;
makeLargeOuch = false;
while (wasFallingSpeed >= 0) {
reps++;
if (reps > 5) {
makeLargeOuch = true;
}
health--;
wasFallingSpeed = wasFallingSpeed - Math.max(10 - reps, 1);
}
ouch(1 + makeLargeOuch);
}
_y = ((Math.round(_y / 30) * 30) + 5);
} else {
wasFallingAndNotFalling--;
}
if (_root.water[(("blockX" + blockX) + "Y") + (blockY + 1)] != undefined) {
if (_root.water[(("blockX" + blockX) + "Y") + (blockY + 1)][0] > _root.water[(("blockX" + blockX) + "Y") + (blockY + 1)][1]) {
xSpeed = xSpeed - 1;
} else if (_root.water[(("blockX" + blockX) + "Y") + (blockY + 1)][0] < _root.water[(("blockX" + blockX) + "Y") + (blockY + 1)][1]) {
xSpeed = xSpeed + 1;
} else if ((_root.water[(("blockX" + blockX) + "Y") + (blockY + 1)][0] == _root.water[(("blockX" + blockX) + "Y") + (blockY + 1)][1]) == 9) {
ySpeed = ySpeed + 6;
}
}
if (_root.water[(("blockX" + blockX) + "Y") + (blockY + 2)] != undefined) {
if (_root.water[(("blockX" + blockX) + "Y") + (blockY + 2)][0] > _root.water[(("blockX" + blockX) + "Y") + (blockY + 2)][1]) {
xSpeed = xSpeed - 1;
} else if (_root.water[(("blockX" + blockX) + "Y") + (blockY + 2)][0] < _root.water[(("blockX" + blockX) + "Y") + (blockY + 2)][1]) {
xSpeed = xSpeed + 1;
} else if ((_root.water[(("blockX" + blockX) + "Y") + (blockY + 2)][0] == _root.water[(("blockX" + blockX) + "Y") + (blockY + 2)][1]) == 9) {
ySpeed = ySpeed + 6;
}
}
if (((_root.scene[blockX][blockY + 1] != undefined) && (_root.walkThroughBlockHit[_root.scene[blockX][blockY + 1]] == undefined)) && (_root.liquids2[_root.scene[blockX][blockY + 1]] == undefined)) {
if (_root.scene[blockX - 1][blockY + 1] == undefined) {
xSpeed = xSpeed - 1;
} else if (_root.scene[blockX + 1][blockY + 1] == undefined) {
xSpeed = xSpeed + 1;
} else {
falling = true;
}
}
if (((_root.scene[Math.round((_x + 30) / 30)][blockY + 1] != undefined) && (_root.walkThroughBlockHit[_root.scene[Math.round((_x + 30) / 30)][blockY + 1]] == undefined)) && (_root.liquids2[_root.scene[Math.round((_x + 30) / 30)][blockY + 1]] == undefined)) {
rightable = false;
if (random(10) == 1) {
upKey = false;
}
if (random(10) == 1) {
upKey = true;
}
if (xSpeed < 0) {
xSpeed = 0;
}
}
if (((_root.scene[Math.round((_x - 30) / 30) - 1][blockY + 1] != undefined) && (_root.walkThroughBlockHit[_root.scene[Math.round((_x - 30) / 30) - 1][blockY + 1]] == undefined)) && (_root.liquids2[_root.scene[Math.round((_x - 30) / 30) - 1][blockY + 1]] == undefined)) {
leftable = false;
if (random(10) == 1) {
upKey = false;
}
if (random(10) == 1) {
upKey = true;
}
if (xSpeed > 0) {
xSpeed = 0;
}
}
if (((_root.scene[blockX][blockY + 1] != undefined) && (_root.walkThroughBlockHit[_root.scene[blockX][blockY + 1]] == undefined)) && (_root.liquids2[_root.scene[blockX][Math.round((_y - 5) / 30) + 1]] == undefined)) {
if (ySpeed > 0) {
ySpeed = -Math.abs(ySpeed / 2);
}
}
_y = (_y - ySpeed);
_x = (_x - xSpeed);
distanceX = distanceX + Math.abs(xSpeed);
if (distanceX > _root.blockSize) {
distanceX = 0;
_root.blockSound(blockX, blockY, ((-_root.world._x) - _x) + 275, (_root.world._y + _y) - 200);
}
deepness = 0;
if (_root.scene[blockX][blockY + 2] == "wr") {
startUnderwaterTimer = 5;
airTimer--;
if (airTimer <= 0) {
airTimer = 10;
if (air <= 0) {
ouch(1);
health = health - 1;
} else {
air--;
}
}
upKey = true;
if ((_root.so2.data.qual != 1) && (!random(10))) {
p = _root.world.attachMovie("wPart", "wPart" + random(10000000), _root.world.getNextHighestDepth());
p._x = (blockX * _root.blockSize) + (_root.blockSize / 2);
p._y = ((-blockY) * _root.blockSize) - (_root.blockSize * 2);
}
if ((_root.so2.data.qual != 1) && (inWater == false)) {
delete _root.onFire[_name];
var _local4 = 1;
while (_local4 <= 10) {
p = _root.world.attachMovie("wPart", "wPart" + random(10000000), _root.world.getNextHighestDepth());
p._x = (blockX * _root.blockSize) + (_root.blockSize / 2);
p._y = ((-blockY) * _root.blockSize) - (_root.blockSize * 3.5);
_local4++;
}
}
inWater = true;
var _local4 = 1;
while (_root.scene[blockX][blockY + _local4] == "wr") {
deepness++;
_local4++;
}
} else {
air = 11;
airTimer = 10;
if (startUnderwaterTimer <= 0) {
if (inWater == true) {
if (_root.so2.data.qual != 1) {
var _local4 = 1;
while (_local4 <= 20) {
p = _root.world.attachMovie("wPart", "wPart" + random(10000000), _root.world.getNextHighestDepth());
p._x = (blockX * _root.blockSize) + (_root.blockSize / 2);
p._y = ((-blockY) * _root.blockSize) - (_root.blockSize / 2);
_local4++;
}
}
_root.requestSound("splash", ((-_root.world._x) - _x) + 275, (_root.world._y + _y) - 200);
}
inWater = false;
} else {
startUnderwaterTimer--;
}
}
if (falling) {
if (_root.liquids2[_root.scene[blockX][blockY + 1]] != undefined) {
xSpeed = xSpeed * 0.8;
}
ySpeed = ySpeed - 2;
xSpeed = xSpeed * 0.65;
} else if (scene[blockX][blockY] == "ice") {
xSpeed = xSpeed * 0.9;
} else {
xSpeed = xSpeed * 0.7;
}
if (((((_root.scene[blockX][blockY + 1] == "wr") || (_root.scene[blockX][blockY + 1] == "la")) || (_root.scene[blockX][blockY + 1] == "ad")) || (_root.scene[blockX][blockY + 1] == "ladder")) || (_root.scene[blockX][blockY + 1] == "rp")) {
ySpeed = ySpeed * 0.8;
}
keysX = false;
if (rightKey) {
if (rightable) {
char._xscale = -100;
xSpeed = xSpeed - 1;
keysX = true;
}
}
if (leftKey) {
if (leftable) {
char._xscale = 100;
xSpeed = xSpeed + 1;
keysX = true;
}
}
if (keysX == true) {
if (Math.abs(xSpeed) > 2) {
animate = 3 + beenHit;
}
} else {
animate = 1 + beenHit;
}
if (hurtAnimation == true) {
animate = 5;
}
if (char._currentframe != animate) {
char.gotoAndStop(animate);
}
if (upKey) {
if ((_root.scene[blockX][blockY].substr(0, 3) == "bed") && (falling == false)) {
ySpeed = ySpeed + 17;
_y = (_y - (ySpeed / 2));
} else if ((((((((((_root.scene[blockX][blockY] == "ladder") || (_root.scene[blockX][blockY] == "rp")) && (_root.scene[blockX][blockY + 1] != "ladder")) && (_root.scene[blockX][blockY + 1] != "rp")) && (_root.scene[blockX][blockY + 2] != "ladder")) && (_root.scene[blockX][blockY + 2] != "rp")) && (_root.scene[blockX][blockY + 3] != "ladder")) && (_root.scene[blockX][blockY + 3] != "rp")) || (_root.scene[blockX][blockY + 1] == "ladder")) || (_root.scene[blockX][blockY + 1] == "rp")) {
ySpeed = ySpeed + 3;
_y = (_y - 0.5);
} else if (((_root.scene[blockX][blockY + 1] == "wr") || (_root.scene[blockX][blockY + 1] == "la")) || (_root.scene[blockX][blockY + 1] == "ad")) {
ySpeed = ySpeed + 6;
_y = (_y - 10);
} else if (falling == false) {
ySpeed = ySpeed + 13;
_y = (_y - (ySpeed / 2));
}
}
wasFalling = false;
if (falling == true) {
wasFalling = true;
}
falling = false;
rightable = true;
leftable = true;
} else if (random(5000) == 1) {
delete _root.onFire[_name];
_root.sheepNum--;
delete _root.mobs[mobNumber];
removeMovieClip(this);
}
};
Symbol 426 MovieClip Frame 1
onEnterFrame = function () {
if (_root.pawsed == true) {
stop();
} else {
play();
}
};
Symbol 428 MovieClip [spider] Frame 1
function ouch(size) {
_root.requestSound("spider" + (random(4) + 1), ((-_root.world._x) - _x) + 275, (_root.world._y + _y) - 200);
hurtAnimation = true;
}
function giveXP() {
_root.pxdnes.toAdd = _root.pxdnes.toAdd + 9;
}
stop();
_name = _root.mobs[mobNumber][1];
sceneNum = _root.mobs[mobNumber][2];
_x = _root.mobs[mobNumber][3];
_y = _root.mobs[mobNumber][4];
xSpeed = _root.mobs[mobNumber][5];
ySpeed = _root.mobs[mobNumber][6];
health = _root.mobs[mobNumber][7];
leftKey = _root.mobs[mobNumber][8];
rightKey = _root.mobs[mobNumber][9];
upKey = _root.mobs[mobNumber][10];
onEnterFrame = function () {
if (_root.so2.data.diff != 2) {
delete _root.onFire[_name];
_root.spiderNum--;
delete _root.mobs[mobNumber];
removeMovieClip(this);
}
if (((((!_root.pawsed) && ((_x + _parent._x) > -400)) && ((_x + _parent._x) < 1000)) && ((_y + _parent._y) > -400)) && ((_y + _parent._y) < 850)) {
if (health <= 0) {
var _local4 = 1;
while (_local4 <= (random(2) + 1)) {
_root.dropNum++;
_root.world.attachMovie("drop", "drop" + _root.dropNum, _root.world.getNextHighestDepth());
_root.world["drop" + _root.dropNum]._x = _x;
_root.world["drop" + _root.dropNum]._y = _y;
_root.world["drop" + _root.dropNum].gotoAndStop("fiber");
_local4++;
}
_root.requestSound("spiderdeath", ((-_root.world._x) - _x) + 275, (_root.world._y + _y) - 200);
delete _root.onFire[_name];
_root.spiderNum--;
delete _root.mobs[mobNumber];
removeMovieClip(this);
}
if (random(200) == 1) {
_root.requestSound("spider" + (random(4) + 1), ((-_root.world._x) - _x) + 275, (_root.world._y + _y) - 200);
}
blockX = Math.round((_x - 15) / 30);
blockY = Math.round((-(_y + 15)) / 30);
_root.mobs[mobNumber] = ["spider", _name, sceneNum, _x, _y, xSpeed, ySpeed, health, leftKey, rightKey, upKey];
if (wait == undefined) {
wait = 10;
}
wait--;
if (wait <= 0) {
wait = 20;
if (_root.onFire[_name] == true) {
ouch(1);
health--;
}
if ((((_root.scene[blockX][blockY + 1] == "la") || (_root.scene[blockX][blockY + 1] == "ad")) || (_root.scene[blockX][blockY + 2] == "la")) || (_root.scene[blockX][blockY + 2] == "ad")) {
health--;
ouch(random(2) + 1);
}
}
swapDepths(_parent.getNextHighestDepth());
if (random(10) == 1) {
if (random(7) == 1) {
leftKey = true;
rightKey = false;
} else if (random(7) == 1) {
rightKey = true;
leftKey = false;
} else if (random(7) == 1) {
rightKey = false;
leftKey = false;
}
if (random(20) == 1) {
upKey = !upKey;
}
}
if (((blockX - _root.blockX) < 6) && ((blockX - _root.blockX) > 0)) {
leftKey = true;
rightKey = false;
} else if (((blockX - _root.blockX) > -6) && ((blockX - _root.blockX) < 0)) {
rightKey = true;
leftKey = false;
} else {
if (leftKey) {
l = 1;
} else {
l = 0;
}
if (rightKey) {
r = 1;
} else {
r = 0;
}
if ((_root.scene[(blockX - l) + r][blockY] == undefined) || (_root.walkThroughBlockHit[_root.scene[(blockX - l) + r][blockY]] != undefined)) {
if ((_root.scene[(blockX - l) + r][blockY - 1] == undefined) || (_root.walkThroughBlockHit[_root.scene[(blockX - l) + r][blockY - 1]] != undefined)) {
if ((_root.scene[(blockX - l) + r][blockY - 2] == undefined) || (_root.walkThroughBlockHit[_root.scene[(blockX - l) + r][blockY - 2]] != undefined)) {
if (random(4) == 1) {
if (((blockX - l) + r) > blockX) {
rightKey = false;
leftKey = true;
}
if (((blockX - l) + r) < blockX) {
leftKey = false;
rightKey = true;
}
} else {
leftKey = false;
rightKey = false;
}
}
}
}
}
if ((_root.liquids[_root.scene[blockX][blockY + 1]] != undefined) || (_root.liquids[_root.scene[blockX][blockY + 2]] != undefined)) {
upKey = true;
}
if (((_root.scene[blockX][blockY] == undefined) || (_root.liquids2[_root.scene[blockX][blockY]] != undefined)) || (_root.walkThroughBlockHit[_root.scene[blockX][blockY]] != undefined)) {
falling = true;
} else {
if (wasFalling == true) {
wasFallingSpeed = -ySpeed;
}
ySpeed = 0;
}
if (wasFalling && (!falling)) {
if (wasFallingAndNotFalling <= 0) {
_root.blockSound(blockX, blockY, ((-_root.world._x) - _x) + 275, (_root.world._y + _y) - 200);
}
wasFallingAndNotFalling = 3;
bedded = false;
if (_root.scene[blockX][blockY].substr(0, 3) == "bed") {
bedded = true;
}
if (wasFallingSpeed > (19 + (bedded * 5))) {
wasFallingSpeed = wasFallingSpeed - 3;
reps = 0;
makeLargeOuch = false;
while (wasFallingSpeed >= 0) {
reps++;
if (reps > 5) {
makeLargeOuch = true;
}
health--;
wasFallingSpeed = wasFallingSpeed - Math.max(10 - reps, 1);
}
ouch(1 + makeLargeOuch);
}
_y = ((Math.round(_y / 30) * 30) + 5);
} else {
wasFallingAndNotFalling--;
}
if (_root.water[(("blockX" + blockX) + "Y") + (blockY + 1)] != undefined) {
if (_root.water[(("blockX" + blockX) + "Y") + (blockY + 1)][0] > _root.water[(("blockX" + blockX) + "Y") + (blockY + 1)][1]) {
xSpeed = xSpeed - 1;
} else if (_root.water[(("blockX" + blockX) + "Y") + (blockY + 1)][0] < _root.water[(("blockX" + blockX) + "Y") + (blockY + 1)][1]) {
xSpeed = xSpeed + 1;
} else if ((_root.water[(("blockX" + blockX) + "Y") + (blockY + 1)][0] == _root.water[(("blockX" + blockX) + "Y") + (blockY + 1)][1]) == 9) {
ySpeed = ySpeed + 6;
}
}
if (_root.water[(("blockX" + blockX) + "Y") + (blockY + 2)] != undefined) {
if (_root.water[(("blockX" + blockX) + "Y") + (blockY + 2)][0] > _root.water[(("blockX" + blockX) + "Y") + (blockY + 2)][1]) {
xSpeed = xSpeed - 1;
} else if (_root.water[(("blockX" + blockX) + "Y") + (blockY + 2)][0] < _root.water[(("blockX" + blockX) + "Y") + (blockY + 2)][1]) {
xSpeed = xSpeed + 1;
} else if ((_root.water[(("blockX" + blockX) + "Y") + (blockY + 2)][0] == _root.water[(("blockX" + blockX) + "Y") + (blockY + 2)][1]) == 9) {
ySpeed = ySpeed + 6;
}
}
if (((_root.scene[blockX][blockY + 1] != undefined) && (_root.walkThroughBlockHit[_root.scene[blockX][blockY + 1]] == undefined)) && (_root.liquids2[_root.scene[blockX][blockY + 1]] == undefined)) {
if (_root.scene[blockX - 1][blockY + 1] == undefined) {
xSpeed = xSpeed - 1;
} else if (_root.scene[blockX + 1][blockY + 1] == undefined) {
xSpeed = xSpeed + 1;
} else {
falling = true;
}
}
if (((_root.scene[Math.round((_x + 20) / 30)][blockY + 1] != undefined) && (_root.walkThroughBlockHit[_root.scene[Math.round((_x + 20) / 30)][blockY + 1]] == undefined)) && (_root.liquids2[_root.scene[Math.round((_x + 20) / 30)][blockY + 1]] == undefined)) {
rightable = false;
if (random(10) == 1) {
upKey = false;
}
if (random(10) == 1) {
upKey = true;
}
if (xSpeed < 0) {
xSpeed = 0;
}
}
if (((_root.scene[Math.round((_x - 20) / 30) - 1][blockY + 1] != undefined) && (_root.walkThroughBlockHit[_root.scene[Math.round((_x - 20) / 30) - 1][blockY + 1]] == undefined)) && (_root.liquids2[_root.scene[Math.round((_x - 20) / 30) - 1][blockY + 1]] == undefined)) {
leftable = false;
if (random(10) == 1) {
upKey = false;
}
if (random(10) == 1) {
upKey = true;
}
if (xSpeed > 0) {
xSpeed = 0;
}
}
if (((_root.scene[blockX][blockY + 2] != undefined) && (_root.walkThroughBlockHit[_root.scene[blockX][blockY + 2]] == undefined)) && (_root.liquids2[_root.scene[blockX][Math.round((_y - 5) / 30) + 2]] == undefined)) {
if (ySpeed > 0) {
ySpeed = -Math.abs(ySpeed / 2);
}
}
_y = (_y - ySpeed);
_x = (_x - xSpeed);
if (ySpeed < -15) {
ySpeed = -15;
}
distanceX = distanceX + Math.abs(xSpeed);
if (distanceX > _root.blockSize) {
distanceX = 0;
_root.blockSound(blockX, blockY, ((-_root.world._x) - _x) + 275, (_root.world._y + _y) - 200);
}
deepness = 0;
if (_root.scene[blockX][blockY + 2] == "wr") {
startUnderwaterTimer = 5;
airTimer--;
if (airTimer <= 0) {
airTimer = 10;
if (air <= 0) {
ouch(1);
health = health - 1;
} else {
air--;
}
}
upKey = true;
if ((_root.so2.data.qual != 1) && (!random(10))) {
p = _root.world.attachMovie("wPart", "wPart" + random(10000000), _root.world.getNextHighestDepth());
p._x = (blockX * _root.blockSize) + (_root.blockSize / 2);
p._y = ((-blockY) * _root.blockSize) - (_root.blockSize * 2);
}
if ((_root.so2.data.qual != 1) && (inWater == false)) {
delete _root.onFire[_name];
var _local4 = 1;
while (_local4 <= 10) {
p = _root.world.attachMovie("wPart", "wPart" + random(10000000), _root.world.getNextHighestDepth());
p._x = (blockX * _root.blockSize) + (_root.blockSize / 2);
p._y = ((-blockY) * _root.blockSize) - (_root.blockSize * 3.5);
_local4++;
}
}
inWater = true;
var _local4 = 1;
while (_root.scene[blockX][blockY + _local4] == "wr") {
deepness++;
_local4++;
}
} else {
air = 11;
airTimer = 10;
if (startUnderwaterTimer <= 0) {
if (inWater == true) {
if (_root.so2.data.qual != 1) {
var _local4 = 1;
while (_local4 <= 20) {
p = _root.world.attachMovie("wPart", "wPart" + random(10000000), _root.world.getNextHighestDepth());
p._x = (blockX * _root.blockSize) + (_root.blockSize / 2);
p._y = ((-blockY) * _root.blockSize) - (_root.blockSize / 2);
_local4++;
}
}
_root.requestSound("splash", ((-_root.world._x) - _x) + 275, (_root.world._y + _y) - 200);
}
inWater = false;
} else {
startUnderwaterTimer--;
}
}
if (falling) {
if (_root.liquids2[_root.scene[blockX][blockY + 1]] != undefined) {
xSpeed = xSpeed * 0.8;
}
ySpeed = ySpeed - 2;
xSpeed = xSpeed * 0.7;
} else if (scene[blockX][blockY] == "ice") {
xSpeed = xSpeed * 0.9;
} else {
xSpeed = xSpeed * 0.8;
}
if (((((_root.scene[blockX][blockY + 1] == "wr") || (_root.scene[blockX][blockY + 1] == "la")) || (_root.scene[blockX][blockY + 1] == "ad")) || (_root.scene[blockX][blockY + 1] == "ladder")) || (_root.scene[blockX][blockY + 1] == "rp")) {
ySpeed = ySpeed * 0.6;
}
keysX = false;
if (rightKey) {
if (rightable) {
char._xscale = -100;
xSpeed = xSpeed - 1.2;
keysX = true;
}
}
if (leftKey) {
if (leftable) {
char._xscale = 100;
xSpeed = xSpeed + 1.2;
keysX = true;
}
}
if (keysX == true) {
if (Math.abs(xSpeed) > 2) {
animate = 2;
}
} else {
animate = 1;
}
if (hurtAnimation == true) {
animate = 3;
}
if (char._currentframe != animate) {
char.gotoAndStop(animate);
}
if (hitDelay == undefined) {
hitDelay = 0;
}
hitDelay--;
if (this.hitTest(_root.char.hit) && (hitDelay <= 0)) {
hitDelay = 10;
_root.health--;
_root.ouch(1);
}
if (upKey) {
if (falling == true) {
if ((leftable == false) || (rightable == false)) {
ySpeed = 3;
_y = (_y - (ySpeed / 2));
}
}
if ((_root.scene[blockX][blockY].substr(0, 3) == "bed") && (falling == false)) {
ySpeed = ySpeed + 17;
_y = (_y - (ySpeed / 2));
} else if ((((((((((_root.scene[blockX][blockY] == "ladder") || (_root.scene[blockX][blockY] == "rp")) && (_root.scene[blockX][blockY + 1] != "ladder")) && (_root.scene[blockX][blockY + 1] != "rp")) && (_root.scene[blockX][blockY + 2] != "ladder")) && (_root.scene[blockX][blockY + 2] != "rp")) && (_root.scene[blockX][blockY + 3] != "ladder")) && (_root.scene[blockX][blockY + 3] != "rp")) || (_root.scene[blockX][blockY + 1] == "ladder")) || (_root.scene[blockX][blockY + 1] == "rp")) {
ySpeed = ySpeed + 3;
_y = (_y - 0.5);
} else if (((_root.scene[blockX][blockY + 1] == "wr") || (_root.scene[blockX][blockY + 1] == "la")) || (_root.scene[blockX][blockY + 1] == "ad")) {
ySpeed = ySpeed + 6;
_y = (_y - (ySpeed / 2));
} else if (falling == false) {
ySpeed = ySpeed + 13;
_y = (_y - (ySpeed / 2));
}
}
wasFalling = false;
if (falling == true) {
wasFalling = true;
}
falling = false;
rightable = true;
leftable = true;
} else if (random(5000) == 1) {
delete _root.onFire[_name];
_root.spiderNum--;
delete _root.mobs[mobNumber];
removeMovieClip(this);
}
};
Symbol 438 MovieClip Frame 1
onEnterFrame = function () {
if (_root.pawsed == true) {
stop();
} else {
play();
}
};
Symbol 440 MovieClip [zombie] Frame 1
function ouch(size) {
_root.requestSound("zombiehurt" + (random(2) + 1), ((-_root.world._x) - _x) + 275, (_root.world._y + _y) - 200);
hurtAnimation = true;
}
function giveXP() {
_root.pxdnes.toAdd = _root.pxdnes.toAdd + 12;
}
stop();
_name = _root.mobs[mobNumber][1];
sceneNum = _root.mobs[mobNumber][2];
_x = _root.mobs[mobNumber][3];
_y = _root.mobs[mobNumber][4];
xSpeed = _root.mobs[mobNumber][5];
ySpeed = _root.mobs[mobNumber][6];
health = _root.mobs[mobNumber][7];
leftKey = _root.mobs[mobNumber][8];
rightKey = _root.mobs[mobNumber][9];
upKey = _root.mobs[mobNumber][10];
onEnterFrame = function () {
if (_root.so2.data.diff != 2) {
delete _root.onFire[_name];
_root.zombieNum--;
delete _root.mobs[mobNumber];
removeMovieClip(this);
}
if (((((!_root.pawsed) && ((_x + _parent._x) > -400)) && ((_x + _parent._x) < 1000)) && ((_y + _parent._y) > -400)) && ((_y + _parent._y) < 850)) {
if (health <= 0) {
var _local4 = 1;
while (_local4 <= (random(2) + 1)) {
_root.dropNum++;
_root.world.attachMovie("drop", "drop" + _root.dropNum, _root.world.getNextHighestDepth());
_root.world["drop" + _root.dropNum]._x = _x;
_root.world["drop" + _root.dropNum]._y = _y;
_root.world["drop" + _root.dropNum].gotoAndStop("feather");
_local4++;
}
delete _root.onFire[_name];
_root.zombieNum--;
delete _root.mobs[mobNumber];
removeMovieClip(this);
}
if (random(200) == 1) {
_root.requestSound("zombie" + (random(4) + 1), ((-_root.world._x) - _x) + 275, (_root.world._y + _y) - 200);
}
blockX = Math.round((_x - 15) / 30);
blockY = Math.round((-(_y + 15)) / 30);
_root.mobs[mobNumber] = ["zombie", _name, sceneNum, _x, _y, xSpeed, ySpeed, health, leftKey, rightKey, upKey];
if ((((_root.tim < 48) && (_root.tim > 2)) && (!_root.onFire[_name])) && (!_root.raining)) {
var _local4 = 2;
while (_local4 <= 30) {
if (_root.scene[blockX][blockY + _local4] != undefined) {
_local4 = 31;
}
if (_local4 == 30) {
_root.onFire[_name] = true;
}
_local4++;
}
}
if (wait == undefined) {
wait = 10;
}
wait--;
if (wait <= 0) {
wait = 20;
if (_root.onFire[_name] == true) {
ouch(1);
health--;
}
if ((((_root.scene[blockX][blockY + 1] == "la") || (_root.scene[blockX][blockY + 1] == "ad")) || (_root.scene[blockX][blockY + 2] == "la")) || (_root.scene[blockX][blockY + 2] == "ad")) {
health--;
ouch(random(2) + 1);
}
}
swapDepths(_parent.getNextHighestDepth());
if (random(10) == 1) {
if (random(7) == 1) {
leftKey = true;
rightKey = false;
} else if (random(7) == 1) {
rightKey = true;
leftKey = false;
} else if (random(7) == 1) {
rightKey = false;
leftKey = false;
}
if (random(30) == 1) {
upKey = true;
} else {
upKey = false;
}
}
if (((blockX - _root.blockX) < 6) && ((blockX - _root.blockX) > 0)) {
leftKey = true;
rightKey = false;
} else if (((blockX - _root.blockX) > -6) && ((blockX - _root.blockX) < 0)) {
rightKey = true;
leftKey = false;
} else {
if (leftKey) {
l = 1;
} else {
l = 0;
}
if (rightKey) {
r = 1;
} else {
r = 0;
}
if ((_root.scene[(blockX - l) + r][blockY] == undefined) || (_root.walkThroughBlockHit[_root.scene[(blockX - l) + r][blockY]] != undefined)) {
if ((_root.scene[(blockX - l) + r][blockY - 1] == undefined) || (_root.walkThroughBlockHit[_root.scene[(blockX - l) + r][blockY - 1]] != undefined)) {
if ((_root.scene[(blockX - l) + r][blockY - 2] == undefined) || (_root.walkThroughBlockHit[_root.scene[(blockX - l) + r][blockY - 2]] != undefined)) {
if (random(4) == 1) {
if (((blockX - l) + r) > blockX) {
rightKey = false;
leftKey = true;
}
if (((blockX - l) + r) < blockX) {
leftKey = false;
rightKey = true;
}
} else {
leftKey = false;
rightKey = false;
}
}
}
}
}
if ((_root.liquids[_root.scene[blockX][blockY + 1]] != undefined) || (_root.liquids[_root.scene[blockX][blockY + 2]] != undefined)) {
upKey = true;
}
if (((_root.scene[blockX][blockY] == undefined) || (_root.liquids2[_root.scene[blockX][blockY]] != undefined)) || (_root.walkThroughBlockHit[_root.scene[blockX][blockY]] != undefined)) {
falling = true;
} else {
if (wasFalling == true) {
wasFallingSpeed = -ySpeed;
}
ySpeed = 0;
}
if (wasFalling && (!falling)) {
if (wasFallingAndNotFalling <= 0) {
_root.blockSound(blockX, blockY, ((-_root.world._x) - _x) + 275, (_root.world._y + _y) - 200);
}
wasFallingAndNotFalling = 3;
bedded = false;
if (_root.scene[blockX][blockY].substr(0, 3) == "bed") {
bedded = true;
}
if (wasFallingSpeed > (19 + (bedded * 5))) {
wasFallingSpeed = wasFallingSpeed - 3;
reps = 0;
makeLargeOuch = false;
while (wasFallingSpeed >= 0) {
reps++;
if (reps > 5) {
makeLargeOuch = true;
}
health--;
wasFallingSpeed = wasFallingSpeed - Math.max(10 - reps, 1);
}
ouch(1 + makeLargeOuch);
}
_y = ((Math.round(_y / 30) * 30) + 5);
} else {
wasFallingAndNotFalling--;
}
if (_root.water[(("blockX" + blockX) + "Y") + (blockY + 1)] != undefined) {
if (_root.water[(("blockX" + blockX) + "Y") + (blockY + 1)][0] > _root.water[(("blockX" + blockX) + "Y") + (blockY + 1)][1]) {
xSpeed = xSpeed - 1;
} else if (_root.water[(("blockX" + blockX) + "Y") + (blockY + 1)][0] < _root.water[(("blockX" + blockX) + "Y") + (blockY + 1)][1]) {
xSpeed = xSpeed + 1;
} else if ((_root.water[(("blockX" + blockX) + "Y") + (blockY + 1)][0] == _root.water[(("blockX" + blockX) + "Y") + (blockY + 1)][1]) == 9) {
ySpeed = ySpeed + 6;
}
}
if (_root.water[(("blockX" + blockX) + "Y") + (blockY + 2)] != undefined) {
if (_root.water[(("blockX" + blockX) + "Y") + (blockY + 2)][0] > _root.water[(("blockX" + blockX) + "Y") + (blockY + 2)][1]) {
xSpeed = xSpeed - 1;
} else if (_root.water[(("blockX" + blockX) + "Y") + (blockY + 2)][0] < _root.water[(("blockX" + blockX) + "Y") + (blockY + 2)][1]) {
xSpeed = xSpeed + 1;
} else if ((_root.water[(("blockX" + blockX) + "Y") + (blockY + 2)][0] == _root.water[(("blockX" + blockX) + "Y") + (blockY + 2)][1]) == 9) {
ySpeed = ySpeed + 6;
}
}
if (((_root.scene[blockX][blockY + 1] != undefined) && (_root.walkThroughBlockHit[_root.scene[blockX][blockY + 1]] == undefined)) && (_root.liquids2[_root.scene[blockX][blockY + 1]] == undefined)) {
if (_root.scene[blockX - 1][blockY + 1] == undefined) {
xSpeed = xSpeed - 1;
} else if (_root.scene[blockX + 1][blockY + 1] == undefined) {
xSpeed = xSpeed + 1;
} else {
falling = true;
}
}
if ((((_root.scene[Math.round((_x + 10) / 30)][blockY + 1] != undefined) && (_root.walkThroughBlockHit[_root.scene[Math.round((_x + 10) / 30)][blockY + 1]] == undefined)) && (_root.liquids2[_root.scene[Math.round((_x + 10) / 30)][blockY + 1]] == undefined)) || (((_root.scene[Math.round((_x + 10) / 30)][blockY + 2] != undefined) && (_root.walkThroughBlockHit[_root.scene[Math.round((_x + 10) / 30)][blockY + 2]] == undefined)) && (_root.liquids2[_root.scene[Math.round((_x + 10) / 30)][blockY + 2]] == undefined))) {
rightable = false;
if (random(10) == 1) {
upKey = false;
}
if (random(10) == 1) {
upKey = true;
}
if (xSpeed < 0) {
xSpeed = 0;
}
}
if ((((_root.scene[Math.round((_x - 10) / 30) - 1][blockY + 1] != undefined) && (_root.walkThroughBlockHit[_root.scene[Math.round((_x - 10) / 30) - 1][blockY + 1]] == undefined)) && (_root.liquids2[_root.scene[Math.round((_x - 10) / 30) - 1][blockY + 1]] == undefined)) || (((_root.scene[Math.round((_x - 10) / 30) - 1][blockY + 2] != undefined) && (_root.walkThroughBlockHit[_root.scene[Math.round((_x - 10) / 30) - 1][blockY + 2]] == undefined)) && (_root.liquids2[_root.scene[Math.round((_x - 10) / 30) - 1][blockY + 2]] == undefined))) {
leftable = false;
if (random(10) == 1) {
upKey = false;
}
if (random(10) == 1) {
upKey = true;
}
if (xSpeed > 0) {
xSpeed = 0;
}
}
if (((_root.scene[blockX][blockY + 2] != undefined) && (_root.walkThroughBlockHit[_root.scene[blockX][blockY + 2]] == undefined)) && (_root.liquids2[_root.scene[blockX][Math.round((_y - 5) / 30) + 2]] == undefined)) {
if (ySpeed > 0) {
ySpeed = -Math.abs(ySpeed / 2);
}
}
_y = (_y - ySpeed);
_x = (_x - xSpeed);
distanceX = distanceX + Math.abs(xSpeed);
if (distanceX > _root.blockSize) {
distanceX = 0;
_root.blockSound(blockX, blockY, ((-_root.world._x) - _x) + 275, (_root.world._y + _y) - 200);
}
deepness = 0;
if (_root.scene[blockX][blockY + 2] == "wr") {
startUnderwaterTimer = 5;
airTimer--;
if (airTimer <= 0) {
airTimer = 10;
if (air <= 0) {
ouch(1);
health = health - 1;
} else {
air--;
}
}
upKey = true;
if ((_root.so2.data.qual != 1) && (!random(10))) {
p = _root.world.attachMovie("wPart", "wPart" + random(10000000), _root.world.getNextHighestDepth());
p._x = (blockX * _root.blockSize) + (_root.blockSize / 2);
p._y = ((-blockY) * _root.blockSize) - (_root.blockSize * 2);
}
if ((_root.so2.data.qual != 1) && (inWater == false)) {
delete _root.onFire[_name];
var _local4 = 1;
while (_local4 <= 10) {
p = _root.world.attachMovie("wPart", "wPart" + random(10000000), _root.world.getNextHighestDepth());
p._x = (blockX * _root.blockSize) + (_root.blockSize / 2);
p._y = ((-blockY) * _root.blockSize) - (_root.blockSize * 3.5);
_local4++;
}
}
inWater = true;
var _local4 = 1;
while (_root.scene[blockX][blockY + _local4] == "wr") {
deepness++;
_local4++;
}
} else {
air = 11;
airTimer = 10;
if (startUnderwaterTimer <= 0) {
if (inWater == true) {
if (_root.so2.data.qual != 1) {
var _local4 = 1;
while (_local4 <= 20) {
p = _root.world.attachMovie("wPart", "wPart" + random(10000000), _root.world.getNextHighestDepth());
p._x = (blockX * _root.blockSize) + (_root.blockSize / 2);
p._y = ((-blockY) * _root.blockSize) - (_root.blockSize / 2);
_local4++;
}
}
_root.requestSound("splash", ((-_root.world._x) - _x) + 275, (_root.world._y + _y) - 200);
}
inWater = false;
} else {
startUnderwaterTimer--;
}
}
if (falling) {
if (_root.liquids2[_root.scene[blockX][blockY + 1]] != undefined) {
xSpeed = xSpeed * 0.8;
}
ySpeed = ySpeed - 2;
xSpeed = xSpeed * 0.7;
} else if (scene[blockX][blockY] == "ice") {
xSpeed = xSpeed * 0.9;
} else {
xSpeed = xSpeed * 0.8;
}
if (((((_root.scene[blockX][blockY + 1] == "wr") || (_root.scene[blockX][blockY + 1] == "la")) || (_root.scene[blockX][blockY + 1] == "ad")) || (_root.scene[blockX][blockY + 1] == "ladder")) || (_root.scene[blockX][blockY + 1] == "rp")) {
ySpeed = ySpeed * 0.6;
}
keysX = false;
if (rightKey) {
if (rightable) {
char._xscale = -100;
xSpeed = xSpeed - 1.2;
keysX = true;
}
}
if (leftKey) {
if (leftable) {
char._xscale = 100;
xSpeed = xSpeed + 1.2;
keysX = true;
}
}
if (keysX == true) {
if (Math.abs(xSpeed) > 2) {
animate = 2;
}
} else {
animate = 1;
}
if (hurtAnimation == true) {
animate = 3;
}
if (char._currentframe != animate) {
char.gotoAndStop(animate);
}
if (hitDelay == undefined) {
hitDelay = 0;
}
hitDelay--;
if (this.hitTest(_root.char.hit) && (hitDelay <= 0)) {
hitDelay = 10;
_root.health--;
_root.ouch(1);
}
if (upKey) {
if ((_root.scene[blockX][blockY].substr(0, 3) == "bed") && (falling == false)) {
ySpeed = ySpeed + 17;
_y = (_y - (ySpeed / 2));
} else if ((((((((((_root.scene[blockX][blockY] == "ladder") || (_root.scene[blockX][blockY] == "rp")) && (_root.scene[blockX][blockY + 1] != "ladder")) && (_root.scene[blockX][blockY + 1] != "rp")) && (_root.scene[blockX][blockY + 2] != "ladder")) && (_root.scene[blockX][blockY + 2] != "rp")) && (_root.scene[blockX][blockY + 3] != "ladder")) && (_root.scene[blockX][blockY + 3] != "rp")) || (_root.scene[blockX][blockY + 1] == "ladder")) || (_root.scene[blockX][blockY + 1] == "rp")) {
ySpeed = ySpeed + 3;
_y = (_y - 0.5);
} else if (((_root.scene[blockX][blockY + 1] == "wr") || (_root.scene[blockX][blockY + 1] == "la")) || (_root.scene[blockX][blockY + 1] == "ad")) {
ySpeed = ySpeed + 6;
_y = (_y - (ySpeed / 2));
} else if (falling == false) {
ySpeed = ySpeed + 13;
_y = (_y - (ySpeed / 2));
}
}
wasFalling = false;
if (falling == true) {
wasFalling = true;
}
falling = false;
rightable = true;
leftable = true;
} else if (random(5000) == 1) {
delete _root.onFire[_name];
_root.zombieNum--;
delete _root.mobs[mobNumber];
removeMovieClip(this);
}
};
Symbol 442 MovieClip [arrow] Frame 1
arrowNum = _name.substr(5, 10);
if (_root.arrows[arrowNum][3] == "new") {
xSpeed = 20 * Math.sin((_root.rotAngle / 180) * Math.PI);
ySpeed = -20 * Math.cos((_root.rotAngle / 180) * Math.PI);
_root.arrows[arrowNum][3] = xSpeed;
_root.arrows[arrowNum][4] = ySpeed;
okay = 4;
} else {
okay = 0;
}
_x = _root.arrows[arrowNum][1];
_y = _root.arrows[arrowNum][2];
xSpeed = _root.arrows[arrowNum][3];
ySpeed = _root.arrows[arrowNum][4];
_rotation = _root.arrows[arrowNum][5];
timer = _root.arrows[arrowNum][6];
shotBy = _root.arrows[arrowNum][7];
onEnterFrame = function () {
if (!_root.pawsed) {
if (((shotBy == "char") && (xSpeed == 0)) && (ySpeed == 0)) {
if (this.hitTest(_root.char)) {
var _local3 = 1;
while (_local3 <= 45) {
if ((_root.inventoryList[_local3 - 1][0] == "arrow") && (_root.inventoryList[_local3 - 1][1] < 64)) {
_root.inventoryList[_local3 - 1][1]++;
_root.requestSound("pop", 0, 0);
_local3 = 46;
delete _root.arrows[arrowNum];
removeMovieClip(this);
return(undefined);
}
_local3++;
}
_local3 = 1;
while (_local3 <= 45) {
if (_root.inventoryList[_local3 - 1][0] == undefined) {
_root.inventoryList[_local3 - 1] = ["arrow", 1, ""];
_root.requestSound("pop", 0, 0);
_local3 = 46;
delete _root.arrows[arrowNum];
removeMovieClip(this);
}
_local3++;
}
}
}
if (okay <= 0) {
if ((xSpeed != 0) || (ySpeed != 0)) {
if (this.hitTest(_root.char)) {
_root.health = _root.health - 5;
_root.ouch(1);
delete _root.arrows[arrowNum];
removeMovieClip(this);
}
for (var _local4 in _root.mobs) {
if (Math.round(_root.world[_root.mobs[_local4][1]]._x / 80) == Math.round(_x / 80)) {
if (Math.round(_root.world[_root.mobs[_local4][1]]._y / 80) == Math.round(_y / 80)) {
_root.world[_root.mobs[_local4][1]].health = _root.world[_root.mobs[_local4][1]].health - 5;
_root.world[_root.mobs[_local4][1]].ouch(1);
if ((_root.mobs[_local4][0] == "sheep") && (_root.mobs[_local4][12] == false)) {
_root.world[_root.mobs[_local4][1]].dropWool();
_root.world[_root.mobs[_local4][1]].beenHit = true;
}
delete _root.arrows[arrowNum];
removeMovieClip(this);
}
}
}
}
} else {
okay--;
}
if (((_root.scene[Math.round((_x - 15) / 30)][Math.round(((-_y) / 30) - 1)] != undefined) && (_root.waterWalkThroughBlock[_root.scene[Math.round((_x - 15) / 30)][Math.round(((-_y) / 30) - 1)]] == undefined)) && (_root.liquids2[_root.scene[Math.round((_x - 15) / 30)][Math.round(((-_y) / 30) - 1)]] == undefined)) {
xSpeed = 0;
ySpeed = 0;
} else {
ySpeed = ySpeed + 0.5;
}
if ((xSpeed != 0) || (ySpeed != 0)) {
_rotation = (((-Math.atan2(-xSpeed, -ySpeed)) * 180) / Math.PI);
_x = (_x + xSpeed);
_y = (_y + ySpeed);
}
_root.arrows[arrowNum][1] = _x;
_root.arrows[arrowNum][2] = _y;
_root.arrows[arrowNum][3] = xSpeed;
_root.arrows[arrowNum][4] = ySpeed;
_root.arrows[arrowNum][5] = _rotation;
}
};
Symbol 447 MovieClip [cloud] Frame 1
stop();
if (_root.so2.data.qual > 1) {
if (random(10) == 1) {
_alpha = 0;
upTween = true;
} else {
upTween = false;
}
}
onEnterFrame = function () {
if (!_root.pawsed) {
_x = (_x+1);
if (_root.so2.data.qual > 1) {
if (random(3000) == 1) {
if (upTween) {
alphaUp = true;
} else {
alphaDown = true;
}
}
if (alphaUp) {
if (_alpha < 100) {
_alpha = (_alpha + 2);
} else {
alphaUp = false;
upTween = false;
}
}
if (alphaDown) {
if (_alpha > 0) {
_alpha = (_alpha - 2);
} else {
alphaDown = false;
upTween = true;
}
}
}
if (_x > 725) {
removeMovieClip(this);
}
if (_root.raining) {
gotoAndStop (2);
}
}
};
Symbol 449 MovieClip [egg] Frame 1
xSpeed = 20 * Math.sin((_root.rotAngle / 180) * Math.PI);
ySpeed = -20 * Math.cos((_root.rotAngle / 180) * Math.PI);
onEnterFrame = function () {
if (!_root.pawsed) {
for (var _local5 in _root.mobs) {
if (Math.round(_root.world[_root.mobs[_local5][1]]._x / 80) == Math.round(_x / 80)) {
if (Math.round(_root.world[_root.mobs[_local5][1]]._y / 80) == Math.round(_y / 80)) {
_root.world[_root.mobs[_local5][1]].health = _root.world[_root.mobs[_local5][1]].health - 1;
_root.world[_root.mobs[_local5][1]].ouch(1);
if ((_root.mobs[_local5][0] == "sheep") && (_root.mobs[_local5][12] == false)) {
_root.world[_root.mobs[_local5][1]].dropWool();
_root.world[_root.mobs[_local5][1]].beenHit = true;
}
if (_root.so2.data.qual > 1) {
var _local4 = 0;
while (_local4 <= 10) {
part = _parent.attachMovie("mPart", "mPart" + random(100000), _parent.getNextHighestDepth());
part._x = _x;
part._y = _y;
part.snowball = true;
_local4++;
}
}
removeMovieClip(this);
}
}
}
if ((_root.scene[Math.round(_x / 30)][Math.round(((-_y) / 30) - 1)] != undefined) && (_root.waterWalkThroughBlock[_root.scene[Math.round(_x / 30)][Math.round(((-_y) / 30) - 1)]] == undefined)) {
if (random(5) == 1) {
_root.chickenNum++;
_root.mobNum++;
_root.lastChicken = _root.world.attachMovie("chicken", "chicken" + _root.mobNum, _root.world.getNextHighestDepth());
_root.mobs[_root.mobNum] = ["chicken", "chicken" + _root.mobNum, _root.sceneNum, _x, _y, 0, 0, 4, false, false, false];
_root.lastChicken.mobNumber = _root.mobNum;
}
if (_root.so2.data.qual > 1) {
var _local4 = 0;
while (_local4 <= 10) {
part = _parent.attachMovie("mPart", "mPart" + random(100000), _parent.getNextHighestDepth());
part._x = _x;
part._y = _y;
part.snowball = true;
_local4++;
}
}
removeMovieClip(this);
}
ySpeed = ySpeed + 0.5;
_x = (_x + xSpeed);
_y = (_y + ySpeed);
}
};
Symbol 451 MovieClip [mPart] Frame 1
_x = (_x + (random(30) - 15));
_y = (_y + (random(30) - 15));
var col = new Color(this);
if (portal == true) {
col.setRGB(13369599);
xSpeed = random(10) - 4;
ySpeed = -5;
g = -0.5;
} else if (snowball == true) {
col.setRGB(16777215);
xSpeed = random(10) - 4;
ySpeed = random(10) - 4;
g = 0;
} else {
colors = ["browns", "greys", "greens", "oranges", "yellows", "purples", "glass"];
colorsData = [10027008, 5592405, 39168, 16737792, 16776960, 6684825, 132033];
browns = _root.addToObject(["note", "n", "bricks", "ladder", "dt", "wd", "wd1", "th", "dr1", "dr2", "dr3", "dr4", "wp", "chest", "bed1", "bb", "rp", "bed2", "craft"]);
greys = _root.addToObject(["piston", "piston1", "piston2", "gv", "r", "cs", "in", "cl", "dm", "gd", "rs", "oven", "button", "lever", "pp"]);
greens = _root.addToObject(["lgr", "moss", "clothgreen", "sw", "sl", "lv", "lv1", "ct", "lv2", "fw1", "fw2", "ms"]);
oranges = _root.addToObject(["glow", "TNT", "pk", "jl", "rsd", "rstorch", "gb"]);
yellows = _root.addToObject(["sand", "ss"]);
purples = _root.addToObject(["portalrock", "ob", "coral"]);
glass = _root.addToObject(["glass", "lb"]);
var i = 0;
while (i < colors.length) {
if (this[colors[i]][_root.currentlyMining] != undefined) {
col.setRGB(colorsData[i]);
i = colors.length;
}
i++;
}
xSpeed = random(10) - 4;
ySpeed = -random(5);
g = 0.5;
}
onEnterFrame = function () {
ySpeed = ySpeed + g;
xSpeed = xSpeed * 0.95;
_x = (_x + xSpeed);
_y = (_y + ySpeed);
_alpha = (_alpha - 8);
if (_alpha <= 0) {
removeMovieClip(this);
}
};
Symbol 456 MovieClip [rain] Frame 1
_alpha = 0;
stop();
bX = Math.round((_x + 15) / 30) - 1;
bY = (-Math.round(_y / 30)) - 1;
endY = 0;
var i = 0;
while (i <= 50) {
if (((_root.scene[bX][bY - i] != undefined) && (_root.walkThroughBlock[_root.scene[bX][bY - i]] == undefined)) && ((_root.scene[bX][bY - i].substr(0, 2) != "lv") || (random(2) == 1))) {
endY = bY - i;
i = 51;
}
i++;
}
onEnterFrame = function () {
if (_root.pawsed == false) {
_alpha = (_alpha + 30);
_y = (_y + (20 + random(10)));
_x = (_x + (random(20) - 9));
if (((-Math.round(_y / 30)) - 1) <= endY) {
bX = Math.round((_x + 15) / 30) - 1;
bY = (-Math.round(_y / 30)) - 1;
if (_root.onFire[_root.world[(("blockX" + bX) + "Y") + bY]._name] == true) {
delete _root.onFire[_root.world[(("blockX" + bX) + "Y") + bY]._name];
_root.requestSound("sizzle", ((-_root.world._x) - _x) + 275, ((-_root.world._x) - _y) + 200);
if (_root.so2.data.qual > 1) {
part = _parent.attachMovie("smoke", "smoke" + random(100000), _parent.getNextHighestDepth());
part._x = _x;
part._y = _y - 30;
part = _parent.attachMovie("smoke", "smoke" + random(100000), _parent.getNextHighestDepth());
part._x = _x;
part._y = _y - 30;
part = _parent.attachMovie("smoke", "smoke" + random(100000), _parent.getNextHighestDepth());
part._x = _x;
part._y = _y - 30;
}
_root.world[(("blockX" + bX) + "Y") + bY].gotoAndStop(1);
}
if (((((((_root.scene[bX - 1][bY + 1] != undefined) && (_root.walkThroughBlock[_root.scene[bX - 1][bY + 1]] == undefined)) && ((_root.scene[bX + 1][bY + 1] != undefined) && (_root.walkThroughBlock[_root.scene[bX + 1][bY + 1]] == undefined))) && ((_root.scene[bX][bY + 2] != undefined) && (_root.walkThroughBlock[_root.scene[bX][bY + 2]] == undefined))) && (_alpha >= 50)) && (_root.scene[bX][bY + 1] == undefined)) && (random(80) == 1)) {
_root.scene[bX][bY + 1] = "wr";
_root.world.attachMovie("block", (("blockX" + bX) + "Y") + (bY + 1), _root.world.getNextHighestDepth());
_root.world[(("blockX" + bX) + "Y") + (bY + 1)]._x = (bX * _root.blockSize) + (_root.blockSize / 2);
_root.world[(("blockX" + bX) + "Y") + (bY + 1)]._y = ((bY + 1) * (-_root.blockSize)) - (_root.blockSize / 2);
_root.world[(("blockX" + bX) + "Y") + (bY + 1)].ex = bX;
_root.world[(("blockX" + bX) + "Y") + (bY + 1)].wy = bY + 1;
_root.world[(("blockX" + bX) + "Y") + (bY + 1)].blockType.gotoAndStop("wr");
}
if (((_root.scene[bX][bY] == "la") || (_root.scene[bX][bY] == "ad")) && (random(50) == 1)) {
_root.scene[bX][bY] = "ob";
_root.world[(("blockX" + bX) + "Y") + bY].blockType.gotoAndStop("ob");
_root.requestSound("sizzle", ((-_root.world._x) - _x) + 275, (_root.world._y + _y) - 200);
if (_root.so2.data.qual > 1) {
part = _parent.attachMovie("smoke", "smoke" + random(100000), _parent.getNextHighestDepth());
part._x = _x;
part._y = _y - 30;
part = _parent.attachMovie("smoke", "smoke" + random(100000), _parent.getNextHighestDepth());
part._x = _x;
part._y = _y - 30;
part = _parent.attachMovie("smoke", "smoke" + random(100000), _parent.getNextHighestDepth());
part._x = _x;
part._y = _y - 30;
}
}
if (((((_alpha >= 50) && (_root.scene[bX][bY + 1] == undefined)) && (_root.liquids2[_root.scene[bX][bY + 1]] == undefined)) && ((_root.scene[bX][bY] == "r") || (_root.scene[bX][bY] == "cs"))) && (random(400) == 1)) {
_root.scene[bX][bY + 1] = "moss";
_root.world.attachMovie("block", (("blockX" + bX) + "Y") + (bY + 1), _root.world.getNextHighestDepth());
_root.world[(("blockX" + bX) + "Y") + (bY + 1)]._x = (bX * _root.blockSize) + (_root.blockSize / 2);
_root.world[(("blockX" + bX) + "Y") + (bY + 1)]._y = ((bY + 1) * (-_root.blockSize)) - (_root.blockSize / 2);
_root.world[(("blockX" + bX) + "Y") + (bY + 1)].ex = bX;
_root.world[(("blockX" + bX) + "Y") + (bY + 1)].wy = bY + 1;
_root.world[(("blockX" + bX) + "Y") + (bY + 1)].blockType.gotoAndStop("moss");
}
if (_alpha > 50) {
_root.closeRains.push([Math.round((((-_root.world._x) - _x) + 275) / 30) * 30, Math.round(((_root.world._y + _y) - 200) / 30) * 30]);
if ((_root.so2.data.qual > 1) && (random(3) == 1)) {
p = _root.world.attachMovie("wPart", "wPart" + random(10000000), _root.world.getNextHighestDepth());
p._x = _x;
p._y = _y;
}
} else {
_root.closeRains.push([0, -300]);
}
removeMovieClip(this);
}
}
};
Symbol 459 MovieClip [smoke] Frame 1
_rotation = random(360);
var col = new Color(this);
onEnterFrame = function () {
_y = (_y - 1);
_x = (_x + (random(3) - 1));
_alpha = (_alpha - 3);
if (_alpha <= 0) {
removeMovieClip(this);
}
};
Symbol 490 MovieClip Frame 1
_yscale = (random(50) + 60);
_xscale = (random(50) + 60);
gotoAndStop(random(19) + 1);
Symbol 491 MovieClip [snow] Frame 1
_alpha = 0;
bX = Math.round((_x + 15) / 30) - 1;
rot = random(20);
stop();
onEnterFrame = function () {
if (_root.pawsed == false) {
_alpha = (_alpha + 20);
_rotation = (_rotation + (rot / 5));
_y = (_y + 5);
bY = (-Math.round(_y / 30)) - 1;
if ((_root.scene[bX][bY] != undefined) && (_root.walkThroughBlock[_root.scene[bX][bY]] == undefined)) {
if ((((((_root.scene[bX - 1][bY + 1] != undefined) && (_root.walkThroughBlock[_root.scene[bX - 1][bY + 1]] == undefined)) && ((_root.scene[bX + 1][bY + 1] != undefined) && (_root.walkThroughBlock[_root.scene[bX + 1][bY + 1]] == undefined))) && (_alpha >= 50)) && ((_root.scene[bX][bY + 1] == undefined) || (_root.scene[bX][bY + 1] == "snow"))) && (random(20) == 1)) {
_root.scene[bX][bY + 1] = "snowblock";
_root.world.attachMovie("block", (("blockX" + bX) + "Y") + (bY + 1), _root.world.getNextHighestDepth());
_root.world[(("blockX" + bX) + "Y") + (bY + 1)]._x = (bX * _root.blockSize) + (_root.blockSize / 2);
_root.world[(("blockX" + bX) + "Y") + (bY + 1)]._y = ((bY + 1) * (-_root.blockSize)) - (_root.blockSize / 2);
_root.world[(("blockX" + bX) + "Y") + (bY + 1)].ex = bX;
_root.world[(("blockX" + bX) + "Y") + (bY + 1)].wy = bY + 1;
_root.world[(("blockX" + bX) + "Y") + (bY + 1)].blockType.gotoAndStop("snowblock");
}
if ((_root.scene[bX][bY] == "wr") && (random(20) == 1)) {
_root.scene[bX][bY] = "ice";
_root.world[(("blockX" + bX) + "Y") + bY].blockType.gotoAndStop("ice");
}
if (((_root.scene[bX][bY] == "la") || (_root.scene[bX][bY] == "ad")) && (random(20) == 1)) {
_root.scene[bX][bY] = "ob";
_root.world[(("blockX" + bX) + "Y") + bY].blockType.gotoAndStop("ob");
_root.requestSound("sizzle", ((-_root.world._x) - _x) + 275, (_root.world._y + _y) - 200);
if (_root.so2.data.qual > 1) {
part = _parent.attachMovie("smoke", "smoke" + random(100000), _parent.getNextHighestDepth());
part._x = _x;
part._y = _y - 30;
part = _parent.attachMovie("smoke", "smoke" + random(100000), _parent.getNextHighestDepth());
part._x = _x;
part._y = _y - 30;
part = _parent.attachMovie("smoke", "smoke" + random(100000), _parent.getNextHighestDepth());
part._x = _x;
part._y = _y - 30;
}
}
if (((_root.liquids2[_root.scene[bX][bY]] == undefined) && (_root.scene[bX][bY + 1] == undefined)) && (random(20) == 1)) {
_root.scene[bX][bY + 1] = "snow";
_root.world.attachMovie("block", (("blockX" + bX) + "Y") + (bY + 1), _root.world.getNextHighestDepth());
_root.world[(("blockX" + bX) + "Y") + (bY + 1)]._x = (bX * _root.blockSize) + (_root.blockSize / 2);
_root.world[(("blockX" + bX) + "Y") + (bY + 1)]._y = ((bY + 1) * (-_root.blockSize)) - (_root.blockSize / 2);
_root.world[(("blockX" + bX) + "Y") + (bY + 1)].ex = bX;
_root.world[(("blockX" + bX) + "Y") + (bY + 1)].wy = bY + 1;
_root.world[(("blockX" + bX) + "Y") + (bY + 1)].blockType.gotoAndStop("snow");
}
removeMovieClip(this);
}
}
};
Symbol 491 MovieClip [snow] Frame 2
removeMovieClip(this);
Symbol 493 MovieClip [snowball] Frame 1
xSpeed = 20 * Math.sin((_root.rotAngle / 180) * Math.PI);
ySpeed = -20 * Math.cos((_root.rotAngle / 180) * Math.PI);
onEnterFrame = function () {
if (!_root.pawsed) {
for (var _local5 in _root.mobs) {
if (Math.round(_root.world[_root.mobs[_local5][1]]._x / 80) == Math.round(_x / 80)) {
if (Math.round(_root.world[_root.mobs[_local5][1]]._y / 80) == Math.round(_y / 80)) {
_root.world[_root.mobs[_local5][1]].health = _root.world[_root.mobs[_local5][1]].health - 1;
_root.world[_root.mobs[_local5][1]].ouch(1);
if ((_root.mobs[_local5][0] == "sheep") && (_root.mobs[_local5][12] == false)) {
_root.world[_root.mobs[_local5][1]].dropWool();
_root.world[_root.mobs[_local5][1]].beenHit = true;
}
if (_root.so2.data.qual > 1) {
var _local4 = 0;
while (_local4 <= 10) {
part = _parent.attachMovie("mPart", "mPart" + random(100000), _parent.getNextHighestDepth());
part._x = _x;
part._y = _y;
part.snowball = true;
_local4++;
}
}
removeMovieClip(this);
}
}
}
if ((_root.scene[Math.round(_x / 30)][Math.round(((-_y) / 30) - 1)] != undefined) && (_root.waterWalkThroughBlock[_root.scene[Math.round(_x / 30)][Math.round(((-_y) / 30) - 1)]] == undefined)) {
if (_root.so2.data.qual > 1) {
var _local4 = 0;
while (_local4 <= 10) {
part = _parent.attachMovie("mPart", "mPart" + random(100000), _parent.getNextHighestDepth());
part._x = _x;
part._y = _y;
part.snowball = true;
_local4++;
}
}
removeMovieClip(this);
}
ySpeed = ySpeed + 0.5;
_x = (_x + xSpeed);
_y = (_y + ySpeed);
}
};
Symbol 498 MovieClip Frame 1
_rotation = (random(3) * 90);
Symbol 498 MovieClip Frame 3
_rotation = (random(3) * 90);
Symbol 498 MovieClip Frame 5
_rotation = (random(3) * 90);
Symbol 498 MovieClip Frame 7
_rotation = (random(3) * 90);
Symbol 498 MovieClip Frame 9
_rotation = (random(3) * 90);
Symbol 498 MovieClip Frame 11
_parent.removeMovieClip();
Symbol 499 MovieClip [wPart] Frame 1
if (xqSpeed == undefined) {
_x = (_x + (random(10) - 4));
_y = (_y + (random(10) - 4));
xqSpeed = (random(20) - 9) / 2;
yqSpeed = (-random(40)) / 5;
_rotation = (random(3) * 90);
}
stop();
onEnterFrame = function () {
bX = Math.round((_x + 15) / 30) - 1;
bY = (-Math.round((_y - 15) / 30)) - 1;
if (_root.scene[bX][bY] == "wr") {
wasABubble = true;
yqSpeed = yqSpeed - 1;
gotoAndStop (1);
} else if (_root.scene[bX][bY] == undefined) {
if (wasABubble) {
removeMovieClip(this);
}
yqSpeed = yqSpeed + 1;
gotoAndStop (2);
} else {
removeMovieClip(this);
}
xqSpeed = xqSpeed * 0.9;
_x = (_x + xqSpeed);
_y = (_y + yqSpeed);
_alpha = (_alpha - 0.5);
if (_alpha <= 0) {
removeMovieClip(this);
}
};
Symbol 547 MovieClip Frame 1
stop();
gotoAndStop((_root.water[_parent._parent._name][0] + "-") + _root.water[_parent._parent._name][1]);
Symbol 549 MovieClip Frame 1
stop();
gotoAndStop((_root.water[_parent._parent._name][0] + "-") + _root.water[_parent._parent._name][1]);
Symbol 551 MovieClip Frame 1
stop();
gotoAndStop((_root.water[_parent._parent._name][0] + "-") + _root.water[_parent._parent._name][1]);
Symbol 571 MovieClip Frame 1
onEnterFrame = function () {
gotoAndStop(random(_totalframes) + 1);
};
Symbol 573 MovieClip Frame 1
stop();
Symbol 586 MovieClip Frame 1
stop();
Symbol 603 MovieClip Frame 1
stop();
Symbol 632 MovieClip Frame 1
stop();
Symbol 632 MovieClip Frame 2
_root.playingTNT[_parent._parent._name] = _currentframe;
_root.requestSound("TNT", ((-_root.world._x) - _parent._parent._x) + 275, (_root.world._y + _parent._parent._y) - 200);
Symbol 632 MovieClip Frame 3
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 4
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 5
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 6
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 7
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 8
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 9
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 10
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 11
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 12
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 13
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 14
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 15
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 16
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 17
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 18
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 19
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 20
_root.playingTNT[_parent._parent._name] = _currentframe;
_root.requestSound("TNT", ((-_root.world._x) - _parent._parent._x) + 275, (_root.world._y + _parent._parent._y) - 200);
Symbol 632 MovieClip Frame 21
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 22
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 23
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 24
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 25
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 26
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 27
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 28
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 29
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 30
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 31
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 32
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 33
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 34
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 35
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 36
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 37
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 38
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 39
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 40
_root.playingTNT[_parent._parent._name] = _currentframe;
_root.requestSound("TNT", ((-_root.world._x) - _parent._parent._x) + 275, (_root.world._y + _parent._parent._y) - 200);
Symbol 632 MovieClip Frame 41
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 42
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 43
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 44
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 45
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 46
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 47
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 48
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 49
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 50
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 51
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 52
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 53
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 54
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 55
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 56
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 57
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 58
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 59
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 60
_root.playingTNT[_parent._parent._name] = _currentframe;
_root.requestSound("TNT", ((-_root.world._x) - _parent._parent._x) + 275, (_root.world._y + _parent._parent._y) - 200);
Symbol 632 MovieClip Frame 61
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 62
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 63
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 64
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 65
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 66
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 67
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 68
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 69
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 70
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 71
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 72
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 73
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 74
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 75
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 76
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 77
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 78
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 79
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 80
_root.playingTNT[_parent._parent._name] = _currentframe;
_root.requestSound("TNT", ((-_root.world._x) - _parent._parent._x) + 275, (_root.world._y + _parent._parent._y) - 200);
Symbol 632 MovieClip Frame 81
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 82
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 83
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 84
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 85
_root.playingTNT[_parent._parent._name] = _currentframe;
_root.requestSound("TNT", ((-_root.world._x) - _parent._parent._x) + 275, (_root.world._y + _parent._parent._y) - 200);
Symbol 632 MovieClip Frame 86
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 87
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 88
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 89
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 90
_root.playingTNT[_parent._parent._name] = _currentframe;
_root.requestSound("TNT", ((-_root.world._x) - _parent._parent._x) + 275, (_root.world._y + _parent._parent._y) - 200);
Symbol 632 MovieClip Frame 91
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 92
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 93
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 94
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 95
_root.playingTNT[_parent._parent._name] = _currentframe;
_root.requestSound("TNT", ((-_root.world._x) - _parent._parent._x) + 275, (_root.world._y + _parent._parent._y) - 200);
Symbol 632 MovieClip Frame 96
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 97
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 98
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 99
_root.playingTNT[_parent._parent._name] = _currentframe;
Symbol 632 MovieClip Frame 100
delete _root.playingTNT[_parent._parent._name];
gotoAndStop (99);
_root.requestSound("boom", ((-_root.world._x) - _parent._parent._x) + 275, (_root.world._y + _parent._parent._y) - 200);
severe = false;
if ((Math.abs(Math.round((((-_root.world._x) - _parent._parent._x) + 275) / 30)) < 3) && (Math.abs(Math.round(((_root.world._y + _parent._parent._y) - 200) / 30)) < 3)) {
_root.health--;
if ((Math.abs(Math.round((((-_root.world._x) - _parent._parent._x) + 275) / 30)) < 2) && (Math.abs(Math.round(((_root.world._y + _parent._parent._y) - 200) / 30)) < 2)) {
_root.health = _root.health - 2;
if ((Math.abs(Math.round((((-_root.world._x) - _parent._parent._x) + 275) / 30)) < 1) && (Math.abs(Math.round(((_root.world._y + _parent._parent._y) - 200) / 30)) < 1)) {
_root.health = _root.health - 2;
severe = true;
}
}
_root.ouch(1 + severe);
}
for (var i in _root.mobs) {
severe = false;
if ((Math.abs(Math.round((_root.world[_root.mobs[i][1]]._x - _x) / 30)) < 3) && (Math.abs(Math.round((_root.world[_root.mobs[i][1]]._y - _y) / 30)) < 3)) {
_root.world[_root.mobs[i][1]].health = _root.world[_root.mobs[i][1]].health - 1;
if ((Math.abs(Math.round((_root.world[_root.mobs[i][1]]._x - _x) / 30)) < 2) && (Math.abs(Math.round((_root.world[_root.mobs[i][1]]._y - _y) / 30)) < 2)) {
_root.world[_root.mobs[i][1]].health = _root.world[_root.mobs[i][1]].health - 2;
if ((Math.abs(Math.round((_root.world[_root.mobs[i][1]]._x - _x) / 30)) < 1) && (Math.abs(Math.round((_root.world[_root.mobs[i][1]]._y - _y) / 30)) < 1)) {
_root.world[_root.mobs[i][1]].health = _root.world[_root.mobs[i][1]].health - 2;
severe = true;
}
}
_root.world[_root.mobs[i][1]].ouch(1 + severe);
}
}
if ((((_root.scene[_parent._parent.ex][_parent._parent.wy + 1] != "wr") && (_root.scene[_parent._parent.ex][_parent._parent.wy - 1] != "wr")) && (_root.scene[_parent._parent.ex + 1][_parent._parent.wy] != "wr")) && (_root.scene[_parent._parent.ex - 1][_parent._parent.wy] != "wr")) {
_root.explode(_parent._parent.ex, _parent._parent.wy, 4);
} else {
_parent._parent.mineBlock(true, false);
}
Symbol 651 MovieClip Frame 1
stop();
onEnterFrame = function () {
gotoAndStop(10 - _root.hasSignal[(("blockX" + _parent._parent._parent.ex) + "Y") + (_parent._parent._parent.wy - 1)][0]);
};
Symbol 672 MovieClip Frame 1
_rotation = random(360);
rot = (random(2) * 6) - 3;
onEnterFrame = function () {
_rotation = (_rotation + rot);
};
Symbol 678 MovieClip Frame 1
stop();
var snd = new Sound(this);
onEnterFrame = function () {
xDist = ((-_root.world._x) - _parent._parent._x) + 275;
yDist = (_root.world._y + _parent._parent._y) - 200;
snd.setVolume(Math.max(Math.min(100 - (Math.sqrt((xDist * xDist) + (yDist * yDist)) / 4), 100) - (_root.deepness * 10), 0) * (_root.so2.data.soundVol / 100));
if (snd.getVolume() < 0) {
snd.setVolume(0);
}
snd.setPan(xDist);
if (random(1500) == 1) {
gotoAndStop(random(5) + 2);
}
};
Symbol 678 MovieClip Frame 2
gotoAndStop (1);
Symbol 678 MovieClip Frame 3
gotoAndStop (1);
Symbol 678 MovieClip Frame 4
gotoAndStop (1);
Symbol 678 MovieClip Frame 5
gotoAndStop (1);
Symbol 678 MovieClip Frame 6
gotoAndStop (1);
Symbol 712 MovieClip Frame 1
stop();
Symbol 717 MovieClip Frame 1
stop();
Symbol 724 MovieClip Frame 1
ty = "br";
stop();
Symbol 724 MovieClip Frame 2
ty = "r";
Symbol 724 MovieClip Frame 3
ty = "dt";
function ifAbove(x, y) {
if (((_root.scene[x][y + 1] == undefined) || (_root.walkThroughBlock[_root.scene[x][y + 1]] != undefined)) && ((((_root.scene[x][y + 2] == undefined) && (_root.scene[x][y + 3] == undefined)) || ((_root.scene[x - 1][y + 2] == undefined) && (_root.scene[x - 1][y + 3] == undefined))) || ((_root.scene[x + 1][y + 2] == undefined) && (_root.scene[x + 1][y + 3] == undefined)))) {
return(true);
}
return(false);
}
if (_root.states[_parent._name] == undefined) {
now = true;
} else {
grass.gotoAndStop(_root.states[_parent._name]);
}
onEnterFrame = function () {
if ((random(1000) == 1) || (now)) {
now = false;
if (ifAbove(_parent.ex, _parent.wy)) {
_root.states[_parent._name] = 1;
goto = 1;
} else {
_root.states[_parent._name] = 2;
goto = 2;
}
grass.gotoAndStop(goto);
}
};
Symbol 724 MovieClip Frame 4
ty = "farm";
onEnterFrame = function () {
if (ty == "farm") {
if (((((((_root.scene[_parent.ex - 1][_parent.wy] != "wr") && (_root.scene[_parent.ex - 2][_parent.wy] != "wr")) && (_root.scene[_parent.ex + 1][_parent.wy] != "wr")) && (_root.scene[_parent.ex + 2][_parent.wy] != "wr")) && (_root.scene[_parent.ex + 1][_parent.wy - 1] != "wr")) && (_root.scene[_parent.ex - 1][_parent.wy - 1] != "wr")) && (_root.scene[_parent.ex][_parent.wy - 1] != "wr")) {
_root.scene[_parent.ex][_parent.wy] = "dt";
gotoAndStop ("dt");
}
}
};
Symbol 724 MovieClip Frame 5
ty = "wd";
Symbol 724 MovieClip Frame 6
ty = "wd1";
Symbol 724 MovieClip Frame 7
ty = "lv";
toCheck = [[0, -3], [1, -3], [-1, -3], [3, 1], [3, -1], [3, 0], [-3, -1], [-3, 1], [-3, 0], [1, 0], [0, 1], [1, 1], [2, 0], [2, 1], [1, 2], [0, 2], [2, 2], [-1, 0], [0, -1], [-1, -1], [-2, 0], [-2, -1], [-1, -2], [0, -2], [-2, -2], [-1, 1], [-2, 1], [-1, 2], [-2, 2], [1, -1], [1, -2], [2, -1], [2, -2]];
onEnterFrame = function () {
if (_root.pawsed == false) {
if (random(500) == false) {
remove = true;
var _local3 = 0;
while (_local3 < toCheck.length) {
if (_root.scene[_parent.ex + toCheck[_local3][0]][_parent.wy + toCheck[_local3][1]] == "wd1") {
remove = false;
_local3 = toCheck.length;
}
_local3++;
}
if (remove == true) {
if (random(10) == 1) {
_root.dropNum++;
_root.world.attachMovie("drop", "drop" + _root.dropNum, _root.world.getNextHighestDepth());
_root.world["drop" + _root.dropNum]._x = _parent._x;
_root.world["drop" + _root.dropNum]._y = _parent._y;
_root.world["drop" + _root.dropNum].gotoAndStop("sl");
}
_root.scene[_parent.ex][_parent.wy] = undefined;
removeMovieClip(_parent);
}
}
}
};
Symbol 724 MovieClip Frame 8
ty = "lv1";
toCheck = [[0, -3], [1, -3], [-1, -3], [3, 1], [3, -1], [3, 0], [-3, -1], [-3, 1], [-3, 0], [1, 0], [0, 1], [1, 1], [2, 0], [2, 1], [1, 2], [0, 2], [2, 2], [-1, 0], [0, -1], [-1, -1], [-2, 0], [-2, -1], [-1, -2], [0, -2], [-2, -2], [-1, 1], [-2, 1], [-1, 2], [-2, 2], [1, -1], [1, -2], [2, -1], [2, -2]];
onEnterFrame = function () {
if (_root.pawsed == false) {
if (random(500) == false) {
remove = true;
var _local3 = 0;
while (_local3 < toCheck.length) {
if (_root.scene[_parent.ex + toCheck[_local3][0]][_parent.wy + toCheck[_local3][1]] == "wd1") {
remove = false;
_local3 = toCheck.length;
}
_local3++;
}
if (remove == true) {
_root.dropNum++;
_root.world.attachMovie("drop", "drop" + _root.dropNum, _root.world.getNextHighestDepth());
_root.world["drop" + _root.dropNum]._x = _parent._x;
_root.world["drop" + _root.dropNum]._y = _parent._y;
_root.world["drop" + _root.dropNum].gotoAndStop("ap");
_root.scene[_parent.ex][_parent.wy] = undefined;
removeMovieClip(_parent);
}
}
}
};
Symbol 724 MovieClip Frame 9
ty = "lv2";
toCheck = [[0, -3], [1, -3], [-1, -3], [3, 1], [3, -1], [3, 0], [-3, -1], [-3, 1], [-3, 0], [1, 0], [0, 1], [1, 1], [2, 0], [2, 1], [1, 2], [0, 2], [2, 2], [-1, 0], [0, -1], [-1, -1], [-2, 0], [-2, -1], [-1, -2], [0, -2], [-2, -2], [-1, 1], [-2, 1], [-1, 2], [-2, 2], [1, -1], [1, -2], [2, -1], [2, -2]];
onEnterFrame = function () {
if (_root.pawsed == false) {
if (random(500) == false) {
remove = true;
var _local3 = 0;
while (_local3 < toCheck.length) {
if (_root.scene[_parent.ex + toCheck[_local3][0]][_parent.wy + toCheck[_local3][1]] == "wd1") {
remove = false;
_local3 = toCheck.length;
}
_local3++;
}
if (remove == true) {
_root.dropNum++;
_root.world.attachMovie("drop", "drop" + _root.dropNum, _root.world.getNextHighestDepth());
_root.world["drop" + _root.dropNum]._x = _parent._x;
_root.world["drop" + _root.dropNum]._y = _parent._y;
_root.world["drop" + _root.dropNum].gotoAndStop("or");
_root.scene[_parent.ex][_parent.wy] = undefined;
removeMovieClip(_parent);
}
}
}
};
Symbol 724 MovieClip Frame 10
ty = "lv3";
toCheck = [[0, -3], [1, -3], [-1, -3], [3, 1], [3, -1], [3, 0], [-3, -1], [-3, 1], [-3, 0], [1, 0], [0, 1], [1, 1], [2, 0], [2, 1], [1, 2], [0, 2], [2, 2], [-1, 0], [0, -1], [-1, -1], [-2, 0], [-2, -1], [-1, -2], [0, -2], [-2, -2], [-1, 1], [-2, 1], [-1, 2], [-2, 2], [1, -1], [1, -2], [2, -1], [2, -2]];
onEnterFrame = function () {
if (_root.pawsed == false) {
if (random(500) == false) {
remove = true;
var _local3 = 0;
while (_local3 < toCheck.length) {
if (_root.scene[_parent.ex + toCheck[_local3][0]][_parent.wy + toCheck[_local3][1]] == "wd1") {
remove = false;
_local3 = toCheck.length;
}
_local3++;
}
if (remove == true) {
_root.dropNum++;
_root.world.attachMovie("drop", "drop" + _root.dropNum, _root.world.getNextHighestDepth());
_root.world["drop" + _root.dropNum]._x = _parent._x;
_root.world["drop" + _root.dropNum]._y = _parent._y;
_root.world["drop" + _root.dropNum].gotoAndStop("gap");
_root.scene[_parent.ex][_parent.wy] = undefined;
removeMovieClip(_parent);
}
}
}
};
Symbol 724 MovieClip Frame 11
ty = "dm";
Symbol 724 MovieClip Frame 12
ty = "gd";
Symbol 724 MovieClip Frame 13
ty = "in";
Symbol 724 MovieClip Frame 14
ty = "cl";
Symbol 724 MovieClip Frame 15
ty = "rs";
Symbol 724 MovieClip Frame 16
ty = "os";
Symbol 724 MovieClip Frame 17
ty = "to";
Symbol 724 MovieClip Frame 18
ty = "wr";
function ifWater() {
clearInterval(interv);
if (_root.pawsed == false) {
if (ty == "wr") {
graph.gotoAndStop((_root.water[na][0] + "-") + _root.water[na][1]);
if (((_root.scene[ex][wy - 1] == "wr") && (_root.water[(("blockX" + ex) + "Y") + (wy - 1)] != [10, 10])) && (_root.water[(("blockX" + ex) + "Y") + (wy - 1)] != [9, 9])) {
_root.water[(("blockX" + ex) + "Y") + (wy - 1)] = [9, 9];
}
if ((_root.scene[ex][wy - 1] == undefined) || (_root.waterWalkThroughBlock[_root.scene[ex][wy - 1]] != undefined)) {
_root.scene[ex][wy - 1] = "wr";
_root.world[(("blockX" + ex) + "Y") + (wy - 1)].mineBlock(true, false);
_root.water[(("blockX" + ex) + "Y") + (wy - 1)] = [9, 9];
_root.world.attachMovie("block", (("blockX" + ex) + "Y") + (wy - 1), _root.world.getNextHighestDepth());
_root.world[(("blockX" + ex) + "Y") + (wy - 1)]._x = (ex * 30) + 15;
_root.world[(("blockX" + ex) + "Y") + (wy - 1)]._y = ((wy - 1) * -30) - 15;
_root.world[(("blockX" + ex) + "Y") + (wy - 1)].ex = ex;
_root.world[(("blockX" + ex) + "Y") + (wy - 1)].wy = wy - 1;
_root.world[(("blockX" + ex) + "Y") + (wy - 1)].blockType.gotoAndStop("wr");
} else {
if ((_root.water[na][0] != 10) || (_root.water[na][1] != 10)) {
if ((_root.water[na][0] != 9) || (_root.water[na][1] != 9)) {
if (_root.water[na][0] > _root.water[na][1]) {
if (Math.min(_root.water[(("blockX" + (ex - 1)) + "Y") + wy][1], 9) != Math.min(_root.water[na][0], 9)) {
delete _root.water[na];
_root.scene[ex][wy] = undefined;
_parent.requestRemove(true);
}
} else if (_root.water[na][0] < _root.water[na][1]) {
if (Math.min(_root.water[(("blockX" + (ex + 1)) + "Y") + wy][0], 9) != Math.min(_root.water[na][1], 9)) {
delete _root.water[na];
_root.scene[ex][wy] = undefined;
_parent.requestRemove(true);
}
} else {
delete _root.water[na];
_root.scene[ex][wy] = undefined;
_parent.requestRemove(true);
}
} else if (_root.scene[ex][wy + 1] != "wr") {
delete _root.water[na];
_root.scene[ex][wy] = undefined;
_parent.requestRemove(true);
}
}
if (_root.liquids2[_root.scene[ex][wy - 1]] == undefined) {
if ((((_root.scene[ex - 1][wy] == undefined) || (_root.waterWalkThroughBlock[_root.scene[ex - 1][wy]] != undefined)) && ((_root.water[na][0] - 1) >= 3)) && (_root.water[na][0] <= _root.water[na][1])) {
_root.scene[ex - 1][wy] = "wr";
_root.water[(("blockX" + (ex - 1)) + "Y") + wy] = [Math.min(_root.water[na][0], 9) - 1, Math.min(_root.water[na][0], 9)];
_root.world[(("blockX" + (ex - 1)) + "Y") + wy].mineBlock(true);
_root.world.attachMovie("block", (("blockX" + (ex - 1)) + "Y") + wy, _root.world.getNextHighestDepth());
_root.world[(("blockX" + (ex - 1)) + "Y") + wy]._x = ((ex - 1) * 30) + 15;
_root.world[(("blockX" + (ex - 1)) + "Y") + wy]._y = (wy * -30) - 15;
_root.world[(("blockX" + (ex - 1)) + "Y") + wy].ex = ex - 1;
_root.world[(("blockX" + (ex - 1)) + "Y") + wy].wy = wy;
_root.world[(("blockX" + (ex - 1)) + "Y") + wy].blockType.gotoAndStop("wr");
}
if ((((_root.scene[ex + 1][wy] == undefined) || (_root.waterWalkThroughBlock[_root.scene[ex + 1][wy]] != undefined)) && ((_root.water[na][1] - 1) >= 3)) && (_root.water[na][0] >= _root.water[na][1])) {
_root.scene[ex + 1][wy] = "wr";
_root.water[(("blockX" + (ex + 1)) + "Y") + wy] = [Math.min(_root.water[na][1], 9), Math.min(_root.water[na][1], 9) - 1];
_root.world[(("blockX" + (ex + 1)) + "Y") + wy].mineBlock(true);
_root.world.attachMovie("block", (("blockX" + (ex + 1)) + "Y") + wy, _root.world.getNextHighestDepth());
_root.world[(("blockX" + (ex + 1)) + "Y") + wy]._x = ((ex + 1) * 30) + 15;
_root.world[(("blockX" + (ex + 1)) + "Y") + wy]._y = (wy * -30) - 15;
_root.world[(("blockX" + (ex + 1)) + "Y") + wy].ex = ex + 1;
_root.world[(("blockX" + (ex + 1)) + "Y") + wy].wy = wy;
_root.world[(("blockX" + (ex + 1)) + "Y") + wy].blockType.gotoAndStop("wr");
}
}
}
} else {
delete _root.water[na];
}
}
}
function inter() {
if (ty == "wr") {
interv = setInterval(ifWater, 500);
}
}
ex = _parent.ex;
wy = _parent.wy;
na = _parent._name;
if (_root.water[na] == undefined) {
_root.water[na] = [10, 10];
}
if (_root.firstTimes[_parent._name] != undefined) {
if ((((((_root.scene[ex][wy + 1] == undefined) || (_root.waterWalkThroughBlock[_root.scene[ex][wy + 1]] != undefined)) && ((_root.scene[ex][wy + 2] == undefined) || (_root.waterWalkThroughBlock[_root.scene[ex][wy + 2]] != undefined))) && ((_root.scene[ex][wy + 3] == undefined) || (_root.waterWalkThroughBlock[_root.scene[ex][wy + 3]] != undefined))) && ((_root.scene[ex][wy + 4] == undefined) || (_root.waterWalkThroughBlock[_root.scene[ex][wy + 4]] != undefined))) && (_root.snowRegions[ex] == true)) {
_root.scene[ex][wy] = "ice";
_parent.requestRemove(false, true);
gotoAndStop ("ice");
}
delete _root.firstTimes[_parent._name];
}
if (_root.sceneNum == 2) {
delete _root.water[na];
_root.requestSound("sizzle", ((-_root.world._x) - _parent._x) + 275, (_root.world._y + _parent._y) - 200);
_root.scene[ex][wy] = undefined;
_parent.requestRemove(true);
}
onEnterFrame = function () {
if (random(1000) == 1) {
_root.requestSound("water", ((-_root.world._x) - _parent._x) + 275, (_root.world._y + _parent._y) - 200);
}
if (ty == "wr") {
graph.gotoAndStop((_root.water[na][0] + "-") + _root.water[na][1]);
if ((_root.scene[ex - 1][wy] == "la") || (_root.scene[ex - 1][wy] == "ad")) {
_root.scene[ex - 1][wy] = undefined;
delete _root.water[(("blockX" + (ex - 1)) + "Y") + wy];
_root.requestSound("sizzle", ((-_root.world._x) - _parent._x) + 275, (_root.world._y + _parent._y) - 200);
if ((_root.scene[ex - 1][wy] == "la") && (_root.water[_root.scene[ex - 1][wy]] == [10, 10])) {
_root.scene[ex - 1][wy] = "ob";
} else {
_root.scene[ex - 1][wy] = "cs";
}
_root.world[(("blockX" + (ex - 1)) + "Y") + wy].requestRemove(true, true);
}
if ((_root.scene[ex + 1][wy] == "la") || (_root.scene[ex + 1][wy] == "ad")) {
_root.scene[ex + 1][wy] = undefined;
delete _root.water[(("blockX" + (ex + 1)) + "Y") + wy];
_root.requestSound("sizzle", ((-_root.world._x) - _parent._x) + 275, (_root.world._y + _parent._y) - 200);
if ((_root.scene[ex + 1][wy] == "la") && (_root.water[_root.scene[ex + 1][wy]] == [10, 10])) {
_root.scene[ex + 1][wy] = "ob";
} else {
_root.scene[ex + 1][wy] = "cs";
}
_root.world[(("blockX" + (ex + 1)) + "Y") + wy].requestRemove(true, true);
}
if ((_root.scene[ex][wy + 1] == "la") || (_root.scene[ex][wy + 1] == "ad")) {
_root.scene[ex][wy + 1] = undefined;
delete _root.water[(("blockX" + ex) + "Y") + (wy + 1)];
_root.requestSound("sizzle", ((-_root.world._x) - _parent._x) + 275, (_root.world._y + _parent._y) - 200);
if ((_root.scene[ex][wy + 1] == "la") && (_root.water[_root.scene[ex][wy + 1]] == [10, 10])) {
_root.scene[ex][wy + 1] = "ob";
} else {
_root.scene[ex][wy + 1] = "cs";
}
_root.world[(("blockX" + ex) + "Y") + (wy + 1)].requestRemove(true, true);
}
if ((_root.scene[ex][wy - 1] == "la") || (_root.scene[ex][wy - 1] == "ad")) {
_root.scene[ex][wy - 1] = undefined;
delete _root.water[(("blockX" + ex) + "Y") + (wy - 1)];
_root.requestSound("sizzle", ((-_root.world._x) - _parent._x) + 275, (_root.world._y + _parent._y) - 200);
if ((_root.scene[ex][wy - 1] == "la") && (_root.water[_root.scene[ex][wy - 1]] == [10, 10])) {
_root.scene[ex][wy - 1] = "ob";
} else {
_root.scene[ex][wy - 1] = "cs";
}
_root.world[(("blockX" + ex) + "Y") + (wy - 1)].requestRemove(true, true);
}
}
};
inter();
Symbol 724 MovieClip Frame 19
ty = "la";
function ifWater() {
clearInterval(interv);
if (_root.pawsed == false) {
if (ty == "la") {
graph.gotoAndStop((_root.water[na][0] + "-") + _root.water[na][1]);
if (((_root.scene[ex][wy - 1] == "la") && (_root.water[(("blockX" + ex) + "Y") + (wy - 1)] != [10, 10])) && (_root.water[(("blockX" + ex) + "Y") + (wy - 1)] != [9, 9])) {
_root.water[(("blockX" + ex) + "Y") + (wy - 1)] = [9, 9];
}
if ((_root.scene[ex][wy - 1] == undefined) || (_root.waterWalkThroughBlock[_root.scene[ex][wy - 1]] != undefined)) {
_root.scene[ex][wy - 1] = "la";
_root.world[(("blockX" + ex) + "Y") + (wy - 1)].mineBlock(true, false);
_root.water[(("blockX" + ex) + "Y") + (wy - 1)] = [9, 9];
_root.world.attachMovie("block", (("blockX" + ex) + "Y") + (wy - 1), _root.world.getNextHighestDepth());
_root.world[(("blockX" + ex) + "Y") + (wy - 1)]._x = (ex * 30) + 15;
_root.world[(("blockX" + ex) + "Y") + (wy - 1)]._y = ((wy - 1) * -30) - 15;
_root.world[(("blockX" + ex) + "Y") + (wy - 1)].ex = ex;
_root.world[(("blockX" + ex) + "Y") + (wy - 1)].wy = wy - 1;
_root.world[(("blockX" + ex) + "Y") + (wy - 1)].blockType.gotoAndStop("la");
} else {
if ((_root.water[na][0] != 10) || (_root.water[na][1] != 10)) {
if ((_root.water[na][0] != 9) || (_root.water[na][1] != 9)) {
if (_root.water[na][0] > _root.water[na][1]) {
if (Math.min(_root.water[(("blockX" + (ex - 1)) + "Y") + wy][1], 9) != Math.min(_root.water[na][0], 9)) {
delete _root.water[na];
_root.scene[ex][wy] = undefined;
_parent.requestRemove(true);
}
} else if (_root.water[na][0] < _root.water[na][1]) {
if (Math.min(_root.water[(("blockX" + (ex + 1)) + "Y") + wy][0], 9) != Math.min(_root.water[na][1], 9)) {
delete _root.water[na];
_root.scene[ex][wy] = undefined;
_parent.requestRemove(true);
}
} else {
delete _root.water[na];
_root.scene[ex][wy] = undefined;
_parent.requestRemove(true);
}
} else if (_root.scene[ex][wy + 1] != "la") {
delete _root.water[na];
_root.scene[ex][wy] = undefined;
_parent.requestRemove(true);
}
}
if (_root.liquids2[_root.scene[ex][wy - 1]] == undefined) {
if ((((_root.scene[ex - 1][wy] == undefined) || (_root.waterWalkThroughBlock[_root.scene[ex - 1][wy]] != undefined)) && ((_root.water[na][0] - 1) >= 3)) && (_root.water[na][0] <= _root.water[na][1])) {
_root.scene[ex - 1][wy] = "la";
_root.water[(("blockX" + (ex - 1)) + "Y") + wy] = [Math.min(_root.water[na][0], 9) - 1, Math.min(_root.water[na][0], 9)];
_root.world[(("blockX" + (ex - 1)) + "Y") + wy].reload();
_root.world.attachMovie("block", (("blockX" + (ex - 1)) + "Y") + wy, _root.world.getNextHighestDepth());
_root.world[(("blockX" + (ex - 1)) + "Y") + wy]._x = ((ex - 1) * 30) + 15;
_root.world[(("blockX" + (ex - 1)) + "Y") + wy]._y = (wy * -30) - 15;
_root.world[(("blockX" + (ex - 1)) + "Y") + wy].ex = ex - 1;
_root.world[(("blockX" + (ex - 1)) + "Y") + wy].wy = wy;
_root.world[(("blockX" + (ex - 1)) + "Y") + wy].blockType.gotoAndStop("la");
}
if ((((_root.scene[ex + 1][wy] == undefined) || (_root.waterWalkThroughBlock[_root.scene[ex + 1][wy]] != undefined)) && ((_root.water[na][1] - 1) >= 3)) && (_root.water[na][0] >= _root.water[na][1])) {
_root.scene[ex + 1][wy] = "la";
_root.water[(("blockX" + (ex + 1)) + "Y") + wy] = [Math.min(_root.water[na][1], 9), Math.min(_root.water[na][1], 9) - 1];
_root.world[(("blockX" + (ex - 1)) + "Y") + wy].reload();
_root.world.attachMovie("block", (("blockX" + (ex + 1)) + "Y") + wy, _root.world.getNextHighestDepth());
_root.world[(("blockX" + (ex + 1)) + "Y") + wy]._x = ((ex + 1) * 30) + 15;
_root.world[(("blockX" + (ex + 1)) + "Y") + wy]._y = (wy * -30) - 15;
_root.world[(("blockX" + (ex + 1)) + "Y") + wy].ex = ex + 1;
_root.world[(("blockX" + (ex + 1)) + "Y") + wy].wy = wy;
_root.world[(("blockX" + (ex + 1)) + "Y") + wy].blockType.gotoAndStop("la");
}
}
}
} else {
delete _root.water[na];
}
}
}
function inter() {
if (ty == "la") {
interv = setInterval(ifWater, 2000);
}
}
onEnterFrame = function () {
if (ty == "la") {
graph.gotoAndStop((_root.water[na][0] + "-") + _root.water[na][1]);
if (_root.lighting.l["light" + _parent._name] == undefined) {
_root.lighting.l.attachMovie("light3", "light" + _parent._name, _root.lighting.l.getNextHighestDepth());
_root.lighting.l["light" + _parent._name]._x = (_parent._x + _root.world._x) - _root.lighting.l._x;
_root.lighting.l["light" + _parent._name]._y = (_parent._y + _root.world._y) - _root.lighting.l._y;
}
if ((random(70) == 1) && (_root.flammable[_root.scene[ex][wy + 1]])) {
_root.world[(("blockX" + ex) + "Y") + (wy + 1)].gotoAndStop("flame");
}
if (_root.scene[ex][wy + 1] == undefined) {
if ((random(70) == 1) && (_root.flammable[_root.scene[ex][wy + 2]])) {
_root.world[(("blockX" + ex) + "Y") + (wy + 2)].gotoAndStop("flame");
}
}
if ((_root.scene[ex][wy + 1] == undefined) || (_root.scene[ex - 1][wy] == undefined)) {
if ((random(70) == 1) && (_root.flammable[_root.scene[ex - 1][wy + 1]])) {
_root.world[(("blockX" + (ex - 1)) + "Y") + (wy + 1)].gotoAndStop("flame");
}
}
if ((random(70) == 1) && (_root.flammable[_root.scene[ex][wy - 1]])) {
_root.world[(("blockX" + ex) + "Y") + (wy - 1)].gotoAndStop("flame");
}
if (_root.scene[ex][wy - 1] == undefined) {
if ((random(70) == 1) && (_root.flammable[_root.scene[ex][wy - 2]])) {
_root.world[(("blockX" + ex) + "Y") + (wy - 2)].gotoAndStop("flame");
}
}
if ((_root.scene[ex][wy + 1] == undefined) || (_root.scene[ex + 1][wy] == undefined)) {
if ((random(70) == 1) && (_root.flammable[_root.scene[ex + 1][wy + 1]])) {
_root.world[(("blockX" + (ex + 1)) + "Y") + (wy + 1)].gotoAndStop("flame");
}
}
if ((random(70) == 1) && (_root.flammable[_root.scene[ex + 1][wy]])) {
_root.world[(("blockX" + (ex + 1)) + "Y") + wy].gotoAndStop("flame");
}
if (_root.scene[ex + 1][wy] == undefined) {
if ((random(70) == 1) && (_root.flammable[_root.scene[ex + 2][wy]])) {
_root.world[(("blockX" + (ex + 2)) + "Y") + wy].gotoAndStop("flame");
}
}
if ((_root.scene[ex][wy - 1] == undefined) || (_root.scene[ex + 1][wy] == undefined)) {
if ((random(70) == 1) && (_root.flammable[_root.scene[ex + 1][wy - 1]])) {
_root.world[(("blockX" + (ex + 1)) + "Y") + (wy - 1)].gotoAndStop("flame");
}
}
if ((random(70) == 1) && (_root.flammable[_root.scene[ex - 1][wy]])) {
_root.world[(("blockX" + (ex - 1)) + "Y") + wy].gotoAndStop("flame");
}
if (_root.scene[ex - 1][wy] == undefined) {
if ((random(70) == 1) && (_root.flammable[_root.scene[ex - 2][wy]])) {
_root.world[(("blockX" + (ex - 2)) + "Y") + wy].gotoAndStop("flame");
}
}
if ((_root.scene[ex][wy - 1] == undefined) || (_root.scene[ex - 1][wy] == undefined)) {
if ((random(70) == 1) && (_root.flammable[_root.scene[ex - 1][wy - 1]])) {
_root.world[(("blockX" + (ex - 1)) + "Y") + (wy - 1)].gotoAndStop("flame");
}
}
if (random(60) == 0) {
if ((_root.so2.data.qual > 1) && (_root.scene[ex][wy + 1] != "la")) {
part = _parent._parent.attachMovie("lavabubble", "lavabubble" + random(100000), _parent._parent.getNextHighestDepth());
part._x = _parent._x + 15;
part._y = _parent._y - 15;
}
}
if (random(20) == 1) {
if (hitTest(_root.char.hit)) {
_root.ouch(1);
_root.health = _root.health - 1;
}
for (var _local3 in _root.mobs) {
if (hitTest(_root.world[_root.mobs[_local3][1]])) {
_root.world[_root.mobs[_local3][1]].ouch(1);
_root.world[_root.mobs[_local3][1]].health = _root.world[_root.mobs[_local3][1]].health - 1;
}
}
}
}
};
if (_root.water[na] == undefined) {
_root.water[na] = [10, 10];
}
ex = _parent.ex;
wy = _parent.wy;
na = _parent._name;
if (_root.firstTimes[_parent._name] != undefined) {
if ((((((_root.scene[ex][wy + 1] == undefined) || (_root.waterWalkThroughBlock[_root.scene[ex][wy + 1]] != undefined)) && ((_root.scene[ex][wy + 2] == undefined) || (_root.waterWalkThroughBlock[_root.scene[ex][wy + 2]] != undefined))) && ((_root.scene[ex][wy + 3] == undefined) || (_root.waterWalkThroughBlock[_root.scene[ex][wy + 3]] != undefined))) && ((_root.scene[ex][wy + 4] == undefined) || (_root.waterWalkThroughBlock[_root.scene[ex][wy + 4]] != undefined))) && (_root.snowRegions[ex] == true)) {
_root.scene[ex][wy] = "ice";
_parent.requestRemove(false, true);
gotoAndStop ("ice");
}
delete _root.firstTimes[_parent._name];
}
if (_root.scene == 2) {
delete _root.water[na];
_root.requestSound("sizzle", ((-_root.world._x) - _parent._x) + 275, (_root.world._y + _parent._y) - 200);
_root.scene[ex][wy] = undefined;
_parent.requestRemove(true);
}
inter();
Symbol 724 MovieClip Frame 20
ty = "ad";
function ifWater() {
clearInterval(interv);
if (_root.pawsed == false) {
if (ty == "ad") {
graph.gotoAndStop((_root.water[na][0] + "-") + _root.water[na][1]);
if (((_root.scene[ex][wy - 1] == "ad") && (_root.water[(("blockX" + ex) + "Y") + (wy - 1)] != [10, 10])) && (_root.water[(("blockX" + ex) + "Y") + (wy - 1)] != [9, 9])) {
_root.water[(("blockX" + ex) + "Y") + (wy - 1)] = [9, 9];
}
if (((_root.scene[ex][wy - 1] == undefined) || (_root.waterWalkThroughBlock[_root.scene[ex][wy - 1]] != undefined)) || (acidBurn[_root.scene[ex][wy - 1]] != undefined)) {
_root.scene[ex][wy - 1] = "ad";
_root.world[(("blockX" + ex) + "Y") + (wy - 1)].mineBlock(true, false);
_root.water[(("blockX" + ex) + "Y") + (wy - 1)] = [9, 9];
_root.world.attachMovie("block", (("blockX" + ex) + "Y") + (wy - 1), _root.world.getNextHighestDepth());
_root.world[(("blockX" + ex) + "Y") + (wy - 1)]._x = (ex * 30) + 15;
_root.world[(("blockX" + ex) + "Y") + (wy - 1)]._y = ((wy - 1) * -30) - 15;
_root.world[(("blockX" + ex) + "Y") + (wy - 1)].ex = ex;
_root.world[(("blockX" + ex) + "Y") + (wy - 1)].wy = wy - 1;
_root.world[(("blockX" + ex) + "Y") + (wy - 1)].blockType.gotoAndStop("ad");
} else {
if ((_root.water[na][0] != 10) || (_root.water[na][1] != 10)) {
if ((_root.water[na][0] != 9) || (_root.water[na][1] != 9)) {
if (_root.water[na][0] > _root.water[na][1]) {
if (Math.min(_root.water[(("blockX" + (ex - 1)) + "Y") + wy][1], 9) != Math.min(_root.water[na][0], 9)) {
delete _root.water[na];
_root.scene[ex][wy] = undefined;
_parent.requestRemove(true);
}
} else if (_root.water[na][0] < _root.water[na][1]) {
if (Math.min(_root.water[(("blockX" + (ex + 1)) + "Y") + wy][0], 9) != Math.min(_root.water[na][1], 9)) {
delete _root.water[na];
_root.scene[ex][wy] = undefined;
_parent.requestRemove(true);
}
} else {
delete _root.water[na];
_root.scene[ex][wy] = undefined;
_parent.requestRemove(true);
}
} else if (_root.scene[ex][wy + 1] != "ad") {
delete _root.water[na];
_root.scene[ex][wy] = undefined;
_parent.requestRemove(true);
}
}
if (_root.liquids2[_root.scene[ex][wy - 1]] == undefined) {
if (((((_root.scene[ex - 1][wy] == undefined) || (_root.waterWalkThroughBlock[_root.scene[ex - 1][wy]] != undefined)) || (acidBurn[_root.scene[ex][wy - 1]] != undefined)) && ((_root.water[na][0] - 1) >= 3)) && (_root.water[na][0] <= _root.water[na][1])) {
_root.scene[ex - 1][wy] = "ad";
_root.water[(("blockX" + (ex - 1)) + "Y") + wy] = [Math.min(_root.water[na][0], 9) - 1, Math.min(_root.water[na][0], 9)];
_root.world[(("blockX" + (ex - 1)) + "Y") + wy].reload();
_root.world.attachMovie("block", (("blockX" + (ex - 1)) + "Y") + wy, _root.world.getNextHighestDepth());
_root.world[(("blockX" + (ex - 1)) + "Y") + wy]._x = ((ex - 1) * 30) + 15;
_root.world[(("blockX" + (ex - 1)) + "Y") + wy]._y = (wy * -30) - 15;
_root.world[(("blockX" + (ex - 1)) + "Y") + wy].ex = ex - 1;
_root.world[(("blockX" + (ex - 1)) + "Y") + wy].wy = wy;
_root.world[(("blockX" + (ex - 1)) + "Y") + wy].blockType.gotoAndStop("ad");
}
if (((((_root.scene[ex + 1][wy] == undefined) || (_root.waterWalkThroughBlock[_root.scene[ex + 1][wy]] != undefined)) || (acidBurn[_root.scene[ex][wy - 1]] != undefined)) && ((_root.water[na][1] - 1) >= 3)) && (_root.water[na][0] >= _root.water[na][1])) {
_root.scene[ex + 1][wy] = "ad";
_root.water[(("blockX" + (ex + 1)) + "Y") + wy] = [Math.min(_root.water[na][1], 9), Math.min(_root.water[na][1], 9) - 1];
_root.world[(("blockX" + (ex - 1)) + "Y") + wy].reload();
_root.world.attachMovie("block", (("blockX" + (ex + 1)) + "Y") + wy, _root.world.getNextHighestDepth());
_root.world[(("blockX" + (ex + 1)) + "Y") + wy]._x = ((ex + 1) * 30) + 15;
_root.world[(("blockX" + (ex + 1)) + "Y") + wy]._y = (wy * -30) - 15;
_root.world[(("blockX" + (ex + 1)) + "Y") + wy].ex = ex + 1;
_root.world[(("blockX" + (ex + 1)) + "Y") + wy].wy = wy;
_root.world[(("blockX" + (ex + 1)) + "Y") + wy].blockType.gotoAndStop("ad");
}
}
}
} else {
delete _root.water[na];
}
}
}
function inter() {
if (ty == "ad") {
interv = setInterval(ifWater, 200);
}
}
acidBurn = _root.addToObject(["sd", "gv", "dt", "lv", "wd", "wp", "ladder", "ct", "bb"]);
onEnterFrame = function () {
if (ty == "ad") {
graph.gotoAndStop((_root.water[na][0] + "-") + _root.water[na][1]);
if (_root.lighting.l["light" + _parent._name] == undefined) {
_root.lighting.l.attachMovie("light3", "light" + _parent._name, _root.lighting.l.getNextHighestDepth());
_root.lighting.l["light" + _parent._name]._x = (_parent._x + _root.world._x) - _root.lighting.l._x;
_root.lighting.l["light" + _parent._name]._y = (_parent._y + _root.world._y) - _root.lighting.l._y;
}
if (random(20) == 1) {
if (hitTest(_root.char.hit)) {
_root.ouch(1);
_root.health = _root.health - 1;
}
for (var _local3 in _root.mobs) {
if (hitTest(_root.world[_root.mobs[_local3][1]])) {
_root.world[_root.mobs[_local3][1]].ouch(1);
_root.world[_root.mobs[_local3][1]].health = _root.world[_root.mobs[_local3][1]].health - 1;
}
}
}
}
};
ex = _parent.ex;
wy = _parent.wy;
na = _parent._name;
if (_root.firstTimes[_parent._name] != undefined) {
if ((((((_root.scene[ex][wy + 1] == undefined) || (_root.waterWalkThroughBlock[_root.scene[ex][wy + 1]] != undefined)) && ((_root.scene[ex][wy + 2] == undefined) || (_root.waterWalkThroughBlock[_root.scene[ex][wy + 2]] != undefined))) && ((_root.scene[ex][wy + 3] == undefined) || (_root.waterWalkThroughBlock[_root.scene[ex][wy + 3]] != undefined))) && ((_root.scene[ex][wy + 4] == undefined) || (_root.waterWalkThroughBlock[_root.scene[ex][wy + 4]] != undefined))) && (_root.snowRegions[ex] == true)) {
_root.scene[ex][wy] = "ice";
_parent.requestRemove(false, true);
gotoAndStop ("ice");
}
delete _root.firstTimes[_parent._name];
}
if (_root.sceneNum == 2) {
delete _root.water[na];
_root.requestSound("sizzle", ((-_root.world._x) - _parent._x) + 275, (_root.world._y + _parent._y) - 200);
_root.scene[ex][wy] = undefined;
_parent.requestRemove(true);
}
if (_root.water[na] == undefined) {
_root.water[na] = [10, 10];
}
inter();
Symbol 724 MovieClip Frame 21
ty = "sd";
function ifFall() {
if (ty == "sd") {
if (((_root.pawsed == false) && ((_parent._y + _parent._parent._y) < 500)) && ((_parent._y + _parent._parent._y) > -100)) {
clearInterval(interv);
if ((_root.scene[_parent.ex][_parent.wy - 1] == "la") || (_root.scene[_parent.ex][_parent.wy - 1] == "ad")) {
_root.scene[_parent.ex][_parent.wy] = undefined;
_root.requestSound("sizzle", ((-_root.world._x) - _parent._x) + 275, (_root.world._y + _parent._y) - 200);
_root.world[(("blockX" + _parent.ex) + "Y") + (_parent.wy + 1)].blockType.inter();
removeMovieClip(_parent);
}
if (((_root.scene[_parent.ex][_parent.wy - 1] == undefined) || (_root.replaceBlocks[_root.scene[_parent.ex][_parent.wy - 1]] != undefined)) || (_root.scene[_parent.ex][_parent.wy - 1] == "wr")) {
_root.scene[_parent.ex][_parent.wy - 1] = "sd";
if (_root.world[(("blockX" + _parent.ex) + "Y") + (_parent.wy - 1)] == undefined) {
_root.world.attachMovie("block", (("blockX" + _parent.ex) + "Y") + (_parent.wy - 1), _root.world.getNextHighestDepth());
_root.world[(("blockX" + _parent.ex) + "Y") + (_parent.wy - 1)]._x = (_parent.ex * 30) + 15;
_root.world[(("blockX" + _parent.ex) + "Y") + (_parent.wy - 1)]._y = ((_parent.wy - 1) * -30) - 15;
_root.world[(("blockX" + _parent.ex) + "Y") + (_parent.wy - 1)].ex = _parent.ex;
_root.world[(("blockX" + _parent.ex) + "Y") + (_parent.wy - 1)].wy = _parent.wy - 1;
} else {
_root.world[(("blockX" + _parent.ex) + "Y") + (_parent.wy - 1)].blockType.gotoAndStop("sd");
}
_root.world[(("blockX" + _parent.ex) + "Y") + (_parent.wy + 1)].blockType.inter();
_root.scene[_parent.ex][_parent.wy] = undefined;
removeMovieClip(_parent);
}
}
}
}
function inter() {
interv = setInterval(ifFall, 200);
}
inter();
Symbol 724 MovieClip Frame 22
ty = "ct";
function cactiStuff() {
if (_root.pawsed == false) {
if (ty == "ct") {
if (random(2500) == 1) {
if (_root.scene[_parent.ex][_parent.wy + 1] == undefined) {
if (_root.scene[_parent.ex][_parent.wy - 2] != "ct") {
_root.scene[_parent.ex][_parent.wy + 1] = "ct";
_root.world.attachMovie("block", (("blockX" + _parent.ex) + "Y") + (_parent.wy + 1), _root.world.getNextHighestDepth());
_root.world[(("blockX" + _parent.ex) + "Y") + (_parent.wy + 1)]._x = (_parent.ex * 30) + 15;
_root.world[(("blockX" + _parent.ex) + "Y") + (_parent.wy + 1)]._y = ((_parent.wy + 1) * -30) - 15;
_root.world[(("blockX" + _parent.ex) + "Y") + (_parent.wy + 1)].ex = _parent.ex;
_root.world[(("blockX" + _parent.ex) + "Y") + (_parent.wy + 1)].wy = _parent.wy + 1;
}
}
}
if (hitDelay == undefined) {
hitDelay = 0;
}
hitDelay--;
if (_parent.hitTest(_root.char.hit) && (hitDelay <= 0)) {
hitDelay = 20;
_root.health--;
_root.ouch(1);
}
removeCount++;
if (removeCount >= 20) {
removeCount = 0;
}
if (removeCount == 0) {
for (var _local3 in _root.mobs) {
if (_parent.hitTest(_root.world[_root.mobs[_local3][1]])) {
_root.world[_root.mobs[_local3][1]].ouch(1);
_root.world[_root.mobs[_local3][1]].health = _root.world[_root.mobs[_local3][1]].health - 1;
}
}
}
if ((((_root.scene[_parent.ex][_parent.wy - 1] != "sd") && (_root.scene[_parent.ex][_parent.wy - 1] != "ct")) || ((_root.scene[_parent.ex - 1][_parent.wy] != undefined) && (_root.scene[_parent.ex - 1][_parent.wy] != "shrub"))) || ((_root.scene[_parent.ex + 1][_parent.wy] != undefined) && (_root.scene[_parent.ex + 1][_parent.wy] != "shrub"))) {
_root.scene[_parent.ex][_parent.wy] = undefined;
if (_root.firstTimes[_parent._name] == undefined) {
_root.dropNum++;
_root.world.attachMovie("drop", "drop" + _root.dropNum, _root.world.getNextHighestDepth());
_root.world["drop" + _root.dropNum]._x = _parent._x;
_root.world["drop" + _root.dropNum]._y = _parent._y;
_root.world["drop" + _root.dropNum].gotoAndStop(ty);
}
_root.scene[_parent.ex][_parent.wy + 1].cactiStuff();
removeMovieClip(_parent);
}
_root.firstTimes[_parent._name] = undefined;
}
}
}
removeCount = 0;
onEnterFrame = cactiStuff;
Symbol 724 MovieClip Frame 23
ty = "cs";
Symbol 724 MovieClip Frame 24
ty = "ms";
Symbol 724 MovieClip Frame 25
ty = "ob";
Symbol 724 MovieClip Frame 26
ty = "undefined";
removeMovieClip(_parent);
Symbol 724 MovieClip Frame 27
ty = "sl";
function ifGrow() {
_root.reloadArea(_parent.ex - 4, _parent.ex + 4);
delete _root.toGrow[_parent._name];
}
onEnterFrame = function () {
if (_root.scene[_parent.ex][_parent.wy - 1] != "dt") {
_root.scene[_parent.ex][_parent.wy] = undefined;
_root.dropNum++;
_root.world.attachMovie("drop", "drop" + _root.dropNum, _root.world.getNextHighestDepth());
_root.world["drop" + _root.dropNum]._x = _parent._x;
_root.world["drop" + _root.dropNum]._y = _parent._y;
_root.world["drop" + _root.dropNum].gotoAndStop(ty);
removeMovieClip(_parent);
}
};
ifGrow();
_root.toGrow[_parent._name] = [_parent.ex, _parent.wy];
Symbol 724 MovieClip Frame 28
ty = "wp";
Symbol 724 MovieClip Frame 29
ty = "th";
onEnterFrame = function () {
if (((_root.pawsed == false) && ((_parent._y + _root.world._y) < 550)) && ((_parent._y + _root.world._y) > -150)) {
if (ty == "th") {
if (_root.lighting.l["light" + _parent._name] == undefined) {
_root.lighting.l.attachMovie("light1", "light" + _parent._name, _root.lighting.l.getNextHighestDepth());
_root.lighting.l["light" + _parent._name]._x = (_parent._x + _root.world._x) - _root.lighting.l._x;
_root.lighting.l["light" + _parent._name]._y = (_parent._y + _root.world._y) - _root.lighting.l._y;
}
}
if ((random(20) == 1) || (firstRun)) {
if (_root.so2.data.qual > 1) {
part = _parent._parent.attachMovie("smoke", "smoke" + random(100000), _parent._parent.getNextHighestDepth());
part._x = _parent._x;
part._y = _parent._y - 10;
}
firstRun = false;
if (_root.states[_parent._name] == 2) {
torch._xscale = 100;
torch.gotoAndStop(2);
if (((_root.walkThroughBlock[_root.scene[_parent.ex - 1][_parent.wy]] != undefined) || (_root.liquids2[_root.scene[_parent.ex - 1][_parent.wy]] != undefined)) || (_root.scene[_parent.ex - 1][_parent.wy] == undefined)) {
_parent.mineBlock(true, false);
}
} else if (_root.states[_parent._name] == 3) {
torch._xscale = -100;
torch.gotoAndStop(2);
if (((_root.walkThroughBlock[_root.scene[_parent.ex + 1][_parent.wy]] != undefined) || (_root.liquids2[_root.scene[_parent.ex + 1][_parent.wy]] != undefined)) || (_root.scene[_parent.ex + 1][_parent.wy] == undefined)) {
_parent.mineBlock(true, false);
}
} else {
_root.states[_parent._name] = 1;
torch.gotoAndStop(1);
if (((_root.walkThroughBlock[_root.scene[_parent.ex][_parent.wy - 1]] != undefined) || (_root.liquids2[_root.scene[_parent.ex][_parent.wy - 1]] != undefined)) || (_root.scene[_parent.ex][_parent.wy - 1] == undefined)) {
_parent.mineBlock(true, false);
}
}
}
}
};
firstRun = true;
Symbol 724 MovieClip Frame 30
ty = "craft";
function shiftClick() {
if (ty == "craft") {
if (_root.inventory._currentframe == 1) {
_root.inventory.craftCoords = [_parent._x, _parent._y];
_root.inventory.gotoAndStop(3);
}
}
}
Symbol 724 MovieClip Frame 31
ty = "dr1";
function shiftClick() {
if (ty == "dr1") {
_root.scene[_parent.ex][Number(_parent.wy + 1)] = "dr4";
_root.world[(("blockX" + _parent.ex) + "Y") + Number(_parent.wy + 1)].blockType.gotoAndStop("dr4");
_root.scene[_parent.ex][_parent.wy] = "dr3";
_root.requestSound("doorclose", ((-_root.world._x) - _parent._x) + 275, (_root.world._y + _parent._y) - 200);
gotoAndStop ("dr3");
}
}
if ((_root.hasSignal[(("blockX" + (_parent.ex - 1)) + "Y") + (_parent.wy - 1)] || (_root.hasSignal[(("blockX" + _parent.ex) + "Y") + _parent.wy])) || (_root.hasSignal[(("blockX" + (_parent.ex + 1)) + "Y") + (_parent.wy - 1)])) {
hasSignal = true;
} else {
hasSignal = false;
}
onEnterFrame = function () {
if (ty == "dr1") {
if ((_root.hasSignal[(("blockX" + (_parent.ex - 1)) + "Y") + (_parent.wy - 1)] || (_root.hasSignal[(("blockX" + _parent.ex) + "Y") + _parent.wy])) || (_root.hasSignal[(("blockX" + (_parent.ex + 1)) + "Y") + (_parent.wy - 1)])) {
if (hasSignal == false) {
shiftClick();
}
} else if (hasSignal == true) {
shiftClick();
}
}
};
Symbol 724 MovieClip Frame 32
ty = "dr2";
function shiftClick() {
if (ty == "dr2") {
_root.scene[_parent.ex][_parent.wy - 1] = "dr3";
_root.world[(("blockX" + _parent.ex) + "Y") + (_parent.wy - 1)].blockType.gotoAndStop("dr3");
_root.scene[_parent.ex][_parent.wy] = "dr4";
_root.requestSound("doorclose", ((-_root.world._x) - _parent._x) + 275, (_root.world._y + _parent._y) - 200);
gotoAndStop ("dr4");
}
}
if ((_root.hasSignal[(("blockX" + (_parent.ex - 1)) + "Y") + (_parent.wy - 1)] || (_root.hasSignal[(("blockX" + _parent.ex) + "Y") + _parent.wy])) || (_root.hasSignal[(("blockX" + (_parent.ex + 1)) + "Y") + (_parent.wy - 1)])) {
hasSignal = true;
} else {
hasSignal = false;
}
onEnterFrame = function () {
if (ty == "dr2") {
if ((_root.hasSignal[(("blockX" + (_parent.ex - 1)) + "Y") + (_parent.wy - 1)] || (_root.hasSignal[(("blockX" + _parent.ex) + "Y") + _parent.wy])) || (_root.hasSignal[(("blockX" + (_parent.ex + 1)) + "Y") + (_parent.wy - 1)])) {
if (hasSignal == false) {
shiftClick();
}
} else if (hasSignal == true) {
shiftClick();
}
}
};
Symbol 724 MovieClip Frame 33
ty = "dr3";
function shiftClick() {
if (ty == "dr3") {
_root.scene[_parent.ex][Number(_parent.wy + 1)] = "dr2";
_root.world[(("blockX" + _parent.ex) + "Y") + Number(_parent.wy + 1)].blockType.gotoAndStop("dr2");
_root.scene[_parent.ex][_parent.wy] = "dr1";
_root.requestSound("dooropen", ((-_root.world._x) - _parent._x) + 275, (_root.world._y + _parent._y) - 200);
gotoAndStop ("dr1");
}
}
if (_root.states[(("blockX" + _parent.ex) + "Y") + _parent.wy] == 2) {
door._xscale = -100;
}
if ((_root.hasSignal[(("blockX" + (_parent.ex - 1)) + "Y") + (_parent.wy - 1)] || (_root.hasSignal[(("blockX" + _parent.ex) + "Y") + _parent.wy])) || (_root.hasSignal[(("blockX" + (_parent.ex + 1)) + "Y") + (_parent.wy - 1)])) {
hasSignal = true;
} else {
hasSignal = false;
}
onEnterFrame = function () {
if (ty == "dr3") {
if ((_root.hasSignal[(("blockX" + (_parent.ex - 1)) + "Y") + (_parent.wy - 1)] || (_root.hasSignal[(("blockX" + _parent.ex) + "Y") + _parent.wy])) || (_root.hasSignal[(("blockX" + (_parent.ex + 1)) + "Y") + (_parent.wy - 1)])) {
if (hasSignal == false) {
if (_root.achieve == 15) {
_root.achieve = 16;
_root.achieveGet.play();
}
shiftClick();
}
} else if (hasSignal == true) {
if (_root.achieve == 15) {
_root.achieve = 16;
_root.achieveGet.play();
}
shiftClick();
}
}
};
Symbol 724 MovieClip Frame 34
ty = "dr4";
function shiftClick() {
if (ty == "dr4") {
_root.scene[_parent.ex][_parent.wy - 1] = "dr1";
_root.world[(("blockX" + _parent.ex) + "Y") + (_parent.wy - 1)].blockType.gotoAndStop("dr1");
_root.scene[_parent.ex][_parent.wy] = "dr2";
_root.requestSound("dooropen", ((-_root.world._x) - _parent._x) + 275, (_root.world._y + _parent._y) - 200);
gotoAndStop ("dr2");
}
}
if (_root.states[(("blockX" + _parent.ex) + "Y") + (_parent.wy - 1)] == 2) {
door._xscale = -100;
}
if ((_root.hasSignal[(("blockX" + (_parent.ex - 1)) + "Y") + (_parent.wy - 1)] || (_root.hasSignal[(("blockX" + _parent.ex) + "Y") + _parent.wy])) || (_root.hasSignal[(("blockX" + (_parent.ex + 1)) + "Y") + (_parent.wy - 1)])) {
hasSignal = true;
} else {
hasSignal = false;
}
onEnterFrame = function () {
if (ty == "dr4") {
if ((_root.hasSignal[(("blockX" + (_parent.ex - 1)) + "Y") + (_parent.wy - 1)] || (_root.hasSignal[(("blockX" + _parent.ex) + "Y") + _parent.wy])) || (_root.hasSignal[(("blockX" + (_parent.ex + 1)) + "Y") + (_parent.wy - 1)])) {
if (hasSignal == false) {
if (_root.achieve == 15) {
_root.achieve = 16;
_root.achieveGet.play();
}
shiftClick();
}
} else if (hasSignal == true) {
if (_root.achieve == 15) {
_root.achieve = 16;
_root.achieveGet.play();
}
shiftClick();
}
}
};
Symbol 724 MovieClip Frame 35
ty = "oven";
function shiftClick() {
if (ty == "oven") {
if (_root.inventory._currentframe == 1) {
_root.inventory.smelter = _parent._name;
_root.inventory.gotoAndStop(4);
}
}
}
if (_root.toSmelt[_parent._name] == undefined) {
_root.toSmelt[_parent._name] = [undefined, 0, undefined, 0, 0, 0, undefined, 0, 0];
}
Symbol 724 MovieClip Frame 36
ty = "gs";
Symbol 724 MovieClip Frame 37
ty = "sw";
onEnterFrame = function () {
if (_root.pawsed == false) {
if (ty == "sw") {
if (random(2500) == 1) {
if (_root.scene[_parent.ex][_parent.wy + 1] == "wr") {
if (_root.scene[_parent.ex][_parent.wy - 6] != "sw") {
_root.scene[_parent.ex][_parent.wy + 1] = "sw";
_root.world[(("blockX" + _parent.ex) + "Y") + (_parent.wy + 1)].requestRemove(false, true);
}
}
}
if (((_root.scene[_parent.ex][_parent.wy - 1] != "sd") && (_root.scene[_parent.ex][_parent.wy - 1] != "sw")) || ((_root.scene[_parent.ex - 1][_parent.wy] != "wr") || (_root.scene[_parent.ex + 1][_parent.wy] != "wr"))) {
_root.scene[_parent.ex][_parent.wy] = undefined;
if (_root.firstTimes[_parent._name] == undefined) {
_root.dropNum++;
_root.world.attachMovie("drop", "drop" + _root.dropNum, _root.world.getNextHighestDepth());
_root.world["drop" + _root.dropNum]._x = _parent._x;
_root.world["drop" + _root.dropNum]._y = _parent._y;
_root.world["drop" + _root.dropNum].gotoAndStop(ty);
}
_parent.requestRemove(true);
}
_root.firstTimes[_parent._name] = undefined;
}
}
};
Symbol 724 MovieClip Frame 38
ty = "fw1";
_xscale = ((random(2) * 600) - 300);
onEnterFrame = function () {
if (ty.substr(0, 2) == "fw") {
if (_root.scene[_parent.ex][_parent.wy - 1] != "dt") {
_root.scene[_parent.ex][_parent.wy] = undefined;
_root.dropNum++;
_root.world.attachMovie("drop", "drop" + _root.dropNum, _root.world.getNextHighestDepth());
_root.world["drop" + _root.dropNum]._x = _parent._x;
_root.world["drop" + _root.dropNum]._y = _parent._y;
_root.world["drop" + _root.dropNum].gotoAndStop(ty);
_parent.requestRemove(true);
}
}
};
Symbol 724 MovieClip Frame 39
ty = "fw2";
_xscale = ((random(2) * 600) - 300);
onEnterFrame = function () {
if (ty.substr(0, 2) == "fw") {
if (_root.scene[_parent.ex][_parent.wy - 1] != "dt") {
_root.scene[_parent.ex][_parent.wy] = undefined;
_root.dropNum++;
_root.world.attachMovie("drop", "drop" + _root.dropNum, _root.world.getNextHighestDepth());
_root.world["drop" + _root.dropNum]._x = _parent._x;
_root.world["drop" + _root.dropNum]._y = _parent._y;
_root.world["drop" + _root.dropNum].gotoAndStop(ty);
_parent.requestRemove(true);
}
}
};
Symbol 724 MovieClip Frame 40
ty = "ms1";
_xscale = ((random(2) * 600) - 300);
onEnterFrame = function () {
if (ty.substr(0, 2) == "ms") {
if (_root.scene[_parent.ex][_parent.wy - 1] != "dt") {
_root.scene[_parent.ex][_parent.wy] = undefined;
_root.dropNum++;
_root.world.attachMovie("drop", "drop" + _root.dropNum, _root.world.getNextHighestDepth());
_root.world["drop" + _root.dropNum]._x = _parent._x;
_root.world["drop" + _root.dropNum]._y = _parent._y;
_root.world["drop" + _root.dropNum].gotoAndStop(ty);
_parent.requestRemove(true);
}
}
};
Symbol 724 MovieClip Frame 41
ty = "ms2";
_xscale = ((random(2) * 600) - 300);
onEnterFrame = function () {
if (ty.substr(0, 2) == "ms") {
if (_root.scene[_parent.ex][_parent.wy - 1] != "dt") {
_root.scene[_parent.ex][_parent.wy] = undefined;
_root.dropNum++;
_root.world.attachMovie("drop", "drop" + _root.dropNum, _root.world.getNextHighestDepth());
_root.world["drop" + _root.dropNum]._x = _parent._x;
_root.world["drop" + _root.dropNum]._y = _parent._y;
_root.world["drop" + _root.dropNum].gotoAndStop(ty);
_parent.requestRemove(true);
}
}
};
Symbol 724 MovieClip Frame 42
ty = "pk";
Symbol 724 MovieClip Frame 43
ty = "jl";
onEnterFrame = function () {
if (ty == "jl") {
if (((_root.lighting.l["light" + _parent._name] == undefined) && ((_parent._y + _root.world._y) < 550)) && ((_parent._y + _root.world._y) > -150)) {
_root.lighting.l.attachMovie("light1", "light" + _parent._name, _root.lighting.l.getNextHighestDepth());
_root.lighting.l["light" + _parent._name]._x = (_parent._x + _root.world._x) - _root.lighting.l._x;
_root.lighting.l["light" + _parent._name]._y = (_parent._y + _root.world._y) - _root.lighting.l._y;
}
}
};
Symbol 724 MovieClip Frame 44
ty = "cake";
function shiftClick() {
if (ty == "cake") {
if (_root.food <= 900) {
_root.food = _root.food + 100;
if (_root.states[_parent._name] == 7) {
_parent.mineBlock(false, false);
} else {
_root.states[_parent._name]++;
cake.gotoAndStop(_root.states[_parent._name]);
}
}
}
}
if (_root.states[_parent._name] == undefined) {
_root.states[_parent._name] = 1;
}
cake.gotoAndStop(_root.states[_parent._name]);
Symbol 724 MovieClip Frame 45
ty = "coral";
Symbol 724 MovieClip Frame 46
ty = "ladder";
Symbol 724 MovieClip Frame 47
ty = "chest";
function shiftClick() {
if (ty == "chest") {
if (_root.inventory._currentframe == 1) {
_root.inventory.chest = _parent._name;
_root.inventory.gotoAndStop(5);
}
}
}
if (_root.chests[_parent._name] == undefined) {
_root.chests[_parent._name] = new Array(27);
var i = 0;
while (i < 27) {
_root.chests[_parent._name][i] = [undefined, 0, 0];
i++;
}
}
Symbol 724 MovieClip Frame 48
ty = "ib";
Symbol 724 MovieClip Frame 49
ty = "gb";
Symbol 724 MovieClip Frame 50
ty = "db";
Symbol 724 MovieClip Frame 51
ty = "snow";
onEnterFrame = function () {
if ((_root.pawsed == false) && (ty == "snow")) {
if (((_root.scene[_parent.ex][_parent.wy - 1] == undefined) || (_root.walkThroughBlock[_root.scene[_parent.ex][_parent.wy - 1]] != undefined)) || (_root.liquids2[_root.scene[_parent.ex][_parent.wy - 1]] != undefined)) {
_root.scene[_parent.ex][_parent.wy] = undefined;
_parent.requestRemove();
}
}
};
Symbol 724 MovieClip Frame 52
ty = "ice";
Symbol 724 MovieClip Frame 53
ty = "snowblock";
Symbol 724 MovieClip Frame 54
ty = "clothgreen";
Symbol 724 MovieClip Frame 55
ty = "clothwhite";
Symbol 724 MovieClip Frame 56
ty = "clothyellow";
Symbol 724 MovieClip Frame 57
ty = "clothred";
Symbol 724 MovieClip Frame 58
ty = "clothorange";
Symbol 724 MovieClip Frame 59
ty = "bed1";
function shiftClick() {
if (ty == "bed1") {
if (_root.tim >= 50) {
_root.spawnPoint = [_root.so.data.worldX, _root.so.data.worldY];
_root.tim = 2;
_root.day++;
_root.save();
} else {
_root.console.newLine("You can only sleep at night!");
_root.isShiftClickAndContinue = true;
}
}
}
Symbol 724 MovieClip Frame 60
ty = "bed2";
function shiftClick() {
if (ty == "bed2") {
if (_root.tim >= 50) {
_root.spawnPoint = [_root.so.data.worldX, _root.so.data.worldY];
_root.tim = 2;
_root.day++;
_root.save();
} else {
_root.console.newLine("You can only sleep at night!");
_root.isShiftClickAndContinue = true;
}
}
}
Symbol 724 MovieClip Frame 61
ty = "TNT";
function explode() {
if (ty == "TNT") {
tnt.play();
}
}
onEnterFrame = function () {
if ((_root.hasSignal[(("blockX" + (_parent.ex - 1)) + "Y") + (_parent.wy - 1)] || (_root.hasSignal[(("blockX" + _parent.ex) + "Y") + _parent.wy])) || (_root.hasSignal[(("blockX" + (_parent.ex + 1)) + "Y") + (_parent.wy - 1)])) {
explode();
}
if (_root.pawsed) {
tnt.stop();
} else if (_root.playingTNT[_parent._name] != undefined) {
tnt.gotoAndPlay(_root.playingTNT[_parent._name]);
}
};
Symbol 724 MovieClip Frame 62
ty = "rp";
function chekc() {
if (ty == "rp") {
if ((((_root.scene[_parent.ex][_parent.wy + 1] == undefined) || ((_root.walkThroughBlock[_root.scene[_parent.ex][_parent.wy + 1]] != undefined) && (_root.scene[_parent.ex][_parent.wy + 1] != "rp"))) && ((_root.scene[_parent.ex + 1][_parent.wy] == undefined) || (_root.walkThroughBlock[_root.scene[_parent.ex + 1][_parent.wy]] != undefined))) && ((_root.scene[_parent.ex - 1][_parent.wy] == undefined) || (_root.walkThroughBlock[_root.scene[_parent.ex - 1][_parent.wy]] != undefined))) {
_root.world[(("blockX" + _parent.ex) + "Y") + (_parent.wy - 1)].chekc();
_root.scene[_parent.ex][_parent.wy] = undefined;
_root.dropNum++;
_root.world.attachMovie("drop", "drop" + _root.dropNum, _root.world.getNextHighestDepth());
_root.world["drop" + _root.dropNum]._x = _parent._x;
_root.world["drop" + _root.dropNum]._y = _parent._y;
_root.world["drop" + _root.dropNum].gotoAndStop(ty);
_parent.requestRemove();
} else if ((_root.scene[_parent.ex][_parent.wy + 1] == undefined) || ((_root.walkThroughBlock[_root.scene[_parent.ex][_parent.wy + 1]] != undefined) && (_root.scene[_parent.ex][_parent.wy + 1] != "rp"))) {
rope.gotoAndStop(2);
if (((_root.scene[_parent.ex + 1][_parent.wy] == undefined) || (_root.walkThroughBlock[_root.scene[_parent.ex + 1][_parent.wy]] != undefined)) || (_root.liquids2[_root.scene[_parent.ex + 1][_parent.wy]] != undefined)) {
rope._xscale = -100;
} else {
rope._xscale = 100;
}
} else {
rope.gotoAndStop(1);
}
}
}
onEnterFrame = function () {
if (_root.pawsed == false) {
chekc();
}
};
Symbol 724 MovieClip Frame 63
ty = "bb";
function chekc() {
if (ty == "bb") {
if ((_root.scene[_parent.ex][_parent.wy - 1] != "dt") && (_root.scene[_parent.ex][_parent.wy - 1] != "bb")) {
_root.world[(("blockX" + _parent.ex) + "Y") + (_parent.wy + 1)].chekc();
_root.scene[_parent.ex][_parent.wy] = undefined;
if (_root.firstTimes[_parent._name] == undefined) {
_root.dropNum++;
_root.world.attachMovie("drop", "drop" + _root.dropNum, _root.world.getNextHighestDepth());
_root.world["drop" + _root.dropNum]._x = _parent._x;
_root.world["drop" + _root.dropNum]._y = _parent._y - 15;
_root.world["drop" + _root.dropNum].gotoAndStop(ty);
}
_root.scene[_parent.ex][_parent.wy + 1].chekc();
removeMovieClip(_parent);
}
}
}
onEnterFrame = function () {
if (_root.pawsed == false) {
if (ty == "bb") {
if (random(1500) == 1) {
if (_root.scene[_parent.ex][_parent.wy + 1] == undefined) {
if (_root.scene[_parent.ex][_parent.wy - 9] != "bb") {
_root.scene[_parent.ex][_parent.wy + 1] = "bb";
_root.world.attachMovie("block", (("blockX" + _parent.ex) + "Y") + (_parent.wy + 1), _root.world.getNextHighestDepth());
_root.world[(("blockX" + _parent.ex) + "Y") + (_parent.wy + 1)]._x = (_parent.ex * 30) + 15;
_root.world[(("blockX" + _parent.ex) + "Y") + (_parent.wy + 1)]._y = ((_parent.wy + 1) * -30) - 15;
_root.world[(("blockX" + _parent.ex) + "Y") + (_parent.wy + 1)].ex = _parent.ex;
_root.world[(("blockX" + _parent.ex) + "Y") + (_parent.wy + 1)].wy = _parent.wy + 1;
}
}
}
chekc();
_root.firstTimes[_parent._name] = undefined;
}
}
};
Symbol 724 MovieClip Frame 64
ty = "sc";
function chekc() {
if (ty == "sc") {
if (((_root.scene[_parent.ex][_parent.wy - 1] != "sd") && (_root.scene[_parent.ex][_parent.wy - 1] != "dt")) && (_root.scene[_parent.ex][_parent.wy - 1] != "sc")) {
_root.world[(("blockX" + _parent.ex) + "Y") + (_parent.wy + 1)].chekc();
_root.scene[_parent.ex][_parent.wy] = undefined;
if (_root.firstTimes[_parent._name] == undefined) {
_root.dropNum++;
_root.world.attachMovie("drop", "drop" + _root.dropNum, _root.world.getNextHighestDepth());
_root.world["drop" + _root.dropNum]._x = _parent._x;
_root.world["drop" + _root.dropNum]._y = _parent._y - 15;
_root.world["drop" + _root.dropNum].gotoAndStop(ty);
}
removeMovieClip(_parent);
}
}
}
onEnterFrame = function () {
if (_root.pawsed == false) {
if (ty == "sc") {
if (random(1500) == 1) {
if (_root.scene[_parent.ex][_parent.wy + 1] == undefined) {
if (_root.scene[_parent.ex][_parent.wy - 3] != "sc") {
_root.scene[_parent.ex][_parent.wy + 1] = "sc";
_root.world.attachMovie("block", (("blockX" + _parent.ex) + "Y") + (_parent.wy + 1), _root.world.getNextHighestDepth());
_root.world[(("blockX" + _parent.ex) + "Y") + (_parent.wy + 1)]._x = (_parent.ex * 30) + 15;
_root.world[(("blockX" + _parent.ex) + "Y") + (_parent.wy + 1)]._y = ((_parent.wy + 1) * -30) - 15;
_root.world[(("blockX" + _parent.ex) + "Y") + (_parent.wy + 1)].ex = _parent.ex;
_root.world[(("blockX" + _parent.ex) + "Y") + (_parent.wy + 1)].wy = _parent.wy + 1;
}
}
}
chekc();
_root.firstTimes[_parent._name] = undefined;
}
}
};
Symbol 724 MovieClip Frame 65
ty = "moss";
onEnterFrame = function () {
if (_root.pawsed == false) {
if (ty == "moss") {
if ((_root.scene[_parent.ex][_parent.wy - 1] != "r") && (_root.scene[_parent.ex][_parent.wy - 1] != "cs")) {
_root.scene[_parent.ex][_parent.wy] = undefined;
_parent.requestRemove();
}
}
}
};
Symbol 724 MovieClip Frame 66
ty = "cy";
Symbol 724 MovieClip Frame 67
ty = "bricks";
Symbol 724 MovieClip Frame 68
ty = "gv";
function ifFall() {
if (ty == "gv") {
if (((_parent._y + _root.world._y) < 450) && ((_parent._y + _root.world._y) > -50)) {
clearInterval(interv);
if ((_root.scene[_parent.ex][_parent.wy - 1] == "la") || (_root.scene[_parent.ex][_parent.wy - 1] == "ad")) {
_root.scene[_parent.ex][_parent.wy] = undefined;
_root.requestSound("sizzle", ((-_root.world._x) - _parent._x) + 275, (_root.world._y + _parent._y) - 200);
_root.world[(("blockX" + _parent.ex) + "Y") + (_parent.wy + 1)].blockType.inter();
removeMovieClip(_parent);
}
if (((_root.scene[_parent.ex][_parent.wy - 1] == undefined) || (_root.replaceBlocks[_root.scene[_parent.ex][_parent.wy - 1]] != undefined)) || (_root.scene[_parent.ex][_parent.wy - 1] == "wr")) {
_root.scene[_parent.ex][_parent.wy - 1] = "gv";
if (_root.world[(("blockX" + _parent.ex) + "Y") + (_parent.wy - 1)] == undefined) {
_root.world.attachMovie("block", (("blockX" + _parent.ex) + "Y") + (_parent.wy - 1), _root.world.getNextHighestDepth());
_root.world[(("blockX" + _parent.ex) + "Y") + (_parent.wy - 1)]._x = (_parent.ex * 30) + 15;
_root.world[(("blockX" + _parent.ex) + "Y") + (_parent.wy - 1)]._y = ((_parent.wy - 1) * -30) - 15;
_root.world[(("blockX" + _parent.ex) + "Y") + (_parent.wy - 1)].ex = _parent.ex;
_root.world[(("blockX" + _parent.ex) + "Y") + (_parent.wy - 1)].wy = _parent.wy - 1;
} else {
_root.world[(("blockX" + _parent.ex) + "Y") + (_parent.wy - 1)].blockType.gotoAndStop("gv");
}
_root.world[(("blockX" + _parent.ex) + "Y") + (_parent.wy + 1)].blockType.inter();
_root.scene[_parent.ex][_parent.wy] = undefined;
removeMovieClip(_parent);
}
}
}
}
function inter() {
interv = setInterval(ifFall, 200);
}
inter();
Symbol 724 MovieClip Frame 69
ty = "rsd";
function updateSignal() {
if (_root.redstone[_parent._name][0] != Number(_root.redstone[_parent._name][0])) {
_root.redstone[_parent._name][0] = 0;
}
num = _root.redstone[_parent._name][0];
if (_root.scene[_parent.ex - 1][_parent.wy + 1] == "rsd") {
if (_root.scene[_parent.ex + 1][_parent.wy + 1] == "rsd") {
goto = 4;
} else {
goto = 2;
}
} else if (_root.scene[_parent.ex + 1][_parent.wy + 1] == "rsd") {
goto = 3;
} else {
goto = 1;
}
fS = false;
if ((_root.hasSignal[(("blockX" + (_parent.ex - 1)) + "Y") + (_parent.wy - 2)][0] > 1) && (_root.hasSignal[(("blockX" + (_parent.ex - 1)) + "Y") + (_parent.wy - 2)][1] != "r")) {
red1 = (("blockX" + (_parent.ex - 1)) + "Y") + (_parent.wy - 2);
} else if (((_root.hasSignal[(("blockX" + (_parent.ex - 1)) + "Y") + (_parent.wy - 1)][0] > 1) && (_root.hasSignal[(("blockX" + (_parent.ex - 1)) + "Y") + (_parent.wy - 1)][1] != "r")) && ((_root.scene[_parent.ex][_parent.wy + 1] == undefined) || (_root.walkThroughBlock[_root.scene[_parent.ex][_parent.wy + 1]] != undefined))) {
red1 = (("blockX" + (_parent.ex - 1)) + "Y") + (_parent.wy - 1);
} else if (((_root.hasSignal[(("blockX" + (_parent.ex - 1)) + "Y") + _parent.wy][0] > 1) && (_root.hasSignal[(("blockX" + (_parent.ex - 1)) + "Y") + _parent.wy][1] != "r")) && ((_root.scene[_parent.ex][_parent.wy + 1] == undefined) || (_root.walkThroughBlock[_root.scene[_parent.ex][_parent.wy + 1]] != undefined))) {
red1 = (("blockX" + (_parent.ex - 1)) + "Y") + _parent.wy;
}
if ((_root.hasSignal[(("blockX" + (_parent.ex + 1)) + "Y") + (_parent.wy - 2)][0] > 1) && (_root.hasSignal[(("blockX" + (_parent.ex + 1)) + "Y") + (_parent.wy - 2)][1] != "l")) {
red2 = (("blockX" + (_parent.ex + 1)) + "Y") + (_parent.wy - 2);
} else if (((_root.hasSignal[(("blockX" + (_parent.ex + 1)) + "Y") + (_parent.wy - 1)][0] > 1) && (_root.hasSignal[(("blockX" + (_parent.ex + 1)) + "Y") + (_parent.wy - 1)][1] != "l")) && ((_root.scene[_parent.ex][_parent.wy + 1] == undefined) || (_root.walkThroughBlock[_root.scene[_parent.ex][_parent.wy + 1]] != undefined))) {
red2 = (("blockX" + (_parent.ex + 1)) + "Y") + (_parent.wy - 1);
} else if (((_root.hasSignal[(("blockX" + (_parent.ex + 1)) + "Y") + _parent.wy][0] > 1) && (_root.hasSignal[(("blockX" + (_parent.ex + 1)) + "Y") + _parent.wy][1] != "l")) && ((_root.scene[_parent.ex][_parent.wy + 1] == undefined) || (_root.walkThroughBlock[_root.scene[_parent.ex][_parent.wy + 1]] != undefined))) {
red2 = (("blockX" + (_parent.ex + 1)) + "Y") + _parent.wy;
}
if ((_root.hasSignal[red1][0] > 1) && (_root.hasSignal[red1][1] != "r")) {
_root.hasSignal[(("blockX" + _parent.ex) + "Y") + (_parent.wy - 1)] = [_root.hasSignal[red1][0] - 1, "l"];
fS = _root.hasSignal[(("blockX" + _parent.ex) + "Y") + (_parent.wy - 1)][0];
}
if (((fS < _root.hasSignal[red2][0]) && (_root.hasSignal[red2][0] > 1)) && (_root.hasSignal[red2][1] != "l")) {
_root.hasSignal[(("blockX" + _parent.ex) + "Y") + (_parent.wy - 1)] = [_root.hasSignal[red2][0] - 1, "r"];
fS = _root.hasSignal[(("blockX" + _parent.ex) + "Y") + (_parent.wy - 1)][0];
}
if (fS == false) {
delete _root.hasSignal[(("blockX" + _parent.ex) + "Y") + (_parent.wy - 1)];
}
stat.gotoAndStop(goto + ((fS != false) * 4));
}
onEnterFrame = function () {
if ((_root.walkThroughBlock[_root.scene[_parent.ex][_parent.wy - 1]] != undefined) || (_root.scene[_parent.ex][_parent.wy - 1] == undefined)) {
_parent.mineBlock(true, false);
}
if (!_root.pawsed) {
updateSignal();
}
};
if (_root.redstone[_parent._name] == undefined) {
_root.redstone[_parent._name] = [0, "l"];
}
Symbol 724 MovieClip Frame 70
ty = "rstorch";
function updateSignal() {
giveSignalToUpper = false;
abortSignal = false;
if (_root.states[_parent._name] == 2) {
torch._xscale = 100;
torch.gotoAndStop(3);
dir = "l";
if (_root.hasSignal[(("blockX" + (_parent.ex - 1)) + "Y") + _parent.wy] && (_root.scene[_parent.ex - 1][_parent.wy + 1] != "rstorch")) {
torch.gotoAndStop(4);
abortSignal = true;
}
if (((_root.walkThroughBlock[_root.scene[_parent.ex - 1][_parent.wy]] != undefined) || (_root.liquids2[_root.scene[_parent.ex - 1][_parent.wy]] != undefined)) || (_root.scene[_parent.ex - 1][_parent.wy] == undefined)) {
_parent.mineBlock(true, false);
}
} else if (_root.states[_parent._name] == 3) {
torch._xscale = -100;
torch.gotoAndStop(3);
dir = "r";
if (_root.hasSignal[(("blockX" + (_parent.ex + 1)) + "Y") + _parent.wy] && (_root.scene[_parent.ex + 1][_parent.wy + 1] != "rstorch")) {
torch.gotoAndStop(4);
abortSignal = true;
}
if (((_root.walkThroughBlock[_root.scene[_parent.ex + 1][_parent.wy]] != undefined) || (_root.liquids2[_root.scene[_parent.ex + 1][_parent.wy]] != undefined)) || (_root.scene[_parent.ex + 1][_parent.wy] == undefined)) {
_parent.mineBlock(true, false);
}
} else if (_root.states[_parent._name] == 1) {
torch.gotoAndStop(1);
dir = "";
if (_root.hasSignal[(("blockX" + _parent.ex) + "Y") + (_parent.wy - 3)] && (_root.scene[_parent.ex][_parent.wy - 2] == "rstorch")) {
torch.gotoAndStop(2);
abortSignal = true;
}
if (((_root.walkThroughBlock[_root.scene[_parent.ex][_parent.wy - 1]] != undefined) || (_root.liquids2[_root.scene[_parent.ex][_parent.wy - 1]] != undefined)) || (_root.scene[_parent.ex][_parent.wy - 1] == undefined)) {
_parent.mineBlock(true, false);
}
torch._xscale = 100;
}
if (abortSignal == true) {
delete _root.hasSignal[(("blockX" + _parent.ex) + "Y") + (_parent.wy - 1)];
delete _root.hasSignal[(("blockX" + _parent.ex) + "Y") + (_parent.wy + 1)];
} else {
_root.hasSignal[(("blockX" + _parent.ex) + "Y") + (_parent.wy - 1)] = [11, dir];
if ((_root.scene[_parent.ex][_parent.wy + 1] != undefined) && (_root.walkThroughBlock[_root.scene[_parent.ex][_parent.wy + 1]] == undefined)) {
_root.hasSignal[(("blockX" + _parent.ex) + "Y") + (_parent.wy + 1)] = [11, ""];
} else {
delete _root.hasSignal[(("blockX" + _parent.ex) + "Y") + (_parent.wy + 1)];
}
}
}
onEnterFrame = function () {
if (((_root.pawsed == false) && ((_parent._y + _root.world._y) < 550)) && ((_parent._y + _root.world._y) > -150)) {
if (ty == "rstorch") {
if ((torch._currentframe == 1) || (torch._currentframe == 3)) {
if (((_root.lighting.l["light" + _parent._name] == undefined) && ((_parent._y + _root.world._y) < 550)) && ((_parent._y + _root.world._y) > -150)) {
_root.lighting.l.attachMovie("light3", "light" + _parent._name, _root.lighting.l.getNextHighestDepth());
_root.lighting.l["light" + _parent._name]._x = (_parent._x + _root.world._x) - _root.lighting.l._x;
_root.lighting.l["light" + _parent._name]._y = (_parent._y + _root.world._y) - _root.lighting.l._y;
}
}
}
}
if (!_root.pawsed) {
updateSignal();
}
};
Symbol 724 MovieClip Frame 71
ty = "button";
function shiftClick() {
if (ty == "button") {
timer = 10;
if (_root.states[_parent._name] != 1) {
_root.hasSignal[giveTo] = [11, ""];
}
_root.hasSignal[(("blockX" + _parent.ex) + "Y") + (_parent.wy - 1)] = [11, ""];
_root.requestSound("on", ((-_root.world._x) - _parent._x) + 275, (_root.world._y + _parent._y) - 200);
}
}
if (_root.states[_parent._name + "_2"] != undefined) {
timer = _root.states[_parent._name + "_2"];
}
onEnterFrame = function () {
if (!_root.pawsed) {
if (timer > 0) {
timer--;
butto.gotoAndStop(2);
} else {
butto.gotoAndStop(1);
}
if (timer == 0) {
timer = undefined;
delete _root.hasSignal[(("blockX" + _parent.ex) + "Y") + (_parent.wy - 1)];
delete _root.hasSignal[giveTo];
_root.requestSound("off", ((-_root.world._x) - _parent._x) + 275, (_root.world._y + _parent._y) - 200);
}
_root.states[_parent._name + "_2"] = timer;
if ((random(20) == 1) || (firstRun)) {
firstRun = false;
if (_root.states[_parent._name] == 2) {
giveTo = (("blockX" + (_parent.ex - 1)) + "Y") + _parent.wy;
torch._xscale = 100;
_rotation = 90;
if (((_root.walkThroughBlock[_root.scene[_parent.ex - 1][_parent.wy]] != undefined) || (_root.liquids2[_root.scene[_parent.ex - 1][_parent.wy]] != undefined)) || (_root.scene[_parent.ex - 1][_parent.wy] == undefined)) {
_parent.mineBlock(true, false);
}
} else if (_root.states[_parent._name] == 3) {
giveTo = (("blockX" + (_parent.ex - 1)) + "Y") + _parent.wy;
torch._xscale = -100;
_rotation = -90;
if (((_root.walkThroughBlock[_root.scene[_parent.ex + 1][_parent.wy]] != undefined) || (_root.liquids2[_root.scene[_parent.ex + 1][_parent.wy]] != undefined)) || (_root.scene[_parent.ex + 1][_parent.wy] == undefined)) {
_parent.mineBlock(true, false);
}
} else {
_root.states[_parent._name] = 1;
_rotation = 0;
if (((_root.walkThroughBlock[_root.scene[_parent.ex][_parent.wy - 1]] != undefined) || (_root.liquids2[_root.scene[_parent.ex][_parent.wy - 1]] != undefined)) || (_root.scene[_parent.ex][_parent.wy - 1] == undefined)) {
_parent.mineBlock(true, false);
}
}
}
}
};
firstRun = true;
Symbol 724 MovieClip Frame 72
ty = "pp";
onEnterFrame = function () {
if (!_root.pawsed) {
_rotation = 0;
if (((_root.walkThroughBlock[_root.scene[_parent.ex][_parent.wy - 1]] != undefined) || (_root.liquids2[_root.scene[_parent.ex][_parent.wy - 1]] != undefined)) || (_root.scene[_parent.ex][_parent.wy - 1] == undefined)) {
_parent.mineBlock(true, false);
}
lastFoundHit = foundHit;
foundHit = false;
if (_root.char.hitTest(_parent._x + _parent._parent._x, _parent._y + _parent._parent._y)) {
foundHit = true;
}
if (foundHit == false) {
for (var _local4 in _root.mobs) {
if (this.hitTest(_root.world[_root.mobs[_local4][1]])) {
foundHit = true;
}
}
}
if (foundHit) {
if ((lastFoundHit != foundHit) && (!firstRun)) {
_root.requestSound("off", ((-_root.world._x) - _parent._x) + 275, (_root.world._y + _parent._y) - 200);
}
butto.gotoAndStop(2);
_root.hasSignal[(("blockX" + _parent.ex) + "Y") + (_parent.wy - 1)] = [11, ""];
} else {
if ((lastFoundHit != foundHit) && (!firstRun)) {
_root.requestSound("on", ((-_root.world._x) - _parent._x) + 275, (_root.world._y + _parent._y) - 200);
}
butto.gotoAndStop(1);
delete _root.hasSignal[(("blockX" + _parent.ex) + "Y") + (_parent.wy - 1)];
}
firstRun = false;
}
};
firstRun = true;
Symbol 724 MovieClip Frame 73
ty = "lever";
function shiftClick() {
if (ty == "lever") {
if (state1 == 1) {
state1 = 0;
} else {
state1 = 1;
}
_root.requestSound("on", ((-_root.world._x) - _parent._x) + 275, (_root.world._y + _parent._y) - 200);
}
}
if (_root.states[_parent._name + "_2"] != undefined) {
state1 = _root.states[_parent._name + "_2"];
} else {
state1 = 0;
}
onEnterFrame = function () {
if (!_root.pawsed) {
lever.gotoAndStop(state1 + 1);
_root.states[_parent._name + "_2"] = state1;
if ((random(20) == 1) || (firstRun)) {
firstRun = false;
if (_root.states[_parent._name] == 2) {
giveTo = (("blockX" + (_parent.ex - 1)) + "Y") + _parent.wy;
lever._yscale = 100;
lever._xscale = -100;
_rotation = 90;
if (((_root.walkThroughBlock[_root.scene[_parent.ex - 1][_parent.wy]] != undefined) || (_root.liquids2[_root.scene[_parent.ex - 1][_parent.wy]] != undefined)) || (_root.scene[_parent.ex - 1][_parent.wy] == undefined)) {
_parent.mineBlock(true, false);
}
} else if (_root.states[_parent._name] == 3) {
giveTo = (("blockX" + (_parent.ex - 1)) + "Y") + _parent.wy;
lever._yscale = 100;
lever._xscale = 100;
_rotation = -90;
if (((_root.walkThroughBlock[_root.scene[_parent.ex + 1][_parent.wy]] != undefined) || (_root.liquids2[_root.scene[_parent.ex + 1][_parent.wy]] != undefined)) || (_root.scene[_parent.ex + 1][_parent.wy] == undefined)) {
_parent.mineBlock(true, false);
}
} else {
_root.states[_parent._name] = 1;
_rotation = 0;
lever._xscale = 100;
if (((_root.walkThroughBlock[_root.scene[_parent.ex][_parent.wy - 1]] != undefined) || (_root.liquids2[_root.scene[_parent.ex][_parent.wy - 1]] != undefined)) || (_root.scene[_parent.ex][_parent.wy - 1] == undefined)) {
_parent.mineBlock(true, false);
}
}
}
if (state1 == 1) {
if (_root.states[_parent._name] != 1) {
_root.hasSignal[giveTo] = [11, ""];
}
_root.hasSignal[(("blockX" + _parent.ex) + "Y") + (_parent.wy - 1)] = [11, ""];
} else {
delete _root.hasSignal[(("blockX" + _parent.ex) + "Y") + (_parent.wy - 1)];
delete _root.hasSignal[giveTo];
}
}
};
firstRun = true;
Symbol 724 MovieClip Frame 74
ty = "light";
onEnterFrame = function () {
if (ty == "light") {
if ((_root.hasSignal[(("blockX" + (_parent.ex - 1)) + "Y") + (_parent.wy - 1)] || (_root.hasSignal[(("blockX" + (_parent.ex + 1)) + "Y") + (_parent.wy - 1)])) || (_root.hasSignal[(("blockX" + _parent.ex) + "Y") + (_parent.wy - 1)])) {
_root.states[_parent._name] = 1;
if (((_root.lighting.l["light" + _parent._name] == undefined) && ((_parent._y + _root.world._y) < 450)) && ((_parent._y + _root.world._y) > -50)) {
_root.lighting.l.attachMovie("light1", "light" + _parent._name, _root.lighting.l.getNextHighestDepth());
_root.lighting.l["light" + _parent._name]._x = (_parent._x + _root.world._x) - _root.lighting.l._x;
_root.lighting.l["light" + _parent._name]._y = (_parent._y + _root.world._y) - _root.lighting.l._y;
}
} else {
_root.states[_parent._name] = 0;
removeMovieClip(_root.lighting["light" + _parent._name]);
}
}
};
Symbol 724 MovieClip Frame 75
ty = "mobSpawner";
onEnterFrame = function () {
if (ty == "mobSpawner") {
if (!_root.pawsed) {
if (((_parent._y + _root.world._y) < 450) && ((_parent._y + _root.world._y) > -50)) {
if (((_root.lighting.l["light" + _parent._name] == undefined) && ((_parent._y + _root.world._y) < 450)) && ((_parent._y + _root.world._y) > -50)) {
_root.lighting.l.attachMovie("light2", "light" + _parent._name, _root.lighting.l.getNextHighestDepth());
_root.lighting.l["light" + _parent._name]._x = (_parent._x + _root.world._x) - _root.lighting.l._x;
_root.lighting.l["light" + _parent._name]._y = (_parent._y + _root.world._y) - _root.lighting.l._y;
}
}
if (random(4000) == 1) {
if (_root.states[_parent._name] == undefined) {
_root.states[_parent._name] = new Array();
} else {
for (var _local3 in _root.states[_parent._name]) {
if (_root.mobs[_root.states[_parent._name][_local3]] == undefined) {
_root.states[_parent._name].splice(_local3, 1);
}
}
}
if ((random(3) == 1) && (_root.states[_parent._name].length < 3)) {
if (((_root.scene[_parent.ex][_parent.wy + 1] == undefined) || (_root.walkThroughBlock[_root.scene[_parent.ex][_parent.wy + 1]] != undefined)) && ((_root.scene[_parent.ex][_parent.wy + 2] == undefined) || (_root.walkThroughBlock[_root.scene[_parent.ex][_parent.wy + 2]] != undefined))) {
spawnArea = [_parent.ex, _parent.wy + 1];
} else if (((_root.scene[_parent.ex + 1][_parent.wy] == undefined) || (_root.walkThroughBlock[_root.scene[_parent.ex + 1][_parent.wy]] != undefined)) && ((_root.scene[_parent.ex + 1][_parent.wy + 1] == undefined) || (_root.walkThroughBlock[_root.scene[_parent.ex + 1][_parent.wy + 1]] != undefined))) {
spawnArea = [_parent.ex + 1, _parent.wy];
} else if (((_root.scene[_parent.ex - 1][_parent.wy] == undefined) || (_root.walkThroughBlock[_root.scene[_parent.ex - 1][_parent.wy]] != undefined)) && ((_root.scene[_parent.ex - 1][_parent.wy + 1] == undefined) || (_root.walkThroughBlock[_root.scene[_parent.ex - 1][_parent.wy + 1]] != undefined))) {
spawnArea = [_parent.ex - 1, _parent.wy];
} else if (((_root.scene[_parent.ex + 2][_parent.wy] == undefined) || (_root.walkThroughBlock[_root.scene[_parent.ex + 2][_parent.wy]] != undefined)) && ((_root.scene[_parent.ex + 2][_parent.wy + 1] == undefined) || (_root.walkThroughBlock[_root.scene[_parent.ex + 2][_parent.wy + 1]] != undefined))) {
spawnArea = [_parent.ex + 2, _parent.wy];
} else if (((_root.scene[_parent.ex - 2][_parent.wy] == undefined) || (_root.walkThroughBlock[_root.scene[_parent.ex - 2][_parent.wy]] != undefined)) && ((_root.scene[_parent.ex - 2][_parent.wy + 1] == undefined) || (_root.walkThroughBlock[_root.scene[_parent.ex - 2][_parent.wy + 1]] != undefined))) {
spawnArea = [_parent.ex - 2, _parent.wy];
} else {
spawnArea = undefined;
}
if (spawnArea != undefined) {
_root.zombieNum++;
_root.mobNum++;
_root.lastZombie = _root.world.attachMovie("zombie", "zombie" + _root.mobNum, _root.world.getNextHighestDepth());
_root.mobs[_root.mobNum] = ["zombie", "zombie" + _root.mobNum, _root.sceneNum, ((spawnArea[0] + 1) * 30) - 15, ((-(spawnArea[1] + 1)) * 30) + 30, 0, 0, 20, false, false, false];
_root.lastZombie.mobNumber = _root.mobNum;
_root.states[_parent._name].push(_root.mobNum);
}
} else if ((random(3) == 1) && (_root.states[_parent._name].length < 3)) {
if (((_root.scene[_parent.ex][_parent.wy + 1] == undefined) || (_root.walkThroughBlock[_root.scene[_parent.ex][_parent.wy + 1]] != undefined)) && ((_root.scene[_parent.ex][_parent.wy + 2] == undefined) || (_root.walkThroughBlock[_root.scene[_parent.ex][_parent.wy + 2]] != undefined))) {
spawnArea = [_parent.ex, _parent.wy + 1];
} else if (((_root.scene[_parent.ex + 1][_parent.wy] == undefined) || (_root.walkThroughBlock[_root.scene[_parent.ex + 1][_parent.wy]] != undefined)) && ((_root.scene[_parent.ex + 1][_parent.wy + 1] == undefined) || (_root.walkThroughBlock[_root.scene[_parent.ex + 1][_parent.wy + 1]] != undefined))) {
spawnArea = [_parent.ex + 1, _parent.wy];
} else if (((_root.scene[_parent.ex - 1][_parent.wy] == undefined) || (_root.walkThroughBlock[_root.scene[_parent.ex - 1][_parent.wy]] != undefined)) && ((_root.scene[_parent.ex - 1][_parent.wy + 1] == undefined) || (_root.walkThroughBlock[_root.scene[_parent.ex - 1][_parent.wy + 1]] != undefined))) {
spawnArea = [_parent.ex - 1, _parent.wy];
} else if (((_root.scene[_parent.ex + 2][_parent.wy] == undefined) || (_root.walkThroughBlock[_root.scene[_parent.ex + 2][_parent.wy]] != undefined)) && ((_root.scene[_parent.ex + 2][_parent.wy + 1] == undefined) || (_root.walkThroughBlock[_root.scene[_parent.ex + 2][_parent.wy + 1]] != undefined))) {
spawnArea = [_parent.ex + 2, _parent.wy];
} else if (((_root.scene[_parent.ex - 2][_parent.wy] == undefined) || (_root.walkThroughBlock[_root.scene[_parent.ex - 2][_parent.wy]] != undefined)) && ((_root.scene[_parent.ex - 2][_parent.wy + 1] == undefined) || (_root.walkThroughBlock[_root.scene[_parent.ex - 2][_parent.wy + 1]] != undefined))) {
spawnArea = [_parent.ex - 2, _parent.wy];
} else {
spawnArea = undefined;
}
if (spawnArea != undefined) {
_root.creeperNum++;
_root.mobNum++;
_root.lastCreeper = _root.world.attachMovie("creeper", "creeper" + _root.mobNum, _root.world.getNextHighestDepth());
_root.mobs[_root.mobNum] = ["creeper", "creeper" + _root.mobNum, _root.sceneNum, ((spawnArea[0] + 1) * 30) - 15, ((-(spawnArea[1] + 1)) * 30) + 30, 0, 0, 20, false, false, false];
_root.lastCreeper.mobNumber = _root.mobNum;
_root.states[_parent._name].push(_root.mobNum);
}
}
}
}
}
};
Symbol 724 MovieClip Frame 76
ty = "ortorch";
onEnterFrame = function () {
if (((_root.pawsed == false) && ((_parent._y + _root.world._y) < 450)) && ((_parent._y + _root.world._y) > -50)) {
if (ty == "ortorch") {
if (((_root.lighting.l["light" + _parent._name] == undefined) && ((_parent._y + _root.world._y) < 450)) && ((_parent._y + _root.world._y) > -50)) {
_root.lighting.l.attachMovie("light4", "light" + _parent._name, _root.lighting.l.getNextHighestDepth());
_root.lighting.l["light" + _parent._name]._x = (_parent._x + _root.world._x) - _root.lighting.l._x;
_root.lighting.l["light" + _parent._name]._y = (_parent._y + _root.world._y) - _root.lighting.l._y;
}
}
if ((random(20) == 1) || (firstRun)) {
firstRun = false;
if (_root.states[_parent._name] == 2) {
torch._xscale = 100;
torch.gotoAndStop(2);
if (((_root.walkThroughBlock[_root.scene[_parent.ex - 1][_parent.wy]] != undefined) || (_root.liquids2[_root.scene[_parent.ex - 1][_parent.wy]] != undefined)) || (_root.scene[_parent.ex - 1][_parent.wy] == undefined)) {
_parent.mineBlock(true, false);
}
} else if (_root.states[_parent._name] == 3) {
torch._xscale = -100;
torch.gotoAndStop(2);
if (((_root.walkThroughBlock[_root.scene[_parent.ex + 1][_parent.wy]] != undefined) || (_root.liquids2[_root.scene[_parent.ex + 1][_parent.wy]] != undefined)) || (_root.scene[_parent.ex + 1][_parent.wy] == undefined)) {
_parent.mineBlock(true, false);
}
} else {
_root.states[_parent._name] = 1;
torch.gotoAndStop(1);
if (((_root.walkThroughBlock[_root.scene[_parent.ex][_parent.wy - 1]] != undefined) || (_root.liquids2[_root.scene[_parent.ex][_parent.wy - 1]] != undefined)) || (_root.scene[_parent.ex][_parent.wy - 1] == undefined)) {
_parent.mineBlock(true, false);
}
}
}
}
};
firstRun = true;
Symbol 724 MovieClip Frame 77
ty = "portal";
q = 0;
if (this.hitTest(_root.char.hit)) {
startedOutHitting = true;
}
onEnterFrame = function () {
if (_root.so2.data.qual > 1) {
part = _parent._parent.attachMovie("mPart", "mPart" + random(100000), _parent._parent.getNextHighestDepth());
part._x = _parent._x;
part._y = _parent._y;
part.portal = true;
}
if (this.hitTest(_root.char.hit)) {
if (startedOutHitting != true) {
q++;
if (q >= 50) {
_root.usePortal();
}
}
} else {
startedOutHitting = false;
q = 0;
}
};
Symbol 724 MovieClip Frame 78
ty = "n";
if ((_root.scene[_parent.ex][_parent.wy + 1] == undefined) && (random(20) == 1)) {
_root.onFire[_parent._name] = true;
_parent.gotoAndStop("flame");
}
Symbol 724 MovieClip Frame 79
ty = "nb";
Symbol 724 MovieClip Frame 80
ty = "portalstone";
function shiftClick() {
if (_root.selectedInventoryItemType == "fas") {
if (((((((_root.scene[ex + 1][wy] == "portalstone") && (_root.scene[(ex + 1) + 1][wy] == "portalstone")) && (_root.scene[(ex + 1) + 1][wy + 1] == "portalstone")) && (_root.scene[ex - 1][wy] == "portalstone")) && (_root.scene[ex - 1][wy + 1] == "portalstone")) && (_root.scene[ex][wy + 1] == undefined)) && (_root.scene[ex + 1][wy + 1] == undefined)) {
_root.scene[ex][wy + 1] = "portal";
_root.scene[ex + 1][wy + 1] = "portal";
if (_root.achieve == 14) {
_root.achieve = 15;
_root.achieveGet.play();
}
delete _root.onFire[_parent._name];
_parent.gotoAndStop(1);
_root.world.attachMovie("block", (("blockX" + ex) + "Y") + (wy + 1), _root.world.getNextHighestDepth());
_root.world[(("blockX" + ex) + "Y") + (wy + 1)]._x = (ex * 30) + 15;
_root.world[(("blockX" + ex) + "Y") + (wy + 1)]._y = ((wy + 1) * -30) - 15;
_root.world[(("blockX" + ex) + "Y") + (wy + 1)].ex = ex;
_root.world[(("blockX" + ex) + "Y") + (wy + 1)].wy = wy + 1;
_root.world.attachMovie("block", (("blockX" + (ex + 1)) + "Y") + (wy + 1), _root.world.getNextHighestDepth());
_root.world[(("blockX" + (ex + 1)) + "Y") + (wy + 1)]._x = ((ex + 1) * 30) + 15;
_root.world[(("blockX" + (ex + 1)) + "Y") + (wy + 1)]._y = ((wy + 1) * -30) - 15;
_root.world[(("blockX" + (ex + 1)) + "Y") + (wy + 1)].ex = ex + 1;
_root.world[(("blockX" + (ex + 1)) + "Y") + (wy + 1)].wy = wy + 1;
} else if (((((((_root.scene[ex - 1][wy] == "portalstone") && (_root.scene[(ex - 1) - 1][wy] == "portalstone")) && (_root.scene[(ex - 1) - 1][wy + 1] == "portalstone")) && (_root.scene[ex + 1][wy] == "portalstone")) && (_root.scene[ex + 1][wy + 1] == "portalstone")) && (_root.scene[ex][wy + 1] == undefined)) && (_root.scene[ex - 1][wy + 1] == undefined)) {
if (_root.achieve == 14) {
_root.achieve = 15;
_root.achieveGet.play();
}
_root.scene[ex][wy + 1] = "portal";
_root.scene[ex - 1][wy + 1] = "portal";
delete _root.onFire[_parent._name];
_parent.gotoAndStop(1);
_root.world.attachMovie("block", (("blockX" + ex) + "Y") + (wy + 1), _root.world.getNextHighestDepth());
_root.world[(("blockX" + ex) + "Y") + (wy + 1)]._x = (ex * 30) + 15;
_root.world[(("blockX" + ex) + "Y") + (wy + 1)]._y = ((wy + 1) * -30) - 15;
_root.world[(("blockX" + ex) + "Y") + (wy + 1)].ex = ex;
_root.world[(("blockX" + ex) + "Y") + (wy + 1)].wy = wy + 1;
_root.world.attachMovie("block", (("blockX" + (ex - 1)) + "Y") + (wy + 1), _root.world.getNextHighestDepth());
_root.world[(("blockX" + (ex - 1)) + "Y") + (wy + 1)]._x = ((ex - 1) * 30) + 15;
_root.world[(("blockX" + (ex - 1)) + "Y") + (wy + 1)]._y = ((wy + 1) * -30) - 15;
_root.world[(("blockX" + (ex - 1)) + "Y") + (wy + 1)].ex = ex - 1;
_root.world[(("blockX" + (ex - 1)) + "Y") + (wy + 1)].wy = wy + 1;
}
} else {
_root.isShiftClickAndContinue = true;
}
}
ex = _parent.ex;
wy = _parent.wy;
Symbol 724 MovieClip Frame 81
ty = "glow";
onEnterFrame = function () {
if (((_root.pawsed == false) && ((_parent._y + _root.world._y) < 550)) && ((_parent._y + _root.world._y) > -150)) {
if (ty == "glow") {
if (((_root.lighting.l["light" + _parent._name] == undefined) && ((_parent._y + _root.world._y) < 550)) && ((_parent._y + _root.world._y) > -150)) {
_root.lighting.l.attachMovie("light2", "light" + _parent._name, _root.lighting.l.getNextHighestDepth());
_root.lighting.l["light" + _parent._name]._x = (_parent._x + _root.world._x) - _root.lighting.l._x;
_root.lighting.l["light" + _parent._name]._y = (_parent._y + _root.world._y) - _root.lighting.l._y;
}
}
}
};
Symbol 724 MovieClip Frame 82
ty = "note";
function shiftClick(auto) {
if (ty == "note") {
if (auto != true) {
_root.states[_parent._name]++;
if (_root.states[_parent._name] > 25) {
_root.states[_parent._name] = 1;
}
}
if (_root.stones[_root.scene[_parent.ex][_parent.wy - 1]] != undefined) {
_root.requestSound("kick", ((-_root.world._x) - _parent._x) + 275, (_root.world._y + _parent._y) - 200);
} else if (_root.woods[_root.scene[_parent.ex][_parent.wy - 1]] != undefined) {
_root.requestSound("bass" + _root.states[_parent._name], ((-_root.world._x) - _parent._x) + 275, (_root.world._y + _parent._y) - 200);
} else if (_root.mushes[_root.scene[_parent.ex][_parent.wy - 1]] != undefined) {
_root.requestSound("snare", ((-_root.world._x) - _parent._x) + 275, (_root.world._y + _parent._y) - 200);
} else {
_root.requestSound("piano" + _root.states[_parent._name], ((-_root.world._x) - _parent._x) + 275, (_root.world._y + _parent._y) - 200);
}
}
}
if (_root.states[_parent._name] == undefined) {
_root.states[_parent._name] = 1;
}
onEnterFrame = function () {
if (ty == "note") {
if (_root.hasSignal[(("blockX" + (_parent.ex - 1)) + "Y") + (_parent.wy - 1)] || (_root.hasSignal[(("blockX" + (_parent.ex + 1)) + "Y") + (_parent.wy - 1)])) {
if (hasSignal == false) {
shiftClick(true);
}
}
}
if (_root.hasSignal[(("blockX" + (_parent.ex - 1)) + "Y") + (_parent.wy - 1)] || (_root.hasSignal[(("blockX" + (_parent.ex + 1)) + "Y") + (_parent.wy - 1)])) {
hasSignal = true;
} else {
hasSignal = false;
}
};
Symbol 724 MovieClip Frame 83
ty = "piston";
function opne() {
if (_root.states[_parent._name] == 1) {
cont = false;
var _local3 = 1;
while (_local3 <= 12) {
if (dontPush[_root.scene[ex][wy + _local3]] != undefined) {
_local3 = 13;
}
if (_root.scene[ex][wy + _local3] == undefined) {
goTo = _local3;
cont = true;
_local3 = 13;
}
_local3++;
}
if (cont == true) {
_root.requestSound("Piston out", ((-_root.world._x) - _parent._x) + 275, (_root.world._y + _parent._y) - 200);
_local3 = goTo;
while (_local3 >= 2) {
_root.scene[ex][wy + _local3] = _root.scene[ex][(wy + _local3) - 1];
if (_root.world[(("blockX" + ex) + "Y") + (wy + _local3)] == undefined) {
_root.world.attachMovie("block", (("blockX" + ex) + "Y") + (wy + _local3), _root.world.getNextHighestDepth());
_root.world[(("blockX" + ex) + "Y") + (wy + _local3)]._x = (ex * 30) + 15;
_root.world[(("blockX" + ex) + "Y") + (wy + _local3)]._y = ((wy + _local3) * -30) - 15;
_root.world[(("blockX" + ex) + "Y") + (wy + _local3)].ex = ex;
_root.world[(("blockX" + ex) + "Y") + (wy + _local3)].wy = wy + _local3;
}
_root.states[(("blockX" + ex) + "Y") + (wy + _local3)] = _root.states[(("blockX" + ex) + "Y") + ((wy + _local3) - 1)];
_root.world[(("blockX" + ex) + "Y") + (wy + _local3)].blockType.gotoAndStop(_root.scene[ex][wy + _local3]);
_root.world[(("blockX" + ex) + "Y") + (wy + _local3)].requestReload(false, true);
_local3--;
}
_root.scene[ex][wy + 1] = "piston2";
if (_root.world[(("blockX" + ex) + "Y") + (wy + 1)] == undefined) {
_root.world.attachMovie("block", (("blockX" + ex) + "Y") + (wy + 1), _root.world.getNextHighestDepth());
_root.world[(("blockX" + ex) + "Y") + (wy + 1)]._x = (ex * 30) + 15;
_root.world[(("blockX" + ex) + "Y") + (wy + 1)]._y = ((wy + 1) * -30) - 15;
_root.world[(("blockX" + ex) + "Y") + (wy + 1)].ex = ex;
_root.world[(("blockX" + ex) + "Y") + (wy + 1)].wy = wy + 1;
}
_root.world[(("blockX" + ex) + "Y") + (wy + 1)].blockType.gotoAndStop(_root.scene[ex][wy + 1]);
_root.scene[ex][wy] = "piston1";
gotoAndStop ("piston1");
}
} else if (_root.states[_parent._name] == 2) {
cont = false;
var _local3 = 1;
while (_local3 <= 12) {
if (dontPush[_root.scene[ex + _local3][wy]] != undefined) {
_local3 = 13;
}
if (_root.scene[ex + _local3][wy] == undefined) {
goTo = _local3;
cont = true;
_local3 = 13;
}
_local3++;
}
if (cont == true) {
_root.requestSound("Piston out", ((-_root.world._x) - _parent._x) + 275, (_root.world._y + _parent._y) - 200);
_local3 = goTo;
while (_local3 >= 2) {
_root.scene[ex + _local3][wy] = _root.scene[(ex + _local3) - 1][wy];
if (_root.world[(("blockX" + (ex + _local3)) + "Y") + wy] == undefined) {
_root.world.attachMovie("block", (("blockX" + (ex + _local3)) + "Y") + wy, _root.world.getNextHighestDepth());
_root.world[(("blockX" + (ex + _local3)) + "Y") + wy]._x = ((ex + _local3) * 30) + 15;
_root.world[(("blockX" + (ex + _local3)) + "Y") + wy]._y = (wy * -30) - 15;
_root.world[(("blockX" + (ex + _local3)) + "Y") + wy].ex = ex + _local3;
_root.world[(("blockX" + (ex + _local3)) + "Y") + wy].wy = wy;
}
_root.states[(("blockX" + (ex + _local3)) + "Y") + wy] = _root.states[(("blockX" + ((ex + _local3) - 1)) + "Y") + wy];
_root.world[(("blockX" + (ex + _local3)) + "Y") + wy].blockType.gotoAndStop(_root.scene[ex + _local3][wy]);
_root.world[(("blockX" + (ex + _local3)) + "Y") + wy].requestReload(false, true);
_local3--;
}
_root.scene[ex + 1][wy] = "piston2";
if (_root.world[(("blockX" + (ex + 1)) + "Y") + wy] == undefined) {
_root.world.attachMovie("block", (("blockX" + (ex + 1)) + "Y") + wy, _root.world.getNextHighestDepth());
_root.world[(("blockX" + (ex + 1)) + "Y") + wy]._x = ((ex + 1) * 30) + 15;
_root.world[(("blockX" + (ex + 1)) + "Y") + wy]._y = (wy * -30) - 15;
_root.world[(("blockX" + (ex + 1)) + "Y") + wy].ex = ex + 1;
_root.world[(("blockX" + (ex + 1)) + "Y") + wy].wy = wy;
}
_root.world[(("blockX" + (ex + 1)) + "Y") + wy].blockType.gotoAndStop(_root.scene[ex + 1][wy]);
_root.states[(("blockX" + (ex + 1)) + "Y") + wy] = 2;
_root.scene[ex][wy] = "piston1";
gotoAndStop ("piston1");
}
} else if (_root.states[_parent._name] == 3) {
cont = false;
var _local3 = 1;
while (_local3 <= 12) {
if (dontPush[_root.scene[ex][wy - _local3]] != undefined) {
_local3 = 13;
}
if (_root.scene[ex][wy - _local3] == undefined) {
goTo = _local3;
cont = true;
_local3 = 13;
}
_local3++;
}
if (cont == true) {
_root.requestSound("Piston out", ((-_root.world._x) - _parent._x) + 275, (_root.world._y + _parent._y) - 200);
_local3 = goTo;
while (_local3 >= 2) {
_root.scene[ex][wy - _local3] = _root.scene[ex][(wy - _local3) + 1];
if (_root.world[(("blockX" + ex) + "Y") + (wy - _local3)] == undefined) {
_root.world.attachMovie("block", (("blockX" + ex) + "Y") + (wy - _local3), _root.world.getNextHighestDepth());
_root.world[(("blockX" + ex) + "Y") + (wy - _local3)]._x = (ex * 30) + 15;
_root.world[(("blockX" + ex) + "Y") + (wy - _local3)]._y = ((wy - _local3) * -30) - 15;
_root.world[(("blockX" + ex) + "Y") + (wy - _local3)].ex = ex;
_root.world[(("blockX" + ex) + "Y") + (wy - _local3)].wy = wy - _local3;
}
_root.states[(("blockX" + ex) + "Y") + (wy - _local3)] = _root.states[(("blockX" + ex) + "Y") + ((wy - _local3) + 1)];
_root.world[(("blockX" + ex) + "Y") + (wy - _local3)].blockType.gotoAndStop(_root.scene[ex][wy - _local3]);
_root.world[(("blockX" + ex) + "Y") + (wy - _local3)].requestReload(false, true);
_local3--;
}
_root.scene[ex][wy - 1] = "piston2";
if (_root.world[(("blockX" + ex) + "Y") + (wy - 1)] == undefined) {
_root.world.attachMovie("block", (("blockX" + ex) + "Y") + (wy - 1), _root.world.getNextHighestDepth());
_root.world[(("blockX" + ex) + "Y") + (wy - 1)]._x = (ex * 30) + 15;
_root.world[(("blockX" + ex) + "Y") + (wy - 1)]._y = ((wy - 1) * -30) - 15;
_root.world[(("blockX" + ex) + "Y") + (wy - 1)].ex = ex;
_root.world[(("blockX" + ex) + "Y") + (wy - 1)].wy = wy - 1;
}
_root.world[(("blockX" + ex) + "Y") + (wy - 1)].blockType.gotoAndStop(_root.scene[ex][wy - 1]);
_root.states[(("blockX" + (ex + 1)) + "Y") + wy] = 3;
_root.scene[ex][wy] = "piston1";
gotoAndStop ("piston1");
}
} else if (_root.states[_parent._name] == 4) {
cont = false;
var _local3 = 1;
while (_local3 <= 12) {
if (dontPush[_root.scene[ex - _local3][wy]] != undefined) {
_local3 = 13;
}
if (_root.scene[ex - _local3][wy] == undefined) {
goTo = _local3;
cont = true;
_local3 = 13;
}
_local3++;
}
if (cont == true) {
_root.requestSound("Piston out", ((-_root.world._x) - _parent._x) + 275, (_root.world._y + _parent._y) - 200);
_local3 = goTo;
while (_local3 >= 2) {
_root.scene[ex - _local3][wy] = _root.scene[(ex - _local3) + 1][wy];
if (_root.world[(("blockX" + (ex - _local3)) + "Y") + wy] == undefined) {
_root.world.attachMovie("block", (("blockX" + (ex - _local3)) + "Y") + wy, _root.world.getNextHighestDepth());
_root.world[(("blockX" + (ex - _local3)) + "Y") + wy]._x = ((ex - _local3) * 30) + 15;
_root.world[(("blockX" + (ex - _local3)) + "Y") + wy]._y = (wy * -30) - 15;
_root.world[(("blockX" + (ex - _local3)) + "Y") + wy].ex = ex - _local3;
_root.world[(("blockX" + (ex - _local3)) + "Y") + wy].wy = wy;
}
_root.states[(("blockX" + (ex - _local3)) + "Y") + wy] = _root.states[(("blockX" + ((ex - _local3) + 1)) + "Y") + wy];
_root.world[(("blockX" + (ex - _local3)) + "Y") + wy].blockType.gotoAndStop(_root.scene[ex - _local3][wy]);
_root.world[(("blockX" + (ex - _local3)) + "Y") + wy].requestReload(false, true);
_local3--;
}
_root.scene[ex - 1][wy] = "piston2";
if (_root.world[(("blockX" + (ex - 1)) + "Y") + wy] == undefined) {
_root.world.attachMovie("block", (("blockX" + (ex - 1)) + "Y") + wy, _root.world.getNextHighestDepth());
_root.world[(("blockX" + (ex - 1)) + "Y") + wy]._x = ((ex - 1) * 30) + 15;
_root.world[(("blockX" + (ex - 1)) + "Y") + wy]._y = (wy * -30) - 15;
_root.world[(("blockX" + (ex - 1)) + "Y") + wy].ex = ex - 1;
_root.world[(("blockX" + (ex - 1)) + "Y") + wy].wy = wy;
}
_root.world[(("blockX" + (ex - 1)) + "Y") + wy].blockType.gotoAndStop(_root.scene[ex - 1][wy]);
_root.states[(("blockX" + (ex - 1)) + "Y") + wy] = 4;
_root.scene[ex][wy] = "piston1";
gotoAndStop ("piston1");
}
}
}
ex = _parent.ex;
wy = _parent.wy;
dontPush = _root.addToObject(["piston2", "piston1", "br", "j"]);
_rotation = ((_root.states[_parent._name] - 1) * 90);
onEnterFrame = function () {
if (ty == "piston") {
if (_root.hasSignal[(("blockX" + (ex - 1)) + "Y") + (wy - 1)] || (_root.hasSignal[(("blockX" + (ex + 1)) + "Y") + (wy - 1)])) {
opne();
}
}
};
Symbol 724 MovieClip Frame 84
ty = "piston1";
function cloes() {
if (_root.states[_parent._name] == 1) {
_root.scene[_parent.ex][_parent.wy + 1] = undefined;
_root.world[(("blockX" + _parent.ex) + "Y") + (_parent.wy + 1)].requestRemove(false, false);
_root.scene[_parent.ex][_parent.wy] = "piston";
gotoAndStop ("piston");
} else if (_root.states[_parent._name] == 2) {
_root.scene[_parent.ex + 1][_parent.wy] = undefined;
_root.world[(("blockX" + (_parent.ex + 1)) + "Y") + _parent.wy].requestRemove(false, false);
_root.scene[_parent.ex][_parent.wy] = "piston";
gotoAndStop ("piston");
} else if (_root.states[_parent._name] == 3) {
_root.scene[_parent.ex][_parent.wy - 1] = undefined;
_root.world[(("blockX" + _parent.ex) + "Y") + (_parent.wy - 1)].requestRemove(false, false);
_root.scene[_parent.ex][_parent.wy] = "piston";
gotoAndStop ("piston");
} else if (_root.states[_parent._name] == 4) {
_root.scene[_parent.ex - 1][_parent.wy] = undefined;
_root.world[(("blockX" + (_parent.ex - 1)) + "Y") + _parent.wy].requestRemove(false, false);
_root.scene[_parent.ex][_parent.wy] = "piston";
gotoAndStop ("piston");
}
_root.requestSound("Piston in", ((-_root.world._x) - _parent._x) + 275, (_root.world._y + _parent._y) - 200);
}
_rotation = ((_root.states[_parent._name] - 1) * 90);
onEnterFrame = function () {
if (ty == "piston1") {
if (_root.hasSignal[(("blockX" + (_parent.ex - 1)) + "Y") + (_parent.wy - 1)] || (_root.hasSignal[(("blockX" + (_parent.ex + 1)) + "Y") + (_parent.wy - 1)])) {
} else {
cloes();
}
}
};
Symbol 724 MovieClip Frame 85
ty = "piston2";
onEnterFrame = function () {
if (ty == "piston2") {
_rotation = ((_root.states[_parent._name] - 1) * 90);
if (_rotation == 0) {
if (_root.scene[_parent.ex][_parent.wy - 1] != "piston1") {
_root.scene[_parent.ex][_parent.wy] = undefined;
_parent.removeMovieClip();
}
} else if (_rotation == 90) {
if (_root.scene[_parent.ex - 1][_parent.wy] != "piston1") {
_root.scene[_parent.ex][_parent.wy] = undefined;
_parent.removeMovieClip();
}
} else if (_rotation == 180) {
if (_root.scene[_parent.ex][_parent.wy + 1] != "piston1") {
_root.scene[_parent.ex][_parent.wy] = undefined;
_parent.removeMovieClip();
}
} else if (_rotation == 270) {
if (_root.scene[_parent.ex + 1][_parent.wy] != "piston1") {
_root.scene[_parent.ex][_parent.wy] = undefined;
_parent.removeMovieClip();
}
}
delete _root.hasSignal[(("blockX" + _parent.ex) + "Y") + (_parent.wy - 1)];
}
};
Symbol 724 MovieClip Frame 86
ty = "ss";
Symbol 724 MovieClip Frame 87
ty = "j";
function shiftClick() {
if (ty == "j") {
_root.inventory.gotoAndStop("j");
}
}
Symbol 724 MovieClip Frame 88
ty = "lgr";
_xscale = ((random(2) * 600) - 300);
onEnterFrame = function () {
if (ty == "lgr") {
if (_root.scene[_parent.ex][_parent.wy - 1] != "dt") {
_root.scene[_parent.ex][_parent.wy] = undefined;
_parent.requestRemove(true);
}
}
};
Symbol 724 MovieClip Frame 89
ty = "seed";
_xscale = ((random(2) * 600) - 300);
onEnterFrame = function () {
wheat.gotoAndStop(_root.wheat[_parent._name]);
if (ty == "seed") {
if (_root.wheat[_parent._name] == undefined) {
_root.wheat[_parent._name] = 1;
}
if ((_root.scene[_parent.ex][_parent.wy - 1] != "farm") || (_root.ifDark[_parent.ex][_parent.wy])) {
_root.scene[_parent.ex][_parent.wy] = undefined;
_parent.requestRemove(true);
}
}
};
Symbol 724 MovieClip Frame 90
ty = "shrub";
_xscale = ((random(2) * 600) - 300);
onEnterFrame = function () {
if (ty == "shrub") {
if (_root.scene[_parent.ex][_parent.wy - 1] == "sd") {
shrub.gotoAndStop(2);
} else if (_root.scene[_parent.ex][_parent.wy - 1] == "dt") {
shrub.gotoAndStop(1);
} else {
_root.scene[_parent.ex][_parent.wy] = undefined;
_parent.requestRemove(true);
}
}
};
Symbol 724 MovieClip Frame 91
ty = "sb";
Symbol 724 MovieClip Frame 92
ty = "sign";
function shiftClick() {
if (ty == "sign") {
_root.inventory.sign = _parent._name;
_root.inventory.gotoAndStop("sign");
}
}
Symbol 724 MovieClip Frame 93
ty = "gasd";
function ifGrow() {
_root.reloadArea(_parent.ex - 4, _parent.ex + 4);
delete _root.toGrow[_parent._name];
}
onEnterFrame = function () {
if (_root.scene[_parent.ex][_parent.wy - 1] != "dt") {
_root.scene[_parent.ex][_parent.wy] = undefined;
_root.dropNum++;
_root.world.attachMovie("drop", "drop" + _root.dropNum, _root.world.getNextHighestDepth());
_root.world["drop" + _root.dropNum]._x = _parent._x;
_root.world["drop" + _root.dropNum]._y = _parent._y;
_root.world["drop" + _root.dropNum].gotoAndStop(ty);
removeMovieClip(_parent);
}
};
ifGrow();
_root.toGrow[_parent._name] = [_parent.ex, _parent.wy, true];
Symbol 724 MovieClip Frame 94
ty = "books";
Symbol 724 MovieClip Frame 95
ty = "halfcs";
Symbol 732 MovieClip [block] Frame 1
function onMining() {
blockType.gotoAndStop(_root.scene[ex][wy]);
if ((playedNote == false) && (blockType.ty == "note")) {
playedNote = true;
blockType.shiftClick(true);
}
if (_root.so2.data.qual > 1) {
if (random(3) == 1) {
part = _parent.attachMovie("mPart", "mPart" + random(100000), _parent.getNextHighestDepth());
part._x = _x;
part._y = _y;
_root.currentlyMining = blockType.ty;
}
}
if (_root.onFire[_name] != undefined) {
_root.requestSound("sizzle", ((-_root.world._x) - _x) + 275, (_root.world._y + _y) - 200);
delete _root.onFire[_name];
} else {
updateAround();
}
if (blockType.ty == "TNT") {
blockType.explode();
}
_root.placeDelay = 0;
if ((_root.closestMinableBlock[0] != ex) || (_root.closestMinableBlock[1] != wy)) {
gotoAndStop (1);
}
_root.char.sound = [ex, wy, ((-_root.world._x) - (ex * 30)) + 275, ((-_root.world._y) + (wy * 30)) + 200];
_root.miningAnimation = true;
if (blockType.ty != _root.scene[ex][wy]) {
blockType.gotoAndStop(_root.scene[ex][wy]);
}
}
function mineBlock(TNT, requestReload) {
if ((_root.achieve == 0) && (blockType.ty == "wd1")) {
_root.achieve = 1;
_root.achieveGet.gotoAndPlay(1);
}
if (blockType.ty != "br") {
_root.world[(("blockX" + ex) + "Y") + (wy + 1)].blockType.inter();
_root.miningAnimation = false;
if (_root.scene[ex][wy] != undefined) {
_root.blockSound(ex, wy, ((-_root.world._x) - (ex * 30)) + 275, ((-_root.world._y) + (wy * 30)) + 200);
}
dontDrop = false;
if (blockType.ty == "ice") {
_root.requestSound("glass" + (random(3) + 1), ((-_root.world._x) - _x) + 275, (_root.world._y + _y) - 200);
dontDrop = true;
}
if (TNT != true) {
if (_root.so2.data.qual > 1) {
var _local4 = 0;
while (_local4 <= 10) {
part = _parent.attachMovie("mPart", "mPart" + random(100000), _parent.getNextHighestDepth());
part._x = _x;
part._y = _y;
_root.currentlyMining = blockType.ty;
_local4++;
}
}
if (blockType.ty == "snow") {
if (_root.selectedInventoryItemType == "Shear") {
_root.inventoryList[_root.selectedInventoryItem - 1][2]++;
} else if (((((_root.selectedInventoryItemType != "StoneShovel") && (_root.selectedInventoryItemType != "WoodenShovel")) && (_root.selectedInventoryItemType != "IronShovel")) && (_root.selectedInventoryItemType != "GoldShovel")) && (_root.selectedInventoryItemType != "DiamondShovel")) {
dontDrop = true;
}
} else if (blockType.ty == "moss") {
if (_root.selectedInventoryItemType != "Shear") {
dontDrop = true;
} else {
_root.inventoryList[_root.selectedInventoryItem - 1][2]++;
}
} else if (blockType.ty == "n") {
if (((((_root.selectedInventoryItemType != "StonePickaxe") && (_root.selectedInventoryItemType != "IronPickaxe")) && (_root.selectedInventoryItemType != "GoldPickaxe")) && (_root.selectedInventoryItemType != "DiamondPickaxe")) && (_root.selectedInventoryItemType != "ObsidianPickaxe")) {
dontDrop = true;
}
} else if (blockType.ty == "lv") {
if (_root.selectedInventoryItemType == "Shear") {
dropLeave = true;
_root.inventoryList[_root.selectedInventoryItem - 1][2]++;
}
} else if (blockType.ty == "snowblock") {
if ((_root.selectedInventoryItemType == "Shear") || (_root.selectedInventoryItemType.substr(-6, 6) == "Shovel")) {
dropSame = true;
_root.inventoryList[_root.selectedInventoryItem - 1][2]++;
}
} else if (blockType.ty == "os") {
if ((((_root.selectedInventoryItemType != "IronPickaxe") && (_root.selectedInventoryItemType != "GoldPickaxe")) && (_root.selectedInventoryItemType != "DiamondPickaxe")) && (_root.selectedInventoryItemType != "ObsidianPickaxe")) {
dontDrop = true;
} else {
if (_root.achieve == 12) {
_root.achieve = 13;
_root.achieveGet.gotoAndPlay(1);
}
var _local3 = 1;
while (_local3 <= random(3)) {
_root.dropNum++;
_root.world.attachMovie("drop", "drop" + _root.dropNum, _root.world.getNextHighestDepth());
_root.world["drop" + _root.dropNum]._x = _x;
_root.world["drop" + _root.dropNum]._y = _y;
_root.world["drop" + _root.dropNum].gotoAndStop("oddrock");
_local3++;
}
}
} else if (blockType.ty == "ob") {
if ((_root.selectedInventoryItemType != "DiamondPickaxe") && (_root.selectedInventoryItemType != "ObsidianPickaxe")) {
dontDrop = true;
} else if (_root.achieve == 13) {
_root.achieve = 14;
_root.achieveGet.gotoAndPlay(1);
}
} else if (blockType.ty == "seed") {
if (_root.wheat[_name] <= 3) {
dontDrop = true;
} else if (_root.wheat[_name] == 7) {
_root.dropNum++;
_root.world.attachMovie("drop", "drop" + _root.dropNum, _root.world.getNextHighestDepth());
_root.world["drop" + _root.dropNum]._x = _x;
_root.world["drop" + _root.dropNum]._y = _y;
_root.world["drop" + _root.dropNum].gotoAndStop("wheat");
if (random(3) == 1) {
_root.dropNum++;
_root.world.attachMovie("drop", "drop" + _root.dropNum, _root.world.getNextHighestDepth());
_root.world["drop" + _root.dropNum]._x = _x;
_root.world["drop" + _root.dropNum]._y = _y;
_root.world["drop" + _root.dropNum].gotoAndStop("seed");
}
if (random(3) == 1) {
_root.dropNum++;
_root.world.attachMovie("drop", "drop" + _root.dropNum, _root.world.getNextHighestDepth());
_root.world["drop" + _root.dropNum]._x = _x;
_root.world["drop" + _root.dropNum]._y = _y;
_root.world["drop" + _root.dropNum].gotoAndStop("seed");
}
}
} else if ((((((((((((blockType.ty == "nb") || (blockType.ty == "sb")) || (blockType.ty == "r")) || (blockType.ty == "ss")) || (blockType.ty == "dm")) || (blockType.ty == "glow")) || (blockType.ty == "ms")) || (blockType.ty == "cs")) || (blockType.ty == "bricks")) || (blockType.ty == "cl")) || (blockType.ty == "to")) || (blockType.ty == "in")) {
if (_root.selectedInventoryItemType.substr(-7, 7) == "Pickaxe") {
if ((_root.selectedInventoryItemType == "WoodenPickaxe") && ((((blockType.ty == "in") || (blockType.ty == "gd")) || (blockType.ty == "dm")) || (blockType.ty == "to"))) {
dontDrop = true;
} else if ((_root.selectedInventoryItemType == "StonePickaxe") && ((blockType.ty == "gd") || (blockType == "dm"))) {
dontDrop = true;
} else if ((_root.achieve == 11) && (blockType.ty == "dm")) {
_root.achieve = 12;
_root.achieveGet.gotoAndPlay(1);
} else if (blockType.ty == "to") {
var _local3 = 1;
while (_local3 <= random(2)) {
_root.dropNum++;
_root.world.attachMovie("drop", "drop" + _root.dropNum, _root.world.getNextHighestDepth());
_root.world["drop" + _root.dropNum]._x = _x;
_root.world["drop" + _root.dropNum]._y = _y;
_root.world["drop" + _root.dropNum].gotoAndStop("topaz");
_local3++;
}
}
} else {
dontDrop = true;
}
}
if (_root.selectedInventoryTool == true) {
if (_root.selectedInventoryItemType != "Shear") {
_root.inventoryList[_root.selectedInventoryItem - 1][2]++;
}
}
} else if (blockType.ty == "TNT") {
dontDrop = true;
}
if (dontDrop == false) {
_root.dropNum++;
_root.world.attachMovie("drop", "drop" + _root.dropNum, _root.world.getNextHighestDepth());
_root.world["drop" + _root.dropNum]._x = _x;
_root.world["drop" + _root.dropNum]._y = _y;
if ((_root.dropDifferent[blockType.ty] != undefined) && (dropSame != true)) {
_root.world["drop" + _root.dropNum].gotoAndStop(_root.dropDifferent[blockType.ty]);
} else if (blockType.ty == "lv") {
if (dropLeave == true) {
_root.world["drop" + _root.dropNum].gotoAndStop(blockType.ty);
} else if (random(10) == 1) {
_root.world["drop" + _root.dropNum].gotoAndStop("sl");
} else {
_root.world["drop" + _root.dropNum].gotoAndStop("na");
}
} else if (blockType.ty == "lgr") {
if (dropGrass == true) {
_root.world["drop" + _root.dropNum].gotoAndStop(blockType.ty);
} else if (random(3) == 1) {
_root.world["drop" + _root.dropNum].gotoAndStop("seed");
} else {
_root.world["drop" + _root.dropNum].gotoAndStop("na");
}
} else if (blockType.ty == "gv") {
if (random(10) == 1) {
_root.world["drop" + _root.dropNum].gotoAndStop("flint");
} else {
_root.world["drop" + _root.dropNum].gotoAndStop("gv");
}
} else {
_root.world["drop" + _root.dropNum].gotoAndStop(blockType.ty);
}
}
if (requestReload != true) {
_root.scene[ex][wy] = undefined;
}
requestRemove(true, requestReload);
}
}
function updateAround() {
if ((_root.water[_name] != undefined) && (_root.liquids2[_root.scene[ex][wy]] == undefined)) {
delete _root.water[_name];
}
_root.world[(("blockX" + ex) + "Y") + (wy + 1)].blockType.inter();
_root.world[(("blockX" + ex) + "Y") + (wy - 1)].blockType.inter();
_root.world[(("blockX" + (ex + 1)) + "Y") + wy].blockType.inter();
_root.world[(("blockX" + (ex - 1)) + "Y") + wy].blockType.inter();
}
function requestRemove(mining, requestReload) {
reloadInstead = false;
delete _root.grassCheck[_name];
removeMovieClip(_root.lighting["light" + _name]);
if (mining) {
updateAround();
delete _root.water[_name];
delete _root.wheat[_name];
_root.world[(("blockX" + ex) + "Y") + (wy + 1)].blockType.inter();
delete _root.onFire[_name];
delete _root.redstone[_name];
delete _root.hasSignal[_name];
delete _root.sign[_name];
delete _root.hasSignal[(("blockX" + ex) + "Y") + (wy - 1)];
if ((blockType.ty != "piston1") && (blockType.ty != "piston2")) {
delete _root.states[_name];
}
delete _root.states[_name + "_2"];
if (blockType.ty == "button") {
if (_root.states[_name] == 2) {
delete _root.hasSignal[(("blockX" + (ex - 1)) + "Y") + wy];
} else if (_root.states[_name] == 3) {
delete _root.hasSignal[(("blockX" + (ex + 1)) + "Y") + wy];
}
} else if (blockType.ty == "chest") {
for (var _local4 in _root.chests[_name]) {
if (_root.chests[_name][_local4][1] > 1) {
var _local3 = 0;
while (_local3 < _root.chests[_name][_local4][1]) {
_root.dropNum++;
_root.world.attachMovie("drop", "drop" + _root.dropNum, _root.world.getNextHighestDepth());
_root.world["drop" + _root.dropNum]._x = _x;
_root.world["drop" + _root.dropNum]._y = _y;
_root.world["drop" + _root.dropNum].gotoAndStop(_root.chests[_name][_local4][0]);
_local3++;
}
} else {
_root.dropNum++;
_root.world.attachMovie("drop", "drop" + _root.dropNum, _root.world.getNextHighestDepth());
_root.world["drop" + _root.dropNum]._x = _x;
_root.world["drop" + _root.dropNum]._y = _y;
_root.world["drop" + _root.dropNum].damage = _root.chests[_name][_local4][2];
_root.world["drop" + _root.dropNum].gotoAndStop(_root.chests[_name][_local4][0]);
}
}
delete _root.chests[_name];
} else if (blockType.ty == "oven") {
if (_root.toSmelt[_name][1] > 1) {
var _local3 = 0;
while (_local3 < _root.toSmelt[_name][1]) {
_root.dropNum++;
_root.world.attachMovie("drop", "drop" + _root.dropNum, _root.world.getNextHighestDepth());
_root.world["drop" + _root.dropNum]._x = _x;
_root.world["drop" + _root.dropNum]._y = _y;
_root.world["drop" + _root.dropNum].gotoAndStop(_root.toSmelt[_name][0]);
_local3++;
}
} else {
_root.dropNum++;
_root.world.attachMovie("drop", "drop" + _root.dropNum, _root.world.getNextHighestDepth());
_root.world["drop" + _root.dropNum]._x = _x;
_root.world["drop" + _root.dropNum]._y = _y;
_root.world["drop" + _root.dropNum].gotoAndStop(_root.toSmelt[_name][0]);
}
if (_root.toSmelt[_name][3] > 1) {
var _local3 = 0;
while (_local3 < _root.toSmelt[_name][3]) {
_root.dropNum++;
_root.world.attachMovie("drop", "drop" + _root.dropNum, _root.world.getNextHighestDepth());
_root.world["drop" + _root.dropNum]._x = _x;
_root.world["drop" + _root.dropNum]._y = _y;
_root.world["drop" + _root.dropNum].gotoAndStop(_root.toSmelt[_name][2]);
_local3++;
}
} else {
_root.dropNum++;
_root.world.attachMovie("drop", "drop" + _root.dropNum, _root.world.getNextHighestDepth());
_root.world["drop" + _root.dropNum]._x = _x;
_root.world["drop" + _root.dropNum]._y = _y;
_root.world["drop" + _root.dropNum].gotoAndStop(_root.toSmelt[_name][2]);
}
if (_root.toSmelt[_name][7] > 1) {
var _local3 = 0;
while (_local3 < _root.toSmelt[_name][7]) {
_root.dropNum++;
_root.world.attachMovie("drop", "drop" + _root.dropNum, _root.world.getNextHighestDepth());
_root.world["drop" + _root.dropNum]._x = _x;
_root.world["drop" + _root.dropNum]._y = _y;
_root.world["drop" + _root.dropNum].gotoAndStop(_root.toSmelt[_name][6]);
_local3++;
}
} else {
_root.dropNum++;
_root.world.attachMovie("drop", "drop" + _root.dropNum, _root.world.getNextHighestDepth());
_root.world["drop" + _root.dropNum]._x = _x;
_root.world["drop" + _root.dropNum]._y = _y;
_root.world["drop" + _root.dropNum].gotoAndStop(_root.toSmelt[_name][6]);
}
delete _root.toSmelt[_name];
} else if (blockType.ty == "ice") {
_root.scene[ex][wy] = "wr";
reloadInstead = true;
} else if (blockType.ty == "gs") {
_root.requestSound("glass" + (random(3) + 1), ((-_root.world._x) - _x) + 275, (_root.world._y + _y) - 200);
var _local4 = 1;
while (_local4 < (random(2) + 1)) {
_root.dropNum++;
_root.world.attachMovie("drop", "drop" + _root.dropNum, _root.world.getNextHighestDepth());
_root.world["drop" + _root.dropNum]._x = _x;
_root.world["drop" + _root.dropNum]._y = _y;
_root.world["drop" + _root.dropNum].gotoAndStop("gss");
_local4++;
}
} else if (blockType.ty == "glow") {
_root.requestSound("glass" + (random(3) + 1), ((-_root.world._x) - _x) + 275, (_root.world._y + _y) - 200);
var _local4 = 0;
while (_local4 < (random(3) + 1)) {
_root.dropNum++;
_root.world.attachMovie("drop", "drop" + _root.dropNum, _root.world.getNextHighestDepth());
_root.world["drop" + _root.dropNum]._x = _x;
_root.world["drop" + _root.dropNum]._y = _y;
_root.world["drop" + _root.dropNum].gotoAndStop("yellowdust");
_local4++;
}
} else if (blockType.ty == "cy") {
var _local4 = 1;
while (_local4 <= 3) {
_root.dropNum++;
_root.world.attachMovie("drop", "drop" + _root.dropNum, _root.world.getNextHighestDepth());
_root.world["drop" + _root.dropNum]._x = _x;
_root.world["drop" + _root.dropNum]._y = _y;
_root.world["drop" + _root.dropNum].gotoAndStop("cy");
_local4++;
}
} else if (blockType.ty == "rs") {
var _local4 = 1;
while (_local4 <= 3) {
_root.dropNum++;
_root.world.attachMovie("drop", "drop" + _root.dropNum, _root.world.getNextHighestDepth());
_root.world["drop" + _root.dropNum]._x = _x;
_root.world["drop" + _root.dropNum]._y = _y;
_root.world["drop" + _root.dropNum].gotoAndStop("rsd");
_local4++;
}
} else if (blockType.ty == "sw") {
_root.scene[ex][wy] = "wr";
reloadInstead = true;
} else if (blockType.ty == "piston1") {
if (_root.states[_name] == 1) {
delete _root.scene[ex][Number(wy + 1)];
removeMovieClip(_root.world[(("blockX" + ex) + "Y") + (wy + 1)]);
} else if (_root.states[_name] == 2) {
delete _root.scene[ex + 1][Number(wy)];
removeMovieClip(_root.world[(("blockX" + (ex + 1)) + "Y") + wy]);
} else if (_root.states[_name] == 3) {
delete _root.scene[ex][Number(wy - 1)];
removeMovieClip(_root.world[(("blockX" + ex) + "Y") + (wy - 1)]);
} else if (_root.states[_name] == 4) {
delete _root.scene[ex - 1][Number(wy)];
removeMovieClip(_root.world[(("blockX" + (ex - 1)) + "Y") + wy]);
}
} else if (blockType.ty == "piston2") {
if (_root.states[_name] == 1) {
delete _root.scene[ex][Number(wy - 1)];
removeMovieClip(_root.world[(("blockX" + ex) + "Y") + (wy - 1)]);
} else if (_root.states[_name] == 2) {
delete _root.scene[ex - 1][Number(wy)];
removeMovieClip(_root.world[(("blockX" + (ex - 1)) + "Y") + wy]);
} else if (_root.states[_name] == 3) {
delete _root.scene[ex][Number(wy + 1)];
removeMovieClip(_root.world[(("blockX" + ex) + "Y") + (wy + 1)]);
} else if (_root.states[_name] == 4) {
delete _root.scene[ex + 1][Number(wy)];
removeMovieClip(_root.world[(("blockX" + (ex + 1)) + "Y") + wy]);
}
removeMovieClip(_root.world[(("blockX" + ex) + "Y") + (wy - 1)]);
} else if (blockType.ty == "bed1") {
delete _root.scene[ex + 1][Number(wy)];
removeMovieClip(_root.world[(("blockX" + Number(ex + 1)) + "Y") + wy]);
} else if (blockType.ty == "bed2") {
delete _root.scene[ex - 1][Number(wy)];
removeMovieClip(_root.world[(("blockX" + (ex - 1)) + "Y") + wy]);
} else if ((blockType.ty == "dr1") || (blockType.ty == "dr3")) {
delete _root.states[_name];
delete _root.scene[ex][Number(wy + 1)];
removeMovieClip(_root.world[(("blockX" + ex) + "Y") + Number(wy + 1)]);
} else if ((blockType.ty == "dr2") || (blockType.ty == "dr4")) {
delete _root.states[_root.world[(("blockX" + ex) + "Y") + Number(wy - 1)]];
_root.scene[ex][wy - 1] = undefined;
removeMovieClip(_root.world[(("blockX" + ex) + "Y") + Number(wy - 1)]);
}
}
if (reloadInstead || (requestReload)) {
reload();
} else {
removeMovieClip(this);
}
}
function reload() {
blockType.gotoAndStop(_root.scene[ex][wy]);
}
delete onMouseUp;
delete onEnterFrame;
if (_root.onFire[_name] != undefined) {
gotoAndStop ("flame");
}
blockType.gotoAndStop(_root.scene[ex][wy]);
_root.miningAnimation = false;
playedNote = false;
goingIn = "Toast";
if ((_root.water[_name] != undefined) && (_root.liquids2[_root.scene[ex][wy]] == undefined)) {
delete _root.water[_name];
updateAround();
}
stop();
Symbol 732 MovieClip [block] Frame 2
goingIn = "fastest";
onEnterFrame = function () {
onMining();
};
onMouseUp = function () {
gotoAndStop (1);
};
Symbol 732 MovieClip [block] Frame 5
mineBlock();
Symbol 732 MovieClip [block] Frame 6
goingIn = "fast";
onEnterFrame = function () {
onMining();
};
onMouseUp = function () {
gotoAndStop (1);
};
Symbol 732 MovieClip [block] Frame 13
mineBlock();
Symbol 732 MovieClip [block] Frame 14
goingIn = "normal";
onEnterFrame = function () {
onMining();
};
onMouseUp = function () {
gotoAndStop (1);
};
Symbol 732 MovieClip [block] Frame 27
mineBlock();
Symbol 732 MovieClip [block] Frame 28
goingIn = "slow";
onEnterFrame = function () {
onMining();
};
onMouseUp = function () {
gotoAndStop (1);
};
Symbol 732 MovieClip [block] Frame 51
mineBlock();
Symbol 732 MovieClip [block] Frame 52
goingIn = "slower";
onEnterFrame = function () {
onMining();
};
onMouseUp = function () {
gotoAndStop (1);
};
Symbol 732 MovieClip [block] Frame 113
mineBlock();
Symbol 732 MovieClip [block] Frame 114
goingIn = "slowest";
onEnterFrame = function () {
onMining();
};
onMouseUp = function () {
gotoAndStop (1);
};
Symbol 732 MovieClip [block] Frame 237
mineBlock();
Symbol 732 MovieClip [block] Frame 238
onEnterFrame = function () {
if (_currentframe == 238) {
if (((_root.lighting["light" + _name] == undefined) && ((_y + _root.world._y) < 450)) && ((_y + _root.world._y) > -50)) {
_root.lighting.attachMovie("light2", "light" + _name, _root.lighting.getNextHighestDepth());
}
_root.lighting["light" + _name]._x = (_x + _root.world._x) + _root.xSpeed;
_root.lighting["light" + _name]._y = (_y + _root.world._y) + _root.ySpeed;
_root.lighting["light" + _name].fire = true;
_root.lighting["light" + _name]._alpha = (120 - (Math.sqrt(((((-_root.world._x) - _x) + 275) * (((-_root.world._x) - _x) + 275)) + ((((-_root.world._y) - _y) + 200) * (((-_root.world._y) - _y) + 200))) / 2)) + ((random(20) - 9) / 4);
_root.onFire[_name] = true;
if (_root.flammable[_root.scene[ex][wy + 1]] && (random(70) == 1)) {
_root.world[(("blockX" + ex) + "Y") + (wy + 1)].gotoAndStop("flame");
}
if (_root.scene[ex][wy + 1] == undefined) {
if (_root.flammable[_root.scene[ex][wy + 2]] && (random(70) == 1)) {
_root.world[(("blockX" + ex) + "Y") + (wy + 2)].gotoAndStop("flame");
}
}
if ((_root.scene[ex][wy + 1] == undefined) || (_root.scene[ex - 1][wy] == undefined)) {
if (_root.flammable[_root.scene[ex - 1][wy + 1]] && (random(70) == 1)) {
_root.world[(("blockX" + (ex - 1)) + "Y") + (wy + 1)].gotoAndStop("flame");
}
}
if (_root.flammable[_root.scene[ex][wy - 1]] && (random(70) == 1)) {
_root.world[(("blockX" + ex) + "Y") + (wy - 1)].gotoAndStop("flame");
}
if (_root.scene[ex][wy - 1] == undefined) {
if (_root.flammable[_root.scene[ex][wy - 2]] && (random(70) == 1)) {
_root.world[(("blockX" + ex) + "Y") + (wy - 2)].gotoAndStop("flame");
}
}
if ((_root.scene[ex][wy + 1] == undefined) || (_root.scene[ex + 1][wy] == undefined)) {
if (_root.flammable[_root.scene[ex + 1][wy + 1]] && (random(70) == 1)) {
_root.world[(("blockX" + (ex + 1)) + "Y") + (wy + 1)].gotoAndStop("flame");
}
}
if (_root.flammable[_root.scene[ex + 1][wy]] && (random(70) == 1)) {
_root.world[(("blockX" + (ex + 1)) + "Y") + wy].gotoAndStop("flame");
}
if (_root.scene[ex + 1][wy] == undefined) {
if (_root.flammable[_root.scene[ex + 2][wy]] && (random(70) == 1)) {
_root.world[(("blockX" + (ex + 2)) + "Y") + wy].gotoAndStop("flame");
}
}
if ((_root.scene[ex][wy - 1] == undefined) || (_root.scene[ex + 1][wy] == undefined)) {
if (_root.flammable[_root.scene[ex + 1][wy - 1]] && (random(70) == 1)) {
_root.world[(("blockX" + (ex + 1)) + "Y") + (wy - 1)].gotoAndStop("flame");
}
}
if (_root.flammable[_root.scene[ex - 1][wy]] && (random(70) == 1)) {
_root.world[(("blockX" + (ex - 1)) + "Y") + wy].gotoAndStop("flame");
}
if (_root.scene[ex - 1][wy] == undefined) {
if (_root.flammable[_root.scene[ex - 2][wy]] && (random(70) == 1)) {
_root.world[(("blockX" + (ex - 2)) + "Y") + wy].gotoAndStop("flame");
}
}
if ((_root.scene[ex][wy - 1] == undefined) || (_root.scene[ex - 1][wy] == undefined)) {
if (_root.flammable[_root.scene[ex - 1][wy - 1]] && (random(70) == 1)) {
_root.world[(("blockX" + (ex - 1)) + "Y") + (wy - 1)].gotoAndStop("flame");
}
}
if (random(20) == 1) {
if (random(5) == 1) {
_root.requestSound("fire" + (random(5) + 1), ((-_root.world._x) - _x) + 275, (_root.world._y + _y) - 200);
}
if (_root.so2.data.qual > 1) {
part = _parent.attachMovie("smoke", "smoke" + random(100000), _parent.getNextHighestDepth());
part._x = (_x + random(30)) - 15;
part._y = (_y + random(30)) - 15;
}
if (hitTest(_root.char.hit)) {
_root.ouch(1);
_root.health = _root.health - 1;
}
for (var _local3 in _root.mobs) {
if (hitTest(_root.world[_root.mobs[_local3][1]])) {
_root.world[_root.mobs[_local3][1]].ouch(1);
_root.world[_root.mobs[_local3][1]].health = _root.world[_root.mobs[_local3][1]].health - 1;
}
}
}
if ((random(_root.flamRate[blockType.ty]) == 1) || ((blockType.ty.substr(0, 5) == "cloth") && (random(400) == 1))) {
gotoAndStop (1);
mineBlock(true, false);
delete _root.scene[ex][wy];
}
if (blockType.ty != "n") {
if (random(200) == 1) {
delete _root.onFire[_name];
gotoAndStop (1);
}
}
}
};
Symbol 733 MovieClip Frame 2
stop();
Symbol 755 MovieClip Frame 1
yells = ["Nether", "Glowstone", "Portals", "Odd", "WOOHOO", "Wool", "Redstone", "Buttons", "Spawners", "Dungeons", "Creepers", "Zombies", "Pigs", "Sheep", "Cows", "Levers", "Pressure Plates", "Swords", _root.ver, "Clay", "Shards", "Moss", "TNT", "Bamboo", "Beef", "Fibers", "Cloth", "Clouds", "Buckets", "Zanzlanz", "Mine Blocks", "Ores", "Wood", "Trees", "Grass", "Water", "Lava", "Acid", "Chests", "Crafting", "Mining", "Jumping", "Sand", "Cacti", "Pumpkins", "Torches", "Damage", "Tools", "Health", "Caverns", "Mines", "Flowers", "Seaweed", "Coral", "Inventory", "Apples", "Oranges", "Ladders", "Sticks", "Shovels", "Pickaxes", "Axes", "Diamonds", "Iron", "Coal", "Gold", "Smelters"];
yell = yells[random(yells.length)] + "!";
_rotation = ((random(100) - 49) / 10);
Symbol 755 MovieClip Frame 21
gotoAndPlay(random(20) + _currentframe);
Symbol 759 Button
on (release) {
gotoAndStop ("select");
}
Symbol 761 Button
on (release) {
gotoAndStop ("instruct");
}
Symbol 763 Button
on (release) {
gotoAndStop ("FAQ");
}
Symbol 765 Button
on (release) {
gotoAndStop ("credits");
}
Symbol 767 Button
on (release) {
gotoAndStop ("feedback");
}
Symbol 778 Button
on (release) {
if (worlds.selectedItem != undefined) {
_root.so = SharedObject.getLocal("MCW" + worlds.selectedItem.data, "/");
if ((_root.so.data.scene1 != undefined) || (_root.so.data.scene != undefined)) {
mochi.as2.MochiEvents.startPlay();
_root.gotoAndStop("game");
loadWorld = true;
}
}
}
Symbol 779 Button
on (release) {
gotoAndStop ("new");
}
Symbol 787 MovieClip [TextInput] Frame 1
#initclip 93
Object.registerClass("TextInput", mx.controls.TextInput);
#endinitclip
stop();
Symbol 788 MovieClip [ComboBase] Frame 1
#initclip 94
mx.controls.listclasses.DataSelector.Initialize(Object(mx.controls.ComboBase).prototype);
Object.registerClass("ComboBase", mx.controls.ComboBase);
#endinitclip
stop();
Instance of Symbol 186 MovieClip [SimpleButton] in Symbol 788 MovieClip [ComboBase] Frame 2
//component parameters
onClipEvent (initialize) {
selected = false;
toggle = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 787 MovieClip [TextInput] in Symbol 788 MovieClip [ComboBase] Frame 2
//component parameters
onClipEvent (initialize) {
editable = true;
password = false;
text = "";
maxChars = null;
restrict = "null";
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 789 MovieClip [DataProvider] Frame 1
#initclip 95
Object.registerClass("DataProvider", mx.controls.listclasses.DataProvider);
#endinitclip
stop();
Symbol 790 MovieClip [DataSelector] Frame 1
#initclip 96
Object.registerClass("DataSelector", mx.controls.listclasses.DataSelector);
#endinitclip
stop();
Symbol 791 MovieClip [SelectableRow] Frame 1
#initclip 97
Object.registerClass("SelectableRow", mx.controls.listclasses.SelectableRow);
#endinitclip
stop();
Symbol 792 MovieClip [CustomBorder] Frame 1
#initclip 98
Object.registerClass("CustomBorder", mx.skins.CustomBorder);
mx.skins.SkinElement.registerElement("CustomBorder", mx.skins.CustomBorder);
#endinitclip
Symbol 804 MovieClip [ScrollThemeColor1] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "themeColor");
Symbol 806 MovieClip [ScrollThemeColor2] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "themeColor");
Symbol 817 MovieClip [ThumbThemeColor1] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "themeColor");
Symbol 819 MovieClip [ThumbThemeColor3] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "themeColor");
Symbol 826 MovieClip [ThumbThemeColor2] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "themeColor");
Symbol 847 MovieClip [BtnDownArrow] Frame 1
#initclip 99
Object.registerClass("BtnDownArrow", mx.controls.SimpleButton);
#endinitclip
Symbol 848 MovieClip [BtnUpArrow] Frame 1
#initclip 100
Object.registerClass("BtnUpArrow", mx.controls.SimpleButton);
#endinitclip
Symbol 850 MovieClip [HScrollBar] Frame 1
#initclip 101
Object.registerClass("HScrollBar", mx.controls.HScrollBar);
#endinitclip
stop();
Instance of Symbol 190 MovieClip [Button] in Symbol 850 MovieClip [HScrollBar] Frame 2
//component parameters
onClipEvent (initialize) {
icon = "";
label = "Button";
labelPlacement = "right";
selected = false;
toggle = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 186 MovieClip [SimpleButton] in Symbol 850 MovieClip [HScrollBar] Frame 2
//component parameters
onClipEvent (initialize) {
selected = false;
toggle = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 851 MovieClip [VScrollBar] Frame 1
#initclip 102
Object.registerClass("VScrollBar", mx.controls.VScrollBar);
#endinitclip
stop();
Instance of Symbol 190 MovieClip [Button] in Symbol 851 MovieClip [VScrollBar] Frame 2
//component parameters
onClipEvent (initialize) {
icon = "";
label = "Button";
labelPlacement = "right";
selected = false;
toggle = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 186 MovieClip [SimpleButton] in Symbol 851 MovieClip [VScrollBar] Frame 2
//component parameters
onClipEvent (initialize) {
selected = false;
toggle = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 852 MovieClip [View] Frame 1
#initclip 103
Object.registerClass("View", mx.core.View);
#endinitclip
stop();
Symbol 853 MovieClip [ScrollView] Frame 1
#initclip 104
Object.registerClass("ScrollView", mx.core.ScrollView);
#endinitclip
stop();
Instance of Symbol 850 MovieClip [HScrollBar] in Symbol 853 MovieClip [ScrollView] Frame 2
//component parameters
onClipEvent (initialize) {
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 851 MovieClip [VScrollBar] in Symbol 853 MovieClip [ScrollView] Frame 2
//component parameters
onClipEvent (initialize) {
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 854 MovieClip [ScrollSelectList] Frame 1
#initclip 105
Object.registerClass("ScrollSelectList", mx.controls.listclasses.ScrollSelectList);
#endinitclip
stop();
Symbol 855 MovieClip [List] Frame 1
#initclip 106
Object.registerClass("List", mx.controls.List);
#endinitclip
stop();
Symbol 861 MovieClip [ComboDownArrowDisabled] Frame 1
#initclip 107
Object.registerClass("ComboDownArrowDisabled", mx.controls.SimpleButton);
#endinitclip
Symbol 863 MovieClip [ComboThemeColor1] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "themeColor");
Symbol 866 MovieClip [ComboAssets] Frame 1
#initclip 108
mx.controls.ComboBox.prototype.downArrowUpName = "ComboDownArrowUp";
mx.controls.ComboBox.prototype.downArrowDownName = "ComboDownArrowDown";
mx.controls.ComboBox.prototype.downArrowOverName = "ComboDownArrowOver";
mx.controls.ComboBox.prototype.downArrowDisabledName = "ComboDownArrowDisabled";
mx.controls.ComboBox.prototype.wrapDownArrowButton = false;
mx.controls.ComboBox.prototype.dropDownBorderStyle = "solid";
mx.controls.ComboBox.prototype.adjustFocusRect = function () {
var _local2 = this.getStyle("themeColor");
if (_local2 == undefined) {
_local2 = 8453965 /* 0x80FF4D */;
}
var _local3 = this._parent.focus_mc;
_local3.setSize(this.width + 4, this.height + 4, {bl:0, tl:0, tr:5, br:5}, 100, _local2);
_local3.move(this.x - 2, this.y - 2);
};
#endinitclip
Symbol 867 MovieClip [ComboBox] Frame 1
#initclip 109
Object.registerClass("ComboBox", mx.controls.ComboBox);
#endinitclip
stop();
Instance of Symbol 855 MovieClip [List] in Symbol 867 MovieClip [ComboBox] Frame 2
//component parameters
onClipEvent (initialize) {
multipleSelection = false;
rowHeight = 20;
}
Symbol 883 Button
on (release) {
play();
}
Symbol 885 Button
on (release) {
_parent.deleteWorld = _parent.worlds.selectedItem.data;
delete _root.so2.data.worlds[_parent.worlds.selectedItem.data];
_parent.worlds.removeItemAt(_parent.worlds.selectedIndex);
_root.so = SharedObject.getLocal("MCW" + _parent.deleteWorld, "/");
_root.so.clear();
delete _root.so;
_parent.gotoAndPlay("delete");
}
Symbol 888 Button
on (release) {
gotoAndStop (1);
}
Symbol 890 Button
on (release) {
_parent.deleteWorld = _parent.worlds.selectedItem.data;
delete _root.so.data.worlds[_parent.worlds.selectedItem.data];
_parent.worlds.removeItemAt(_parent.worlds.selectedIndex);
_root.so = SharedObject.getLocal("MCW" + _parent.deleteWorld, "/");
_root.so.clear();
_root.so = SharedObject.getLocal("MinecraftWorlds", "/");
_parent.gotoAndPlay(5);
}
Symbol 891 MovieClip Frame 1
stop();
Symbol 891 MovieClip Frame 10
stop();
Symbol 892 Button
on (release) {
gotoAndStop (1);
}
Symbol 895 Button
on (release) {
gotoAndStop ("select");
}
Symbol 896 Button
on (release) {
var i = 0;
while (i <= worldName.text.length) {
if ((substring(worldName.text, i, 1)) == " ") {
worldName.text = ((substring(worldName.text, 0, i - 1)) + "_") + (substring(worldName.text, i + 1, worldName.text.length));
}
i++;
}
if (worldName.text.length > 0) {
if (_root.so2.data.worlds[worldName.text] == undefined) {
_root.so2.data.worlds[worldName.text] = (((worldName.text + "!!") + seedNum.text) + "!!") + _root.ver;
worldToMake = worldName.text;
_root.seed = seedNum.text;
_root.loadWorld = false;
_root.so2.flush();
mochi.as2.MochiEvents.startPlay();
play();
} else {
worldName.text = worldName.text + "a";
}
}
}
Symbol 901 Button
on (release) {
_parent.gotoAndStop(1);
}
Symbol 903 Button
on (release) {
nextFrame();
}
Symbol 907 Button
on (release) {
prevFrame();
}
Symbol 916 Button
on (release) {
nextFrame();
}
Symbol 922 Button
on (release) {
prevFrame();
}
Symbol 959 MovieClip Frame 1
stop();
Symbol 1061 MovieClip Frame 1
stop();
Symbol 1069 MovieClip Frame 1
stop();
Symbol 1079 MovieClip Frame 1
var username = _root.so2.data.USERNAME;
Symbol 1081 MovieClip Frame 1
onEnterFrame = function () {
if (e == true) {
e = false;
_rotation = (_rotation + 30);
} else {
e = true;
}
};
Symbol 1081 MovieClip Frame 15
if (_alpha == 100) {
if (j == true) {
j = false;
_parent.form.loadVariables("http://www.zanzlanz.com/mail.php", "POST");
} else {
j = true;
}
}
Symbol 1091 MovieClip Frame 1
stop();
Symbol 1092 Button
on (release) {
if (_parent.sent != true) {
if ((_parent.form.name == undefined) || (_parent.form.name.length < 5)) {
_parent.error.er = "Needs name!";
_parent.error.play();
} else if ((_parent.form.subject == undefined) || (_parent.form.subject.length < 4)) {
_parent.error.er = "Needs subject!";
_parent.error.play();
} else if ((_parent.form.message == undefined) || (_parent.form.message.length < 25)) {
_parent.error.er = "Needs message!";
_parent.error.play();
} else {
_parent.sent = true;
_parent.spin._alpha = 100;
_parent.form.loadVariables("mail.php", "POST");
_y = -1000;
}
}
}
Symbol 1107 MovieClip [TextArea] Frame 1
#initclip 110
Object.registerClass("TextArea", mx.controls.TextArea);
#endinitclip
stop();
Symbol 1108 MovieClip Frame 1
stop();
Instance of Symbol 338 MovieClip in Symbol 1108 MovieClip Frame 1
on (release) {
getURL ("http://zanzlanz.com/Games", "_blank");
}
Symbol 1108 MovieClip Frame 2
for (var i in _root.so2.data.worlds) {
nam = _root.so2.data.worlds[i].split("!!");
if (nam.length > 1) {
var j = 0;
while (j <= nam[0].length) {
if ((substring(nam[0], j, 1)) == "_") {
nam[0] = ((substring(nam[0], 0, j - 1)) + " ") + (substring(nam[0], j + 1, nam[0].length));
}
j++;
}
worlds.addItem({label:((nam[0] + " (Seed ") + nam[1]) + ")", data:i});
} else {
worlds.addItem({label:nam[0], data:i});
}
}
Instance of Symbol 867 MovieClip [ComboBox] "worlds" in Symbol 1108 MovieClip Frame 2
//component parameters
onClipEvent (construct) {
editable = false;
rowCount = 5;
restrict = "";
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 1108 MovieClip Frame 3
seedNum.text = random(1000000);
Instance of Symbol 787 MovieClip [TextInput] "worldName" in Symbol 1108 MovieClip Frame 3
//component parameters
onClipEvent (construct) {
editable = true;
password = false;
text = "";
maxChars = 0;
restrict = "a-z A-Z_";
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 787 MovieClip [TextInput] "seedNum" in Symbol 1108 MovieClip Frame 3
//component parameters
onClipEvent (construct) {
editable = true;
password = false;
text = "";
maxChars = 0;
restrict = "0-9";
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 1108 MovieClip Frame 4
_root.so = SharedObject.getLocal("MCW" + worldToMake, "/");
if (_root.seed != Number(_root.seed)) {
_root.seed = random(1000000);
}
_root.so.data.seedNum = _root.seed;
_root.so.flush("2000000");
Symbol 1108 MovieClip Frame 5
_root.gotoAndStop("game");
Symbol 1108 MovieClip Frame 7
gotoAndStop ("select");
Symbol 1108 MovieClip Frame 9
sent = false;
Instance of Symbol 1079 MovieClip "form" in Symbol 1108 MovieClip Frame 9
onClipEvent (data) {
_parent.nextFrame();
}
Instance of Symbol 1081 MovieClip "spin" in Symbol 1108 MovieClip Frame 9
onClipEvent (load) {
_alpha = 0;
}
Symbol 1108 MovieClip Frame 12
questions = ["How do I place blocks? How do I only grab one item from a stack in the inventory? Right-clicking isn't working for me.", "Will there be multiplayer?", "I was falling, and I went right through a block", "Does this work on a Mac?", "What's with the lag?", "The game is not saving!"];
answers = ["Shift+click is the equivalent of right-clicking in this game.", "Not for a little while, but possibly in the future!", "I know, I've been working on that. For now, you can just abuse the glitch!", "Only the on-line version will work for a Mac. The download is a Windows file.", "This game is complex and there will be some lag, but try using it on a faster computer. Sometimes certain areas of the game lag more than others. Set the quality to 1 in the options of the pause menu, and turn it on 'Lonely Mode.'", "Right+click and go under settings. Go to the local storage tab, and set the bar to 'Unlimited'. If the problem continues, then make sure your browser doesn't automatically delete cookies."];
faq.html = true;
faq.text = "<font size='20'>Frequently Asked Questions</font>";
var i = 1;
while (i <= questions.length) {
faq.text = faq.text + (((("<br><br><font color='#FF0000'>Question: " + questions[i - 1]) + "</font><br><font color='#0000FF'>Answer: ") + answers[i - 1]) + "</font>");
i++;
}
Instance of Symbol 1107 MovieClip [TextArea] "faq" in Symbol 1108 MovieClip Frame 12
//component parameters
onClipEvent (construct) {
editable = false;
html = true;
text = "";
wordWrap = true;
maxChars = 0;
restrict = "";
enabled = true;
password = false;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 1111 Button
on (release) {
gotoAndStop (1);
}
Symbol 1118 MovieClip Frame 1
stop();
if (_root.so2.data.v != _root.ver) {
_root.so2.data.v = _root.ver;
gotoAndStop (2);
}
Symbol 1122 Button
on (release) {
if (_root._currentframe == 3) {
fscommand ("quit");
}
_root.loadsave.gotoAndStop(1);
if (_root._currentframe == 6) {
_root.save();
}
_root.gotoAndStop("home");
}
Symbol 1126 MovieClip Frame 1
onEnterFrame = function () {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
};
Symbol 1133 Button
on (release) {
_root.so2.data.USERNAME = form.user;
if (_root.useRelative) {
form.loadVariables("MBlogin.php", "POST");
} else {
form.loadVariables("http://www.zanzlanz.com/MBlogin.php", "POST");
}
}
Symbol 1142 MovieClip Frame 1
stop();
Symbol 1147 Button
on (release) {
getURL ("http://zanzlanz.com/MBreg.php", "_blank");
}
Symbol 1149 Button
on (release) {
gotoAndStop (5);
}
Symbol 1152 MovieClip Frame 1
if (_parent.showSuccess == false) {
gotoAndStop (30);
}
Symbol 1152 MovieClip Frame 30
stop();
Symbol 1153 Button
on (release) {
_root.loggedIn = false;
gotoAndStop (5);
}
Symbol 1158 MovieClip Frame 2
_parent.form.user = _root.so2.data.USERNAME;
_parent.form.pass = _root.so2.data.PASSWORD;
if (_root.useRelative) {
_parent.form.loadVariables("MBlogin.php", "POST");
} else {
_parent.form.loadVariables("http://www.zanzlanz.com/MBlogin.php", "POST");
}
Symbol 1158 MovieClip Frame 86
_parent.playAlert = true;
_parent.gotoAndStop(2);
Symbol 1159 Button
on (release) {
gotoAndStop (2);
}
Symbol 1161 MovieClip Frame 1
function continueWithLogin() {
if (_root.loggedIn == true) {
gotoAndStop (3);
showSuccess = false;
} else if (_root.loggedIn == false) {
gotoAndStop (5);
} else if (_root.so2.data.autoLogin != true) {
gotoAndStop (5);
} else {
gotoAndStop (4);
}
}
stop();
a1.loadVariables("MBlogin.php", "POST");
a1.onData = function () {
_root.useRelative = true;
_root.login.useRelative = true;
continueWithLogin();
};
a2.loadVariables("http://zanzlanz.com/MBlogin.php", "POST");
a2.onData = function () {
_root.useRelative = false;
_root.login.useRelative = false;
continueWithLogin();
};
Symbol 1161 MovieClip Frame 2
if (playAlert) {
playAlert = false;
erro.play();
}
Instance of Symbol 1137 MovieClip "form" in Symbol 1161 MovieClip Frame 2
onClipEvent (data) {
if (yes == "true") {
if (_parent.stayin.selected) {
_root.so2.data.autoLogin = true;
_root.so2.data.PASSWORD = pass;
} else {
_root.so2.data.autoLogin = false;
}
_root.loggedIn = true;
_parent.gotoAndStop(3);
} else {
_parent.erro.play();
}
}
Instance of Symbol 191 MovieClip [CheckBox] "stayin" in Symbol 1161 MovieClip Frame 2
//component parameters
onClipEvent (construct) {
label = "";
labelPlacement = "right";
selected = true;
}
Symbol 1161 MovieClip Frame 3
onEnterFrame = function () {
_root.useRelative = useRelative;
_root.loggedIn = true;
};
Instance of Symbol 1137 MovieClip "form" in Symbol 1161 MovieClip Frame 4
onClipEvent (data) {
if (yes == "true") {
_root.loggedIn = true;
_parent.gotoAndStop(3);
} else {
_parent.gotoAndStop(2);
_parent.playAlert = true;
}
}
Symbol 1161 MovieClip Frame 5
onEnterFrame = function () {
_root.useRelative = useRelative;
_root.loggedIn = false;
};
Symbol 1165 MovieClip Frame 1
stop();
Symbol 1165 MovieClip Frame 3
stop();
Symbol 1165 MovieClip Frame 4
_root.smash._x = _root._xmouse;
_root.smash._y = _root._ymouse;
_root.smash.play();
Symbol 1167 MovieClip Frame 1
_alpha = 100;
Symbol 1167 MovieClip Frame 2
_alpha = (_alpha - 20);
Symbol 1167 MovieClip Frame 3
_alpha = (_alpha - 20);
Symbol 1167 MovieClip Frame 4
_alpha = (_alpha - 20);
Symbol 1167 MovieClip Frame 5
_alpha = (_alpha - 20);
Symbol 1167 MovieClip Frame 6
_alpha = (_alpha - 20);
stop();
Symbol 1169 Button
on (release) {
gotoAndStop ("game");
}
Symbol 1170 Button
on (release) {
gotoAndStop ("home");
}
Symbol 1177 MovieClip Frame 1
onEnterFrame = function () {
gotoAndStop(_root.darkness);
};
Symbol 1192 MovieClip Frame 1
stop();
onEnterFrame = function () {
gotoAndStop((_root.tim * 10) + Math.min(Math.floor(_root.outOf100 / 10), 9));
};
stop();
onEnterFrame = function () {
gotoAndStop((_root.tim * 10) + Math.min(Math.floor(_root.outOf100 / 10), 9));
};
Symbol 1195 MovieClip Frame 1
onEnterFrame = function () {
_x = (-270 - ((((_root.world._x / 15) - (Math.floor(_root.world._x / 1500) * 100)) / 100) * -975));
if (_root.so.data.worldHeight == 70) {
_y = ((_root.world._y / 3) - 430);
} else {
_y = Math.max(-170, (_root.world._y / 3) - 1000);
}
};
stop();
Symbol 1200 MovieClip Frame 1
stop();
var snd = new Sound(this);
onEnterFrame = function () {
snd.setVolume(_root.so2.data.songVol);
if (_root.tim == 3) {
if (_currentframe == 1) {
gotoAndStop(random(_totalframes - 1) + 2);
}
} else {
gotoAndStop (1);
}
};
Symbol 1204 MovieClip Frame 1
stop();
if (_root.so.data.sceneNum == 2) {
gotoAndStop (2);
}
Symbol 1204 MovieClip Frame 2
var snd = new Sound(this);
onEnterFrame = function () {
snd.setVolume(_root.so2.data.soundVol);
};
Symbol 1205 MovieClip Frame 1
cloudNum = 0;
var i = 1;
while (i <= 26) {
if ((random(5 - (_root.raining * 2)) == 0) && (startCloud != true)) {
startCloud = true;
}
if (startCloud == true) {
if (random(5 + (_root.raining * 3))) {
cloudNum++;
attachMovie("cloud", "cloud" + cloudNum, getNextHighestDepth());
this["cloud" + cloudNum]._x = (i * 25) - 12.5;
this["cloud" + cloudNum]._y = 12.5;
}
if (_root.so2.data.qual > 1) {
if (random(5 + (_root.raining * 3))) {
cloudNum++;
attachMovie("cloud", "cloud" + cloudNum, getNextHighestDepth());
this["cloud" + cloudNum]._x = (i * 25) - 12.5;
this["cloud" + cloudNum]._y = -12.5;
}
if (random(5 + (_root.raining * 3))) {
cloudNum++;
attachMovie("cloud", "cloud" + cloudNum, getNextHighestDepth());
this["cloud" + cloudNum]._x = (i * 25) - 12.5;
this["cloud" + cloudNum]._y = -37.5;
}
}
if (random(10 + (_root.raining * 3)) == 1) {
startCloud = false;
}
}
i++;
}
cloudCount = 0;
_y = (((-_root.so.data.worldHeight) * 30) - 50);
onEnterFrame = function () {
if (!_root.pawsed) {
_x = (((-_parent._x) - 100) - _root.xSpeed);
cloudCount++;
if (cloudCount >= 25) {
if ((random(5 - (_root.raining * 2)) == 0) && (startCloud == false)) {
startCloud = true;
}
if (startCloud == true) {
if (random(5 + (_root.raining * 3))) {
cloudNum++;
attachMovie("cloud", "cloud" + cloudNum, getNextHighestDepth());
this["cloud" + cloudNum]._x = 12.5;
this["cloud" + cloudNum]._y = 12.5;
}
if (_root.so2.data.qual > 1) {
if (random(5 + (_root.raining * 3))) {
cloudNum++;
attachMovie("cloud", "cloud" + cloudNum, getNextHighestDepth());
this["cloud" + cloudNum]._x = 12.5;
this["cloud" + cloudNum]._y = -12.5;
}
if (random(5 + (_root.raining * 3))) {
cloudNum++;
attachMovie("cloud", "cloud" + cloudNum, getNextHighestDepth());
this["cloud" + cloudNum]._x = 12.5;
this["cloud" + cloudNum]._y = -37.5;
}
if (random(10 + (_root.raining * 3)) == 1) {
startCloud = false;
}
}
}
}
if (cloudCount >= 25) {
cloudCount = 0;
}
}
};
Symbol 1206 MovieClip Frame 1
stop();
Symbol 1206 MovieClip Frame 2
function strag(x, y, it) {
x1 = x;
y1 = y;
xDir = (random(2) * 2) - 1;
var _local2 = 0;
while (_local2 <= (random(it / 2) + (it / 2))) {
x1 = x1 + ((random(15) * xDir) / 3);
y1 = y1 + random(5);
_parent.lineTo(x1, y1);
if (random(10) == 1) {
strag(x1, y1, it / 2);
}
_local2++;
}
_parent.moveTo(x, y);
}
_parent.lineStyle(4, 16776960, 50);
startX = (_root.blockX + random(20)) - 9;
startY = _root.worldHeight + 2;
gotoX = startX;
gotoY = startY;
countDown = 5;
var i = 0;
while (i <= 40) {
if ((_root.scene[gotoX][gotoY - i] != undefined) && (_root.waterWalkThroughBlock[_root.scene[gotoX][gotoY - i]] == undefined)) {
gotoY = gotoY - i;
i = 41;
break;
}
if (((gotoY - i) < 10) || (i == 40)) {
gotoX = startX;
gotoY = startY;
i = 0;
countDown--;
if (countDown <= 0) {
gotoAndPlay (1);
i = 41;
break;
}
}
i++;
}
_root.requestSound("boom", ((-_root.world._x) - (gotoX * 30)) + 275, (_root.world._y - (gotoY * 30)) - 200);
if ((Math.abs(Math.round((((-_root.world._x) - (gotoX * 30)) + 275) / 30)) < 3) && (Math.abs(Math.round(((_root.world._y + ((-gotoY) * 30)) - 200) / 30)) < 3)) {
_root.health = _root.health - 5;
_root.ouch(2);
}
for (var i in _root.mobs) {
if ((Math.abs(Math.round((_root.world[_root.mobs[i][1]]._x - (gotoX * 30)) / 30)) < 3) && (Math.abs(Math.round((_root.world[_root.mobs[i][1]]._y + (gotoY * 30)) / 30)) < 3)) {
_root.world[_root.mobs[i][1]].health = _root.world[_root.mobs[i][1]].health - 5;
_root.world[_root.mobs[i][1]].ouch(2);
}
}
gotoX = gotoX - startX;
gotoY = gotoY - startY;
_parent.moveTo(startX * 30, (-startY) * 30);
var i = 0;
while (i <= 50) {
x = (startX * 30) + (((((gotoX * 30) / 50) * i) + random(10)) - 4);
y = ((-startY) * 30) + ((((((-gotoY) * 30) / 50) * i) + random(10)) - 4);
_parent.lineTo(x, y);
if (random(5) == 1) {
strag(x, y, 15);
}
i++;
}
Symbol 1206 MovieClip Frame 3
_parent.clear();
_parent.lineStyle(4, 16776960, 50);
Symbol 1206 MovieClip Frame 4
_parent.moveTo(startX * 30, (-startY) * 30);
var i = 0;
while (i <= 50) {
x = (startX * 30) + (((((gotoX * 30) / 50) * i) + random(10)) - 4);
y = ((-startY) * 30) + ((((((-gotoY) * 30) / 50) * i) + random(10)) - 4);
_parent.lineTo(x, y);
if (random(5) == 1) {
strag(x, y, 15);
}
i++;
}
Symbol 1206 MovieClip Frame 6
_parent.clear();
_parent.lineStyle(4, 16776960, 50);
_parent.moveTo(startX * 30, (-startY) * 30);
var i = 0;
while (i <= 50) {
x = (startX * 30) + (((((gotoX * 30) / 50) * i) + random(10)) - 4);
y = ((-startY) * 30) + ((((((-gotoY) * 30) / 50) * i) + random(10)) - 4);
_parent.lineTo(x, y);
if (random(5) == 1) {
strag(x, y, 15);
}
i++;
}
Symbol 1206 MovieClip Frame 7
_parent.clear();
Symbol 1209 MovieClip Frame 1
onEnterFrame = function () {
swapDepths(_parent.getNextHighestDepth());
};
stop();
Symbol 1214 MovieClip Frame 1
onEnterFrame = function () {
if (_root.sneaking) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
};
Symbol 1224 MovieClip Frame 1
onEnterFrame = function () {
if (_root.wasSprinting) {
if (_currentframe < 28) {
gotoAndPlay (28);
}
} else if (_root.sneaking) {
if ((_currentframe < 12) || (_currentframe > 27)) {
gotoAndPlay (12);
}
} else if (_currentframe > 11) {
gotoAndPlay (1);
}
if (_root.pawsed == true) {
stop();
} else {
play();
}
};
Symbol 1224 MovieClip Frame 11
onEnterFrame = function () {
gotoAndPlay (1);
};
Symbol 1224 MovieClip Frame 12
onEnterFrame = function () {
if (_root.wasSprinting) {
if (_currentframe < 28) {
gotoAndPlay (28);
}
} else if (_root.sneaking) {
if ((_currentframe < 12) || (_currentframe > 27)) {
gotoAndPlay (12);
}
} else if (_currentframe > 11) {
gotoAndPlay (1);
}
if (_root.pawsed == true) {
stop();
} else {
play();
}
};
Symbol 1224 MovieClip Frame 27
onEnterFrame = function () {
gotoAndPlay (12);
};
Symbol 1224 MovieClip Frame 28
onEnterFrame = function () {
if (_root.wasSprinting) {
if (_currentframe < 28) {
gotoAndPlay (28);
}
} else if (_root.sneaking) {
if ((_currentframe < 12) || (_currentframe > 27)) {
gotoAndPlay (12);
}
} else if (_currentframe > 11) {
gotoAndPlay (1);
}
if (_root.pawsed == true) {
stop();
} else {
play();
}
};
Symbol 1224 MovieClip Frame 33
onEnterFrame = function () {
gotoAndPlay (28);
};
Symbol 1329 MovieClip Frame 1
if (_root.sceneNum == 1) {
_rotation = ((_root.tim / 100) * 360);
} else {
_rotation = random(360);
}
Symbol 1363 MovieClip [drop] Frame 1
ty = "br";
tyName = "Bedrock";
tool = false;
if (inventory != true) {
_yscale = 150;
_xscale = 150;
swapDepths(_parent.getNextHighestDepth());
if (_root.drops[_name][0] != undefined) {
_x = _root.drops[_name][0]._x;
_y = _root.drops[_name][1]._y;
gotoAndStop(_root.drops[_name][2]);
damage = _root.drops[_name][4];
xSpeed = 0;
ySpeed = 0;
} else {
_root.drops[_name] = [_x, _y, _currentframe, 0, damage];
xSpeed = random(5) - 2;
ySpeed = (-random(2)) - 2;
}
onEnterFrame = function () {
_root.drops[_name] = [_x, _y, _currentframe, _root.drops[_name][3], damage];
_y = (_y + ySpeed);
_x = (_x + xSpeed);
ySpeed = ySpeed * 0.9;
xSpeed = xSpeed * 0.8;
swapDepths(_parent.getNextHighestDepth());
if ((_root.scene[Math.round((_x - 15) / 30)][-Math.round(_y / 30)] == "la") || (_root.scene[Math.round((_x + 15) / 30) - 1][(-Math.round(_y / 30)) - 1] == "ad")) {
delete _root.drops[_name];
removeMovieClip(this);
_root.requestSound("sizzle", ((-_root.world._x) - _x) + 275, ((-_root.world._x) - _y) + 200);
}
if (((_root.scene[Math.round((_x + 15) / 30) - 1][(-Math.round((_y - 10) / 30)) - 1] == undefined) || (_root.liquids2[_root.scene[Math.round((_x + 15) / 30) - 1][(-Math.round((_y - 10) / 30)) - 1]] != undefined)) || (_root.walkThroughBlock[_root.scene[Math.round((_x + 15) / 30) - 1][(-Math.round((_y - 10) / 30)) - 1]] != undefined)) {
ySpeed = ySpeed + 1;
} else {
ySpeed = 0;
xSpeed = 0;
}
bX = Math.round((_x + 15) / 30) - 1;
bY = (-Math.round((_y - 15) / 30)) - 1;
if (((_root.scene[bX][bY] != undefined) && (_root.liquids2[_root.scene[bX][bY]] == undefined)) && (_root.walkThroughBlock[_root.scene[bX][bY]] == undefined)) {
if (((_root.scene[bX][bY + 1] == undefined) || (_root.liquids2[_root.scene[bX][bY + 1]] != undefined)) || (_root.walkThroughBlock[_root.scene[bX][bY + 1]] != undefined)) {
ySpeed = ySpeed - 2;
} else if (((_root.scene[bX + 1][bY] == undefined) || (_root.liquids2[_root.scene[bX + 1][bY]] != undefined)) || (_root.walkThroughBlock[_root.scene[bX + 1][bY]] != undefined)) {
xSpeed = xSpeed + 2;
} else if (((_root.scene[bX][bY - 1] == undefined) || (_root.liquids2[_root.scene[bX][bY - 1]] != undefined)) || (_root.walkThroughBlock[_root.scene[bX][bY - 1]] != undefined)) {
ySpeed = ySpeed + 2;
} else if (((_root.scene[bX - 1][bY] == undefined) || (_root.liquids2[_root.scene[bX - 1][bY]] != undefined)) || (_root.walkThroughBlock[_root.scene[bX - 1][bY]] != undefined)) {
xSpeed = xSpeed - 2;
} else if (((_root.scene[bX][bY + 2] == undefined) || (_root.liquids2[_root.scene[bX][bY + 2]] != undefined)) || (_root.walkThroughBlock[_root.scene[bX][bY + 2]] != undefined)) {
ySpeed = ySpeed - 5;
} else if (((_root.scene[bX + 2][bY] == undefined) || (_root.liquids2[_root.scene[bX + 2][bY]] != undefined)) || (_root.walkThroughBlock[_root.scene[bX + 2][bY]] != undefined)) {
xSpeed = xSpeed + 5;
} else if (((_root.scene[bX][bY - 2] == undefined) || (_root.liquids2[_root.scene[bX][bY - 2]] != undefined)) || (_root.walkThroughBlock[_root.scene[bX][bY - 2]] != undefined)) {
ySpeed = ySpeed + 5;
} else if (((_root.scene[bX - 2][bY] == undefined) || (_root.liquids2[_root.scene[bX - 2][bY]] != undefined)) || (_root.walkThroughBlock[_root.scene[bX - 2][bY]] != undefined)) {
xSpeed = xSpeed - 5;
} else if (((_root.scene[bX][bY + 3] == undefined) || (_root.liquids2[_root.scene[bX][bY + 3]] != undefined)) || (_root.walkThroughBlock[_root.scene[bX][bY + 3]] != undefined)) {
ySpeed = ySpeed - 10;
} else if (((_root.scene[bX + 3][bY] == undefined) || (_root.liquids2[_root.scene[bX + 3][bY]] != undefined)) || (_root.walkThroughBlock[_root.scene[bX + 3][bY]] != undefined)) {
xSpeed = xSpeed + 10;
} else if (((_root.scene[bX][bY - 3] == undefined) || (_root.liquids2[_root.scene[bX][bY - 3]] != undefined)) || (_root.walkThroughBlock[_root.scene[bX][bY - 3]] != undefined)) {
ySpeed = ySpeed + 10;
} else if (((_root.scene[bX - 3][bY] == undefined) || (_root.liquids2[_root.scene[bX - 3][bY]] != undefined)) || (_root.walkThroughBlock[_root.scene[bX - 3][bY]] != undefined)) {
xSpeed = xSpeed - 10;
}
}
if (this.hitTest(_root.char)) {
var _local4 = 1;
while (_local4 <= 45) {
if (((_root.inventoryList[_local4 - 1][0] == ty) && (_root.inventoryList[_local4 - 1][1] < 64)) && (_root.unstackables[ty] == undefined)) {
_root.inventoryList[_local4 - 1][1]++;
_root.requestSound("pop", 0, 0);
_local4 = 46;
delete _root.drops[_name];
removeMovieClip(this);
}
_local4++;
}
_local4 = 1;
while (_local4 <= 45) {
if (_root.inventoryList[_local4 - 1][0] == undefined) {
_root.inventoryList[_local4 - 1][0] = ty;
_root.inventoryList[_local4 - 1][1] = 1;
_root.inventoryList[_local4 - 1][2] = damage;
_root.requestSound("pop", 0, 0);
_local4 = 46;
delete _root.drops[_name];
removeMovieClip(this);
}
_local4++;
}
}
};
}
Symbol 1363 MovieClip [drop] Frame 2
ty = undefined;
delete _root.drops[_name];
removeMovieClip(this);
Symbol 1363 MovieClip [drop] Frame 3
ty = "r";
tyName = "Rock";
tool = false;
Symbol 1363 MovieClip [drop] Frame 4
ty = "dt";
tyName = "Dirt";
tool = false;
Symbol 1363 MovieClip [drop] Frame 5
ty = "wd";
tyName = "Wood";
tool = false;
Symbol 1363 MovieClip [drop] Frame 6
ty = "sl";
tyName = "Sapling";
tool = false;
Symbol 1363 MovieClip [drop] Frame 7
ty = "dm";
tyName = "Diamond";
tool = false;
Symbol 1363 MovieClip [drop] Frame 8
ty = "gd";
tyName = "Gold Ore";
tool = false;
Symbol 1363 MovieClip [drop] Frame 9
ty = "in";
tyName = "Iron Ore";
tool = false;
Symbol 1363 MovieClip [drop] Frame 10
ty = "cl";
tyName = "Coal";
tool = false;
Symbol 1363 MovieClip [drop] Frame 11
ty = "rsd";
tyName = "Redstone Dust";
tool = false;
Symbol 1363 MovieClip [drop] Frame 12
ty = "sd";
tyName = "Sand";
tool = false;
Symbol 1363 MovieClip [drop] Frame 13
ty = "ct";
tyName = "Cactus";
tool = false;
Symbol 1363 MovieClip [drop] Frame 14
ty = "cs";
tyName = "Cobblestone";
tool = false;
Symbol 1363 MovieClip [drop] Frame 15
ty = "ms";
tyName = "Moss Stone";
tool = false;
Symbol 1363 MovieClip [drop] Frame 16
ty = "ob";
tyName = "Obsidian";
tool = false;
Symbol 1363 MovieClip [drop] Frame 17
ty = "ap";
tyName = "Apple";
tool = false;
Symbol 1363 MovieClip [drop] Frame 18
ty = "gap";
tyName = "Golden Apple";
tool = false;
Symbol 1363 MovieClip [drop] Frame 19
ty = "or";
tyName = "Orange";
tool = false;
Symbol 1363 MovieClip [drop] Frame 20
ty = "wp";
tyName = "Wooden Planks";
tool = false;
Symbol 1363 MovieClip [drop] Frame 21
ty = "st";
tyName = "Sticks";
tool = false;
Symbol 1363 MovieClip [drop] Frame 22
ty = "th";
tyName = "Torch";
tool = false;
Symbol 1363 MovieClip [drop] Frame 23
ty = "craft";
tyName = "Crafting Table";
tool = false;
Symbol 1363 MovieClip [drop] Frame 24
ty = "WoodenPickaxe";
tyName = "Wooden Pickaxe";
tool = true;
Symbol 1363 MovieClip [drop] Frame 25
ty = "StonePickaxe";
tyName = "Stone Pickaxe";
tool = true;
Symbol 1363 MovieClip [drop] Frame 26
ty = "IronPickaxe";
tyName = "Iron Pickaxe";
tool = true;
Symbol 1363 MovieClip [drop] Frame 27
ty = "GoldPickaxe";
tyName = "Golden Pickaxe";
tool = true;
Symbol 1363 MovieClip [drop] Frame 28
ty = "DiamondPickaxe";
tyName = "Diamond Pickaxe";
tool = true;
Symbol 1363 MovieClip [drop] Frame 29
ty = "ObsidianPickaxe";
tyName = "Obsidian Pickaxe";
tool = true;
Symbol 1363 MovieClip [drop] Frame 30
ty = "WoodenHoe";
tyName = "Wooden Hoe";
tool = true;
Symbol 1363 MovieClip [drop] Frame 31
ty = "StoneHoe";
tyName = "Stone Hoe";
tool = true;
Symbol 1363 MovieClip [drop] Frame 32
ty = "IronHoe";
tyName = "Iron Hoe";
tool = true;
Symbol 1363 MovieClip [drop] Frame 33
ty = "GoldHoe";
tyName = "Golden Hoe";
tool = true;
Symbol 1363 MovieClip [drop] Frame 34
ty = "DiamondHoe";
tyName = "Diamond Hoe";
tool = true;
Symbol 1363 MovieClip [drop] Frame 35
ty = "WoodenAxe";
tyName = "Wooden Axe";
tool = true;
Symbol 1363 MovieClip [drop] Frame 36
ty = "StoneAxe";
tyName = "Stone Axe";
tool = true;
Symbol 1363 MovieClip [drop] Frame 37
ty = "IronAxe";
tyName = "Iron Axe";
tool = true;
Symbol 1363 MovieClip [drop] Frame 38
ty = "GoldAxe";
tyName = "Golden Axe";
tool = true;
Symbol 1363 MovieClip [drop] Frame 39
ty = "DiamondAxe";
tyName = "Diamond Axe";
tool = true;
Symbol 1363 MovieClip [drop] Frame 40
ty = "WoodenShovel";
tyName = "Wooden Shovel";
tool = true;
Symbol 1363 MovieClip [drop] Frame 41
ty = "StoneShovel";
tyName = "Stone Shovel";
tool = true;
Symbol 1363 MovieClip [drop] Frame 42
ty = "IronShovel";
tyName = "Iron Shovel";
tool = true;
Symbol 1363 MovieClip [drop] Frame 43
ty = "GoldShovel";
tyName = "Golden Shovel";
tool = true;
Symbol 1363 MovieClip [drop] Frame 44
ty = "DiamondShovel";
tyName = "Diamond Shovel";
tool = true;
Symbol 1363 MovieClip [drop] Frame 45
ty = "WoodenSword";
tyName = "Wooden Sword";
tool = true;
Symbol 1363 MovieClip [drop] Frame 46
ty = "StoneSword";
tyName = "Stone Sword";
tool = true;
Symbol 1363 MovieClip [drop] Frame 47
ty = "IronSword";
tyName = "Iron Sword";
tool = true;
Symbol 1363 MovieClip [drop] Frame 48
ty = "GoldenSword";
tyName = "Golden Sword";
tool = true;
Symbol 1363 MovieClip [drop] Frame 49
ty = "DiamondSword";
tyName = "Diamond Sword";
tool = true;
Symbol 1363 MovieClip [drop] Frame 50
ty = "dr";
tyName = "Wooden Door";
tool = false;
Symbol 1363 MovieClip [drop] Frame 51
ty = "oven";
tyName = "Smelter/Oven";
tool = false;
Symbol 1363 MovieClip [drop] Frame 52
ty = "ii";
tyName = "Iron Ingot";
tool = false;
Symbol 1363 MovieClip [drop] Frame 53
ty = "gi";
tyName = "Gold Ingot";
tool = false;
Symbol 1363 MovieClip [drop] Frame 54
ty = "gs";
tyName = "Glass";
tool = false;
Symbol 1363 MovieClip [drop] Frame 55
ty = "sw";
tyName = "Seaweed";
tool = false;
Symbol 1363 MovieClip [drop] Frame 56
ty = "fw1";
tyName = "Yellow Flower";
tool = false;
Symbol 1363 MovieClip [drop] Frame 57
ty = "fw2";
tyName = "Red Flower";
tool = false;
Symbol 1363 MovieClip [drop] Frame 58
ty = "ms1";
tyName = "Mushroom";
tool = false;
Symbol 1363 MovieClip [drop] Frame 59
ty = "ms2";
tyName = "Mushroom";
tool = false;
Symbol 1363 MovieClip [drop] Frame 60
ty = "bowl";
tyName = "Bowl";
tool = false;
Symbol 1363 MovieClip [drop] Frame 61
ty = "soup";
tyName = "Soup";
tool = false;
Symbol 1363 MovieClip [drop] Frame 62
ty = "pk";
tyName = "Pumpkin";
tool = false;
Symbol 1363 MovieClip [drop] Frame 63
ty = "jl";
tyName = "Jack-o'-Lantern";
tool = false;
Symbol 1363 MovieClip [drop] Frame 64
ty = "coral";
tyName = "Coral";
tool = false;
Symbol 1363 MovieClip [drop] Frame 65
ty = "ladder";
tyName = "Ladder";
tool = false;
Symbol 1363 MovieClip [drop] Frame 66
ty = "chest";
tyName = "Chest";
tool = false;
Symbol 1363 MovieClip [drop] Frame 67
ty = "ib";
tyName = "Block of Iron";
tool = false;
Symbol 1363 MovieClip [drop] Frame 68
ty = "gb";
tyName = "Block of Gold";
tool = false;
Symbol 1363 MovieClip [drop] Frame 69
ty = "db";
tyName = "Block of Diamonds";
tool = false;
Symbol 1363 MovieClip [drop] Frame 70
ty = "gss";
tyName = "Glass Shard";
tool = false;
Symbol 1363 MovieClip [drop] Frame 71
ty = "bk";
tyName = "Empty Bucket";
tool = false;
Symbol 1363 MovieClip [drop] Frame 72
ty = "mbk";
tyName = "Bucket of Milk";
tool = false;
Symbol 1363 MovieClip [drop] Frame 73
ty = "wbk";
tyName = "Bucket of Water";
tool = false;
Symbol 1363 MovieClip [drop] Frame 74
ty = "lbk";
tyName = "Bucket of Lava";
tool = false;
Symbol 1363 MovieClip [drop] Frame 75
ty = "abk";
tyName = "Bucket of Acid";
tool = false;
Symbol 1363 MovieClip [drop] Frame 76
ty = "snowb";
tyName = "Snow Ball";
tool = false;
Symbol 1363 MovieClip [drop] Frame 77
ty = "snowblock";
tyName = "Snow";
tool = false;
Symbol 1363 MovieClip [drop] Frame 78
ty = "ice";
tyName = "Ice";
tool = false;
Symbol 1363 MovieClip [drop] Frame 79
ty = "fiber";
tyName = "Fiber";
tool = false;
Symbol 1363 MovieClip [drop] Frame 80
ty = "clothgreen";
tyName = "Green Cloth";
tool = false;
Symbol 1363 MovieClip [drop] Frame 81
ty = "clothwhite";
tyName = "White Cloth";
tool = false;
Symbol 1363 MovieClip [drop] Frame 82
ty = "clothred";
tyName = "Red Cloth";
tool = false;
Symbol 1363 MovieClip [drop] Frame 83
ty = "clothyellow";
tyName = "Yellow Cloth";
tool = false;
Symbol 1363 MovieClip [drop] Frame 84
ty = "dyeyellow";
tyName = "Yellow Dye";
tool = false;
Symbol 1363 MovieClip [drop] Frame 85
ty = "dyered";
tyName = "Red Dye";
tool = false;
Symbol 1363 MovieClip [drop] Frame 86
ty = "dyeorange";
tyName = "Orange Dye";
tool = false;
Symbol 1363 MovieClip [drop] Frame 87
ty = "clothorange";
tyName = "Orange Cloth";
tool = false;
Symbol 1363 MovieClip [drop] Frame 88
ty = "bed";
tyName = "Bed";
tool = false;
Symbol 1363 MovieClip [drop] Frame 89
ty = "TNT";
tyName = "Trinitrotoluene";
tool = false;
Symbol 1363 MovieClip [drop] Frame 90
ty = "rp";
tyName = "Rope";
tool = false;
Symbol 1363 MovieClip [drop] Frame 91
ty = "bb";
tyName = "Bamboo";
tool = false;
Symbol 1363 MovieClip [drop] Frame 92
ty = "sc";
tyName = "Sugarcane";
tool = false;
Symbol 1363 MovieClip [drop] Frame 93
ty = "sugar";
tyName = "Sugar";
tool = false;
Symbol 1363 MovieClip [drop] Frame 94
ty = "cake";
tyName = "Cake";
tool = false;
Symbol 1363 MovieClip [drop] Frame 95
ty = "Shear";
tyName = "Shear";
tool = true;
Symbol 1363 MovieClip [drop] Frame 96
ty = "moss";
tyName = "Moss";
tool = false;
Symbol 1363 MovieClip [drop] Frame 97
ty = "raft";
tyName = "Raft";
tool = false;
Symbol 1363 MovieClip [drop] Frame 98
ty = "lv";
tyName = "Leaves";
tool = false;
Symbol 1363 MovieClip [drop] Frame 99
ty = "cy";
tyName = "Clay";
tool = false;
Symbol 1363 MovieClip [drop] Frame 100
ty = "brick";
tyName = "Brick";
tool = false;
Symbol 1363 MovieClip [drop] Frame 101
ty = "bricks";
tyName = "Bricks";
tool = false;
Symbol 1363 MovieClip [drop] Frame 102
ty = "clock";
tyName = "Clock";
tool = false;
Symbol 1363 MovieClip [drop] Frame 103
ty = "gv";
tyName = "Gravel";
tool = false;
Symbol 1363 MovieClip [drop] Frame 104
ty = "flint";
tyName = "Flint";
tool = false;
Symbol 1363 MovieClip [drop] Frame 105
ty = "fas";
tyName = "Flint and Steel";
tool = true;
Symbol 1363 MovieClip [drop] Frame 106
ty = "feather";
tyName = "Feather";
tool = false;
Symbol 1363 MovieClip [drop] Frame 107
ty = "pork";
tyName = "Raw Porkchop";
tool = false;
Symbol 1363 MovieClip [drop] Frame 108
ty = "cpork";
tyName = "Cooked Porkchop";
tool = false;
Symbol 1363 MovieClip [drop] Frame 109
ty = "gp";
tyName = "Gun Powder";
tool = false;
Symbol 1363 MovieClip [drop] Frame 110
ty = "leather";
tyName = "Leather";
tool = false;
Symbol 1363 MovieClip [drop] Frame 111
ty = "rstorch";
tyName = "Redstone Torch";
tool = false;
Symbol 1363 MovieClip [drop] Frame 112
ty = "button";
tyName = "Button";
tool = false;
Symbol 1363 MovieClip [drop] Frame 113
ty = "pp";
tyName = "Pressure Plate";
tool = false;
Symbol 1363 MovieClip [drop] Frame 114
ty = "lever";
tyName = "Lever";
tool = false;
Symbol 1363 MovieClip [drop] Frame 115
ty = "oddrock";
tyName = "Odd Rock";
tool = false;
Symbol 1363 MovieClip [drop] Frame 116
ty = "mobSpawner";
tyName = "Monster Spawner";
tool = false;
Symbol 1363 MovieClip [drop] Frame 117
ty = "ortorch";
tyName = "Odd Torch";
tool = false;
Symbol 1363 MovieClip [drop] Frame 118
ty = "n";
tyName = "Nether Rock";
tool = false;
Symbol 1363 MovieClip [drop] Frame 119
ty = "nb";
tyName = "Nether Brick";
tool = false;
Symbol 1363 MovieClip [drop] Frame 120
ty = "portalstone";
tyName = "Portal Stone";
tool = false;
Symbol 1363 MovieClip [drop] Frame 121
ty = "glow";
tyName = "Glow Stone";
tool = false;
Symbol 1363 MovieClip [drop] Frame 122
ty = "yellowdust";
tyName = "Glowstone Dust";
tool = false;
Symbol 1363 MovieClip [drop] Frame 123
ty = "note";
tyName = "Note Block";
tool = false;
Symbol 1363 MovieClip [drop] Frame 124
ty = "piston";
tyName = "Piston";
tool = false;
Symbol 1363 MovieClip [drop] Frame 125
ty = "chicken";
tyName = "Raw Chicken";
tool = false;
Symbol 1363 MovieClip [drop] Frame 126
ty = "cchicken";
tyName = "Cooked Chicken";
tool = false;
Symbol 1363 MovieClip [drop] Frame 127
ty = "nugget";
tyName = "Chicken Nuggets";
tool = false;
Symbol 1363 MovieClip [drop] Frame 128
ty = "rail";
tyName = "Minecart Rail";
tool = false;
Symbol 1363 MovieClip [drop] Frame 129
ty = "cart";
tyName = "Minecart";
tool = false;
Symbol 1363 MovieClip [drop] Frame 130
ty = "ss";
tyName = "Sandstone";
tool = false;
Symbol 1363 MovieClip [drop] Frame 131
ty = "bow";
tyName = "Bow";
tool = false;
Symbol 1363 MovieClip [drop] Frame 132
ty = "arrow";
tyName = "Arrow";
tool = false;
Symbol 1363 MovieClip [drop] Frame 133
ty = "topaz";
tyName = "Topaz";
tool = false;
Symbol 1363 MovieClip [drop] Frame 134
ty = "j";
tyName = "J";
tool = false;
Symbol 1363 MovieClip [drop] Frame 135
ty = "seed";
tyName = "Seeds";
tool = false;
Symbol 1363 MovieClip [drop] Frame 136
ty = "wheat";
tyName = "Wheat";
tool = false;
Symbol 1363 MovieClip [drop] Frame 137
ty = "bread";
tyName = "Bread";
tool = false;
Symbol 1363 MovieClip [drop] Frame 138
ty = "egg";
tyName = "Egg";
tool = false;
Symbol 1363 MovieClip [drop] Frame 139
ty = "sb";
tyName = "Stone Brick";
tool = false;
Symbol 1363 MovieClip [drop] Frame 140
ty = "sign";
tyName = "Sign";
tool = false;
Symbol 1363 MovieClip [drop] Frame 141
ty = "gasd";
tyName = "Golden Apple Seed";
tool = false;
Symbol 1363 MovieClip [drop] Frame 142
ty = "paper";
tyName = "Paper";
tool = false;
Symbol 1363 MovieClip [drop] Frame 143
ty = "book";
tyName = "Book";
tool = false;
Symbol 1363 MovieClip [drop] Frame 144
ty = "books";
tyName = "Bookshelf";
tool = false;
Symbol 1363 MovieClip [drop] Frame 145
ty = "light";
tyName = "Light bulb";
tool = false;
Symbol 1363 MovieClip [drop] Frame 146
ty = "halfcs";
tyName = "Cobblestone Slab";
tool = false;
Symbol 1370 MovieClip Frame 1
onEnterFrame = function () {
if (_root.pawsed == true) {
stop();
} else {
play();
}
};
Instance of Symbol 1363 MovieClip [drop] "i1" in Symbol 1370 MovieClip Frame 1
onClipEvent (load) {
inventory = true;
if (_root.selectedInventoryItemType != undefined) {
_alpha = 100;
gotoAndStop(_root.selectedInventoryItemType);
} else {
_alpha = 0;
}
}
Symbol 1370 MovieClip Frame 2
_root.blockSound(_parent.sound[0], _parent.sound[1], _parent.sound[2], _parent.sound[3]);
Instance of Symbol 1363 MovieClip [drop] "i2" in Symbol 1370 MovieClip Frame 3
onClipEvent (load) {
inventory = true;
if (_root.selectedInventoryItemType != undefined) {
_alpha = 100;
gotoAndStop(_root.selectedInventoryItemType);
} else {
_alpha = 0;
}
}
Instance of Symbol 1363 MovieClip [drop] "i1" in Symbol 1370 MovieClip Frame 5
onClipEvent (load) {
inventory = true;
if (_root.selectedInventoryItemType != undefined) {
_alpha = 100;
gotoAndStop(_root.selectedInventoryItemType);
} else {
_alpha = 0;
}
}
Instance of Symbol 1363 MovieClip [drop] "i4" in Symbol 1370 MovieClip Frame 7
onClipEvent (load) {
inventory = true;
if (_root.selectedInventoryItemType != undefined) {
_alpha = 100;
gotoAndStop(_root.selectedInventoryItemType);
} else {
_alpha = 0;
}
}
Symbol 1370 MovieClip Frame 10
if (_root.stopMiningAnimation) {
_root.stopMiningAnimation = false;
_root.miningAnimation = false;
}
gotoAndPlay (1);
Symbol 1373 MovieClip Frame 4
_root.hurtAnimation = false;
Symbol 1376 MovieClip Frame 1
stop();
Symbol 1382 MovieClip Frame 1
stop();
Symbol 1382 MovieClip Frame 5
if (random(3) == 1) {
gotoAndPlay (2);
}
Symbol 1387 Button
on (release) {
if (_root.inventory._currentframe == 1) {
_root.inventory.gotoAndStop("store");
}
}
Symbol 1388 MovieClip Frame 1
onEnterFrame = function () {
if (_root.loggedIn) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
};
stop();
Symbol 1389 MovieClip Frame 1
function newLine(t) {
lastMessage++;
m = attachMovie("cm", "cm" + lastMessage, getNextHighestDepth());
for (var _local2 in messages) {
this[_local2]._y = this[_local2]._y - 15;
}
messages["cm" + lastMessage] = "cm" + lastMessage;
m.t = t;
}
lastMessage = 0;
messages = new Object();
Symbol 1396 MovieClip Frame 1
stop();
if (_parent._name == "fuel") {
onEnterFrame = function () {
goto = 1;
if (hitTest(_root._xmouse, _root._ymouse)) {
goto = 2;
if ((mouse == "down") || (_root.rightClickTimer == 1)) {
goto = 1;
if (_root.inventory.dragger._currentframe == 2) {
if (_root.fuels[_root.inventory.dragger.ty] != undefined) {
_parent.ty = _root.inventory.dragger.ty;
_parent.count = _root.inventory.dragger.count;
_root.toSmelt[_root.inventory.smelter][2] = _parent.ty;
_root.toSmelt[_root.inventory.smelter][3] = _parent.count;
_root.inventory.dragger.gotoAndStop(1);
_parent.gotoAndStop(2);
}
}
}
}
gotoAndStop(goto);
};
} else if (_parent._name == "cook") {
onEnterFrame = function () {
goto = 1;
if (hitTest(_root._xmouse, _root._ymouse)) {
goto = 2;
if ((mouse == "down") || (_root.rightClickTimer == 1)) {
goto = 1;
if (_root.inventory.dragger._currentframe == 2) {
if (_root.smeltables[_root.inventory.dragger.ty] != undefined) {
_parent.ty = _root.inventory.dragger.ty;
_parent.count = _root.inventory.dragger.count;
_root.toSmelt[_root.inventory.smelter][0] = _parent.ty;
_root.toSmelt[_root.inventory.smelter][1] = _parent.count;
_root.inventory.dragger.gotoAndStop(1);
_parent.gotoAndStop(2);
}
}
}
}
gotoAndStop(goto);
};
} else if ((_parent._name == "output") || (_parent._name == "output2")) {
} else if (_parent._name.substr(0, 1) == "c") {
onEnterFrame = function () {
goto = 1;
if (hitTest(_root._xmouse, _root._ymouse)) {
goto = 2;
if ((mouse == "down") || (_root.rightClickTimer == 1)) {
goto = 1;
if (_root.inventory.dragger._currentframe == 2) {
if (_root.shifting) {
if (_root.inventory.dragger.count == "") {
_parent.ty = _root.inventory.dragger.ty;
_parent.damage = _root.inventory.dragger.damage;
_parent.count = "";
_root.inventory.dragger.gotoAndStop(1);
} else {
_parent.ty = _root.inventory.dragger.ty;
_parent.count = "";
_root.inventory.dragger.count--;
if (_root.inventory.dragger.count == 1) {
_root.inventory.dragger.count = "";
}
}
_parent.gotoAndStop(2);
} else {
_parent.ty = _root.inventory.dragger.ty;
_parent.count = _root.inventory.dragger.count;
_parent.damage = _root.inventory.dragger.damage;
_root.inventory.dragger.gotoAndStop(1);
_parent.gotoAndStop(2);
}
}
}
}
gotoAndStop(goto);
};
} else if (_parent.mini != true) {
onEnterFrame = function () {
goto = 1;
if (hitTest(_root._xmouse, _root._ymouse)) {
goto = 2;
if ((mouse == "down") || (_root.rightClickTimer == 1)) {
goto = 1;
if (_root.inventory.dragger._currentframe == 2) {
_parent.ty = _root.inventory.dragger.ty;
_parent.count = _root.inventory.dragger.count;
_parent.damage = _root.inventory.dragger.damage;
if (_parent._name.substr(0, 1) == "i") {
_root.inventoryList[_parent.number][0] = _parent.ty;
_root.inventoryList[_parent.number][1] = _parent.count;
_root.inventoryList[_parent.number][2] = _parent.damage;
}
_root.inventory.dragger.gotoAndStop(1);
_parent.gotoAndStop(2);
}
}
}
gotoAndStop(goto);
};
} else {
onEnterFrame = function () {
if (_root.selectedInventoryItem == _parent.number) {
_root.selectedInventoryItemType = undefined;
_root.selectedInventoryTool = false;
gotoAndStop (2);
} else {
gotoAndStop (1);
}
};
}
this.onMouseDown = function () {
mouse = "down";
};
this.onMouseUp = function () {
mouse = "up";
};
Symbol 1399 MovieClip Frame 1
stop();
if (_parent.typ.tool == false) {
_parent.damage = 0;
_root.inventoryList[_parent.number][2] == 0;
}
if (_parent._name == "fuel") {
onEnterFrame = function () {
goto = 1;
if (hitTest(_root._xmouse, _root._ymouse)) {
_root.inventory.toolTip.tyName = _parent.typ.tyName;
_root.inventory.toolTip.gotoAndPlay(2);
if (waitTillMouseIsUp != true) {
goto = 2;
if ((mouse == "down") || (_root.rightClickTimer == 1)) {
goto = 1;
if (_root.inventory.dragger._currentframe == 2) {
if (_root.fuels[_root.inventory.dragger.ty] != undefined) {
if (_root.inventory.dragger.count == "") {
_root.inventory.dragger.count = 1;
}
if (_parent.count == "") {
_parent.count = 1;
}
if (_root.inventory.dragger.ty == _parent.ty) {
if ((64 - _parent.count) >= _root.inventory.dragger.count) {
_parent.count = _parent.count + _root.inventory.dragger.count;
_root.toSmelt[_root.inventory.smelter][3] = _parent.count;
_root.inventory.dragger.gotoAndStop(1);
} else if ((64 - _parent.count) < _root.inventory.dragger.count) {
_root.inventory.dragger.count = _root.inventory.dragger.count - (64 - _parent.count);
_parent.count = 64;
_root.toSmelt[_root.inventory.smelter][3] = _parent.count;
}
if (_root.inventory.dragger.count == 1) {
_root.inventory.dragger.count = "";
}
}
waitTillMouseIsUp = true;
}
} else {
_root.inventory.dragger.ty = _parent.ty;
_root.inventory.dragger.count = _parent.count;
_root.toSmelt[_root.inventory.smelter][2] = undefined;
_root.toSmelt[_root.inventory.smelter][3] = undefined;
_root.inventory.dragger.gotoAndStop(2);
_parent.gotoAndStop(1);
}
}
}
}
};
} else if (_parent._name == "cook") {
onEnterFrame = function () {
goto = 1;
if (hitTest(_root._xmouse, _root._ymouse)) {
_root.inventory.toolTip.tyName = _parent.typ.tyName;
_root.inventory.toolTip.gotoAndPlay(2);
goto = 2;
if (waitTillMouseIsUp != true) {
if ((mouse == "down") || (_root.rightClickTimer == 1)) {
goto = 1;
if (_root.inventory.dragger._currentframe == 2) {
if (_root.smeltables[_root.inventory.dragger.ty] != undefined) {
if (_root.inventory.dragger.ty == _parent.ty) {
if (_root.inventory.dragger.count == "") {
_root.inventory.dragger.count = 1;
}
if (_parent.count == "") {
_parent.count = 1;
}
if ((64 - _parent.count) >= _root.inventory.dragger.count) {
_parent.count = _parent.count + _root.inventory.dragger.count;
_root.toSmelt[_root.inventory.smelter][1] = _parent.count;
_root.inventory.dragger.gotoAndStop(1);
} else if ((64 - _parent.count) < _root.inventory.dragger.count) {
_root.inventory.dragger.count = _root.inventory.dragger.count - (64 - _parent.count);
_parent.count = 64;
_root.toSmelt[_root.inventory.smelter][1] = _parent.count;
}
if (_root.inventory.dragger.count == 1) {
_root.inventory.dragger.count = "";
}
waitTillMouseIsUp = true;
}
}
} else {
_root.inventory.dragger.ty = _parent.ty;
_root.inventory.dragger.count = _parent.count;
_root.toSmelt[_root.inventory.smelter][0] = undefined;
_root.toSmelt[_root.inventory.smelter][1] = undefined;
_root.inventory.dragger.gotoAndStop(2);
_parent.gotoAndStop(1);
}
}
}
}
};
} else if ((_parent._name == "output") || (_parent._name == "output2")) {
onEnterFrame = function () {
goto = 1;
if (hitTest(_root._xmouse, _root._ymouse)) {
_root.inventory.toolTip.tyName = _parent.typ.tyName;
_root.inventory.toolTip.gotoAndPlay(2);
goto = 2;
if (waitTillMouseIsUp != true) {
if ((mouse == "down") || (_root.rightClickTimer == 1)) {
if ((_root.achieve == 2) && (_parent.ty == "craft")) {
_root.achieve = 3;
_root.achieveGet.gotoAndPlay(1);
}
if ((_root.achieve == 4) && (_parent.ty == "WoodenPickaxe")) {
_root.achieve = 5;
_root.achieveGet.gotoAndPlay(1);
}
if ((_root.achieve == 5) && (_parent.ty == "th")) {
_root.achieve = 6;
_root.achieveGet.gotoAndPlay(1);
}
if ((_root.achieve == 6) && (_parent.ty == "StonePickaxe")) {
_root.achieve = 7;
_root.achieveGet.gotoAndPlay(1);
}
if (((_root.achieve == 8) && (_parent.ty == "ii")) && (_parent._name == "output2")) {
_root.achieve = 9;
_root.achieveGet.gotoAndPlay(1);
}
if (((_root.achieve == 10) && (_parent.ty == "gi")) && (_parent._name == "output2")) {
_root.achieve = 11;
_root.achieveGet.gotoAndPlay(1);
}
if ((substring(_parent.ty, 0, 7)) == "Diamond") {
_root.pxdnes.toAdd = _root.pxdnes.toAdd + 10;
}
goto = 1;
if (_root.inventory.dragger._currentframe == 2) {
if (_root.inventory.dragger.ty == _parent.ty) {
if (_root.inventory.dragger.typ.tool == true) {
damageTemp = _parent.damage;
_parent.damage = _root.inventory.dragger.damage;
_root.inventoryList[_parent.number][2] = _parent.damage;
_root.inventory.dragger.damage = damageTemp;
} else {
if (_root.inventory.dragger.count == "") {
_root.inventory.dragger.count = 1;
}
if (_parent.count == "") {
_parent.count = 1;
}
if ((_root.unstackables[_parent.ty] == undefined) && ((64 - _root.inventory.dragger.count) >= _parent.count)) {
_root.inventory.dragger.count = _root.inventory.dragger.count + _parent.count;
if (_parent._name == "output2") {
_root.toSmelt[_root.inventory.smelter][6] = undefined;
_root.toSmelt[_root.inventory.smelter][7] = 0;
}
var _local3 = 1;
while (_local3 <= _root.inventory.blocks.length) {
if (_root.inventory["c" + _local3].count == "") {
_root.inventory["c" + _local3].gotoAndStop(1);
} else {
_root.inventory["c" + _local3].count--;
if (_root.inventory["c" + _local3].count == 1) {
_root.inventory["c" + _local3].count = "";
}
}
_local3++;
}
_parent.gotoAndStop(1);
}
}
}
} else {
_root.inventory.dragger.count = _parent.count;
_root.inventory.dragger.ty = _parent.ty;
_root.inventory.dragger.damage = _parent.damage;
_root.inventory.dragger.gotoAndStop(2);
if (_parent._name == "output2") {
_root.toSmelt[_root.inventory.smelter][6] = undefined;
_root.toSmelt[_root.inventory.smelter][7] = 0;
} else {
var _local3 = 1;
while (_local3 <= _root.inventory.blocks.length) {
if (_root.inventory["c" + _local3].count == "") {
_root.inventory["c" + _local3].gotoAndStop(1);
} else {
_root.inventory["c" + _local3].count--;
if (_root.inventory["c" + _local3].count == 1) {
_root.inventory["c" + _local3].count = "";
}
}
_local3++;
}
}
_parent.gotoAndStop(1);
}
}
}
}
gotoAndStop(goto);
};
} else if ((_parent.mini != true) || (_parent._name.substr(0, 1) == "c")) {
onEnterFrame = function () {
goto = 1;
if (hitTest(_root._xmouse, _root._ymouse)) {
_root.inventory.toolTip.tyName = _parent.typ.tyName;
_root.inventory.toolTip.gotoAndPlay(2);
goto = 2;
if (waitTillMouseIsUp != true) {
if ((mouse == "down") || (_root.rightClickTimer == 1)) {
if ((_root.unstackables[_root.inventory.dragger.ty] == undefined) || (_root.inventory.dragger.count != 0)) {
goto = 1;
if (_root.inventory.dragger._currentframe == 2) {
waitTillMouseIsUp = true;
if (_root.inventory.dragger.count == "") {
_root.inventory.dragger.count = 1;
}
if (_parent.count == "") {
_parent.count = 1;
}
if (_root.shifting) {
if ((_root.inventory.dragger.ty == _parent.ty) && (_root.unstackables[_parent.ty] == undefined)) {
if (_parent.count < 64) {
if (_root.inventory.dragger.count == 1) {
_parent.ty = _root.inventory.dragger.ty;
_parent.count++;
_root.inventoryList[_parent.number][1] = _parent.count;
_root.inventory.dragger.gotoAndStop(1);
} else {
_parent.ty = _root.inventory.dragger.ty;
_parent.count++;
if (_parent._name.substr(0, 1) == "i") {
_root.inventoryList[_parent.number][1] = _parent.count;
}
_root.inventory.dragger.count--;
if (_root.inventory.dragger.count == 1) {
_root.inventory.dragger.count = "";
}
}
}
}
} else if (((_root.inventory.dragger.ty == _parent.ty) && (_parent.count < 64)) && (_root.unstackables[_parent.ty] == undefined)) {
if ((64 - _parent.count) < _root.inventory.dragger.count) {
_root.inventory.dragger.count = _root.inventory.dragger.count - (64 - _parent.count);
_parent.count = 64;
if (_parent._name.substr(0, 1) == "i") {
_root.inventoryList[_parent.number][1] = _parent.count;
}
} else if ((64 - _parent.count) > _root.inventory.dragger.count) {
_parent.count = _parent.count + _root.inventory.dragger.count;
if (_parent._name.substr(0, 1) == "i") {
_root.inventoryList[_parent.number][1] = _parent.count;
}
_root.inventory.dragger.gotoAndStop(1);
} else {
_parent.count = 64;
if (_parent._name.substr(0, 1) == "i") {
_root.inventoryList[_parent.number][1] = _parent.count;
}
_root.inventory.dragger.gotoAndStop(1);
}
} else {
tempTy = _parent.ty;
_parent.ty = _root.inventory.dragger.ty;
_parent.typ.gotoAndStop(_parent.ty);
_root.inventory.dragger.ty = tempTy;
_root.inventory.dragger.typ.gotoAndStop(tempTy);
if (_parent._name.substr(0, 1) == "i") {
_root.inventoryList[_parent.number][0] = _parent.ty;
}
tempCount = _parent.count;
_parent.count = _root.inventory.dragger.count;
_root.inventory.dragger.count = tempCount;
if (_parent._name.substr(0, 1) == "i") {
_root.inventoryList[_parent.number][1] = _parent.count;
}
tempDamage = _parent.damage;
_parent.damage = _root.inventory.dragger.damage;
_root.inventory.dragger.damage = tempDamage;
if (_parent._name.substr(0, 1) == "i") {
_root.inventoryList[_parent.number][2] = _parent.damage;
}
}
} else {
_root.inventory.dragger.gotoAndStop(2);
_root.inventory.dragger.ty = _parent.ty;
_root.inventory.dragger.damage = _parent.damage;
_root.inventory.dragger.typ.gotoAndStop(_parent.ty);
waitTillMouseIsUp = true;
if (_parent.tool != true) {
if (_root.shifting) {
_root.inventory.dragger.count = "";
_parent.count--;
_root.inventoryList[_parent.number][1] = _parent.count;
if (_parent.count <= 0) {
if (_parent._name.substr(0, 1) == "i") {
_root.inventoryList[_parent.number] = new Array(3);
}
_parent.gotoAndStop(1);
}
} else {
_root.inventory.dragger.count = _parent.count;
if (_parent._name.substr(0, 1) == "i") {
_root.inventoryList[_parent.number] = new Array(3);
}
_parent.gotoAndStop(1);
}
} else {
_root.inventory.dragger.count = "";
}
}
if (_root.inventory.dragger.count == 1) {
_root.inventory.dragger.count = "";
}
if (_parent.count == 1) {
_parent.count = "";
}
} else {
tempTy = _parent.ty;
_parent.ty = _root.inventory.dragger.ty;
_parent.typ.gotoAndStop(_parent.ty);
_root.inventory.dragger.ty = tempTy;
_root.inventory.dragger.typ.gotoAndStop(tempTy);
if (_parent._name.substr(0, 1) == "i") {
_root.inventoryList[_parent.number][0] = _parent.ty;
}
tempDamage = _parent.damage;
_parent.damage = _root.inventory.dragger.damage;
_root.inventory.dragger.damage = tempDamage;
if (_parent._name.substr(0, 1) == "i") {
_root.inventoryList[_parent.number][2] = _parent.damage;
}
tempCount = _parent.count;
_parent.count = _root.inventory.dragger.count;
_root.inventory.dragger.count = tempCount;
if (_parent._name.substr(0, 1) == "i") {
_root.inventoryList[_parent.number][1] = _parent.count;
}
waitTillMouseIsUp = true;
}
}
}
}
gotoAndStop(goto);
};
} else {
onEnterFrame = function () {
if (_root.selectedInventoryItem == _parent.number) {
_root.selectedInventoryItemType = _parent.ty;
_root.selectedInventoryItemNumber = _parent.count;
_root.selectedInventoryTool = _root.tools[_parent.ty] != undefined;
gotoAndStop (2);
} else {
gotoAndStop (1);
}
};
}
this.onMouseDown = function () {
mouse = "down";
};
this.onMouseUp = function () {
waitTillMouseIsUp = false;
mouse = "up";
};
Symbol 1404 MovieClip Frame 1
stop();
onEnterFrame = function () {
if (_parent.typ.tool == true) {
gotoAndStop (2);
bar._xscale = Math.round((_parent.damage / _root[_parent.ty + "Life"]) * 100);
if (bar._xscale >= 100) {
_root.inventoryList[_parent.number - 1] = [undefined, undefined, 0];
}
} else {
gotoAndStop (1);
}
};
Symbol 1405 MovieClip Frame 1
stop();
Symbol 1405 MovieClip Frame 2
typ.gotoAndStop(ty);
typ.inventory = true;
Instance of Symbol 1363 MovieClip [drop] "typ" in Symbol 1405 MovieClip Frame 2
onClipEvent (load) {
inventory = true;
}
Symbol 1407 Button
on (release) {
_root.inventory.gotoAndStop(2);
}
Symbol 1417 MovieClip Frame 1
onEnterFrame = function () {
gotoAndStop((20 - _root.health) + 1);
};
Symbol 1418 MovieClip Frame 1
stop();
_root._x = 0;
_root._y = 0;
Symbol 1418 MovieClip Frame 2
_root._x = random(10) - 5;
_root._y = random(10) - 5;
Symbol 1422 MovieClip Frame 2
_root.requestSound("pop", 0, 0);
Symbol 1422 MovieClip Frame 3
stop();
Symbol 1423 MovieClip Frame 1
onEnterFrame = function () {
gotoAndStop((11 - _root.air) + 1);
};
Symbol 1423 MovieClip Frame 12
_root.health--;
Symbol 1434 MovieClip Frame 1
onEnterFrame = function () {
_x = _parent._xmouse;
_y = _parent._ymouse;
};
stop();
Symbol 1434 MovieClip Frame 2
typ.gotoAndStop(ty);
typ.inventory = true;
Symbol 1438 MovieClip Frame 1
onEnterFrame = function () {
_x = _parent._xmouse;
_y = _parent._ymouse;
};
stop();
Symbol 1447 MovieClip Frame 1
stop();
Symbol 1452 MovieClip Frame 1
stop();
Symbol 1466 Button
on (release) {
gotoAndStop (2);
}
Symbol 1468 Button
on (release) {
gotoAndStop (3);
}
Symbol 1470 Button
on (release) {
gotoAndStop (4);
}
Symbol 1473 Button
on (release) {
if (lightOption.selectedData == "light") {
_root.spawnArea = _root.findSpawnArea("light", 2, false, _root.sceneNum == 2, spawnNear.selected);
} else {
_root.spawnArea = _root.findSpawnArea("dark", 2, false, _root.sceneNum == 2, spawnNear.selected);
}
if (_root.spawnArea != undefined) {
_root.creeperNum++;
_root.mobNum++;
_root.lastCreeper = _root.world.attachMovie("creeper", "creeper" + _root.mobNum, _root.world.getNextHighestDepth());
_root.mobs[_root.mobNum] = ["creeper", "creeper" + _root.mobNum, _root.sceneNum, ((_root.spawnArea[0] + 1) * 30) - 15, ((-(_root.spawnArea[1] + 1)) * 30) + 30, 0, 0, 20, false, false, false];
_root.lastCreeper.mobNumber = _root.mobNum;
stat = (("Creeper at X:" + _root.spawnArea[0]) + " Y:") + _root.spawnArea[1];
} else {
stat = "Random failure, try again";
}
}
Symbol 1475 Button
on (release) {
if (lightOption.selectedData == "light") {
_root.spawnArea = _root.findSpawnArea("light", 2, false, _root.sceneNum == 2, spawnNear.selected);
} else {
_root.spawnArea = _root.findSpawnArea("dark", 2, false, _root.sceneNum == 2, spawnNear.selected);
}
if (_root.spawnArea != undefined) {
_root.zombieNum++;
_root.mobNum++;
_root.lastZombie = _root.world.attachMovie("zombie", "zombie" + _root.mobNum, _root.world.getNextHighestDepth());
_root.mobs[_root.mobNum] = ["zombie", "zombie" + _root.mobNum, _root.sceneNum, ((_root.spawnArea[0] + 1) * 30) - 15, ((-(_root.spawnArea[1] + 1)) * 30) + 30, 0, 0, 20, false, false, false];
_root.lastZombie.mobNumber = _root.mobNum;
stat = (("Zombie at X:" + _root.spawnArea[0]) + " Y:") + _root.spawnArea[1];
} else {
stat = "Random failure, try again";
}
}
Symbol 1477 Button
on (release) {
if (lightOption.selectedData == "light") {
_root.spawnArea = _root.findSpawnArea("light", 3, true, _root.sceneNum == 2, spawnNear.selected);
} else if (lightOption.selectedData == "dark") {
_root.spawnArea = _root.findSpawnArea("dark", 3, false, _root.sceneNum == 2, spawnNear.selected);
} else {
_root.spawnArea = _root.findSpawnArea("none", 3, true, _root.sceneNum == 2, spawnNear.selected);
}
if (_root.spawnArea != undefined) {
_root.pigNum++;
_root.mobNum++;
_root.lastPig = _root.world.attachMovie("pig", "pig" + _root.mobNum, _root.world.getNextHighestDepth());
_root.mobs[_root.mobNum] = ["pig", "pig" + _root.mobNum, _root.sceneNum, ((_root.spawnArea[0] + 1) * 30) - 15, ((-(_root.spawnArea[1] + 1)) * 30) + 30, 0, 0, 10, false, false, false];
_root.lastPig.mobNumber = _root.mobNum;
stat = (("Pig at X:" + _root.spawnArea[0]) + " Y:") + _root.spawnArea[1];
} else {
stat = "Random failure, try again";
}
}
Symbol 1479 Button
on (release) {
if (lightOption.selectedData == "dark") {
_root.spawnArea = _root.findSpawnArea("dark", 3, false, _root.sceneNum == 2, spawnNear.selected);
} else {
_root.spawnArea = _root.findSpawnArea("light", 3, true, _root.sceneNum == 2, spawnNear.selected);
}
if (_root.spawnArea != undefined) {
_root.sheepNum++;
_root.mobNum++;
_root.lastSheep = _root.world.attachMovie("sheep", "sheep" + _root.mobNum, _root.world.getNextHighestDepth());
_root.mobs[_root.mobNum] = ["sheep", "sheep" + _root.mobNum, _root.sceneNum, ((_root.spawnArea[0] + 1) * 30) - 15, ((-(_root.spawnArea[1] + 1)) * 30) + 30, 0, 0, 10, false, false, false, "white", false];
_root.lastSheep.mobNumber = _root.mobNum;
stat = (("Sheep at X:" + _root.spawnArea[0]) + " Y:") + _root.spawnArea[1];
} else {
stat = "Random failure, try again";
}
}
Symbol 1481 Button
on (release) {
if (lightOption.selectedData == "dark") {
_root.spawnArea = _root.findSpawnArea("dark", 3, false, _root.sceneNum == 2, spawnNear.selected);
} else {
_root.spawnArea = _root.findSpawnArea("light", 3, true, _root.sceneNum == 2, spawnNear.selected);
}
if (_root.spawnArea != undefined) {
_root.cowNum++;
_root.mobNum++;
_root.lastCow = _root.world.attachMovie("cow", "cow" + _root.mobNum, _root.world.getNextHighestDepth());
_root.mobs[_root.mobNum] = ["cow", "cow" + _root.mobNum, _root.sceneNum, ((_root.spawnArea[0] + 1) * 30) - 15, ((-(_root.spawnArea[1] + 1)) * 30) + 30, 0, 0, 10, false, false, false];
_root.lastCow.mobNumber = _root.mobNum;
stat = (("Cow at X:" + _root.spawnArea[0]) + " Y:") + _root.spawnArea[1];
} else {
stat = "Random failure, try again";
}
}
Symbol 1488 MovieClip [RadioThemeColor1] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "themeColor");
Symbol 1492 MovieClip [RadioThemeColor2] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "themeColor");
Symbol 1498 MovieClip [RadioButtonAssets] Frame 1
#initclip 111
mx.controls.RadioButton.prototype.adjustFocusRect = function () {
var _local4 = this._parent.focus_mc;
var _local2 = this.iconName;
var _local3 = this.getStyle("themeColor");
if (_local3 == undefined) {
_local3 = 8453965 /* 0x80FF4D */;
}
var _local5 = _local2._width + 4;
var _local6 = _local2._height + 4;
_local4.setSize(_local5, _local6, 8, 100, _local3);
var _local8 = _local2._x;
var _local7 = _local2._y;
_local4.move((this.x - 2) + _local8, (this.y + _local7) - 2);
};
#endinitclip
Symbol 1499 MovieClip [RadioButton] Frame 1
#initclip 112
Object.registerClass("RadioButton", mx.controls.RadioButton);
#endinitclip
stop();
Instance of Symbol 190 MovieClip [Button] "foo" in Symbol 1499 MovieClip [RadioButton] Frame 2
//component parameters
onClipEvent (initialize) {
icon = "";
label = "Button";
labelPlacement = "right";
selected = false;
toggle = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 1502 Button
on (release) {
if (lightOption.selectedData == "dark") {
_root.spawnArea = _root.findSpawnArea("dark", 2, false, _root.sceneNum == 2, spawnNear.selected);
} else if (lightOption.selectedData == "light") {
_root.spawnArea = _root.findSpawnArea("light", 2, false, _root.sceneNum == 2, spawnNear.selected);
} else {
_root.spawnArea = _root.findSpawnArea("none", 2, false, _root.sceneNum == 2, spawnNear.selected);
}
if (_root.spawnArea != undefined) {
_root.netherwalkerNum++;
_root.mobNum++;
_root.lastNetherwalker = _root.world.attachMovie("netherwalker", "netherwalker" + _root.mobNum, _root.world.getNextHighestDepth());
_root.mobs[_root.mobNum] = ["netherwalker", "netherwalker" + _root.mobNum, _root.sceneNum, ((_root.spawnArea[0] + 1) * 30) - 15, ((-(_root.spawnArea[1] + 1)) * 30) + 30, 0, 0, 20, false, false, false];
_root.lastNetherwalker.mobNumber = _root.mobNum;
stat = (("Netherwalker at X:" + _root.spawnArea[0]) + " Y:") + _root.spawnArea[1];
} else {
stat = "Random failure, try again";
}
}
Symbol 1504 Button
on (release) {
if (lightOption.selectedData == "dark") {
_root.spawnArea = _root.findSpawnArea("dark", 2, false, _root.sceneNum == 2, spawnNear.selected);
} else {
_root.spawnArea = _root.findSpawnArea("light", 2, true, _root.sceneNum == 2, spawnNear.selected);
}
if (_root.spawnArea != undefined) {
_root.chickenNum++;
_root.mobNum++;
_root.lastChicken = _root.world.attachMovie("chicken", "chicken" + _root.mobNum, _root.world.getNextHighestDepth());
_root.mobs[_root.mobNum] = ["chicken", "chicken" + _root.mobNum, _root.sceneNum, ((_root.spawnArea[0] + 1) * 30) - 15, ((-(_root.spawnArea[1] + 1)) * 30) + 30, 0, 0, 4, false, false, false];
_root.lastChicken.mobNumber = _root.mobNum;
stat = (("Chicken at X:" + _root.spawnArea[0]) + " Y:") + _root.spawnArea[1];
} else {
stat = "Random failure, try again";
}
}
Symbol 1506 Button
on (release) {
if (lightOption.selectedData == "light") {
_root.spawnArea = _root.findSpawnArea("light", 3, false, _root.sceneNum == 2, spawnNear.selected);
} else {
_root.spawnArea = _root.findSpawnArea("dark", 3, false, _root.sceneNum == 2, spawnNear.selected);
}
if (_root.spawnArea != undefined) {
_root.spiderNum++;
_root.mobNum++;
_root.lastSpider = _root.world.attachMovie("spider", "spider" + _root.mobNum, _root.world.getNextHighestDepth());
_root.mobs[_root.mobNum] = ["spider", "spider" + _root.mobNum, _root.sceneNum, ((_root.spawnArea[0] + 1) * 30) - 15, ((-(_root.spawnArea[1] + 1)) * 30) + 30, 0, 0, 20, false, false, false];
_root.lastSpider.mobNumber = _root.mobNum;
stat = (("Spider at X:" + _root.spawnArea[0]) + " Y:") + _root.spawnArea[1];
} else {
stat = "Random failure, try again";
}
}
Symbol 1511 Button
on (release) {
_root.dropNum++;
_root.world.attachMovie("drop", "drop" + _root.dropNum, _root.world.getNextHighestDepth());
_root.world["drop" + _root.dropNum]._x = (_root.blockX * 30) + 15;
_root.world["drop" + _root.dropNum]._y = ((-_root.blockY) * 30) - 45;
_root.world["drop" + _root.dropNum].damage = 0;
_root.world["drop" + _root.dropNum].gotoAndStop(itemSelect.ty);
stat = "Gave " + itemSelect.tyName;
}
Symbol 1513 Button
on (press) {
going2 = true;
}
on (release, dragOut, releaseOutside) {
going2 = false;
}
Symbol 1514 Button
on (press) {
going1 = true;
}
on (release, dragOut, releaseOutside) {
going1 = false;
}
Symbol 1518 Button
on (release) {
if (_root.tim < 50) {
_root.tim = 51;
stat = "The day was skipped, yo";
} else {
_root.day++;
_root.tim = 2;
stat = "You could have just used a bed";
}
}
Symbol 1520 Button
on (release) {
_root.save();
_root.so.data.worldX = _root.so.data["spawnPoint" + _root.sceneNum][0];
_root.so.data.worldY = _root.so.data["spawnPoint" + _root.sceneNum][1];
_root.loadWorld = true;
_root.gotoAndPlay("respawn");
}
Symbol 1526 Button
on (release) {
_root.raining = 0;
stat = "It is now not raining";
}
Symbol 1528 Button
on (release) {
_root.so.data.worldX = _root.world._x;
_root.so.data.worldY = _root.world._y;
_root.spawnPoint = [_root.so.data.worldX, _root.so.data.worldY];
_root.save();
stat = (("Spawn point is: " + _root.blockX) + ", ") + _root.blockY;
}
Symbol 1530 Button
on (release) {
_root.raining = 1;
stat = "It is now raining";
}
Symbol 1532 Button
on (release) {
_root.raining = 2;
stat = "It is now raining with KABOOM";
}
Symbol 1534 Button
on (release) {
_root.health = 20;
stat = "Healed - Just like that!";
}
Symbol 1536 MovieClip Frame 1
stop();
var date = new Date();
onEnterFrame = function () {
if ((pass == ("fdsa" + (Math.floor(date.getMinutes() / 2) + 20))) || (_root.inDevelopersArea == "Hey")) {
_root.inDevelopersArea = "Hey";
gotoAndStop (2);
delete onEnterFrame;
}
};
Symbol 1536 MovieClip Frame 2
stop();
Instance of Symbol 1499 MovieClip [RadioButton] in Symbol 1536 MovieClip Frame 2
//component parameters
onClipEvent (construct) {
data = "light";
groupName = "lightOption";
label = "Light";
labelPlacement = "right";
selected = false;
}
Instance of Symbol 1499 MovieClip [RadioButton] in Symbol 1536 MovieClip Frame 2
//component parameters
onClipEvent (construct) {
data = "dark";
groupName = "lightOption";
label = "Dark";
labelPlacement = "right";
selected = false;
}
Instance of Symbol 1499 MovieClip [RadioButton] in Symbol 1536 MovieClip Frame 2
//component parameters
onClipEvent (construct) {
data = "normal";
groupName = "lightOption";
label = "Default";
labelPlacement = "right";
selected = true;
}
Instance of Symbol 191 MovieClip [CheckBox] "spawnNear" in Symbol 1536 MovieClip Frame 2
//component parameters
onClipEvent (construct) {
label = "Spawn Near";
labelPlacement = "right";
selected = true;
}
Symbol 1536 MovieClip Frame 3
onEnterFrame = function () {
if (going1 == true) {
t++;
if ((t >= 5) || (t == 1)) {
if (t >= 5) {
t = 3;
}
itemSelect.nextFrame();
if (itemSelect._currentframe == 2) {
itemSelect.nextFrame();
}
}
} else if (going2 == true) {
t++;
if ((t >= 5) || (t == 1)) {
if (t >= 5) {
t = 3;
}
itemSelect.prevFrame();
if (itemSelect._currentframe == 2) {
itemSelect.prevFrame();
}
}
} else {
t = 0;
}
};
Instance of Symbol 1363 MovieClip [drop] "itemSelect" in Symbol 1536 MovieClip Frame 3
onClipEvent (load) {
stop();
inventory = true;
}
Instance of Symbol 1363 MovieClip [drop] in Symbol 1536 MovieClip Frame 3
onClipEvent (load) {
stop();
inventory = true;
}
onClipEvent (enterFrame) {
if (_parent.itemSelect._currentframe == 1) {
gotoAndStop (3);
} else if (_parent.itemSelect._currentframe == _parent.itemSelect._totalframes) {
gotoAndStop (2);
} else {
gotoAndStop(_parent.itemSelect._currentframe + 1);
}
}
Instance of Symbol 1363 MovieClip [drop] in Symbol 1536 MovieClip Frame 3
onClipEvent (load) {
stop();
inventory = true;
}
onClipEvent (enterFrame) {
if (_parent.itemSelect._currentframe == 3) {
gotoAndStop (1);
} else if (_parent.itemSelect._currentframe == 1) {
gotoAndStop (2);
} else {
gotoAndStop(_parent.itemSelect._currentframe - 1);
}
}
Instance of Symbol 1363 MovieClip [drop] in Symbol 1536 MovieClip Frame 3
onClipEvent (load) {
stop();
inventory = true;
}
onClipEvent (enterFrame) {
if (_parent.itemSelect._currentframe == 1) {
gotoAndStop (4);
} else if (_parent.itemSelect._currentframe >= (_parent.itemSelect._totalframes - 1)) {
gotoAndStop (2);
} else {
gotoAndStop(_parent.itemSelect._currentframe + 2);
}
}
Instance of Symbol 1363 MovieClip [drop] in Symbol 1536 MovieClip Frame 3
onClipEvent (load) {
stop();
inventory = true;
}
onClipEvent (enterFrame) {
if (_parent.itemSelect._currentframe == 4) {
gotoAndStop (1);
} else if (_parent.itemSelect._currentframe <= 3) {
gotoAndStop (2);
} else {
gotoAndStop(_parent.itemSelect._currentframe - 2);
}
}
Symbol 1536 MovieClip Frame 4
onEnterFrame = function () {
if (_root.tim < 50) {
skipTime = "Skip day";
} else if (_root.tim >= 50) {
skipTime = "Skip night";
}
};
Symbol 1542 MovieClip Frame 239
_parent.gotoAndStop(1);
Symbol 1546 Button
on (release) {
_root.signs[sign] = signText;
}
Symbol 1548 Button
on (release) {
gotoAndStop (1);
}
Symbol 1552 Button
on (release) {
gotoAndStop (1);
}
Symbol 1564 Button
on (release) {
buy.user = _root.so2.data.USERNAME;
buy.toAdd = -200;
buy.what = "diamond";
buy.which = 1;
buy.loadVariables("http://zanzlanz.com/MBxp.php", "POST");
}
Symbol 1566 Button
on (release) {
buy.user = _root.so2.data.USERNAME;
buy.toAdd = -250;
buy.what = "goldenapple";
buy.which = 2;
buy.loadVariables("http://zanzlanz.com/MBxp.php", "POST");
}
Symbol 1569 Button
on (release) {
buy.user = _root.so2.data.USERNAME;
buy.toAdd = -500;
buy.what = "obsidianpickaxe";
buy.which = 3;
buy.loadVariables("http://zanzlanz.com/MBxp.php", "POST");
}
Symbol 1572 MovieClip Frame 1
function only(arr) {
var _local3 = 0;
while (_local3 < blocks.length) {
didntFind = true;
var _local2 = 0;
while (_local2 < arr.length) {
if (blocks[_local3] == arr[_local2]) {
didntFind = false;
if (this["c" + arr[_local2]]._currentframe == 1) {
return(false);
}
}
_local2++;
}
if (didntFind && (this["c" + blocks[_local3]]._currentframe == 2)) {
return(false);
}
_local3++;
}
return(true);
}
function contain1(one, two) {
found1 = (found2 = false);
var _local2 = 0;
for ( ; _local2 < blocks.length ; _local2++) {
if (this["c" + blocks[_local2]]._currentframe == 2) {
if (this["c" + blocks[_local2]].ty == one) {
if (found1 == false) {
found1 = true;
continue;
}
return(false);
}
if (this["c" + blocks[_local2]].ty == two) {
if (found2 == false) {
found2 = true;
continue;
}
return(false);
}
return(false);
}
}
if (found1 && (found2)) {
return(true);
}
return(false);
}
stop();
onEnterFrame = function () {
if ((_currentframe == 2) || (_currentframe == 3)) {
var _local2 = 0;
while (_local2 < blocks.length) {
sB = undefined;
if (this["c" + (_local2 + 1)]._currentframe == 2) {
sB = _local2 + 1;
_local2 = blocks.length;
}
_local2++;
}
this.output.gotoAndStop(1);
if ((this["c" + sB].ty == "wd") && (only([sB]))) {
this.output.ty = "wp";
this.output.count = 4;
this.output.damage = "";
this.output.gotoAndStop(2);
// unexpected jump
}
if (((this["c" + sB].ty == "wp") && (this["c" + d[sB - 1]].ty == "wp")) && (only([sB, d[sB - 1]]))) {
this.output.ty = "st";
this.output.count = 4;
this.output.damage = "";
this.output.gotoAndStop(2);
// unexpected jump
}
if (((this["c" + sB].ty == "cl") && ((this["c" + d[sB - 1]].ty == "st") || (this["c" + d[sB - 1]].ty == "bb"))) && (only([sB, d[sB - 1]]))) {
this.output.ty = "th";
this.output.count = 4;
this.output.damage = "";
this.output.gotoAndStop(2);
// unexpected jump
}
if (((((this["c" + sB].ty == "wp") && (this["c" + d[sB - 1]].ty == "wp")) && (this["c" + r[sB - 1]].ty == "wp")) && (this["c" + d[r[sB - 1] - 1]].ty == "wp")) && (only([sB, d[sB - 1], r[sB - 1], d[r[sB - 1] - 1]]))) {
this.output.ty = "craft";
this.output.count = "";
this.output.damage = "";
this.output.gotoAndStop(2);
// unexpected jump
}
if ((((((this["c" + sB].ty == "wp") && (this["c" + r[sB - 1]].ty == "wp")) && (this["c" + r[r[sB - 1] - 1]].ty == "wp")) && ((this["c" + d[r[sB - 1] - 1]].ty == "st") || (this["c" + d[r[sB - 1] - 1]].ty == "bb"))) && ((this["c" + d[d[r[sB - 1] - 1] - 1]].ty == "st") || (this["c" + d[d[r[sB - 1] - 1] - 1]].ty == "bb"))) && (only([sB, r[sB - 1], r[r[sB - 1] - 1], d[r[sB - 1] - 1], d[d[r[sB - 1] - 1] - 1]]))) {
this.output.ty = "WoodenPickaxe";
this.output.count = "";
this.output.damage = 0;
this.output.gotoAndStop(2);
// unexpected jump
}
if ((((((this["c" + sB].ty == "cs") && (this["c" + r[sB - 1]].ty == "cs")) && (this["c" + r[r[sB - 1] - 1]].ty == "cs")) && ((this["c" + d[r[sB - 1] - 1]].ty == "st") || (this["c" + d[r[sB - 1] - 1]].ty == "bb"))) && ((this["c" + d[d[r[sB - 1] - 1] - 1]].ty == "st") || (this["c" + d[d[r[sB - 1] - 1] - 1]].ty == "bb"))) && (only([sB, r[sB - 1], r[r[sB - 1] - 1], d[r[sB - 1] - 1], d[d[r[sB - 1] - 1] - 1]]))) {
this.output.ty = "StonePickaxe";
this.output.count = "";
this.output.damage = 0;
this.output.gotoAndStop(2);
// unexpected jump
}
if ((((((this["c" + sB].ty == "ii") && (this["c" + r[sB - 1]].ty == "ii")) && (this["c" + r[r[sB - 1] - 1]].ty == "ii")) && ((this["c" + d[r[sB - 1] - 1]].ty == "st") || (this["c" + d[r[sB - 1] - 1]].ty == "bb"))) && ((this["c" + d[d[r[sB - 1] - 1] - 1]].ty == "st") || (this["c" + d[d[r[sB - 1] - 1] - 1]].ty == "bb"))) && (only([sB, r[sB - 1], r[r[sB - 1] - 1], d[r[sB - 1] - 1], d[d[r[sB - 1] - 1] - 1]]))) {
this.output.ty = "IronPickaxe";
this.output.count = "";
this.output.damage = 0;
this.output.gotoAndStop(2);
// unexpected jump
}
if ((((((this["c" + sB].ty == "gi") && (this["c" + r[sB - 1]].ty == "gi")) && (this["c" + r[r[sB - 1] - 1]].ty == "gi")) && ((this["c" + d[r[sB - 1] - 1]].ty == "st") || (this["c" + d[r[sB - 1] - 1]].ty == "bb"))) && ((this["c" + d[d[r[sB - 1] - 1] - 1]].ty == "st") || (this["c" + d[d[r[sB - 1] - 1] - 1]].ty == "bb"))) && (only([sB, r[sB - 1], r[r[sB - 1] - 1], d[r[sB - 1] - 1], d[d[r[sB - 1] - 1] - 1]]))) {
this.output.ty = "GoldPickaxe";
this.output.count = "";
this.output.damage = 0;
this.output.gotoAndStop(2);
// unexpected jump
}
if ((((((this["c" + sB].ty == "dm") && (this["c" + r[sB - 1]].ty == "dm")) && (this["c" + r[r[sB - 1] - 1]].ty == "dm")) && ((this["c" + d[r[sB - 1] - 1]].ty == "st") || (this["c" + d[r[sB - 1] - 1]].ty == "bb"))) && ((this["c" + d[d[r[sB - 1] - 1] - 1]].ty == "st") || (this["c" + d[d[r[sB - 1] - 1] - 1]].ty == "bb"))) && (only([sB, r[sB - 1], r[r[sB - 1] - 1], d[r[sB - 1] - 1], d[d[r[sB - 1] - 1] - 1]]))) {
this.output.ty = "DiamondPickaxe";
this.output.count = "";
this.output.damage = 0;
this.output.gotoAndStop(2);
// unexpected jump
}
if ((((((this["c" + sB].ty == "wp") && (this["c" + r[sB - 1]].ty == "wp")) && (this["c" + r[d[sB - 1] - 1]].ty == "wp")) && ((this["c" + d[sB - 1]].ty == "st") || (this["c" + d[sB - 1]].ty == "bb"))) && ((this["c" + d[d[sB - 1] - 1]].ty == "st") || (this["c" + d[d[sB - 1] - 1]].ty == "bb"))) && (only([sB, r[sB - 1], r[d[sB - 1] - 1], d[sB - 1], d[d[sB - 1] - 1]]))) {
this.output.ty = "WoodenAxe";
this.output.count = "";
this.output.damage = 0;
this.output.gotoAndStop(2);
// unexpected jump
}
if ((((((this["c" + sB].ty == "cs") && (this["c" + r[sB - 1]].ty == "cs")) && (this["c" + r[d[sB - 1] - 1]].ty == "cs")) && ((this["c" + d[sB - 1]].ty == "st") || (this["c" + d[sB - 1]].ty == "bb"))) && ((this["c" + d[d[sB - 1] - 1]].ty == "st") || (this["c" + d[d[sB - 1] - 1]].ty == "bb"))) && (only([sB, r[sB - 1], r[d[sB - 1] - 1], d[sB - 1], d[d[sB - 1] - 1]]))) {
this.output.ty = "StoneAxe";
this.output.count = "";
this.output.damage = 0;
this.output.gotoAndStop(2);
// unexpected jump
}
if ((((((this["c" + sB].ty == "ii") && (this["c" + r[sB - 1]].ty == "ii")) && (this["c" + r[d[sB - 1] - 1]].ty == "ii")) && ((this["c" + d[sB - 1]].ty == "st") || (this["c" + d[sB - 1]].ty == "bb"))) && ((this["c" + d[d[sB - 1] - 1]].ty == "st") || (this["c" + d[d[sB - 1] - 1]].ty == "bb"))) && (only([sB, r[sB - 1], r[d[sB - 1] - 1], d[sB - 1], d[d[sB - 1] - 1]]))) {
this.output.ty = "IronAxe";
this.output.count = "";
this.output.damage = 0;
this.output.gotoAndStop(2);
// unexpected jump
}
if ((((((this["c" + sB].ty == "gi") && (this["c" + r[sB - 1]].ty == "gi")) && (this["c" + r[d[sB - 1] - 1]].ty == "gi")) && ((this["c" + d[sB - 1]].ty == "st") || (this["c" + d[sB - 1]].ty == "bb"))) && ((this["c" + d[d[sB - 1] - 1]].ty == "st") || (this["c" + d[d[sB - 1] - 1]].ty == "bb"))) && (only([sB, r[sB - 1], r[d[sB - 1] - 1], d[sB - 1], d[d[sB - 1] - 1]]))) {
this.output.ty = "GoldAxe";
this.output.count = "";
this.output.damage = 0;
this.output.gotoAndStop(2);
// unexpected jump
}
if ((((((this["c" + sB].ty == "dm") && (this["c" + r[sB - 1]].ty == "dm")) && (this["c" + r[d[sB - 1] - 1]].ty == "dm")) && ((this["c" + d[sB - 1]].ty == "st") || (this["c" + d[sB - 1]].ty == "bb"))) && ((this["c" + d[d[sB - 1] - 1]].ty == "st") || (this["c" + d[d[sB - 1] - 1]].ty == "bb"))) && (only([sB, r[sB - 1], r[d[sB - 1] - 1], d[sB - 1], d[d[sB - 1] - 1]]))) {
this.output.ty = "DiamondAxe";
this.output.count = "";
this.output.damage = 0;
this.output.gotoAndStop(2);
// unexpected jump
}
if ((((((this["c" + sB].ty == "wp") && (this["c" + r[sB - 1]].ty == "wp")) && (this["c" + d[sB - 1]].ty == "wp")) && ((this["c" + r[d[sB - 1] - 1]].ty == "st") || (this["c" + r[d[sB - 1] - 1]].ty == "bb"))) && ((this["c" + r[d[d[sB - 1] - 1] - 1]].ty == "st") || (this["c" + r[d[d[sB - 1] - 1] - 1]].ty == "bb"))) && (only([sB, r[sB - 1], d[sB - 1], r[d[sB - 1] - 1], r[d[d[sB - 1] - 1] - 1]]))) {
this.output.ty = "WoodenAxe";
this.output.count = "";
this.output.damage = 0;
this.output.gotoAndStop(2);
// unexpected jump
}
if ((((((this["c" + sB].ty == "cs") && (this["c" + r[sB - 1]].ty == "cs")) && (this["c" + d[sB - 1]].ty == "cs")) && ((this["c" + r[d[sB - 1] - 1]].ty == "st") || (this["c" + r[d[sB - 1] - 1]].ty == "bb"))) && ((this["c" + r[d[d[sB - 1] - 1] - 1]].ty == "st") || (this["c" + r[d[d[sB - 1] - 1] - 1]].ty == "bb"))) && (only([sB, r[sB - 1], d[sB - 1], r[d[sB - 1] - 1], r[d[d[sB - 1] - 1] - 1]]))) {
this.output.ty = "StoneAxe";
this.output.count = "";
this.output.damage = 0;
this.output.gotoAndStop(2);
// unexpected jump
}
if ((((((this["c" + sB].ty == "ii") && (this["c" + r[sB - 1]].ty == "ii")) && (this["c" + d[sB - 1]].ty == "ii")) && ((this["c" + r[d[sB - 1] - 1]].ty == "st") || (this["c" + r[d[sB - 1] - 1]].ty == "bb"))) && ((this["c" + r[d[d[sB - 1] - 1] - 1]].ty == "st") || (this["c" + r[d[d[sB - 1] - 1] - 1]].ty == "bb"))) && (only([sB, r[sB - 1], d[sB - 1], r[d[sB - 1] - 1], r[d[d[sB - 1] - 1] - 1]]))) {
this.output.ty = "IronAxe";
this.output.count = "";
this.output.damage = 0;
this.output.gotoAndStop(2);
// unexpected jump
}
if ((((((this["c" + sB].ty == "gi") && (this["c" + r[sB - 1]].ty == "gi")) && (this["c" + d[sB - 1]].ty == "gi")) && ((this["c" + r[d[sB - 1] - 1]].ty == "st") || (this["c" + r[d[sB - 1] - 1]].ty == "bb"))) && ((this["c" + r[d[d[sB - 1] - 1] - 1]].ty == "st") || (this["c" + r[d[d[sB - 1] - 1] - 1]].ty == "bb"))) && (only([sB, r[sB - 1], d[sB - 1], r[d[sB - 1] - 1], r[d[d[sB - 1] - 1] - 1]]))) {
this.output.ty = "GoldAxe";
this.output.count = "";
this.output.damage = 0;
this.output.gotoAndStop(2);
} else if ((((((this["c" + sB].ty == "dm") && (this["c" + r[sB - 1]].ty == "dm")) && (this["c" + d[sB - 1]].ty == "dm")) && ((this["c" + r[d[sB - 1] - 1]].ty == "st") || (this["c" + r[d[sB - 1] - 1]].ty == "bb"))) && ((this["c" + r[d[d[sB - 1] - 1] - 1]].ty == "st") || (this["c" + r[d[d[sB - 1] - 1] - 1]].ty == "bb"))) && (only([sB, r[sB - 1], d[sB - 1], r[d[sB - 1] - 1], r[d[d[sB - 1] - 1] - 1]]))) {
this.output.ty = "DiamondAxe";
this.output.count = "";
this.output.damage = 0;
this.output.gotoAndStop(2);
} else if ((((this["c" + sB].ty == "wp") && ((this["c" + d[sB - 1]].ty == "st") || (this["c" + d[sB - 1]].ty == "bb"))) && ((this["c" + d[d[sB - 1] - 1]].ty == "st") || (this["c" + d[d[sB - 1] - 1]].ty == "bb"))) && (only([sB, d[sB - 1], d[d[sB - 1] - 1]]))) {
this.output.ty = "WoodenShovel";
this.output.count = "";
this.output.damage = 0;
this.output.gotoAndStop(2);
} else if ((((this["c" + sB].ty == "cs") && ((this["c" + d[sB - 1]].ty == "st") || (this["c" + d[sB - 1]].ty == "bb"))) && ((this["c" + d[d[sB - 1] - 1]].ty == "st") || (this["c" + d[d[sB - 1] - 1]].ty == "bb"))) && (only([sB, d[sB - 1], d[d[sB - 1] - 1]]))) {
this.output.ty = "StoneShovel";
this.output.count = "";
this.output.damage = 0;
this.output.gotoAndStop(2);
} else if ((((this["c" + sB].ty == "ii") && ((this["c" + d[sB - 1]].ty == "st") || (this["c" + d[sB - 1]].ty == "bb"))) && ((this["c" + d[d[sB - 1] - 1]].ty == "st") || (this["c" + d[d[sB - 1] - 1]].ty == "bb"))) && (only([sB, d[sB - 1], d[d[sB - 1] - 1]]))) {
this.output.ty = "IronShovel";
this.output.count = "";
this.output.damage = 0;
this.output.gotoAndStop(2);
} else if ((((this["c" + sB].ty == "gi") && ((this["c" + d[sB - 1]].ty == "st") || (this["c" + d[sB - 1]].ty == "bb"))) && ((this["c" + d[d[sB - 1] - 1]].ty == "st") || (this["c" + d[d[sB - 1] - 1]].ty == "bb"))) && (only([sB, d[sB - 1], d[d[sB - 1] - 1]]))) {
this.output.ty = "GoldShovel";
this.output.count = "";
this.output.damage = 0;
this.output.gotoAndStop(2);
} else if ((((this["c" + sB].ty == "dm") && ((this["c" + d[sB - 1]].ty == "st") || (this["c" + d[sB - 1]].ty == "bb"))) && ((this["c" + d[d[sB - 1] - 1]].ty == "st") || (this["c" + d[d[sB - 1] - 1]].ty == "bb"))) && (only([sB, d[sB - 1], d[d[sB - 1] - 1]]))) {
this.output.ty = "DiamondShovel";
this.output.count = "";
this.output.damage = 0;
this.output.gotoAndStop(2);
} else if (((((((this["c" + sB].ty == "wp") && (this["c" + r[sB - 1]].ty == "wp")) && (this["c" + d[sB - 1]].ty == "wp")) && (this["c" + d[r[sB - 1] - 1]].ty == "wp")) && (this["c" + d[d[sB - 1] - 1]].ty == "wp")) && (this["c" + d[d[r[sB - 1] - 1] - 1]].ty == "wp")) && only([sB, d[sB - 1], r[sB - 1], d[r[sB - 1] - 1], d[d[r[sB - 1] - 1] - 1], d[d[sB - 1] - 1]])) {
this.output.ty = "dr";
this.output.count = "";
this.output.damage = "";
this.output.gotoAndStop(2);
} else if (((((((((this.c1.ty == "cs") && (this.c2.ty == "cs")) && (this.c3.ty == "cs")) && (this.c4.ty == "cs")) && (this.c6.ty == "cs")) && (this.c7.ty == "cs")) && (this.c8.ty == "cs")) && (this.c9.ty == "cs")) && only([1, 2, 3, 4, 6, 7, 8, 9])) {
this.output.ty = "oven";
this.output.count = "";
this.output.damage = "";
this.output.gotoAndStop(2);
} else if (((this["c" + sB].ty == "pk") && (this["c" + d[sB - 1]].ty == "th")) && only([sB, d[sB - 1]])) {
this.output.ty = "jl";
this.output.count = "";
this.output.damage = 0;
this.output.gotoAndStop(2);
} else if (((((((((c1.ty == "st") || (c1.ty == "bb")) && ((c3.ty == "st") || (c3.ty == "bb"))) && ((c4.ty == "st") || (c4.ty == "bb"))) && ((c5.ty == "st") || (c5.ty == "bb"))) && ((c6.ty == "st") || (c6.ty == "bb"))) && ((c7.ty == "st") || (c7.ty == "bb"))) && ((c9.ty == "st") || (c9.ty == "bb"))) && only([1, 3, 4, 5, 6, 7, 9])) {
this.output.ty = "ladder";
this.output.count = 2;
this.output.damage = 0;
this.output.gotoAndStop(2);
} else if (((((((((this.c1.ty == "wp") && (this.c2.ty == "wp")) && (this.c3.ty == "wp")) && (this.c4.ty == "wp")) && (this.c6.ty == "wp")) && (this.c7.ty == "wp")) && (this.c8.ty == "wp")) && (this.c9.ty == "wp")) && only([1, 2, 3, 4, 6, 7, 8, 9])) {
this.output.ty = "chest";
this.output.count = "";
this.output.damage = "";
this.output.gotoAndStop(2);
} else if ((((((((((this.c1.ty == "ii") && (this.c2.ty == "ii")) && (this.c3.ty == "ii")) && (this.c4.ty == "ii")) && (this.c5.ty == "ii")) && (this.c6.ty == "ii")) && (this.c7.ty == "ii")) && (this.c8.ty == "ii")) && (this.c9.ty == "ii")) && only([1, 2, 3, 4, 5, 6, 7, 8, 9])) {
this.output.ty = "ib";
this.output.count = "";
this.output.damage = "";
this.output.gotoAndStop(2);
} else if ((((((((((this.c1.ty == "gi") && (this.c2.ty == "gi")) && (this.c3.ty == "gi")) && (this.c4.ty == "gi")) && (this.c5.ty == "gi")) && (this.c6.ty == "gi")) && (this.c7.ty == "gi")) && (this.c8.ty == "gi")) && (this.c9.ty == "gi")) && only([1, 2, 3, 4, 5, 6, 7, 8, 9])) {
this.output.ty = "gb";
this.output.count = "";
this.output.damage = "";
this.output.gotoAndStop(2);
} else if ((((((((((this.c1.ty == "dm") && (this.c2.ty == "dm")) && (this.c3.ty == "dm")) && (this.c4.ty == "dm")) && (this.c5.ty == "dm")) && (this.c6.ty == "dm")) && (this.c7.ty == "dm")) && (this.c8.ty == "dm")) && (this.c9.ty == "dm")) && only([1, 2, 3, 4, 5, 6, 7, 8, 9])) {
this.output.ty = "db";
this.output.count = "";
this.output.damage = "";
this.output.gotoAndStop(2);
} else if ((this["c" + sB].ty == "ib") && only([sB])) {
this.output.ty = "ii";
this.output.count = 9;
this.output.damage = "";
this.output.gotoAndStop(2);
} else if ((this["c" + sB].ty == "gb") && only([sB])) {
this.output.ty = "gi";
this.output.count = 9;
this.output.damage = "";
this.output.gotoAndStop(2);
} else if ((this["c" + sB].ty == "db") && only([sB])) {
this.output.ty = "dm";
this.output.count = 9;
this.output.damage = "";
this.output.gotoAndStop(2);
} else if (((((this["c" + sB].ty == "gss") && (this["c" + d[sB - 1]].ty == "gss")) && (this["c" + r[sB - 1]].ty == "gss")) && (this["c" + d[r[sB - 1] - 1]].ty == "gss")) && only([sB, d[sB - 1], r[sB - 1], d[r[sB - 1] - 1]])) {
this.output.ty = "gs";
this.output.count = "";
this.output.damage = "";
this.output.gotoAndStop(2);
} else if ((((this["c" + sB].ty == "ii") && (this["c" + d[r[sB - 1] - 1]].ty == "ii")) && (this["c" + r[r[sB - 1] - 1]].ty == "ii")) && only([sB, d[r[sB - 1] - 1], r[r[sB - 1] - 1]])) {
this.output.ty = "bk";
this.output.count = "";
this.output.damage = "";
this.output.gotoAndStop(2);
} else if (((((this["c" + sB].ty == "snowb") && (this["c" + d[sB - 1]].ty == "snowb")) && (this["c" + r[sB - 1]].ty == "snowb")) && (this["c" + d[r[sB - 1] - 1]].ty == "snowb")) && only([sB, d[sB - 1], r[sB - 1], d[r[sB - 1] - 1]])) {
this.output.ty = "snowblock";
this.output.count = "";
this.output.damage = "";
this.output.gotoAndStop(2);
} else if (((((this["c" + sB].ty == "snowblock") && (this["c" + d[sB - 1]].ty == "snowblock")) && (this["c" + r[sB - 1]].ty == "snowblock")) && (this["c" + d[r[sB - 1] - 1]].ty == "snowblock")) && only([sB, d[sB - 1], r[sB - 1], d[r[sB - 1] - 1]])) {
this.output.ty = "ice";
this.output.count = "";
this.output.damage = "";
this.output.gotoAndStop(2);
} else if ((this["c" + sB].ty == "sw") && only([sB])) {
this.output.ty = "fiber";
this.output.count = 8;
this.output.damage = "";
this.output.gotoAndStop(2);
} else if (((((this["c" + sB].ty == "fiber") && (this["c" + d[sB - 1]].ty == "fiber")) && (this["c" + r[sB - 1]].ty == "fiber")) && (this["c" + d[r[sB - 1] - 1]].ty == "fiber")) && only([sB, d[sB - 1], r[sB - 1], d[r[sB - 1] - 1]])) {
this.output.ty = "clothgreen";
this.output.count = "";
this.output.damage = "";
this.output.gotoAndStop(2);
} else if (((((this["c" + sB].ty == "moss") && (this["c" + d[sB - 1]].ty == "moss")) && (this["c" + r[sB - 1]].ty == "moss")) && (this["c" + d[r[sB - 1] - 1]].ty == "moss")) && only([sB, d[sB - 1], r[sB - 1], d[r[sB - 1] - 1]])) {
this.output.ty = "clothgreen";
this.output.count = "";
this.output.damage = "";
this.output.gotoAndStop(2);
} else if (((((((this["c" + sB].ty.substr(0, 5) == "cloth") && (this["c" + d[sB - 1]].ty == "wp")) && (this["c" + r[sB - 1]].ty.substr(0, 5) == "cloth")) && (this["c" + d[r[sB - 1] - 1]].ty == "wp")) && (this["c" + r[r[sB - 1] - 1]].ty.substr(0, 5) == "cloth")) && (this["c" + d[r[r[sB - 1] - 1] - 1]].ty == "wp")) && only([sB, d[sB - 1], r[sB - 1], d[r[sB - 1] - 1], r[r[sB - 1] - 1], d[r[r[sB - 1] - 1] - 1]])) {
this.output.ty = "bed";
this.output.count = "";
this.output.damage = "";
this.output.gotoAndStop(2);
} else if ((((((((((this.c1.ty == "gp") && (this.c2.ty == "sd")) && (this.c3.ty == "gp")) && (this.c4.ty == "sd")) && (this.c5.ty == "gp")) && (this.c6.ty == "sd")) && (this.c7.ty == "gp")) && (this.c8.ty == "sd")) && (this.c9.ty == "gp")) && only([1, 2, 3, 4, 5, 6, 7, 8, 9])) {
this.output.ty = "TNT";
this.output.count = 2;
this.output.damage = "";
this.output.gotoAndStop(2);
} else if ((((this["c" + sB].ty == "fiber") && (this["c" + d[sB - 1]].ty == "fiber")) && (this["c" + d[d[sB - 1] - 1]].ty == "fiber")) && only([sB, d[sB - 1], d[d[sB - 1] - 1]])) {
this.output.ty = "rp";
this.output.count = 3;
this.output.damage = "";
this.output.gotoAndStop(2);
} else if ((this["c" + sB].ty == "rp") && only([sB])) {
this.output.ty = "fiber";
this.output.count = "";
this.output.damage = "";
this.output.gotoAndStop(2);
} else if (((this["c" + sB].ty.substr(0, 5) == "ii") && (this["c" + r[d[sB - 1] - 1]].ty == "ii")) && only([sB, d[r[sB - 1] - 1]])) {
this.output.ty = "Shear";
this.output.count = "";
this.output.damage = 0;
this.output.gotoAndStop(2);
} else if (((((this["c" + sB].ty == "brick") && (this["c" + d[sB - 1]].ty == "brick")) && (this["c" + r[sB - 1]].ty == "brick")) && (this["c" + d[r[sB - 1] - 1]].ty == "brick")) && only([sB, d[sB - 1], r[sB - 1], d[r[sB - 1] - 1]])) {
this.output.ty = "bricks";
this.output.count = 2;
this.output.damage = "";
this.output.gotoAndStop(2);
} else if ((((((this["c" + sB].ty == "gi") && (this["c" + l[d[sB - 1] - 1]].ty == "gi")) && (this["c" + r[d[sB - 1] - 1]].ty == "gi")) && (this["c" + d[d[sB - 1] - 1]].ty == "gi")) && (this["c" + d[sB - 1]].ty == "rsd")) && only([sB, l[d[sB - 1] - 1], r[d[sB - 1] - 1], d[d[sB - 1] - 1], d[sB - 1]])) {
this.output.ty = "clock";
this.output.count = "";
this.output.damage = "";
this.output.gotoAndStop(2);
} else if (((this["c" + sB].ty == "ii") && (this["c" + d[r[sB - 1] - 1]].ty == "flint")) && only([sB, d[r[sB - 1] - 1]])) {
this.output.ty = "fas";
this.output.count = "";
this.output.damage = 0;
this.output.gotoAndStop(2);
} else if (((this["c" + sB].ty == "flint") && (this["c" + d[r[sB - 1] - 1]].ty == "ii")) && only([sB, d[r[sB - 1] - 1]])) {
this.output.ty = "fas";
this.output.count = "";
this.output.damage = 0;
this.output.gotoAndStop(2);
} else if (((this["c" + sB].ty == "ii") && (this["c" + d[l[sB - 1] - 1]].ty == "flint")) && only([sB, d[l[sB - 1] - 1]])) {
this.output.ty = "fas";
this.output.count = "";
this.output.damage = 0;
this.output.gotoAndStop(2);
} else if (((this["c" + sB].ty == "flint") && (this["c" + d[l[sB - 1] - 1]].ty == "ii")) && only([sB, d[l[sB - 1] - 1]])) {
this.output.ty = "fas";
this.output.count = "";
this.output.damage = 0;
this.output.gotoAndStop(2);
} else if ((((this["c" + sB].ty == "wp") && (this["c" + d[sB - 1]].ty == "wp")) && ((this["c" + d[d[sB - 1] - 1]].ty == "st") || (this["c" + d[d[sB - 1] - 1]].ty == "bb"))) && only([sB, d[sB - 1], d[d[sB - 1] - 1]])) {
this.output.ty = "WoodenSword";
this.output.count = "";
this.output.damage = 0;
this.output.gotoAndStop(2);
} else if ((((this["c" + sB].ty == "cs") && (this["c" + d[sB - 1]].ty == "cs")) && ((this["c" + d[d[sB - 1] - 1]].ty == "st") || (this["c" + d[d[sB - 1] - 1]].ty == "bb"))) && only([sB, d[sB - 1], d[d[sB - 1] - 1]])) {
this.output.ty = "StoneSword";
this.output.count = "";
this.output.damage = 0;
this.output.gotoAndStop(2);
} else if ((((this["c" + sB].ty == "ii") && (this["c" + d[sB - 1]].ty == "ii")) && ((this["c" + d[d[sB - 1] - 1]].ty == "st") || (this["c" + d[d[sB - 1] - 1]].ty == "bb"))) && only([sB, d[sB - 1], d[d[sB - 1] - 1]])) {
this.output.ty = "IronSword";
this.output.count = "";
this.output.damage = 0;
this.output.gotoAndStop(2);
} else if ((((this["c" + sB].ty == "gi") && (this["c" + d[sB - 1]].ty == "gi")) && ((this["c" + d[d[sB - 1] - 1]].ty == "st") || (this["c" + d[d[sB - 1] - 1]].ty == "bb"))) && only([sB, d[sB - 1], d[d[sB - 1] - 1]])) {
this.output.ty = "GoldSword";
this.output.count = "";
this.output.damage = 0;
this.output.gotoAndStop(2);
} else if ((((this["c" + sB].ty == "dm") && (this["c" + d[sB - 1]].ty == "dm")) && ((this["c" + d[d[sB - 1] - 1]].ty == "st") || (this["c" + d[d[sB - 1] - 1]].ty == "bb"))) && only([sB, d[sB - 1], d[d[sB - 1] - 1]])) {
this.output.ty = "DiamondSword";
this.output.count = "";
this.output.damage = 0;
this.output.gotoAndStop(2);
} else if (((this["c" + sB].ty == "rsd") && ((this["c" + d[sB - 1]].ty == "st") || (this["c" + d[sB - 1]].ty == "bb"))) && only([sB, d[sB - 1]])) {
this.output.ty = "rstorch";
this.output.count = 2;
this.output.damage = "";
this.output.gotoAndStop(2);
} else if (((this["c" + sB].ty == "r") && (this["c" + d[sB - 1]].ty == "r")) && only([sB, d[sB - 1]])) {
this.output.ty = "button";
this.output.count = "";
this.output.damage = "";
this.output.gotoAndStop(2);
} else if (((this["c" + sB].ty == "st") && (this["c" + d[sB - 1]].ty == "cs")) && only([sB, d[sB - 1]])) {
this.output.ty = "lever";
this.output.count = "";
this.output.damage = "";
this.output.gotoAndStop(2);
} else if (((this["c" + sB].ty == "r") && (this["c" + r[sB - 1]].ty == "r")) && only([sB, r[sB - 1]])) {
this.output.ty = "pp";
this.output.count = "";
this.output.damage = "";
this.output.gotoAndStop(2);
} else if ((((((this["c" + sB].ty == "gs") && (this["c" + d[sB - 1]].ty == "rsd")) && (this["c" + d[r[sB - 1] - 1]].ty == "gs")) && (this["c" + d[l[sB - 1] - 1]].ty == "gs")) && (this["c" + d[d[sB - 1] - 1]].ty == "ii")) && only([sB, d[sB - 1], d[d[sB - 1] - 1], d[r[sB - 1] - 1], d[l[sB - 1] - 1]])) {
this.output.ty = "light";
this.output.count = "";
this.output.damage = "";
this.output.gotoAndStop(2);
} else if ((((((((((this.c1.ty == "oddrock") && (this.c2.ty == "oddrock")) && (this.c3.ty == "oddrock")) && (this.c4.ty == "oddrock")) && (this.c5.ty == "dm")) && (this.c6.ty == "oddrock")) && (this.c7.ty == "oddrock")) && (this.c8.ty == "oddrock")) && (this.c9.ty == "oddrock")) && only([1, 2, 3, 4, 5, 6, 7, 8, 9])) {
this.output.ty = "mobSpawner";
this.output.count = "";
this.output.damage = "";
this.output.gotoAndStop(2);
} else if (((this["c" + sB].ty == "oddrock") && ((this["c" + d[sB - 1]].ty == "st") || (this["c" + d[sB - 1]].ty == "bb"))) && only([sB, d[sB - 1]])) {
this.output.ty = "ortorch";
this.output.count = 2;
this.output.damage = "";
this.output.gotoAndStop(2);
} else if ((((((((((this.c1.ty == "oddrock") && (this.c2.ty == "oddrock")) && (this.c3.ty == "oddrock")) && (this.c4.ty == "oddrock")) && (this.c5.ty == "ob")) && (this.c6.ty == "oddrock")) && (this.c7.ty == "oddrock")) && (this.c8.ty == "oddrock")) && (this.c9.ty == "oddrock")) && only([1, 2, 3, 4, 5, 6, 7, 8, 9])) {
this.output.ty = "portalstone";
this.output.count = "";
this.output.damage = "";
this.output.gotoAndStop(2);
} else if (((((this["c" + sB].ty == "yellowdust") && (this["c" + d[sB - 1]].ty == "yellowdust")) && (this["c" + r[sB - 1]].ty == "yellowdust")) && (this["c" + d[r[sB - 1] - 1]].ty == "yellowdust")) && only([sB, d[sB - 1], r[sB - 1], d[r[sB - 1] - 1]])) {
this.output.ty = "glow";
this.output.count = "";
this.output.damage = "";
this.output.gotoAndStop(2);
} else if ((((((((((this.c1.ty == "wp") && (this.c2.ty == "wp")) && (this.c3.ty == "wp")) && (this.c4.ty == "wp")) && (this.c5.ty == "rsd")) && (this.c6.ty == "wp")) && (this.c7.ty == "wp")) && (this.c8.ty == "wp")) && (this.c9.ty == "wp")) && only([1, 2, 3, 4, 5, 6, 7, 8, 9])) {
this.output.ty = "note";
this.output.count = "";
this.output.damage = "";
this.output.gotoAndStop(2);
} else if ((((((((((this.c1.ty == "wp") && (this.c2.ty == "wp")) && (this.c3.ty == "wp")) && (this.c4.ty == "cs")) && (this.c5.ty == "ii")) && (this.c6.ty == "cs")) && (this.c7.ty == "cs")) && (this.c8.ty == "rsd")) && (this.c9.ty == "cs")) && only([1, 2, 3, 4, 5, 6, 7, 8, 9])) {
this.output.ty = "piston";
this.output.count = "";
this.output.damage = "";
this.output.gotoAndStop(2);
} else if ((this["c" + sB].ty == "cchicken") && only([sB])) {
this.output.ty = "nugget";
this.output.count = 4;
this.output.damage = "";
this.output.gotoAndStop(2);
} else if ((((((this["c" + sB].ty == "ii") && (this["c" + d[sB - 1]].ty == "ii")) && (this["c" + d[r[sB - 1] - 1]].ty == "ii")) && (this["c" + r[r[sB - 1] - 1]].ty == "ii")) && (this["c" + d[r[r[sB - 1] - 1] - 1]].ty == "ii")) && only([sB, d[sB - 1], d[r[sB - 1] - 1], r[r[sB - 1] - 1], d[r[r[sB - 1] - 1] - 1]])) {
this.output.ty = "cart";
this.output.count = "";
this.output.damage = "";
this.output.gotoAndStop(2);
} else if ((((((((this.c1.ty == "ii") && (this.c3.ty == "ii")) && (this.c4.ty == "ii")) && ((this.c5.ty == "st") || (this.c5.ty == "bb"))) && (this.c6.ty == "ii")) && (this.c7.ty == "ii")) && (this.c9.ty == "ii")) && only([1, 3, 4, 5, 6, 7, 9])) {
this.output.ty = "rail";
this.output.count = 8;
this.output.damage = 0;
this.output.gotoAndStop(2);
} else if (((((((this["c" + sB].ty == "bb") && (this["c" + d[sB - 1]].ty == "bb")) && (this["c" + r[sB - 1]].ty == "bb")) && (this["c" + d[r[sB - 1] - 1]].ty == "bb")) && (this["c" + r[r[sB - 1] - 1]].ty == "bb")) && (this["c" + d[r[r[sB - 1] - 1] - 1]].ty == "bb")) && only([sB, d[sB - 1], r[sB - 1], d[r[sB - 1] - 1], r[r[sB - 1] - 1], d[r[r[sB - 1] - 1] - 1]])) {
this.output.ty = "raft";
this.output.count = 1;
this.output.damage = "";
this.output.gotoAndStop(2);
} else if (((((this["c" + sB].ty == "sd") && (this["c" + d[sB - 1]].ty == "sd")) && (this["c" + r[sB - 1]].ty == "sd")) && (this["c" + d[r[sB - 1] - 1]].ty == "sd")) && only([sB, d[sB - 1], r[sB - 1], d[r[sB - 1] - 1]])) {
this.output.ty = "ss";
this.output.count = "";
this.output.damage = "";
this.output.gotoAndStop(2);
} else if (((((((c1.ty == "fiber") && ((c2.ty == "st") || (c2.ty == "bb"))) && (c4.ty == "fiber")) && ((c6.ty == "st") || (c6.ty == "bb"))) && (c7.ty == "fiber")) && ((c8.ty == "st") || (c8.ty == "bb"))) && only([1, 2, 4, 6, 7, 8])) {
this.output.ty = "bow";
this.output.count = "";
this.output.damage = "";
this.output.gotoAndStop(2);
} else if (((((((c3.ty == "fiber") && ((c2.ty == "st") || (c2.ty == "bb"))) && (c6.ty == "fiber")) && ((c4.ty == "st") || (c4.ty == "bb"))) && (c9.ty == "fiber")) && ((c8.ty == "st") || (c8.ty == "bb"))) && only([2, 3, 4, 6, 8, 9])) {
this.output.ty = "bow";
this.output.count = "";
this.output.damage = "";
this.output.gotoAndStop(2);
} else if ((((this["c" + sB].ty == "flint") && (this["c" + d[d[sB - 1] - 1]].ty == "feather")) && ((this["c" + d[sB - 1]].ty == "st") || (this["c" + d[sB - 1]].ty == "bb"))) && only([sB, d[sB - 1], d[d[sB - 1] - 1]])) {
this.output.ty = "arrow";
this.output.count = 4;
this.output.damage = "";
this.output.gotoAndStop(2);
} else if ((((this["c" + sB].ty == "wp") && (this["c" + d[r[sB - 1] - 1]].ty == "wp")) && (this["c" + r[r[sB - 1] - 1]].ty == "wp")) && only([sB, d[r[sB - 1] - 1], r[r[sB - 1] - 1]])) {
this.output.ty = "bowl";
this.output.count = 3;
this.output.damage = "";
this.output.gotoAndStop(2);
} else if ((((this["c" + sB].ty == "ms1") && (this["c" + d[sB - 1]].ty == "ms2")) && (this["c" + d[d[sB - 1] - 1]].ty == "bowl")) && only([sB, d[sB - 1], d[d[sB - 1] - 1]])) {
this.output.ty = "soup";
this.output.count = "";
this.output.damage = "";
this.output.gotoAndStop(2);
} else if ((((this["c" + sB].ty == "ms2") && (this["c" + d[sB - 1]].ty == "ms1")) && (this["c" + d[d[sB - 1] - 1]].ty == "bowl")) && only([sB, d[sB - 1], d[d[sB - 1] - 1]])) {
this.output.ty = "soup";
this.output.count = "";
this.output.damage = "";
this.output.gotoAndStop(2);
} else if (((((this["c" + sB].ty == "wp") && (this["c" + r[sB - 1]].ty == "wp")) && ((this["c" + d[r[sB - 1] - 1]].ty == "st") || (this["c" + d[r[sB - 1] - 1]].ty == "bb"))) && ((this["c" + d[d[r[sB - 1] - 1] - 1]].ty == "st") || (this["c" + d[d[r[sB - 1] - 1] - 1]].ty == "bb"))) && only([sB, r[sB - 1], d[r[sB - 1] - 1], d[d[r[sB - 1] - 1] - 1]])) {
this.output.ty = "WoodenHoe";
this.output.count = "";
this.output.damage = 0;
this.output.gotoAndStop(2);
} else if (((((this["c" + sB].ty == "cs") && (this["c" + r[sB - 1]].ty == "cs")) && ((this["c" + d[r[sB - 1] - 1]].ty == "st") || (this["c" + d[r[sB - 1] - 1]].ty == "bb"))) && ((this["c" + d[d[r[sB - 1] - 1] - 1]].ty == "st") || (this["c" + d[d[r[sB - 1] - 1] - 1]].ty == "bb"))) && only([sB, r[sB - 1], d[r[sB - 1] - 1], d[d[r[sB - 1] - 1] - 1]])) {
this.output.ty = "StoneHoe";
this.output.count = "";
this.output.damage = 0;
this.output.gotoAndStop(2);
} else if (((((this["c" + sB].ty == "ii") && (this["c" + r[sB - 1]].ty == "ii")) && ((this["c" + d[r[sB - 1] - 1]].ty == "st") || (this["c" + d[r[sB - 1] - 1]].ty == "bb"))) && ((this["c" + d[d[r[sB - 1] - 1] - 1]].ty == "st") || (this["c" + d[d[r[sB - 1] - 1] - 1]].ty == "bb"))) && only([sB, r[sB - 1], d[r[sB - 1] - 1], d[d[r[sB - 1] - 1] - 1]])) {
this.output.ty = "IronHoe";
this.output.count = "";
this.output.damage = 0;
this.output.gotoAndStop(2);
} else if (((((this["c" + sB].ty == "gi") && (this["c" + r[sB - 1]].ty == "gi")) && ((this["c" + d[r[sB - 1] - 1]].ty == "st") || (this["c" + d[r[sB - 1] - 1]].ty == "bb"))) && ((this["c" + d[d[r[sB - 1] - 1] - 1]].ty == "st") || (this["c" + d[d[r[sB - 1] - 1] - 1]].ty == "bb"))) && only([sB, r[sB - 1], d[r[sB - 1] - 1], d[d[r[sB - 1] - 1] - 1]])) {
this.output.ty = "GoldHoe";
this.output.count = "";
this.output.damage = 0;
this.output.gotoAndStop(2);
} else if (((((this["c" + sB].ty == "dm") && (this["c" + r[sB - 1]].ty == "dm")) && ((this["c" + d[r[sB - 1] - 1]].ty == "st") || (this["c" + d[r[sB - 1] - 1]].ty == "bb"))) && ((this["c" + d[d[r[sB - 1] - 1] - 1]].ty == "st") || (this["c" + d[d[r[sB - 1] - 1] - 1]].ty == "bb"))) && only([sB, r[sB - 1], d[r[sB - 1] - 1], d[d[r[sB - 1] - 1] - 1]])) {
this.output.ty = "DiamondHoe";
this.output.count = "";
this.output.damage = 0;
this.output.gotoAndStop(2);
} else if (((((this["c" + sB].ty == "wp") && (this["c" + r[sB - 1]].ty == "wp")) && ((this["c" + d[sB - 1]].ty == "st") || (this["c" + d[sB - 1]].ty == "bb"))) && ((this["c" + d[d[sB - 1] - 1]].ty == "st") || (this["c" + d[d[sB - 1] - 1]].ty == "bb"))) && only([sB, r[sB - 1], d[sB - 1], d[d[sB - 1] - 1]])) {
this.output.ty = "WoodenHoe";
this.output.count = "";
this.output.damage = 0;
this.output.gotoAndStop(2);
} else if (((((this["c" + sB].ty == "cs") && (this["c" + r[sB - 1]].ty == "cs")) && ((this["c" + d[sB - 1]].ty == "st") || (this["c" + d[sB - 1]].ty == "bb"))) && ((this["c" + d[d[sB - 1] - 1]].ty == "st") || (this["c" + d[d[sB - 1] - 1]].ty == "bb"))) && only([sB, r[sB - 1], d[sB - 1], d[d[sB - 1] - 1]])) {
this.output.ty = "StoneHoe";
this.output.count = "";
this.output.damage = 0;
this.output.gotoAndStop(2);
} else if (((((this["c" + sB].ty == "ii") && (this["c" + r[sB - 1]].ty == "ii")) && ((this["c" + d[sB - 1]].ty == "st") || (this["c" + d[sB - 1]].ty == "bb"))) && ((this["c" + d[d[sB - 1] - 1]].ty == "st") || (this["c" + d[d[sB - 1] - 1]].ty == "bb"))) && only([sB, r[sB - 1], d[sB - 1], d[d[sB - 1] - 1]])) {
this.output.ty = "IronHoe";
this.output.count = "";
this.output.damage = 0;
this.output.gotoAndStop(2);
} else if (((((this["c" + sB].ty == "gi") && (this["c" + r[sB - 1]].ty == "gi")) && ((this["c" + d[sB - 1]].ty == "st") || (this["c" + d[sB - 1]].ty == "bb"))) && ((this["c" + d[d[sB - 1] - 1]].ty == "st") || (this["c" + d[d[sB - 1] - 1]].ty == "bb"))) && only([sB, r[sB - 1], d[sB - 1], d[d[sB - 1] - 1]])) {
this.output.ty = "GoldHoe";
this.output.count = "";
this.output.damage = 0;
this.output.gotoAndStop(2);
} else if (((((this["c" + sB].ty == "dm") && (this["c" + r[sB - 1]].ty == "dm")) && ((this["c" + d[sB - 1]].ty == "st") || (this["c" + d[sB - 1]].ty == "bb"))) && ((this["c" + d[d[sB - 1] - 1]].ty == "st") || (this["c" + d[d[sB - 1] - 1]].ty == "bb"))) && only([sB, r[sB - 1], d[sB - 1], d[d[sB - 1] - 1]])) {
this.output.ty = "DiamondHoe";
this.output.count = "";
this.output.damage = 0;
this.output.gotoAndStop(2);
} else if ((((this["c" + sB].ty == "wheat") && (this["c" + r[sB - 1]].ty == "wheat")) && (this["c" + r[r[sB - 1] - 1]].ty == "wheat")) && only([sB, r[sB - 1], r[r[sB - 1] - 1]])) {
this.output.ty = "bread";
this.output.count = "";
this.output.damage = "";
this.output.gotoAndStop(2);
} else if ((((((((((this.c1.ty == "gb") && (this.c2.ty == "gb")) && (this.c3.ty == "gb")) && (this.c4.ty == "gb")) && (this.c5.ty == "ap")) && (this.c6.ty == "gb")) && (this.c7.ty == "gb")) && (this.c8.ty == "gb")) && (this.c9.ty == "gb")) && only([1, 2, 3, 4, 5, 6, 7, 8, 9])) {
this.output.ty = "gap";
this.output.count = "";
this.output.damage = "";
this.output.gotoAndStop(2);
} else if (((((this["c" + sB].ty == "n") && (this["c" + d[sB - 1]].ty == "n")) && (this["c" + r[sB - 1]].ty == "n")) && (this["c" + d[r[sB - 1] - 1]].ty == "n")) && only([sB, d[sB - 1], r[sB - 1], d[r[sB - 1] - 1]])) {
this.output.ty = "nb";
this.output.count = 4;
this.output.damage = "";
this.output.gotoAndStop(2);
} else if (((((this["c" + sB].ty == "r") && (this["c" + d[sB - 1]].ty == "r")) && (this["c" + r[sB - 1]].ty == "r")) && (this["c" + d[r[sB - 1] - 1]].ty == "r")) && only([sB, d[sB - 1], r[sB - 1], d[r[sB - 1] - 1]])) {
this.output.ty = "sb";
this.output.count = 4;
this.output.damage = "";
this.output.gotoAndStop(2);
} else if ((((((((c1.ty == "wp") && (c2.ty == "wp")) && (c3.ty == "wp")) && (c4.ty == "wp")) && (c5.ty == "wp")) && (c6.ty == "wp")) && ((c8.ty == "st") || (c8.ty == "bb"))) && only([1, 2, 3, 4, 5, 6, 8])) {
this.output.ty = "sign";
this.output.count = "";
this.output.damage = "";
this.output.gotoAndStop(2);
} else if ((this["c" + sB].ty == "fw1") && only([sB])) {
this.output.ty = "dyeyellow";
this.output.count = 2;
this.output.damage = "";
this.output.gotoAndStop(2);
} else if ((this["c" + sB].ty == "fw2") && only([sB])) {
this.output.ty = "dyered";
this.output.count = 2;
this.output.damage = "";
this.output.gotoAndStop(2);
} else if (contain1("dyered", "dyeyellow")) {
this.output.ty = "dyeorange";
this.output.count = 2;
this.output.damage = "";
this.output.gotoAndStop(2);
} else if (contain1("clothwhite", "dyeyellow")) {
this.output.ty = "clothyellow";
this.output.count = "";
this.output.damage = "";
this.output.gotoAndStop(2);
} else if (contain1("clothwhite", "dyered")) {
this.output.ty = "clothred";
this.output.count = "";
this.output.damage = "";
this.output.gotoAndStop(2);
} else if ((contain1("clothwhite", "dyeorange") || contain1("clothred", "dyeyellow")) || contain1("clothyellow", "dyered")) {
this.output.ty = "clothorange";
this.output.count = "";
this.output.damage = "";
this.output.gotoAndStop(2);
} else if ((this["c" + sB].ty == "gap") && only([sB])) {
this.output.ty = "gasd";
this.output.count = "";
this.output.damage = "";
this.output.gotoAndStop(2);
} else if ((this["c" + sB].ty == "sc") && only([sB])) {
this.output.ty = "sugar";
this.output.count = "";
this.output.damage = "";
this.output.gotoAndStop(2);
} else if ((((((((((c1.ty == "mbk") && (c2.ty == "mbk")) && (c3.ty == "mbk")) && (c4.ty == "sugar")) && (c5.ty == "egg")) && (c6.ty == "sugar")) && (c7.ty == "wheat")) && (c8.ty == "wheat")) && (c9.ty == "wheat")) && only([1, 2, 3, 4, 5, 6, 7, 8, 9])) {
this.output.ty = "cake";
this.output.count = "";
this.output.damage = "";
this.output.gotoAndStop(2);
} else if ((((this["c" + sB].ty == "sc") && (this["c" + r[sB - 1]].ty == "sc")) && (this["c" + r[r[sB - 1] - 1]].ty == "sc")) && only([sB, r[sB - 1], r[r[sB - 1] - 1]])) {
this.output.ty = "paper";
this.output.count = 3;
this.output.damage = "";
this.output.gotoAndStop(2);
} else if ((((this["c" + sB].ty == "paper") && (this["c" + d[sB - 1]].ty == "paper")) && (this["c" + d[d[sB - 1] - 1]].ty == "paper")) && only([sB, d[sB - 1], d[d[sB - 1] - 1]])) {
this.output.ty = "book";
this.output.count = "";
this.output.damage = "";
this.output.gotoAndStop(2);
} else if ((((((((((this.c1.ty == "wp") && (this.c2.ty == "wp")) && (this.c3.ty == "wp")) && (this.c4.ty == "book")) && (this.c5.ty == "book")) && (this.c6.ty == "book")) && (this.c7.ty == "wp")) && (this.c8.ty == "wp")) && (this.c9.ty == "wp")) && only([1, 2, 3, 4, 5, 6, 7, 8, 9])) {
this.output.ty = "books";
this.output.count = "";
this.output.damage = "";
this.output.gotoAndStop(2);
}
}
};
Symbol 1572 MovieClip Frame 2
function requestClose() {
if (dragger._currentframe == 2) {
if (dragger.count == "") {
dragger.count = 1;
}
var _local4 = 1;
while (_local4 <= dragger.count) {
_root.dropNum++;
_root.world.attachMovie("drop", "drop" + _root.dropNum, _root.world.getNextHighestDepth());
_root.world["drop" + _root.dropNum]._x = (_root.blockX * 30) + 15;
_root.world["drop" + _root.dropNum]._y = ((-_root.blockY) * 30) - 15;
_root.world["drop" + _root.dropNum].gotoAndStop(dragger.ty);
_root.world["drop" + _root.dropNum].damage = dragger.damage;
_local4++;
}
}
var _local3 = 1;
while (_local3 <= 4) {
if (this["c" + _local3]._currentframe == 2) {
if (this["c" + _local3].count == "") {
this["c" + _local3].count = 1;
}
var _local4 = 1;
while (_local4 <= this["c" + _local3].count) {
_root.dropNum++;
_root.world.attachMovie("drop", "drop" + _root.dropNum, _root.world.getNextHighestDepth());
_root.world["drop" + _root.dropNum]._x = (_root.blockX * 30) + 15;
_root.world["drop" + _root.dropNum]._y = ((-_root.blockY) * 30) - 15;
_root.world["drop" + _root.dropNum].gotoAndStop(this["c" + _local3].ty);
_root.world["drop" + _root.dropNum].damage = this["c" + _local3].damage;
_local4++;
}
}
_local3++;
}
gotoAndStop (1);
}
stop();
var i = 1;
while (i <= 45) {
this["i" + i].number = i - 1;
if (_root.inventoryList[i - 1][0] != undefined) {
this["i" + i].gotoAndStop(2);
this["i" + i].ty = _root.inventoryList[i - 1][0];
if (_root.inventoryList[i - 1][1] > 1) {
this["i" + i].count = _root.inventoryList[i - 1][1];
} else {
this["i" + i].count = "";
}
this["i" + i].damage = _root.inventoryList[i - 1][2];
} else {
this["i" + i].gotoAndStop(1);
}
i++;
}
blocks = [1, 2, 3, 4];
d = [3, 4, undefined, undefined];
l = [undefined, 1, undefined, 3];
r = [2, undefined, 4, undefined];
Symbol 1572 MovieClip Frame 3
function requestClose() {
if (dragger._currentframe == 2) {
if (dragger.count == "") {
dragger.count = 1;
}
var _local4 = 1;
while (_local4 <= dragger.count) {
_root.dropNum++;
_root.world.attachMovie("drop", "drop" + _root.dropNum, _root.world.getNextHighestDepth());
_root.world["drop" + _root.dropNum]._x = craftCoords[0];
_root.world["drop" + _root.dropNum]._y = craftCoords[1] - 15;
_root.world["drop" + _root.dropNum].gotoAndStop(dragger.ty);
_root.world["drop" + _root.dropNum].damage = dragger.damage;
_local4++;
}
}
var _local3 = 1;
while (_local3 <= 9) {
if (this["c" + _local3]._currentframe == 2) {
if (this["c" + _local3].count == "") {
this["c" + _local3].count = 1;
}
var _local4 = 1;
while (_local4 <= this["c" + _local3].count) {
_root.dropNum++;
_root.world.attachMovie("drop", "drop" + _root.dropNum, _root.world.getNextHighestDepth());
_root.world["drop" + _root.dropNum]._x = craftCoords[0];
_root.world["drop" + _root.dropNum]._y = craftCoords[1];
_root.world["drop" + _root.dropNum].gotoAndStop(this["c" + _local3].ty);
_root.world["drop" + _root.dropNum].damage = this["c" + _local3].damage;
_local4++;
}
}
_local3++;
}
gotoAndStop (1);
}
stop();
var i = 1;
while (i <= 45) {
this["i" + i].number = i - 1;
if (_root.inventoryList[i - 1][0] != undefined) {
this["i" + i].gotoAndStop(2);
this["i" + i].ty = _root.inventoryList[i - 1][0];
if (_root.inventoryList[i - 1][1] > 1) {
this["i" + i].count = _root.inventoryList[i - 1][1];
} else {
this["i" + i].count = "";
}
this["i" + i].damage = _root.inventoryList[i - 1][2];
} else {
this["i" + i].gotoAndStop(1);
}
i++;
}
blocks = [1, 2, 3, 4, 5, 6, 7, 8, 9];
d = [4, 5, 6, 7, 8, 9, undefined, undefined, undefined];
l = [undefined, 1, 2, undefined, 4, 5, undefined, 7, 8];
r = [2, 3, undefined, 5, 6, undefined, 8, 9, undefined];
Symbol 1572 MovieClip Frame 4
function requestClose() {
if (dragger._currentframe == 2) {
if (dragger.count == "") {
dragger.count = 1;
}
var _local2 = 1;
while (_local2 <= dragger.count) {
_root.dropNum++;
_root.world.attachMovie("drop", "drop" + _root.dropNum, _root.world.getNextHighestDepth());
_root.world["drop" + _root.dropNum]._x = _root.world[smelter]._x;
_root.world["drop" + _root.dropNum]._y = _root.world[smelter]._y - 15;
_root.world["drop" + _root.dropNum].gotoAndStop(dragger.ty);
_root.world["drop" + _root.dropNum].damage = dragger.damage;
_local2++;
}
}
gotoAndStop (1);
}
stop();
var i = 1;
while (i <= 45) {
this["i" + i].number = i - 1;
if (_root.inventoryList[i - 1][0] != undefined) {
this["i" + i].gotoAndStop(2);
this["i" + i].ty = _root.inventoryList[i - 1][0];
if (_root.inventoryList[i - 1][1] > 1) {
this["i" + i].count = _root.inventoryList[i - 1][1];
} else {
this["i" + i].count = "";
}
this["i" + i].damage = _root.inventoryList[i - 1][2];
} else {
this["i" + i].gotoAndStop(1);
}
i++;
}
blocks = [];
onEnterFrame = function () {
if (_root.toSmelt[smelter][0] != undefined) {
cook.ty = _root.toSmelt[smelter][0];
cook.count = _root.toSmelt[smelter][1];
cook.gotoAndStop(2);
} else {
cook.gotoAndStop(1);
}
if (_root.toSmelt[smelter][2] != undefined) {
fuel.ty = _root.toSmelt[smelter][2];
fuel.typ.gotoAndStop(_root.toSmelt[smelter][2]);
fuel.count = _root.toSmelt[smelter][3];
fuel.gotoAndStop(2);
} else {
fuel.gotoAndStop(1);
}
if (_root.toSmelt[smelter][6] != undefined) {
output2.ty = _root.toSmelt[smelter][6];
output2.count = _root.toSmelt[smelter][7];
output2.gotoAndStop(2);
} else {
output2.gotoAndStop(1);
}
smeltHeat.gotoAndStop(Math.round((_root.toSmelt[smelter][4] / _root.toSmelt[smelter][8]) * 10) + 1);
progressArrow.gotoAndStop(_root.toSmelt[smelter][5]);
};
Symbol 1572 MovieClip Frame 5
function requestClose() {
if (dragger._currentframe == 2) {
if (dragger.count == "") {
dragger.count = 1;
}
var _local2 = 1;
while (_local2 <= dragger.count) {
_root.dropNum++;
_root.world.attachMovie("drop", "drop" + _root.dropNum, _root.world.getNextHighestDepth());
_root.world["drop" + _root.dropNum]._x = _root.world[chest]._x;
_root.world["drop" + _root.dropNum]._y = _root.world[chest]._y - 15;
_root.world["drop" + _root.dropNum].gotoAndStop(dragger.ty);
_root.world["drop" + _root.dropNum].damage = dragger.damage;
_local2++;
}
}
gotoAndStop (1);
}
stop();
var i = 1;
while (i <= 45) {
this["i" + i].number = i - 1;
if (_root.inventoryList[i - 1][0] != undefined) {
this["i" + i].gotoAndStop(2);
this["i" + i].ty = _root.inventoryList[i - 1][0];
if (_root.inventoryList[i - 1][1] > 1) {
this["i" + i].count = _root.inventoryList[i - 1][1];
} else {
this["i" + i].count = "";
}
this["i" + i].damage = _root.inventoryList[i - 1][2];
} else {
this["i" + i].gotoAndStop(1);
}
i++;
}
var i = 0;
while (i < 27) {
if (_root.chests[chest][i][0] != undefined) {
this["h" + (i + 1)].number = i - 1;
this["h" + (i + 1)].ty = _root.chests[chest][i][0];
this["h" + (i + 1)].count = _root.chests[chest][i][1];
this["h" + (i + 1)].damage = _root.chests[chest][i][2];
this["h" + (i + 1)].gotoAndStop(2);
} else {
this["h" + (i + 1)].gotoAndStop(1);
}
i++;
}
onEnterFrame = function () {
if (_currentframe == 5) {
var _local3 = 0;
while (_local3 < 27) {
if (this["h" + (_local3 + 1)]._currentframe == 2) {
_root.chests[chest][_local3][0] = this["h" + (_local3 + 1)].ty;
_root.chests[chest][_local3][1] = this["h" + (_local3 + 1)].count;
_root.chests[chest][_local3][2] = this["h" + (_local3 + 1)].damage;
} else {
_root.chests[chest][_local3] = [undefined, 0, 0];
}
_local3++;
}
}
};
Symbol 1572 MovieClip Frame 6
function requestClose() {
gotoAndStop (1);
}
stop();
stop();
Symbol 1572 MovieClip Frame 7
function requestClose() {
gotoAndStop (1);
}
stop();
Symbol 1572 MovieClip Frame 8
function requestClose() {
if (signText == _root.signs[sign]) {
gotoAndStop (1);
}
}
stop();
signText = _root.signs[sign];
signText.restrict = "A-Za-z0-9";
Symbol 1572 MovieClip Frame 9
stop();
pointz = _root.so2.data.score;
Instance of Symbol 1129 MovieClip "buy" in Symbol 1572 MovieClip Frame 9
onClipEvent (data) {
if (endScore == "error") {
toAdd = 0;
_parent["errr" + which].play();
} else {
_root.so2.data.score = endScore;
_parent.pointz = endScore;
if (what == "diamond") {
_root.dropNum++;
_root.world.attachMovie("drop", "drop" + _root.dropNum, _root.world.getNextHighestDepth());
_root.world["drop" + _root.dropNum]._x = (_root.blockX * 30) + 15;
_root.world["drop" + _root.dropNum]._y = ((-_root.blockY) * 30) - 45;
_root.world["drop" + _root.dropNum].damage = 0;
_root.world["drop" + _root.dropNum].gotoAndStop("dm");
} else if (what == "goldenapple") {
_root.dropNum++;
_root.world.attachMovie("drop", "drop" + _root.dropNum, _root.world.getNextHighestDepth());
_root.world["drop" + _root.dropNum]._x = (_root.blockX * 30) + 15;
_root.world["drop" + _root.dropNum]._y = ((-_root.blockY) * 30) - 45;
_root.world["drop" + _root.dropNum].damage = 0;
_root.world["drop" + _root.dropNum].gotoAndStop("gap");
} else if (what == "obsidianpickaxe") {
_root.dropNum++;
_root.world.attachMovie("drop", "drop" + _root.dropNum, _root.world.getNextHighestDepth());
_root.world["drop" + _root.dropNum]._x = (_root.blockX * 30) + 15;
_root.world["drop" + _root.dropNum]._y = ((-_root.blockY) * 30) - 45;
_root.world["drop" + _root.dropNum].damage = 0;
_root.world["drop" + _root.dropNum].gotoAndStop("ObsidianPickaxe");
}
}
}
Symbol 1579 MovieClip Frame 1
onEnterFrame = function () {
gotoAndStop((10 - Math.ceil(_root.food / 100)) + 1);
};
Symbol 1587 MovieClip Frame 1
stop();
achievements = ["Collecting wood", "Opening inventory", "Ready to craft", "Placing blocks", "Ready to mine", "Torch time", "Pickaxe upgrade", "RAMPAGE", "Smelt it", "Slayer 1", "Gold mine", "Diamond mine", "Quite wierd", "Obsidian", "A'nether task", "Advanced door"];
if (_root.achieve == 0) {
gotoAndPlay (101);
}
Symbol 1587 MovieClip Frame 2
aget = achievements[_root.achieve - 1];
achieved = _root.achieve;
delete onEnterFrame;
play();
_root.unlockNewgroundsMedal(aget);
Symbol 1587 MovieClip Frame 3
onEnterFrame = function () {
if (achieved != _root.achieve) {
gotoAndPlay (2);
}
};
Symbol 1587 MovieClip Frame 60
taskKey = ("Press " + _root.so2.data.keysNames[3]) + " for tasks";
Symbol 1587 MovieClip Frame 100
gotoAndStop (1);
delete onEnterFrame;
Symbol 1587 MovieClip Frame 101
blankForHelp = ("Press " + _root.so2.data.keysNames[4]) + " for help!";
stop();
onEnterFrame = function () {
if (_root.achieve != 0) {
gotoAndPlay (2);
}
};
Symbol 1588 Button
on (release) {
if (inventory._currentframe != 1) {
inventory.requestClose();
} else if (blackScreen._currentframe == 3) {
pawsed = false;
blackScreen.gotoAndStop(1);
} else {
pawsed = true;
blackScreen.gotoAndStop(3);
}
}
Symbol 1606 MovieClip Frame 1
gotoAndStop(random(_totalframes) + 1);
Symbol 1607 MovieClip Frame 10
stop();
Symbol 1616 Button
on (release) {
_root.pawsed = false;
gotoAndStop (1);
}
Symbol 1617 Button
on (release) {
_root.pawsed = false;
for (var i in _root) {
if (i != "befe") {
delete _root[i];
}
}
_root.gotoAndStop("home");
}
Symbol 1622 Button
on (release) {
gotoAndStop (5);
}
Symbol 1624 Button
on (release) {
gotoAndStop (4);
}
Symbol 1626 Button
on (release) {
gotoAndStop (6);
}
Symbol 1630 MovieClip Frame 1
stop();
if (_root.loggedIn) {
gotoAndStop (2);
}
Symbol 1630 MovieClip Frame 2
pxdnes = _root.so2.data.score;
Symbol 1638 MovieClip [StepThemeColor1] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "themeColor");
Symbol 1650 MovieClip [NumericStepper] Frame 1
#initclip 113
Object.registerClass("NumericStepper", mx.controls.NumericStepper);
#endinitclip
stop();
Instance of Symbol 186 MovieClip [SimpleButton] in Symbol 1650 MovieClip [NumericStepper] Frame 2
//component parameters
onClipEvent (initialize) {
selected = false;
toggle = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 787 MovieClip [TextInput] in Symbol 1650 MovieClip [NumericStepper] Frame 2
//component parameters
onClipEvent (initialize) {
editable = true;
password = false;
text = "";
maxChars = null;
restrict = "null";
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 1653 Button
on (release) {
gotoAndStop (3);
}
Symbol 1657 Button
on (release) {
bindKey = "inventory";
}
Symbol 1659 Button
on (release) {
bindKey = "secondClick";
}
Symbol 1663 Button
on (release) {
bindKey = "drop";
}
Symbol 1666 Button
on (release) {
bindKey = "task";
}
Symbol 1669 Button
on (release) {
bindKey = "help";
}
Symbol 1824 MovieClip Frame 1
stop();
gotoAndStop(_root.achieve + 1);
Symbol 1824 MovieClip Frame 2
inventoryKey = ("To open your inventory, press " + _root.so2.data.keysNames[0]) + " on your keyboard";
Symbol 1824 MovieClip Frame 3
craftKey = ("Place 4 wooden planks in the crafting area of the inventory by clicking and " + _root.so2.data.keysNames[1]) + "+clicking and dragging.";
Symbol 1824 MovieClip Frame 4
placeKey = ("To place a block in the world, use the scroll wheel to select the block you want to place from the inventory, and " + _root.so2.data.keysNames[1]) + "+click in the spot you want to place it at.";
Symbol 1824 MovieClip Frame 5
mineKey = ("Place your crafting table in the world, and " + _root.so2.data.keysNames[1]) + "+click on it.\nThen make a pickaxe with 2 sticks and 3 wooden planks";
Symbol 1826 MovieClip Frame 1
stop();
_root.pawsed = false;
Symbol 1826 MovieClip Frame 2
noClick.useHandCursor = false;
Symbol 1826 MovieClip Frame 3
noClick.useHandCursor = false;
_root.save();
_root.pawsed = true;
Symbol 1826 MovieClip Frame 4
noClick.useHandCursor = false;
_root.pawsed = true;
soundVol.value = _root.so2.data.soundVol;
songVol.value = _root.so2.data.songVol;
qual.value = _root.so2.data.qual;
diff.selectedIndex = _root.so2.data.diff - 1;
bindKey = "";
keyNames = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "Space", "Shift", "Left", "Right", "Up", "Down", "Enter", "Ctrl", "Tab"];
keyValues = [65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 32, 16, 37, 39, 38, 40, 13, 17, 9];
keyObject = [];
var i = 0;
while (i < keyNames.length) {
keyObject[keyValues[i]] = keyNames[i];
i++;
}
keyChoices = ["inventory", "secondClick", "drop", "task", "help"];
keyChoicesObject = new Object();
keyChoicesObject.inventory = 0;
keyChoicesObject.secondClick = 1;
keyChoicesObject.drop = 2;
keyChoicesObject.task = 3;
keyChoicesObject.help = 4;
onEnterFrame = function () {
if (_currentframe == 4) {
if (keyChoicesObject[bindKey] != undefined) {
if (Key.isDown(Key.getCode()) && (keyObject[Key.getCode()] != undefined)) {
quit = false;
for (var _local3 in _root.so2.data.keys) {
if (_root.so2.data.keys[_local3] == Key.getCode()) {
quit = true;
}
}
if (quit != true) {
_root.so2.data.keys[keyChoicesObject[bindKey]] = Key.getCode();
_root.so2.data.keysNames[keyChoicesObject[bindKey]] = keyObject[Key.getCode()];
bindKey = "";
}
}
}
for (var _local3 in keyChoices) {
if (keyChoices[_local3] == bindKey) {
this[keyChoices[_local3] + "Key"] = (">" + keyObject[_root.so2.data.keys[_local3]]) + "<";
} else {
this[keyChoices[_local3] + "Key"] = keyObject[_root.so2.data.keys[_local3]];
}
}
_root.so2.data.soundVol = soundVol.value;
_root.so2.data.songVol = songVol.value;
_root.so2.data.qual = qual.value;
_root.so2.data.diff = diff.selectedIndex + 1;
_highquality = _root.so2.data.qual;
}
};
Instance of Symbol 1650 MovieClip [NumericStepper] "soundVol" in Symbol 1826 MovieClip Frame 4
//component parameters
onClipEvent (construct) {
maximum = 100;
minimum = 0;
stepSize = 5;
value = 100;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 1650 MovieClip [NumericStepper] "songVol" in Symbol 1826 MovieClip Frame 4
//component parameters
onClipEvent (construct) {
maximum = 100;
minimum = 0;
stepSize = 5;
value = 100;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 1650 MovieClip [NumericStepper] "qual" in Symbol 1826 MovieClip Frame 4
//component parameters
onClipEvent (construct) {
maximum = 3;
minimum = 1;
stepSize = 1;
value = 2;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 867 MovieClip [ComboBox] "diff" in Symbol 1826 MovieClip Frame 4
//component parameters
onClipEvent (construct) {
data = [];
data[0] = 1;
data[1] = 2;
data[2] = 3;
editable = false;
labels = [];
labels[0] = "Peaceful";
labels[1] = "Monsters";
labels[2] = "Lonely";
rowCount = 3;
restrict = "";
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 1826 MovieClip Frame 5
noClick.useHandCursor = false;
_root.pawsed = true;
Symbol 1826 MovieClip Frame 6
noClick.useHandCursor = false;
_root.pawsed = true;
Symbol 1827 MovieClip Frame 1
var i = 1;
while (i <= 100) {
a = createEmptyMovieClip("snd" + i, getNextHighestDepth());
a.snd = new Sound(a);
i++;
}
createEmptyMovieClip("underWater", getNextHighestDepth());
underWater.snd = new Sound(underWater);
underWater.snd.attachSound("underwater");
createEmptyMovieClip("rain", getNextHighestDepth());
rain.sounding = 0;
rain.snd.setVolume(0);
rain.snd = new Sound(rain);
rain.snd.onSoundComplete = function () {
_root.soundPlayer.rain.snd.start();
};
Symbol 1828 MovieClip Frame 1
stop();
onEnterFrame = function () {
a = _currentframe;
if (_currentframe == 1) {
if (_root.rightKey) {
play();
}
} else if (_currentframe < 4) {
if (!_root.rightKey) {
gotoAndPlay (5);
}
} else if (_currentframe == 4) {
stop();
if (!_root.rightKey) {
gotoAndStop (1);
}
} else if (_currentframe < 8) {
if (_root.rightKey) {
gotoAndStop (9);
}
} else if (_currentframe == 8) {
stop();
if (!_root.rightKey) {
gotoAndStop (1);
}
} else if (_currentframe == 9) {
stop();
_root.rightSprinting = true;
if (!_root.rightKey) {
_root.rightSprinting = false;
gotoAndStop (1);
}
}
};
Symbol 1829 MovieClip Frame 1
stop();
onEnterFrame = function () {
a = _currentframe;
if (_currentframe == 1) {
if (_root.leftKey) {
play();
}
} else if (_currentframe < 4) {
if (!_root.leftKey) {
gotoAndPlay (5);
}
} else if (_currentframe == 4) {
stop();
if (!_root.leftKey) {
gotoAndStop (1);
}
} else if (_currentframe < 8) {
if (_root.leftKey) {
gotoAndStop (9);
}
} else if (_currentframe == 8) {
stop();
if (!_root.leftKey) {
gotoAndStop (1);
}
} else if (_currentframe == 9) {
stop();
_root.leftSprinting = true;
if (!_root.leftKey) {
_root.leftSprinting = false;
gotoAndStop (1);
}
}
};