Combined Code
movieClip 2 {
}
// unknown tag 88 length 85
movieClip 8 {
}
movieClip 12 {
}
// unknown tag 88 length 84
movieClip 17 {
frame 1 {
stop();
}
}
movieClip 18 levelWin {
frame 221 {
_root.nextLevel();
}
}
movieClip 19 {
}
movieClip 22 {
}
movieClip 25 {
}
movieClip 28 {
}
movieClip 32 {
frame 1 {
stop();
}
}
movieClip 33 collisionMessage {
frame 139 {
stop();
}
}
// unknown tag 88 length 85
movieClip 36 {
}
movieClip 37 combo {
frame 30 {
this.removeMovieClip();
}
}
movieClip 39 {
}
movieClip 40 levelInfo {
frame 60 {
this.removeMovieClip();
}
}
movieClip 41 {
}
movieClip 42 startFlash {
frame 31 {
this.removeMovieClip();
stop();
}
}
movieClip 47 {
}
movieClip 50 {
}
movieClip 55 {
}
movieClip 56 {
}
movieClip 57 {
frame 1 {
_root.addLane(this, 1);
}
}
movieClip 61 {
}
movieClip 65 {
frame 1 {
stop();
}
frame 2 {
stop();
}
}
movieClip 72 {
}
movieClip 73 {
frame 1 {
_root.addLight(this);
}
}
movieClip 78 {
}
movieClip 79 level2 {
}
frame 1 {
function killAd() {
removeMovieClip(adBox);
}
stop();
var CPMStarPoolID = 1052;
var CPMStarSubPoolID = 5;
num = random(3);
if (num != 0) {
System.security.allowDomain('server.cpmstar.com');
var mcLoad = new MovieClipLoader();
mcLoad.addListener(this);
mcLoad.loadClip('http://server.cpmstar.com/adviewas2.swf?poolid=' + CPMStarPoolID + '&subpoolid=' + CPMStarSubPoolID, preloader.adBox);
}
stop();
}
frame 1 {
function gotoAG() {
getURL('http://armorgames.com/', '_blank');
}
function gotoGame() {
level = 1;
gotoAndStop('game');
}
function continueGame() {
trace(savefile.data.myLevel);
if (savefile.data.myLevel == undefined) {
level = 1;
} else {
level = savefile.data.myLevel;
xCleared = savefile.data.xCleared;
xColl = savefile.data.xColl;
xLights = savefile.data.xLights;
xTrav = savefile.data.xTrav;
}
gotoAndStop('game');
}
function gotoMenu() {
clearStuff();
gotoAndStop('menu');
}
function playSplash() {
gotoAndStop('splash');
}
function saveGame() {
savefile.data.myLevel = level;
savefile.data.xCleared = xCleared;
savefile.data.xColl = xColl;
savefile.data.xLights = xLights;
savefile.data.xTrav = xTrav;
savefile.flush();
}
var myMenu = new ContextMenu();
myMenu.hideBuiltInItems();
_root.menu = myMenu;
var xCleared = 0;
var xColl = 0;
var xLights = 0;
var xTrav = 0;
var xTravDisp = 'HELLO!';
var oldX = 0;
var oldY = 0;
var globalSound = new Sound(this);
var muted = false;
var level = 1;
var savefile = SharedObject.getLocal('traffic');
}
movieClip 81 {
}
movieClip 83 {
}
movieClip 85 {
}
movieClip 88 {
}
button 89 {
on (release) {
getURL('http://armorgames.com/play/3439/fox-fyre?gamereferral=Ilovetraffic', '_blank');
}
}
movieClip 90 {
}
movieClip 94 {
}
movieClip 97 {
}
movieClip 98 {
}
button 100 {
on (release) {
getURL('http://www.armorgames.com/', '_blank');
}
}
// unknown tag 88 length 85
movieClip 105 {
}
// unknown tag 88 length 85
button 112 {
on (release) {
_root.playSplash();
}
}
movieClip 113 {
frame 100 {
play();
}
frame 135 {
stop();
}
}
instance preloader of movieClip 113 {
onClipEvent (enterFrame) {
loaded = _root.getBytesLoaded();
total = _root.getBytesTotal();
framesLoaded = Math.ceil((loaded / total) * 100);
if (framesLoaded >= 100) {
onEnterFrame = null;
} else {
gotoAndPlay(framesLoaded);
}
}
}
movieClip 121 {
}
button 126 {
on (press) {
getURL('http://www.armorgames.com', '_blank');
}
}
// unknown tag 88 length 130
movieClip 129 {
}
movieClip 132 {
frame 1 {
gotoAndPlay(2);
}
frame 177 {
_root.nextFrame();
}
}
movieClip 136 level1 {
}
movieClip 140 {
}
movieClip 141 level10 {
}
movieClip 144 {
}
movieClip 145 level11 {
}
movieClip 149 {
}
movieClip 150 level12 {
}
movieClip 152 {
frame 1 {
_root.addLane(this, 3);
}
}
movieClip 154 {
}
movieClip 155 level13 {
}
movieClip 157 {
}
movieClip 158 level14 {
}
movieClip 159 level15 {
}
movieClip 160 level16 {
}
movieClip 161 level20 {
}
movieClip 163 {
}
movieClip 164 level17 {
}
movieClip 167 {
}
movieClip 168 level19 {
}
movieClip 171 {
}
movieClip 173 {
}
movieClip 174 level18 {
}
movieClip 177 {
}
movieClip 178 level3 {
}
movieClip 180 {
}
movieClip 181 level4 {
}
movieClip 183 {
}
movieClip 184 level5 {
}
movieClip 186 {
}
movieClip 187 level6 {
}
movieClip 190 {
}
movieClip 191 level7 {
}
movieClip 193 {
}
movieClip 194 level8 {
}
movieClip 195 level9 {
}
movieClip 197 {
}
movieClip 198 gotOne {
frame 20 {
this.removeMovieClip();
}
}
movieClip 204 {
}
movieClip 205 {
}
movieClip 206 semi {
}
movieClip 213 {
}
movieClip 214 motorcycle {
}
movieClip 229 {
frame 1 {
stop();
}
}
movieClip 230 car {
}
movieClip 233 {
}
movieClip 234 bus {
}
movieClip 238 {
}
movieClip 241 {
}
movieClip 242 ambulance {
}
movieClip 245 {
}
movieClip 246 police {
}
movieClip 249 {
}
movieClip 251 crashLocation {
frame 25 {
this.removeMovieClip();
}
}
movieClip 253 {
frame 1 {
stop();
}
}
frame 3 {
stop();
}
// unknown tag 88 length 68
movieClip 263 {
frame 92 {
_root.play();
}
}
frame 4 {
stop();
}
movieClip 266 {
}
button 268 {
on (release) {
getURL('http://www.armorgames.com/', '_blank');
}
}
movieClip 271 {
}
button 273 {
on (release) {
_root.gotoGame();
}
}
button 276 {
on (release) {
_root.continueGame();
}
}
movieClip 279 {
}
frame 5 {
function checkGoal() {
if (_root['lev' + curLevel.level][0] - carCounter <= 0 && cStatus == 1) {
carCounter = _root['lev' + curLevel.level][0];
updateSign();
cStatus = 2;
attachMovie('levelWin', 'winLevel', k++);
factoid = randomFacts[random(randomFacts.length)];
winLevel.restartPanel.factoid.text = factoid;
seconds = 5;
miliCounter = 0;
bugleSound.start(0, 1);
}
}
function handleDepths() {
sign.swapDepths(k++);
}
function gameTimer() {
miliCounter -= 100 / frameRate;
if (miliCounter < 0) {
miliCounter = 100 + miliCounter;
--seconds;
}
if (miliCounter < 10) {
miliCounterDisp = '0' + miliCounter;
} else {
miliCounterDisp = String(miliCounter);
}
if (cStatus == 1) {
gameTimerDisp = seconds + '.' + miliCounterDisp;
if (seconds < 0) {
outOfTime();
}
} else {
collisionMessage.restartPanel.restartT.text = 'Restarting in ' + seconds + '.' + miliCounterDisp;
if (seconds < 0) {
restart();
}
}
}
function attachLevel(num) {
var v1 = attachMovie('level' + num, 'curLevel', k++);
v1.level = num;
}
function outOfTime() {
startStartOver(2);
}
function addLane(laneMC, type) {
laneMC._name = 'lane' + laneCounter;
laneMC.id = laneCounter;
laneMC.speed = this['lev' + level][2] * type;
laneMC.trafficRate = 100 + random(50);
laneMC.trafficCounter = 0;
laneMC.cars = new Array();
laneMC.line._alpha = 30;
laneMC.lights = new Array();
++laneCounter;
lanes.push(laneMC);
}
function addLight(lightMC) {
lightMC.id = lightMC._name;
lightMC._name = 'light' + lightCounter;
lightMC.combo = new Number(0);
lightMC.colour = RED;
lightLight(lightMC);
++lightCounter;
lights.push(lightMC);
}
function lightLight(lightMC) {
switch (lightMC.colour) {
case GREEN:
lightMC.stopLight.gotoAndStop(1);
break;
case YELLOW:
lightMC.stopLight.gotoAndStop(2);
break;
case RED:
lightMC.stopLight.gotoAndStop(3);
}
}
function handleLanes() {
i = 0;
while (i < lanes.length) {
curLane = lanes[i];
++curLane.trafficCounter;
if (curLane.trafficCounter > curLane.trafficRate) {
curLane.trafficCounter = 0;
chance = random(100);
++xCleared;
if (chance < 85) {
addCar(curLane, 1);
} else {
if (chance < 88) {
addCar(curLane, 2);
} else {
if (chance < 92) {
addCar(curLane, 3);
} else {
if (chance < 94) {
addCar(curLane, 4);
} else {
if (chance < 96) {
addCar(curLane, 5);
} else {
if (chance < 98) {
addCar(curLane, 6);
}
}
}
}
}
}
}
++i;
}
}
function handleCars() {
moveCars();
carCollisions();
}
function clearStuff(num) {
for (i in _root) {
if (typeof _root[i] == 'movieclip' && _root[i]._name != 'sign') {
_root[i].removeMovieClip();
}
}
drawLayer.removeMovieClip();
curLevel.removeMovieClip();
collisionMessage.removeMovieClip();
cars.splice(0, cars.length);
lights.splice(0, lights.length);
lanes.splice(0, lanes.length);
if (num == 1) {
sign.removeMovieClip();
stopAllSounds();
cStatus = 100;
levelInfo.removeMovieClip();
onEnterFrame = null;
gotoAndStop('ending');
} else {
if (num == 2) {
cStatus = 100;
sign.removeMovieClip();
stopAllSounds();
onEnterFrame = null;
gotoAndStop('menu');
}
}
}
function restart() {
if (level == 21) {
clearStuff(1);
return undefined;
} else {
clearStuff(0);
}
attachLevel(level);
createEmptyMovieClip('drawLayer', k++);
seconds = this['lev' + level][1];
miliCounter = 0;
carCounter = 0;
cStatus = 1;
attachMovie('levelInfo', 'levelInfo', k++);
levelInfo._x = 76;
levelInfo._y = 200;
levelInfo.inf.levelNum.text = 'LEVEL ' + level;
whiteFade();
}
function whiteFade() {
attachMovie('startFlash', 'whiteFade' + k, k++);
}
function startStartOver(typeOfAccident) {
cStatus = 2;
attachMovie('collisionMessage', 'collisionMessage', k++);
if (typeOfAccident == 1) {
_root.warningText = 'You caused an accident!';
collisionMessage.warningSign.gotoAndStop(1);
} else {
if (typeOfAccident == 2) {
_root.warningText = 'You ran out of time!';
gameTimerDisp = '0.00';
collisionMessage.warningSign.gotoAndStop(2);
} else {
if (typeOfAccident == 3) {
_root.warningText = 'You backed up traffic too much!';
collisionMessage.warningSign.gotoAndStop(3);
}
}
}
seconds = 4;
miliCounter = 0;
}
function carCollisions() {
i = 0;
while (i < cars.length) {
car1 = cars[i];
j = 0;
while (j < cars.length) {
car2 = cars[j];
if (i != j && car1.hitTest(car2)) {
if (!car1.hit || !car2.hit) {
if (cStatus == 1) {
startStartOver(1);
}
++xColl;
car1.hit = true;
car2.hit = true;
tempVel = car1.vel;
ang = car1._rotation * Math.PI / 180;
car1.xVel = car1.vel * Math.cos(ang);
car1.yVel = car1.vel * Math.sin(ang);
ang = car2._rotation * Math.PI / 180;
car2.xVel = car2.vel * Math.cos(ang);
car2.yVel = car2.vel * Math.sin(ang);
tempXVel = car1.xVel;
tempYVel = car1.yVel;
car1.xVel += car2.xVel * crashDamper;
car1.yVel += car2.yVel * crashDamper;
car2.xVel += tempXVel * crashDamper;
car2.yVel += tempYVel * crashDamper;
car1.vel = 0;
car2.vel = 0;
if (car1.type == 3 || car1.type == 4) {
car1.xVel *= 0.2;
car1.yVel *= 0.2;
}
if (car2.type == 3 || car2.type == 4) {
car2.xVel *= 0.2;
car2.yVel *= 0.2;
}
shel = attachMovie('crashLocation', 'cL' + k, k++);
shel._x = (car1._x + car2._x) / 2;
shel._y = (car1._y + car2._y) / 2;
break;
}
}
++j;
}
++i;
}
}
function addCar(laneMC, type) {
if (type == 1) {
newCar = attachMovie('car', 'car' + k, k++);
newCar.body.gotoAndStop(1 + random(7));
newCar.maxVel = 2 * laneMC.speed;
newCar.minVel = 0;
newCar.acc = 0.1 + 0.1 * Math.random();
} else {
if (type == 2) {
newCar = attachMovie('motorcycle', 'car' + k, k++);
newCar.body.gotoAndStop(1 + random(3));
newCar.maxVel = 4 * laneMC.speed;
newCar.minVel = 0;
newCar.acc = 0.2 + 0.2 * Math.random();
} else {
if (type == 3) {
newCar = attachMovie('semi', 'car' + k, k++);
newCar.body.gotoAndStop(1 + random(2));
newCar.maxVel = 1.5 * laneMC.speed;
newCar.minVel = 0;
newCar.acc = 0.05 + 0.05 * Math.random();
} else {
if (type == 4) {
newCar = attachMovie('bus', 'car' + k, k++);
newCar.maxVel = 2 * laneMC.speed;
newCar.minVel = 0;
newCar.acc = 0.05 + 0.05 * Math.random();
} else {
if (type == 5) {
newCar = attachMovie('ambulance', 'car' + k, k++);
newCar.body.gotoAndStop(1 + random(2));
newCar.maxVel = 3 * laneMC.speed;
newCar.minVel = 0;
newCar.acc = 0.15 + 0.15 * Math.random();
} else {
if (type == 6) {
newCar = attachMovie('police', 'car' + k, k++);
newCar.maxVel = 4 * laneMC.speed;
newCar.minVel = 0;
newCar.acc = 0.1 + 0.1 * Math.random();
}
}
}
}
}
}
newCar.lane = laneMC;
newCar.size = newCar._width;
newCar._rotation = newCar.lane._rotation;
switch (newCar._rotation) {
case 0:
newCar._x = newCar.lane._x;
newCar._y = newCar.lane._y + laneOffset;
break;
case 90:
newCar._x = newCar.lane._x - laneOffset;
newCar._y = newCar.lane._y;
break;
case -90:
newCar._x = newCar.lane._x + laneOffset;
newCar._y = newCar.lane._y;
break;
case 180:
newCar._x = newCar.lane._x;
newCar._y = newCar.lane._y - laneOffset;
}
newCar.origin = new flash.geom.Point(newCar._x, newCar._y);
e = 0;
while (e < laneMC.cars.length) {
if (laneMC.cars[e].hitTest(newCar)) {
startStartOver(3);
newCar.removeMovieClip();
return undefined;
}
++e;
}
newCar.type = type;
newCar.vel = 0;
newCar.hit = false;
newCar.lightsHit = new Array();
cars.push(newCar);
newCar.lane.cars.push(newCar);
}
function removeCar(carMC) {
re = 0;
while (re < carMC.lane.cars.length) {
if (carMC == carMC.lane.cars[re]) {
carMC.lane.cars.splice(re, 1);
break;
}
++re;
}
re = 0;
while (re < cars.length) {
if (cars[re] == carMC) {
cars[re].removeMovieClip();
cars.splice(re, 1);
break;
}
++re;
}
}
function updateSign() {
sign.carCounterDisp.text = _root['lev' + curLevel.level][0] - carCounter;
sign.timeCounterDisp.text = gameTimerDisp;
sign.levelNum.text = curLevel.level;
sign.clearNum.text = _root['lev' + curLevel.level][0];
sign.clearNumDisp.text = 'CLEAR ' + _root['lev' + curLevel.level][0] + ' CARS';
sign.timeNum.text = _root['lev' + curLevel.level][1] + ' seconds';
winLevel.restartLevel.factoid.text = factoid;
if (_ymouse > 530) {
easing('y', sign.popUpMenu, 157, 0.3);
} else {
easing('y', sign.popUpMenu, 180, 0.3);
}
}
function nextLevel() {
++level;
if (level <= 20) {
saveGame();
}
restart();
}
function moveCars() {
keepCars.splice(0, keepCars.length);
i = 0;
while (i < lanes.length) {
curLane = lanes[i];
checkLights(curLane);
j = 0;
while (j < curLane.cars.length) {
curCar = curLane.cars[j];
l = 0;
while (l < curLane.lights.length) {
curLightMC = curLane.lights[l];
curLight = curLevel[curLightMC.id + 'Bar'];
adjust = false;
switch (curCar._rotation) {
case 0:
var v1 = dist(curCar._x, 0, curLight._x, 0);
if (v1 < slowDownDist && curCar._x < curLight._x) {
adjust = true;
}
break;
case 90:
var v1 = dist(0, curCar._y, 0, curLight._y);
if (v1 < slowDownDist && curCar._y < curLight._y) {
adjust = true;
}
break;
case -90:
var v1 = dist(0, curCar._y, 0, curLight._y);
if (v1 < slowDownDist && curCar._y > curLight._y) {
adjust = true;
}
break;
case 180:
var v1 = dist(curCar._x, 0, curLight._x, 0);
if (v1 < slowDownDist && curCar._x > curLight._x) {
adjust = true;
}
}
if (storedv1 < 10 && curLightMC.colour == GREEN) {
foundLightHit = false;
var v2 = 0;
while (v2 < curCar.lightsHit.length) {
if (curCar.lightsHit[v2] == curLightMC) {
foundLightHit = true;
}
++v2;
}
if (!foundLightHit) {
curCar.lightsHit.push(curLightMC);
if (cStatus == 1) {
++carCounter;
tingSound.start(0, 1);
shel = attachMovie('gotOne', 'gotOne' + k, k++);
shel._x = curCar._x;
shel._y = curCar._y;
shel._rotation = curCar._rotation + 180;
if (curCar.type == 3 || curCar.type == 4) {
addBonus(curCar);
}
}
}
}
if (adjust) {
if (curLightMC.colour == RED) {
curLightMC.combo = 0;
curCar.vel *= storedv1 / slowDownDist;
if (storedv1 < 1) {
curCar.vel = -curCar.acc;
break;
}
} else {
if (curLightMC.colour == YELLOW) {
curCar.vel *= storedv1 / slowDownDist;
} else {
if (curLightMC.colour == GREEN) {
}
}
}
}
++l;
}
if (curCar.hit) {
topRight = new Object();
topRight.x = curCar.tr._x;
topRight.y = curCar.tr._y;
curCar.localToGlobal(topRight);
curCar.oldTRx = topRight.x;
curCar.oldTRy = topRight.y;
topLeft = new Object();
topLeft.x = curCar.tl._x;
topLeft.y = curCar.tl._y;
curCar.localToGlobal(topLeft);
curCar.oldTLx = topLeft.x;
curCar.oldTLy = topLeft.y;
bottomRight = new Object();
bottomRight.x = curCar.br._x;
bottomRight.y = curCar.br._y;
curCar.localToGlobal(bottomRight);
curCar.oldBRx = bottomRight.x;
curCar.oldBRy = bottomRight.y;
bottomLeft = new Object();
bottomLeft.x = curCar.bl._x;
bottomLeft.y = curCar.bl._y;
curCar.localToGlobal(bottomLeft);
curCar.oldBLx = bottomLeft.x;
curCar.oldBLy = bottomLeft.y;
curCar._x += curCar.xVel;
curCar._y += curCar.yVel;
curCar._rotation += (Math.abs(curCar.xVel) + Math.abs(curCar.yVel)) * 1.2;
curCar.xVel *= 0.9;
curCar.yVel *= 0.9;
drawLayer.lineStyle(3, 0, 30);
topRight = new Object();
topRight.x = curCar.tr._x;
topRight.y = curCar.tr._y;
curCar.localToGlobal(topRight);
drawLayer.moveTo(curCar.oldTRx, curCar.oldTRy);
drawLayer.lineTo(topRight.x, topRight.y);
topLeft = new Object();
topLeft.x = curCar.tl._x;
topLeft.y = curCar.tl._y;
curCar.localToGlobal(topLeft);
drawLayer.moveTo(curCar.oldTLx, curCar.oldTLy);
drawLayer.lineTo(topLeft.x, topLeft.y);
bottomRight = new Object();
bottomRight.x = curCar.br._x;
bottomRight.y = curCar.br._y;
curCar.localToGlobal(bottomRight);
drawLayer.moveTo(curCar.oldBRx, curCar.oldBRy);
drawLayer.lineTo(bottomRight.x, bottomRight.y);
bottomLeft = new Object();
bottomLeft.x = curCar.bl._x;
bottomLeft.y = curCar.bl._y;
curCar.localToGlobal(bottomLeft);
drawLayer.moveTo(curCar.oldBLx, curCar.oldBLy);
drawLayer.lineTo(bottomLeft.x, bottomLeft.y);
} else {
if (curCar.vel < curCar.maxVel) {
curCar.vel += curCar.acc;
}
if (j != 0) {
secCar = curLane.cars[j - 1];
var v3 = dist(curCar._x, curCar._y, secCar._x, secCar._y);
tempSize = slowDownDist * (curLane.speed * 0.4) + secCar.size;
if (v3 < tempSize) {
curCar.vel *= 0.9 - 0.8 * (1 - v3 / tempSize);
}
if (curCar.vel < 0) {
curCar.vel = 0;
}
if (v3 < carStopDist + secCar.size) {
curCar.vel = 0;
}
}
ang = curCar._rotation * Math.PI / 180;
xVel = curCar.vel * Math.cos(ang);
yVel = curCar.vel * Math.sin(ang);
curCar._x += xVel;
curCar._y += yVel;
if (dist(curCar._x, curCar._y, curCar.origin.x, curCar.origin.y) > 600) {
keepCars.push(curCar);
}
}
++j;
}
++i;
}
var i = 0;
while (i < keepCars.length) {
removeCar(keepCars[i]);
++i;
}
}
function addBonus(currentCar) {
newBonus = attachMovie('combo', 'combo' + k, k++);
newBonus.targetMC = currentCar;
newBonus._x = currentCar._x;
newBonus._y = currentCar._y;
newBonus._yscale = 200;
newBonus._xscale = 200;
if (currentCar.type == 3) {
newBonus.txt = '+3 Semi!';
++carCounter;
++carCounter;
}
if (currentCar.type == 4) {
newBonus.txt = '+2 Bus!';
++carCounter;
}
}
function checkLights(curLane) {
curLane.lights.splice(0, curLane.lights.length);
m = 0;
while (m < lights.length) {
curLight = curLevel[lights[m].id + 'Bar'];
curLightMC = lights[m];
if (curLight.hitTest(curLane) && curLight._rotation == curLane._rotation) {
curLane.lights.push(lights[m]);
}
++m;
}
}
function dist(x1, y1, x2, y2) {
return Math.sqrt(Math.pow(x1 - x2, 2) + Math.pow(y1 - y2, 2));
}
function easing(pro, mov1, mov2, drift) {
switch (pro) {
case 'x':
mov1._x -= drift * ((mov1._x - mov2) / 2);
break;
case 'y':
mov1._y -= drift * ((mov1._y - mov2) / 2);
break;
case 'xscale':
mov1._xscale -= drift * ((mov1._xscale - mov2) / 2);
break;
case 'yscale':
mov1._yscale -= drift * ((mov1._yscale - mov2) / 2);
break;
case 'width':
mov1._width -= drift * ((mov1._width - mov2) / 2);
break;
case 'height':
mov1._height -= drift * ((mov1._height - mov2) / 2);
break;
case 'alpha':
mov1._alpha -= drift * ((mov1._alpha - mov2) / 2);
break;
case 'rotation':
mov1._rotation -= drift * ((mov1._rotation - mov2) / 2);
}
}
lev1 = new Array(3, 30, 2);
lev2 = new Array(5, 30, 2);
lev3 = new Array(8, 30, 2);
lev4 = new Array(20, 50, 2);
lev5 = new Array(40, 50, 2);
lev6 = new Array(30, 35, 2);
lev7 = new Array(40, 50, 2);
lev8 = new Array(6, 30, 2);
lev9 = new Array(12, 20, 2);
lev10 = new Array(4, 15, 2);
lev11 = new Array(100, 40, 3);
lev12 = new Array(45, 40, 2);
lev13 = new Array(6, 30, 1);
lev14 = new Array(12, 20, 2);
lev15 = new Array(50, 40, 1);
lev16 = new Array(22, 30, 5);
lev17 = new Array(16, 20, 2);
lev18 = new Array(20, 30, 2);
lev19 = new Array(40, 30, 3);
lev20 = new Array(35, 30, 1);
var randomFacts = new Array();
randomFacts.push('the world\'s largest ball of twine weighs 17,500 pounds?');
randomFacts.push('the international telephone dialing code for Antarctica is 672?');
randomFacts.push('that cats sleep 16 to 18 hours per day?');
randomFacts.push('all polar bears are left handed?');
randomFacts.push('a Jiffy is an actual unit of time for 1/100th of a second?');
randomFacts.push('9 out of 10 lightning strike victims survive?');
randomFacts.push('the average person walks four miles to make his or her bed each year?');
randomFacts.push('reindeer milk has more fat than cow milk?');
randomFacts.push('the average life span of a 16th century peasant was 25 years?');
randomFacts.push('parrots average 500 pounds per square inch of pressure in their beaks?');
randomFacts.push('the earth is .02 degrees hotter during a full moon?');
randomFacts.push('ducks will only lay eggs early in the morning?');
randomFacts.push('most burglaries occur during the daytime?');
randomFacts.push('an elephant\'s tooth can weigh as much as 12 pounds?');
randomFacts.push('pollen can travel up to 500 miles in a day?');
randomFacts.push('some asteroids have other asteroids orbiting them?');
var laneCounter = 0;
var lightCounter = 0;
var spawnCounter = 0;
var lights = new Array();
var lanes = new Array();
var cars = new Array();
var RED = 0;
var YELLOW = 1;
var GREEN = 2;
var laneOffset = 5;
var slowDownDist = 25;
var carSpaceDist = 50;
var carStopDist = 5;
var carCounter = 0;
var crashDamper = 2;
var keepCars = new Array();
var k = 1;
var seconds = 90;
var miliCounter = 0;
var miliCounterDisp = '100';
var frameRate = 50;
var gameTimerDisp;
var clickSound = new Sound(this);
clickSound.attachSound('click');
var soundTrack = new Sound(this);
soundTrack.attachSound('corncob');
soundTrack.start(0, 9999);
var bugleSound = new Sound(this);
bugleSound.attachSound('bugle');
var tingSound = new Sound(this);
tingSound.attachSound('ting');
var cStatus = 1;
sign.popUpMenu.pauseButton.onRelease = function () {
if (cStatus == 1) {
cStatus = 0;
this._parent._parent.pauseScreen.gotoAndStop(2);
} else {
if (cStatus == 0) {
cStatus = 1;
this._parent._parent.pauseScreen.gotoAndStop(1);
}
}
};
sign.popUpMenu.restartButton.onRelease = function () {
if (cStatus != 0) {
restart();
}
};
sign.popUpMenu.muteButton.onRelease = function () {
muted = !muted;
if (muted) {
globalSound.setVolume(0);
} else {
globalSound.setVolume(100);
}
};
sign.popUpMenu.menuButton.onRelease = function () {
gotoMenu();
};
sign.popUpMenu.agButton.onRelease = function () {
gotoAG();
};
onEnterFrame = function () {
if (cStatus != 0) {
if (cStatus == 1) {
handleLanes();
}
gameTimer();
handleCars();
updateSign();
checkGoal();
handleDepths();
}
var v1 = dist(_xmouse, _ymouse, oldX, oldY);
if (v1 > 0 && v1 != undefined) {
xTrav += v1;
xTravDisp = Math.floor(xTrav / 72 / 12) + ' ft';
}
oldX = _xmouse;
oldY = _ymouse;
};
onMouseDown = function () {
if (cStatus == 1) {
n = 0;
while (n < lights.length) {
curLight = lights[n];
if (curLight.stopLight.hitTest(_xmouse, _ymouse)) {
++xLights;
if (curLight.colour == RED) {
curLight.colour = GREEN;
clickSound.start(0, 1);
curLevel[curLight.id + 'Bar'].gotoAndStop(2);
} else {
curLight.colour = RED;
clickSound.start(0, 1);
curLevel[curLight.id + 'Bar'].gotoAndStop(1);
}
}
lightLight(curLight);
++n;
}
}
};
restart();
stop();
}
// unknown tag 88 length 84
button 295 {
on (release) {
_root.clearStuff(2);
}
}
// unknown tag 88 length 85
movieClip 298 {
}
// unknown tag 88 length 86
// unknown tag 88 length 85
// unknown tag 88 length 75
movieClip 318 {
frame 1 {
stop();
}
}
movieClip 319 {
}
movieClip 321 {
}
movieClip 324 {
}
movieClip 326 {
}
movieClip 328 {
}
movieClip 330 {
}
movieClip 332 {
}
movieClip 334 {
}
movieClip 336 {
}
movieClip 338 {
}
movieClip 340 {
}
movieClip 342 {
}
movieClip 343 {
}
movieClip 344 {
frame 704 {
_root.nextFrame();
}
}
frame 7 {
stop();
}
button 364 {
on (release) {
stopAllSounds();
_root.xCleared = 0;
_root.xColl = 0;
_root.xLights = 0;
_root.xTrav = 0;
_root.clearStuff(2);
}
}
movieClip 365 {
}
movieClip 366 {
frame 50 {
stop();
}
}