Instance of Symbol 16 MovieClip in Frame 2
onClipEvent (load) {
totalBytes = _root.getBytesTotal();
_root.stop();
}
onClipEvent (enterFrame) {
pc = parseInt((_root.getBytesLoaded() / totalBytes) * 100);
if (100 < pc) {
pc = 100;
}
percent = ("Loading ... " + pc) + "%";
if (pc == 100) {
_root.gotoAndPlay("home");
}
}
Frame 9
_root.theGrid = [[{c:[], x:-140, z:-140, camZ:715, sx:123, sy:199}, {c:[], x:-140, z:-120, camZ:697, sx:119, sy:208}, {c:[], x:-140, z:-100, camZ:679, sx:114, sy:218}, {c:[], x:-140, z:-80, camZ:661, sx:109, sy:229}, {c:[], x:-140, z:-60, camZ:643, sx:104, sy:240}, {c:[], x:-140, z:-40, camZ:625, sx:98, sy:252}, {c:[], x:-140, z:-20, camZ:607, sx:92, sy:264}, {c:[], x:-140, z:0, camZ:590, sx:86, sy:278}, {c:[], x:-140, z:20, camZ:572, sx:79, sy:292}, {c:[], x:-140, z:40, camZ:554, sx:72, sy:307}, {c:[], x:-140, z:60, camZ:536, sx:65, sy:323}, {c:[], x:-140, z:80, camZ:518, sx:56, sy:340}, {c:[], x:-140, z:100, camZ:500, sx:48, sy:358}, {c:[], x:-140, z:120, camZ:482, sx:38, sy:378}, {c:[], x:-140, z:140, camZ:464, sx:28, sy:399}], [{c:[], x:-120, z:-140, camZ:715, sx:149, sy:199}, {c:[], x:-120, z:-120, camZ:697, sx:145, sy:208}, {c:[], x:-120, z:-100, camZ:679, sx:141, sy:218}, {c:[], x:-120, z:-80, camZ:661, sx:136, sy:229}, {c:[], x:-120, z:-60, camZ:643, sx:132, sy:240}, {c:[], x:-120, z:-40, camZ:625, sx:127, sy:252}, {c:[], x:-120, z:-20, camZ:607, sx:122, sy:264}, {c:[], x:-120, z:0, camZ:590, sx:116, sy:278}, {c:[], x:-120, z:20, camZ:572, sx:111, sy:292}, {c:[], x:-120, z:40, camZ:554, sx:105, sy:307}, {c:[], x:-120, z:60, camZ:536, sx:98, sy:323}, {c:[], x:-120, z:80, camZ:518, sx:91, sy:340}, {c:[], x:-120, z:100, camZ:500, sx:84, sy:358}, {c:[], x:-120, z:120, camZ:482, sx:76, sy:378}, {c:[], x:-120, z:140, camZ:464, sx:67, sy:399}], [{c:[], x:-100, z:-140, camZ:715, sx:174, sy:199}, {c:[], x:-100, z:-120, camZ:697, sx:170, sy:208}, {c:[], x:-100, z:-100, camZ:679, sx:167, sy:218}, {c:[], x:-100, z:-80, camZ:661, sx:163, sy:229}, {c:[], x:-100, z:-60, camZ:643, sx:160, sy:240}, {c:[], x:-100, z:-40, camZ:625, sx:156, sy:252}, {c:[], x:-100, z:-20, camZ:607, sx:151, sy:264}, {c:[], x:-100, z:0, camZ:590, sx:147, sy:278}, {c:[], x:-100, z:20, camZ:572, sx:142, sy:292}, {c:[], x:-100, z:40, camZ:554, sx:137, sy:307}, {c:[], x:-100, z:60, camZ:536, sx:132, sy:323}, {c:[], x:-100, z:80, camZ:518, sx:126, sy:340}, {c:[], x:-100, z:100, camZ:500, sx:120, sy:358}, {c:[], x:-100, z:120, camZ:482, sx:113, sy:378}, {c:[], x:-100, z:140, camZ:464, sx:106, sy:399}], [{c:[], x:-80, z:-140, camZ:715, sx:199, sy:199}, {c:[], x:-80, z:-120, camZ:697, sx:196, sy:208}, {c:[], x:-80, z:-100, camZ:679, sx:194, sy:218}, {c:[], x:-80, z:-80, camZ:661, sx:191, sy:229}, {c:[], x:-80, z:-60, camZ:643, sx:188, sy:240}, {c:[], x:-80, z:-40, camZ:625, sx:184, sy:252}, {c:[], x:-80, z:-20, camZ:607, sx:181, sy:264}, {c:[], x:-80, z:0, camZ:590, sx:177, sy:278}, {c:[], x:-80, z:20, camZ:572, sx:174, sy:292}, {c:[], x:-80, z:40, camZ:554, sx:170, sy:307}, {c:[], x:-80, z:60, camZ:536, sx:165, sy:323}, {c:[], x:-80, z:80, camZ:518, sx:161, sy:340}, {c:[], x:-80, z:100, camZ:500, sx:156, sy:358}, {c:[], x:-80, z:120, camZ:482, sx:150, sy:378}, {c:[], x:-80, z:140, camZ:464, sx:145, sy:399}], [{c:[], x:-60, z:-140, camZ:715, sx:224, sy:199}, {c:[], x:-60, z:-120, camZ:697, sx:222, sy:208}, {c:[], x:-60, z:-100, camZ:679, sx:220, sy:218}, {c:[], x:-60, z:-80, camZ:661, sx:218, sy:229}, {c:[], x:-60, z:-60, camZ:643, sx:216, sy:240}, {c:[], x:-60, z:-40, camZ:625, sx:213, sy:252}, {c:[], x:-60, z:-20, camZ:607, sx:211, sy:264}, {c:[], x:-60, z:0, camZ:590, sx:208, sy:278}, {c:[], x:-60, z:20, camZ:572, sx:205, sy:292}, {c:[], x:-60, z:40, camZ:554, sx:202, sy:307}, {c:[], x:-60, z:60, camZ:536, sx:199, sy:323}, {c:[], x:-60, z:80, camZ:518, sx:195, sy:340}, {c:[], x:-60, z:100, camZ:500, sx:192, sy:358}, {c:[], x:-60, z:120, camZ:482, sx:188, sy:378}, {c:[], x:-60, z:140, camZ:464, sx:183, sy:399}], [{c:[], x:-40, z:-140, camZ:715, sx:249, sy:199}, {c:[], x:-40, z:-120, camZ:697, sx:248, sy:208}, {c:[], x:-40, z:-100, camZ:679, sx:247, sy:218}, {c:[], x:-40, z:-80, camZ:661, sx:245, sy:229}, {c:[], x:-40, z:-60, camZ:643, sx:244, sy:240}, {c:[], x:-40, z:-40, camZ:625, sx:242, sy:252}, {c:[], x:-40, z:-20, camZ:607, sx:240, sy:264}, {c:[], x:-40, z:0, camZ:590, sx:238, sy:278}, {c:[], x:-40, z:20, camZ:572, sx:237, sy:292}, {c:[], x:-40, z:40, camZ:554, sx:235, sy:307}, {c:[], x:-40, z:60, camZ:536, sx:232, sy:323}, {c:[], x:-40, z:80, camZ:518, sx:230, sy:340}, {c:[], x:-40, z:100, camZ:500, sx:228, sy:358}, {c:[], x:-40, z:120, camZ:482, sx:225, sy:378}, {c:[], x:-40, z:140, camZ:464, sx:222, sy:399}], [{c:[], x:-20, z:-140, camZ:715, sx:274, sy:199}, {c:[], x:-20, z:-120, camZ:697, sx:274, sy:208}, {c:[], x:-20, z:-100, camZ:679, sx:273, sy:218}, {c:[], x:-20, z:-80, camZ:661, sx:272, sy:229}, {c:[], x:-20, z:-60, camZ:643, sx:272, sy:240}, {c:[], x:-20, z:-40, camZ:625, sx:271, sy:252}, {c:[], x:-20, z:-20, camZ:607, sx:270, sy:264}, {c:[], x:-20, z:0, camZ:590, sx:269, sy:278}, {c:[], x:-20, z:20, camZ:572, sx:268, sy:292}, {c:[], x:-20, z:40, camZ:554, sx:267, sy:307}, {c:[], x:-20, z:60, camZ:536, sx:266, sy:323}, {c:[], x:-20, z:80, camZ:518, sx:265, sy:340}, {c:[], x:-20, z:100, camZ:500, sx:264, sy:358}, {c:[], x:-20, z:120, camZ:482, sx:262, sy:378}, {c:[], x:-20, z:140, camZ:464, sx:261, sy:399}], [{c:[], x:0, z:-140, camZ:715, sx:300, sy:199}, {c:[], x:0, z:-120, camZ:697, sx:300, sy:208}, {c:[], x:0, z:-100, camZ:679, sx:300, sy:218}, {c:[], x:0, z:-80, camZ:661, sx:300, sy:229}, {c:[], x:0, z:-60, camZ:643, sx:300, sy:240}, {c:[], x:0, z:-40, camZ:625, sx:300, sy:252}, {c:[], x:0, z:-20, camZ:607, sx:300, sy:264}, {c:[], x:0, z:0, camZ:590, sx:300, sy:278}, {c:[], x:0, z:20, camZ:572, sx:300, sy:292}, {c:[], x:0, z:40, camZ:554, sx:300, sy:307}, {c:[], x:0, z:60, camZ:536, sx:300, sy:323}, {c:[], x:0, z:80, camZ:518, sx:300, sy:340}, {c:[], x:0, z:100, camZ:500, sx:300, sy:358}, {c:[], x:0, z:120, camZ:482, sx:300, sy:378}, {c:[], x:0, z:140, camZ:464, sx:300, sy:399}], [{c:[], x:20, z:-140, camZ:715, sx:325, sy:199}, {c:[], x:20, z:-120, camZ:697, sx:325, sy:208}, {c:[], x:20, z:-100, camZ:679, sx:326, sy:218}, {c:[], x:20, z:-80, camZ:661, sx:327, sy:229}, {c:[], x:20, z:-60, camZ:643, sx:327, sy:240}, {c:[], x:20, z:-40, camZ:625, sx:328, sy:252}, {c:[], x:20, z:-20, camZ:607, sx:329, sy:264}, {c:[], x:20, z:0, camZ:590, sx:330, sy:278}, {c:[], x:20, z:20, camZ:572, sx:331, sy:292}, {c:[], x:20, z:40, camZ:554, sx:332, sy:307}, {c:[], x:20, z:60, camZ:536, sx:333, sy:323}, {c:[], x:20, z:80, camZ:518, sx:334, sy:340}, {c:[], x:20, z:100, camZ:500, sx:335, sy:358}, {c:[], x:20, z:120, camZ:482, sx:337, sy:378}, {c:[], x:20, z:140, camZ:464, sx:338, sy:399}], [{c:[], x:40, z:-140, camZ:715, sx:350, sy:199}, {c:[], x:40, z:-120, camZ:697, sx:351, sy:208}, {c:[], x:40, z:-100, camZ:679, sx:352, sy:218}, {c:[], x:40, z:-80, camZ:661, sx:354, sy:229}, {c:[], x:40, z:-60, camZ:643, sx:355, sy:240}, {c:[], x:40, z:-40, camZ:625, sx:357, sy:252}, {c:[], x:40, z:-20, camZ:607, sx:359, sy:264}, {c:[], x:40, z:0, camZ:590, sx:361, sy:278}, {c:[], x:40, z:20, camZ:572, sx:362, sy:292}, {c:[], x:40, z:40, camZ:554, sx:364, sy:307}, {c:[], x:40, z:60, camZ:536, sx:367, sy:323}, {c:[], x:40, z:80, camZ:518, sx:369, sy:340}, {c:[], x:40, z:100, camZ:500, sx:371, sy:358}, {c:[], x:40, z:120, camZ:482, sx:374, sy:378}, {c:[], x:40, z:140, camZ:464, sx:377, sy:399}], [{c:[], x:60, z:-140, camZ:715, sx:375, sy:199}, {c:[], x:60, z:-120, camZ:697, sx:377, sy:208}, {c:[], x:60, z:-100, camZ:679, sx:379, sy:218}, {c:[], x:60, z:-80, camZ:661, sx:381, sy:229}, {c:[], x:60, z:-60, camZ:643, sx:383, sy:240}, {c:[], x:60, z:-40, camZ:625, sx:386, sy:252}, {c:[], x:60, z:-20, camZ:607, sx:388, sy:264}, {c:[], x:60, z:0, camZ:590, sx:391, sy:278}, {c:[], x:60, z:20, camZ:572, sx:394, sy:292}, {c:[], x:60, z:40, camZ:554, sx:397, sy:307}, {c:[], x:60, z:60, camZ:536, sx:400, sy:323}, {c:[], x:60, z:80, camZ:518, sx:404, sy:340}, {c:[], x:60, z:100, camZ:500, sx:407, sy:358}, {c:[], x:60, z:120, camZ:482, sx:411, sy:378}, {c:[], x:60, z:140, camZ:464, sx:416, sy:399}], [{c:[], x:80, z:-140, camZ:715, sx:400, sy:199}, {c:[], x:80, z:-120, camZ:697, sx:403, sy:208}, {c:[], x:80, z:-100, camZ:679, sx:405, sy:218}, {c:[], x:80, z:-80, camZ:661, sx:408, sy:229}, {c:[], x:80, z:-60, camZ:643, sx:411, sy:240}, {c:[], x:80, z:-40, camZ:625, sx:415, sy:252}, {c:[], x:80, z:-20, camZ:607, sx:418, sy:264}, {c:[], x:80, z:0, camZ:590, sx:422, sy:278}, {c:[], x:80, z:20, camZ:572, sx:425, sy:292}, {c:[], x:80, z:40, camZ:554, sx:429, sy:307}, {c:[], x:80, z:60, camZ:536, sx:434, sy:323}, {c:[], x:80, z:80, camZ:518, sx:438, sy:340}, {c:[], x:80, z:100, camZ:500, sx:443, sy:358}, {c:[], x:80, z:120, camZ:482, sx:449, sy:378}, {c:[], x:80, z:140, camZ:464, sx:454, sy:399}], [{c:[], x:100, z:-140, camZ:715, sx:425, sy:199}, {c:[], x:100, z:-120, camZ:697, sx:429, sy:208}, {c:[], x:100, z:-100, camZ:679, sx:432, sy:218}, {c:[], x:100, z:-80, camZ:661, sx:436, sy:229}, {c:[], x:100, z:-60, camZ:643, sx:439, sy:240}, {c:[], x:100, z:-40, camZ:625, sx:443, sy:252}, {c:[], x:100, z:-20, camZ:607, sx:448, sy:264}, {c:[], x:100, z:0, camZ:590, sx:452, sy:278}, {c:[], x:100, z:20, camZ:572, sx:457, sy:292}, {c:[], x:100, z:40, camZ:554, sx:462, sy:307}, {c:[], x:100, z:60, camZ:536, sx:467, sy:323}, {c:[], x:100, z:80, camZ:518, sx:473, sy:340}, {c:[], x:100, z:100, camZ:500, sx:479, sy:358}, {c:[], x:100, z:120, camZ:482, sx:486, sy:378}, {c:[], x:100, z:140, camZ:464, sx:493, sy:399}], [{c:[], x:120, z:-140, camZ:715, sx:450, sy:199}, {c:[], x:120, z:-120, camZ:697, sx:454, sy:208}, {c:[], x:120, z:-100, camZ:679, sx:458, sy:218}, {c:[], x:120, z:-80, camZ:661, sx:463, sy:229}, {c:[], x:120, z:-60, camZ:643, sx:467, sy:240}, {c:[], x:120, z:-40, camZ:625, sx:472, sy:252}, {c:[], x:120, z:-20, camZ:607, sx:477, sy:264}, {c:[], x:120, z:0, camZ:590, sx:483, sy:278}, {c:[], x:120, z:20, camZ:572, sx:488, sy:292}, {c:[], x:120, z:40, camZ:554, sx:494, sy:307}, {c:[], x:120, z:60, camZ:536, sx:501, sy:323}, {c:[], x:120, z:80, camZ:518, sx:508, sy:340}, {c:[], x:120, z:100, camZ:500, sx:515, sy:358}, {c:[], x:120, z:120, camZ:482, sx:523, sy:378}, {c:[], x:120, z:140, camZ:464, sx:532, sy:399}], [{c:[], x:140, z:-140, camZ:715, sx:476, sy:199}, {c:[], x:140, z:-120, camZ:697, sx:480, sy:208}, {c:[], x:140, z:-100, camZ:679, sx:485, sy:218}, {c:[], x:140, z:-80, camZ:661, sx:490, sy:229}, {c:[], x:140, z:-60, camZ:643, sx:495, sy:240}, {c:[], x:140, z:-40, camZ:625, sx:501, sy:252}, {c:[], x:140, z:-20, camZ:607, sx:507, sy:264}, {c:[], x:140, z:0, camZ:590, sx:513, sy:278}, {c:[], x:140, z:20, camZ:572, sx:520, sy:292}, {c:[], x:140, z:40, camZ:554, sx:527, sy:307}, {c:[], x:140, z:60, camZ:536, sx:534, sy:323}, {c:[], x:140, z:80, camZ:518, sx:543, sy:340}, {c:[], x:140, z:100, camZ:500, sx:551, sy:358}, {c:[], x:140, z:120, camZ:482, sx:561, sy:378}, {c:[], x:140, z:140, camZ:464, sx:571, sy:399}]];
XML.prototype.convertToDOM = function (xmlNode) {
if (xmlNode == null) {
xmlNode = this;
}
var tempObj = new Object();
tempObj.nodeName = xmlNode.nodeName;
tempObj.text = "";
tempObj.xml = xmlNode;
tempObj._parent = null;
for (attr in xmlNode:attributes) {
tempObj[attr] = xmlNode.attributes[attr];
}
var i = 0;
while (i < xmlNode.childNodes.length) {
if (xmlNode.childNodes[i].nodeType == 3) {
tempObj.text = tempObj.text + xmlNode.childNodes[i].nodeValue;
} else {
var subObj = this.convertToDOM(xmlNode.childNodes[i]);
subObj._parent = tempObj;
if (subObj.id != "") {
tempObj[subObj.id] = subObj;
}
if (typeof(tempObj[subObj.nodeName]) == "undefined") {
tempObj[subObj.nodeName] = new Array();
}
typeArray = tempObj[subObj.nodeName];
typeArray[typeArray.length] = subObj;
}
i++;
}
return(tempObj);
};
Math.randomInt = function (from, to) {
with (this) {
range = to - from;
r_int = Math.round(Math.random() * (range + 1));
if (r_int == (range + 1)) {
r_int = 0;
}
return(r_int + from);
}
};
Array.prototype.randomElement = function () {
this.r = Math.randomInt(0, this.length - 1);
return(this[this.r]);
};
Math.Vector = function (x, y, z) {
if (((x == null) && (y == null)) && (z == null)) {
this.x = 0;
this.y = 0;
this.z = 0;
} else {
this.x = x;
this.y = y;
this.z = z;
}
};
Math.Vector.prototype.addVec = function (t) {
this.x = this.x + t.x;
this.y = this.y + t.y;
this.z = this.z + t.z;
};
Math.Vector.prototype.setVec = function (x, y, z) {
this.x = x;
this.y = y;
this.z = z;
};
Math.Vector.prototype.setToVec = function (vec) {
this.x = vec.x;
this.y = vec.y;
this.z = vec.z;
};
Math.Vector.prototype.setZero = function () {
this.setVec(0, 0, 0);
};
Math.Vector.prototype.setUnitRandom = function () {
with (this) {
do {
x = (Math.random() * 2) - 1;
y = (Math.random() * 2) - 1;
z = (Math.random() * 2) - 1;
} while (1 < magnitudeSquared());
}
};
Math.Vector.prototype.equals = function (other) {
with (this) {
return(((x == other.x) && (y == other.y)) && (z == other.z));
}
};
Math.Vector.prototype.equalsZero = function () {
with (this) {
return(((x == 0) && (y == 0)) && (z == 0));
}
};
Math.Vector.prototype.magnitude = function () {
return(Math.sqrt(this.magnitudeSquared()));
};
Math.Vector.prototype.magnitudeSquared = function () {
with (this) {
return(((x * x) + (y * y)) + (z * z));
}
};
Math.Vector.prototype.distance = function (v) {
distTemp = new Math.Vector();
distTemp.setDiff(this, v);
return(distTemp.magnitude());
};
Math.Vector.prototype.approxDistance = function (v) {
distTemp = new Vector();
distTemp.setDiff(this, v);
return(distTemp.approxLength());
};
Math.Vector.prototype.setSum = function (a, b) {
with (this) {
x = a.x + b.x;
y = a.y + b.y;
z = a.z + b.z;
}
};
Math.Vector.prototype.setDiff = function (a, b) {
with (this) {
x = a.x - b.x;
y = a.y - b.y;
z = a.z - b.z;
}
};
Math.Vector.prototype.setDiv = function (a, b) {
with (this) {
x = a.x / b;
y = a.y / b;
z = a.z / b;
}
};
Math.Vector.prototype.setScale = function (a, b) {
with (this) {
x = a * b.x;
y = a * b.y;
z = a * b.z;
}
};
Math.Vector.prototype.setCross = function (a, b) {
with (this) {
x = (y * v.z) - (z * v.y);
y = (z * v.x) - (x * v.z);
z = (x * v.y) - (y * v.x);
}
};
Math.Vector.prototype.setInterp = function (blend, a, b) {
with (this) {
x = a.x + (blend * (b.x - a.x));
y = a.y + (blend * (b.y - a.y));
z = a.z + (blend * (b.z - a.z));
}
};
Math.Vector.prototype.setNormalize = function () {
with (this) {
m = magnitude();
if (m != 0) {
setScale(1 / m, this);
}
}
};
Math.Vector.prototype.setApproxNormalize = function () {
with (this) {
m = approxLength();
if (m != 0) {
setScale(1 / m, this);
}
}
};
Math.Vector.prototype.setApproxTruncate = function (threshold) {
with (this) {
l = approxLength();
if (threshold < l) {
setScale(threshold / l, this);
}
}
};
Math.Vector.prototype.dot = function (v) {
with (this) {
return(((x * v.x) + (y * v.y)) + (z * v.z));
}
};
Math.Vector.prototype.approxLength = function () {
a = this.x;
b = this.y;
c = this.z;
if (a < 0) {
a = -a;
}
if (b < 0) {
b = -b;
}
if (c < 0) {
c = -c;
}
if (a < b) {
t = a;
a = b;
b = t;
}
if (a < c) {
t = a;
a = c;
c = t;
}
return((a * 0.9375) + ((b + c) * 0.375));
};
Math.Vector.prototype.toString = function () {
with (this) {
return(((((("Vector(" + x) + ",") + y) + ",") + z) + ")");
}
};
Math.Transform = function (initMatrix) {
if (initMatrix == null) {
this.matrix = [[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]];
} else {
this.matrix = initMatrix;
}
};
Math.Transform.identity = [[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]];
Math.Transform.prototype.translate = function (tx, ty, tz) {
this.multiply(new Math.Transform([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [tx, ty, tz, 1]]));
};
Math.Transform.prototype.scale = function (sx, sy, sz) {
this.multiply(new Math.Transform([[sx, 0, 0, 0], [0, sy, 0, 0], [0, 0, sz, 0], [0, 0, 0, 1]]));
};
Math.Transform.prototype.rotateX = function (angle) {
this.multiply(new Math.Transform([[1, 0, 0, 0], [0, Math.cos(angle), Math.sin(angle), 0], [0, -Math.sin(angle), Math.cos(angle), 0], [0, 0, 0, 1]]));
};
Math.Transform.prototype.rotateY = function (angle) {
this.multiply(new Math.Transform([[Math.cos(angle), 0, -Math.sin(angle), 0], [0, 1, 0, 0], [Math.sin(angle), 0, Math.cos(angle), 0], [0, 0, 0, 1]]));
};
Math.Transform.prototype.rotateZ = function (angle) {
this.multiply(new Math.Transform([[Math.cos(angle), Math.sin(angle), 0, 0], [-Math.sin(angle), Math.cos(angle), 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]));
};
Math.Transform.prototype.getRotation = function () {
var sp = (-this.matrix[1][2]);
if (-1 >= sp) {
p = -1.570796;
} else if (sp >= 1) {
p = 1.570796;
} else {
p = Math.asin(sp);
}
if (0.9999 < sp) {
b = 0;
h = Math.atan2(-this.matrix[2][0], this.matrix[0][0]);
} else {
h = Math.atan2(this.matrix[0][2], this.matrix[2][2]);
b = Math.atan2(this.matrix[1][0], this.matrix[1][1]);
}
return(new Math.Vector(p, h, b));
};
Math.Transform.prototype.multiply = function (b) {
with (this) {
var newMx = [[], [], [], []];
var j = 0;
while (j < 4) {
var i = 0;
while (i < 4) {
newMx[i][j] = (((matrix[i][0] * b.matrix[0][j]) + (matrix[i][1] * b.matrix[1][j])) + (matrix[i][2] * b.matrix[2][j])) + (matrix[i][3] * b.matrix[3][j]);
i++;
}
j++;
}
matrix = newMx;
}
};
Math.Transform.prototype.vectorTransform = function (vec) {
with (this) {
var newX = ((((vec.x * matrix[0][0]) + (vec.y * matrix[1][0])) + (vec.z * matrix[2][0])) + matrix[3][0]);
var newY = ((((vec.x * matrix[0][1]) + (vec.y * matrix[1][1])) + (vec.z * matrix[2][1])) + matrix[3][1]);
var newZ = ((((vec.x * matrix[0][2]) + (vec.y * matrix[1][2])) + (vec.z * matrix[2][2])) + matrix[3][2]);
return(new Math.Vector(newX, newY, newZ));
}
};
Math.Transform.prototype.addVec = function (vec) {
with (this) {
matrix[3][0] = matrix[3][0] + vec.x;
matrix[3][1] = matrix[3][1] + vec.y;
matrix[3][2] = matrix[3][2] + vec.z;
}
};
Math.Transform.prototype.determinant = function () {
m = this.matrix;
return(((m[0][0] * ((m[1][1] * m[2][2]) - (m[1][2] * m[2][1]))) + (m[0][1] * ((m[1][2] * m[2][0]) - (m[1][0] * m[2][2])))) + (m[0][2] * ((m[1][0] * m[2][0]) - (m[1][1] * m[2][0]))));
};
Math.Transform.prototype.inverse = function () {
var det = this.determinant();
var oneOverDet = (1 / det);
m = this.matrix;
m11 = ((m[1][1] * m[2][2]) - (m[1][2] * m[2][1])) * oneOverDet;
m12 = ((m[0][2] * m[2][1]) - (m[0][1] * m[2][2])) * oneOverDet;
m13 = ((m[0][1] * m[1][2]) - (m[0][2] * m[1][1])) * oneOverDet;
m21 = ((m[1][2] * m[2][0]) - (m[1][0] * m[2][2])) * oneOverDet;
m22 = ((m[0][0] * m[2][2]) - (m[0][2] * m[2][0])) * oneOverDet;
m23 = ((m[0][2] * m[1][0]) - (m[0][0] * m[1][2])) * oneOverDet;
m31 = ((m[1][0] * m[2][1]) - (m[1][1] * m[2][0])) * oneOverDet;
m32 = ((m[0][1] * m[2][0]) - (m[0][0] * m[2][1])) * oneOverDet;
m33 = ((m[0][0] * m[1][1]) - (m[0][1] * m[1][0])) * oneOverDet;
tx = -(((m[3][0] * m11) + (m[3][1] * m21)) + (m[3][2] * m31));
ty = -(((m[3][0] * m12) + (m[3][1] * m22)) + (m[3][2] * m32));
tz = -(((m[3][0] * m13) + (m[3][1] * m23)) + (m[3][2] * m33));
return(new Math.Transform([[m11, m12, m13, 0], [m21, m22, m23, 0], [m31, m32, m33, 0], [tx, ty, tz, 1]]));
};
ZObj = function (ref_mc, z_pos) {
this.ref_mc = ref_mc;
this.z = z_pos;
};
Zmanager = function () {
this.zList = [];
};
Zmanager.prototype.addZObj = function (newZObj) {
this.zList.push(newZObj);
};
Zmanager.prototype.deleteZObj = function (delZObj) {
with (this) {
var tempList = [];
var i = 0;
while (i < zList.length) {
if (zList[i] != delZObj) {
tempList.push(zList[i]);
}
i++;
}
zList = tempList;
}
};
Zmanager.prototype.dumpZList = function () {
trace(" ===== ");
with (this) {
var i = 0;
while (i < zList.length) {
trace((zList[i].ref_mc._name + " = ") + zList[i].z);
i++;
}
}
};
Zmanager.prototype.update = function () {
with (this) {
curIndex = 0;
while (curIndex < zList.length) {
doShuffle = false;
if (curIndex < (zList.length - 1)) {
doShuffle = zList[curIndex].z < zList[curIndex + 1].z;
}
if (doShuffle) {
tempObj = zList[curIndex];
zList.splice(curIndex, 1);
zList.splice(curIndex + 1, 0, tempObj);
zList[curIndex].ref_mc.swapDepths(zList[curIndex + 1].ref_mc);
curIndex = 0;
} else {
curIndex++;
}
}
}
};
Node3d = function (origin, position, scale, rotation) {
this.matrix = new Math.Transform();
this.origin = origin;
this.position = new Math.Vector(0, 0, 0);
this.rotation = new Math.Vector(0, 0, 0);
this.scale = new Math.Vector(1, 1, 1);
this.doTransform(position, scale, rotation);
this.dirty = true;
};
Node3d.prototype.moveOrigin = function (t) {
this.origin.addVec(t);
this.dirty = true;
};
Node3d.prototype.setOrigin = function (t) {
this.origin.setToVec(t);
this.dirty = true;
};
Node3d.prototype.getWorldPosition = function () {
return(this.origin);
};
Node3d.prototype.doTransform = function (t, s, r) {
if (t != null) {
this.matrix.translate(t.x, t.y, t.z);
this.position.setSum(this.position, t);
}
if (s != null) {
this.matrix.scale(s.x, s.y, s.z);
this.scale.setScale(s, this.scale);
}
if (r != null) {
this.matrix.rotateX(r.x);
this.matrix.rotateY(r.y);
this.matrix.rotateZ(r.z);
this.rotation = this.matrix.getRotation();
}
this.dirty = true;
};
Node3d.prototype.setTransform = function (t, s, r) {
if (t != null) {
t.setDiff(t, this.position);
}
if (s != null) {
s.setDiv(s, this.scale);
}
if (r != null) {
r.setDiff(r, this.rotation);
}
this.doTransform(t, s, r);
};
Camera3dNode = function (perspective, origin, position, scale, rotation) {
this.perspective = perspective;
this.nearClip = 50;
this.farClip = 5000;
this.superClass = Node3d;
this.superClass(origin, position, scale, rotation);
};
Camera3dNode.prototype = new Node3d();
Sprite3dNode = function (scene, id, name, gridPos, origin, position, scale, rotation) {
this.gridPos = gridPos;
this.superClass = Node3d;
this.superClass(origin, position, scale, rotation);
this.id = id;
this.name = name;
this.viewMatrix = new Math.Transform();
this.scene = scene;
this.scene.spriteContainer.attachMovie(id, name, this.scene.spriteDepth++);
this.ref_mc = this.scene.spriteContainer[name];
this.ref_mc.obj_ref = this;
this.eyeMatrix = new Math.Transform();
this.eyeMatrix.multiply(this.matrix);
this.eyeMatrix.addVec(this.origin);
this.eyeMatrix.multiply(this.scene.matrix);
this.zObj = new _root.ZObj(this.ref_mc, position.z);
this.scene.spriteZmanager.addZObj(this.zObj);
};
Sprite3dNode.prototype = new Node3d();
Sprite3dNode.prototype.deleteNode = function () {
this.scene.deleteObjFromGrid(this);
this.scene.spriteZmanager.deleteZObj(this.zObj);
this.ref_mc.removeMovieClip();
this.scene.children[this.name] = null;
this = null;
};
Sprite3dNode.prototype.update = function (applyScene) {
return(this.update3d(applyScene));
};
Sprite3dNode.prototype.update3d = function (applyScene) {
this.objChanged = false;
if (applyScene || (this.dirty)) {
this.eyeMatrix = new Math.Transform();
this.eyeMatrix.multiply(this.matrix);
this.eyeMatrix.addVec(this.origin);
this.eyeMatrix.multiply(this.scene.matrix);
this.dirty = false;
this.objChanged = true;
this.viewMatrix = new Math.Transform();
this.viewMatrix.multiply(this.eyeMatrix);
this.tempCamMatrix = new Math.Transform();
this.tempCamMatrix.multiply(this.scene.camera.matrix);
this.tempCamMatrix.addVec(this.scene.camera.origin);
this.viewMatrix.multiply(this.tempCamMatrix);
this.zObj.z = this.getPos().z;
}
return(this.objChanged);
};
Sprite3dNode.prototype.getPos = function () {
var vec = this.viewMatrix.vectorTransform(this.position);
return(vec);
};
Scene3dNode = function (sceneCamera, sceneCentre, spriteContainer, position, scale, rotation) {
this.superClass = Node3d;
this.superClass(new Math.Vector(), position, scale, rotation);
this.spriteContainer = spriteContainer;
this.spriteDepth = 10;
this.camera = sceneCamera;
this.children = [];
this.scrCentre = sceneCentre;
this.sceneChanged = false;
this.spriteZmanager = new _root.Zmanager();
this.buildScene();
};
Scene3dNode.prototype = new Node3d();
Scene3dNode.prototype.buildScene = function () {
};
Scene3dNode.prototype.drawScene = function () {
for (var child in this:children) {
obj3d = this.children[child];
objChanged = obj3d.update(this.dirty);
if (objChanged) {
var objPos = obj3d.getPos();
if ((this.camera.nearClip < objPos.z) && (objPos.z < this.camera.farClip)) {
screenPos = this.project3D(objPos);
obj3d.ref_mc._x = screenPos.x;
obj3d.ref_mc._y = screenPos.y;
obj3d.ref_mc._visible = true;
scaleFactor = parseInt((this.camera.perspective / objPos.z) * 70);
obj3d.ref_mc._xscale = scaleFactor;
obj3d.ref_mc._yscale = scaleFactor;
} else {
obj3d.ref_mc._visible = false;
}
}
}
this.dirty = false;
this.spriteZmanager.update();
};
Scene3dNode.prototype.project3D = function (thePoint) {
var scalar = (this.camera.perspective / parseInt(thePoint.z));
var x = ((thePoint.x * scalar) + this.scrCentre.x);
var y = (((-thePoint.y) * scalar) + this.scrCentre.y);
return(new Math.Vector(x, y, 0));
};
GameScene = function (sceneCamera, sceneCentre, spriteContainer, position, scale, rotation) {
this.superClass = Scene3dNode;
this.superClass(sceneCamera, sceneCentre, spriteContainer, position, scale, rotation);
this.fps = 12;
this.frameInterval = 1000 / this.fps;
this.lastFrameTime = getTimer();
};
GameScene.prototype = new Scene3dNode();
GameScene.prototype.buildScene = function () {
this.camMatrix = new Math.Transform();
this.camMatrix.multiply(camera.matrix);
this.camMatrix.addVec(camera.origin);
};
GameScene.prototype.setLevelGrid = function (levelGrid) {
this.grid = levelGrid;
};
GameScene.prototype.addObjToGrid = function (obj, pos) {
gridInfo = this.grid[pos[0]][pos[1]];
gridInfo.c.push(obj);
};
GameScene.prototype.deleteObjFromGrid = function (obj) {
with (this) {
var tempArray = [];
pos = obj.gridPos;
gridInfo = grid[pos[0]][pos[1]];
var i = 0;
while (i < gridInfo.c.length) {
if (gridInfo.c[i] != obj) {
tempArray.push(gridInfo.c[i]);
}
i++;
}
gridInfo.c = tempArray;
}
};
GameScene.prototype.update = function () {
with (this) {
if (getTimer() >= (lastFrameTime + frameInterval)) {
drawScene();
lastFrameTime = getTimer();
}
}
};
GameScene.prototype.drawScene = function () {
for (var child in this:children) {
obj3d = this.children[child];
if (((((obj3d.type == "Character") && (obj3d.subType == "Paparazzi")) || (obj3d.type == "Indicator")) || (obj3d.type == "Arrow")) || (obj3d.type == "Obstacle")) {
objChanged = obj3d.update(true);
if (objChanged) {
gridPos = obj3d.gridPos;
gridInfo = _root.theGrid[gridPos[0]][gridPos[1]];
obj3d.zObj.z = gridInfo.camZ;
obj3d.ref_mc._x = gridInfo.sx;
obj3d.ref_mc._y = gridInfo.sy;
scaleFactor = parseInt((this.camera.perspective / gridInfo.camZ) * 70);
obj3d.ref_mc._xscale = scaleFactor;
obj3d.ref_mc._yscale = scaleFactor;
obj3d.dirty = false;
}
} else if (obj3d.type == "Character") {
obj3d.update(true);
var objPos = obj3d.getPos();
if ((this.camera.nearClip < objPos.z) && (objPos.z < this.camera.farClip)) {
screenPos = this.project3D(objPos);
obj3d.ref_mc._x = screenPos.x;
obj3d.ref_mc._y = screenPos.y;
obj3d.ref_mc._visible = true;
obj3d.zObj.z = objPos.z;
scaleFactor = parseInt((this.camera.perspective / objPos.z) * 70);
obj3d.ref_mc._xscale = scaleFactor;
obj3d.ref_mc._yscale = scaleFactor;
} else {
obj3d.ref_mc._visible = false;
}
}
}
this.spriteZmanager.update();
};
Character = function (scene, id, name, gridPos) {
this.type = "Character";
this.superClass = Sprite3dNode;
posX = (gridPos[0] * 20) - 140;
posZ = (gridPos[1] * 20) - 140;
this.superClass(scene, id, name, gridPos, new Math.Vector(posX, 0, posZ));
this.curDir = "";
this.status = "standing";
this.resumeWalkingTime = -1;
this.curFrame = 1;
this.deltaLookup = {N:[0, -1], E:[1, 0], S:[0, 1], W:[-1, 0]};
this.walkSpeed = _root.controller.levelWalkSpeed;
this.revOnRestart = false;
};
Character.prototype = new Sprite3dNode();
Character.prototype.walk = function (dir) {
this.status = "walking";
this.setDir(dir);
};
Character.prototype.stop = function () {
with (this) {
status = "standing";
ref_mc.man.gotoAndStop(3);
resumeWalkingTime = -1;
}
};
Character.prototype.pause = function (t, rev) {
with (this) {
status = "standing";
ref_mc.man.gotoAndStop(3);
resumeWalkingTime = getTimer() + t;
revOnRestart = rev;
}
};
Character.prototype.setDir = function (newDir) {
if (this.curDir != newDir) {
this.curDir = newDir;
this.ref_mc.gotoAndStop(newDir);
}
};
Character.prototype.update = function () {
with (this) {
if (status == "walking") {
vec = new Math.Vector();
worldPos = this.getWorldPosition();
if (curDir == "W") {
if (-140 < worldPos.x) {
vec.x = vec.x - walkSpeed;
} else {
walk("E");
}
} else if (curDir == "E") {
if (worldPos.x < 140) {
vec.x = vec.x + walkSpeed;
} else {
walk("W");
}
} else if (curDir == "N") {
if (-140 < worldPos.z) {
vec.z = vec.z - walkSpeed;
} else {
walk("S");
}
} else if (curDir == "S") {
if (worldPos.z < 140) {
vec.z = vec.z + walkSpeed;
} else {
walk("N");
}
}
curFrame = ((curFrame == 1) ? 2 : 1);
ref_mc.man.gotoAndStop(curFrame);
moveOrigin(vec);
newWorldPos = getWorldPosition();
if (((((newWorldPos.x + 140) / 20) % 1) == 0) && ((((newWorldPos.z + 140) / 20) % 1) == 0)) {
gridPos[0] = Math.floor((newWorldPos.x + 140) / 20);
gridPos[1] = Math.floor((newWorldPos.z + 140) / 20);
handleEnterSquareCentre();
setOrigin(worldPos);
}
this.update3d(true);
} else if (status == "standing") {
handleStanding();
ref_mc.man.gotoAndStop(curFrame);
}
return(this.dirty);
}
};
Character.prototype.update3d = function (applyScene) {
with (this) {
objChanged = false;
if (applyScene || (dirty)) {
r1 = [1, 0, 0, 0];
r2 = [0, -0.895344305839492, 0.445374644541871, 0];
r3 = [0, -0.445374644541871, -0.895344305839492, 0];
cM = scene.camMatrix.matrix;
vX = origin.x;
vY = ((origin.y * cM[1][1]) + (origin.z * cM[2][1])) + cM[3][1];
vZ = ((origin.y * cM[1][2]) + (origin.z * cM[2][2])) + cM[3][2];
viewMatrix = new Math.Transform([r1, r2, r3, [vX, vY, vZ, 1]]);
dirty = false;
objChanged = true;
zObj.z = getPos().z;
}
return(objChanged);
}
};
Character.prototype.handleStanding = function () {
with (this) {
curFrame = 3;
if ((resumeWalkingTime != -1) && (getTimer() >= resumeWalkingTime)) {
if (revOnRestart) {
reverseDirection();
revOnRestart = false;
} else {
status = "walking";
}
}
}
};
Character.prototype.handleEnterSquareCentre = function () {
with (this) {
gridInfo = scene.grid[gridPos[0]][gridPos[1]];
if ((gridPos[0] == 7) && (gridPos[1] == 0)) {
_root.controller.characterEnterFridge(this);
setDir("N");
return(undefined);
}
if (((gridPos[0] == 12) && (gridPos[1] == 4)) && (curDir != "W")) {
walk("E");
} else if (((gridPos[0] == 2) && (gridPos[1] == 4)) && (curDir != "E")) {
walk("W");
}
for (var obj in gridInfo:c) {
curObj = gridInfo.c[obj];
if (curObj.type == "Arrow") {
walk(curObj.dir);
}
}
nextSqDelta = deltaLookup[curDir];
nextSq = [gridPos[0] + nextSqDelta[0], gridPos[1] + nextSqDelta[1]];
gridInfo = scene.grid[nextSq[0]][nextSq[1]];
for (var obj in gridInfo:c) {
curObj = gridInfo.c[obj];
if (curObj.type == "Obstacle") {
reverseDirection();
if (-1 < curObj.name.indexOf("fans")) {
_root.fans_sound.gotoAndPlay(2);
}
} else if (curObj.subType == "Paparazzi") {
curObj.doFlash(gridPos);
_root.paparazzi_sound.gotoAndPlay(2);
pause(1000, true);
return(undefined);
}
}
if (!_root.controller.gridSquareOK(nextSq)) {
reverseDirection();
}
if ((gridPos[0] == 13) && (gridPos[1] == 4)) {
pause(3000, false);
_root.thought_b_r.gotoAndStop(Math.randomInt(2, 5));
} else if ((gridPos[0] == 1) && (gridPos[1] == 4)) {
pause(3000, false);
_root.thought_b_l.gotoAndStop(Math.randomInt(2, 5));
}
}
};
Character.prototype.reverseDirection = function () {
with (this) {
if (curDir == "N") {
walk("S");
} else if (curDir == "S") {
walk("N");
} else if (curDir == "E") {
walk("W");
} else if (curDir == "W") {
walk("E");
}
}
};
Paparazzi = function (scene, id, name, gridPos) {
this.superClass = Character;
this.superClass(scene, id, name, gridPos);
this.subType = "Paparazzi";
this.flashOn = false;
this.takingPicture = false;
this.scene.addObjToGrid(this, this.gridPos);
this.setDir("S");
this.status = "standing";
};
Paparazzi.prototype = new Character();
Paparazzi.prototype.handleEnterSquareCentre = function () {
};
Paparazzi.prototype.doFlash = function (charPos) {
with (this) {
delta = [charPos[0] - gridPos[0], charPos[1] - gridPos[1]];
if (delta[0] == 1) {
setDir("E");
} else if (delta[0] == -1) {
setDir("W");
} else if (delta[1] == 1) {
setDir("S");
} else if (delta[1] == -1) {
setDir("N");
}
takingPicture = true;
ref_mc.cam._visible = true;
flashOffTime = getTimer() + 100;
flashOn = true;
}
};
Paparazzi.prototype.handleStanding = function () {
with (this) {
if (takingPicture) {
if (flashOn && (getTimer() >= flashOffTime)) {
ref_mc.cam._visible = false;
flashOn = false;
takingPicture = false;
}
}
}
};
function createNewArrow(gridPos) {
gridInfo = _root.scene.grid[gridPos[0]][gridPos[1]];
if (_root.controller.isBlockedSquare(gridPos)) {
return(undefined);
}
if (gridInfo.c.length == 0) {
var name = ("sign_post_" + (arrowN++));
var origin = (new Math.Vector(gridInfo.x, 0, gridInfo.z));
newArrow = new _root.Arrow(_root.scene, "arrow_master", name, origin, gridPos);
_root.scene.children[name] = newArrow;
} else if (gridInfo.c[0].type == "Arrow") {
gridInfo.c[0].cycleDir();
}
}
Arrow = function (scene, id, name, origin, gridPos) {
this.type = "Arrow";
this.dir = "N";
this.superClass = Sprite3dNode;
this.superClass(scene, id, name, gridPos, origin, null, null, null);
this.scene.addObjToGrid(this, this.gridPos);
};
Arrow.prototype = new Sprite3dNode();
Arrow.prototype.update = function () {
return(this.dirty);
};
Arrow.prototype.cycleDir = function () {
this.ref_mc.cycleDir();
};
Indicator = function (scene, id, name, origin) {
this.type = "Indicator";
this.superClass = Sprite3dNode;
this.superClass(scene, "indicator_arrow", "indicator_arrow", [7, 7], new Math.Vector(0, 0, 0));
};
Indicator.prototype = new Sprite3dNode();
Indicator.prototype.update = function () {
return(true);
};
arrowN = 1;
Obstacle = function (scene, id, name, gridPos) {
this.type = "Obstacle";
this.superClass = Sprite3dNode;
this.superClass(scene, id, name, gridPos, new Math.Vector(0, 0, 0), null, null, null);
this.scene.addObjToGrid(this, this.gridPos);
};
Obstacle.prototype = new Sprite3dNode();
Obstacle.prototype.update = function () {
return(this.dirty);
};
Instance of Symbol 695 MovieClip "controller" in Frame 9
onClipEvent (mouseMove) {
this.doMouseMove();
}
onClipEvent (enterFrame) {
this.doEnterFrame();
}
Instance of Symbol 698 MovieClip "arrowH" in Frame 9
onClipEvent (mouseMove) {
if ((_name == "arrowHelper") && (1 < _currentframe)) {
_x = _root._xmouse;
_y = _root._ymouse;
updateAfterEvent();
}
}
Frame 13
stop();
Frame 17
if (nextScreen != null) {
gotoAndPlay(nextScreen);
nextScreen = null;
} else {
stop();
}
Frame 24
stop();
Frame 28
if (nextScreen != null) {
gotoAndPlay(nextScreen);
nextScreen = null;
} else {
stop();
}
Frame 32
_root.controller.init();
stop();
Frame 37
if (nextScreen != null) {
gotoAndPlay(nextScreen);
nextScreen = null;
} else {
stop();
}
Frame 45
stop();
Frame 48
if (nextScreen != null) {
gotoAndPlay(nextScreen);
nextScreen = null;
} else {
stop();
}
Frame 53
stop();
Frame 57
if (nextScreen != null) {
gotoAndPlay(nextScreen);
nextScreen = null;
} else {
stop();
}
Frame 64
stop();
Frame 68
if (nextScreen != null) {
gotoAndPlay(nextScreen);
nextScreen = null;
} else {
stop();
}
Symbol 7 MovieClip Frame 1
stop();
_parent.obj_ref.dir = "N";
Symbol 7 MovieClip Frame 2
_parent.obj_ref.dir = "E";
Symbol 7 MovieClip Frame 3
_parent.obj_ref.dir = "S";
Symbol 7 MovieClip Frame 4
_parent.obj_ref.dir = "W";
Symbol 9 Button
on (release) {
cycleDir();
_root.arrowHelper.setDir(arrow_dir._currentframe);
}
on (rollOver) {
_root.arrowHelper.setDir(arrow_dir._currentframe);
}
on (rollOut) {
_root.arrowHelper.clear();
}
Symbol 10 MovieClip [arrow_master] Frame 1
function cycleDir() {
if (arrow_dir._currentframe == 4) {
arrow_dir.gotoAndStop(1);
} else {
arrow_dir.nextFrame();
}
}
Symbol 33 MovieClip [character_1] Frame 1
stop();
Symbol 50 MovieClip [character_2] Frame 1
stop();
Symbol 66 MovieClip [character_3] Frame 1
stop();
Symbol 82 MovieClip [character_4] Frame 1
stop();
Symbol 98 MovieClip [character_5] Frame 1
stop();
Symbol 114 MovieClip [character_6] Frame 1
stop();
Symbol 130 MovieClip [character_7] Frame 1
stop();
Symbol 146 MovieClip [character_8] Frame 1
stop();
Symbol 163 MovieClip [character_9] Frame 1
stop();
Symbol 179 MovieClip [character_10] Frame 1
stop();
Symbol 195 MovieClip [character_11] Frame 1
stop();
Symbol 197 MovieClip Frame 1
this._visible = false;
Symbol 218 MovieClip [character_paparazzi] Frame 1
stop();
Symbol 258 Button
on (release) {
_root.controller.challengeFriend();
}
Symbol 261 MovieClip Frame 1
function showLoading() {
dynamic_highscores._visible = false;
loading_text._visible = true;
challenge_friend_button._visible = false;
}
function generateColumnsFromXML(xml) {
dynamic_highscores._visible = true;
loading_text._visible = false;
trace(_root.controller.game_id);
if ((_root.controller.game_id == null) || (_root.controller.game_id == "")) {
challenge_friend_button._visible = false;
} else {
challenge_friend_button._visible = true;
}
this.xml = xml;
dynamic_highscores.rank_col = "";
dynamic_highscores.name_col = "";
dynamic_highscores.score_col = "";
var i = 0;
while (i < xml.entry.length) {
cur_entry = xml.entry[i];
if (cur_entry.sel == "1") {
dynamic_highscores.rank_col = dynamic_highscores.rank_col + (("<font color=\"#ffff00\">" + cur_entry.rank) + "</font><br>");
dynamic_highscores.name_col = dynamic_highscores.name_col + (("<font color=\"#ffff00\">" + cur_entry.name) + "</font><br>");
dynamic_highscores.score_col = dynamic_highscores.score_col + (("<font color=\"#ffff00\">" + cur_entry.score) + "</font><br>");
} else {
dynamic_highscores.rank_col = dynamic_highscores.rank_col + (cur_entry.rank + "<br>");
dynamic_highscores.name_col = dynamic_highscores.name_col + (cur_entry.name + "<br>");
dynamic_highscores.score_col = dynamic_highscores.score_col + (cur_entry.score + "<br>");
}
i++;
}
dynamic_highscores.rank_col = ("<p align=\"center\"><b>" + dynamic_highscores.rank_col) + "</b></p>";
dynamic_highscores.name_col = ("<p align=\"left\"><b>" + dynamic_highscores.name_col) + "</b></p>";
dynamic_highscores.score_col = ("<p align=\"center\"><b>" + dynamic_highscores.score_col) + "</b></p>";
}
showLoading();
Symbol 276 MovieClip Frame 1
function playAnim() {
newAnim = true;
gotoAndPlay (2);
}
if (!newAnim) {
stop();
}
Symbol 276 MovieClip Frame 2
_root.fridge_sound.gotoAndPlay(2);
newAnim = false;
Symbol 276 MovieClip Frame 7
_root.controller.characterDisappear();
Symbol 276 MovieClip Frame 10
_root.controller.fridgeDoorClosed();
Symbol 285 Button
on (rollOver) {
_root.controller.setGridRO([7, 0]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 288 Button
on (rollOver) {
_root.controller.setGridRO([6, 0]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 291 Button
on (rollOver) {
_root.controller.setGridRO([5, 0]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 294 Button
on (rollOver) {
_root.controller.setGridRO([4, 0]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 297 Button
on (rollOver) {
_root.controller.setGridRO([3, 0]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 300 Button
on (rollOver) {
_root.controller.setGridRO([2, 0]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 302 Button
on (rollOver) {
_root.controller.setGridRO([2, 1]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 305 Button
on (rollOver) {
_root.controller.setGridRO([3, 1]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 307 Button
on (rollOver) {
_root.controller.setGridRO([4, 1]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 309 Button
on (rollOver) {
_root.controller.setGridRO([5, 1]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 311 Button
on (rollOver) {
_root.controller.setGridRO([6, 1]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 313 Button
on (rollOver) {
_root.controller.setGridRO([7, 1]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 314 Button
on (rollOver) {
_root.controller.setGridRO([7, 2]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 315 Button
on (rollOver) {
_root.controller.setGridRO([6, 2]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 316 Button
on (rollOver) {
_root.controller.setGridRO([5, 2]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 317 Button
on (rollOver) {
_root.controller.setGridRO([4, 2]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 318 Button
on (rollOver) {
_root.controller.setGridRO([3, 2]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 320 Button
on (rollOver) {
_root.controller.setGridRO([2, 2]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 322 Button
on (rollOver) {
_root.controller.setGridRO([2, 3]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 323 Button
on (rollOver) {
_root.controller.setGridRO([3, 3]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 324 Button
on (rollOver) {
_root.controller.setGridRO([4, 3]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 325 Button
on (rollOver) {
_root.controller.setGridRO([5, 3]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 326 Button
on (rollOver) {
_root.controller.setGridRO([6, 3]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 327 Button
on (rollOver) {
_root.controller.setGridRO([7, 3]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 328 Button
on (rollOver) {
_root.controller.setGridRO([7, 4]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 329 Button
on (rollOver) {
_root.controller.setGridRO([6, 4]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 330 Button
on (rollOver) {
_root.controller.setGridRO([5, 4]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 331 Button
on (rollOver) {
_root.controller.setGridRO([4, 4]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 332 Button
on (rollOver) {
_root.controller.setGridRO([3, 4]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 334 Button
on (rollOver) {
_root.controller.setGridRO([2, 4]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 336 Button
on (rollOver) {
_root.controller.setGridRO([2, 5]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 338 Button
on (rollOver) {
_root.controller.setGridRO([3, 5]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 340 Button
on (rollOver) {
_root.controller.setGridRO([4, 5]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 342 Button
on (rollOver) {
_root.controller.setGridRO([5, 5]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 344 Button
on (rollOver) {
_root.controller.setGridRO([6, 5]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 346 Button
on (rollOver) {
_root.controller.setGridRO([7, 5]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 347 Button
on (rollOver) {
_root.controller.setGridRO([7, 6]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 348 Button
on (rollOver) {
_root.controller.setGridRO([6, 6]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 349 Button
on (rollOver) {
_root.controller.setGridRO([5, 6]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 350 Button
on (rollOver) {
_root.controller.setGridRO([4, 6]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 352 Button
on (rollOver) {
_root.controller.setGridRO([3, 6]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 353 Button
on (rollOver) {
_root.controller.setGridRO([2, 6]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 354 Button
on (rollOver) {
_root.controller.setGridRO([2, 7]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 355 Button
on (rollOver) {
_root.controller.setGridRO([3, 7]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 356 Button
on (rollOver) {
_root.controller.setGridRO([4, 7]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 357 Button
on (rollOver) {
_root.controller.setGridRO([5, 7]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 358 Button
on (rollOver) {
_root.controller.setGridRO([6, 7]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 359 Button
on (rollOver) {
_root.controller.setGridRO([7, 7]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 360 Button
on (rollOver) {
_root.controller.setGridRO([7, 8]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 361 Button
on (rollOver) {
_root.controller.setGridRO([6, 8]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 362 Button
on (rollOver) {
_root.controller.setGridRO([5, 8]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 363 Button
on (rollOver) {
_root.controller.setGridRO([4, 8]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 364 Button
on (rollOver) {
_root.controller.setGridRO([3, 8]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 367 Button
on (rollOver) {
_root.controller.setGridRO([2, 8]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 370 Button
on (rollOver) {
_root.controller.setGridRO([1, 8]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 373 Button
on (rollOver) {
_root.controller.setGridRO([0, 8]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 374 Button
on (rollOver) {
_root.controller.setGridRO([0, 9]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 375 Button
on (rollOver) {
_root.controller.setGridRO([1, 9]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 376 Button
on (rollOver) {
_root.controller.setGridRO([2, 9]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 377 Button
on (rollOver) {
_root.controller.setGridRO([3, 9]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 378 Button
on (rollOver) {
_root.controller.setGridRO([4, 9]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 379 Button
on (rollOver) {
_root.controller.setGridRO([5, 9]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 380 Button
on (rollOver) {
_root.controller.setGridRO([6, 9]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 381 Button
on (rollOver) {
_root.controller.setGridRO([7, 9]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 383 Button
on (rollOver) {
_root.controller.setGridRO([7, 10]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 385 Button
on (rollOver) {
_root.controller.setGridRO([6, 10]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 387 Button
on (rollOver) {
_root.controller.setGridRO([5, 10]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 389 Button
on (rollOver) {
_root.controller.setGridRO([4, 10]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 391 Button
on (rollOver) {
_root.controller.setGridRO([3, 10]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 393 Button
on (rollOver) {
_root.controller.setGridRO([2, 10]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 396 Button
on (rollOver) {
_root.controller.setGridRO([1, 10]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 399 Button
on (rollOver) {
_root.controller.setGridRO([0, 10]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 402 Button
on (rollOver) {
_root.controller.setGridRO([0, 11]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 405 Button
on (rollOver) {
_root.controller.setGridRO([1, 11]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 407 Button
on (rollOver) {
_root.controller.setGridRO([2, 11]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 409 Button
on (rollOver) {
_root.controller.setGridRO([3, 11]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 411 Button
on (rollOver) {
_root.controller.setGridRO([4, 11]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 413 Button
on (rollOver) {
_root.controller.setGridRO([5, 11]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 415 Button
on (rollOver) {
_root.controller.setGridRO([6, 11]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 417 Button
on (rollOver) {
_root.controller.setGridRO([7, 11]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 419 Button
on (rollOver) {
_root.controller.setGridRO([7, 12]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 421 Button
on (rollOver) {
_root.controller.setGridRO([6, 12]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 423 Button
on (rollOver) {
_root.controller.setGridRO([5, 12]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 425 Button
on (rollOver) {
_root.controller.setGridRO([4, 12]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 427 Button
on (rollOver) {
_root.controller.setGridRO([3, 12]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 429 Button
on (rollOver) {
_root.controller.setGridRO([2, 12]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 431 Button
on (rollOver) {
_root.controller.setGridRO([1, 12]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 433 Button
on (rollOver) {
_root.controller.setGridRO([0, 12]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 435 Button
on (rollOver) {
_root.controller.setGridRO([0, 13]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 437 Button
on (rollOver) {
_root.controller.setGridRO([1, 13]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 439 Button
on (rollOver) {
_root.controller.setGridRO([2, 13]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 441 Button
on (rollOver) {
_root.controller.setGridRO([3, 13]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 443 Button
on (rollOver) {
_root.controller.setGridRO([4, 13]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 445 Button
on (rollOver) {
_root.controller.setGridRO([5, 13]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 447 Button
on (rollOver) {
_root.controller.setGridRO([6, 13]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 449 Button
on (rollOver) {
_root.controller.setGridRO([7, 13]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 451 Button
on (rollOver) {
_root.controller.setGridRO([7, 14]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 453 Button
on (rollOver) {
_root.controller.setGridRO([6, 14]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 455 Button
on (rollOver) {
_root.controller.setGridRO([5, 14]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 457 Button
on (rollOver) {
_root.controller.setGridRO([4, 14]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 459 Button
on (rollOver) {
_root.controller.setGridRO([3, 14]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 461 Button
on (rollOver) {
_root.controller.setGridRO([2, 14]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 463 Button
on (rollOver) {
_root.controller.setGridRO([1, 14]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 466 Button
on (rollOver) {
_root.controller.setGridRO([0, 14]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 467 Button
on (rollOver) {
_root.controller.setGridRO([8, 0]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 468 Button
on (rollOver) {
_root.controller.setGridRO([9, 0]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 469 Button
on (rollOver) {
_root.controller.setGridRO([10, 0]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 470 Button
on (rollOver) {
_root.controller.setGridRO([11, 0]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 471 Button
on (rollOver) {
_root.controller.setGridRO([12, 0]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 472 Button
on (rollOver) {
_root.controller.setGridRO([12, 1]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 473 Button
on (rollOver) {
_root.controller.setGridRO([11, 1]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 474 Button
on (rollOver) {
_root.controller.setGridRO([10, 1]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 475 Button
on (rollOver) {
_root.controller.setGridRO([9, 1]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 476 Button
on (rollOver) {
_root.controller.setGridRO([8, 1]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 477 Button
on (rollOver) {
_root.controller.setGridRO([8, 2]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 478 Button
on (rollOver) {
_root.controller.setGridRO([9, 2]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 479 Button
on (rollOver) {
_root.controller.setGridRO([10, 2]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 480 Button
on (rollOver) {
_root.controller.setGridRO([11, 2]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 481 Button
on (rollOver) {
_root.controller.setGridRO([12, 2]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 482 Button
on (rollOver) {
_root.controller.setGridRO([12, 3]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 483 Button
on (rollOver) {
_root.controller.setGridRO([11, 3]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 484 Button
on (rollOver) {
_root.controller.setGridRO([10, 3]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 485 Button
on (rollOver) {
_root.controller.setGridRO([9, 3]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 486 Button
on (rollOver) {
_root.controller.setGridRO([8, 3]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 487 Button
on (rollOver) {
_root.controller.setGridRO([8, 4]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 488 Button
on (rollOver) {
_root.controller.setGridRO([9, 4]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 489 Button
on (rollOver) {
_root.controller.setGridRO([10, 4]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 490 Button
on (rollOver) {
_root.controller.setGridRO([11, 4]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 491 Button
on (rollOver) {
_root.controller.setGridRO([12, 4]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 492 Button
on (rollOver) {
_root.controller.setGridRO([12, 5]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 493 Button
on (rollOver) {
_root.controller.setGridRO([11, 5]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 494 Button
on (rollOver) {
_root.controller.setGridRO([10, 5]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 495 Button
on (rollOver) {
_root.controller.setGridRO([9, 5]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 496 Button
on (rollOver) {
_root.controller.setGridRO([8, 5]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 497 Button
on (rollOver) {
_root.controller.setGridRO([8, 6]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 498 Button
on (rollOver) {
_root.controller.setGridRO([9, 6]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 499 Button
on (rollOver) {
_root.controller.setGridRO([10, 6]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 500 Button
on (rollOver) {
_root.controller.setGridRO([11, 6]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 501 Button
on (rollOver) {
_root.controller.setGridRO([12, 6]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 502 Button
on (rollOver) {
_root.controller.setGridRO([12, 7]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 503 Button
on (rollOver) {
_root.controller.setGridRO([11, 7]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 504 Button
on (rollOver) {
_root.controller.setGridRO([10, 7]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 505 Button
on (rollOver) {
_root.controller.setGridRO([9, 7]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 506 Button
on (rollOver) {
_root.controller.setGridRO([8, 7]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 507 Button
on (rollOver) {
_root.controller.setGridRO([8, 8]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 508 Button
on (rollOver) {
_root.controller.setGridRO([9, 8]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 509 Button
on (rollOver) {
_root.controller.setGridRO([10, 8]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 510 Button
on (rollOver) {
_root.controller.setGridRO([11, 8]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 511 Button
on (rollOver) {
_root.controller.setGridRO([12, 8]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 512 Button
on (rollOver) {
_root.controller.setGridRO([13, 8]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 513 Button
on (rollOver) {
_root.controller.setGridRO([14, 8]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 514 Button
on (rollOver) {
_root.controller.setGridRO([14, 9]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 515 Button
on (rollOver) {
_root.controller.setGridRO([13, 9]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 516 Button
on (rollOver) {
_root.controller.setGridRO([12, 9]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 517 Button
on (rollOver) {
_root.controller.setGridRO([11, 9]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 518 Button
on (rollOver) {
_root.controller.setGridRO([10, 9]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 519 Button
on (rollOver) {
_root.controller.setGridRO([9, 9]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 520 Button
on (rollOver) {
_root.controller.setGridRO([8, 9]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 521 Button
on (rollOver) {
_root.controller.setGridRO([8, 10]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 522 Button
on (rollOver) {
_root.controller.setGridRO([9, 10]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 523 Button
on (rollOver) {
_root.controller.setGridRO([10, 10]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 524 Button
on (rollOver) {
_root.controller.setGridRO([11, 10]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 525 Button
on (rollOver) {
_root.controller.setGridRO([12, 10]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 526 Button
on (rollOver) {
_root.controller.setGridRO([13, 10]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 527 Button
on (rollOver) {
_root.controller.setGridRO([14, 10]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 528 Button
on (rollOver) {
_root.controller.setGridRO([14, 11]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 529 Button
on (rollOver) {
_root.controller.setGridRO([13, 11]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 530 Button
on (rollOver) {
_root.controller.setGridRO([12, 11]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 531 Button
on (rollOver) {
_root.controller.setGridRO([11, 11]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 532 Button
on (rollOver) {
_root.controller.setGridRO([10, 11]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 533 Button
on (rollOver) {
_root.controller.setGridRO([9, 11]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 534 Button
on (rollOver) {
_root.controller.setGridRO([8, 11]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 535 Button
on (rollOver) {
_root.controller.setGridRO([8, 12]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 536 Button
on (rollOver) {
_root.controller.setGridRO([9, 12]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 537 Button
on (rollOver) {
_root.controller.setGridRO([10, 12]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 538 Button
on (rollOver) {
_root.controller.setGridRO([11, 12]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 539 Button
on (rollOver) {
_root.controller.setGridRO([12, 12]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 540 Button
on (rollOver) {
_root.controller.setGridRO([13, 12]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 541 Button
on (rollOver) {
_root.controller.setGridRO([14, 12]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 542 Button
on (rollOver) {
_root.controller.setGridRO([14, 13]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 543 Button
on (rollOver) {
_root.controller.setGridRO([13, 13]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 544 Button
on (rollOver) {
_root.controller.setGridRO([12, 13]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 545 Button
on (rollOver) {
_root.controller.setGridRO([11, 13]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 546 Button
on (rollOver) {
_root.controller.setGridRO([10, 13]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 547 Button
on (rollOver) {
_root.controller.setGridRO([9, 13]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 548 Button
on (rollOver) {
_root.controller.setGridRO([8, 13]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 549 Button
on (rollOver) {
_root.controller.setGridRO([8, 14]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 550 Button
on (rollOver) {
_root.controller.setGridRO([9, 14]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 551 Button
on (rollOver) {
_root.controller.setGridRO([10, 14]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 552 Button
on (rollOver) {
_root.controller.setGridRO([11, 14]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 553 Button
on (rollOver) {
_root.controller.setGridRO([12, 14]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 554 Button
on (rollOver) {
_root.controller.setGridRO([13, 14]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 555 Button
on (rollOver) {
_root.controller.setGridRO([14, 14]);
}
on (press) {
_root.createNewArrow(_root.controller.curGridPos);
}
Symbol 556 MovieClip Frame 1
this._visible = false;
Symbol 574 MovieClip Frame 1
function addScore(score) {
realScore = realScore + score;
}
function doEnterFrame() {
if (displayScore < realScore) {
displayScore = displayScore + 50;
if (realScore < displayScore) {
displayScore = realScore;
}
}
}
function getScore() {
return(realScore);
}
function resetScore() {
displayScore = 0;
realScore = 0;
}
if (!loaded) {
loaded = true;
displayScore = 0;
realScore = 0;
}
Symbol 578 MovieClip Frame 1
if (!loaded) {
loaded = true;
timerText = "00:00";
active = false;
}
function doEnterFrame() {
if (active) {
timeElapsed = getTimer() - startTime;
timeLeft = countDownFromTime - timeElapsed;
if (timeLeft < 1) {
calcTimeFromMS(0);
_root.controller.levelTimeEnded();
stopTimer();
} else {
calcTimeFromMS(timeLeft);
}
displayTime();
}
}
function calcTimeFromMS(msTime) {
ms = msTime % 1000;
secs = Math.floor(msTime / 1000) % 60;
mins = Math.floor(msTime / 60000) % 60;
}
function displayTime() {
timerText = (padzeros(mins, 2) + ":") + padzeros(secs, 2);
}
function padzeros(str, n) {
str = String(str);
while (str.length < n) {
str = "0" + str;
}
return(str);
}
function setTimer(t) {
countDownFromTime = t;
calcTimeFromMS(countDownFromTime);
displayTime();
}
function startTimer() {
startTime = getTimer();
active = true;
}
function stopTimer() {
active = false;
}
function getTime() {
return([mins, secs]);
}
Symbol 584 Button
on (release) {
_root.controller.playGame();
}
Symbol 588 Button
on (release) {
_root.controller.viewHighscores();
}
Symbol 593 Button
on (release) {
_root.controller.goInstructions();
}
Symbol 597 Button
on (release) {
_root.controller.goHome();
}
Symbol 601 Button
on (release) {
getURL ("javascript:window.close()");
}
Symbol 605 Button
on (release) {
gotoAndStop (2);
_root.controller.turnSoundOff();
}
Symbol 607 Button
on (release) {
gotoAndStop (1);
_root.controller.turnSoundOn();
}
Symbol 608 MovieClip Frame 1
stop();
Instance of Symbol 574 MovieClip "score_manager" in Symbol 614 MovieClip Frame 1
onClipEvent (enterFrame) {
this.doEnterFrame();
}
Instance of Symbol 578 MovieClip "timer" in Symbol 614 MovieClip Frame 1
onClipEvent (enterFrame) {
this.doEnterFrame();
}
Symbol 672 MovieClip Frame 1
stop();
Symbol 674 MovieClip Frame 1
stop();
Symbol 676 MovieClip Frame 1
stop();
Symbol 678 MovieClip Frame 1
stop();
Symbol 680 MovieClip Frame 1
stop();
Symbol 680 MovieClip Frame 36
gotoAndPlay (2);
Symbol 683 MovieClip Frame 34
_parent.gotoAndStop(1);
Symbol 685 MovieClip Frame 34
_parent.gotoAndStop(1);
Symbol 687 MovieClip Frame 34
_parent.gotoAndStop(1);
Symbol 689 MovieClip Frame 34
_parent.gotoAndStop(1);
Symbol 694 MovieClip Frame 1
function checkData() {
if (data_loaded == "1") {
_parent.dataLoaded();
}
}
function resetData() {
data_loaded = null;
highscore_XML = null;
game_id = null;
challengeID = null;
}
Symbol 695 MovieClip Frame 1
level1_grid = [[1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1], [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1], [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1], [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1], [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1], [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1], [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1], [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]];
level1 = {time:180000, speed:4, celebs_req:1, ground_grid:level1_grid, chars:[["1", 7, 12, "S"]], obstacles:[["fans_1", 4, 0], ["fans_2", 10, 0]]};
level2_grid = [[1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1], [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1], [1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1], [1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1], [1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1], [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]];
level2 = {time:120000, speed:4, celebs_req:2, ground_grid:level2_grid, chars:[["3", 5, 12, "W"], ["4", 10, 13, "E"]], paparazzi:[[4, 0], [5, 1]], obstacles:[["fans_1", 10, 11], ["fans_2", 11, 10]]};
level3_grid = [[1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1], [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1], [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1], [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1], [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1], [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1], [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1], [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1], [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], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]];
level3 = {time:60000, speed:4, celebs_req:1, ground_grid:level3_grid, chars:[["9", 2, 14, "E"]], paparazzi:[[10, 6], [7, 3]], obstacles:[["cone", 9, 12], ["cone", 11, 12], ["cone", 9, 9], ["cone", 11, 9]]};
level4_grid = [[1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1], [1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1], [1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1], [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1], [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1], [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1], [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1], [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1], [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, 1, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]];
level4 = {time:60000, speed:4, celebs_req:3, ground_grid:level4_grid, chars:[["5", 2, 14, "N"], ["6", 6, 14, "E"], ["7", 12, 3, "S"]], obstacles:[["cone", 9, 8], ["cone", 7, 3], ["cone", 7, 11]]};
level5_grid = [[1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1], [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1], [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1], [1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1], [1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1], [1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1], [1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1], [1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1], [0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0], [0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]];
level5 = {time:60000, speed:4, celebs_req:3, ground_grid:level5_grid, chars:[["8", 7, 7, "S"], ["9", 7, 12, "W"], ["10", 12, 3, "S"]], paparazzi:[[12, 1], [11, 2]]};
level6_grid = [[1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1], [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1], [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1], [1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1], [1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1], [1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1], [1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1], [1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1], [0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0], [0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0], [0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0], [0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 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]];
level6 = {time:30000, speed:5, celebs_req:2, ground_grid:level6_grid, chars:[["11", 12, 14, "W"], ["1", 6, 13, "E"]], paparazzi:[[3, 7], [2, 7]], obstacles:[["fans_1", 11, 7], ["fans_1", 5, 13]]};
level7_grid = [[1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1], [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1], [1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1], [1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1], [1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1], [1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1], [1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1], [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1], [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, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0], [0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0], [0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0], [0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]];
level7 = {time:30000, speed:5, celebs_req:4, ground_grid:level7_grid, chars:[["1", 14, 0, "W"], ["3", 14, 7, "W"], ["5", 14, 14, "W"], ["7", 4, 4, "S"]], obstacles:[["fans_1", 3, 7], ["fans_2", 11, 0]]};
this.levelData = [level1, level2, level3, level4, level5, level6, level7];
function goHome() {
stopGame();
_root.nextScreen = "home";
_root.play();
}
function goInstructions() {
stopGame();
_root.nextScreen = "instructions";
_root.play();
}
function playGame() {
stopGame();
_root.nextScreen = "play_game";
_root.play();
}
function viewHighScores() {
form_submitter.loadVariables((baseURL + "/get_highscores.php?game_id=") + game_id, "POST");
form_submitter.data_loaded = 0;
checkData = true;
stopGame();
_root.highscore_display.showLoading();
_root.nextScreen = "highscore_display";
_root.play();
}
function goHighScoreEntry() {
_root.gotoAndPlay("highScoreEntry");
}
function quitGame() {
stopGame();
}
function challengeFriend() {
_root.nextScreen = "challenge_friend";
_root.play();
}
function goGameOver() {
_root.gotoAndPlay("home");
}
function updateCelebCount() {
_root.interface.celebInfo = (charactersInFridge + "/") + levelInfo.celebs_req;
}
function setTimer() {
_root.interface.timer.setTimer(levelInfo.time);
}
function startTimer() {
_root.interface.timer.startTimer();
}
function stopTimer() {
_root.interface.timer.stopTimer();
}
function setLevel() {
_root.interface.levelNum = String(currentLevel);
}
function resetScore() {
_root.interface.score_manager.resetScore();
}
function calcScore() {
scoreMultiplier = [0.25, 0.5, 1, 2, 5, 20, 50];
timeData = _root.interface.timer.getTime();
secondsTotal = (timeData[0] * 60) + timeData[1];
scoreToAdd = parseInt((secondsTotal * 6) * scoreMultiplier[currentLevel - 1]);
_root.interface.score_manager.addScore(scoreToAdd);
}
function submitHighScore(first_name, last_name, email, score, optin_mtv, terms_cond) {
optin_mtv = ((optin_mtv == "on") ? "yes" : "no");
if (((first_name == null) || (last_name == null)) || (email == null)) {
_root.popup_manager.showPopup("fill_all_fields");
return(undefined);
}
if (!isValidEmail(email)) {
_root.popup_manager.showPopup("enter_valid_email");
return(undefined);
}
if (terms_cond == "off") {
_root.popup_manager.showPopup("read_terms");
return(undefined);
}
mc = form_submitter;
mc.first_name = first_name;
mc.last_name = last_name;
mc.email = email;
mc.score = score;
mc.optin_mtv = optin_mtv;
if (_root.challengeID != "") {
mc.challengeID = _root.challengeID;
}
mc.loadVariables(baseURL + "/submit_score.php", "POST");
checkData = true;
form_submitter.resetData();
_root.highscore_display.showLoading();
_root.nextScreen = "highscore_display";
_root.play();
}
function isValidEmail(email) {
return(((email != null) && (email.indexOf("@") != -1)) && (email.indexOf(".") != -1));
}
function submitChallengeFriend(email) {
if (!isValidEmail(email)) {
_root.popup_manager.showPopup("enter_valid_email");
return(undefined);
}
mc = form_submitter;
mc.game_id = game_id;
mc.email = email;
mc.loadVariables(baseURL + "/challenge_friend.php", "POST");
_root.nextScreen = "home";
_root.play();
}
function dataLoaded() {
checkData = false;
highscoreXML = new XML();
highscoreXML.parseXML(form_submitter.highscore_xml);
if (form_submitter.game_id != null) {
game_id = form_submitter.game_id;
}
highscoreDOM = highscoreXML.convertToDOM(highscoreXML.firstChild);
_root.highscore_display.generateColumnsFromXML(highscoreDOM);
}
function gridSquareOK(sq) {
val = levelInfo.ground_grid[sq[1]][sq[0]];
return(val == 0);
}
function goNextLevel() {
_root.arrowHelper.clear();
currentLevel++;
_root.ground_obstacles.gotoAndStop(currentLevel);
charactersInFridge = 0;
levelInfo = levelData[currentLevel - 1];
levelWalkSpeed = levelInfo.speed;
setTimer();
setLevel();
updateCelebCount();
_root.popup_manager.showPopup(("level" + currentLevel) + "_intro");
}
function startLevel() {
if (soundOn) {
_root.bg_music.gotoAndPlay(2);
}
_root.scene.setLevelGrid(_root.theGrid);
var i = 0;
while (i < levelInfo.paparazzi.length) {
name = "paparazzi_" + i;
_root.scene.children[name] = new _root.Paparazzi(_root.scene, "character_paparazzi", name, levelInfo.paparazzi[i]);
i++;
}
var i = 0;
while (i < levelInfo.obstacles.length) {
ob = levelInfo.obstacles[i];
name = (("obstacle_" + i) + "_") + ob[0];
_root.scene.children[name] = new _root.Obstacle(_root.scene, ob[0], name, [ob[1], ob[2]]);
i++;
}
var i = 0;
while (i < levelInfo.chars.length) {
addCharacter(levelInfo.chars[i]);
i++;
}
addNextCharacterTime = getTimer() + 200;
addPaparazziTime = getTimer() + 1500;
startTimer();
charactersToAdd = true;
levelRunning = true;
showGridButtons();
}
function levelTimeEnded() {
if (currentLevel == 1) {
hideStuff();
_root.popup_manager.showPopup("game_over");
} else {
_root.popup_manager.showPopup("game_over_with_score");
hideStuff();
calcScore();
}
levelRunning = false;
}
function hideGridButtons() {
_root.background.grid_buttons._visible = false;
}
function showGridButtons() {
_root.background.grid_buttons._visible = true;
}
function hideStuff() {
_root.arrowHelper.clear();
for (child in /scene:children) {
curObj = _root.scene.children[child];
if (((curObj.type == "Arrow") || (curObj.type == "Character")) || (curObj.type == "Obstacle")) {
curObj.deleteNode();
}
}
hideGridButtons();
}
function levelDone() {
_root.popup_manager.showPopup(("level" + currentLevel) + "_done");
hideStuff();
calcScore();
}
function gameDone() {
_root.popup_manager.showPopup("game_done");
hideStuff();
calcScore();
}
function stopGame() {
_root.bg_music.gotoAndStop(1);
levelRunning = false;
stopTimer();
resetScore();
hideGridButtons();
_root.popup_manager.clearPopup();
for (child in /scene:children) {
curObj = _root.scene.children[child];
if ((((curObj.type == "Arrow") || (curObj.type == "Character")) || (curObj.type == "Indicator")) || (curObj.type == "Obstacle")) {
curObj.deleteNode();
}
}
}
function turnSoundOn() {
soundOn = true;
if (levelRunning) {
_root.bg_music.gotoAndPlay(2);
}
}
function turnSoundOff() {
soundOn = false;
_root.bg_music.gotoAndStop(1);
}
function addCharacter(charData) {
startGridPos = [charData[1], charData[2]];
var id = ("character_" + charData[0]);
var name = ("character" + (characterN++));
curCharacter = new _root.Character(_root.scene, id, name, startGridPos);
curCharacter.walk(charData[3]);
_root.scene.children[name] = curCharacter;
}
function characterEnterFridge(char) {
if (fridgeEnterList.length == 0) {
_root.background.fridge.playAnim();
}
char.stop();
fridgeEnterList.push(char);
}
function characterDisappear() {
var i = 0;
while (i < fridgeEnterList.length) {
charactersInFridge++;
updateCelebCount();
_root.scene.children[fridgeEnterList[i].name].deleteNode();
i++;
}
fridgeEnterList = [];
}
function fridgeDoorClosed() {
if (charactersInFridge >= levelInfo.celebs_req) {
stopTimer();
if (currentLevel >= levelData.length) {
gameDone();
} else {
levelDone();
}
} else {
addNextCharacterTime = getTimer() + 200;
charactersToAdd = true;
}
}
function init() {
_root.arrowH.duplicateMovieClip("arrowHelper", 2000);
characterN = 0;
resetScore();
this.perspective = 900;
_root.camera = new _root.Camera3dNode(this.perspective, new Math.Vector(0, -2, 590), null, null, new Math.Vector(2.68, 0, 0));
_root.scene = new _root.GameScene(_root.camera, new Math.Vector(300, 275, 0), _root, null, null, null);
this.levelRunning = false;
this.checkData = false;
this.charactersToAdd = false;
this.currentLevel = 0;
this.fridgeEnterList = [];
this.goNextLevel();
loaded = true;
}
if ((_root.baseURL == "") || (_root.baseURL == null)) {
this.baseURL = "http://10.0.1.70/fridge";
} else {
this.baseURL = _root.baseURL;
}
game_id = "";
soundOn = true;
function doMouseMove() {
}
function setGridRO(newGridPos) {
if (levelRunning) {
curGridPos = newGridPos;
}
}
function isBlockedSquare(gridPos) {
return(((gridPos[0] < 2) && (gridPos[1] < 8)) || ((12 < gridPos[0]) && (gridPos[1] < 8)));
}
function doEnterFrame() {
if (levelRunning) {
var now = getTimer();
_root.scene.update();
}
if (checkData) {
form_submitter.checkData();
}
}
function genGrid() {
_root.theGrid = [];
g = _root.theGrid;
char = _root.scene.children.indicator;
str = "";
var x = -140;
while (140 >= x) {
col = [];
var z = -140;
while (140 >= z) {
char.setOrigin(new Math.Vector(x, 0, z));
char.update3d(true);
charPos = char.getPos();
scrPos = _root.scene.project3d(charPos);
col.push(((((((((("{c:[],x:" + x) + ",z:") + z) + ",camZ:") + parseInt(charPos.z)) + ",sx:") + parseInt(scrPos.x)) + ",sy:") + parseInt(scrPos.y)) + "}");
z = z + 20;
}
colStr = ("[" + col.join(",")) + "]";
g.push(colStr);
x = x + 20;
}
gridStr = ("[" + g.join(",")) + "]";
trace(gridStr);
}
function gridPosFromMousePos() {
g = _root.theGrid;
col = 0;
row = 0;
xm = _root._xmouse;
ym = _root._ymouse;
var row = 1;
while (row < (g[col].length - 1)) {
curScrY = g[col][row].sy;
if (curScrY < ym) {
} else {
prevScrY = g[col][row - 1].sy;
if ((curScrY - ym) < (ym - prevScrY)) {
break;
}
row--;
break;
}
row++;
}
var col = 0;
while (col < (g.length - 1)) {
curScrX = g[col][row].sx;
if (curScrX < xm) {
} else {
prevScrX = g[col - 1][row].sx;
if ((curScrX - xm) < (xm - prevScrX)) {
break;
}
col--;
break;
}
col++;
}
if (col < 0) {
col = 0;
}
if (row < 0) {
row = 0;
}
return([col, row]);
}
Symbol 698 MovieClip Frame 1
function setDir(n) {
Mouse.hide();
_x = _root._xmouse;
_y = _root._ymouse;
gotoAndStop(n + 1);
}
function clear() {
_x = -20;
Mouse.show();
gotoAndStop (1);
}
stop();
Symbol 708 Button
on (release) {
_parent._parent.clearPopup();
}
Symbol 713 Button
on (release) {
_parent._parent.message = "goHighScoreEntry";
_parent._parent.play();
}
Symbol 723 Button
on (release) {
_parent._parent.message = "goGameOver";
_parent._parent.play();
}
Symbol 730 Button
on (release) {
_parent._parent.message = "goNextLevel";
_parent._parent.play();
}
Symbol 738 Button
on (release) {
_root.controller.startLevel();
_parent._parent.play();
}
Symbol 768 Button
on (release) {
_root.controller.startLevel();
_parent._parent.play();
}
Symbol 770 MovieClip Frame 1
stop();
Symbol 771 MovieClip Frame 1
function showPopup(name) {
message = "";
popup[name]._visible = true;
gotoAndPlay (2);
}
function clearPopup() {
gotoAndPlay (5);
}
if (!loaded) {
loaded = true;
}
for (thing in popup) {
if (typeof(popup[thing]) == "movieclip") {
popup[thing]._visible = false;
}
}
if (message == "goNextLevel") {
_root.controller.goNextLevel();
} else if (message == "goHighScoreEntry") {
_root.controller.goHighScoreEntry();
} else if (message == "goGameOver") {
_root.controller.goGameOver();
} else {
stop();
}
message = "";
Symbol 771 MovieClip Frame 5
stop();
Symbol 783 Button
on (release) {
getURL ("http://european.mtve.com/inside/legal.shtml", "_blank");
}
Symbol 786 Button
on (release) {
check = "on";
gotoAndStop (2);
}
Symbol 791 Button
on (release) {
_root.controller.submitHighScore(first_name, last_name, email, score, optin_mtv.check, terms_cond.check);
}
Symbol 797 Button
on (release) {
check = "on";
gotoAndStop (2);
}
Symbol 798 Button
on (release) {
check = "off";
gotoAndStop (1);
}
Symbol 800 MovieClip Frame 1
check = "off";
stop();
Symbol 802 Button
on (release) {
getURL ("http://european.mtve.com/inside/legal.shtml", "_blank");
}
Symbol 803 MovieClip Frame 1
score = _root.interface.score_manager.getScore();
Symbol 809 Button
on (release) {
_root.controller.submitChallengeFriend(email);
}