Frame 2
stop();
play.onPress = function () {
gotoAndPlay (3);
};
howto.onPress = function () {
attachMovie("howtoplay", "howtoplay", this.getNextHighestDepth, {_x:100, _y:0});
};
_root.howtoplay.cont.onPress = function () {
removeMovieClip("_root.howtoplay");
attachMovie("howtoplay2", "howtoplay2", this.getNextHighestDepth, {_x:100, _y:0});
};
closebutton.onPress = function () {
removeMovieClip("howtoplay2");
};
source.onPress = function () {
getURL ("http://www.geheee.com", "_blank");
};
Frame 3
vol = 100;
var musictrack1 = new Sound();
var musictrack2 = new Sound();
musictrack2.attachSound("song2");
musictrack1.attachSound("song1");
musictrack1.start();
songtitle = "Omegabyte";
songnumber = 1;
musictrack1.onSoundComplete = function () {
musictrack1.stop();
musictrack2.start();
songtitle = "Trancetype";
songnumber = 2;
};
musictrack2.onSoundComplete = function () {
musictrack2.stop();
musictrack1.start();
songtitle = "Omegabyte";
songnumber = 1;
};
attachMovie("map", "map", 9000, {_x:0, _y:0});
numofcarsleft = 0;
numofcarsright = 0;
numofcarsdown = 0;
numofcarsup = 0;
timer = 0;
carsdone = 0;
addedcars = 0;
_root.submitted = 0;
carfreq = 25;
xpos1 = 96;
ypos1 = 96;
xpos2 = 216;
ypos2 = 96;
xpos3 = 360;
ypos3 = 96;
xpos4 = 456;
ypos4 = 96;
xpos5 = 96;
ypos5 = 240;
xpos6 = 216;
ypos6 = 240;
xpos7 = 360;
ypos7 = 240;
xpos8 = 456;
ypos8 = 240;
xpos9 = 96;
ypos9 = 360;
xpos10 = 216;
ypos10 = 360;
xpos11 = 360;
ypos11 = 360;
xpos12 = 456;
ypos12 = 360;
Frame 4
nexttrack.onPress = function () {
if (songnumber == 1) {
musictrack1.stop();
musictrack2.start();
songtitle = "Trancetype";
songnumber = 2;
} else if (songnumber == 2) {
musictrack2.stop();
musictrack1.start();
songtitle = "Omegabyte";
songnumber = 1;
}
};
lasttrack.onPress = function () {
if (songnumber == 1) {
musictrack1.stop();
musictrack2.start();
songtitle = "Trancetype";
songnumber = 2;
} else if (songnumber == 2) {
musictrack2.stop();
musictrack1.start();
songtitle = "Omegabyte";
songnumber = 1;
}
};
volup.onPress = function () {
vol = vol + 10;
if (vol > 100) {
vol = 100;
}
musictrack1.setVolume(vol);
musictrack2.setVolume(vol);
};
voldown.onPress = function () {
vol = vol - 10;
if (vol < 0) {
vol = 0;
}
musictrack1.setVolume(vol);
musictrack2.setVolume(vol);
};
queue = 0;
var n = 1;
while (n <= numofcarsright) {
if (1 == eval ("carrightok" + n)) {
xpos = eval (("carright" add n) add "._x");
ypos = eval (("carright" add n) add "._y");
movecar = 0;
if (552 < xpos) {
removeMovieClip(eval ("carright" add n));
carsdone = carsdone + 1;
Set("carrightok" + n, 0);
} else if (104 == ypos) {
if ((((((xpos < 62) && (xpos > 58)) && (_root.map.trafficlight1.state == 0)) || (((xpos < 182) && (xpos > 178)) && (_root.map.trafficlight2.state == 0))) || (((xpos < 326) && (xpos > 322)) && (_root.map.trafficlight3.state == 0))) || (((xpos < 422) && (xpos > 418)) && (_root.map.trafficlight4.state == 0))) {
movecar = 0;
} else {
movecar = 1;
}
} else if (248 == ypos) {
if ((((((xpos < 62) && (xpos > 58)) && (_root.map.trafficlight5.state == 0)) || (((xpos < 182) && (xpos > 178)) && (_root.map.trafficlight6.state == 0))) || (((xpos < 326) && (xpos > 322)) && (_root.map.trafficlight7.state == 0))) || (((xpos < 422) && (xpos > 418)) && (_root.map.trafficlight8.state == 0))) {
movecar = 0;
} else {
movecar = 1;
}
} else if (368 == ypos) {
if ((((((xpos < 62) && (xpos > 58)) && (_root.map.trafficlight9.state == 0)) || (((xpos < 182) && (xpos > 178)) && (_root.map.trafficlight10.state == 0))) || (((xpos < 326) && (xpos > 322)) && (_root.map.trafficlight11.state == 0))) || (((xpos < 422) && (xpos > 418)) && (_root.map.trafficlight12.state == 0))) {
movecar = 0;
} else {
movecar = 1;
}
} else {
movecar = 1;
}
if (movecar == 1) {
movecarfinal = 1;
var p = 1;
while (p <= numofcarsright) {
movieclip = eval ("carright" add p);
if (movieclip.hitTest(xpos + 17, ypos, true)) {
if (p != n) {
movecarfinal = 0;
}
}
p++;
}
if (((((60 <= xpos) && (132 >= xpos)) || ((180 <= xpos) && (252 >= xpos))) || ((324 <= xpos) && (396 >= xpos))) || ((420 <= xpos) && (492 >= xpos))) {
var r = 1;
while (r <= numofcarsdown) {
if ((((xpos > (eval (("cardown" add r) add "._x") - 26)) && (xpos < eval (("cardown" add r) add "._x"))) && (ypos > (eval (("cardown" add r) add "._y") - eval ("cardownlength" + r)))) && (ypos < (eval (("cardown" add r) add "._y") + 15))) {
movecarfinal = 0;
}
r++;
}
var r = 1;
while (r <= numofcarsup) {
if ((((xpos > (eval (("carup" add r) add "._x") - 26)) && (xpos < eval (("carup" add r) add "._x"))) && (ypos > (eval (("carup" add r) add "._y") - 15))) && (ypos < (eval (("carup" add r) add "._y") + eval ("caruplength" + r)))) {
movecarfinal = 0;
}
r++;
}
}
}
if (movecarfinal == 1) {
setProperty(eval ("carright" add n), _x , eval (("carright" add n) add "._x") + eval ("carrightspeed" + n));
}
if (0 == xpos) {
queue = queue + 1;
}
movecarfinal = 0;
}
n++;
}
var n = 1;
while (n <= numofcarsleft) {
if (1 == eval ("carleftok" + n)) {
xpos = eval (("carleft" add n) add "._x");
ypos = eval (("carleft" add n) add "._y");
movecar = 0;
if (0 > xpos) {
removeMovieClip(eval ("carleft" add n));
carsdone = carsdone + 1;
Set("carleftok" + n, 0);
}
if (84 == ypos) {
if ((((((xpos < 134) && (xpos > 130)) && (_root.map.trafficlight1.state == 0)) || (((xpos < 254) && (xpos > 250)) && (_root.map.trafficlight2.state == 0))) || (((xpos < 398) && (xpos > 394)) && (_root.map.trafficlight3.state == 0))) || (((xpos > 490) && (xpos < 494)) && (_root.map.trafficlight4.state == 0))) {
movecar = 0;
} else {
movecar = 1;
}
} else if (228 == ypos) {
if ((((((xpos < 134) && (xpos > 130)) && (_root.map.trafficlight5.state == 0)) || (((xpos < 254) && (xpos > 250)) && (_root.map.trafficlight6.state == 0))) || (((xpos < 398) && (xpos > 394)) && (_root.map.trafficlight7.state == 0))) || (((xpos > 490) && (xpos < 494)) && (_root.map.trafficlight8.state == 0))) {
movecar = 0;
} else {
movecar = 1;
}
} else if (348 == ypos) {
if ((((((xpos < 134) && (xpos > 130)) && (_root.map.trafficlight9.state == 0)) || (((xpos < 254) && (xpos > 250)) && (_root.map.trafficlight10.state == 0))) || (((xpos < 398) && (xpos > 394)) && (_root.map.trafficlight11.state == 0))) || (((xpos > 490) && (xpos < 494)) && (_root.map.trafficlight12.state == 0))) {
movecar = 0;
} else {
movecar = 1;
}
} else {
movecar = 1;
}
if (movecar == 1) {
movecarfinal = 1;
var p = 1;
while (p <= numofcarsleft) {
movieclip = eval ("carleft" add p);
if (movieclip.hitTest(xpos - 17, ypos, true)) {
if (p != n) {
movecarfinal = 0;
}
}
p++;
}
if (((((60 <= xpos) && (132 >= xpos)) || ((180 <= xpos) && (252 >= xpos))) || ((324 <= xpos) && (396 >= xpos))) || ((420 <= xpos) && (492 >= xpos))) {
var r = 1;
while (r <= numofcarsdown) {
if ((((xpos > eval (("cardown" add r) add "._x")) && (xpos < (eval (("cardown" add r) add "._x") + 26))) && (ypos > (eval (("cardown" add r) add "._y") - eval ("cardownlength" + r)))) && (ypos < (eval (("cardown" add r) add "._y") + 15))) {
movecarfinal = 0;
}
r++;
}
var r = 1;
while (r <= numofcarsup) {
if ((((xpos > eval (("carup" add r) add "._x")) && (xpos < (eval (("carup" add r) add "._x") + 26))) && (ypos > (eval (("carup" add r) add "._y") - 15))) && (ypos < (eval (("carup" add r) add "._y") + eval ("caruplength" + r)))) {
movecarfinal = 0;
}
r++;
}
}
}
if (movecarfinal == 1) {
setProperty(eval ("carleft" add n), _x , eval (("carleft" add n) add "._x") - eval ("carleftspeed" + n));
}
if (552 == xpos) {
queue = queue + 1;
}
movecarfinal = 0;
}
n++;
}
var m = 1;
while (m <= numofcarsdown) {
if (1 == eval ("cardownok" + m)) {
xpos = eval (("cardown" add m) add "._x");
ypos = eval (("cardown" add m) add "._y");
movecar = 0;
if (456 < ypos) {
removeMovieClip(eval ("cardown" add m));
carsdone = carsdone + 1;
Set("cardownok" + m, 0);
}
if ((ypos > 58) && (ypos < 62)) {
if (((((84 == xpos) && (_root.map.trafficlight1.state == 1)) || ((204 == xpos) && (_root.map.trafficlight2.state == 1))) || ((348 == xpos) && (_root.map.trafficlight3.state == 1))) || ((444 == xpos) && (_root.map.trafficlight4.state == 1))) {
movecar = 0;
} else {
movecar = 1;
}
} else if ((ypos > 202) && (ypos < 206)) {
if (((((84 == xpos) && (_root.map.trafficlight5.state == 1)) || ((204 == xpos) && (_root.map.trafficlight6.state == 1))) || ((348 == xpos) && (_root.map.trafficlight7.state == 1))) || ((444 == xpos) && (_root.map.trafficlight8.state == 1))) {
movecar = 0;
} else {
movecar = 1;
}
} else if ((ypos > 322) && (ypos < 326)) {
if (((((84 == xpos) && (_root.map.trafficlight9.state == 1)) || ((204 == xpos) && (_root.map.trafficlight10.state == 1))) || ((348 == xpos) && (_root.map.trafficlight11.state == 1))) || ((444 == xpos) && (_root.map.trafficlight12.state == 1))) {
movecar = 0;
} else {
movecar = 1;
}
} else {
movecar = 1;
}
if (movecar == 1) {
movecarfinal = 1;
var q = 1;
while (q <= numofcarsdown) {
movieclip = eval ("cardown" add q);
if (movieclip.hitTest(xpos, ypos + 17, true)) {
if (q != m) {
movecarfinal = 0;
}
}
q++;
}
if ((((60 <= eval (("cardown" add m) add "._y")) && (132 >= eval (("cardown" add m) add "._y"))) || ((204 <= eval (("cardown" add m) add "._y")) && (272 >= eval (("cardown" add m) add "._y")))) || ((324 <= eval (("cardown" add m) add "._y")) && (396 >= eval (("cardown" add m) add "._y")))) {
var s = 1;
while (s <= numofcarsright) {
if ((((ypos > (eval (("carright" add s) add "._y") - 26)) && (ypos < eval (("carright" add s) add "._y"))) && (xpos > (eval (("carright" add s) add "._x") - eval ("carrightlength" + s)))) && (xpos < (eval (("carright" add s) add "._x") + 15))) {
movecarfinal = 0;
}
s++;
}
var s = 1;
while (s <= numofcarsleft) {
if ((((ypos > (eval (("carleft" add s) add "._y") - 26)) && (ypos < eval (("carleft" add s) add "._y"))) && (xpos > (eval (("carleft" add s) add "._x") - 15))) && (xpos < (eval (("carleft" add s) add "._x") + eval ("carleftlength" + s)))) {
movecarfinal = 0;
}
s++;
}
}
}
if (movecarfinal == 1) {
setProperty(eval ("cardown" add m), _y , eval (("cardown" add m) add "._y") + eval ("cardownspeed" + m));
}
if (0 == ypos) {
queue = queue + 1;
}
movecarfinal = 0;
}
m++;
}
var m = 1;
while (m <= numofcarsup) {
if (1 == eval ("carupok" + m)) {
xpos = eval (("carup" add m) add "._x");
ypos = eval (("carup" add m) add "._y");
movecar = 0;
if (0 > ypos) {
removeMovieClip(eval ("carup" add m));
carsdone = carsdone + 1;
Set("carupok" + m, 0);
}
if ((ypos > 130) && (ypos < 134)) {
if (((((104 == xpos) && (_root.map.trafficlight1.state == 1)) || ((224 == xpos) && (_root.map.trafficlight2.state == 1))) || ((368 == xpos) && (_root.map.trafficlight3.state == 1))) || ((464 == xpos) && (_root.map.trafficlight4.state == 1))) {
movecar = 0;
} else {
movecar = 1;
}
} else if ((ypos > 274) && (ypos < 278)) {
if (((((104 == xpos) && (_root.map.trafficlight5.state == 1)) || ((224 == xpos) && (_root.map.trafficlight6.state == 1))) || ((368 == xpos) && (_root.map.trafficlight7.state == 1))) || ((464 == xpos) && (_root.map.trafficlight8.state == 1))) {
movecar = 0;
} else {
movecar = 1;
}
} else if ((ypos > 394) && (ypos < 398)) {
if (((((104 == xpos) && (_root.map.trafficlight9.state == 1)) || ((224 == xpos) && (_root.map.trafficlight10.state == 1))) || ((368 == xpos) && (_root.map.trafficlight11.state == 1))) || ((464 == xpos) && (_root.map.trafficlight12.state == 1))) {
movecar = 0;
} else {
movecar = 1;
}
} else {
movecar = 1;
}
if (movecar == 1) {
movecarfinal = 1;
var q = 1;
while (q <= numofcarsup) {
movieclip = eval ("carup" add q);
if (movieclip.hitTest(xpos, ypos - 17, true)) {
if (q != m) {
movecarfinal = 0;
}
}
q++;
}
if ((((60 <= ypos) && (132 >= ypos)) || ((204 <= ypos) && (272 >= ypos))) || ((324 <= ypos) && (396 >= ypos))) {
var s = 1;
while (s <= numofcarsright) {
if ((((ypos > eval (("carright" add s) add "._y")) && (ypos < (eval (("carright" add s) add "._y") + 26))) && (xpos > (eval (("carright" add s) add "._x") - eval ("carrightlength" + s)))) && (xpos < (eval (("carright" add s) add "._x") + 15))) {
movecarfinal = 0;
}
s++;
}
var s = 1;
while (s <= numofcarsleft) {
if ((((ypos > eval (("carleft" add s) add "._y")) && (ypos < (eval (("carleft" add s) add "._y") + 26))) && (xpos > (eval (("carleft" add s) add "._x") - 15))) && (xpos < (eval (("carleft" add s) add "._x") + eval ("carleftlength" + s)))) {
movecarfinal = 0;
}
s++;
}
}
}
if (movecarfinal == 1) {
setProperty(eval ("carup" add m), _y , eval (("carup" add m) add "._y") - eval ("carupspeed" + m));
}
if (456 == ypos) {
queue = queue + 1;
}
movecarfinal = 0;
}
m++;
}
_root.map.trafficlight1.onPress = function () {
if (_root.map.trafficlight1.state == 1) {
removeMovieClip("_root.map.trafficlightpicture1");
attachMovie("trafficlightupdown", "trafficlightpicture1", 10013, {_x:xpos1, _y:_root.ypos1});
_root.map.trafficlight1.state = 0;
} else {
removeMovieClip("_root.map.trafficlightpicture1");
attachMovie("trafficlightleftright", "trafficlightpicture1", 10013, {_x:xpos1, _y:ypos1});
_root.map.trafficlight1.state = 1;
}
};
_root.map.trafficlight2.onPress = function () {
if (_root.map.trafficlight2.state == 1) {
_removeMovieClip("_root.map.trafficlightpicture2");
attachMovie("trafficlightupdown", "trafficlightpicture2", 10002, {_x:xpos2, _y:_root.ypos2});
_root.map.trafficlight2.state = 0;
} else {
removeMovieClip("_root.map.trafficlightpicture2");
attachMovie("trafficlightleftright", "trafficlightpicture2", 10002, {_x:xpos2, _y:ypos2});
_root.map.trafficlight2.state = 1;
}
};
_root.map.trafficlight3.onPress = function () {
if (_root.map.trafficlight3.state == 1) {
removeMovieClip("_root.map.trafficlightpicture3");
attachMovie("trafficlightupdown", "trafficlightpicture3", 10003, {_x:xpos3, _y:_root.ypos3});
_root.map.trafficlight3.state = 0;
} else {
removeMovieClip("_root.map.trafficlightpicture3");
attachMovie("trafficlightleftright", "trafficlightpicture3", 10003, {_x:xpos3, _y:ypos3});
_root.map.trafficlight3.state = 1;
}
};
_root.map.trafficlight4.onPress = function () {
if (_root.map.trafficlight4.state == 1) {
_removeMovieClip("_root.map.trafficlightpicture4");
attachMovie("trafficlightupdown", "trafficlightpicture4", 10004, {_x:xpos4, _y:_root.ypos4});
_root.map.trafficlight4.state = 0;
} else {
removeMovieClip("_root.map.trafficlightpicture4");
attachMovie("trafficlightleftright", "trafficlightpicture4", 10004, {_x:xpos4, _y:ypos4});
_root.map.trafficlight4.state = 1;
}
};
_root.map.trafficlight5.onPress = function () {
if (_root.map.trafficlight5.state == 1) {
removeMovieClip("_root.map.trafficlightpicture5");
attachMovie("trafficlightupdown", "trafficlightpicture5", 10005, {_x:xpos5, _y:_root.ypos5});
_root.map.trafficlight5.state = 0;
} else {
removeMovieClip("_root.map.trafficlightpicture5");
attachMovie("trafficlightleftright", "trafficlightpicture5", 10005, {_x:xpos5, _y:ypos5});
_root.map.trafficlight5.state = 1;
}
};
_root.map.trafficlight6.onPress = function () {
if (_root.map.trafficlight6.state == 1) {
removeMovieClip("_root.map.trafficlightpicture6");
attachMovie("trafficlightupdown", "trafficlightpicture6", 10006, {_x:xpos6, _y:_root.ypos6});
_root.map.trafficlight6.state = 0;
} else {
removeMovieClip("_root.map.trafficlightpicture6");
attachMovie("trafficlightleftright", "trafficlightpicture6", 10006, {_x:xpos6, _y:ypos6});
_root.map.trafficlight6.state = 1;
}
};
_root.map.trafficlight7.onPress = function () {
if (_root.map.trafficlight7.state == 1) {
removeMovieClip("_root.map.trafficlightpicture7");
attachMovie("trafficlightupdown", "trafficlightpicture7", 10007, {_x:xpos7, _y:_root.ypos7});
_root.map.trafficlight7.state = 0;
} else {
removeMovieClip("_root.map.trafficlightpicture1");
attachMovie("trafficlightleftright", "trafficlightpicture7", 10007, {_x:xpos7, _y:ypos7});
_root.map.trafficlight7.state = 1;
}
};
_root.map.trafficlight8.onPress = function () {
if (_root.map.trafficlight8.state == 1) {
removeMovieClip("_root.map.trafficlightpicture8");
attachMovie("trafficlightupdown", "trafficlightpicture8", 10008, {_x:xpos8, _y:_root.ypos8});
_root.map.trafficlight8.state = 0;
} else {
removeMovieClip("_root.map.trafficlightpicture8");
attachMovie("trafficlightleftright", "trafficlightpicture8", 10008, {_x:xpos8, _y:ypos8});
_root.map.trafficlight8.state = 1;
}
};
_root.map.trafficlight9.onPress = function () {
if (_root.map.trafficlight9.state == 1) {
removeMovieClip("_root.map.trafficlightpicture9");
attachMovie("trafficlightupdown", "trafficlightpicture9", 10009, {_x:xpos9, _y:_root.ypos9});
_root.map.trafficlight9.state = 0;
} else {
removeMovieClip("_root.map.trafficlightpicture9");
attachMovie("trafficlightleftright", "trafficlightpicture9", 10009, {_x:xpos9, _y:ypos9});
_root.map.trafficlight9.state = 1;
}
};
_root.map.trafficlight10.onPress = function () {
if (_root.map.trafficlight10.state == 1) {
removeMovieClip("_root.map.trafficlightpicture10");
attachMovie("trafficlightupdown", "trafficlightpicture10", 10010, {_x:xpos10, _y:_root.ypos10});
_root.map.trafficlight10.state = 0;
} else {
removeMovieClip("_root.map.trafficlightpicture10");
attachMovie("trafficlightleftright", "trafficlightpicture10", 10010, {_x:xpos10, _y:ypos10});
_root.map.trafficlight10.state = 1;
}
};
_root.map.trafficlight11.onPress = function () {
if (_root.map.trafficlight11.state == 1) {
removeMovieClip("_root.map.trafficlightpicture11");
attachMovie("trafficlightupdown", "trafficlightpicture11", 10011, {_x:xpos11, _y:_root.ypos11});
_root.map.trafficlight11.state = 0;
} else {
removeMovieClip("_root.map.trafficlightpicture11");
attachMovie("trafficlightleftright", "trafficlightpicture11", 10011, {_x:xpos11, _y:ypos11});
_root.map.trafficlight11.state = 1;
}
};
_root.map.trafficlight12.onPress = function () {
if (_root.map.trafficlight12.state == 1) {
removeMovieClip("_root.map.trafficlightpicture12");
attachMovie("trafficlightupdown", "trafficlightpicture12", 10012, {_x:xpos12, _y:_root.ypos12});
_root.map.trafficlight12.state = 0;
} else {
removeMovieClip("_root.map.trafficlightpicture12");
attachMovie("trafficlightleftright", "trafficlightpicture12", 10012, {_x:xpos12, _y:ypos12});
_root.map.trafficlight12.state = 1;
}
};
Frame 5
if (queue == 5) {
gotoAndStop (6);
}
if (carsdone >= 20) {
carfreq = 22;
}
if (carsdone >= 40) {
carfreq = 20;
}
if (carsdone >= 60) {
carfreq = 17;
}
if (carsdone >= 80) {
carfreq = 15;
}
if (carsdone >= 100) {
carfreq = 12;
}
if (carsdone >= 120) {
carfreq = 10;
}
if (carsdone >= 140) {
carfreq = 7;
}
if (carsdone >= 160) {
carfreq = 5;
}
if (timer >= carfreq) {
cartype = random(4) + 1;
carsort = random(3) + 1;
if (cartype == 1) {
carposition = random(3) + 1;
addedcars = addedcars + 1;
numofcarsright = numofcarsright + 1;
if (carsort == 1) {
Set("carrightspeed" + numofcarsright, 3);
Set("carrightlength" + numofcarsright, 15);
Set("carrightsort" + numofcarsright, "carright");
} else if (carsort == 2) {
Set("carrightspeed" + numofcarsright, 2.5);
Set("carrightlength" + numofcarsright, 39);
Set("carrightsort" + numofcarsright, "truckright");
} else if (carsort == 3) {
Set("carrightspeed" + numofcarsright, 3.5);
Set("carrightlength" + numofcarsright, 15);
Set("carrightsort" + numofcarsright, "sportsright");
}
if (carposition == 1) {
attachMovie(eval ("carrightsort" + numofcarsright), "carright" add numofcarsright, 100000 + addedcars, {_x:0, _y:104});
} else if (carposition == 2) {
attachMovie(eval ("carrightsort" + numofcarsright), "carright" add numofcarsright, 100000 + addedcars, {_x:0, _y:248});
} else if (carposition == 3) {
attachMovie(eval ("carrightsort" + numofcarsright), "carright" add numofcarsright, 100000 + addedcars, {_x:0, _y:368});
}
timer = 0;
Set("carrightok" + numofcarsright, 1);
} else if (cartype == 2) {
carposition = random(4) + 1;
addedcars = addedcars + 1;
numofcarsdown = numofcarsdown + 1;
if (carsort == 1) {
Set("cardownspeed" + numofcarsdown, 3);
Set("cardownlength" + numofcarsdown, 15);
Set("cardownsort" + numofcarsdown, "cardown");
} else if (carsort == 2) {
Set("cardownspeed" + numofcarsdown, 2.5);
Set("cardownlength" + numofcarsdown, 39);
Set("cardownsort" + numofcarsdown, "truckdown");
} else if (carsort == 3) {
Set("cardownspeed" + numofcarsdown, 3.5);
Set("cardownlength" + numofcarsdown, 15);
Set("cardownsort" + numofcarsdown, "sportsdown");
}
if (carposition == 1) {
attachMovie(eval ("cardownsort" + numofcarsdown), "cardown" add numofcarsdown, 100000 + addedcars, {_x:84, _y:0});
} else if (carposition == 2) {
attachMovie(eval ("cardownsort" + numofcarsdown), "cardown" add numofcarsdown, 100000 + addedcars, {_x:204, _y:0});
} else if (carposition == 3) {
attachMovie(eval ("cardownsort" + numofcarsdown), "cardown" add numofcarsdown, 100000 + addedcars, {_x:348, _y:0});
} else if (carposition == 4) {
attachMovie(eval ("cardownsort" + numofcarsdown), "cardown" add numofcarsdown, 100000 + addedcars, {_x:444, _y:0});
}
timer = 0;
Set("cardownok" + numofcarsdown, 1);
} else if (cartype == 3) {
carposition = random(3) + 1;
addedcars = addedcars + 1;
numofcarsleft = numofcarsleft + 1;
if (carsort == 1) {
Set("carleftspeed" + numofcarsleft, 3);
Set("carleftlength" + numofcarsleft, 15);
Set("carleftsort" + numofcarsleft, "carleft");
} else if (carsort == 2) {
Set("carleftspeed" + numofcarsleft, 2.5);
Set("carleftlength" + numofcarsleft, 39);
Set("carleftsort" + numofcarsleft, "truckleft");
} else if (carsort == 3) {
Set("carleftspeed" + numofcarsleft, 3.5);
Set("carleftlength" + numofcarsleft, 15);
Set("carleftsort" + numofcarsleft, "sportsleft");
}
if (carposition == 1) {
attachMovie(eval ("carleftsort" + numofcarsleft), "carleft" add numofcarsleft, 100000 + addedcars, {_x:552, _y:84});
} else if (carposition == 2) {
attachMovie(eval ("carleftsort" + numofcarsleft), "carleft" add numofcarsleft, 100000 + addedcars, {_x:552, _y:228});
} else if (carposition == 3) {
attachMovie(eval ("carleftsort" + numofcarsleft), "carleft" add numofcarsleft, 100000 + addedcars, {_x:552, _y:348});
}
timer = 0;
Set("carleftok" + numofcarsleft, 1);
} else if (cartype == 4) {
carposition = random(4) + 1;
addedcars = addedcars + 1;
numofcarsup = numofcarsup + 1;
if (carsort == 1) {
Set("carupspeed" + numofcarsup, 3);
Set("caruplength" + numofcarsup, 15);
Set("carupsort" + numofcarsup, "carup");
} else if (carsort == 2) {
Set("carupspeed" + numofcarsup, 2.5);
Set("caruplength" + numofcarsup, 39);
Set("carupsort" + numofcarsup, "truckup");
} else if (carsort == 3) {
Set("carupspeed" + numofcarsup, 3.5);
Set("caruplength" + numofcarsup, 15);
Set("carupsort" + numofcarsup, "sportsup");
}
if (carposition == 1) {
attachMovie(eval ("carupsort" + numofcarsup), "carup" add numofcarsup, 100000 + addedcars, {_x:104, _y:456});
} else if (carposition == 2) {
attachMovie(eval ("carupsort" + numofcarsup), "carup" add numofcarsup, 100000 + addedcars, {_x:224, _y:456});
} else if (carposition == 3) {
attachMovie(eval ("carupsort" + numofcarsup), "carup" add numofcarsup, 100000 + addedcars, {_x:368, _y:456});
} else if (carposition == 4) {
attachMovie(eval ("carupsort" + numofcarsup), "carup" add numofcarsup, 100000 + addedcars, {_x:464, _y:456});
}
timer = 0;
Set("carupok" + numofcarsup, 1);
}
}
timer = timer + 1;
gotoAndPlay (4);
Frame 6
attachMovie("youlose", "youlose", this.getNextHighestDepth(), {_x:0, _y:0});
musictrack1.stop();
musictrack2.stop();
stop();
_root.youlose.playagain.onPress = function () {
removeMovieClip("_root.map");
removeMovieClip("_root.map.trafficlightpicture1");
removeMovieClip("_root.map.trafficlightpicture2");
removeMovieClip("_root.map.trafficlightpicture3");
removeMovieClip("_root.map.trafficlightpicture4");
removeMovieClip("_root.map.trafficlightpicture5");
removeMovieClip("_root.map.trafficlightpicture6");
removeMovieClip("_root.map.trafficlightpicture7");
removeMovieClip("_root.map.trafficlightpicture8");
removeMovieClip("_root.map.trafficlightpicture9");
removeMovieClip("_root.map.trafficlightpicture10");
removeMovieClip("_root.map.trafficlightpicture11");
removeMovieClip("_root.map.trafficlightpicture12");
removeMovieClip("trafficlightpicture1");
removeMovieClip("trafficlightpicture2");
removeMovieClip("trafficlightpicture3");
removeMovieClip("trafficlightpicture4");
removeMovieClip("trafficlightpicture5");
removeMovieClip("trafficlightpicture6");
removeMovieClip("trafficlightpicture7");
removeMovieClip("trafficlightpicture8");
removeMovieClip("trafficlightpicture9");
removeMovieClip("trafficlightpicture10");
removeMovieClip("trafficlightpicture11");
removeMovieClip("trafficlightpicture12");
var n = 1;
while (n <= numofcarsright) {
removeMovieClip(eval ("_root.carright" add n));
n++;
}
var n = 1;
while (n <= numofcarsleft) {
removeMovieClip(eval ("_root.carleft" add n));
n++;
}
var n = 1;
while (n <= numofcarsup) {
removeMovieClip(eval ("_root.carup" add n));
n++;
}
var n = 1;
while (n <= numofcarsdown) {
removeMovieClip(eval ("_root.cardown" add n));
n++;
}
removeMovieClip("_root.youlose");
gotoAndPlay (2);
};
Symbol 3 MovieClip [map] Frame 1
M0 = new Array(0, 0, 0, 1, 2, 9, 0, 0, 1, 2, 0, 0, 0, 0, 1, 2, 0, 0, 1, 2, 10, 0, 0);
M1 = new Array(0, 7, 0, 1, 2, 0, 0, 0, 1, 2, 0, 9, 0, 0, 1, 2, 9, 0, 1, 2, 0, 0, 0);
M2 = new Array(0, 0, 0, 1, 2, 0, 0, 0, 1, 2, 0, 0, 0, 0, 1, 2, 0, 0, 1, 2, 0, 0, 0);
M3 = new Array(3, 3, 3, 5, 6, 3, 3, 3, 5, 6, 3, 3, 3, 3, 5, 6, 3, 3, 5, 6, 3, 3, 3);
M4 = new Array(4, 4, 4, 6, 6, 4, 4, 4, 6, 6, 4, 4, 4, 4, 6, 6, 4, 4, 6, 6, 4, 4, 4);
M5 = new Array(9, 0, 0, 1, 2, 9, 0, 0, 1, 2, 8, 0, 0, 0, 1, 2, 9, 0, 1, 2, 9, 0, 0);
M6 = new Array(0, 0, 0, 1, 2, 0, 0, 0, 1, 2, 0, 0, 0, 0, 1, 2, 0, 0, 1, 2, 0, 0, 0);
M7 = new Array(9, 0, 0, 1, 2, 0, 9, 0, 1, 2, 0, 0, 0, 0, 1, 2, 9, 0, 1, 2, 9, 0, 0);
M8 = new Array(0, 0, 0, 1, 2, 0, 0, 0, 1, 2, 0, 0, 0, 0, 1, 2, 0, 0, 1, 2, 0, 0, 0);
M9 = new Array(3, 3, 3, 5, 6, 3, 3, 3, 5, 6, 3, 3, 3, 3, 5, 6, 3, 3, 5, 6, 3, 3, 3);
M10 = new Array(4, 4, 4, 6, 6, 4, 4, 4, 6, 6, 4, 4, 4, 4, 6, 6, 4, 4, 6, 6, 4, 4, 4);
M11 = new Array(0, 0, 0, 1, 2, 10, 0, 0, 1, 2, 0, 0, 0, 0, 1, 2, 0, 0, 1, 2, 9, 0, 0);
M12 = new Array(0, 7, 0, 1, 2, 0, 0, 0, 1, 2, 0, 0, 0, 0, 1, 2, 0, 0, 1, 2, 0, 0, 0);
M13 = new Array(0, 0, 0, 1, 2, 0, 0, 0, 1, 2, 0, 0, 0, 0, 1, 2, 0, 0, 1, 2, 0, 0, 0);
M14 = new Array(3, 3, 3, 5, 6, 3, 3, 3, 5, 6, 3, 3, 3, 3, 5, 6, 3, 3, 5, 6, 3, 3, 3);
M15 = new Array(4, 4, 4, 6, 6, 4, 4, 4, 6, 6, 4, 4, 4, 4, 6, 6, 4, 4, 6, 6, 4, 4, 4);
M16 = new Array(10, 0, 0, 1, 2, 0, 0, 0, 1, 2, 0, 0, 0, 0, 1, 2, 9, 0, 1, 2, 0, 0, 0);
M17 = new Array(0, 0, 0, 1, 2, 0, 7, 0, 1, 2, 0, 0, 7, 0, 1, 2, 0, 0, 1, 2, 0, 7, 0);
M18 = new Array(0, 0, 0, 1, 2, 0, 0, 0, 1, 2, 0, 0, 0, 0, 1, 2, 0, 0, 1, 2, 0, 0, 0);
trafficlightnumber = 1;
n3 = 1;
var n1 = 0;
while (n1 <= 18) {
var n2 = 0;
while (n2 <= 22) {
if (eval ("M" add n1)[n2] == 0) {
attachMovie("trees", (("trees" add n1) add "-") add n2, n3, {_x:n2 * 24, _y:n1 * 24});
}
if (eval ("M" add n1)[n2] == 1) {
attachMovie("road1", (("road1" add n1) add "-") add n2, n3, {_x:(n2 * 24) + 12, _y:(n1 * 24) + 12});
}
if (eval ("M" add n1)[n2] == 2) {
attachMovie("road2", (("road2" add n1) add "-") add n2, n3, {_x:(n2 * 24) + 12, _y:(n1 * 24) + 12});
}
if (eval ("M" add n1)[n2] == 3) {
attachMovie("road3", (("road3" add n1) add "-") add n2, n3, {_x:(n2 * 24) + 12, _y:(n1 * 24) + 12});
}
if (eval ("M" add n1)[n2] == 4) {
attachMovie("road4", (("road4" add n1) add "-") add n2, n3, {_x:(n2 * 24) + 12, _y:(n1 * 24) + 12});
}
if (eval ("M" add n1)[n2] == 10) {
attachMovie("building2", (("building2" add n1) add "-") add n2, 5000 + n3, {_x:n2 * 24, _y:n1 * 24});
}
if (eval ("M" add n1)[n2] == 7) {
attachMovie("building", (("building" add n1) add "-") add n2, 5000 + n3, {_x:(n2 * 24) + 12, _y:(n1 * 24) + 12});
}
if (eval ("M" add n1)[n2] == 8) {
attachMovie("stadium", (("stadium" add n1) add "-") add n2, 5000 + n3, {_x:n2 * 24, _y:n1 * 24});
}
if (eval ("M" add n1)[n2] == 9) {
attachMovie("house", (("house" add n1) add "-") add n2, 5000 + n3, {_x:n2 * 24, _y:n1 * 24});
}
if (eval ("M" add n1)[n2] == 5) {
attachMovie("trafficlight", "trafficlight" add trafficlightnumber, n3);
attachMovie("trafficlightleftright", "trafficlightpicture" add trafficlightnumber, n3 + 1, {_x:(n2 * 24) + 24, _y:(n1 * 24) + 24});
eval ("trafficlight" add trafficlightnumber)._x = (n2 + 1) * 24;
eval ("trafficlight" add trafficlightnumber)._y = (n1 + 1) * 24;
eval ("trafficlight" add trafficlightnumber).state = 1;
trafficlightnumber = trafficlightnumber + 1;
}
n3 = n3 + 2;
n2++;
}
n2 = 0;
n1++;
}
Symbol 81 MovieClip [howtoplay2] Frame 1
_root.howtoplay2.closebutton.onPress = function () {
removeMovieClip("_root.howtoplay2");
};
Symbol 86 MovieClip [howtoplay] Frame 1
_root.howtoplay.cont.onPress = function () {
removeMovieClip("_root.howtoplay");
attachMovie("howtoplay2", "howtoplay2", this.getNextHighestDepth, {_x:100, _y:0});
};
Symbol 96 Button
on (release) {
_root.play();
}
Symbol 97 MovieClip Frame 1
_root.stop();
PercentLoaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
if (PercentLoaded != 100) {
setProperty(bar, _xscale , PercentLoaded);
} else {
gotoAndStop ("loaded");
}
Symbol 97 MovieClip Frame 2
gotoAndPlay (1);