Frame 1
function preloadSite() {
var _local4 = _root.getBytesLoaded();
var _local3 = _root.getBytesTotal();
var _local2 = Math.round((_local4 / _local3) * 100);
percentage_txt.text = _local2;
loader_bar.gotoAndStop(_local2);
bytesDisplay.text = _local2 + "%";
if (_local4 >= _local3) {
clearInterval(loadingCall);
gotoAndStop ("Menu");
}
}
function gotoMySite() {
getURL ("http://www.cargames9.co.uk", "_blank");
}
stop();
loadingBar._xscale = 1;
var loadingCall = setInterval(preloadSite, 50);
var myMenu = new ContextMenu();
myMenu.hideBuiltInItems();
var mySiteLink = new ContextMenuItem("More Games", gotoMySite);
var copyrightNotice = new ContextMenuItem("@ www.cargames9.co.uk", gotoMySite);
myMenu.customItems.push(mySiteLink);
myMenu.customItems.push(copyrightNotice);
_root.menu = myMenu;
fscommand ("alloscale", false);
var menuPlayed = false;
_global.allsound = new Sound(_root);
var soundStatus = true;
Frame 2
stop();
Frame 3
function logo() {
logo_btn._visible = true;
sbbg._visible = true;
sound_mc._visible = true;
}
function moreGames() {
trace("moreGames called");
getURL ("http://www.cargames9.co.uk/", "_blank");
}
function startGame() {
gotoAndStop("level" + level);
}
function menuFunc(num) {
trace("menuFunc called " + num);
switch (num) {
case 1 :
menu_mc.sin.signals_mc.gotoAndPlay(2);
level = 1;
startGame();
break;
case 2 :
getURL ("http://cargames9.co.uk/score/UStraffic/", "_blank");
break;
case 3 :
var level = 1;
gotoAndStop ("help");
break;
case 4 :
moreGames();
break;
case 5 :
gotoAndStop ("levels");
}
}
stop();
if (_root.menuPlayed) {
} else {
logo_btn._visible = false;
sbbg._visible = false;
sound_mc._visible = false;
setTimeout(logo, 7500);
}
var level = 1;
var score = 0;
playerDetails = SharedObject.getLocal("user");
if (playerDetails.data.lev == undefined) {
trace("inside");
playerDetails.data.lev = level;
} else {
trace("defined");
level = playerDetails.data.lev;
}
var pkeyListener = new Object();
Key.addListener(pkeyListener);
var gamebg_snd = new Sound();
gamebg_snd.attachSound("gamebg_snd");
var menubg_snd = new Sound();
menubg_snd.attachSound("menubg_snd");
menubg_snd.start(0, 999);
var levelbg_snd = new Sound();
levelbg_snd.attachSound("levelbg_snd");
var btns_snd = new Sound();
btns_snd.attachSound("btns_snd");
var blast_snd = new Sound();
blast_snd.attachSound("blast_snd");
Instance of Symbol 129 MovieClip "sound_mc" in Frame 3
onClipEvent (load) {
if (_root.soundStatus) {
this.gotoAndPlay(2);
} else {
this.gotoAndStop(1);
}
}
on (release) {
if (this._currentframe == 1) {
this.gotoAndPlay(2);
_global.allsound.setVolume(100);
_root.soundStatus = true;
} else {
_root.soundStatus = false;
this.gotoAndStop(1);
_global.allsound.setVolume(0);
}
}
Frame 4
stop();
Frame 5
stopAllSounds();
levelbg_snd.start(0, 999);
var i = 1;
while (i <= 5) {
eval ("lev" + i).gotoAndStop(3);
eval ("levs" + i).enabled = false;
eval ("lev" + i).num = i;
i++;
}
var i = 1;
while (i <= level) {
eval ("lev" + i).gotoAndStop(2);
eval ("levs" + i).enabled = true;
eval ("lev" + i).number_txt.text = i;
eval ("levs" + i).onRollOver = function () {
btns_snd.start(0, 1);
};
eval ("levs" + i).onRelease = function () {
var _local2 = this._name;
_local2 = _local2.substr(_local2.length - 1, 1);
trace("str " + _local2);
level = Number(_local2);
gotoAndStop("level" + level);
};
i++;
}
Frame 6
function pauseGame() {
trace(("pauseGame " + isPaused) + " before");
ff.text = isPaused + "\n\n";
if (isPaused) {
trace("after " + isPaused);
trace("trace paused");
pause_mc._alpha = 0;
isPaused = false;
sound_mc.gotoAndPlay(2);
_global.allsound.setVolume(100);
minSpeed = 3;
maxSpeed = 6;
cover_mc._visible = false;
} else {
sound_mc.gotoAndStop(1);
pause_mc._alpha = 100;
pausegame_txt.text = "paused";
isPaused = true;
minSpeed = 0;
maxSpeed = 0;
cover_mc._visible = true;
_global.allsound.setVolume(0);
}
}
isPaused = false;
pause_mc._alpha = 0;
pkeyListener.onKeyDown = function () {
var _local1 = Key.getCode();
a.text = _local1;
if (_local1 == 80) {
pauseGame();
}
};
function gameOver() {
gotoAndStop ("EndGame");
}
function crash() {
var i = 1;
while (i <= totalLevels) {
eval (eval ("s1_1_" + i)).onEnterFrame = null;
eval (eval ("s2_1_" + i)).onEnterFrame = null;
eval (eval ("s3_1_" + i)).onEnterFrame = null;
eval (eval ("s4_1_" + i)).onEnterFrame = null;
i++;
}
setTimeout(gameOver, 1000);
}
function init() {
lc_mc._visible = false;
var i = 1;
while (i <= totalLevels) {
eval (("road" + i) + "_mc")._visible = false;
i++;
}
eval (("road" + level) + "_mc")._visible = true;
if (level == 2) {
distance = 250;
}
top();
setTimeout(right, 4000);
setTimeout(left, 8000);
setTimeout(bottom, 11000);
}
function playAgain() {
setTimeout(right, 4000);
setTimeout(left, 8000);
setTimeout(bottom, 11000);
}
function top() {
trace("top called " + minSpeed);
var i = 1;
while (i <= 5) {
var t2b_mc = eval ("s2_1_" + i);
t2b_mc._y = i * -200;
t2b_mc.speed = minSpeed;
t2b_mc.clicks = 0;
t2b_mc.num = i;
t2b_mc.gotoAndStop(1 + random(frames));
t2b_mc.onRelease = function () {
this.clicks++;
if (this.clicks == 1) {
this.speed = maxSpeed;
} else if (this.clicks == 2) {
this.speed = 0;
} else if (this.clicks == 3) {
this.speed = minSpeed;
this.clicks = 0;
}
};
t2b_mc.onEnterFrame = function () {
if (!isPaused) {
this._y = this._y + this.speed;
}
if ((this._y > 0) && (this._y < 500)) {
this.onstage = true;
} else {
this.onstage = false;
}
var j = 1;
while (j <= 5) {
var mc = eval ("s1_1_" + j);
if (this.hit.hitTest(mc.hit)) {
trace("hit hit");
addFire(this, 1);
mc.onEnterFrame = null;
this.onEnterFrame = null;
crash();
}
j++;
}
var j = 1;
while (j <= 5) {
var mc = eval ("s3_1_" + j);
if (this.hit.hitTest(mc.hit)) {
trace("hit hit");
addFire(this, 1);
mc.onEnterFrame = null;
this.onEnterFrame = null;
crash();
}
j++;
}
var j = 1;
while (j <= 5) {
var mc = eval ("s2_1_" + j);
if (((this.hit.hitTest(mc.hit) && (this != mc)) && (mc.onstage)) && (this.onstage)) {
trace("hit hit " + mc.onstage);
addFire(this, 1);
mc.onEnterFrame = null;
this.onEnterFrame = null;
crash();
}
j++;
}
if (this._y > 550) {
this._y = -2000;
this.speed = minSpeed;
this.clicks = 0;
cleared++;
score = score + 100;
checkLevelCompleted();
}
};
i++;
}
}
function right() {
var i = 1;
while (i <= 5) {
var t3b_mc = eval ("s3_1_" + i);
t3b_mc._x = 700 + (i * distance);
t3b_mc.speed = minSpeed;
t3b_mc.clicks = 0;
t3b_mc.num = i;
t3b_mc.gotoAndStop(1 + random(frames));
t3b_mc.onRelease = function () {
this.clicks++;
if (this.clicks == 1) {
this.speed = maxSpeed;
} else if (this.clicks == 2) {
this.speed = 0;
} else if (this.clicks == 3) {
this.speed = minSpeed;
this.clicks = 0;
}
};
t3b_mc.onEnterFrame = function () {
if (!isPaused) {
this._x = this._x - this.speed;
}
if ((this._x > 0) && (this._x < 700)) {
this.onstage = true;
} else {
this.onstage = false;
}
var j = 1;
while (j <= 5) {
var mc = eval ("s2_1_" + j);
if (this.hit.hitTest(mc.hit)) {
trace("hit hit");
addFire(this, 2);
mc.onEnterFrame = null;
this.onEnterFrame = null;
crash();
}
j++;
}
var j = 1;
while (j <= 5) {
var mc = eval ("s4_1_" + j);
if (this.hit.hitTest(mc.hit)) {
trace("hit hit");
addFire(this, 2);
mc.onEnterFrame = null;
this.onEnterFrame = null;
crash();
}
j++;
}
var j = 1;
while (j <= 5) {
var mc = eval ("s3_1_" + j);
if (((this.hit.hitTest(mc.hit) && (this != mc)) && (mc.onstage)) && (this.onstage)) {
trace("hit hit");
addFire(this, 2);
mc.onEnterFrame = null;
this.onEnterFrame = null;
crash();
}
j++;
}
if (this._x < -100) {
this._x = 2700;
this.speed = minSpeed;
this.clicks = 0;
cleared++;
score = score + 100;
checkLevelCompleted();
}
};
i++;
}
}
function left() {
trace("left");
var i = 1;
while (i <= 5) {
var t1b_mc = eval ("s1_1_" + i);
t1b_mc._x = i * (-distance);
t1b_mc.speed = minSpeed;
t1b_mc.clicks = 0;
t1b_mc.num = i;
t1b_mc.gotoAndStop(1 + random(frames));
t1b_mc.onRelease = function () {
this.clicks++;
if (this.clicks == 1) {
this.speed = maxSpeed;
} else if (this.clicks == 2) {
this.speed = 0;
} else if (this.clicks == 3) {
this.speed = minSpeed;
this.clicks = 0;
}
};
t1b_mc.onEnterFrame = function () {
if (!isPaused) {
this._x = this._x + this.speed;
}
if ((this._x > 0) && (this._x < 700)) {
this.onstage = true;
} else {
this.onstage = false;
}
var j = 1;
while (j <= 5) {
var mc = eval ("s2_1_" + j);
if (this.hit.hitTest(mc.hit)) {
trace("hit hit");
addFire(this, 3);
mc.onEnterFrame = null;
this.onEnterFrame = null;
crash();
}
j++;
}
var j = 1;
while (j <= 5) {
var mc = eval ("s4_1_" + j);
if (this.hit.hitTest(mc.hit)) {
trace("hit hit");
addFire(this, 3);
mc.onEnterFrame = null;
this.onEnterFrame = null;
crash();
}
j++;
}
var j = 1;
while (j <= 5) {
var mc = eval ("s1_1_" + j);
if (((this.hit.hitTest(mc.hit) && (this != mc)) && (mc.onstage)) && (this.onstage)) {
trace("hit hit");
addFire(this, 3);
mc.onEnterFrame = null;
this.onEnterFrame = null;
crash();
}
j++;
}
if (this._x > 750) {
this._x = -2000;
this.speed = minSpeed;
this.clicks = 0;
cleared++;
score = score + 100;
checkLevelCompleted();
}
};
i++;
}
}
function bottom() {
trace("bottom");
var i = 1;
while (i <= 5) {
var t4b_mc = eval ("s4_1_" + i);
if (level == 2) {
t4b_mc._x = 218.9;
}
t4b_mc._y = 500 + (i * distance);
t4b_mc.speed = minSpeed;
t4b_mc.clicks = 0;
t4b_mc.num = i;
t4b_mc.gotoAndStop(1 + random(frames));
t4b_mc.onRelease = function () {
this.clicks++;
if (this.clicks == 1) {
this.speed = maxSpeed;
} else if (this.clicks == 2) {
this.speed = 0;
} else if (this.clicks == 3) {
this.speed = minSpeed;
this.clicks = 0;
}
};
t4b_mc.onEnterFrame = function () {
if (!isPaused) {
this._y = this._y - this.speed;
}
if ((this._y > 0) && (this._y < 500)) {
this.onstage = true;
} else {
this.onstage = false;
}
var j = 1;
while (j <= 5) {
var mc = eval ("s1_1_" + j);
if (this.hit.hitTest(mc.hit)) {
trace("hit hit");
addFire(this, 4);
mc.onEnterFrame = null;
this.onEnterFrame = null;
crash();
}
j++;
}
var j = 1;
while (j <= 5) {
var mc = eval ("s3_1_" + j);
if (this.hit.hitTest(mc.hit)) {
trace("hit hit");
addFire(this, 4);
mc.onEnterFrame = null;
this.onEnterFrame = null;
crash();
}
j++;
}
var j = 1;
while (j <= 5) {
var mc = eval ("s4_1_" + j);
if (((this.hit.hitTest(mc.hit) && (this != mc)) && (mc.onstage)) && (this.onstage)) {
trace("hit hit");
addFire(this, 4);
mc.onEnterFrame = null;
this.onEnterFrame = null;
crash();
}
j++;
}
if (this._y < -100) {
this._y = 2500;
this.speed = minSpeed;
this.clicks = 0;
cleared++;
trace("cleared " + cleared);
score = score + 100;
checkLevelCompleted();
}
};
i++;
}
}
function checkLevelCompleted() {
trace("cleared " + cleared);
if (cleared >= 25) {
var i = 1;
while (i <= totalLevels) {
eval (eval ("s1_1_" + i)).onEnterFrame = null;
eval (eval ("s2_1_" + i)).onEnterFrame = null;
eval (eval ("s3_1_" + i)).onEnterFrame = null;
eval (eval ("s4_1_" + i)).onEnterFrame = null;
i++;
}
lc_mc._visible = true;
}
}
function nextLevel() {
level++;
playerDetails.data.lev = level;
lc_mc._visible = false;
nextFrame();
var i = 1;
while (i <= totalLevels) {
eval (eval ("s1_1_" + i)).removeMovieClip();
eval (eval ("s2_1_" + i)).removeMovieClip();
eval (eval ("s3_1_" + i)).removeMovieClip();
eval (eval ("s4_1_" + i)).removeMovieClip();
i++;
}
}
function addFire(mc, pos) {
blast_snd.start(0, 1);
trace("mc mc mc mc " + mc._currentframe);
if (!blastTimes) {
blastTimes = true;
_root.attachMovie("blast", "blast1", _root.getNextHighestDepth());
blast1._width = 100;
blast1._height = 100;
if (pos == 1) {
if (mc._currentframe == 9) {
blast1._x = mc._x;
blast1._y = mc._y + 50;
} else if ((mc._currentframe == 7) || (mc._currentframe == 8)) {
blast1._x = mc._x;
blast1._y = mc._y + 40;
} else {
blast1._x = mc._x;
blast1._y = mc._y + 30;
}
} else if (pos == 2) {
if (mc._currentframe == 9) {
blast1._y = mc._y;
blast1._x = mc._x - 50;
} else if ((mc._currentframe == 7) || (mc._currentframe == 8)) {
blast1._x = mc._x - 40;
blast1._y = mc._y;
} else {
blast1._x = mc._x - 30;
blast1._y = mc._y;
}
} else if (pos == 3) {
if (mc._currentframe == 9) {
blast1._x = mc._x + 50;
blast1._y = mc._y;
} else if ((mc._currentframe == 7) || (mc._currentframe == 8)) {
blast1._x = mc._x + 40;
blast1._y = mc._y;
} else {
blast1._x = mc._x + 30;
blast1._y = mc._y;
}
} else if (pos == 4) {
if (mc._currentframe == 9) {
blast1._x = mc._x;
blast1._y = mc._y - 50;
} else if ((mc._currentframe == 7) || (mc._currentframe == 8)) {
blast1._x = mc._x;
blast1._y = mc._y - 40;
} else {
blast1._x = mc._x;
blast1._y = mc._y - 30;
}
}
}
}
stopAllSounds();
gamebg_snd.start(0, 999);
stop();
var level = 1;
var frames = 9;
var distance = 400;
score = 0;
var cleared = 0;
var totalLevels = 5;
menuPlayed = true;
var blastTimes = false;
minSpeed = 3;
maxSpeed = 6;
cover_mc._visible = false;
init();
Instance of Symbol 170 MovieClip "s2_1_4" in Frame 6
/* no clip actions */
Instance of Symbol 170 MovieClip "s2_1_3" in Frame 6
/* no clip actions */
Instance of Symbol 170 MovieClip "s2_1_2" in Frame 6
/* no clip actions */
Instance of Symbol 170 MovieClip "s2_1_1" in Frame 6
/* no clip actions */
Instance of Symbol 170 MovieClip "s2_1_5" in Frame 6
/* no clip actions */
Instance of Symbol 170 MovieClip "s3_1_1" in Frame 6
/* no clip actions */
Instance of Symbol 170 MovieClip "s3_1_2" in Frame 6
/* no clip actions */
Instance of Symbol 170 MovieClip "s3_1_3" in Frame 6
/* no clip actions */
Instance of Symbol 170 MovieClip "s3_1_4" in Frame 6
/* no clip actions */
Instance of Symbol 170 MovieClip "s3_1_5" in Frame 6
/* no clip actions */
Instance of Symbol 170 MovieClip "s1_1_1" in Frame 6
/* no clip actions */
Instance of Symbol 170 MovieClip "s1_1_2" in Frame 6
/* no clip actions */
Instance of Symbol 170 MovieClip "s1_1_3" in Frame 6
/* no clip actions */
Instance of Symbol 170 MovieClip "s1_1_4" in Frame 6
/* no clip actions */
Instance of Symbol 170 MovieClip "s1_1_5" in Frame 6
/* no clip actions */
Instance of Symbol 170 MovieClip "s4_1_1" in Frame 6
/* no clip actions */
Instance of Symbol 170 MovieClip "s4_1_2" in Frame 6
/* no clip actions */
Instance of Symbol 170 MovieClip "s4_1_3" in Frame 6
/* no clip actions */
Instance of Symbol 170 MovieClip "s4_1_4" in Frame 6
/* no clip actions */
Instance of Symbol 170 MovieClip "s4_1_5" in Frame 6
/* no clip actions */
Instance of Symbol 202 MovieClip "cover_mc" in Frame 6
on (rollOver) {
this.useHandCursor = false;
}
Frame 7
function pauseGame() {
trace(("pauseGame " + isPaused) + " before");
ff.text = isPaused + "\n\n";
if (isPaused) {
trace("after " + isPaused);
trace("trace paused");
pause_mc1._alpha = 0;
isPaused = false;
sound_mc.gotoAndPlay(2);
_global.allsound.setVolume(100);
minSpeed = 3;
maxSpeed = 6;
cover_mc._visible = false;
} else {
sound_mc.gotoAndStop(1);
pause_mc.swapDepths(_root.getNextHighestDepth());
pause_mc1._alpha = 100;
pausegame_txt.text = "paused";
isPaused = true;
minSpeed = 0;
maxSpeed = 0;
cover_mc._visible = true;
_global.allsound.setVolume(0);
}
}
isPaused = false;
pause_mc1._alpha = 0;
pkeyListener.onKeyDown = function () {
var _local1 = Key.getCode();
a.text = _local1;
if (_local1 == 80) {
pauseGame();
}
};
function gameOver() {
gotoAndStop ("EndGame");
}
function crash() {
var i = 1;
while (i <= totalLevels) {
eval (eval ("s1_2_" + i)).onEnterFrame = null;
eval (eval ("s2_2_" + i)).onEnterFrame = null;
eval (eval ("s3_2_" + i)).onEnterFrame = null;
eval (eval ("s4_2_" + i)).onEnterFrame = null;
i++;
}
setTimeout(gameOver, 1000);
}
function init() {
lc_mc._visible = false;
var i = 1;
while (i <= totalLevels) {
eval (("road" + i) + "_mc")._visible = false;
i++;
}
eval (("road" + level) + "_mc")._visible = true;
if (level == 2) {
distance = 250;
}
right();
setTimeout(top, 4000);
setTimeout(left, 8000);
setTimeout(bottom, 11000);
}
function playAgain() {
setTimeout(right, 4000);
setTimeout(left, 8000);
setTimeout(bottom, 11000);
}
function top() {
var i = 1;
while (i <= 5) {
var t2b_mc = eval ("s2_2_" + i);
t2b_mc._y = i * -500;
t2b_mc.speed = minSpeed;
t2b_mc.clicks = 0;
t2b_mc.num = i;
t2b_mc.gotoAndStop(1 + random(frames));
t2b_mc.onRelease = function () {
this.clicks++;
if (this.clicks == 1) {
this.speed = maxSpeed;
} else if (this.clicks == 2) {
this.speed = 0;
} else if (this.clicks == 3) {
this.speed = minSpeed;
this.clicks = 0;
}
};
t2b_mc.onEnterFrame = function () {
if (!isPaused) {
this._y = this._y + this.speed;
}
if ((this._y > 0) && (this._y < 500)) {
this.onstage = true;
} else {
this.onstage = false;
}
var j = 1;
while (j <= 5) {
var mc = eval ("s1_2_" + j);
if (this.hit.hitTest(mc.hit)) {
trace("hit hit");
addFire(this, 1);
mc.onEnterFrame = null;
this.onEnterFrame = null;
crash();
}
j++;
}
var j = 1;
while (j <= 5) {
var mc = eval ("s3_2_" + j);
if (this.hit.hitTest(mc.hit)) {
trace("hit hit");
addFire(this, 1);
mc.onEnterFrame = null;
this.onEnterFrame = null;
crash();
}
j++;
}
var j = 1;
while (j <= 5) {
var mc = eval ("s2_2_" + j);
if (((this.hit.hitTest(mc.hit) && (this != mc)) && (mc.onstage)) && (this.onstage)) {
trace("hit hit");
addFire(this, 1);
mc.onEnterFrame = null;
this.onEnterFrame = null;
crash();
}
j++;
}
if (this._y > 550) {
this._y = -2000;
this.speed = minSpeed;
this.clicks = 0;
cleared++;
score = score + 100;
checkLevelCompleted();
}
};
i++;
}
}
function right() {
var i = 1;
while (i <= 5) {
var t3b_mc = eval ("s3_2_" + i);
t3b_mc._x = 700 + (i * 150);
t3b_mc.speed = minSpeed;
t3b_mc.clicks = 0;
t3b_mc.num = i;
t3b_mc.gotoAndStop(1 + random(frames));
t3b_mc.onRelease = function () {
this.clicks++;
if (this.clicks == 1) {
this.speed = maxSpeed;
} else if (this.clicks == 2) {
this.speed = 0;
} else if (this.clicks == 3) {
this.speed = minSpeed;
this.clicks = 0;
}
};
t3b_mc.onEnterFrame = function () {
if (!isPaused) {
this._x = this._x - this.speed;
}
if ((this._x > 0) && (this._x < 700)) {
this.onstage = true;
} else {
this.onstage = false;
}
var j = 1;
while (j <= 5) {
var mc = eval ("s2_2_" + j);
if (this.hit.hitTest(mc.hit)) {
trace("hit hit");
addFire(this, 2);
mc.onEnterFrame = null;
this.onEnterFrame = null;
crash();
}
j++;
}
var j = 1;
while (j <= 5) {
var mc = eval ("s4_2_" + j);
if (this.hit.hitTest(mc.hit)) {
trace("hit hit");
addFire(this, 2);
mc.onEnterFrame = null;
this.onEnterFrame = null;
crash();
}
j++;
}
var j = 1;
while (j <= 5) {
var mc = eval ("s3_2_" + j);
if (((this.hit.hitTest(mc.hit) && (this != mc)) && (mc.onstage)) && (this.onstage)) {
trace("hit hit");
addFire(this, 2);
mc.onEnterFrame = null;
this.onEnterFrame = null;
crash();
}
j++;
}
if (this._x < -100) {
this._x = 2700;
this.speed = minSpeed;
this.clicks = 0;
cleared++;
score = score + 100;
checkLevelCompleted();
}
};
i++;
}
}
function left() {
trace("left");
var i = 1;
while (i <= 5) {
var t1b_mc = eval ("s1_2_" + i);
t1b_mc._x = i * -500;
t1b_mc.speed = minSpeed;
t1b_mc.clicks = 0;
t1b_mc.num = i;
t1b_mc.gotoAndStop(1 + random(frames));
t1b_mc.onRelease = function () {
this.clicks++;
if (this.clicks == 1) {
this.speed = maxSpeed;
} else if (this.clicks == 2) {
this.speed = 0;
} else if (this.clicks == 3) {
this.speed = minSpeed;
this.clicks = 0;
}
};
t1b_mc.onEnterFrame = function () {
if (!isPaused) {
this._x = this._x + this.speed;
}
if ((this._x > 0) && (this._x < 700)) {
this.onstage = true;
} else {
this.onstage = false;
}
var j = 1;
while (j <= 5) {
var mc = eval ("s2_2_" + j);
if (this.hit.hitTest(mc.hit)) {
trace("hit hit");
addFire(this, 3);
mc.onEnterFrame = null;
this.onEnterFrame = null;
crash();
}
j++;
}
var j = 1;
while (j <= 5) {
var mc = eval ("s4_2_" + j);
if (this.hit.hitTest(mc.hit)) {
trace("hit hit");
addFire(this, 3);
mc.onEnterFrame = null;
this.onEnterFrame = null;
crash();
}
j++;
}
var j = 1;
while (j <= 5) {
var mc = eval ("s1_2_" + j);
if (((this.hit.hitTest(mc.hit) && (this != mc)) && (mc.onstage)) && (this.onstage)) {
trace("hit hit");
addFire(this, 3);
mc.onEnterFrame = null;
this.onEnterFrame = null;
crash();
}
j++;
}
if (this._x > 750) {
this._x = -2000;
this.speed = minSpeed;
this.clicks = 0;
cleared++;
score = score + 100;
checkLevelCompleted();
}
};
i++;
}
}
function bottom() {
trace("bottom");
var i = 1;
while (i <= 5) {
var t4b_mc = eval ("s4_2_" + i);
if (level == 2) {
t4b_mc._x = 218.9;
}
t4b_mc._y = 500 + (i * distance);
t4b_mc.speed = minSpeed;
t4b_mc.clicks = 0;
t4b_mc.num = i;
t4b_mc.gotoAndStop(1 + random(frames));
t4b_mc.onRelease = function () {
this.clicks++;
if (this.clicks == 1) {
this.speed = maxSpeed;
} else if (this.clicks == 2) {
this.speed = 0;
} else if (this.clicks == 3) {
this.speed = minSpeed;
this.clicks = 0;
}
};
t4b_mc.onEnterFrame = function () {
if (!isPaused) {
this._y = this._y - this.speed;
}
if ((this._y > 0) && (this._y < 500)) {
this.onstage = true;
} else {
this.onstage = false;
}
var j = 1;
while (j <= 5) {
var mc = eval ("s1_2_" + j);
if (this.hit.hitTest(mc.hit)) {
trace("hit hit");
addFire(this, 4);
mc.onEnterFrame = null;
this.onEnterFrame = null;
crash();
}
j++;
}
var j = 1;
while (j <= 5) {
var mc = eval ("s3_2_" + j);
if (this.hit.hitTest(mc.hit)) {
trace("hit hit");
addFire(this, 4);
mc.onEnterFrame = null;
this.onEnterFrame = null;
crash();
}
j++;
}
var j = 1;
while (j <= 5) {
var mc = eval ("s4_2_" + j);
if (((this.hit.hitTest(mc.hit) && (this != mc)) && (mc.onstage)) && (this.onstage)) {
trace("hit hit");
addFire(this, 4);
mc.onEnterFrame = null;
this.onEnterFrame = null;
crash();
}
j++;
}
if (this._y < -100) {
this._y = 2500;
this.speed = minSpeed;
this.clicks = 0;
cleared++;
score = score + 100;
checkLevelCompleted();
}
};
i++;
}
}
function checkLevelCompleted() {
if (cleared >= 15) {
var i = 1;
while (i <= totalLevels) {
eval (eval ("s1_2_" + i)).onEnterFrame = null;
eval (eval ("s2_2_" + i)).onEnterFrame = null;
eval (eval ("s3_2_" + i)).onEnterFrame = null;
eval (eval ("s4_2_" + i)).onEnterFrame = null;
i++;
}
lc_mc._visible = true;
removeMovieClip(blast1);
}
}
function nextLevel() {
level++;
playerDetails.data.lev = level;
lc_mc._visible = false;
var i = 1;
while (i <= totalLevels) {
removeMovieClip(eval (eval ("s1_2_" + i)));
removeMovieClip(eval (eval ("s2_2_" + i)));
removeMovieClip(eval (eval ("s3_2_" + i)));
removeMovieClip(eval (eval ("s4_2_" + i)));
i++;
}
nextFrame();
}
function addFire(mc, pos) {
blast_snd.start(0, 1);
trace("mc mc mc mc " + mc._currentframe);
if (!blastTimes) {
blastTimes = true;
_root.attachMovie("blast", "blast1", _root.getNextHighestDepth());
blast1._width = 100;
blast1._height = 100;
if (pos == 1) {
if (mc._currentframe == 9) {
blast1._x = mc._x;
blast1._y = mc._y + 50;
} else if ((mc._currentframe == 7) || (mc._currentframe == 8)) {
blast1._x = mc._x;
blast1._y = mc._y + 40;
} else {
blast1._x = mc._x;
blast1._y = mc._y + 30;
}
} else if (pos == 2) {
if (mc._currentframe == 9) {
blast1._y = mc._y;
blast1._x = mc._x - 50;
} else if ((mc._currentframe == 7) || (mc._currentframe == 8)) {
blast1._x = mc._x - 40;
blast1._y = mc._y;
} else {
blast1._x = mc._x - 30;
blast1._y = mc._y;
}
} else if (pos == 3) {
if (mc._currentframe == 9) {
blast1._x = mc._x + 50;
blast1._y = mc._y;
} else if ((mc._currentframe == 7) || (mc._currentframe == 8)) {
blast1._x = mc._x + 40;
blast1._y = mc._y;
} else {
blast1._x = mc._x + 30;
blast1._y = mc._y;
}
} else if (pos == 4) {
if (mc._currentframe == 9) {
blast1._x = mc._x;
blast1._y = mc._y - 50;
} else if ((mc._currentframe == 7) || (mc._currentframe == 8)) {
blast1._x = mc._x;
blast1._y = mc._y - 40;
} else {
blast1._x = mc._x;
blast1._y = mc._y - 30;
}
}
}
}
stopAllSounds();
gamebg_snd.start(0, 999);
cover_mc._visible = false;
stop();
var level = 2;
var frames = 9;
var distance = 300;
var cleared = 0;
var totalLevels = 5;
menuPlayed = true;
var blastTimes = false;
minSpeed = 3;
maxSpeed = 6;
init();
pause_mc._alpha = 0;
Instance of Symbol 170 MovieClip "s2_2_4" in Frame 7
/* no clip actions */
Instance of Symbol 170 MovieClip "s2_2_3" in Frame 7
/* no clip actions */
Instance of Symbol 170 MovieClip "s2_2_2" in Frame 7
/* no clip actions */
Instance of Symbol 170 MovieClip "s2_2_1" in Frame 7
/* no clip actions */
Instance of Symbol 170 MovieClip "s2_2_5" in Frame 7
/* no clip actions */
Instance of Symbol 170 MovieClip "s3_2_1" in Frame 7
/* no clip actions */
Instance of Symbol 170 MovieClip "s3_2_2" in Frame 7
/* no clip actions */
Instance of Symbol 170 MovieClip "s3_2_3" in Frame 7
/* no clip actions */
Instance of Symbol 170 MovieClip "s3_2_4" in Frame 7
/* no clip actions */
Instance of Symbol 170 MovieClip "s3_2_5" in Frame 7
/* no clip actions */
Instance of Symbol 170 MovieClip "s1_2_1" in Frame 7
/* no clip actions */
Instance of Symbol 170 MovieClip "s1_2_2" in Frame 7
/* no clip actions */
Instance of Symbol 170 MovieClip "s1_2_3" in Frame 7
/* no clip actions */
Instance of Symbol 170 MovieClip "s1_2_4" in Frame 7
/* no clip actions */
Instance of Symbol 170 MovieClip "s1_2_5" in Frame 7
/* no clip actions */
Instance of Symbol 170 MovieClip "s4_2_1" in Frame 7
/* no clip actions */
Instance of Symbol 170 MovieClip "s4_2_2" in Frame 7
/* no clip actions */
Instance of Symbol 170 MovieClip "s4_2_3" in Frame 7
/* no clip actions */
Instance of Symbol 170 MovieClip "s4_2_4" in Frame 7
/* no clip actions */
Instance of Symbol 170 MovieClip "s4_2_5" in Frame 7
/* no clip actions */
Frame 8
function pauseGame() {
trace(("pauseGame " + isPaused) + " before");
ff.text = isPaused + "\n\n";
if (isPaused) {
trace("after " + isPaused);
trace("trace paused");
pause_mc2._alpha = 0;
isPaused = false;
sound_mc.gotoAndPlay(2);
_global.allsound.setVolume(100);
minSpeed = 3;
maxSpeed = 6;
cover_mc._visible = false;
} else {
sound_mc.gotoAndStop(1);
pause_mc2._alpha = 100;
pausegame_txt.text = "paused";
isPaused = true;
minSpeed = 0;
maxSpeed = 0;
cover_mc._visible = true;
_global.allsound.setVolume(0);
}
}
isPaused = false;
pause_mc2._alpha = 0;
pkeyListener.onKeyDown = function () {
var _local1 = Key.getCode();
a.text = _local1;
if (_local1 == 80) {
pauseGame();
}
};
function gameOver() {
gotoAndStop ("EndGame");
}
function crash() {
var i = 1;
while (i <= totalLevels) {
eval (eval ("s1_3_" + i)).onEnterFrame = null;
eval (eval ("s2_3_" + i)).onEnterFrame = null;
eval (eval ("s3_3_" + i)).onEnterFrame = null;
eval (eval ("s4_3_" + i)).onEnterFrame = null;
i++;
}
setTimeout(gameOver, 1000);
}
function init() {
lc_mc._visible = false;
var i = 1;
while (i <= totalLevels) {
eval (("road" + i) + "_mc")._visible = false;
i++;
}
eval (("road" + level) + "_mc")._visible = true;
left();
setTimeout(right, 4000);
setTimeout(top, 8000);
setTimeout(bottom, 11000);
}
function playAgain() {
}
function top() {
var i = 1;
while (i <= 5) {
var t2b_mc = eval ("s2_3_" + i);
t2b_mc._y = i * -400;
if (level == 2) {
t2b_mc._x = 165.6;
}
t2b_mc.speed = minSpeed;
t2b_mc.clicks = 0;
t2b_mc.num = i;
t2b_mc.gotoAndStop(1 + random(frames));
t2b_mc.onRelease = function () {
this.clicks++;
if (this.clicks == 1) {
this.speed = maxSpeed;
} else if (this.clicks == 2) {
this.speed = 0;
} else if (this.clicks == 3) {
this.speed = minSpeed;
this.clicks = 0;
}
};
t2b_mc.onEnterFrame = function () {
if (!isPaused) {
this._y = this._y + this.speed;
}
if ((this._y > 0) && (this._y < 500)) {
this.onstage = true;
} else {
this.onstage = false;
}
var j = 1;
while (j <= 5) {
var mc = eval ("s1_3_" + j);
if (this.hit.hitTest(mc.hit)) {
trace("hit hit");
addFire(this, 1);
mc.onEnterFrame = null;
this.onEnterFrame = null;
crash();
}
j++;
}
var j = 1;
while (j <= 5) {
var mc = eval ("s3_3_" + j);
if (this.hit.hitTest(mc.hit)) {
trace("hit hit");
addFire(this, 1);
mc.onEnterFrame = null;
this.onEnterFrame = null;
crash();
}
j++;
}
var j = 1;
while (j <= 5) {
var mc = eval ("s2_3_" + j);
if (((this.hit.hitTest(mc.hit) && (this != mc)) && (mc.onstage)) && (this.onstage)) {
trace("hit hit");
addFire(this, 1);
mc.onEnterFrame = null;
this.onEnterFrame = null;
crash();
}
j++;
}
if (this._y > 550) {
this._y = -2000;
this.speed = minSpeed;
this.clicks = 0;
cleared++;
score = score + 100;
checkLevelCompleted();
}
};
i++;
}
}
function right() {
var i = 1;
while (i <= 5) {
var t3b_mc = eval ("s3_3_" + i);
t3b_mc._x = 700 + (i * 400);
t3b_mc.speed = minSpeed;
t3b_mc.clicks = 0;
t3b_mc.num = i;
t3b_mc.gotoAndStop(1 + random(frames));
t3b_mc.onRelease = function () {
this.clicks++;
if (this.clicks == 1) {
this.speed = maxSpeed;
} else if (this.clicks == 2) {
this.speed = 0;
} else if (this.clicks == 3) {
this.speed = minSpeed;
this.clicks = 0;
}
};
t3b_mc.onEnterFrame = function () {
if (!isPaused) {
this._x = this._x - this.speed;
}
if ((this._x > 0) && (this._x < 700)) {
this.onstage = true;
} else {
this.onstage = false;
}
var j = 1;
while (j <= 5) {
var mc = eval ("s2_3_" + j);
if (this.hit.hitTest(mc.hit)) {
trace("hit hit");
addFire(this, 2);
mc.onEnterFrame = null;
this.onEnterFrame = null;
crash();
}
j++;
}
var j = 1;
while (j <= 5) {
var mc = eval ("s4_3_" + j);
if (this.hit.hitTest(mc.hit)) {
trace("hit hit");
addFire(this, 2);
mc.onEnterFrame = null;
this.onEnterFrame = null;
crash();
}
j++;
}
var j = 1;
while (j <= 5) {
var mc = eval ("s3_3_" + j);
if (((this.hit.hitTest(mc.hit) && (this != mc)) && (mc.onstage)) && (this.onstage)) {
trace("hit hit");
addFire(this, 2);
mc.onEnterFrame = null;
this.onEnterFrame = null;
crash();
}
j++;
}
if (this._x < -100) {
this._x = 2700;
this.speed = minSpeed;
this.clicks = 0;
cleared++;
score = score + 100;
checkLevelCompleted();
}
};
i++;
}
}
function left() {
trace("left");
var i = 1;
while (i <= 5) {
var t1b_mc = eval ("s1_3_" + i);
t1b_mc._x = i * -150;
t1b_mc.speed = minSpeed;
t1b_mc.clicks = 0;
t1b_mc.num = i;
t1b_mc.gotoAndStop(1 + random(frames));
t1b_mc.onRelease = function () {
this.clicks++;
if (this.clicks == 1) {
this.speed = maxSpeed;
} else if (this.clicks == 2) {
this.speed = 0;
} else if (this.clicks == 3) {
this.speed = minSpeed;
this.clicks = 0;
}
};
t1b_mc.onEnterFrame = function () {
if (!isPaused) {
this._x = this._x + this.speed;
}
if ((this._x > 0) && (this._x < 700)) {
this.onstage = true;
} else {
this.onstage = false;
}
var j = 1;
while (j <= 5) {
var mc = eval ("s2_3_" + j);
if (this.hit.hitTest(mc.hit)) {
trace("hit hit");
addFire(this, 3);
mc.onEnterFrame = null;
this.onEnterFrame = null;
crash();
}
j++;
}
var j = 1;
while (j <= 5) {
var mc = eval ("s4_3_" + j);
if (this.hit.hitTest(mc.hit)) {
trace("hit hit");
addFire(this, 3);
mc.onEnterFrame = null;
this.onEnterFrame = null;
crash();
}
j++;
}
var j = 1;
while (j <= 5) {
var mc = eval ("s1_3_" + j);
if (((this.hit.hitTest(mc.hit) && (this != mc)) && (mc.onstage)) && (this.onstage)) {
trace("hit hit");
addFire(this, 3);
mc.onEnterFrame = null;
this.onEnterFrame = null;
crash();
}
j++;
}
if (this._x > 750) {
this._x = -2000;
this.speed = minSpeed;
this.clicks = 0;
cleared++;
score = score + 100;
checkLevelCompleted();
}
};
i++;
}
}
function bottom() {
trace("bottom");
var i = 1;
while (i <= 5) {
var t4b_mc = eval ("s4_3_" + i);
t4b_mc._y = 500 + (i * distance);
t4b_mc.speed = minSpeed;
t4b_mc.clicks = 0;
t4b_mc.num = i;
t4b_mc.gotoAndStop(1 + random(frames));
t4b_mc.onRelease = function () {
this.clicks++;
if (this.clicks == 1) {
this.speed = maxSpeed;
} else if (this.clicks == 2) {
this.speed = 0;
} else if (this.clicks == 3) {
this.speed = minSpeed;
this.clicks = 0;
}
};
t4b_mc.onEnterFrame = function () {
if (!isPaused) {
this._y = this._y - this.speed;
}
if ((this._y > 0) && (this._y < 500)) {
this.onstage = true;
} else {
this.onstage = false;
}
var j = 1;
while (j <= 5) {
var mc = eval ("s1_3_" + j);
if (this.hit.hitTest(mc.hit)) {
trace("hit hit");
addFire(this, 4);
mc.onEnterFrame = null;
this.onEnterFrame = null;
crash();
}
j++;
}
var j = 1;
while (j <= 5) {
var mc = eval ("s3_3_" + j);
if (this.hit.hitTest(mc.hit)) {
trace("hit hit");
addFire(this, 4);
mc.onEnterFrame = null;
this.onEnterFrame = null;
crash();
}
j++;
}
var j = 1;
while (j <= 5) {
var mc = eval ("s4_3_" + j);
if (((this.hit.hitTest(mc.hit) && (this != mc)) && (mc.onstage)) && (this.onstage)) {
trace("hit hit");
addFire(this, 4);
mc.onEnterFrame = null;
this.onEnterFrame = null;
crash();
}
j++;
}
if (this._y < -100) {
this._y = 2500;
this.speed = minSpeed;
this.clicks = 0;
cleared++;
score = score + 100;
checkLevelCompleted();
}
};
i++;
}
}
function checkLevelCompleted() {
if (cleared >= 15) {
var i = 1;
while (i <= totalLevels) {
eval (eval ("s1_3_" + i)).onEnterFrame = null;
eval (eval ("s2_3_" + i)).onEnterFrame = null;
eval (eval ("s3_3_" + i)).onEnterFrame = null;
eval (eval ("s4_3_" + i)).onEnterFrame = null;
i++;
}
lc_mc._visible = true;
}
}
function nextLevel() {
level++;
playerDetails.data.lev = level;
lc_mc._visible = false;
var i = 1;
while (i <= totalLevels) {
eval (eval ("s1_3_" + i)).removeMovieClip();
eval (eval ("s2_3_" + i)).removeMovieClip();
eval (eval ("s3_3_" + i)).removeMovieClip();
eval (eval ("s4_3_" + i)).removeMovieClip();
i++;
}
nextFrame();
}
function addFire(mc, pos) {
blast_snd.start(0, 1);
trace("mc mc mc mc " + mc._currentframe);
if (!blastTimes) {
blastTimes = true;
_root.attachMovie("blast", "blast1", _root.getNextHighestDepth());
blast1._width = 100;
blast1._height = 100;
if (pos == 1) {
if (mc._currentframe == 9) {
blast1._x = mc._x;
blast1._y = mc._y + 50;
} else if ((mc._currentframe == 7) || (mc._currentframe == 8)) {
blast1._x = mc._x;
blast1._y = mc._y + 40;
} else {
blast1._x = mc._x;
blast1._y = mc._y + 30;
}
} else if (pos == 2) {
if (mc._currentframe == 9) {
blast1._y = mc._y;
blast1._x = mc._x - 50;
} else if ((mc._currentframe == 7) || (mc._currentframe == 8)) {
blast1._x = mc._x - 40;
blast1._y = mc._y;
} else {
blast1._x = mc._x - 30;
blast1._y = mc._y;
}
} else if (pos == 3) {
if (mc._currentframe == 9) {
blast1._x = mc._x + 50;
blast1._y = mc._y;
} else if ((mc._currentframe == 7) || (mc._currentframe == 8)) {
blast1._x = mc._x + 40;
blast1._y = mc._y;
} else {
blast1._x = mc._x + 30;
blast1._y = mc._y;
}
} else if (pos == 4) {
if (mc._currentframe == 9) {
blast1._x = mc._x;
blast1._y = mc._y - 50;
} else if ((mc._currentframe == 7) || (mc._currentframe == 8)) {
blast1._x = mc._x;
blast1._y = mc._y - 40;
} else {
blast1._x = mc._x;
blast1._y = mc._y - 30;
}
}
}
}
stopAllSounds();
cover_mc._visible = false;
gamebg_snd.start(0, 999);
stop();
var level = 3;
var frames = 9;
var distance = 300;
var cleared = 0;
var totalLevels = 5;
menuPlayed = true;
var blastTimes = false;
minSpeed = 3;
maxSpeed = 6;
init();
pause_mc._alpha = 0;
Instance of Symbol 170 MovieClip "s2_3_4" in Frame 8
/* no clip actions */
Instance of Symbol 170 MovieClip "s2_3_3" in Frame 8
/* no clip actions */
Instance of Symbol 170 MovieClip "s2_3_2" in Frame 8
/* no clip actions */
Instance of Symbol 170 MovieClip "s2_3_1" in Frame 8
/* no clip actions */
Instance of Symbol 170 MovieClip "s2_3_5" in Frame 8
/* no clip actions */
Instance of Symbol 170 MovieClip "s3_3_1" in Frame 8
/* no clip actions */
Instance of Symbol 170 MovieClip "s3_3_2" in Frame 8
/* no clip actions */
Instance of Symbol 170 MovieClip "s3_3_3" in Frame 8
/* no clip actions */
Instance of Symbol 170 MovieClip "s3_3_4" in Frame 8
/* no clip actions */
Instance of Symbol 170 MovieClip "s3_3_5" in Frame 8
/* no clip actions */
Instance of Symbol 170 MovieClip "s1_3_1" in Frame 8
/* no clip actions */
Instance of Symbol 170 MovieClip "s1_3_2" in Frame 8
/* no clip actions */
Instance of Symbol 170 MovieClip "s1_3_3" in Frame 8
/* no clip actions */
Instance of Symbol 170 MovieClip "s1_3_4" in Frame 8
/* no clip actions */
Instance of Symbol 170 MovieClip "s1_3_5" in Frame 8
/* no clip actions */
Instance of Symbol 170 MovieClip "s4_3_1" in Frame 8
/* no clip actions */
Instance of Symbol 170 MovieClip "s4_3_2" in Frame 8
/* no clip actions */
Instance of Symbol 170 MovieClip "s4_3_3" in Frame 8
/* no clip actions */
Instance of Symbol 170 MovieClip "s4_3_4" in Frame 8
/* no clip actions */
Instance of Symbol 170 MovieClip "s4_3_5" in Frame 8
/* no clip actions */
Frame 9
function pauseGame() {
if (isPaused) {
trace("after " + isPaused);
pause_mc3._alpha = 0;
trace("trace paused");
var _local3 = new Tween(pause_mc, "_alpha", Elastic.easeOut, 100, 0, 0.5, true);
isPaused = false;
sound_mc.gotoAndPlay(2);
_global.allsound.setVolume(100);
minSpeed = 3;
maxSpeed = 6;
cover_mc._visible = false;
} else {
sound_mc.gotoAndStop(1);
pause_mc.swapDepths(_root.getNextHighestDepth());
pause_mc3._alpha = 100;
pausegame_txt.text = "paused";
isPaused = true;
minSpeed = 0;
maxSpeed = 0;
cover_mc._visible = true;
_global.allsound.setVolume(0);
}
}
isPaused = false;
pause_mc3._alpha = 0;
pkeyListener.onKeyDown = function () {
var _local1 = Key.getCode();
a.text = _local1;
if (_local1 == 80) {
pauseGame();
}
};
function gameOver() {
gotoAndStop ("EndGame");
}
function crash() {
var i = 1;
while (i <= totalLevels) {
eval (eval ("s1_4_" + i)).onEnterFrame = null;
eval (eval ("s2_4_" + i)).onEnterFrame = null;
eval (eval ("s3_4_" + i)).onEnterFrame = null;
eval (eval ("s4_4_" + i)).onEnterFrame = null;
i++;
}
setTimeout(gameOver, 1000);
}
function init() {
lc_mc._visible = false;
var i = 1;
while (i <= totalLevels) {
eval (("road" + i) + "_mc")._visible = false;
i++;
}
eval (("road" + level) + "_mc")._visible = true;
top();
left();
setTimeout(right, 4000);
setTimeout(right2, 8000);
setTimeout(left2, 9000);
setTimeout(bottom, 6000);
}
function playAgain() {
setTimeout(right, 4000);
setTimeout(left, 8000);
setTimeout(bottom, 11000);
}
function top() {
var i = 1;
while (i <= 5) {
var t2b_mc = eval ("s2_4_" + i);
t2b_mc._y = i * -500;
if (level == 2) {
t2b_mc._x = 165.6;
}
t2b_mc.speed = minSpeed;
t2b_mc.clicks = 0;
t2b_mc.num = i;
t2b_mc.gotoAndStop(1 + random(frames));
t2b_mc.onRelease = function () {
this.clicks++;
if (this.clicks == 1) {
this.speed = maxSpeed;
} else if (this.clicks == 2) {
this.speed = 0;
} else if (this.clicks == 3) {
this.speed = minSpeed;
this.clicks = 0;
}
};
t2b_mc.onEnterFrame = function () {
if (!isPaused) {
this._y = this._y + this.speed;
}
if ((this._y > 0) && (this._y < 500)) {
this.onstage = true;
} else {
this.onstage = false;
}
var j = 1;
while (j <= 5) {
var mc = eval ("s1_4_" + j);
if (this.hit.hitTest(mc.hit)) {
trace("hit hit");
addFire(this, 1);
mc.onEnterFrame = null;
this.onEnterFrame = null;
crash();
}
j++;
}
var j = 1;
while (j <= 5) {
var mc = eval ("ss1_4_" + j);
if (this.hit.hitTest(mc.hit)) {
trace("hit hit");
addFire(this, 1);
mc.onEnterFrame = null;
this.onEnterFrame = null;
crash();
}
j++;
}
var j = 1;
while (j <= 5) {
var mc = eval ("s3_4_" + j);
if (this.hit.hitTest(mc.hit)) {
trace("hit hit");
addFire(this, 1);
mc.onEnterFrame = null;
this.onEnterFrame = null;
crash();
}
j++;
}
var j = 1;
while (j <= 5) {
var mc = eval ("ss3_4_" + j);
if (this.hit.hitTest(mc.hit)) {
trace("hit hit");
addFire(this, 1);
mc.onEnterFrame = null;
this.onEnterFrame = null;
crash();
}
j++;
}
var j = 1;
while (j <= 5) {
var mc = eval ("s2_4_" + j);
if (((this.hit.hitTest(mc.hit) && (this != mc)) && (mc.onstage)) && (this.onstage)) {
trace("hit hit");
addFire(this, 1);
mc.onEnterFrame = null;
this.onEnterFrame = null;
crash();
}
j++;
}
if (this._y > 550) {
this._y = -2000;
this.speed = minSpeed;
this.clicks = 0;
cleared++;
score = score + 100;
checkLevelCompleted();
}
};
i++;
}
}
function right() {
var i = 1;
while (i <= 5) {
var t3b_mc = eval ("s3_4_" + i);
t3b_mc._x = 700 + (i * distance);
t3b_mc.speed = minSpeed;
t3b_mc.clicks = 0;
t3b_mc.num = i;
t3b_mc.gotoAndStop(1 + random(frames));
t3b_mc.onRelease = function () {
this.clicks++;
if (this.clicks == 1) {
this.speed = maxSpeed;
} else if (this.clicks == 2) {
this.speed = 0;
} else if (this.clicks == 3) {
this.speed = minSpeed;
this.clicks = 0;
}
};
t3b_mc.onEnterFrame = function () {
if (!isPaused) {
this._x = this._x - this.speed;
}
if ((this._x > 0) && (this._x < 700)) {
this.onstage = true;
} else {
this.onstage = false;
}
var j = 1;
while (j <= 5) {
var mc = eval ("s2_4_" + j);
if (this.hit.hitTest(mc.hit)) {
trace("hit hit");
addFire(this, 2);
mc.onEnterFrame = null;
this.onEnterFrame = null;
crash();
}
j++;
}
var j = 1;
while (j <= 5) {
var mc = eval ("s4_4_" + j);
if (this.hit.hitTest(mc.hit)) {
trace("hit hit");
addFire(this, 2);
mc.onEnterFrame = null;
this.onEnterFrame = null;
crash();
}
j++;
}
var j = 1;
while (j <= 5) {
var mc = eval ("s3_4_" + j);
if (((this.hit.hitTest(mc.hit) && (this != mc)) && (mc.onstage)) && (this.onstage)) {
trace("hit hit");
addFire(this, 2);
mc.onEnterFrame = null;
this.onEnterFrame = null;
crash();
}
j++;
}
if (this._x < -100) {
this._x = 2700;
this.speed = minSpeed;
this.clicks = 0;
cleared++;
score = score + 100;
checkLevelCompleted();
}
};
i++;
}
}
function right2() {
var i = 1;
while (i <= 5) {
var t3b_mc = eval ("ss3_4_" + i);
t3b_mc._x = 700 + (i * distance);
t3b_mc.speed = minSpeed;
t3b_mc.clicks = 0;
t3b_mc.num = i;
t3b_mc.gotoAndStop(1 + random(frames));
t3b_mc.onRelease = function () {
this.clicks++;
if (this.clicks == 1) {
this.speed = maxSpeed;
} else if (this.clicks == 2) {
this.speed = 0;
} else if (this.clicks == 3) {
this.speed = minSpeed;
this.clicks = 0;
}
};
t3b_mc.onEnterFrame = function () {
if (!isPaused) {
this._x = this._x - this.speed;
}
if ((this._x > 0) && (this._x < 700)) {
this.onstage = true;
} else {
this.onstage = false;
}
var j = 1;
while (j <= 5) {
var mc = eval ("s2_4_" + j);
if (this.hit.hitTest(mc.hit)) {
trace("hit hit");
addFire(this, 2);
mc.onEnterFrame = null;
this.onEnterFrame = null;
crash();
}
j++;
}
var j = 1;
while (j <= 5) {
var mc = eval ("s4_4_" + j);
if (this.hit.hitTest(mc.hit)) {
trace("hit hit");
addFire(this, 2);
mc.onEnterFrame = null;
this.onEnterFrame = null;
crash();
}
j++;
}
var j = 1;
while (j <= 5) {
var mc = eval ("ss3_4_" + j);
if (((this.hit.hitTest(mc.hit) && (this != mc)) && (mc.onstage)) && (this.onstage)) {
trace("hit hit");
addFire(this, 2);
mc.onEnterFrame = null;
this.onEnterFrame = null;
crash();
}
j++;
}
if (this._x < -100) {
this._x = 2700;
this.speed = minSpeed;
this.clicks = 0;
cleared++;
score = score + 100;
checkLevelCompleted();
}
};
i++;
}
}
function left() {
trace("left");
var i = 1;
while (i <= 5) {
var t1b_mc = eval ("s1_4_" + i);
t1b_mc._x = i * -400;
t1b_mc.speed = minSpeed;
t1b_mc.clicks = 0;
t1b_mc.num = i;
t1b_mc.gotoAndStop(1 + random(frames));
t1b_mc.onRelease = function () {
this.clicks++;
if (this.clicks == 1) {
this.speed = maxSpeed;
} else if (this.clicks == 2) {
this.speed = 0;
} else if (this.clicks == 3) {
this.speed = minSpeed;
this.clicks = 0;
}
};
t1b_mc.onEnterFrame = function () {
if (!isPaused) {
this._x = this._x + this.speed;
}
if ((this._x > 0) && (this._x < 700)) {
this.onstage = true;
} else {
this.onstage = false;
}
var j = 1;
while (j <= 5) {
var mc = eval ("s2_4_" + j);
if (this.hit.hitTest(mc.hit)) {
trace("hit hit");
addFire(this, 3);
mc.onEnterFrame = null;
this.onEnterFrame = null;
crash();
}
j++;
}
var j = 1;
while (j <= 5) {
var mc = eval ("s4_4_" + j);
if (this.hit.hitTest(mc.hit)) {
trace("hit hit");
addFire(this, 3);
mc.onEnterFrame = null;
this.onEnterFrame = null;
crash();
}
j++;
}
var j = 1;
while (j <= 5) {
var mc = eval ("s1_4_" + j);
if (((this.hit.hitTest(mc.hit) && (this != mc)) && (mc.onstage)) && (this.onstage)) {
trace("hit hit");
addFire(this, 3);
mc.onEnterFrame = null;
this.onEnterFrame = null;
crash();
}
j++;
}
if (this._x > 750) {
this._x = -2000;
this.speed = minSpeed;
this.clicks = 0;
cleared++;
score = score + 100;
checkLevelCompleted();
}
};
i++;
}
}
function left2() {
trace("left");
var i = 1;
while (i <= 5) {
var t1b_mc = eval ("ss1_4_" + i);
t1b_mc._x = i * -500;
t1b_mc.speed = minSpeed;
t1b_mc.clicks = 0;
t1b_mc.num = i;
t1b_mc.gotoAndStop(1 + random(frames));
t1b_mc.onRelease = function () {
this.clicks++;
if (this.clicks == 1) {
this.speed = maxSpeed;
} else if (this.clicks == 2) {
this.speed = 0;
} else if (this.clicks == 3) {
this.speed = minSpeed;
this.clicks = 0;
}
};
t1b_mc.onEnterFrame = function () {
if (!isPaused) {
this._x = this._x + this.speed;
}
if ((this._x > 0) && (this._x < 700)) {
this.onstage = true;
} else {
this.onstage = false;
}
var j = 1;
while (j <= 5) {
var mc = eval ("s2_4_" + j);
if (this.hit.hitTest(mc.hit)) {
trace("hit hit");
addFire(this, 3);
mc.onEnterFrame = null;
this.onEnterFrame = null;
crash();
}
j++;
}
var j = 1;
while (j <= 5) {
var mc = eval ("s4_4_" + j);
if (this.hit.hitTest(mc.hit)) {
trace("hit hit");
addFire(this, 3);
mc.onEnterFrame = null;
this.onEnterFrame = null;
crash();
}
j++;
}
var j = 1;
while (j <= 5) {
var mc = eval ("ss1_4_" + j);
if (((this.hit.hitTest(mc.hit) && (this != mc)) && (mc.onstage)) && (this.onstage)) {
trace("hit hit");
addFire(this, 3);
mc.onEnterFrame = null;
this.onEnterFrame = null;
crash();
}
j++;
}
if (this._x > 750) {
this._x = -2000;
this.speed = minSpeed;
this.clicks = 0;
cleared++;
score = score + 100;
checkLevelCompleted();
}
};
i++;
}
}
function bottom() {
trace("bottom");
var i = 1;
while (i <= 5) {
var t4b_mc = eval ("s4_4_" + i);
if (level == 2) {
t4b_mc._x = 218.9;
}
t4b_mc._y = 500 + (i * 400);
t4b_mc.speed = minSpeed;
t4b_mc.clicks = 0;
t4b_mc.num = i;
t4b_mc.gotoAndStop(1 + random(frames));
t4b_mc.onRelease = function () {
this.clicks++;
if (this.clicks == 1) {
this.speed = maxSpeed;
} else if (this.clicks == 2) {
this.speed = 0;
} else if (this.clicks == 3) {
this.speed = minSpeed;
this.clicks = 0;
}
};
t4b_mc.onEnterFrame = function () {
if (!isPaused) {
this._y = this._y - this.speed;
}
if ((this._y > 0) && (this._y < 500)) {
this.onstage = true;
} else {
this.onstage = false;
}
var j = 1;
while (j <= 5) {
var mc = eval ("s1_4_" + j);
if (this.hit.hitTest(mc.hit)) {
trace("hit hit");
addFire(this, 4);
mc.onEnterFrame = null;
this.onEnterFrame = null;
crash();
}
j++;
}
var j = 1;
while (j <= 5) {
var mc = eval ("ss1_4_" + j);
if (this.hit.hitTest(mc.hit)) {
trace("hit hit");
addFire(this, 4);
mc.onEnterFrame = null;
this.onEnterFrame = null;
crash();
}
j++;
}
var j = 1;
while (j <= 5) {
var mc = eval ("s3_4_" + j);
if (this.hit.hitTest(mc.hit)) {
trace("hit hit");
addFire(this, 4);
mc.onEnterFrame = null;
this.onEnterFrame = null;
crash();
}
j++;
}
var j = 1;
while (j <= 5) {
var mc = eval ("ss3_4_" + j);
if (this.hit.hitTest(mc.hit)) {
trace("hit hit");
addFire(this, 4);
mc.onEnterFrame = null;
this.onEnterFrame = null;
crash();
}
j++;
}
var j = 1;
while (j <= 5) {
var mc = eval ("s4_4_" + j);
if (((this.hit.hitTest(mc.hit) && (this != mc)) && (mc.onstage)) && (this.onstage)) {
trace("hit hit");
addFire(this, 4);
mc.onEnterFrame = null;
this.onEnterFrame = null;
crash();
}
j++;
}
if (this._y < -100) {
this._y = 2500;
this.speed = minSpeed;
this.clicks = 0;
cleared++;
score = score + 100;
checkLevelCompleted();
}
};
i++;
}
}
function checkLevelCompleted() {
if (cleared >= 10) {
var i = 1;
while (i <= totalLevels) {
eval (eval ("s1_4_" + i)).onEnterFrame = null;
eval (eval ("s2_4_" + i)).onEnterFrame = null;
eval (eval ("s3_4_" + i)).onEnterFrame = null;
eval (eval ("s4_4_" + i)).onEnterFrame = null;
eval (eval ("ss1_4_" + i)).onEnterFrame = null;
eval (eval ("ss3_4_" + i)).onEnterFrame = null;
i++;
}
lc_mc._visible = true;
}
}
function nextLevel() {
level++;
playerDetails.data.lev = level;
lc_mc._visible = false;
var i = 1;
while (i <= totalLevels) {
eval (eval ("s1_4_" + i)).removeMovieClip();
eval (eval ("s2_4_" + i)).removeMovieClip();
eval (eval ("s3_4_" + i)).removeMovieClip();
eval (eval ("s4_4_" + i)).removeMovieClip();
eval (eval ("ss1_4_" + i)).removeMovieClip();
eval (eval ("ss3_4_" + i)).removeMovieClip();
i++;
}
nextFrame();
}
function addFire(mc, pos) {
blast_snd.start(0, 1);
trace("mc mc mc mc " + mc._currentframe);
if (!blastTimes) {
blastTimes = true;
_root.attachMovie("blast", "blast1", _root.getNextHighestDepth());
blast1._width = 100;
blast1._height = 100;
if (pos == 1) {
if (mc._currentframe == 9) {
blast1._x = mc._x;
blast1._y = mc._y + 50;
} else if ((mc._currentframe == 7) || (mc._currentframe == 8)) {
blast1._x = mc._x;
blast1._y = mc._y + 40;
} else {
blast1._x = mc._x;
blast1._y = mc._y + 30;
}
} else if (pos == 2) {
if (mc._currentframe == 9) {
blast1._y = mc._y;
blast1._x = mc._x - 50;
} else if ((mc._currentframe == 7) || (mc._currentframe == 8)) {
blast1._x = mc._x - 40;
blast1._y = mc._y;
} else {
blast1._x = mc._x - 30;
blast1._y = mc._y;
}
} else if (pos == 3) {
if (mc._currentframe == 9) {
blast1._x = mc._x + 50;
blast1._y = mc._y;
} else if ((mc._currentframe == 7) || (mc._currentframe == 8)) {
blast1._x = mc._x + 40;
blast1._y = mc._y;
} else {
blast1._x = mc._x + 30;
blast1._y = mc._y;
}
} else if (pos == 4) {
if (mc._currentframe == 9) {
blast1._x = mc._x;
blast1._y = mc._y - 50;
} else if ((mc._currentframe == 7) || (mc._currentframe == 8)) {
blast1._x = mc._x;
blast1._y = mc._y - 40;
} else {
blast1._x = mc._x;
blast1._y = mc._y - 30;
}
}
}
}
cover_mc._visible = false;
stopAllSounds();
gamebg_snd.start(0, 999);
stop();
var level = 4;
var frames = 9;
var distance = 300;
var cleared = 0;
var totalLevels = 5;
menuPlayed = true;
var blastTimes = false;
minSpeed = 3;
maxSpeed = 6;
init();
pause_mc._alpha = 0;
Instance of Symbol 170 MovieClip "s2_4_4" in Frame 9
/* no clip actions */
Instance of Symbol 170 MovieClip "s2_4_3" in Frame 9
/* no clip actions */
Instance of Symbol 170 MovieClip "s2_4_2" in Frame 9
/* no clip actions */
Instance of Symbol 170 MovieClip "s2_4_1" in Frame 9
/* no clip actions */
Instance of Symbol 170 MovieClip "s2_4_5" in Frame 9
/* no clip actions */
Instance of Symbol 170 MovieClip "ss3_4_1" in Frame 9
/* no clip actions */
Instance of Symbol 170 MovieClip "ss3_4_2" in Frame 9
/* no clip actions */
Instance of Symbol 170 MovieClip "ss3_4_3" in Frame 9
/* no clip actions */
Instance of Symbol 170 MovieClip "ss3_4_4" in Frame 9
/* no clip actions */
Instance of Symbol 170 MovieClip "ss3_4_5" in Frame 9
/* no clip actions */
Instance of Symbol 170 MovieClip "s3_4_1" in Frame 9
/* no clip actions */
Instance of Symbol 170 MovieClip "s3_4_2" in Frame 9
/* no clip actions */
Instance of Symbol 170 MovieClip "s3_4_3" in Frame 9
/* no clip actions */
Instance of Symbol 170 MovieClip "s3_4_4" in Frame 9
/* no clip actions */
Instance of Symbol 170 MovieClip "s3_4_5" in Frame 9
/* no clip actions */
Instance of Symbol 170 MovieClip "ss1_4_1" in Frame 9
/* no clip actions */
Instance of Symbol 170 MovieClip "ss1_4_2" in Frame 9
/* no clip actions */
Instance of Symbol 170 MovieClip "ss1_4_3" in Frame 9
/* no clip actions */
Instance of Symbol 170 MovieClip "ss1_4_4" in Frame 9
/* no clip actions */
Instance of Symbol 170 MovieClip "ss1_4_5" in Frame 9
/* no clip actions */
Instance of Symbol 170 MovieClip "s1_4_1" in Frame 9
/* no clip actions */
Instance of Symbol 170 MovieClip "s1_4_2" in Frame 9
/* no clip actions */
Instance of Symbol 170 MovieClip "s1_4_3" in Frame 9
/* no clip actions */
Instance of Symbol 170 MovieClip "s1_4_4" in Frame 9
/* no clip actions */
Instance of Symbol 170 MovieClip "s1_4_5" in Frame 9
/* no clip actions */
Instance of Symbol 170 MovieClip "s4_4_1" in Frame 9
/* no clip actions */
Instance of Symbol 170 MovieClip "s4_4_2" in Frame 9
/* no clip actions */
Instance of Symbol 170 MovieClip "s4_4_3" in Frame 9
/* no clip actions */
Instance of Symbol 170 MovieClip "s4_4_4" in Frame 9
/* no clip actions */
Instance of Symbol 170 MovieClip "s4_4_5" in Frame 9
/* no clip actions */
Frame 10
function pauseGame() {
trace(("pauseGame " + isPaused) + " before");
ff.text = isPaused + "\n\n";
if (isPaused) {
trace("after " + isPaused);
trace("trace paused");
pause_mc4._alpha = 0;
isPaused = false;
sound_mc.gotoAndPlay(2);
_global.allsound.setVolume(100);
minSpeed = 3;
maxSpeed = 6;
cover_mc._visible = false;
} else {
sound_mc.gotoAndStop(1);
pause_mc4._alpha = 100;
pausegame_txt.text = "paused";
isPaused = true;
minSpeed = 0;
maxSpeed = 0;
cover_mc._visible = true;
_global.allsound.setVolume(0);
}
}
isPaused = false;
pause_mc4._alpha = 0;
pkeyListener.onKeyDown = function () {
var _local1 = Key.getCode();
a.text = _local1;
if (_local1 == 80) {
pauseGame();
}
};
function gameOver() {
gotoAndStop ("EndGame");
}
function crash() {
var i = 1;
while (i <= totalLevels) {
eval (eval ("s1_5_" + i)).onEnterFrame = null;
eval (eval ("s2_5_" + i)).onEnterFrame = null;
eval (eval ("s3_5_" + i)).onEnterFrame = null;
eval (eval ("s4_5_" + i)).onEnterFrame = null;
eval (eval ("ss2_5_" + i)).onEnterFrame = null;
eval (eval ("ss4_5_" + i)).onEnterFrame = null;
i++;
}
setTimeout(gameOver, 1000);
}
function init() {
lc_mc._visible = false;
var i = 1;
while (i <= totalLevels) {
eval (("road" + i) + "_mc")._visible = false;
i++;
}
eval (("road" + level) + "_mc")._visible = true;
right();
bottom();
setTimeout(right1, 4000);
setTimeout(left, 8000);
setTimeout(bottom1, 11000);
}
function playAgain() {
setTimeout(top, 4000);
setTimeout(left, 6000);
setTimeout(bottom, 11000);
setTimeout(top1, 8000);
}
function top() {
var i = 1;
while (i <= 5) {
var t2b_mc = eval ("s2_5_" + i);
t2b_mc._y = i * -200;
if (level == 2) {
t2b_mc._x = 165.6;
}
t2b_mc.speed = minSpeed;
t2b_mc.clicks = 0;
t2b_mc.num = i;
t2b_mc.gotoAndStop(1 + random(frames));
t2b_mc.onRelease = function () {
this.clicks++;
if (this.clicks == 1) {
this.speed = maxSpeed;
} else if (this.clicks == 2) {
this.speed = 0;
} else if (this.clicks == 3) {
this.speed = minSpeed;
this.clicks = 0;
}
};
t2b_mc.onEnterFrame = function () {
if (!isPaused) {
this._y = this._y + this.speed;
}
if ((this._y > 0) && (this._y < 500)) {
this.onstage = true;
} else {
this.onstage = false;
}
var j = 1;
while (j <= 5) {
var mc = eval ("s1_5_" + j);
if (this.hit.hitTest(mc.hit)) {
trace("hit hit");
addFire(this, 1);
mc.onEnterFrame = null;
this.onEnterFrame = null;
crash();
}
j++;
}
var j = 1;
while (j <= 5) {
var mc = eval ("s3_5_" + j);
if (this.hit.hitTest(mc.hit)) {
trace("hit hit");
addFire(this, 1);
mc.onEnterFrame = null;
this.onEnterFrame = null;
crash();
}
j++;
}
var j = 1;
while (j <= 5) {
var mc = eval ("s2_5_" + j);
if (((this.hit.hitTest(mc.hit) && (this != mc)) && (mc.onstage)) && (this.onstage)) {
trace("hit hit");
addFire(this, 1);
mc.onEnterFrame = null;
this.onEnterFrame = null;
crash();
}
j++;
}
if (this._y > 550) {
this._y = -2000;
this.speed = minSpeed;
this.clicks = 0;
cleared++;
score = score + 100;
checkLevelCompleted();
}
};
i++;
}
}
function top1() {
var i = 1;
while (i <= 5) {
var t2b_mc = eval ("ss2_5_" + i);
t2b_mc._y = i * -200;
if (level == 2) {
t2b_mc._x = 165.6;
}
t2b_mc.speed = minSpeed;
t2b_mc.clicks = 0;
t2b_mc.num = i;
t2b_mc.gotoAndStop(1 + random(frames));
t2b_mc.onRelease = function () {
this.clicks++;
if (this.clicks == 1) {
this.speed = maxSpeed;
} else if (this.clicks == 2) {
this.speed = 0;
} else if (this.clicks == 3) {
this.speed = minSpeed;
this.clicks = 0;
}
};
t2b_mc.onEnterFrame = function () {
if (!isPaused) {
this._y = this._y + this.speed;
}
if ((this._y > 0) && (this._y < 500)) {
this.onstage = true;
} else {
this.onstage = false;
}
var j = 1;
while (j <= 5) {
var mc = eval ("s1_5_" + j);
if (this.hit.hitTest(mc.hit)) {
trace("hit hit");
addFire(this, 1);
mc.onEnterFrame = null;
this.onEnterFrame = null;
crash();
}
j++;
}
var j = 1;
while (j <= 5) {
var mc = eval ("s3_5_" + j);
if (this.hit.hitTest(mc.hit)) {
trace("hit hit");
addFire(this, 1);
mc.onEnterFrame = null;
this.onEnterFrame = null;
crash();
}
j++;
}
var j = 1;
while (j <= 5) {
var mc = eval ("ss2_5_" + j);
if (((this.hit.hitTest(mc.hit) && (this != mc)) && (mc.onstage)) && (this.onstage)) {
trace("hit hit");
addFire(this, 1);
mc.onEnterFrame = null;
this.onEnterFrame = null;
crash();
}
j++;
}
if (this._y > 550) {
this._y = -2000;
this.speed = minSpeed;
this.clicks = 0;
cleared++;
score = score + 100;
checkLevelCompleted();
}
};
i++;
}
}
function right() {
var i = 1;
while (i <= 5) {
var t3b_mc = eval ("s3_5_" + i);
t3b_mc._x = 700 + (i * 200);
t3b_mc.speed = minSpeed;
t3b_mc.clicks = 0;
t3b_mc.num = i;
t3b_mc.gotoAndStop(1 + random(frames));
t3b_mc.onRelease = function () {
this.clicks++;
if (this.clicks == 1) {
this.speed = maxSpeed;
} else if (this.clicks == 2) {
this.speed = 0;
} else if (this.clicks == 3) {
this.speed = minSpeed;
this.clicks = 0;
}
};
t3b_mc.onEnterFrame = function () {
if (!isPaused) {
this._x = this._x - this.speed;
}
if ((this._x > 0) && (this._x < 700)) {
this.onstage = true;
} else {
this.onstage = false;
}
var j = 1;
while (j <= 5) {
var mc = eval ("s2_5_" + j);
if (this.hit.hitTest(mc.hit)) {
trace("hit hit");
addFire(this, 2);
mc.onEnterFrame = null;
this.onEnterFrame = null;
crash();
}
j++;
}
var j = 1;
while (j <= 5) {
var mc = eval ("ss2_5_" + j);
if (this.hit.hitTest(mc.hit)) {
trace("hit hit");
addFire(this, 2);
mc.onEnterFrame = null;
this.onEnterFrame = null;
crash();
}
j++;
}
var j = 1;
while (j <= 5) {
var mc = eval ("s4_5_" + j);
if (this.hit.hitTest(mc.hit)) {
trace("hit hit");
addFire(this, 2);
mc.onEnterFrame = null;
this.onEnterFrame = null;
crash();
}
j++;
}
var j = 1;
while (j <= 5) {
var mc = eval ("ss4_5_" + j);
if (this.hit.hitTest(mc.hit)) {
trace("hit hit");
addFire(this, 2);
mc.onEnterFrame = null;
this.onEnterFrame = null;
crash();
}
j++;
}
var j = 1;
while (j <= 5) {
var mc = eval ("s3_5_" + j);
if (((this.hit.hitTest(mc.hit) && (this != mc)) && (mc.onstage)) && (this.onstage)) {
trace("hit hit");
addFire(this, 2);
mc.onEnterFrame = null;
this.onEnterFrame = null;
crash();
}
j++;
}
if (this._x < -100) {
this._x = 2700;
this.speed = minSpeed;
this.clicks = 0;
cleared++;
score = score + 100;
checkLevelCompleted();
}
};
i++;
}
}
function left() {
trace("left");
var i = 1;
while (i <= 5) {
var t1b_mc = eval ("s1_5_" + i);
t1b_mc._x = i * -200;
t1b_mc.speed = minSpeed;
t1b_mc.clicks = 0;
t1b_mc.num = i;
t1b_mc.gotoAndStop(1 + random(frames));
t1b_mc.onRelease = function () {
this.clicks++;
if (this.clicks == 1) {
this.speed = maxSpeed;
} else if (this.clicks == 2) {
this.speed = 0;
} else if (this.clicks == 3) {
this.speed = minSpeed;
this.clicks = 0;
}
};
t1b_mc.onEnterFrame = function () {
if (!isPaused) {
this._x = this._x + this.speed;
}
if ((this._x > 0) && (this._x < 700)) {
this.onstage = true;
} else {
this.onstage = false;
}
var j = 1;
while (j <= 5) {
var mc = eval ("s2_5_" + j);
if (this.hit.hitTest(mc.hit)) {
trace("hit hit");
addFire(this, 3);
mc.onEnterFrame = null;
this.onEnterFrame = null;
crash();
}
j++;
}
var j = 1;
while (j <= 5) {
var mc = eval ("s2_5_" + j);
if (this.hit.hitTest(mc.hit)) {
trace("hit hit");
addFire(this, 3);
mc.onEnterFrame = null;
this.onEnterFrame = null;
crash();
}
j++;
}
var j = 1;
while (j <= 5) {
var mc = eval ("s1_5_" + j);
if (((this.hit.hitTest(mc.hit) && (this != mc)) && (mc.onstage)) && (this.onstage)) {
trace("hit hit");
addFire(this, 3);
mc.onEnterFrame = null;
this.onEnterFrame = null;
crash();
}
j++;
}
if (this._x > 750) {
this._x = -2000;
this.speed = minSpeed;
this.clicks = 0;
cleared++;
score = score + 100;
checkLevelCompleted();
}
};
i++;
}
}
function bottom() {
trace("bottom");
var i = 1;
while (i <= 5) {
var t4b_mc = eval ("s4_5_" + i);
if (level == 2) {
t4b_mc._x = 218.9;
}
t4b_mc._y = 500 + (i * 200);
t4b_mc.speed = minSpeed;
t4b_mc.clicks = 0;
t4b_mc.num = i;
t4b_mc.gotoAndStop(1 + random(frames));
t4b_mc.onRelease = function () {
this.clicks++;
if (this.clicks == 1) {
this.speed = maxSpeed;
} else if (this.clicks == 2) {
this.speed = 0;
} else if (this.clicks == 3) {
this.speed = minSpeed;
this.clicks = 0;
}
};
t4b_mc.onEnterFrame = function () {
if (!isPaused) {
this._y = this._y - this.speed;
}
if ((this._y > 0) && (this._y < 500)) {
this.onstage = true;
} else {
this.onstage = false;
}
var j = 1;
while (j <= 5) {
var mc = eval ("s1_5_" + j);
if (this.hit.hitTest(mc.hit)) {
trace("hit hit");
addFire(this, 4);
mc.onEnterFrame = null;
this.onEnterFrame = null;
crash();
}
j++;
}
var j = 1;
while (j <= 5) {
var mc = eval ("s3_5_" + j);
if (this.hit.hitTest(mc.hit)) {
trace("hit hit");
addFire(this, 4);
mc.onEnterFrame = null;
this.onEnterFrame = null;
crash();
}
j++;
}
var j = 1;
while (j <= 5) {
var mc = eval ("s4_5_" + j);
if (((this.hit.hitTest(mc.hit) && (this != mc)) && (mc.onstage)) && (this.onstage)) {
trace("hit hit");
addFire(this, 4);
mc.onEnterFrame = null;
this.onEnterFrame = null;
crash();
}
j++;
}
if (this._y < -100) {
this._y = 2500;
this.speed = minSpeed;
this.clicks = 0;
cleared++;
score = score + 100;
checkLevelCompleted();
}
};
i++;
}
}
function bottom1() {
trace("bottom");
var i = 1;
while (i <= 5) {
var t4b_mc = eval ("ss4_5_" + i);
t4b_mc._y = 500 + (i * 200);
t4b_mc.speed = minSpeed;
t4b_mc.clicks = 0;
t4b_mc.num = i;
t4b_mc.gotoAndStop(1 + random(frames));
t4b_mc.onRelease = function () {
this.clicks++;
if (this.clicks == 1) {
this.speed = maxSpeed;
} else if (this.clicks == 2) {
this.speed = 0;
} else if (this.clicks == 3) {
this.speed = minSpeed;
this.clicks = 0;
}
};
t4b_mc.onEnterFrame = function () {
if (!isPaused) {
this._y = this._y - this.speed;
}
if ((this._y > 0) && (this._y < 500)) {
this.onstage = true;
} else {
this.onstage = false;
}
var j = 1;
while (j <= 5) {
var mc = eval ("s1_5_" + j);
if (this.hit.hitTest(mc.hit)) {
trace("hit hit");
addFire(this, 4);
mc.onEnterFrame = null;
this.onEnterFrame = null;
crash();
}
j++;
}
var j = 1;
while (j <= 5) {
var mc = eval ("s3_5_" + j);
if (this.hit.hitTest(mc.hit)) {
trace("hit hit");
addFire(this, 4);
mc.onEnterFrame = null;
this.onEnterFrame = null;
crash();
}
j++;
}
var j = 1;
while (j <= 5) {
var mc = eval ("ss4_5_" + j);
if (((this.hit.hitTest(mc.hit) && (this != mc)) && (mc.onstage)) && (this.onstage)) {
trace("hit hit");
addFire(this, 4);
mc.onEnterFrame = null;
this.onEnterFrame = null;
crash();
}
j++;
}
if (this._y < -100) {
this._y = 2500;
this.speed = minSpeed;
this.clicks = 0;
cleared++;
score = score + 100;
checkLevelCompleted();
}
};
i++;
}
}
function checkLevelCompleted() {
if (cleared >= 10) {
var i = 1;
while (i <= totalLevels) {
eval (eval ("s1_5_" + i)).removeMovieClip();
eval (eval ("s2_5_" + i)).removeMovieClip();
eval (eval ("s3_5_" + i)).removeMovieClip();
eval (eval ("s4_5_" + i)).removeMovieClip();
eval (eval ("ss2_5_" + i)).removeMovieClip();
eval (eval ("ss4_5_" + i)).removeMovieClip();
i++;
}
gotoAndStop ("gamecompleted");
}
}
function nextLevel() {
level++;
playerDetails.data.lev = level;
lc_mc._visible = false;
nextFrame();
}
function addFire(mc, pos) {
blast_snd.start(0, 1);
trace("mc mc mc mc " + mc._currentframe);
if (!blastTimes) {
blastTimes = true;
_root.attachMovie("blast", "blast1", _root.getNextHighestDepth());
blast1._width = 100;
blast1._height = 100;
if (pos == 1) {
if (mc._currentframe == 9) {
blast1._x = mc._x;
blast1._y = mc._y + 50;
} else if ((mc._currentframe == 7) || (mc._currentframe == 8)) {
blast1._x = mc._x;
blast1._y = mc._y + 40;
} else {
blast1._x = mc._x;
blast1._y = mc._y + 30;
}
} else if (pos == 2) {
if (mc._currentframe == 9) {
blast1._y = mc._y;
blast1._x = mc._x - 50;
} else if ((mc._currentframe == 7) || (mc._currentframe == 8)) {
blast1._x = mc._x - 40;
blast1._y = mc._y;
} else {
blast1._x = mc._x - 30;
blast1._y = mc._y;
}
} else if (pos == 3) {
if (mc._currentframe == 9) {
blast1._x = mc._x + 50;
blast1._y = mc._y;
} else if ((mc._currentframe == 7) || (mc._currentframe == 8)) {
blast1._x = mc._x + 40;
blast1._y = mc._y;
} else {
blast1._x = mc._x + 30;
blast1._y = mc._y;
}
} else if (pos == 4) {
if (mc._currentframe == 9) {
blast1._x = mc._x;
blast1._y = mc._y - 50;
} else if ((mc._currentframe == 7) || (mc._currentframe == 8)) {
blast1._x = mc._x;
blast1._y = mc._y - 40;
} else {
blast1._x = mc._x;
blast1._y = mc._y - 30;
}
}
}
}
cover_mc._visible = false;
stopAllSounds();
gamebg_snd.start(0, 999);
stop();
var level = 5;
var frames = 9;
var distance = 200;
var cleared = 0;
var totalLevels = 5;
menuPlayed = true;
var blastTimes = false;
pause_mc._alpha = 0;
minSpeed = 3;
maxSpeed = 6;
init();
Instance of Symbol 170 MovieClip "s2_5_4" in Frame 10
/* no clip actions */
Instance of Symbol 170 MovieClip "s2_5_3" in Frame 10
/* no clip actions */
Instance of Symbol 170 MovieClip "s2_5_2" in Frame 10
/* no clip actions */
Instance of Symbol 170 MovieClip "s2_5_1" in Frame 10
/* no clip actions */
Instance of Symbol 170 MovieClip "s2_5_5" in Frame 10
/* no clip actions */
Instance of Symbol 170 MovieClip "ss2_5_4" in Frame 10
/* no clip actions */
Instance of Symbol 170 MovieClip "ss2_5_3" in Frame 10
/* no clip actions */
Instance of Symbol 170 MovieClip "ss2_5_2" in Frame 10
/* no clip actions */
Instance of Symbol 170 MovieClip "ss2_5_1" in Frame 10
/* no clip actions */
Instance of Symbol 170 MovieClip "ss2_5_5" in Frame 10
/* no clip actions */
Instance of Symbol 170 MovieClip "s3_5_1" in Frame 10
/* no clip actions */
Instance of Symbol 170 MovieClip "s3_5_2" in Frame 10
/* no clip actions */
Instance of Symbol 170 MovieClip "s3_5_3" in Frame 10
/* no clip actions */
Instance of Symbol 170 MovieClip "s3_5_4" in Frame 10
/* no clip actions */
Instance of Symbol 170 MovieClip "s3_5_5" in Frame 10
/* no clip actions */
Instance of Symbol 170 MovieClip "s1_5_1" in Frame 10
/* no clip actions */
Instance of Symbol 170 MovieClip "s1_5_2" in Frame 10
/* no clip actions */
Instance of Symbol 170 MovieClip "s1_5_3" in Frame 10
/* no clip actions */
Instance of Symbol 170 MovieClip "s1_5_4" in Frame 10
/* no clip actions */
Instance of Symbol 170 MovieClip "s1_5_5" in Frame 10
/* no clip actions */
Instance of Symbol 170 MovieClip "s4_5_1" in Frame 10
/* no clip actions */
Instance of Symbol 170 MovieClip "s4_5_2" in Frame 10
/* no clip actions */
Instance of Symbol 170 MovieClip "s4_5_3" in Frame 10
/* no clip actions */
Instance of Symbol 170 MovieClip "s4_5_4" in Frame 10
/* no clip actions */
Instance of Symbol 170 MovieClip "s4_5_5" in Frame 10
/* no clip actions */
Instance of Symbol 170 MovieClip "ss4_5_1" in Frame 10
/* no clip actions */
Instance of Symbol 170 MovieClip "ss4_5_2" in Frame 10
/* no clip actions */
Instance of Symbol 170 MovieClip "ss4_5_3" in Frame 10
/* no clip actions */
Instance of Symbol 170 MovieClip "ss4_5_4" in Frame 10
/* no clip actions */
Instance of Symbol 170 MovieClip "ss4_5_5" in Frame 10
/* no clip actions */
Frame 11
function gameOverFunc(num) {
trace("gameOverFunc called " + num);
switch (num) {
case 1 :
submitScore();
break;
case 2 :
gotoAndStop ("Menu");
break;
case 3 :
moreGames();
}
}
function submitScore() {
trace("gameend_mc : " + gameend_mc.score);
var _local5 = name_txt.text;
var _local4 = _root.score;
var _local2 = "";
if (_local4 == "") {
_local2 = _local2 + "The score is required\n";
}
if (_local2 != "") {
status_txt.text = _local2;
return(undefined);
}
var _local3 = new LoadVars();
_local3.name = _local5;
_local3.score = _local4;
_local3.send(path, "_blank", "POST");
gotoAndStop ("Menu");
}
stopAllSounds();
Key.removeListener(pkeyListener);
name_txt.text = "Enter your name";
name_txt.onSetFocus = function () {
name_txt.text = "";
};
name_txt.onKillFocus = function () {
if (name_txt.text == "") {
name_txt.text = "Enter your name";
} else {
name_txt.text = "Player";
}
};
name_txt.border = true;
name_txt.borderColor = "0x651F01";
var path = "http://cargames9.co.uk/score/UStraffic/submit.php";
Frame 12
function gameCompletedFunc(num) {
trace("gameOverFunc called " + num);
switch (num) {
case 1 :
submitScore();
break;
case 2 :
level = 1;
playerDetails.data.lev = level;
gotoAndStop ("Menu");
break;
case 3 :
moreGames();
}
}
function submitScore() {
trace("gameend_mc : " + gameend_mc.score);
var _local5 = name_txt.text;
var _local4 = _root.score;
var _local2 = "";
if (_local4 == "") {
_local2 = _local2 + "The score is required\n";
}
if (_local2 != "") {
status_txt.text = _local2;
return(undefined);
}
var _local3 = new LoadVars();
_local3.name = _local5;
_local3.score = _local4;
_local3.send(path, "_blank", "POST");
level = 1;
playerDetails.data.lev = level;
gotoAndStop ("Menu");
}
stopAllSounds();
name_txt.text = "Enter your name";
name_txt.onSetFocus = function () {
name_txt.text = "";
};
name_txt.onKillFocus = function () {
if (name_txt.text == "") {
name_txt.text = "Enter your name";
} else {
name_txt.text = "Player";
}
};
name_txt.border = true;
name_txt.borderColor = "0x651F01";
var path = "http://cargames9.co.uk/score/UStraffic/submit.php";
Symbol 42 Button
on (release) {
getURL ("http://cargames9.co.uk", "_blank");
}
Symbol 43 MovieClip Frame 200
stop();
Symbol 50 MovieClip Frame 1
stop();
Symbol 50 MovieClip Frame 100
stop();
Symbol 52 Button
on (release) {
gotoAndStop ("Menu");
}
Symbol 61 MovieClip Frame 45
stop();
Symbol 66 MovieClip Frame 70
stop();
Symbol 76 MovieClip Frame 1
stop();
Symbol 76 MovieClip Frame 42
stop();
Symbol 77 MovieClip Frame 81
stop();
Symbol 85 Button
on (release) {
_root.menuFunc(1);
}
Symbol 102 Button
on (rollOver) {
_root.btns_snd.start(0, 1);
}
on (release) {
_root.menuFunc(1);
}
Symbol 103 Button
on (rollOver) {
_root.btns_snd.start(0, 1);
}
on (release) {
_root.menuFunc(5);
}
Symbol 104 Button
on (rollOver) {
_root.btns_snd.start(0, 1);
}
on (release) {
_root.menuFunc(2);
}
Symbol 105 Button
on (rollOver) {
_root.btns_snd.start(0, 1);
}
on (release) {
_root.menuFunc(3);
}
Symbol 106 Button
on (rollOver) {
_root.btns_snd.start(0, 1);
}
on (release) {
_root.menuFunc(4);
}
Symbol 107 MovieClip Frame 157
stop();
Symbol 115 MovieClip Frame 131
stop();
Instance of Symbol 61 MovieClip in Symbol 116 MovieClip Frame 1
onClipEvent (load) {
trace("_root.menuPlayed " + _root.menuPlayed);
if (_root.menuPlayed) {
this.gotoAndStop(this._totalframes);
} else {
this.play();
}
}
Instance of Symbol 66 MovieClip in Symbol 116 MovieClip Frame 1
onClipEvent (load) {
trace("_root.menuPlayed " + _root.menuPlayed);
if (_root.menuPlayed) {
this.gotoAndStop(this._totalframes);
} else {
this.play();
}
}
Instance of Symbol 77 MovieClip "sin" in Symbol 116 MovieClip Frame 1
onClipEvent (load) {
trace("_root.menuPlayed " + _root.menuPlayed);
if (_root.menuPlayed) {
this.gotoAndStop(this._totalframes);
} else {
this.play();
}
}
Instance of Symbol 107 MovieClip in Symbol 116 MovieClip Frame 1
onClipEvent (load) {
trace("_root.menuPlayed " + _root.menuPlayed);
if (_root.menuPlayed) {
this.gotoAndStop(this._totalframes);
} else {
this.play();
}
}
Instance of Symbol 115 MovieClip in Symbol 116 MovieClip Frame 1
onClipEvent (load) {
trace("_root.menuPlayed " + _root.menuPlayed);
if (_root.menuPlayed) {
this.gotoAndStop(this._totalframes);
} else {
this.play();
}
}
Symbol 118 MovieClip [blast] Frame 23
stop();
this.removeMovieClip();
Symbol 121 Button
on (release) {
moreGames();
}
Symbol 129 MovieClip Frame 10
gotoAndPlay (2);
Symbol 135 Button
on (rollOver) {
_root.btns_snd.start(0, 1);
}
on (release) {
level = 1;
gotoAndStop("level" + level);
}
Symbol 148 MovieClip Frame 1
stop();
Symbol 148 MovieClip Frame 2
stop();
Symbol 148 MovieClip Frame 3
stop();
Symbol 170 MovieClip Frame 1
stop();
Symbol 170 MovieClip Frame 2
stop();
Symbol 170 MovieClip Frame 3
stop();
Symbol 170 MovieClip Frame 4
stop();
Symbol 170 MovieClip Frame 5
stop();
Symbol 170 MovieClip Frame 6
stop();
Symbol 170 MovieClip Frame 7
stop();
Symbol 170 MovieClip Frame 8
stop();
Symbol 170 MovieClip Frame 9
stop();
Symbol 180 Button
on (release) {
moreGames();
}
Symbol 191 Button
on (rollOver) {
_root.btns_snd.start(0, 1);
}
on (release) {
_root.moreGames();
}
Symbol 195 Button
on (rollOver) {
_root.btns_snd.start(0, 1);
}
on (release) {
_root.nextLevel();
}
Symbol 198 Button
on (release) {
_root.moreGames();
}
Symbol 224 Button
on (rollOver) {
_root.btns_snd.start(0, 1);
}
on (release) {
gameOverFunc(3);
}
Symbol 227 Button
on (rollOver) {
_root.btns_snd.start(0, 1);
}
on (release) {
gameOverFunc(1);
}
Symbol 230 Button
on (rollOver) {
_root.btns_snd.start(0, 1);
}
on (release) {
gameOverFunc(2);
}
Symbol 237 Button
on (rollOver) {
_root.btns_snd.start(0, 1);
}
on (release) {
gameCompletedFunc(3);
}
Symbol 238 Button
on (rollOver) {
_root.btns_snd.start(0, 1);
}
on (release) {
gameCompletedFunc(1);
}
Symbol 239 Button
on (rollOver) {
_root.btns_snd.start(0, 1);
}
on (release) {
gameCompletedFunc(2);
}