Frame 1
function BrickId(n) {
this.name = n;
this.isUp = false;
this.paths = {};
this.setDir = function () {
this.paths[arguments[0]] = new Array();
var i = 1;
while (i < arguments.length) {
this.paths[arguments[0]].push(arguments[i]);
i++;
}
};
this.checkDependencies = function () {
this.openPaths = new Array();
var dirs = ["up", "down", "left", "right"];
var i = 0;
while (i < dirs.length) {
var curr_dir = dirs[i];
var curr_path = this.paths[curr_dir];
var tmp = 0;
var q = 0;
while (q < curr_path.length) {
var curr_BrickId = curr_path[q];
if (curr_BrickId.isUp == true) {
tmp++;
}
q++;
}
if (curr_path.length == tmp) {
this.openPaths.push(curr_dir);
}
i++;
}
return(this.openPaths);
};
this.chooseDirection = function () {
var oP = this.checkDependencies();
var r = Math.floor(Math.random() * oP.length);
return(oP[r]);
};
}
function calcTravelv() {
this.travelSpeed = (Math.random() * 6) + 2;
}
function calcTravelh() {
this.travelSpeed = (Math.random() * 10) + 10;
}
function traceDirection(direction) {
}
fscommand ("fullscreen", "true");
fscommand ("allowscale", "false");
fscommand ("showmenu", "false");
brickLock = true;
brick_a18 = new BrickId("brick_a18");
brick_a17 = new BrickId("brick_a17");
brick_a16 = new BrickId("brick_a16");
brick_a15 = new BrickId("brick_a15");
brick_a14 = new BrickId("brick_a14");
brick_a13 = new BrickId("brick_a13");
brick_a12 = new BrickId("brick_a12");
brick_b8 = new BrickId("brick_b8");
brick_b7 = new BrickId("brick_b7");
brick_b6 = new BrickId("brick_b6");
brick_d1 = new BrickId("brick_d1");
brick_d2 = new BrickId("brick_d2");
brick_d3 = new BrickId("brick_d3");
brick_e1 = new BrickId("brick_e1");
brick_e2 = new BrickId("brick_e2");
brick_e3 = new BrickId("brick_e3");
brick_e4 = new BrickId("brick_e4");
brick_e5 = new BrickId("brick_e5");
brick_e6 = new BrickId("brick_e6");
brick_e7 = new BrickId("brick_e7");
brick_e8 = new BrickId("brick_e8");
brick_f1 = new BrickId("brick_f1");
brick_f2 = new BrickId("brick_f2");
brick_f3 = new BrickId("brick_f3");
brick_f4 = new BrickId("brick_f4");
brick_f5 = new BrickId("brick_f5");
brick_f6 = new BrickId("brick_f6");
brick_f7 = new BrickId("brick_f7");
brick_f8 = new BrickId("brick_f8");
brick_g1 = new BrickId("brick_g1");
brick_h3 = new BrickId("brick_h3");
brick_i1 = new BrickId("brick_i1");
brick_a18.setDir("up", null);
brick_a18.setDir("down", brick_d1, brick_d2, brick_d3);
brick_a18.setDir("left", null);
brick_a18.setDir("right", brick_a17, brick_a16, brick_a15, brick_a14, brick_a13, brick_a12);
brick_a12.setDir("up", null);
brick_a12.setDir("down", brick_e3);
brick_a12.setDir("left", brick_a13, brick_a14, brick_a15, brick_a16, brick_a17, brick_a18);
brick_a12.setDir("right", brick_b8);
brick_b8.setDir("up", null);
brick_b8.setDir("down", brick_f1);
brick_b8.setDir("left", brick_a8);
brick_b8.setDir("right", brick_b7, brick_b6);
brick_b6.setDir("up", null);
brick_b6.setDir("down", brick_f3, brick_f4, brick_f5);
brick_b6.setDir("left", brick_b7, brick_b8);
brick_b6.setDir("right", null);
brick_d3.setDir("up", brick_d2, brick_d1, brick_a18);
brick_d3.setDir("down", null);
brick_d3.setDir("left", null);
brick_d3.setDir("right", brick_e7);
brick_e3.setDir("up", brick_a12);
brick_e3.setDir("down", brick_e4, brick_e5);
brick_e3.setDir("left", brick_e2, brick_e1, brick_e8, brick_e7);
brick_e3.setDir("right", brick_e7);
brick_e5.setDir("up", brick_e4, brick_e3);
brick_e5.setDir("down", brick_h3);
brick_e5.setDir("left", brick_e6, brick_e7);
brick_e5.setDir("right", brick_f7);
brick_e7.setDir("up", brick_e8, brick_e1, brick_e2, brick_e3);
brick_e7.setDir("down", null);
brick_e7.setDir("left", brick_d3);
brick_e7.setDir("right", brick_e6, brick_e5);
brick_f1.setDir("up", brick_b8);
brick_f1.setDir("down", brick_f8, brick_f7);
brick_f1.setDir("left", brick_e3);
brick_f1.setDir("right", brick_f2, brick_f3, brick_g1);
brick_f5.setDir("up", brick_f4, brick_f3, brick_b6);
brick_f5.setDir("down", null);
brick_f5.setDir("left", brick_f6, brick_f7);
brick_f5.setDir("right", brick_g2, brick_g3, g1);
brick_f7.setDir("up", brick_f8, brick_f1);
brick_f7.setDir("down", brick_i1);
brick_f7.setDir("left", brick_e5);
brick_f7.setDir("right", brick_f6, brick_f5);
brick_g1.setDir("up", null);
brick_g1.setDir("down", brick_g3, brick_g2, brick_f5);
brick_g1.setDir("left", brick_f3, brick_f2, brick_f1);
brick_g1.setDir("right", null);
brick_h3.setDir("up", brick_e5);
brick_h3.setDir("down", null);
brick_h3.setDir("left", null);
brick_h3.setDir("right", brick_i1);
brick_i1.setDir("up", brick_e5);
brick_i1.setDir("down", null);
brick_i1.setDir("left", brick_i1);
brick_i1.setDir("right", null);
mainClip.movingThing5.calcTravel = calcTravelv;
mainClip.movingThing6.calcTravel = calcTravelv;
mainClip.movingThing1.calcTravel = calcTravelh;
mainClip.movingThing2.calcTravel = calcTravelh;
mainClip.movingThing3.calcTravel = calcTravelh;
mainClip.movingThing4.calcTravel = calcTravelh;
Frame 3
function carGoy() {
dify = endPoint - _y;
_y = (_y + (this.travelSpeed * travelDirection));
this._xscale = (this._yscale = startScale + ((this._y + Math.abs(startPoint)) * single_div));
if ("5" >= Math.abs(dify)) {
this.calcTravel();
colorNum = Math.ceil(Math.random() * 7);
car_color.gotoAndStop(colorNum);
this._xscale = (this._yscale = this.resetScale);
_y = startPoint;
this.swapDepths(this.startDepth);
if (this.stopMe == true) {
this.eF = _root.carStopy;
}
}
}
function calcTargety() {
currentPosition = _y;
i = 0;
while (i < stopPoint.length) {
if (travelDirection == 1) {
if (currentPosition < stopPoint[i]) {
this.goalPoint = stopPoint[i];
this.goalScale = scalePoint[i];
this.swapDepths(stopDepth[i]);
if (this.goalPoint == 170) {
this.goalPoint = stopPoint[0];
this.stopMe = true;
return;
}
this.eF = _root.carStopy;
return;
}
} else if (travelDirection == -1) {
if (stopPoint[i] < currentPosition) {
this.goalPoint = stopPoint[i];
this.goalScale = scalePoint[i];
this.swapDepths(stopDepth[i]);
if (this.goalPoint == -190) {
this.goalPoint = stopPoint[0];
this.stopMe = true;
return;
}
this.eF = _root.carStopy;
return;
}
}
i++;
}
}
function carStopy() {
dify = goalPoint - _y;
_y = (_y + (dify * 0.05));
this._xscale = (this._yscale = startScale + ((this._y + Math.abs(startPoint)) * single_div));
if ("1" >= Math.abs(dify)) {
if (!_root.vstopSent) {
_root.vstopSent = true;
_root.switchClip.play();
}
eF = null;
}
}
mainClip.movingThing5.calcTarget = calcTargety;
mainClip.movingThing6.calcTarget = calcTargety;
Frame 4
function carGox() {
difx = endPoint - _x;
_x = (_x + (this.travelSpeed * travelDirection));
if ("50" >= Math.abs(difx)) {
this.calcTravel();
colorNum = Math.ceil(Math.random() * 7);
car_color.gotoAndStop(colorNum);
_x = startPoint;
if (this.stopMe == true) {
this.eF = _root.carStopx;
}
}
}
function calcTargetx() {
currentPosition = _x;
i = 0;
while (i < stopPoint.length) {
if (travelDirection == 1) {
if (stopPoint[i] >= currentPosition) {
this.goalPoint = stopPoint[i];
if (this.goalPoint == 850) {
this.goalPoint = stopPoint[0];
this.stopMe = true;
return;
}
this.eF = _root.carStopx;
return;
}
} else if (travelDirection == -1) {
if (currentPosition >= stopPoint[i]) {
this.goalPoint = stopPoint[i];
if (this.goalPoint == -850) {
this.goalPoint = stopPoint[0];
this.stopMe = true;
return;
}
this.eF = _root.carStopx;
return;
}
}
i++;
}
}
function carStopx() {
difx = goalPoint - _x;
_x = (_x + (difx * 0.05));
if ("2" >= Math.abs(difx)) {
if (!_root.hstopSent) {
_root.hstopSent = true;
_root.switchClip.play();
}
eF = null;
}
}
mainClip.movingThing1.calcTarget = calcTargetx;
mainClip.movingThing2.calcTarget = calcTargetx;
mainClip.movingThing3.calcTarget = calcTargetx;
mainClip.movingThing4.calcTarget = calcTargetx;
Frame 5
function runSwitch() {
if (!switchClip.resetSwitch) {
switchClip.resetSwitch = true;
switchClip.play();
}
}
function flipLights(color) {
defaultLight = color;
mainClip.a12.lights.gotoAndStop(color);
mainClip.f1.lights.gotoAndStop(color);
mainClip.e5.lights.gotoAndStop(color);
mainClip.i1.lights.gotoAndStop(color);
mainClip.g1.lights.gotoAndStop(color);
mainClip.d3.lights.gotoAndStop(color);
mainClip.b1.lights.gotoAndStop(color);
mainClip.b4.lights.gotoAndStop(color);
mainClip.f5.lights.gotoAndStop(color);
}
function startHoriz() {
mainClip.movingthing1.eF = _root.carGox;
mainClip.movingthing1.stopMe = false;
mainClip.movingthing2.eF = _root.carGox;
mainClip.movingthing2.stopMe = false;
mainClip.movingthing3.eF = _root.carGox;
mainClip.movingthing3.stopMe = false;
mainClip.movingthing4.eF = _root.carGox;
mainClip.movingthing4.stopMe = false;
}
function stopHoriz() {
mainClip.movingthing1.calcTarget();
mainClip.movingthing2.calcTarget();
mainClip.movingthing3.calcTarget();
mainClip.movingthing4.calcTarget();
}
function startVert() {
mainClip.movingthing5.eF = _root.carGoy;
mainClip.movingthing5.stopMe = false;
mainClip.movingthing6.eF = _root.carGoy;
mainClip.movingthing6.stopMe = false;
}
function stopVert() {
mainClip.movingthing5.calcTarget();
mainClip.movingthing6.calcTarget();
}
defaultLight = "green";
Frame 6
function waitLock(dir, targLight) {
if (dir eq "vert") {
if (_root.defaultLight eq "green") {
this.play();
} else if (_root.defaultLight eq "red") {
_root.childStopped01 = true;
_root.stoppedChair01 = _name;
this.stop();
_root.targetLight = targLight;
_root.mainClip[targLight].highlight.gotoAndPlay(2);
_root.switchTimer.gotoAndPlay(2);
this.char.play();
}
} else if (dir eq "horiz") {
if (_root.defaultLight eq "green") {
_root.stoppedChair01 = _name;
_root.childStopped01 = true;
this.stop();
_root.targetLight = targLight;
_root.mainClip[targLight].highlight.gotoAndPlay(2);
_root.switchTimer.gotoAndPlay(2);
this.char.play();
} else if (_root.defaultLight eq "red") {
this.play();
}
}
}
_root.childStopped01 = false;
mainClip.gstop1.waitLock = waitLock;
mainClip.gstop2.waitLock = waitLock;
mainClip.gstop3.waitLock = waitLock;
mainClip.gstop4.waitLock = waitLock;
mainClip.gstop5.waitLock = waitLock;
mainClip.gstop6.waitLock = waitLock;
mainClip.gstop7.waitLock = waitLock;
mainClip.gstop8.waitLock = waitLock;
mainClip.gstop9.waitLock = waitLock;
mainClip.gstop10.waitLock = waitLock;
mainClip.gstop11.waitLock = waitLock;
mainClip.gstop12.waitLock = waitLock;
mainClip.gstop13.waitLock = waitLock;
mainClip.gstop14.waitLock = waitLock;
Frame 14
this.mainClip.a11.play();
Frame 22
this.mainClip.b9.play();
Frame 30
this.mainClip.a12.play();
Frame 39
this.mainClip.b8.play();
Frame 46
this.mainClip.e3.play();
Frame 50
this.mainClip.f1.play();
Frame 54
this.mainClip.e4.play();
Frame 58
this.mainClip.f8.play();
Frame 63
this.mainClip.e5.play();
Frame 67
this.mainClip.f7.play();
Frame 73
this.mainClip.i1.play();
Frame 84
this.mainClip.grass_a9.play();
Frame 89
this.mainClip.grass_b1.play();
Frame 93
this.mainClip.grass_e3.play();
Frame 97
this.mainClip.grass_f1.play();
Frame 103
this.mainClip.h3.play();
Frame 116
this.mainClip.movingthing5._visible = true;
this.mainClip.movingthing6._visible = true;
startVert();
brickLock = false;
Frame 279
tellTarget ("/ticker") {
play();
};
Frame 315
tellTarget ("/ticker") {
play();
};
Frame 346
tellTarget ("/ticker") {
play();
};
Frame 378
tellTarget ("/ticker") {
play();
};
Frame 412
tellTarget ("/ticker") {
play();
};
Frame 446
tellTarget ("/ticker") {
play();
};
Frame 478
tellTarget ("/ticker") {
play();
};
Frame 511
tellTarget ("/ticker") {
play();
};
Frame 554
tellTarget ("/ticker") {
play();
};
Frame 619
tellTarget ("/ticker") {
play();
};
Frame 687
tellTarget ("/ticker") {
play();
};
Frame 753
tellTarget ("/ticker") {
play();
};
Frame 813
tellTarget ("/ticker") {
play();
};
Frame 845
tellTarget ("/ticker") {
play();
};
Frame 870
tellTarget ("/ticker") {
play();
};
Frame 911
tellTarget ("/ticker") {
play();
};
Frame 944
tellTarget ("/ticker") {
play();
};
Frame 978
tellTarget ("/ticker") {
play();
};
Frame 1011
tellTarget ("/ticker") {
play();
};
Frame 1045
tellTarget ("/ticker") {
play();
};
Frame 1077
tellTarget ("/ticker") {
play();
};
Frame 1110
tellTarget ("/ticker") {
play();
};
Frame 1145
tellTarget ("/ticker") {
play();
};
Frame 1178
tellTarget ("/ticker") {
play();
};
Frame 1212
tellTarget ("/ticker") {
play();
};
Frame 1344
tellTarget ("/ticker") {
play();
};
Frame 1377
tellTarget ("/ticker") {
play();
};
Frame 1412
tellTarget ("/ticker") {
play();
};
Frame 1443
tellTarget ("/ticker") {
play();
};
Frame 1486
tellTarget ("/ticker") {
play();
};
Frame 1553
tellTarget ("/ticker") {
play();
};
Frame 1626
tellTarget ("/ticker") {
play();
};
Frame 1685
tellTarget ("/ticker") {
play();
};
Frame 1745
tellTarget ("/ticker") {
play();
};
Frame 1776
tellTarget ("/ticker") {
play();
};
Frame 1811
tellTarget ("/ticker") {
play();
};
Frame 1844
tellTarget ("/ticker") {
play();
};
Frame 1876
tellTarget ("/ticker") {
play();
};
Frame 1912
tellTarget ("/ticker") {
play();
};
Frame 1944
tellTarget ("/ticker") {
play();
};
Frame 1979
tellTarget ("/ticker") {
play();
};
Frame 2010
tellTarget ("/ticker") {
play();
};
Frame 2044
tellTarget ("/ticker") {
play();
};
Frame 2077
tellTarget ("/ticker") {
play();
};
Frame 2109
tellTarget ("/ticker") {
play();
};
Frame 2153
tellTarget ("/ticker") {
play();
};
Frame 2235
loadMovieNum ("files/front.swf", 0);
stop();
Symbol 18 MovieClip Frame 1
stop();
Symbol 87 MovieClip Frame 1
stop();
Symbol 87 MovieClip Frame 9
gotoAndPlay (3);
Symbol 89 MovieClip Frame 1
stop();
Symbol 89 MovieClip Frame 9
gotoAndPlay (3);
Symbol 90 MovieClip Frame 1
stop();
Symbol 90 MovieClip Frame 9
gotoAndPlay (3);