Frame 1
function itemHandler0(obj, item) {
_root.quitToMenu();
myMenu.customItems[0].enabled = false;
myMenu.customItems[1].enabled = true;
}
function itemHandler1(obj, item) {
getURL ("http://www.jacksmack.com", "_blank");
myMenu.customItems[0].enabled = true;
myMenu.customItems[1].enabled = false;
}
mochi.MochiServices.connect("72a0a70e220b067d");
NewgroundsAPI.connectMovie(2136);
var myMenu = new ContextMenu();
myMenu.hideBuiltInItems();
myMenu.customItems.push(new ContextMenuItem("Return to the Main Menu", itemHandler0));
myMenu.customItems.push(new ContextMenuItem("Visit Jacksmack.com", itemHandler1));
myMenu.customItems[1].separatorBefore = true;
_root.menu = myMenu;
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
var pv;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
pv = ((fv == 5) ? (getVersion()) : (System.capabilities.version));
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=8&fv=") + fv) + "&v=") + escape(pv)) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
__com_mochibot__("28b30319", this, 10301, true);
gameStyle = "random";
Frame 9
_root.SoundOnOff = true;
Frame 19
scoresBG.useHandCursor = false;
scoresBG._visible = false;
if (_root.sounds.onOff == true) {
sounds.myBGSound.stop();
sounds.myBGSound.start();
}
stop();
_quality = "HIGH";
win._visible = false;
var gameLevel = 1;
function randomMap() {
myMap = new Array(gridSize);
TC = new Array(gridSize);
doNotcheck = new Array(gridSize);
CN = new Array(gridSize);
tilesToChange = new Array(gridSize);
CN = new Array(gridSize);
msize = 0;
while (msize <= (gridSize - 1)) {
myMap[msize] = new Array(gridSize);
tilesToChange[msize] = new Array(gridSize);
CN[msize] = new Array(gridSize);
TC[msize] = new Array(gridSize);
doNotcheck[msize] = new Array(gridSize);
msize++;
}
var _local3 = 0;
while (_local3 < gridSize) {
var _local2 = 0;
while (_local2 < gridSize) {
var _local4 = random(numberOfOptions);
myMap[_local3][_local2] = _local4 + 1;
CN[_local3][_local2] = false;
TC[_local3][_local2] = undefined;
TC[startx][starty] = true;
_root.tiles[(("t_" + _local3) + "_") + _local2].gotoAndStop(myMap[_local3][_local2]);
_root.tiles[(("t_" + _local3) + "_") + _local2].myNum.text = myMap[_local3][_local2];
_root.tiles[(("t_" + _local3) + "_") + _local2].topRightCorner.gotoAndStop(1);
_root.tiles[(("t_" + _local3) + "_") + _local2].bottomRightCorner.gotoAndStop(1);
_root.tiles[(("t_" + _local3) + "_") + _local2].topLeftCorner.gotoAndStop(1);
_root.tiles[(("t_" + _local3) + "_") + _local2].bottomLeftCorner.gotoAndStop(1);
_local2++;
}
_local3++;
}
}
function mazeMap() {
myMap = new Array(gridSize);
TC = new Array(gridSize);
doNotcheck = new Array(gridSize);
CN = new Array(gridSize);
tilesToChange = new Array(gridSize);
CN = new Array(gridSize);
msize = 0;
while (msize <= (gridSize - 1)) {
myMap[msize] = new Array(gridSize);
tilesToChange[msize] = new Array(gridSize);
CN[msize] = new Array(gridSize);
TC[msize] = new Array(gridSize);
doNotcheck[msize] = new Array(gridSize);
msize++;
}
var _local3 = 0;
while (_local3 < gridSize) {
var _local2 = 0;
while (_local2 < gridSize) {
var _local4 = random(numberOfOptions);
myMap[_local3][_local2] = _local4 + 1;
CN[_local3][_local2] = false;
TC[_local3][_local2] = undefined;
TC[startx][starty] = true;
_root.tiles[(("t_" + _local3) + "_") + _local2].gotoAndStop(myMap[_local3][_local2]);
_root.tiles[(("t_" + _local3) + "_") + _local2].myNum.text = myMap[_local3][_local2];
_root.tiles[(("t_" + _local3) + "_") + _local2].topRightCorner.gotoAndStop(1);
_root.tiles[(("t_" + _local3) + "_") + _local2].bottomRightCorner.gotoAndStop(1);
_root.tiles[(("t_" + _local3) + "_") + _local2].topLeftCorner.gotoAndStop(1);
_root.tiles[(("t_" + _local3) + "_") + _local2].bottomLeftCorner.gotoAndStop(1);
_local2++;
}
_local3++;
}
}
function puzzleMap() {
TC = new Array(gridSize);
doNotcheck = new Array(gridSize);
CN = new Array(gridSize);
tilesToChange = new Array(gridSize);
CN = new Array(gridSize);
msize = 0;
while (msize <= (gridSize - 1)) {
tilesToChange[msize] = new Array(gridSize);
CN[msize] = new Array(gridSize);
TC[msize] = new Array(gridSize);
doNotcheck[msize] = new Array(gridSize);
msize++;
}
var _local3 = 0;
while (_local3 < (gridSize - 1)) {
var _local2 = 0;
while (_local2 < (gridSize - 1)) {
CN[_local3][_local2] = false;
TC[_local3][_local2] = undefined;
TC[startx][starty] = true;
_root.tiles[(("t_" + _local3) + "_") + _local2].gotoAndStop(myMap[_local3][_local2]);
_root.tiles[(("t_" + _local3) + "_") + _local2].topRightCorner.gotoAndStop(1);
_root.tiles[(("t_" + _local3) + "_") + _local2].bottomRightCorner.gotoAndStop(1);
_root.tiles[(("t_" + _local3) + "_") + _local2].topLeftCorner.gotoAndStop(1);
_root.tiles[(("t_" + _local3) + "_") + _local2].bottomLeftCorner.gotoAndStop(1);
_local2++;
}
_local3++;
}
}
function customMap() {
myMap = new Array(gridSize);
TC = new Array(gridSize);
doNotcheck = new Array(gridSize);
CN = new Array(gridSize);
tilesToChange = new Array(gridSize);
CN = new Array(gridSize);
msize = 0;
while (msize <= (gridSize - 1)) {
myMap[msize] = new Array(gridSize);
tilesToChange[msize] = new Array(gridSize);
CN[msize] = new Array(gridSize);
TC[msize] = new Array(gridSize);
doNotcheck[msize] = new Array(gridSize);
msize++;
}
var _local3 = 0;
while (_local3 <= (gridSize - 1)) {
var _local2 = 0;
while (_local2 <= (gridSize - 1)) {
var _local4 = random(numberOfOptions);
myMap[_local3][_local2] = _local4 + 1;
CN[_local3][_local2] = false;
TC[_local3][_local2] = undefined;
TC[startx][starty] = true;
_root.tiles[(("t_" + _local3) + "_") + _local2].gotoAndStop(myMap[_local3][_local2]);
_root.tiles[(("t_" + _local3) + "_") + _local2].myNum.text = myMap[_local3][_local2];
_root.tiles[(("t_" + _local3) + "_") + _local2].topRightCorner.gotoAndStop(1);
_root.tiles[(("t_" + _local3) + "_") + _local2].bottomRightCorner.gotoAndStop(1);
_root.tiles[(("t_" + _local3) + "_") + _local2].topLeftCorner.gotoAndStop(1);
_root.tiles[(("t_" + _local3) + "_") + _local2].bottomLeftCorner.gotoAndStop(1);
_local2++;
}
_local3++;
}
}
function lvlDesignerMap() {
if (lvlDesignerStart == true) {
myMap = new Array(gridSize);
}
TC = new Array(gridSize);
doNotcheck = new Array(gridSize);
CN = new Array(gridSize);
tilesToChange = new Array(gridSize);
CN = new Array(gridSize);
msize = 0;
while (msize <= (gridSize - 1)) {
if (lvlDesignerStart == true) {
myMap[msize] = new Array(gridSize);
}
tilesToChange[msize] = new Array(gridSize);
CN[msize] = new Array(gridSize);
TC[msize] = new Array(gridSize);
doNotcheck[msize] = new Array(gridSize);
msize++;
}
var _local3 = 0;
while (_local3 < gridSize) {
var _local2 = 0;
while (_local2 < gridSize) {
if (lvlDesignerStart == true) {
myMap[_local3][_local2] = devTile;
}
CN[_local3][_local2] = false;
TC[_local3][_local2] = false;
_root.tiles[(("t_" + _local3) + "_") + _local2].gotoAndStop(myMap[_local3][_local2]);
_root.tiles[(("t_" + _local3) + "_") + _local2].topRightCorner.gotoAndStop(1);
_root.tiles[(("t_" + _local3) + "_") + _local2].bottomRightCorner.gotoAndStop(1);
_root.tiles[(("t_" + _local3) + "_") + _local2].topLeftCorner.gotoAndStop(1);
_root.tiles[(("t_" + _local3) + "_") + _local2].bottomLeftCorner.gotoAndStop(1);
_root.tiles[(("t_" + _local3) + "_") + _local2].topRightDETAIL.gotoAndStop(1);
_root.tiles[(("t_" + _local3) + "_") + _local2].bottomRightDETAIL.gotoAndStop(1);
_root.tiles[(("t_" + _local3) + "_") + _local2].topLeftDETAIL.gotoAndStop(1);
_root.tiles[(("t_" + _local3) + "_") + _local2].bottomLeftDETAIL.gotoAndStop(1);
_local2++;
}
_local3++;
}
lvlDesignerStart = false;
}
gridSize = 14;
puzzlelvl = 1;
var multi = 0;
var Chipotle = 0;
var winner = false;
game = {tileW:40, tileH:40};
game.Tile1 = function () {
};
game.Tile1.prototype.frame = 1;
game.Tile2 = function () {
};
game.Tile2.prototype.frame = 2;
game.Tile3 = function () {
};
game.Tile3.prototype.frame = 3;
game.Tile4 = function () {
};
game.Tile4.prototype.frame = 4;
game.Tile5 = function () {
};
game.Tile5.prototype.frame = 5;
game.Tile6 = function () {
};
game.Tile6.prototype.frame = 6;
game.Tile7 = function () {
};
game.Tile7.prototype.frame = 7;
game.Tile8 = function () {
};
game.Tile8.prototype.frame = 8;
game.Tile9 = function () {
};
game.Tile9.prototype.frame = 9;
game.Tile10 = function () {
};
game.Tile10.prototype.frame = 10;
game.Tile11 = function () {
};
game.Tile11.prototype.frame = 11;
game.Tile12 = function () {
};
game.Tile12.prototype.frame = 12;
game.Tile13 = function () {
};
game.Tile13.prototype.frame = 13;
game.Tile14 = function () {
};
game.Tile14.prototype.frame = 14;
game.Tile15 = function () {
};
game.Tile15.prototype.frame = 15;
game.Tile16 = function () {
};
game.Tile16.prototype.frame = 16;
game.Tile17 = function () {
};
game.Tile17.prototype.frame = 17;
game.Tile18 = function () {
};
game.Tile18.prototype.frame = 18;
greenTile = 1;
yellowTile = 2;
redTile = 3;
blueTile = 4;
purpleTile = 5;
orangeTile = 6;
blacktile = 7;
metalTile1 = 8;
metalTile2 = 9;
metalTile3 = 10;
switchTile1 = 11;
switchTile2 = 12;
switchTile3 = 13;
timerTile1 = 14;
timerTile2 = 15;
timerTile3 = 16;
finishTile = 17;
devTile = 18;
randomMap();
mainSwitch1x = -1;
mainSwitch1y = -1;
mainSwitch2x = -1;
mainSwitch2y = -1;
mainSwitch3x = -1;
mainSwitch3y = -1;
mainMetal1x = -1;
mainMetal1y = -1;
mainMetal2x = -1;
mainMetal2y = -1;
mainMetal3x = -1;
mainMetal3y = -1;
endCondition = "all";
endPositionx = gridSize;
endPositiony = gridSize;
var mainMapArray = new Array();
mainMapArray.push(myMap);
mainMapArray.push(mainSwitch1x);
mainMapArray.push(mainSwitch1y);
mainMapArray.push(mainSwitch2x);
mainMapArray.push(mainSwitch2y);
mainMapArray.push(mainSwitch3x);
mainMapArray.push(mainSwitch3y);
mainMapArray.push(mainMetal1x);
mainMapArray.push(mainMetal1y);
mainMapArray.push(mainMetal2x);
mainMapArray.push(mainMetal2y);
mainMapArray.push(mainMetal3x);
mainMapArray.push(mainMetal3y);
mainMapArray.push(endCondition);
mainMapArray.push(endPositionx);
mainMapArray.push(endPositiony);
trace(mainMapArray);
function quitToMenu() {
_root.inPlay = false;
removeMovieClip(_root.tiles);
gotoAndPlay ("mainMenu");
}
function quitToMenu2() {
_root.inPlay = false;
removeMovieClip(_root.tiles);
gotoAndStop ("submitScore");
}
function CNReset() {
CN = new Array(new Array());
CN[0][0] = false;
TC = new Array(new Array());
TC[0][0] = true;
}
function buildMap(map) {
_root.removeMovieClip(_root.tiles);
_root.attachMovie("empty", "tiles", ++d);
_root.tiles._x = 30 + (game.tileW * ((14 - gridSize) / 2));
_root.tiles._y = 60;
game.clip = _root.tiles;
var _local6 = map[0].length;
var _local7 = map.length;
var _local4 = 0;
while (_local4 <= (gridSize - 1)) {
var _local3 = 0;
while (_local3 <= (gridSize - 1)) {
var _local2 = (("t_" + _local4) + "_") + _local3;
CN[_local4][_local3] = false;
game[_local2] = new game["Tile" + map[_local4][_local3]]();
game.clip.attachMovie("GlobDynamic1", _local2, (_local4 * 100) + (_local3 * 2));
_root.tiles[(("t_" + _local4) + "_") + _local3].myNum.text = map[_local4][_local3];
game.clip[_local2].gotoAndStop(1);
game.clip[_local2]._x = _local3 * game.tileW;
game.clip[_local2]._y = _local4 * game.tileH;
game.clip[_local2].gotoAndStop(game[_local2].frame);
game.clip[_local2].upArrow._visible = false;
game.clip[_local2].downArrow._visible = false;
game.clip[_local2].leftArrow._visible = false;
game.clip[_local2].rightArrow._visible = false;
game.clip[_local2].upRightArrow._visible = false;
game.clip[_local2].downRightArrow._visible = false;
game.clip[_local2].upLeftArrow._visible = false;
game.clip[_local2].downLeftArrow._visible = false;
game.clip[_local2].topCover._visible = false;
game.clip[_local2].solid._visible = false;
_local3++;
}
_local4++;
}
switch (gameStyle) {
case "timed" :
trace("Timed");
randomMap();
break;
case "maze" :
trace("maze");
mazeMap();
break;
case "puzzle" :
trace("Puzzle");
puzzleMap();
break;
case "random" :
trace("Random");
randomMap();
break;
case "custom" :
trace("Custom");
customMap();
break;
case "lvlDesigner" :
trace("lvlDesigner");
lvlDesignerMap();
break;
default :
trace("No Game Style: Going to Random");
randomMap();
}
}
function checkLongs(xpos, ypos) {
if (((myMap[xpos][ypos + 1] == myMap[xpos][ypos]) && (TC[xpos][ypos + 1] != true)) && (TC[xpos][ypos] == true)) {
TC[xpos][ypos + 1] = true;
_root.multi++;
var _local4 = 1 * _root.multi;
_root.tiles[(("t_" + xpos) + "_") + (ypos + 1)].pointsAnimate.points.pointsText.text = _local4;
_root.tiles[(("t_" + xpos) + "_") + (ypos + 1)].pointsAnimate.play();
_root.Chipotle = _root.Chipotle + _local4;
checkLongs(xpos, ypos + 1);
}
if (((myMap[xpos][ypos - 1] == myMap[xpos][ypos]) && (TC[xpos][ypos - 1] != true)) && (TC[xpos][ypos] == true)) {
TC[xpos][ypos - 1] = true;
_root.multi++;
var _local4 = 1 * _root.multi;
_root.tiles[(("t_" + xpos) + "_") + (ypos - 1)].pointsAnimate.points.pointsText.text = _local4;
_root.tiles[(("t_" + xpos) + "_") + (ypos - 1)].pointsAnimate.play();
_root.Chipotle = _root.Chipotle + _local4;
checkLongs(xpos, ypos - 1);
}
if (((myMap[xpos + 1][ypos] == myMap[xpos][ypos]) && (TC[xpos + 1][ypos] != true)) && (TC[xpos][ypos] == true)) {
TC[xpos + 1][ypos] = true;
_root.multi++;
var _local4 = 1 * _root.multi;
_root.tiles[(("t_" + (xpos + 1)) + "_") + ypos].pointsAnimate.points.pointsText.text = _local4;
_root.tiles[(("t_" + (xpos + 1)) + "_") + ypos].pointsAnimate.play();
_root.Chipotle = _root.Chipotle + _local4;
checkLongs(xpos + 1, ypos);
}
if (((myMap[xpos - 1][ypos] == myMap[xpos][ypos]) && (TC[xpos - 1][ypos] != true)) && (TC[xpos][ypos] == true)) {
TC[xpos - 1][ypos] = true;
_root.multi++;
var _local4 = 1 * _root.multi;
_root.tiles[(("t_" + (xpos - 1)) + "_") + ypos].pointsAnimate.points.pointsText.text = _local4;
_root.tiles[(("t_" + (xpos - 1)) + "_") + ypos].pointsAnimate.play();
_root.Chipotle = _root.Chipotle + _local4;
checkLongs(xpos - 1, ypos);
}
}
var gridSize = 9;
var numberOfOptions = 6;
Ilost = false;
win._visible = false;
underwin._visible = false;
lose._visible = false;
fscommand ("allowscale", false);
checkMap = function () {
var _local2 = 0;
_root.multi = 0;
_root.winner = true;
if (gameStyle == "lvlDesigner") {
} else {
runCount = 0;
while (runCount <= 1) {
runCount++;
checkLongs(0, 0);
xsize = 0;
while (xsize <= (gridSize - 1)) {
ysize = 0;
while (ysize <= (gridSize - 1)) {
CN[xsize][ysize] = false;
if (doNotcheck[xsize][ysize] == true) {
myMap[xsize][ysize] = myMap[startx][starty];
TC[xsize][ysize] = true;
_root.tiles[(("t_" + xsize) + "_") + ysize].gotoAndStop(_root.setColor);
} else {
if (myMap[xsize][ysize] == myMap[xsize][ysize - 1]) {
_root.tiles[(("t_" + xsize) + "_") + ysize].leftTopCorner.gotoAndPlay("filling");
_root.tiles[(("t_" + xsize) + "_") + ysize].leftBottomCorner.gotoAndPlay("filling");
_root.tiles[(("t_" + xsize) + "_") + ysize].leftTopDETAIL.gotoAndPlay("filling");
_root.tiles[(("t_" + xsize) + "_") + ysize].leftBottomDETAIL.gotoAndPlay("filling");
}
if (myMap[xsize][ysize] == myMap[xsize][ysize + 1]) {
_root.tiles[(("t_" + xsize) + "_") + ysize].rightTopCorner.gotoAndPlay("filling");
_root.tiles[(("t_" + xsize) + "_") + ysize].rightBottomCorner.gotoAndPlay("filling");
_root.tiles[(("t_" + xsize) + "_") + ysize].rightTopDETAIL.gotoAndPlay("filling");
_root.tiles[(("t_" + xsize) + "_") + ysize].rightBottomDETAIL.gotoAndPlay("filling");
}
if (myMap[xsize][ysize] == myMap[xsize - 1][ysize]) {
_root.tiles[(("t_" + xsize) + "_") + ysize].topLeftCorner.gotoAndPlay("filling");
_root.tiles[(("t_" + xsize) + "_") + ysize].topRightCorner.gotoAndPlay("filling");
_root.tiles[(("t_" + xsize) + "_") + ysize].topLeftDETAIL.gotoAndPlay("filling");
_root.tiles[(("t_" + xsize) + "_") + ysize].topRightDETAIL.gotoAndPlay("filling");
}
if (myMap[xsize][ysize] == myMap[xsize + 1][ysize]) {
_root.tiles[(("t_" + xsize) + "_") + ysize].bottomLeftCorner.gotoAndPlay("filling");
_root.tiles[(("t_" + xsize) + "_") + ysize].bottomRightCorner.gotoAndPlay("filling");
_root.tiles[(("t_" + xsize) + "_") + ysize].bottomLeftDETAIL.gotoAndPlay("filling");
_root.tiles[(("t_" + xsize) + "_") + ysize].bottomRightDETAIL.gotoAndPlay("filling");
}
if ((((((((myMap[xsize][ysize] == myMap[xsize][ysize - 1]) && (myMap[xsize][ysize] == myMap[xsize][ysize + 1])) && (myMap[xsize][ysize] == myMap[xsize - 1][ysize])) && (myMap[xsize][ysize] == myMap[xsize + 1][ysize])) && (myMap[xsize][ysize] == myMap[xsize - 1][ysize - 1])) && (myMap[xsize][ysize] == myMap[xsize + 1][ysize - 1])) && (myMap[xsize][ysize] == myMap[xsize - 1][ysize + 1])) && (myMap[xsize][ysize] == myMap[xsize + 1][ysize + 1])) {
doNotcheck[xsize][ysize] = true;
}
if (TC[xsize][ysize] == true) {
myMap[xsize][ysize] = myMap[startx][starty];
_root.tiles[(("t_" + xsize) + "_") + ysize].gotoAndStop(myMap[startx][starty]);
_root.tiles[(("t_" + xsize) + "_") + ysize].myNum.text = myMap[startx][starty];
}
}
if (((myMap[xsize][ysize] == myMap[xsize][ysize + 1]) && (myMap[xsize][ysize] == myMap[xsize + 1][ysize])) && (myMap[xsize][ysize] == myMap[xsize + 1][ysize + 1])) {
_root.tiles[(("t_" + xsize) + "_") + ysize].rightBottomCorner.gotoAndPlay("ending");
_root.tiles[(("t_" + xsize) + "_") + ysize].bottomRightCorner.gotoAndPlay("ending");
_root.tiles[(("t_" + xsize) + "_") + ysize].rightBottomDETAIL.gotoAndPlay("ending");
_root.tiles[(("t_" + xsize) + "_") + ysize].bottomRightDETAIL.gotoAndPlay("ending");
_root.tiles[(("t_" + xsize) + "_") + ysize].bottomRightDETAIL._alpha = 0;
}
if (((myMap[xsize][ysize] == myMap[xsize][ysize + 1]) && (myMap[xsize][ysize] == myMap[xsize - 1][ysize])) && (myMap[xsize][ysize] == myMap[xsize - 1][ysize + 1])) {
_root.tiles[(("t_" + xsize) + "_") + ysize].rightTopCorner.gotoAndPlay("ending");
_root.tiles[(("t_" + xsize) + "_") + ysize].topRightCorner.gotoAndPlay("ending");
_root.tiles[(("t_" + xsize) + "_") + ysize].rightTopDETAIL.gotoAndPlay("ending");
_root.tiles[(("t_" + xsize) + "_") + ysize].topRightDETAIL.gotoAndPlay("ending");
_root.tiles[(("t_" + xsize) + "_") + ysize].topRightDETAIL._alpha = 0;
}
if (((myMap[xsize][ysize] == myMap[xsize][ysize - 1]) && (myMap[xsize][ysize] == myMap[xsize + 1][ysize])) && (myMap[xsize][ysize] == myMap[xsize + 1][ysize - 1])) {
_root.tiles[(("t_" + xsize) + "_") + ysize].bottomLeftCorner.gotoAndPlay("ending");
_root.tiles[(("t_" + xsize) + "_") + ysize].leftBottomCorner.gotoAndPlay("ending");
_root.tiles[(("t_" + xsize) + "_") + ysize].bottomLeftDETAIL.gotoAndPlay("ending");
_root.tiles[(("t_" + xsize) + "_") + ysize].leftBottomDETAIL.gotoAndPlay("ending");
_root.tiles[(("t_" + xsize) + "_") + ysize].bottomLeftDETAIL._alpha = 0;
_root.tiles[(("t_" + xsize) + "_") + ysize].leftBottomDETAIL._alpha = 0;
}
if (((myMap[xsize][ysize] == myMap[xsize][ysize - 1]) && (myMap[xsize][ysize] == myMap[xsize - 1][ysize])) && (myMap[xsize][ysize] == myMap[xsize - 1][ysize - 1])) {
_root.tiles[(("t_" + xsize) + "_") + ysize].topLeftCorner.gotoAndPlay("ending");
_root.tiles[(("t_" + xsize) + "_") + ysize].leftTopCorner.gotoAndPlay("ending");
_root.tiles[(("t_" + xsize) + "_") + ysize].topLeftDETAIL.gotoAndPlay("ending");
_root.tiles[(("t_" + xsize) + "_") + ysize].leftTopDETAIL.gotoAndPlay("ending");
_root.tiles[(("t_" + xsize) + "_") + ysize].topLeftDETAIL._alpha = 0;
}
if (TC[xsize][ysize] == true) {
checkLongs(xsize, ysize);
myMap[xsize][ysize] = _root.setColor;
_root.tiles[(("t_" + xsize) + "_") + ysize].gotoAndStop(myMap[xsize][ysize]);
}
ysize++;
}
xsize++;
}
xsize = 0;
while (xsize <= (gridSize - 1)) {
ysize = 0;
while (ysize <= (gridSize - 1)) {
if (TC[xsize][ysize] == true) {
} else {
_root.winner = false;
}
ysize++;
}
xsize++;
}
}
}
};
_root.puzzleMenu.onRelease = function () {
gotoAndStop ("puzzle");
};
_root.timedMenu.onRelease = function () {
gotoAndStop ("timed");
};
_root.mazeMenu.onRelease = function () {
gotoAndStop ("maze");
};
_root.randomMenu.onRelease = function () {
gotoAndStop ("random");
};
_root.jacksmack.levelMenu.onRelease = function () {
gotoAndStop ("levelDesigner");
};
_root.jacksmack.customMenu.onRelease = function () {
gotoAndStop ("random");
};
Frame 23
gotoAndStop ("mainMenu");
Frame 64
stop();
gameStyle = "puzzle";
var gridSize = 14;
var numberOfOptions = 7;
var setColor = 0;
var newColor = 0;
startx = 0;
starty = 0;
var clickCount = 0;
var myMap = new Array();
myMap = [[1, 10, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 10, 1, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 1], [1, 10, 1, 10, 1, 1, 1, 1, 1, 1, 1, 1, 10, 1], [1, 10, 1, 10, 1, 10, 10, 10, 10, 10, 10, 1, 10, 1], [1, 10, 1, 10, 1, 10, 1, 1, 1, 1, 10, 1, 10, 1], [1, 10, 1, 10, 1, 10, 1, 10, 10, 1, 10, 1, 10, 1], [1, 10, 1, 10, 3, 10, 1, 10, 10, 1, 10, 1, 10, 1], [1, 10, 1, 10, 1, 10, 1, 1, 10, 1, 10, 1, 10, 1], [1, 10, 1, 10, 1, 10, 10, 10, 10, 1, 10, 1, 10, 1], [1, 10, 1, 10, 1, 1, 1, 1, 1, 1, 10, 1, 10, 1], [1, 10, 1, 10, 10, 10, 10, 10, 10, 10, 10, 1, 10, 1], [1, 10, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 10, 1], [1, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]];
var TC = new Array(gridSize);
var doNotcheck = new Array(gridSize);
var tilesToChange = new Array(gridSize);
var CN = new Array(gridSize);
msize = 0;
while (msize <= (gridSize - 1)) {
tilesToChange[msize] = new Array(gridSize);
CN[msize] = new Array(gridSize);
TC[msize] = new Array(gridSize);
doNotcheck[msize] = new Array(gridSize);
msize++;
}
var runCount = 0;
TC[startx][starty] = true;
trace("myMap1 = " + myMap);
buildMap();
trace("myMap 2= " + myMap);
initialMapChange = false;
onEnterFrame = function () {
if (initialMapChange == false) {
checkMap();
initialMapChange = true;
}
_root.clickCountText.text = "clickCount = " + clickCount;
};
changer.onRelease = function () {
quitToMenu();
};
_root.setColor = myMap[0][0];
green.onRelease = function () {
if (_root.setColor == 1) {
SoundFX.attachSound("notActive");
SoundFX.start();
_root.buttonBlocker.play();
} else {
_root.setColor = 1;
_root.tiles.t_0_0.myNum.text = myMap[startx][starty];
checkMap();
clickCount++;
SoundFX.attachSound("drip1");
SoundFX.start();
_root.buttonBlocker.play();
}
};
yellow.onRelease = function () {
if (_root.setColor == 2) {
SoundFX.attachSound("notActive");
SoundFX.start();
_root.buttonBlocker.play();
} else {
_root.setColor = 2;
_root.tiles.t_0_0.myNum.text = myMap[startx][starty];
checkMap();
clickCount++;
SoundFX.attachSound("drip1");
SoundFX.start();
_root.buttonBlocker.play();
}
};
red.onRelease = function () {
if (_root.setColor == 3) {
SoundFX.attachSound("notActive");
SoundFX.start();
_root.buttonBlocker.play();
} else {
_root.setColor = 3;
_root.tiles.t_0_0.myNum.text = myMap[startx][starty];
checkMap();
clickCount++;
SoundFX.attachSound("drip1");
SoundFX.start();
_root.buttonBlocker.play();
}
};
blue.onRelease = function () {
if (_root.setColor == 4) {
SoundFX.attachSound("notActive");
SoundFX.start();
_root.buttonBlocker.play();
} else {
_root.setColor = 4;
_root.tiles.t_0_0.myNum.text = myMap[startx][starty];
checkMap();
clickCount++;
SoundFX.attachSound("drip1");
SoundFX.start();
_root.buttonBlocker.play();
}
};
purple.onRelease = function () {
if (_root.setColor == 5) {
SoundFX.attachSound("notActive");
SoundFX.start();
_root.buttonBlocker.play();
} else {
_root.setColor = 5;
_root.tiles.t_0_0.myNum.text = myMap[startx][starty];
checkMap();
clickCount++;
SoundFX.attachSound("drip1");
SoundFX.start();
_root.buttonBlocker.play();
}
};
orange.onRelease = function () {
if (_root.setColor == 6) {
SoundFX.attachSound("notActive");
SoundFX.start();
buttonBlocker.play();
} else {
_root.setColor = 6;
_root.tiles.t_0_0.myNum.text = myMap[startx][starty];
checkMap();
clickCount++;
SoundFX.attachSound("drip1");
SoundFX.start();
_root.buttonBlocker.play();
}
};
black.onRelease = function () {
if (_root.setColor == 7) {
SoundFX.attachSound("notActive");
SoundFX.start();
_root.buttonBlocker.play();
} else {
_root.setColor = 7;
_root.tiles.t_0_0.myNum.text = myMap[startx][starty];
checkMap();
clickCount++;
SoundFX.attachSound("drip1");
SoundFX.start();
}
};
Frame 73
gotoAndStop ("puzzle");
Frame 86
gameStyle = "timed";
var gridSize = 12;
var numberOfOptions = 7;
var setColor = 0;
var newColor = 0;
startx = 0;
starty = 0;
var clickCount = 0;
var myMap = Array(gridSize);
var TC = new Array(gridSize);
var doNotcheck = new Array(gridSize);
var tilesToChange = new Array(gridSize);
var CN = new Array(gridSize);
msize = 0;
while (msize <= (gridSize - 1)) {
myMap[msize] = new Array(gridSize);
tilesToChange[msize] = new Array(gridSize);
CN[msize] = new Array(gridSize);
TC[msize] = new Array(gridSize);
doNotcheck[msize] = new Array(gridSize);
msize++;
}
var runCount = 0;
TC[startx][starty] = true;
buildMap(myMap);
initialMapChange = false;
onEnterFrame = function () {
if (initialMapChange == false) {
checkMap();
initialMapChange = true;
}
_root.clickCountText.text = "clickCount = " + clickCount;
};
changer.onRelease = function () {
quitToMenu();
};
green.onRelease = function () {
if (_root.setColor == 1) {
SoundFX.attachSound("notActive");
SoundFX.start();
} else {
_root.setColor = 1;
_root.tiles.t_0_0.myNum.text = myMap[startx][starty];
checkMap();
clickCount++;
SoundFX.attachSound("drip1");
SoundFX.start();
}
};
yellow.onRelease = function () {
if (_root.setColor == 2) {
SoundFX.attachSound("notActive");
SoundFX.start();
} else {
_root.setColor = 2;
_root.tiles.t_0_0.myNum.text = myMap[startx][starty];
checkMap();
clickCount++;
SoundFX.attachSound("drip1");
SoundFX.start();
}
};
red.onRelease = function () {
if (_root.setColor == 3) {
SoundFX.attachSound("notActive");
SoundFX.start();
} else {
_root.setColor = 3;
_root.tiles.t_0_0.myNum.text = myMap[startx][starty];
checkMap();
clickCount++;
SoundFX.attachSound("drip1");
SoundFX.start();
}
};
blue.onRelease = function () {
if (_root.setColor == 4) {
SoundFX.attachSound("notActive");
SoundFX.start();
} else {
_root.setColor = 4;
_root.tiles.t_0_0.myNum.text = myMap[startx][starty];
checkMap();
clickCount++;
SoundFX.attachSound("drip1");
SoundFX.start();
}
};
purple.onRelease = function () {
if (_root.setColor == 5) {
SoundFX.attachSound("notActive");
SoundFX.start();
} else {
_root.setColor = 5;
_root.tiles.t_0_0.myNum.text = myMap[startx][starty];
checkMap();
clickCount++;
SoundFX.attachSound("drip1");
SoundFX.start();
}
};
orange.onRelease = function () {
if (_root.setColor == 6) {
SoundFX.attachSound("notActive");
SoundFX.start();
} else {
_root.setColor = 6;
_root.tiles.t_0_0.myNum.text = myMap[startx][starty];
checkMap();
clickCount++;
SoundFX.attachSound("drip1");
SoundFX.start();
}
};
black.onRelease = function () {
if (_root.setColor == 7) {
SoundFX.attachSound("notActive");
SoundFX.start();
} else {
_root.setColor = 7;
_root.tiles.t_0_0.myNum.text = myMap[startx][starty];
checkMap();
clickCount++;
SoundFX.attachSound("drip1");
SoundFX.start();
}
};
Frame 95
gotoAndStop ("timed");
Frame 120
gameStyle = "maze";
var gridSize = 12;
var numberOfOptions = 7;
var setColor = 0;
var newColor = 0;
startx = 0;
starty = 0;
var clickCount = 0;
var myMap = Array(gridSize);
var TC = new Array(gridSize);
var doNotcheck = new Array(gridSize);
var tilesToChange = new Array(gridSize);
var CN = new Array(gridSize);
msize = 0;
while (msize <= (gridSize - 1)) {
myMap[msize] = new Array(gridSize);
tilesToChange[msize] = new Array(gridSize);
CN[msize] = new Array(gridSize);
TC[msize] = new Array(gridSize);
doNotcheck[msize] = new Array(gridSize);
msize++;
}
var runCount = 0;
TC[startx][starty] = true;
buildMap(myMap);
initialMapChange = false;
onEnterFrame = function () {
if (initialMapChange == false) {
checkMap();
initialMapChange = true;
}
_root.clickCountText.text = "clickCount = " + clickCount;
};
changer.onRelease = function () {
quitToMenu();
};
green.onRelease = function () {
if (_root.setColor == 1) {
SoundFX.attachSound("notActive");
SoundFX.start();
} else {
_root.setColor = 1;
_root.tiles.t_0_0.myNum.text = myMap[startx][starty];
checkMap();
clickCount++;
SoundFX.attachSound("drip1");
SoundFX.start();
}
};
yellow.onRelease = function () {
if (_root.setColor == 2) {
SoundFX.attachSound("notActive");
SoundFX.start();
} else {
_root.setColor = 2;
_root.tiles.t_0_0.myNum.text = myMap[startx][starty];
checkMap();
clickCount++;
SoundFX.attachSound("drip1");
SoundFX.start();
}
};
red.onRelease = function () {
if (_root.setColor == 3) {
SoundFX.attachSound("notActive");
SoundFX.start();
} else {
_root.setColor = 3;
_root.tiles.t_0_0.myNum.text = myMap[startx][starty];
checkMap();
clickCount++;
SoundFX.attachSound("drip1");
SoundFX.start();
}
};
blue.onRelease = function () {
if (_root.setColor == 4) {
SoundFX.attachSound("notActive");
SoundFX.start();
} else {
_root.setColor = 4;
_root.tiles.t_0_0.myNum.text = myMap[startx][starty];
checkMap();
clickCount++;
SoundFX.attachSound("drip1");
SoundFX.start();
}
};
purple.onRelease = function () {
if (_root.setColor == 5) {
SoundFX.attachSound("notActive");
SoundFX.start();
} else {
_root.setColor = 5;
_root.tiles.t_0_0.myNum.text = myMap[startx][starty];
checkMap();
clickCount++;
SoundFX.attachSound("drip1");
SoundFX.start();
}
};
orange.onRelease = function () {
if (_root.setColor == 6) {
SoundFX.attachSound("notActive");
SoundFX.start();
} else {
_root.setColor = 6;
_root.tiles.t_0_0.myNum.text = myMap[startx][starty];
checkMap();
clickCount++;
SoundFX.attachSound("drip1");
SoundFX.start();
}
};
black.onRelease = function () {
if (_root.setColor == 7) {
SoundFX.attachSound("notActive");
SoundFX.start();
} else {
_root.setColor = 7;
_root.tiles.t_0_0.myNum.text = myMap[startx][starty];
checkMap();
clickCount++;
SoundFX.attachSound("drip1");
SoundFX.start();
}
};
Frame 129
gotoAndStop ("maze");
Frame 152
_quality = "MEDIUM";
_root.myBGSound.stop();
this.buttonBlocker.flasher.play();
gameStyle = "random";
_root.levelDisplay.text = _root.gameLevel;
var setColor = 0;
var newColor = 0;
startx = 0;
starty = 0;
win._visible = false;
underwin._visible = false;
lose._visible = false;
var clickCount = 0;
var myMap = Array(gridSize);
var TC = new Array(gridSize);
var doNotcheck = new Array(gridSize);
var tilesToChange = new Array(gridSize);
var CN = new Array(gridSize);
msize = 0;
while (msize <= (gridSize - 1)) {
myMap[msize] = new Array(gridSize);
tilesToChange[msize] = new Array(gridSize);
CN[msize] = new Array(gridSize);
TC[msize] = new Array(gridSize);
doNotcheck[msize] = new Array(gridSize);
msize++;
}
var runCount = 0;
loser._visible = false;
var multiplyed = false;
TC[startx][starty] = true;
buildMap(myMap);
initialMapChange = false;
onEnterFrame = function () {
if (initialMapChange == false) {
checkMap();
initialMapChange = true;
}
_root.clickCountText.text = (" " + clickCount) + "/25";
_root.scoreCount.text = _root.Chipotle;
if (clickCount <= 24) {
if (_root.winner == true) {
if (multiplyed == false) {
_root.inPlay = false;
trace("you multiplyed your score!");
multiplyScore = 26 - clickCount;
_root.Chipotle = _root.Chipotle * multiplyScore;
underwin._visible = true;
underwin.gotoAndPlay(2);
multiplyed = true;
if (gridSize < 14) {
_root.gridSize++;
}
_root.gameLevel++;
}
}
}
if (clickCount == 25) {
if (thisIsDone != true) {
_root.inPlay = false;
if (_root.winner == true) {
trace("you did it!");
win.gotoAndPlay(2);
win._visible = true;
} else {
loser._visible = true;
trace("You Lose!");
}
var thisIsDone = true;
}
}
};
changer.onRelease = function () {
quitToMenu();
};
var SoundFX = new Sound(this);
_root.inPlay = true;
_root.setColor = myMap[0][0];
green.onRelease = function () {
if (_root.setColor == 1) {
SoundFX.attachSound("notActive");
SoundFX.start();
} else {
_root.setColor = 1;
_root.tiles.t_0_0.myNum.text = myMap[startx][starty];
checkMap();
clickCount++;
SoundFX.attachSound("drip1");
SoundFX.start();
buttonBlocker.play();
}
};
yellow.onRelease = function () {
if (_root.setColor == 2) {
SoundFX.attachSound("notActive");
SoundFX.start();
} else {
_root.setColor = 2;
_root.tiles.t_0_0.myNum.text = myMap[startx][starty];
checkMap();
clickCount++;
SoundFX.attachSound("drip1");
SoundFX.start();
buttonBlocker.play();
}
};
red.onRelease = function () {
if (_root.setColor == 3) {
SoundFX.attachSound("notActive");
SoundFX.start();
} else {
_root.setColor = 3;
_root.tiles.t_0_0.myNum.text = myMap[startx][starty];
checkMap();
clickCount++;
SoundFX.attachSound("drip1");
SoundFX.start();
buttonBlocker.play();
}
};
blue.onRelease = function () {
if (_root.setColor == 4) {
SoundFX.attachSound("notActive");
SoundFX.start();
} else {
_root.setColor = 4;
_root.tiles.t_0_0.myNum.text = myMap[startx][starty];
checkMap();
clickCount++;
SoundFX.attachSound("drip1");
SoundFX.start();
buttonBlocker.play();
}
};
purple.onRelease = function () {
if (_root.setColor == 5) {
SoundFX.attachSound("notActive");
SoundFX.start();
} else {
_root.setColor = 5;
_root.tiles.t_0_0.myNum.text = myMap[startx][starty];
checkMap();
clickCount++;
SoundFX.attachSound("drip1");
SoundFX.start();
buttonBlocker.play();
}
};
orange.onRelease = function () {
if (_root.setColor == 6) {
SoundFX.attachSound("notActive");
SoundFX.start();
} else {
_root.setColor = 6;
_root.tiles.t_0_0.myNum.text = myMap[startx][starty];
checkMap();
clickCount++;
SoundFX.attachSound("drip1");
SoundFX.start();
buttonBlocker.play();
}
};
var keyListener = {};
keyListener.onKeyDown = function () {
var _local2 = Key.getCode();
trace("keyCode: " + _local2);
if (_root.inPlay == true) {
switch (_local2) {
case 49 :
trace("you pressed: 1");
if (_root.setColor == 1) {
SoundFX.attachSound("notActive");
SoundFX.start();
} else if (_root.blocked == false) {
_root.setColor = 1;
_root.tiles.t_0_0.myNum.text = myMap[startx][starty];
checkMap();
clickCount++;
SoundFX.attachSound("drip1");
SoundFX.start();
buttonBlocker.play();
}
break;
case 50 :
trace("you pressed: 2");
if (_root.setColor == 2) {
SoundFX.attachSound("notActive");
SoundFX.start();
} else if (_root.blocked == false) {
_root.setColor = 2;
_root.tiles.t_0_0.myNum.text = myMap[startx][starty];
checkMap();
clickCount++;
SoundFX.attachSound("drip1");
SoundFX.start();
buttonBlocker.play();
}
break;
case 51 :
trace("you pressed: 3");
if (_root.setColor == 3) {
SoundFX.attachSound("notActive");
SoundFX.start();
} else if (_root.blocked == false) {
_root.setColor = 3;
_root.tiles.t_0_0.myNum.text = myMap[startx][starty];
checkMap();
clickCount++;
SoundFX.attachSound("drip1");
SoundFX.start();
buttonBlocker.play();
}
break;
case 52 :
trace("you pressed: 4");
if (_root.setColor == 4) {
SoundFX.attachSound("notActive");
SoundFX.start();
} else if (_root.blocked == false) {
_root.setColor = 4;
_root.tiles.t_0_0.myNum.text = myMap[startx][starty];
checkMap();
clickCount++;
SoundFX.attachSound("drip1");
SoundFX.start();
buttonBlocker.play();
}
break;
case 53 :
trace("you pressed: 5");
if (_root.setColor == 5) {
SoundFX.attachSound("notActive");
SoundFX.start();
} else if (_root.blocked == false) {
_root.setColor = 5;
_root.tiles.t_0_0.myNum.text = myMap[startx][starty];
checkMap();
clickCount++;
SoundFX.attachSound("drip1");
SoundFX.start();
buttonBlocker.play();
}
break;
case 54 :
trace("you pressed: 6");
if (_root.setColor == 6) {
SoundFX.attachSound("notActive");
SoundFX.start();
} else if (_root.blocked == false) {
_root.setColor = 6;
_root.tiles.t_0_0.myNum.text = myMap[startx][starty];
checkMap();
clickCount++;
SoundFX.attachSound("drip1");
SoundFX.start();
buttonBlocker.play();
}
break;
case 97 :
trace("you pressed: 1");
if (_root.setColor == 1) {
SoundFX.attachSound("notActive");
SoundFX.start();
} else if (_root.blocked == false) {
_root.setColor = 1;
_root.tiles.t_0_0.myNum.text = myMap[startx][starty];
checkMap();
clickCount++;
SoundFX.attachSound("drip1");
SoundFX.start();
buttonBlocker.play();
}
break;
case 98 :
trace("you pressed: 2");
if (_root.setColor == 2) {
SoundFX.attachSound("notActive");
SoundFX.start();
} else if (_root.blocked == false) {
_root.setColor = 2;
_root.tiles.t_0_0.myNum.text = myMap[startx][starty];
checkMap();
clickCount++;
SoundFX.attachSound("drip1");
SoundFX.start();
buttonBlocker.play();
}
break;
case 99 :
trace("you pressed: 3");
if (_root.setColor == 3) {
SoundFX.attachSound("notActive");
SoundFX.start();
} else if (_root.blocked == false) {
_root.setColor = 3;
_root.tiles.t_0_0.myNum.text = myMap[startx][starty];
checkMap();
clickCount++;
SoundFX.attachSound("drip1");
SoundFX.start();
buttonBlocker.play();
}
break;
case 100 :
trace("you pressed: 4");
if (_root.setColor == 4) {
SoundFX.attachSound("notActive");
SoundFX.start();
} else if (_root.blocked == false) {
_root.setColor = 4;
_root.tiles.t_0_0.myNum.text = myMap[startx][starty];
checkMap();
clickCount++;
SoundFX.attachSound("drip1");
SoundFX.start();
buttonBlocker.play();
}
break;
case 101 :
trace("you pressed: 5");
if (_root.setColor == 5) {
SoundFX.attachSound("notActive");
SoundFX.start();
} else if (_root.blocked == false) {
_root.setColor = 5;
_root.tiles.t_0_0.myNum.text = myMap[startx][starty];
checkMap();
clickCount++;
SoundFX.attachSound("drip1");
SoundFX.start();
buttonBlocker.play();
}
break;
case 102 :
if (_root.setColor == 6) {
SoundFX.attachSound("notActive");
SoundFX.start();
} else {
if (_root.blocked != false) {
break;
}
_root.setColor = 6;
_root.tiles.t_0_0.myNum.text = myMap[startx][starty];
checkMap();
clickCount++;
SoundFX.attachSound("drip1");
SoundFX.start();
buttonBlocker.play();
}
}
}
};
Key.addListener(keyListener);
Frame 153
quitToMenu();
Frame 160
removeMovieClip(_root.tiles);
Frame 161
quitToMenu();
Frame 162
if (Ilost == true) {
gotoAndPlay ("logos");
} else {
gotoAndStop ("random");
}
Frame 185
gameStyle = "lvlDesigner";
lvlDesignerStart = true;
var gridSize = 14;
var numberOfOptions = 7;
var setColor = 0;
var newColor = 0;
startx = 0;
starty = 0;
lvlDesigner = true;
var clickCount = 0;
var myMap = Array(gridSize);
var TC = new Array(gridSize);
var doNotcheck = new Array(gridSize);
var tilesToChange = new Array(gridSize);
var CN = new Array(gridSize);
msize = 0;
while (msize <= (gridSize - 1)) {
myMap[msize] = new Array(gridSize);
tilesToChange[msize] = new Array(gridSize);
CN[msize] = new Array(gridSize);
TC[msize] = new Array(gridSize);
doNotcheck[msize] = new Array(gridSize);
msize++;
}
stop();
var runCount = 0;
buildMap();
var newMapArray_str = new Array();
changer.onRelease = function () {
lvlDesigner = false;
trace("myMap LVL = " + myMap);
quitToMenu();
};
gridSizeUp.onRelease = function () {
if (gridSize < 14) {
gridSize++;
gridSizeDisplay.text = gridSize;
buildMap(myMap);
}
};
gridSizeDown.onRelease = function () {
if (gridSize > 5) {
gridSize--;
gridSizeDisplay.text = gridSize;
buildMap(myMap);
}
};
switchx = -1;
switchy = -1;
switchx1 = -1;
switchy1 = -1;
switchx2 = -1;
switchy2 = -1;
switchx3 = -1;
switchy3 = -1;
switchxDisplay.text = "--";
switchyDisplay.text = "--";
switchAct1.gotoAndStop("active");
switchAct2.gotoAndStop("inactive");
switchAct3.gotoAndStop("inactive");
switch1On = 1;
switchAct1.onRelease = function () {
switchAct1.gotoAndStop("active");
switchAct2.gotoAndStop("inactive");
switchAct3.gotoAndStop("inactive");
switchOn = 1;
switchx = switchx1;
switchy = switchy1;
if ((switchx > (gridSize - 1)) || (switchx < 0)) {
switchxDisplay.text = "--";
} else {
switchxDisplay.text = switchx + 1;
}
if ((switchy > (gridSize - 1)) || (switchy < 0)) {
switchyDisplay.text = "--";
} else {
switchyDisplay.text = switchy + 1;
}
myMap[switchx1][switchy1] = 9;
myMap[switchx2][switchy2] = 9;
myMap[switchx3][switchy3] = 9;
};
switchAct2.onRelease = function () {
switchAct2.gotoAndStop("active");
switchAct1.gotoAndStop("inactive");
switchAct3.gotoAndStop("inactive");
switchOn = 2;
switchx = switchx2;
switchy = switchy2;
if ((switchx > (gridSize - 1)) || (switchx < 0)) {
switchxDisplay.text = "--";
} else {
switchxDisplay.text = switchx + 1;
}
if ((switchy > (gridSize - 1)) || (switchy < 0)) {
switchyDisplay.text = "--";
} else {
switchyDisplay.text = switchy + 1;
}
myMap[switchx1][switchy1] = 9;
myMap[switchx2][switchy2] = 9;
myMap[switchx3][switchy3] = 9;
};
switchAct3.onRelease = function () {
switchAct3.gotoAndStop("active");
switchAct1.gotoAndStop("inactive");
switchAct2.gotoAndStop("inactive");
switchOn = 3;
switchx = switchx3;
switchy = switchy3;
if ((switchx > (gridSize - 1)) || (switchx < 0)) {
switchxDisplay.text = "--";
} else {
switchxDisplay.text = switchx + 1;
}
if ((switchy > (gridSize - 1)) || (switchy < 0)) {
switchyDisplay.text = "--";
} else {
switchyDisplay.text = switchy + 1;
}
myMap[switchx1][switchy1] = 9;
myMap[switchx2][switchy2] = 9;
myMap[switchx3][switchy3] = 9;
};
switchxUp.onRelease = function () {
if (switching == false) {
oldMyMap = myMap;
switching = true;
}
if (switchx <= (gridSize - 1)) {
switchx++;
if (switchx > (gridSize - 1)) {
switchxDisplay.text = "--";
} else {
switchxDisplay.text = switchx + 1;
}
myMap[switchx][switchy] = 9;
}
myMap[switchx - 1][switchy] = 10;
_root.tiles[(("t_" + switchx) + "_") + switchy].gotoAndStop(myMap[switchx][switchy]);
_root.tiles[(("t_" + (switchx - 1)) + "_") + switchy].gotoAndStop(myMap[switchx - 1][switchy]);
_root["switchx" + switchOn] = switchx;
};
switchxDown.onRelease = function () {
if (switching == false) {
oldMyMap = myMap;
switching = true;
}
if (switchx >= -1) {
switchx--;
if (switchx < 0) {
switchxDisplay.text = "--";
} else {
switchxDisplay.text = switchx + 1;
}
myMap[switchx][switchy] = 9;
}
myMap[switchx + 1][switchy] = 10;
_root.tiles[(("t_" + switchx) + "_") + switchy].gotoAndStop(myMap[switchx][switchy]);
_root.tiles[(("t_" + (switchx + 1)) + "_") + switchy].gotoAndStop(myMap[switchx + 1][switchy]);
_root["switchx" + switchOn] = switchx;
};
switchyUp.onRelease = function () {
oldMyMap = myMap;
if (switchy <= (gridSize - 1)) {
switchy++;
if (switchy > (gridSize - 1)) {
switchyDisplay.text = "--";
} else {
switchyDisplay.text = switchy + 1;
}
myMap[switchx][switchy] = 9;
}
myMap[switchx][switchy - 1] = 10;
_root.tiles[(("t_" + switchx) + "_") + switchy].gotoAndStop(myMap[switchx][switchy]);
_root.tiles[(("t_" + switchx) + "_") + (switchy - 1)].gotoAndStop(myMap[switchx][switchy - 1]);
_root["switchy" + switchOn] = switchy;
};
switchyDown.onRelease = function () {
oldMyMap = myMap;
if (switchy >= -1) {
switchy--;
if (switchy < 0) {
switchyDisplay.text = "--";
} else {
switchyDisplay.text = switchy + 1;
}
myMap[switchx][switchy] = 9;
}
myMap[switchx][switchy + 1] = 10;
_root.tiles[(("t_" + switchx) + "_") + switchy].gotoAndStop(myMap[switchx][switchy]);
_root.tiles[(("t_" + switchx) + "_") + (switchy + 1)].gotoAndStop(myMap[switchx][switchy + 1]);
_root["switchy" + switchOn] = switchy;
};
Tracer.onRelease = function () {
i = 0;
while (i <= (gridSize - 1)) {
j = 0;
while (j <= (gridSize - 1)) {
if ((i == 0) && (j == 0)) {
newMapArray_str.push("[\n[" + myMap[0][0]);
} else if ((j != 0) && (j != (gridSize - 1))) {
newMapArray_str.push(myMap[i][j]);
} else if ((j == (gridSize - 1)) && (i != (gridSize - 1))) {
newMapArray_str.push(myMap[i][j] + "]");
} else if (j == 0) {
newMapArray_str.push("\n[" + myMap[i][j]);
} else if ((i == (gridSize - 1)) && (j == (gridSize - 1))) {
newMapArray_str.push(myMap[i][j] + "]\n]");
}
j++;
}
i++;
}
newMapArray = myMap;
trace(newMapArray_str);
};
levelDesignerBox.onEnterFrame = function () {
if (lvlDesigner == true) {
onMouseDown = function () {
xsize = 0;
while (xsize <= (gridSize - 1)) {
ysize = 0;
while (ysize <= (gridSize - 1)) {
if (_root.tiles[(("t_" + xsize) + "_") + ysize].hitTest(_root._xmouse, _root._ymouse)) {
myMap[xsize][ysize] = _root.setColor;
_root.tiles[(("t_" + xsize) + "_") + ysize].gotoAndStop(myMap[xsize][ysize]);
}
ysize++;
}
xsize++;
}
};
}
};
greenlvl.onRelease = function () {
_root.setColor = 1;
};
yellowlvl.onRelease = function () {
_root.setColor = 2;
};
redlvl.onRelease = function () {
_root.setColor = 3;
};
bluelvl.onRelease = function () {
_root.setColor = 4;
};
purplelvl.onRelease = function () {
_root.setColor = 5;
};
orangelvl.onRelease = function () {
_root.setColor = 6;
};
blacklvl.onRelease = function () {
_root.setColor = 7;
};
metallvl.onRelease = function () {
_root.setColor = 8;
};
switchlvl.onRelease = function () {
_root.setColor = 9;
};
timerlvl.onRelease = function () {
_root.setColor = 11;
};
var keyListener = {};
keyListener.onKeyDown = function () {
var _local2 = Key.getCode();
trace("keyCode: " + _local2);
switch (_local2) {
case 49 :
trace("you pressed: 1");
_root.setColor = 1;
break;
case 50 :
trace("you pressed: 2");
_root.setColor = 2;
break;
case 51 :
trace("you pressed: 3");
_root.setColor = 3;
break;
case 52 :
trace("you pressed: 4");
_root.setColor = 4;
break;
case 53 :
trace("you pressed: 5");
_root.setColor = 5;
break;
case 54 :
trace("you pressed: 6");
_root.setColor = 6;
break;
case 55 :
trace("you pressed: 7");
_root.setColor = 7;
break;
case 56 :
trace("you pressed: 8");
_root.setColor = 8;
break;
case 57 :
trace("you pressed: 9");
_root.setColor = 9;
break;
case 48 :
trace("you pressed: 0");
_root.setColor = 11;
break;
case 97 :
trace("you pressed: 1");
_root.setColor = 1;
break;
case 98 :
trace("you pressed: 2");
_root.setColor = 2;
break;
case 99 :
trace("you pressed: 3");
_root.setColor = 3;
break;
case 100 :
trace("you pressed: 4");
_root.setColor = 4;
break;
case 101 :
trace("you pressed: 5");
_root.setColor = 5;
break;
case 102 :
trace("you pressed: 6");
_root.setColor = 6;
break;
case 103 :
trace("you pressed: 7");
_root.setColor = 7;
break;
case 104 :
trace("you pressed: 8");
_root.setColor = 8;
break;
case 105 :
trace("you pressed: 9");
_root.setColor = 9;
break;
case 96 :
trace("you pressed: 0");
_root.setColor = 11;
}
};
Key.addListener(keyListener);
Frame 197
gotoAndStop ("puzzle");
Symbol 2 MovieClip [glob] Frame 1
stop();
Symbol 27 MovieClip Frame 1
if (initial != true) {
trace("initialize" + this);
filltoComplete = false;
initial = true;
}
stop();
if (played == true) {
Complete._visible = true;
} else {
Complete._visible = false;
}
if (completeFill == true) {
completed._visible = true;
} else {
completed._visible = false;
}
Symbol 27 MovieClip Frame 2
if (played == true) {
Complete._visible = true;
} else {
Complete._visible = false;
}
if (completeFill == true) {
completed._visible = true;
} else {
completed._visible = false;
}
Symbol 27 MovieClip Frame 5
section1Complete._visible = true;
played = true;
stop();
section1Switch = true;
section2Switch = true;
Symbol 27 MovieClip Frame 9
stop();
completeFill = true;
Symbol 39 MovieClip Frame 1
stop();
if (initial != true) {
trace("initialize" + this);
Complete._visible = false;
filltoComplete = false;
initial = true;
}
if (played == true) {
Complete._visible = true;
} else {
Complete._visible = false;
}
if (completeFill == true) {
Complete2._visible = true;
} else {
Complete2._visible = false;
}
Symbol 39 MovieClip Frame 5
Complete._visible = true;
played = true;
stop();
section1Switch = true;
section2Switch = true;
Symbol 39 MovieClip Frame 9
stop();
Complete2._visible = true;
Symbol 56 MovieClip Frame 1
stop();
if (initial != true) {
trace("initialize" + this);
filltoComplete = false;
initial = true;
}
if (played == true) {
section1Complete._visible = true;
} else {
section1Complete._visible = false;
}
if (completeFill == true) {
completed._visible = true;
} else {
completed._visible = false;
}
Symbol 56 MovieClip Frame 2
if (completeFill == true) {
gotoAndStop ("ended");
}
if (played == true) {
gotoAndStop ("filled");
}
Symbol 56 MovieClip Frame 5
section1Complete._visible = true;
played = true;
stop();
section1Switch = true;
section2Switch = true;
Symbol 56 MovieClip Frame 6
if (completeFill == true) {
gotoAndStop ("ended");
}
Symbol 56 MovieClip Frame 9
stop();
completeFill = true;
Symbol 68 MovieClip Frame 1
stop();
if (initial != true) {
trace("initialize" + this);
filltoComplete = false;
initial = true;
}
if (played == true) {
gotoAndStop ("filled");
} else {
section1Complete._visible = false;
}
if (completeFill == true) {
gotoAndStop ("ended");
}
Symbol 68 MovieClip Frame 2
if (completeFill == true) {
gotoAndStop ("ended");
}
if (played == true) {
gotoAndStop ("filled");
}
Symbol 68 MovieClip Frame 5
section1Complete._visible = true;
played = true;
stop();
section1Switch = true;
section2Switch = true;
Symbol 68 MovieClip Frame 6
if (completeFill == true) {
gotoAndStop ("ended");
}
Symbol 68 MovieClip Frame 9
stop();
completeFill = true;
Symbol 74 MovieClip Frame 1
stop();
Symbol 86 MovieClip [GlobDynamic1] Frame 1
stop();
Symbol 86 MovieClip [GlobDynamic1] Frame 2
stop();
Symbol 86 MovieClip [GlobDynamic1] Frame 3
stop();
Symbol 86 MovieClip [GlobDynamic1] Frame 4
stop();
Symbol 86 MovieClip [GlobDynamic1] Frame 5
stop();
Symbol 86 MovieClip [GlobDynamic1] Frame 6
stop();
Symbol 86 MovieClip [GlobDynamic1] Frame 7
stop();
Symbol 86 MovieClip [GlobDynamic1] Frame 8
stop();
Symbol 86 MovieClip [GlobDynamic1] Frame 11
stop();
Symbol 86 MovieClip [GlobDynamic1] Frame 13
stop();
Symbol 86 MovieClip [GlobDynamic1] Frame 14
stop();
Symbol 107 Button
on (release) {
getURL ("http://www.jacksmack.com", "_blank");
}
Symbol 111 Button
on (release) {
getURL ("http://www.jacksmack.com", "_blank");
}
Symbol 166 MovieClip Frame 1
stop();
section1Complete._visible = false;
section2Complete._visible = false;
filled._visible = false;
stop();
Symbol 166 MovieClip Frame 12
section1Complete._visible = true;
stop();
Symbol 166 MovieClip Frame 32
section2Complete._visible = true;
stop();
Symbol 166 MovieClip Frame 56
section2Complete._visible = true;
stop();
section2Complete._visible = true;
Symbol 166 MovieClip Frame 77
section1Complete._visible = true;
stop();
section1Complete._visible = true;
Symbol 166 MovieClip Frame 96
section1Complete._visible = true;
section2Complete._visible = true;
stop();
section1Switch = true;
section2Switch = true;
Symbol 166 MovieClip Frame 107
stop();
Symbol 166 MovieClip Frame 110
Symbol 166 MovieClip Frame 141
section1Complete._visible = true;
section2Complete._visible = true;
stop();
filled._visible = true;
Symbol 173 MovieClip Frame 1
stop();
section1Complete._visible = false;
section2Complete._visible = false;
filled._visible = false;
Symbol 173 MovieClip Frame 12
section1Complete._visible = true;
stop();
Symbol 173 MovieClip Frame 32
section2Complete._visible = true;
stop();
Symbol 173 MovieClip Frame 56
section2Complete._visible = true;
stop();
Symbol 173 MovieClip Frame 77
section1Complete._visible = true;
stop();
Symbol 173 MovieClip Frame 96
section1Complete._visible = true;
section2Complete._visible = true;
stop();
Symbol 173 MovieClip Frame 107
stop();
Symbol 173 MovieClip Frame 135
stop();
section1Complete._visible = true;
section2Complete._visible = true;
stop();
filled._visible = true;
Symbol 265 MovieClip Frame 1
section1Played = false;
section2Played = false;
section1Fill2Played = false;
filled = false;
section1and2Played = false;
stop();
section1Complete._visible = false;
section2Complete._visible = false;
filled._visible = false;
stop();
Symbol 265 MovieClip Frame 2
if (section1Played == true) {
gotoAndStop ("section1end");
}
if (section2Played == true) {
gotoAndPlay ("section2Fill1");
}
section1Played = true;
Symbol 265 MovieClip Frame 12
stop();
section1Complete._visible = true;
Symbol 265 MovieClip Frame 20
if (section1Fill2Played == true) {
gotoAndStop ("section1Fill2End");
}
section1Fill2Played = true;
Symbol 265 MovieClip Frame 32
stop();
section2Complete._visible = true;
Symbol 265 MovieClip Frame 52
if (section1Played == true) {
gotoAndPlay ("section1Fill2");
}
if (section2Played == true) {
gotoAndStop ("section2end");
}
section2Played = true;
Symbol 265 MovieClip Frame 61
stop();
section2Complete._visible = true;
section2Complete._visible = true;
Symbol 265 MovieClip Frame 80
if (section2fill1Played == true) {
gotoAndPlay ("section2Fill1end");
}
section2fill1Played = true;
Symbol 265 MovieClip Frame 89
stop();
section1Complete._visible = true;
Symbol 265 MovieClip Frame 93
section1Complete._visible = true;
Symbol 265 MovieClip Frame 108
if (section1and2Played == true) {
gotoAndStop ("section1and2end");
}
section1and2Played = true;
Symbol 265 MovieClip Frame 117
stop();
section1Switch = true;
section2Switch = true;
section1Complete._visible = true;
section2Complete._visible = true;
Symbol 265 MovieClip Frame 131
Symbol 265 MovieClip Frame 134
stop();
Symbol 265 MovieClip Frame 136
if (filled == true) {
gotoAndStop ("filledEND");
}
filled = true;
Symbol 265 MovieClip Frame 162
section1Complete._visible = true;
section2Complete._visible = true;
Symbol 265 MovieClip Frame 164
stop();
Symbol 348 MovieClip Frame 1
section1Played = false;
section2Played = false;
section1Fill2Played = false;
filledComplete = false;
section1and2Played = false;
stop();
Symbol 348 MovieClip Frame 2
if (section1Played == true) {
gotoAndStop ("section1end");
}
if (section2Played == true) {
gotoAndPlay ("section2Fill1");
}
section1Played = true;
Symbol 348 MovieClip Frame 12
stop();
Symbol 348 MovieClip Frame 20
if (section1Fill2Played == true) {
gotoAndStop ("section1Fill2End");
}
section1Fill2Played = true;
Symbol 348 MovieClip Frame 32
stop();
Symbol 348 MovieClip Frame 52
if (section1Played == true) {
gotoAndPlay ("section1Fill2");
}
if (section2Played == true) {
gotoAndStop ("section2end");
}
section2Played = true;
Symbol 348 MovieClip Frame 61
stop();
section2Complete._visible = true;
Symbol 348 MovieClip Frame 80
if (section2fill1Played == true) {
gotoAndPlay ("section2Fill1end");
}
section2fill1Played = true;
Symbol 348 MovieClip Frame 89
stop();
section1Complete._visible = true;
Symbol 348 MovieClip Frame 108
if (section1and2Played == true) {
gotoAndStop ("section1and2end");
}
section1and2Played = true;
Symbol 348 MovieClip Frame 117
stop();
section1Switch = true;
section2Switch = true;
Symbol 348 MovieClip Frame 144
trace("fillComplete");
Symbol 348 MovieClip Frame 164
stop();
Symbol 349 MovieClip Frame 1
stop();
Symbol 349 MovieClip Frame 2
stop();
Symbol 349 MovieClip Frame 3
stop();
Symbol 349 MovieClip Frame 4
stop();
Symbol 349 MovieClip Frame 5
stop();
Symbol 349 MovieClip Frame 6
stop();
Symbol 349 MovieClip Frame 7
stop();
Symbol 349 MovieClip Frame 8
stop();
Symbol 349 MovieClip Frame 11
stop();
Symbol 349 MovieClip Frame 13
stop();
Symbol 349 MovieClip Frame 14
stop();
Symbol 350 MovieClip Frame 1
pGlob1.gotoAndStop(4);
pGlob2.gotoAndStop(5);
pGlob3.gotoAndStop(1);
pGlob4.gotoAndStop(3);
pGlob5.gotoAndStop(4);
pGlob6.gotoAndStop(2);
pGlob7.gotoAndStop(3);
pGlob8.gotoAndStop(6);
pGlob9.gotoAndStop(2);
pGlob10.gotoAndStop(1);
stop();
count1 = 0;
count2 = 0;
count3 = 0;
count4 = 0;
count5 = 0;
count6 = 0;
count7 = 0;
count8 = 0;
count9 = 0;
count10 = 0;
preGlob1 = function () {
while (count1 < 1) {
pGlob1.gotoAndStop(5);
pGlob1.topRightCorner.gotoAndPlay("section2");
pGlob1.bottomRightCorner.gotoAndPlay("section2");
pGlob1.topRightDETAIL.gotoAndPlay("section2");
pGlob1.bottomRightDETAIL.gotoAndPlay("section2");
pGlob2.topLeftCorner.gotoAndPlay("section2");
pGlob2.bottomLeftCorner.gotoAndPlay("section2");
pGlob2.topLeftDETAIL.gotoAndPlay("section2");
pGlob2.bottomLeftDETAIL.gotoAndPlay("section2");
count1 = 1;
}
};
preGlob2 = function () {
while (count2 < 1) {
i = 0;
while (i <= 2) {
this["pGlob" + i].gotoAndStop(1);
i++;
}
pGlob2.topRightCorner.gotoAndPlay("section2");
pGlob2.bottomRightCorner.gotoAndPlay("section2");
pGlob2.topRightDETAIL.gotoAndPlay("section2");
pGlob2.bottomRightDETAIL.gotoAndPlay("section2");
pGlob3.topLeftCorner.gotoAndPlay("section2");
pGlob3.bottomLeftCorner.gotoAndPlay("section2");
pGlob3.topLeftDETAIL.gotoAndPlay("section2");
pGlob3.bottomLeftDETAIL.gotoAndPlay("section2");
count2++;
}
};
preGlob3 = function () {
while (count3 < 1) {
i = 0;
while (i <= 3) {
this["pGlob" + i].gotoAndStop(3);
i++;
}
pGlob3.topRightCorner.gotoAndPlay("section2");
pGlob3.bottomRightCorner.gotoAndPlay("section2");
pGlob3.topRightDETAIL.gotoAndPlay("section2");
pGlob3.bottomRightDETAIL.gotoAndPlay("section2");
pGlob4.topLeftCorner.gotoAndPlay("section2");
pGlob4.bottomLeftCorner.gotoAndPlay("section2");
pGlob4.topLeftDETAIL.gotoAndPlay("section2");
pGlob4.bottomLeftDETAIL.gotoAndPlay("section2");
count3++;
}
};
preGlob4 = function () {
while (count4 < 1) {
i = 0;
while (i <= 4) {
this["pGlob" + i].gotoAndStop(4);
i++;
}
pGlob4.topRightCorner.gotoAndPlay("section2");
pGlob4.bottomRightCorner.gotoAndPlay("section2");
pGlob4.topRightDETAIL.gotoAndPlay("section2");
pGlob4.bottomRightDETAIL.gotoAndPlay("section2");
pGlob5.topLeftCorner.gotoAndPlay("section2");
pGlob5.bottomLeftCorner.gotoAndPlay("section2");
pGlob5.topLeftDETAIL.gotoAndPlay("section2");
pGlob5.bottomLeftDETAIL.gotoAndPlay("section2");
count4++;
}
};
preGlob5 = function () {
while (count5 < 1) {
i = 0;
while (i <= 5) {
this["pGlob" + i].gotoAndStop(2);
i++;
}
pGlob5.topRightCorner.gotoAndPlay("section2");
pGlob5.bottomRightCorner.gotoAndPlay("section2");
pGlob5.topRightDETAIL.gotoAndPlay("section2");
pGlob5.bottomRightDETAIL.gotoAndPlay("section2");
pGlob6.topLeftCorner.gotoAndPlay("section2");
pGlob6.bottomLeftCorner.gotoAndPlay("section2");
pGlob6.topLeftDETAIL.gotoAndPlay("section2");
pGlob6.bottomLeftDETAIL.gotoAndPlay("section2");
count5++;
}
};
preGlob6 = function () {
while (count6 < 1) {
i = 0;
while (i <= 6) {
this["pGlob" + i].gotoAndStop(3);
i++;
}
pGlob6.topRightCorner.gotoAndPlay("section2");
pGlob6.bottomRightCorner.gotoAndPlay("section2");
pGlob6.topRightDETAIL.gotoAndPlay("section2");
pGlob6.bottomRightDETAIL.gotoAndPlay("section2");
pGlob7.topLeftCorner.gotoAndPlay("section2");
pGlob7.bottomLeftCorner.gotoAndPlay("section2");
pGlob7.topLeftDETAIL.gotoAndPlay("section2");
pGlob7.bottomLeftDETAIL.gotoAndPlay("section2");
count6++;
}
};
preGlob7 = function () {
while (count7 < 1) {
i = 0;
while (i <= 7) {
this["pGlob" + i].gotoAndStop(6);
i++;
}
pGlob7.topRightCorner.gotoAndPlay("section2");
pGlob7.bottomRightCorner.gotoAndPlay("section2");
pGlob7.topRightDETAIL.gotoAndPlay("section2");
pGlob7.bottomRightDETAIL.gotoAndPlay("section2");
pGlob8.topLeftCorner.gotoAndPlay("section2");
pGlob8.bottomLeftCorner.gotoAndPlay("section2");
pGlob8.topLeftDETAIL.gotoAndPlay("section2");
pGlob8.bottomLeftDETAIL.gotoAndPlay("section2");
count7++;
}
};
preGlob8 = function () {
while (count8 < 1) {
i = 0;
while (i <= 8) {
this["pGlob" + i].gotoAndStop(2);
i++;
}
pGlob8.topRightCorner.gotoAndPlay("section2");
pGlob8.bottomRightCorner.gotoAndPlay("section2");
pGlob8.topRightDETAIL.gotoAndPlay("section2");
pGlob8.bottomRightDETAIL.gotoAndPlay("section2");
pGlob9.topLeftCorner.gotoAndPlay("section2");
pGlob9.bottomLeftCorner.gotoAndPlay("section2");
pGlob9.topLeftDETAIL.gotoAndPlay("section2");
pGlob9.bottomLeftDETAIL.gotoAndPlay("section2");
count8++;
}
};
preGlob9 = function () {
while (count9 < 1) {
i = 0;
while (i <= 9) {
this["pGlob" + i].gotoAndStop(1);
i++;
}
pGlob9.topRightCorner.gotoAndPlay("section2");
pGlob9.bottomRightCorner.gotoAndPlay("section2");
pGlob9.topRightDETAIL.gotoAndPlay("section2");
pGlob9.bottomRightDETAIL.gotoAndPlay("section2");
pGlob10.topLeftCorner.gotoAndPlay("section2");
pGlob10.bottomLeftCorner.gotoAndPlay("section2");
pGlob10.topLeftDETAIL.gotoAndPlay("section2");
pGlob10.bottomLeftDETAIL.gotoAndPlay("section2");
count9++;
}
};
colorswap = 5;
onEnterFrame = function () {
if (_parent.PercentLoaded < 10) {
} else if ((_parent.PercentLoaded > 10) && (_parent.PercentLoaded < 20)) {
preGlob1();
} else if ((_parent.PercentLoaded > 20) && (_parent.PercentLoaded < 30)) {
preGlob1();
preGlob2();
} else if ((_parent.PercentLoaded > 30) && (_parent.PercentLoaded < 40)) {
preGlob1();
preGlob2();
preGlob3();
} else if ((_parent.PercentLoaded > 40) && (_parent.PercentLoaded < 50)) {
preGlob1();
preGlob2();
preGlob3();
preGlob4();
} else if ((_parent.PercentLoaded > 50) && (_parent.PercentLoaded < 60)) {
preGlob1();
preGlob2();
preGlob3();
preGlob4();
preGlob5();
} else if ((_parent.PercentLoaded > 60) && (_parent.PercentLoaded < 70)) {
preGlob1();
preGlob2();
preGlob3();
preGlob4();
preGlob5();
preGlob6();
} else if ((_parent.PercentLoaded > 70) && (_parent.PercentLoaded < 80)) {
preGlob1();
preGlob2();
preGlob3();
preGlob4();
preGlob5();
preGlob6();
preGlob7();
} else if ((_parent.PercentLoaded > 80) && (_parent.PercentLoaded < 90)) {
preGlob1();
preGlob2();
preGlob3();
preGlob4();
preGlob5();
preGlob6();
preGlob7();
preGlob8();
} else if ((_parent.PercentLoaded > 90) && (_parent.PercentLoaded < 100)) {
preGlob1();
preGlob2();
preGlob3();
preGlob4();
preGlob5();
preGlob6();
preGlob7();
preGlob8();
preGlob9();
}
};
Symbol 374 MovieClip Frame 1
function startAd(ngad_url) {
trace("opening " + ngad_url);
System.security.allowDomain("70.87.128.99");
System.security.allowInsecureDomain("70.87.128.99");
System.security.allowDomain("ads.shizmoo.com");
System.security.allowInsecureDomain("ads.shizmoo.com");
System.security.allowDomain("www.cpmstar.com");
System.security.allowInsecureDomain("www.cpmstar.com");
System.security.allowDomain("server.cpmstar.com");
System.security.allowInsecureDomain("server.cpmstar.com");
var ngads_redirect = new XML();
ngads_redirect.ignoreWhite = true;
ngads_redirect.onLoad = function (success) {
trace("[NEWGROUNDS FLASH ADS] :: You may get a 'Security Sandbox Violation' ... this is normal, do not freak out!");
if (success) {
ng_ad.loadMovie(ngads_redirect.toString(), "GET");
}
};
ngads_redirect.load(ngad_url);
}
if (NewgroundsAPI.getAdURL()) {
startAd(NewgroundsAPI.getAdURL());
}
NewgroundsAPI.onAdsApproved = function (ad_url) {
startAd(ad_url);
};
stop();
Symbol 387 Button
on (release) {
NewgroundsAPI.loadMySite();
}
Symbol 407 Button
on (release) {
_root.gotoAndPlay("logos");
}
Symbol 408 MovieClip Frame 1
_root.stop();
Symbol 408 MovieClip Frame 10
_root.stop();
PercentLoaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
if (PercentLoaded != 100) {
bar._xscale = PercentLoaded;
eval ("pGlob" + Math.round(PercentLoaded / 10)).gotoAndStop(4);
} else {
gotoAndPlay ("loaded");
}
Symbol 408 MovieClip Frame 11
gotoAndPlay (10);
Symbol 408 MovieClip Frame 47
stop();
Symbol 418 MovieClip Frame 1
stop();
Symbol 422 MovieClip Frame 1
_root.blocked = false;
stop();
Symbol 422 MovieClip Frame 2
_root.blocked = true;
blocker.useHandCursor = false;
trace("blocked");
Symbol 647 MovieClip [__Packages.NewgroundsAPI] Frame 0
class NewgroundsAPI
{
static var tracker_id, host, version, debug, error_format, header_format, normal_format, link_format;
function NewgroundsAPI () {
}
static function connectMovie(id) {
if (!id) {
SendError("Missing required 'id' parameter in NewgroundsAPI.connectMovie(id:Number)");
} else if (!tracker_id) {
SendMessage("Connecting to API gateway...");
tracker_id = id;
host = _url.split("/")[2].toLowerCase();
if (host.length < 1) {
host = "localhost";
}
var _local2 = new Object();
SendEvent(MOVIE_VIEWS);
}
}
static function setMovieVersion(movie_version) {
if (!movie_version) {
SendError("Missing required 'version' in NewgroundsAPI.setMovieVersion(version:String)");
} else {
version = movie_version;
}
}
static function debugMode() {
debug = true;
}
static function addCustomEvent(stat_id, stat_name) {
if (!stat_id) {
SendError("Missing required 'id' parameter in NewgroundsAPI.AddCustomEvent(id:Number, event_name:String)");
} else if (!stat_name) {
SendError("Missing required 'event_name' parameter in NewgroundsAPI.AddCustomEvent(id:Number, event_name:String)");
} else {
custom_events[stat_name] = CUSTOM_STATS + stat_id;
SendMessage("Created custom event: " + stat_name);
}
}
static function addCustomLink(stat_id, stat_name) {
if (!stat_id) {
SendError("Missing required 'id' parameter in NewgroundsAPI.AddCustomLink(id:Number, link_name:String)");
} else if (!stat_name) {
SendError("Missing required 'link_name' parameter in NewgroundsAPI.AddCustomLink(id:Number, link_name:String)");
} else {
custom_links[stat_name] = CUSTOM_STATS + stat_id;
SendMessage((("Created custom link " + stat_id) + ": ") + stat_name);
}
}
static function loadMySite() {
SendLink(AUTHOR_SITE);
}
static function loadNewgrounds(special) {
if (special) {
var _local1 = {page:special};
}
SendLink(NEWGROUNDS, _local1);
}
static function logCustomEvent(event_name) {
if (!event_name) {
SendError("Missing required 'event_name' parameter in NewgroundsAPI.logCustomEvent(event_name:String)");
} else if (!custom_events[event_name]) {
SendError("Attempted to log undefined custom event: " + event_name);
} else {
SendEvent(custom_events[event_name]);
}
}
static function loadCustomLink(link_name) {
if (!link_name) {
SendError("Missing required 'link_name' parameter in NewgroundsAPI.loadCustomLink(link_name:String)");
} else if (!custom_links[link_name]) {
SendError("Attempted to open undefined custom link: " + link_name);
} else {
SendLink(custom_links[link_name]);
}
}
static function getAdURL() {
return(movie_options.ad_url);
}
static function getMovieURL() {
if (movie_options.movie_url) {
return(movie_options.movie_url);
}
return("Newgrounds.com");
}
static function getNewVersionURL() {
return((((((GATEWAY_URL + "?&id=") + tracker_id) + "&host=") + escape(host)) + "&stat=") + NEW_VERSION);
}
static function SendEvent(id) {
SendStat(id, false);
}
static function SendLink(id, extra) {
SendStat(id, true, extra);
}
static function ReadGatewayData(params) {
for (var _local2 in params) {
params[_local2] = unescape(params[_local2]);
movie_options[_local2] = params[_local2];
}
if (params.settings_loaded) {
SendMessage("You have successfully connected to the Newgrounds API gateway!");
SendMessage(("Movie Identified as '" + movie_options.movie_name) + "'");
if (movie_options.message) {
SendMessage(movie_options.message);
}
if (movie_options.ad_url) {
SendMessage("Your movie has been approved to run Flash Ads");
onAdsApproved(movie_options.ad_url);
}
if (movie_options.movie_version and (movie_options.movie_version.toString() != version.toString())) {
SendMessage("WARNING: The movie version configured in your API settings does not match this movie's version!");
onNewVersionAvailable(movie_options.movie_version, getMovieURL(), getNewVersionURL());
}
if (movie_options.deny_host) {
SendMessage("You have blocked 'localHost' in your API settings.");
SendMessage("If you wish to test your movie you will need to remove this block.");
onDenyHost(host, getMovieURL(), getNewVersionURL());
}
if (movie_options.request_portal_url == 1) {
var _local4 = (((GATEWAY_URL + "?&id=") + tracker_id) + "&portal_url=") + escape(_url);
var _local3 = new XML();
_local3.ignoreWhite = true;
_local3.load(_local4);
}
} else if (!movie_options.settings_loaded) {
SendError("Could not establish connection to the API gateway.");
}
}
static function SendStat(stat_id, open_in_browser, extra) {
if (!tracker_id) {
SendError("API calls cannot be made without a valid movie id.");
SendError("Did you remember to add the \"NewgroundsAPI.connectMovie()\" code?");
} else {
var _local7 = (((((GATEWAY_URL + "?&id=") + tracker_id) + "&host=") + escape(host)) + "&stat=") + stat_id;
for (var _local9 in extra) {
_local7 = _local7 + ((("&" + escape(_local9)) + "=") + escape(extra[_local9]));
}
trace(_local7);
if (debug) {
_local7 = _local7 + "&debug=1";
}
if (open_in_browser) {
getURL (_local7, "_blank");
} else {
var _local10 = new XML();
_local10.ignoreWhite = true;
_local10.onLoad = function (success) {
var _local6 = new Object();
var _local3 = 0;
while (_local3 < this.firstChild.childNodes.length) {
var _local4 = this.firstChild.childNodes[_local3];
var _local5 = _local4.nodeName;
var _local2 = _local4.attributes.value;
if (_local2 == Number(_local2)) {
_local2 = Number(_local2);
}
_local6[_local5] = _local2;
_local3++;
}
NewgroundsAPI.ReadGatewayData(_local6);
};
_local10.load(_local7);
}
}
}
static function SendError(msg) {
trace("[NEWGROUNDS API ERROR] :: " + msg);
}
static function SendMessage(msg) {
trace("[NEWGROUNDS API] :: " + msg);
}
static function InitTextFormats() {
if (!error_format) {
error_format = new TextFormat();
error_format.font = "Arial Black";
error_format.size = 48;
error_format.color = 16711680 /* 0xFF0000 */;
}
if (!header_format) {
header_format = new TextFormat();
header_format.font = "Arial Black";
header_format.size = 24;
header_format.color = 16777215 /* 0xFFFFFF */;
}
if (!normal_format) {
normal_format = new TextFormat();
normal_format.font = "Arial";
normal_format.bold = true;
normal_format.size = 12;
normal_format.color = 16777215 /* 0xFFFFFF */;
}
if (!link_format) {
link_format = new TextFormat();
link_format.color = 16776960 /* 0xFFFF00 */;
link_format.underline = true;
}
}
static function onNewVersionAvailable(version, movie_url, redirect_url) {
InitTextFormats();
var _local2 = new Object();
_local2.x = Stage.width / 2;
_local2.y = Stage.height / 2;
_root.createEmptyMovieClip("NGAPI_new_version_overlay", _root.getNextHighestDepth());
_root.NGAPI_new_version_overlay.lineStyle(1, 0, 100);
_root.NGAPI_new_version_overlay.beginFill(0, 70);
_root.NGAPI_new_version_overlay.moveTo(-10, -10);
_root.NGAPI_new_version_overlay.lineTo(-10, 1000);
_root.NGAPI_new_version_overlay.lineTo(1000, 1000);
_root.NGAPI_new_version_overlay.lineTo(1000, -10);
_root.NGAPI_new_version_overlay.lineTo(-10, -10);
_root.NGAPI_new_version_overlay.endFill();
_root.NGAPI_new_version_overlay.lineStyle(10, 0, 100);
_root.NGAPI_new_version_overlay.beginFill(51);
_root.NGAPI_new_version_overlay.moveTo(_local2.x - 240, _local2.y - 120);
_root.NGAPI_new_version_overlay.lineTo(_local2.x + 240, _local2.y - 120);
_root.NGAPI_new_version_overlay.lineTo(_local2.x + 240, _local2.y + 80);
_root.NGAPI_new_version_overlay.lineTo(_local2.x - 240, _local2.y + 80);
_root.NGAPI_new_version_overlay.lineTo(_local2.x - 240, _local2.y - 120);
_root.NGAPI_new_version_overlay.endFill();
_root.NGAPI_new_version_overlay.createEmptyMovieClip("exit", 1000);
_root.NGAPI_new_version_overlay.exit.lineStyle(2, 39423, 100);
_root.NGAPI_new_version_overlay.exit.beginFill(0, 50);
_root.NGAPI_new_version_overlay.exit.moveTo(_local2.x + 210, _local2.y - 110);
_root.NGAPI_new_version_overlay.exit.lineTo(_local2.x + 230, _local2.y - 110);
_root.NGAPI_new_version_overlay.exit.lineTo(_local2.x + 230, _local2.y - 90);
_root.NGAPI_new_version_overlay.exit.lineTo(_local2.x + 210, _local2.y - 90);
_root.NGAPI_new_version_overlay.exit.lineTo(_local2.x + 210, _local2.y - 110);
_root.NGAPI_new_version_overlay.exit.endFill();
_root.NGAPI_new_version_overlay.exit.moveTo(_local2.x + 214, _local2.y - 106);
_root.NGAPI_new_version_overlay.exit.lineTo(_local2.x + 226, _local2.y - 94);
_root.NGAPI_new_version_overlay.exit.moveTo(_local2.x + 226, _local2.y - 106);
_root.NGAPI_new_version_overlay.exit.lineTo(_local2.x + 214, _local2.y - 94);
_root.NGAPI_new_version_overlay.exit.onMouseUp = function () {
if (_root.NGAPI_new_version_overlay.exit.hitTest(_root._xmouse, _root._ymouse)) {
_root.NGAPI_new_version_overlay.removeMovieClip();
}
};
var _local3 = (("Version " + version) + " is now available at:") + newline;
var _local5 = _local3.length;
_local3 = _local3 + movie_url;
var _local4 = _local3.length;
_root.NGAPI_new_version_overlay.createTextField("mouseblocker", 99, -10, -10, 1000, 1000);
_root.NGAPI_new_version_overlay.createTextField("newversion", 100, _local2.x - 210, _local2.y - 90, 400, 80);
_root.NGAPI_new_version_overlay.newversion.text = "New Version Available!";
_root.NGAPI_new_version_overlay.newversion.setTextFormat(header_format);
_root.NGAPI_new_version_overlay.createTextField("message", 101, (Stage.width - 400) / 2, Stage.height / 2, 400, 40);
_root.NGAPI_new_version_overlay.message.text = _local3;
_root.NGAPI_new_version_overlay.message.multiline = true;
_root.NGAPI_new_version_overlay.message.wordWrap = true;
_root.NGAPI_new_version_overlay.message.html = true;
_root.NGAPI_new_version_overlay.message.setTextFormat(normal_format);
link_format.url = redirect_url;
_root.NGAPI_new_version_overlay.message.setTextFormat(_local5, _local4, link_format);
}
static function onDenyHost(hostname, movie_url, redirect_url) {
InitTextFormats();
_root.createEmptyMovieClip("NGAPI_deny_host_overlay", _root.getNextHighestDepth());
_root.NGAPI_deny_host_overlay.lineStyle(20, 0, 100);
_root.NGAPI_deny_host_overlay.beginFill(6684672);
_root.NGAPI_deny_host_overlay.moveTo(0, 0);
_root.NGAPI_deny_host_overlay.lineTo(Stage.width, 0);
_root.NGAPI_deny_host_overlay.lineTo(Stage.width, Stage.height);
_root.NGAPI_deny_host_overlay.lineTo(0, Stage.height);
_root.NGAPI_deny_host_overlay.lineTo(0, 0);
_root.NGAPI_deny_host_overlay.endFill();
var _local2 = ("This movie has not been approved for use on " + hostname) + ".";
_local2 = _local2 + "\r\rFor an aproved copy, please visit:\r";
var _local4 = _local2.length;
_local2 = _local2 + movie_url;
var _local3 = _local2.length;
_root.NGAPI_deny_host_overlay.createTextField("mousekill", 100, 0, 0, Stage.width, Stage.height);
_root.NGAPI_deny_host_overlay.createTextField("error", 101, (Stage.width - 400) / 2, (Stage.height / 2) - 100, 400, 200);
_root.NGAPI_deny_host_overlay.error.text = "ERROR!";
_root.NGAPI_deny_host_overlay.error.setTextFormat(error_format);
_root.NGAPI_deny_host_overlay.createTextField("message", 102, (Stage.width - 400) / 2, Stage.height / 2, 400, 200);
_root.NGAPI_deny_host_overlay.message.text = _local2;
_root.NGAPI_deny_host_overlay.message.multiline = true;
_root.NGAPI_deny_host_overlay.message.wordWrap = true;
_root.NGAPI_deny_host_overlay.message.html = true;
_root.NGAPI_deny_host_overlay.message.setTextFormat(normal_format);
link_format.url = redirect_url;
_root.NGAPI_deny_host_overlay.message.setTextFormat(_local4, _local3, link_format);
}
static function isInstalled() {
return(true);
}
static function onAdsApproved(ad_url) {
}
static var movie_options = new Object();
static var custom_events = new Object();
static var custom_links = new Object();
static var MOVIE_VIEWS = 1;
static var AUTHOR_SITE = 2;
static var NEWGROUNDS = 3;
static var NEW_VERSION = 4;
static var CUSTOM_STATS = 50;
static var GATEWAY_URL = "http://www.ngads.com/gateway.php";
}
Symbol 648 MovieClip [__Packages.mochi.MochiServices] Frame 0
class mochi.MochiServices
{
static var _id, _container, _clip, _sendChannelName, _rcvChannelName, __get__comChannelName, onError, _listenChannel, _rcvChannel, _loader, _loaderListener, _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("1.31");
}
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";
_rcvChannelName = val;
initComChannels();
}
}
//return(__get__comChannelName());
}
static function get connected() {
return(_connected);
}
static function connect(id, clip, onError) {
if ((!_connected) && (_clip == undefined)) {
trace("MochiServices Connecting...");
_connecting = true;
init(id, clip);
}
if (onError != undefined) {
mochi.MochiServices.onError = onError;
} else if (mochi.MochiServices.onError == undefined) {
mochi.MochiServices.onError = function (errorCode) {
trace(errorCode);
};
}
}
static function disconnect() {
if (_connected || (_connecting)) {
_connecting = (_connected = false);
flush(true);
if (_clip != undefined) {
_clip.removeMovieClip();
delete _clip;
}
_listenChannel.close();
_rcvChannel.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 _local2 = "_mochiservices_com_" + id;
if (_clip != null) {
return(_clip);
}
if (!isNetworkAvailable) {
return(null);
}
allowDomains(_gatewayURL);
_clip = clip.createEmptyMovieClip(_local2, 10336, false);
_loader = new MovieClipLoader();
if (_loaderListener.waitInterval != null) {
clearInterval(_loaderListener.waitInterval);
}
_loaderListener = {};
_loaderListener.onLoadError = function (target_mc, errorCode, httpStatus) {
trace("MochiServices could not load.");
mochi.MochiServices.disconnect();
mochi.MochiServices.onError.apply(null, [errorCode]);
};
_loaderListener.onLoadStart = function (target_mc) {
this.isLoading = true;
};
_loaderListener.startTime = getTimer();
_loaderListener.wait = function () {
if ((getTimer() - this.startTime) > 10000) {
if (!this.isLoading) {
mochi.MochiServices.disconnect();
mochi.MochiServices.onError.apply(null, ["IOError"]);
}
clearInterval(this.waitInterval);
}
};
_loaderListener.waitInterval = setInterval(_loaderListener, "wait", 1000);
_loader.addListener(_loaderListener);
_loader.loadClip(_gatewayURL, _clip);
_sendChannel = new LocalConnection();
_sendChannel._queue = [];
_rcvChannel = new LocalConnection();
_rcvChannel.allowDomain = function (d) {
return(true);
};
_rcvChannel.allowInsecureDomain = _rcvChannel.allowDomain;
_rcvChannel._nextcallbackID = 0;
_rcvChannel._callbacks = {};
listen();
return(_clip);
}
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.MochiServices.__set__comChannelName(args.newChannel);
};
_listenChannel.allowDomain = function (d) {
return(true);
};
_listenChannel.allowInsecureDomain = _listenChannel.allowDomain;
_listenChannel.connect(_listenChannelName);
trace("Waiting for MochiAds services to connect...");
}
static function initComChannels() {
if (!_connected) {
_sendChannel.onStatus = function (infoObject) {
mochi.MochiServices.onStatus(infoObject);
};
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"});
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"registerGame", id:_id, clip:_clip, version:getVersion()});
_rcvChannel.onStatus = function (infoObject) {
mochi.MochiServices.onStatus(infoObject);
};
_rcvChannel.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];
};
_rcvChannel.onError = function () {
mochi.MochiServices.onError.apply(null, ["IOError"]);
};
_rcvChannel.connect(_rcvChannelName);
trace("connected!");
_connecting = false;
_connected = true;
_listenChannel.close();
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 = _rcvChannel._callbacks[_local1.callbackID];
}
delete _rcvChannel._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.apply(null, ["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:_rcvChannel._nextcallbackID});
} else {
if ((_clip == undefined) || (!_connecting)) {
onError.apply(null, ["NotConnected"]);
handleError(args, callbackObject, callbackMethod);
flush(true);
return(undefined);
}
_sendChannel._queue.push({methodName:methodName, args:args, callbackID:_rcvChannel._nextcallbackID});
}
_rcvChannel._callbacks[_rcvChannel._nextcallbackID] = {callbackObject:callbackObject, callbackMethod:callbackMethod};
_rcvChannel._nextcallbackID++;
}
static var _gatewayURL = "http://www.mochiads.com/static/lib/services/services.swf";
static var _listenChannelName = "__mochiservices";
static var _connecting = false;
static var _connected = false;
}
Symbol 649 MovieClip [__Packages.mochi.MochiScores] Frame 0
class mochi.MochiScores
{
static var boardID, onClose, onError;
function MochiScores () {
}
static function setBoardID(boardID) {
mochi.MochiScores.boardID = boardID;
mochi.MochiServices.send("scores_setBoardID", {boardID:boardID});
}
static function showLeaderboard(options) {
if (options.clip != null) {
if ((options.clip != mochi.MochiServices.__get__clip()) || (mochi.MochiServices.__get__childClip()._target == undefined)) {
mochi.MochiServices.disconnect();
mochi.MochiServices.connect(mochi.MochiServices.__get__id(), options.clip);
}
delete options.clip;
}
if (options.name != null) {
if (typeof(options.name) == "object") {
if (options.name.text != undefined) {
options.name = options.name.text;
}
}
}
if (options.score != null) {
if (typeof(options.score) == "object") {
if (options.score.text != undefined) {
options.score = options.score.text;
}
}
}
if (options.onDisplay != null) {
options.onDisplay();
} else {
mochi.MochiServices.__get__clip().stop();
}
if (options.onClose != null) {
onClose = options.onClose;
} else {
onClose = function () {
mochi.MochiServices.__get__clip().play();
};
}
if (options.onError != null) {
onError = options.onError;
} else {
onError = onClose;
}
if (options.boardID == null) {
if (boardID != null) {
options.boardID = boardID;
}
}
mochi.MochiServices.send("scores_showLeaderboard", {options:options}, null, doClose);
}
static function closeLeaderboard() {
mochi.MochiServices.send("scores_closeLeaderboard");
}
static function getPlayerInfo(callbackObj, callbackMethod) {
mochi.MochiServices.send("scores_getPlayerInfo", null, callbackObj, callbackMethod);
}
static function submit(score, name, callbackObj, callbackMethod) {
mochi.MochiServices.send("scores_submit", {score:score, name:name}, callbackObj, callbackMethod);
}
static function requestList(callbackObj, callbackMethod) {
mochi.MochiServices.send("scores_requestList", null, callbackObj, callbackMethod);
}
static function scoresArrayToObjects(scores) {
var _local5 = {};
var _local1;
var _local4;
var _local2;
var _local6;
for (var _local8 in scores) {
if (typeof(scores[_local8]) == "object") {
if ((scores[_local8].cols != null) && (scores[_local8].rows != null)) {
_local5[_local8] = [];
_local2 = scores[_local8];
_local4 = 0;
while (_local4 < _local2.rows.length) {
_local6 = {};
_local1 = 0;
while (_local1 < _local2.cols.length) {
_local6[_local2.cols[_local1]] = _local2.rows[_local4][_local1];
_local1++;
}
_local5[_local8].push(_local6);
_local4++;
}
} else {
_local5[_local8] = {};
for (var _local7 in scores[_local8]) {
_local5[_local8][_local7] = scores[_local8][_local7];
}
}
} else {
_local5[_local8] = scores[_local8];
}
}
return(_local5);
}
static function doClose(args) {
if (args.error == true) {
if (args.errorCode == undefined) {
args.errorCode = "IOError";
}
onError.apply(null, [args.errorCode]);
} else {
onClose.apply();
}
}
}
Symbol 427 Button
on (release) {
getURL ("http://www.jacksmack.com", "_blank");
}
Symbol 430 MovieClip Frame 1
_root.stop();
Symbol 430 MovieClip Frame 68
_root.gotoAndPlay("preMenu1");
Symbol 443 Button
on (release) {
nextFrame();
}
Symbol 446 Button
on (release) {
prevFrame();
}
Symbol 447 MovieClip Frame 1
stop();
Symbol 447 MovieClip Frame 2
stopAllSounds();
Symbol 454 Button
on (release) {
_root.computer = "fast";
gotoAndStop ("mainMenu");
}
Symbol 457 Button
on (release) {
_root.computer = "mid";
gotoAndStop ("mainMenu");
}
Symbol 460 Button
on (release) {
_root.computer = "slow";
gotoAndStop ("mainMenu");
}
Symbol 464 Button
on (release) {
gotoAndStop ("random");
}
Symbol 466 Button
on (release) {
getURL ("http://www.jacksmack.com", "_blank");
}
Symbol 470 Button
on (release) {
gotoAndStop ("Instructions");
}
Symbol 473 Button
on (release) {
gotoAndStop ("scoreshere");
scoresBG._visible = true;
mochi.MochiScores.showLeaderboard({boardID:"d949a4ad2caacfa0"});
}
Symbol 474 Button
on (release) {
scoresBG._visible = true;
mochi.MochiScores.showLeaderboard({boardID:"6cda1f41f8ba78ad"});
}
Symbol 477 Button
on (release) {
_root.quitToMenu();
}
Symbol 487 Button
on (release) {
nextFrame();
}
Symbol 503 Button
on (release) {
prevFrame();
}
Symbol 510 Button
on (release) {
_root.gotoAndStop("random");
}
Symbol 512 MovieClip Frame 1
stop();
Symbol 516 Button
on (release) {
checkMap();
}
Symbol 517 MovieClip Frame 1
stop();
Symbol 517 MovieClip Frame 2
stop();
Symbol 517 MovieClip Frame 3
stop();
Symbol 517 MovieClip Frame 4
stop();
Symbol 517 MovieClip Frame 5
stop();
Symbol 517 MovieClip Frame 6
stop();
Symbol 517 MovieClip Frame 7
stop();
Symbol 517 MovieClip Frame 8
stop();
Symbol 517 MovieClip Frame 9
stop();
Symbol 517 MovieClip Frame 10
stop();
Symbol 519 MovieClip Frame 1
stop();
Symbol 519 MovieClip Frame 2
stop();
Symbol 519 MovieClip Frame 3
stop();
Symbol 519 MovieClip Frame 4
stop();
Symbol 519 MovieClip Frame 5
stop();
Symbol 519 MovieClip Frame 6
stop();
Symbol 519 MovieClip Frame 7
stop();
Symbol 519 MovieClip Frame 8
stop();
Symbol 519 MovieClip Frame 9
stop();
Symbol 519 MovieClip Frame 10
stop();
Symbol 521 MovieClip Frame 1
stop();
Symbol 521 MovieClip Frame 2
stop();
Symbol 521 MovieClip Frame 3
stop();
Symbol 521 MovieClip Frame 4
stop();
Symbol 521 MovieClip Frame 5
stop();
Symbol 521 MovieClip Frame 6
stop();
Symbol 521 MovieClip Frame 7
stop();
Symbol 521 MovieClip Frame 8
stop();
Symbol 521 MovieClip Frame 9
stop();
Symbol 521 MovieClip Frame 10
stop();
Symbol 523 MovieClip Frame 1
stop();
Symbol 523 MovieClip Frame 2
stop();
Symbol 523 MovieClip Frame 3
stop();
Symbol 523 MovieClip Frame 4
stop();
Symbol 523 MovieClip Frame 5
stop();
Symbol 523 MovieClip Frame 6
stop();
Symbol 523 MovieClip Frame 7
stop();
Symbol 523 MovieClip Frame 8
stop();
Symbol 523 MovieClip Frame 9
stop();
Symbol 523 MovieClip Frame 10
stop();
Symbol 525 MovieClip Frame 1
stop();
Symbol 525 MovieClip Frame 2
stop();
Symbol 525 MovieClip Frame 3
stop();
Symbol 525 MovieClip Frame 4
stop();
Symbol 525 MovieClip Frame 5
stop();
Symbol 525 MovieClip Frame 6
stop();
Symbol 525 MovieClip Frame 7
stop();
Symbol 525 MovieClip Frame 8
stop();
Symbol 525 MovieClip Frame 9
stop();
Symbol 525 MovieClip Frame 10
stop();
Symbol 552 Button
on (release) {
gotoAndStop (1);
_root.gotoAndStop("reset4");
}
Symbol 591 MovieClip Frame 5
stop();
Symbol 595 MovieClip Frame 1
stop();
this.swapDepths(_root.tiles);
Symbol 595 MovieClip Frame 2
stop();
Symbol 595 MovieClip Frame 3
stop();
Symbol 596 Button
on (release) {
this.gotoAndStop(1);
_root.gotoAndStop("reset4");
}
Symbol 599 MovieClip Frame 1
stop();
Symbol 599 MovieClip Frame 2
stop();
Symbol 602 Button
on (release) {
_root.quitToMenu();
}
Symbol 605 Button
on (release) {
mochi.MochiScores.showLeaderboard({boardID:"d949a4ad2caacfa0", score:_root.Chipotle});
}
Symbol 616 MovieClip Frame 1
stop();
Symbol 618 MovieClip Frame 1
stop();
Symbol 618 MovieClip Frame 2
stop();
Symbol 618 MovieClip Frame 3
stop();
Symbol 618 MovieClip Frame 4
stop();
Symbol 618 MovieClip Frame 5
stop();
Symbol 618 MovieClip Frame 6
stop();
Symbol 618 MovieClip Frame 7
stop();
Symbol 618 MovieClip Frame 8
stop();
Symbol 618 MovieClip Frame 9
stop();
Symbol 618 MovieClip Frame 10
stop();
Symbol 622 MovieClip Frame 1
stop();
Symbol 622 MovieClip Frame 2
stop();
Symbol 622 MovieClip Frame 3
stop();
Symbol 622 MovieClip Frame 4
stop();
Symbol 622 MovieClip Frame 5
stop();
Symbol 622 MovieClip Frame 6
stop();
Symbol 622 MovieClip Frame 7
stop();
Symbol 622 MovieClip Frame 8
stop();
Symbol 622 MovieClip Frame 9
stop();
Symbol 622 MovieClip Frame 10
stop();
Symbol 624 MovieClip Frame 1
stop();
Symbol 624 MovieClip Frame 2
stop();
Symbol 624 MovieClip Frame 3
stop();
Symbol 624 MovieClip Frame 4
stop();
Symbol 624 MovieClip Frame 5
stop();
Symbol 624 MovieClip Frame 6
stop();
Symbol 624 MovieClip Frame 7
stop();
Symbol 624 MovieClip Frame 8
stop();
Symbol 624 MovieClip Frame 9
stop();
Symbol 624 MovieClip Frame 10
stop();
Symbol 626 MovieClip Frame 1
stop();
Symbol 626 MovieClip Frame 2
stop();
Symbol 626 MovieClip Frame 3
stop();
Symbol 626 MovieClip Frame 4
stop();
Symbol 626 MovieClip Frame 5
stop();
Symbol 626 MovieClip Frame 6
stop();
Symbol 626 MovieClip Frame 7
stop();
Symbol 626 MovieClip Frame 8
stop();
Symbol 626 MovieClip Frame 9
stop();
Symbol 626 MovieClip Frame 10
stop();
Symbol 646 MovieClip Frame 1
stop();