Frame 2
function preloadSite() {
var _local4 = _root.getBytesLoaded();
var _local3 = _root.getBytesTotal();
var _local2 = Math.round((_local4 / _local3) * 100);
loadingBar._xscale = _local2;
loader_bar.gotoAndStop(_local2);
loader_geni.gotoAndStop(_local2);
bytesDisplay.text = _local2 + "%";
if (_local4 >= _local3) {
clearInterval(loadingCall);
gotoAndStop ("startbtn");
}
}
function deadClick() {
getURL ("http://www.cargames9.co.uk", "_blank");
}
function gotoMySite() {
getURL ("http://www.gamesgeni.com", "_blank");
}
stop();
fscommand ("showmenu", false);
var _mochiads_game_id = "7b338f12c3b35e52";
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", deadClick);
myMenu.customItems.push(mySiteLink);
myMenu.customItems.push(copyrightNotice);
_root.menu = myMenu;
fscommand ("alloscale", false);
Instance of Symbol 187 MovieClip in Frame 2
on (release) {
getURL ("http://www.gamesgeni.com/", "_blank");
}
Frame 3
function btnVisible() {
play_btn._visible = true;
}
stop();
play_btn._visible = false;
setTimeout(btnVisible, 500);
play_btn.onRelease = function () {
play();
};
Frame 4
_root.menusnd = new Sound();
_root.menusnd.attachSound("bg2snd");
_root.menucarsnd = new Sound();
_root.menucarsnd.attachSound("menucarsnd");
_root.menuchasesnd = new Sound();
_root.menuchasesnd.attachSound("menuchasesnd");
_root.btnsnd = new Sound();
_root.btnsnd.attachSound("btnsnd");
_root.bgsnd = new Sound(_root.createEmptyMovieClip("gamebgsound", 5002));
_root.bgsnd.attachSound("bg3snd");
_root.titlesnd = new Sound();
_root.titlesnd.attachSound("titlesnd");
_root.blastsnd = new Sound(_root.createEmptyMovieClip("carblastsound", 5001));
_root.blastsnd.attachSound("carblastsnd");
_root.bulletsnd = new Sound();
_root.bulletsnd.attachSound("shootingsnd");
_root.sirensnd = new Sound(_root.createEmptyMovieClip("sirentsound", 5003));
_root.sirensnd.attachSound("sirensnd");
_root.typingsnd = new Sound();
_root.typingsnd.attachSound("typeing");
_root.btnsanim = new Sound();
_root.btnsanim.attachSound("btnsanim");
_root.cardashsnd = new Sound();
_root.cardashsnd.attachSound("cardash");
_root.bonussnd = new Sound();
_root.bonussnd.attachSound("bonus");
play();
Frame 5
stopAllSounds();
stop();
Frame 6
function gotoandplaylevel() {
arr.splice(rno, 1);
trace(arr);
rno = random(arr.length);
if (arr.length > 0) {
gotoAndPlay(arr[rno]);
} else if (_root.levelnum < 5) {
var arr = new Array("game1", "game2", "game3", "game4", "game5");
rno = random(arr.length);
gotoAndPlay(arr[rno]);
}
if (_root.levelnum >= 5) {
gotoAndStop ("gamewin");
}
}
function playAgain() {
_root.gotoAndStop("menu");
}
var arr = new Array("game1", "game2", "game3", "game4", "game5");
_x = 0;
_y = 0;
_root.levelnum = 0;
_root.totalscore = 0;
_root.newscorevar = 0;
stopAllSounds();
_root.menusnd.start();
_root.menusnd.onSoundComplete = function () {
_root.menusnd.start();
};
bgSoundMc.swapDepths(1000000);
insBtn.onRelease = (insBtn.onReleaseOutside = function () {
gotoAndPlay ("help");
});
stageOfSending = 0;
targetsLeft = 5;
carsBlownUp = 0;
trucksKilled = 0;
pavementTime = 0;
stop();
Frame 8
_x = 0;
_y = 0;
_root.levelPlay = "story1";
playBtn.onRelease = function () {
gotoandplaylevel();
};
stopAllSounds();
stop();
Frame 10
function fadeIn(pMc) {
var pThis = this;
tween_handler = new mx.transitions.Tween(pMc, "_alpha", mx.transitions.easing.Strong.easeInOut, 100, 0, delayTime, true);
tween_handler.onMotionFinished = function () {
var _local3 = pThis.hud.messageD.msg_txt.text;
pThis.hud.messageD._alpha = 0;
pThis.hud.messageD.msg_txt.text = "";
if ((_local3 == "WellDone, You have successfully destroyed all the target......") && (_root.missionCompleteShown)) {
delete this.onEnterFrame;
_root.gotoAndPlay("levelscore1");
} else if (setMessagNum == 0) {
setMessage();
} else {
setMessagNum = 0;
}
};
}
function fadeOut(pMc) {
var pThis = this;
tween_handler = new mx.transitions.Tween(pMc, "_alpha", mx.transitions.easing.Strong.easeInOut, 0, 100, delayTime, true);
tween_handler.onMotionFinished = function () {
pThis.fadeIn(pMc);
};
}
function setMessage() {
messages = messages + 1;
setMessagNum = 1;
_root.hud.messageD.msg_txt.text = targetsLeft + " TARGETS LEFT...";
_root.hud.messageD.msg_txt._alpha = 100;
fadeOut(_root.hud.messageD);
}
preval = -1;
_root.asd = 0;
_root.asd2 = 0;
_root.levelno = 1;
_root.bulletnum = 100;
stageOfSending = 0;
carsBlownUp = 0;
trucksKilled = 0;
pavementTime = 0;
stopAllSounds();
_root.bgsnd.start();
_root.bgsnd.setVolume(80);
_root.bgsnd.onSoundComplete = function () {
_root.bgsnd.start();
};
_root.createEmptyMovieClip("bullet_mc", _root.getNextHighestDepth());
id = 4;
carId = 0;
carsAlive = 0;
maxCars = 5;
score = 0;
nextCar = false;
distTrav = 0;
messages = 0;
targetsLeft = 3 + _root.levelnum;
trace((("targetsLeft= " + targetsLeft) + " _root.levelnum ") + _root.levelnum);
targetsStored = targetsLeft;
targetTime = 20;
missionCompleteShown = false;
currentLife = 0;
averageSpeed = 0;
deathRattle = 0;
timerL = 0;
lifeStored = 0;
var delayTime = 0.8;
var setMessagNum = 0;
_root.bgSound.stop();
messages = messages + 1;
var tween_handler;
_root.hud.messageD._alpha = 0;
_root.hud.messageD.msg_txt.text = "";
var checkInter;
var checkLife = true;
var checkRange = false;
var pLife1;
var hitLife = 0;
_root.timervalue = 180;
this.onEnterFrame = function () {
if (_root.timervalue <= 0) {
gotoAndStop ("death");
delete this.onEnterFrame;
}
if (_root.asd == preval) {
_root.asd = 0;
if (_root.asd2 > 0) {
_root.asd2 = _root.asd2 - 0.2345;
}
}
if (_root.asd2 <= 0) {
_root.asd2 = _root.asd2 + 0.2345;
}
if (_root.asd >= 10) {
_root.asd = 1;
}
preval = _root.asd;
if (game.player.life < 1) {
deathRattle = deathRattle + 1;
}
if (deathRattle > 20) {
gotoAndPlay ("death");
delete this.onEnterFrame;
}
if (targetsLeft <= 0) {
targetsStored = targetsLeft;
missionCompleteShown = true;
gotoAndPlay ("levelscore1");
delete this.onEnterFrame;
}
if (targetsStored > targetsLeft) {
messages = messages + 1;
targetsStored = targetsLeft;
if (targetsLeft > 0) {
messages = messages + 1;
_root.hud.messageD.msg_txt.text = "TARGET DESTROYED ";
_root.hud.messageD.msg_txt._alpha = 100;
fadeOut(_root.hud.messageD);
hud.targetDisplay.targetDist = Math.round(_root.distTrav) + 5;
hud.targetDisplay.told = false;
}
hud.targetDisplay.told = false;
}
if ((targetsLeft <= 0) && (targetTime > 0)) {
targetTime = targetTime - 1;
}
if ((targetTime == 0) && (missionCompleteShown == false)) {
messages = messages + 1;
_root.hud.messageD.msg_txt.text = "WellDone, You have successfully destroyed all the target......";
_root.hud.messageD.msg_txt._alpha = 100;
fadeOut(_root.hud.messageD);
targetsStored = targetsLeft;
missionCompleteShown = true;
delete this.onEnterFrame;
}
if (missionCompleteShown) {
}
var _local3 = (275 - (game._x + game.player._x)) * (game._xscale / 100);
_x = (_x - ((_x - _local3) / 5));
hud._x = (-_x) + 300;
if (currentDepth > 50) {
currentDepth = 0;
}
xscaler = (1 / (100 / _root.game._xscale)) + _root.game._x;
yscaler = (1 / (100 / _root.game._yscale)) + _root.game._y;
i = _root.maxCars;
while (i > 0) {
if (_root.game["car" + i]._x == undefined) {
_root.carId = i - 1;
}
i = i - 1;
}
timerL = timerL + 1;
if (timerL == 2) {
if ((game.player.life > lifeStored) && (game.player.life > 0)) {
game.player.life = game.player.life - ((game.player.life - lifeStored) * 2);
}
timerL = 0;
} else {
lifeStored = game.player.life;
}
};
bgSoundMc.swapDepths(100000);
_root.hud._visible = 1;
_root.hud._alpha = 100;
stop();
Instance of Symbol 647 MovieClip "game" in Frame 10
onClipEvent (load) {
trafficSound = new Sound(_root.game.effects);
trafficSound.attachSound("traffic");
trafficSound.start(0, 99);
}
onClipEvent (enterFrame) {
trafficSound.setVolume(_root.carsAlive * 10);
var targetXscale = 60;
_xscale = (_xscale - ((_xscale - targetXscale) / 5));
_yscale = _xscale;
}
on (keyPress "m") {
if (_root.hud.soundmc._currentframe == 1) {
_root.hud.soundmc.gotoAndPlay(2);
} else if (_root.hud.soundmc._currentframe == 2) {
_root.hud.soundmc.gotoAndPlay(1);
}
}
Instance of Symbol 686 MovieClip "hud" in Frame 10
onClipEvent (load) {
timer = 0;
timesLogged = 0;
totalSpeed = 0;
averageSpeed = 0;
fader.swapDepths(3000);
}
onClipEvent (enterFrame) {
displayText = _root.game._x;
_root.distTrav = _root.distTrav + (_root.game.player.yspeed / 5000);
var speed = Math.round(_root.game.player.yspeed * 3.5);
timer = timer + 1;
if (timer > 1) {
timesLogged = timesLogged + 1;
totalSpeed = totalSpeed + speed;
averageSpeed = Math.round(totalSpeed / timesLogged);
timer = 0;
}
_root.currentLife = _root.game.player.life;
lft_target.text = _root.targetsLeft;
_root.averageSpeed = averageSpeed;
health = Math.round(_root.currentLife);
healthMc.maskMc._yscale = Math.round(health / 6);
credits = Math.round(_root.score);
currentSpeed = speed + " Kmph";
_root.mcanimspeed = Math.abs(speed);
_root.hud.mtr._rotation = _root.mcanimspeed;
_root.game.arrmouse.maskMc._yscale = _root.mcanimspeed;
}
Frame 15
_x = 0;
_y = 0;
messages = 0;
_root.levelnum++;
timer = 0;
remove = false;
_root.totalscore = _root.totalscore + (_root.timervalue * 2);
_root.totalscore = _root.totalscore + _root.newscorevar;
trace((_root.totalscore + " = :") + _root.newscorevar);
stopAllSounds();
if (_root.levelnum >= 5) {
gotoAndStop ("gamewin");
}
stop();
Frame 22
_root.levelPlay = "story2";
stopAllSounds();
stop();
Frame 23
function fadeIn(pMc) {
var pThis = this;
tween_handler = new mx.transitions.Tween(pMc, "_alpha", mx.transitions.easing.Strong.easeInOut, 100, 0, delayTime, true);
tween_handler.onMotionFinished = function () {
var _local3 = pThis.hud.messageD.msg_txt.text;
pThis.hud.messageD._alpha = 0;
pThis.hud.messageD.msg_txt.text = "";
if ((_local3 == "WellDone, You have successfully destroyed all the target......") && (_root.missionCompleteShown)) {
delete this.onEnterFrame;
_root.gotoAndPlay("levelscore1");
} else if (setMessagNum == 0) {
setMessage();
} else {
setMessagNum = 0;
}
};
}
function fadeOut(pMc) {
var pThis = this;
tween_handler = new mx.transitions.Tween(pMc, "_alpha", mx.transitions.easing.Strong.easeInOut, 0, 100, delayTime, true);
tween_handler.onMotionFinished = function () {
pThis.fadeIn(pMc);
};
}
function setMessage() {
messages = messages + 1;
setMessagNum = 1;
_root.hud.messageD.msg_txt.text = targetsLeft + " TARGETS LEFT...";
_root.hud.messageD.msg_txt._alpha = 100;
fadeOut(_root.hud.messageD);
}
preval = -1;
_root.asd = 0;
_root.asd2 = 0;
_root.bulletnum = 100;
_root.levelno = 2;
stageOfSending = 0;
carsBlownUp = 0;
trucksKilled = 0;
pavementTime = 0;
stopAllSounds();
_root.bgsnd.start();
_root.bgsnd.setVolume(80);
_root.bgsnd.onSoundComplete = function () {
_root.bgsnd.start();
};
_root.createEmptyMovieClip("bullet_mc", _root.getNextHighestDepth());
id = 4;
carId = 0;
carsAlive = 0;
maxCars = 5;
score = 0;
nextCar = false;
distTrav = 0;
messages = 0;
targetsLeft = 3 + _root.levelnum;
trace((("targetsLeft= " + targetsLeft) + " _root.levelnum ") + _root.levelnum);
targetsStored = targetsLeft;
targetTime = 20;
missionCompleteShown = false;
currentLife = 0;
averageSpeed = 0;
deathRattle = 0;
timerL = 0;
lifeStored = 0;
var delayTime = 0.8;
var setMessagNum = 0;
_root.bgSound.stop();
messages = messages + 1;
var tween_handler;
_root.hud.messageD._alpha = 0;
_root.hud.messageD.msg_txt.text = "";
var checkInter;
var checkLife = true;
var checkRange = false;
var pLife1;
var hitLife = 0;
_root.timervalue = 180;
this.onEnterFrame = function () {
if (_root.timervalue <= 0) {
gotoAndStop ("death");
delete this.onEnterFrame;
}
if (_root.asd == preval) {
_root.asd = 0;
if (_root.asd2 > 0) {
_root.asd2 = _root.asd2 - 0.2345;
}
}
if (_root.asd2 <= 0) {
_root.asd2 = _root.asd2 + 0.2345;
}
if (_root.asd >= 10) {
_root.asd = 1;
}
preval = _root.asd;
if (game.player.life < 1) {
deathRattle = deathRattle + 1;
}
if (deathRattle > 20) {
gotoAndPlay ("death");
delete this.onEnterFrame;
}
if (targetsLeft <= 0) {
targetsStored = targetsLeft;
missionCompleteShown = true;
gotoAndPlay ("levelscore2");
delete this.onEnterFrame;
}
if (targetsStored > targetsLeft) {
messages = messages + 1;
targetsStored = targetsLeft;
if (targetsLeft > 0) {
messages = messages + 1;
_root.hud.messageD.msg_txt.text = "TARGET DESTROYED ";
_root.hud.messageD.msg_txt._alpha = 100;
fadeOut(_root.hud.messageD);
hud.targetDisplay.targetDist = Math.round(_root.distTrav) + 5;
hud.targetDisplay.told = false;
}
hud.targetDisplay.told = false;
}
if ((targetsLeft == 0) && (targetTime > 0)) {
targetTime = targetTime - 1;
}
if ((targetTime == 0) && (missionCompleteShown == false)) {
messages = messages + 1;
_root.hud.messageD.msg_txt.text = "WellDone, You have successfully destroyed all the target......";
_root.hud.messageD.msg_txt._alpha = 100;
fadeOut(_root.hud.messageD);
targetsStored = targetsLeft;
missionCompleteShown = true;
delete this.onEnterFrame;
}
if (missionCompleteShown) {
}
var _local3 = (275 - (game._x + game.player._x)) * (game._xscale / 100);
_x = (_x - ((_x - _local3) / 5));
hud._x = (-_x) + 300;
moreG1Btn._x = (-_x) + 50;
if (currentDepth > 50) {
currentDepth = 0;
}
xscaler = (1 / (100 / _root.game._xscale)) + _root.game._x;
yscaler = (1 / (100 / _root.game._yscale)) + _root.game._y;
i = _root.maxCars;
while (i > 0) {
if (_root.game["car" + i]._x == undefined) {
_root.carId = i - 1;
}
i = i - 1;
}
timerL = timerL + 1;
if (timerL == 2) {
if ((game.player.life > lifeStored) && (game.player.life > 0)) {
game.player.life = game.player.life - ((game.player.life - lifeStored) * 2);
}
timerL = 0;
} else {
lifeStored = game.player.life;
}
};
bgSoundMc.swapDepths(100000);
_root.hud._visible = 1;
_root.hud._alpha = 100;
stop();
Instance of Symbol 934 MovieClip "game" in Frame 23
onClipEvent (load) {
trafficSound = new Sound(_root.game.effects);
trafficSound.attachSound("traffic");
trafficSound.start(0, 99);
}
onClipEvent (enterFrame) {
trafficSound.setVolume(_root.carsAlive * 10);
var targetXscale = 60;
_xscale = (_xscale - ((_xscale - targetXscale) / 5));
_yscale = _xscale;
}
on (keyPress "m") {
if (_root.hud.soundmc._currentframe == 1) {
_root.hud.soundmc.gotoAndPlay(2);
} else if (_root.hud.soundmc._currentframe == 2) {
_root.hud.soundmc.gotoAndPlay(1);
}
}
Instance of Symbol 686 MovieClip "hud" in Frame 23
onClipEvent (load) {
timer = 0;
timesLogged = 0;
totalSpeed = 0;
averageSpeed = 0;
fader.swapDepths(3000);
}
onClipEvent (enterFrame) {
displayText = _root.game._x;
_root.distTrav = _root.distTrav + (_root.game.player.yspeed / 5000);
var speed = Math.round(_root.game.player.yspeed * 3.5);
timer = timer + 1;
if (timer > 1) {
timesLogged = timesLogged + 1;
totalSpeed = totalSpeed + speed;
averageSpeed = Math.round(totalSpeed / timesLogged);
timer = 0;
}
_root.currentLife = _root.game.player.life;
lft_target.text = _root.targetsLeft;
_root.averageSpeed = averageSpeed;
health = Math.round(_root.currentLife);
healthMc.maskMc._yscale = Math.round(health / 6);
credits = Math.round(_root.score);
currentSpeed = speed + " Kmph";
_root.mcanimspeed = Math.abs(speed);
_root.hud.mtr._rotation = _root.mcanimspeed;
_root.game.arrmouse.maskMc._yscale = _root.mcanimspeed;
}
Frame 29
_x = 0;
_y = 0;
messages = 0;
timer = 0;
_root.levelnum++;
remove = false;
_root.totalscore = _root.totalscore + (_root.timervalue * 2);
_root.totalscore = _root.totalscore + _root.newscorevar;
trace((_root.totalscore + " = :") + _root.newscorevar);
stopAllSounds();
if (_root.levelnum >= 5) {
gotoAndStop ("gamewin");
}
stop();
Frame 35
stopAllSounds();
stop();
Frame 36
function fadeIn(pMc) {
var pThis = this;
tween_handler = new mx.transitions.Tween(pMc, "_alpha", mx.transitions.easing.Strong.easeInOut, 100, 0, delayTime, true);
tween_handler.onMotionFinished = function () {
var _local3 = pThis.hud.messageD.msg_txt.text;
pThis.hud.messageD._alpha = 0;
pThis.hud.messageD.msg_txt.text = "";
if ((_local3 == "WellDone, You have successfully destroyed all the target......") && (_root.missionCompleteShown)) {
delete this.onEnterFrame;
_root.gotoAndPlay("levelscore1");
} else if (setMessagNum == 0) {
setMessage();
} else {
setMessagNum = 0;
}
};
}
function fadeOut(pMc) {
var pThis = this;
tween_handler = new mx.transitions.Tween(pMc, "_alpha", mx.transitions.easing.Strong.easeInOut, 0, 100, delayTime, true);
tween_handler.onMotionFinished = function () {
pThis.fadeIn(pMc);
};
}
function setMessage() {
messages = messages + 1;
setMessagNum = 1;
_root.hud.messageD.msg_txt.text = targetsLeft + " TARGETS LEFT...";
_root.hud.messageD.msg_txt._alpha = 100;
fadeOut(_root.hud.messageD);
}
preval = -1;
_root.asd = 0;
_root.asd2 = 0;
_root.bulletnum = 100;
_root.levelno = 3;
stageOfSending = 0;
carsBlownUp = 0;
trucksKilled = 0;
pavementTime = 0;
stopAllSounds();
_root.bgsnd.start();
_root.bgsnd.setVolume(80);
_root.bgsnd.onSoundComplete = function () {
_root.bgsnd.start();
};
_root.createEmptyMovieClip("bullet_mc", _root.getNextHighestDepth());
id = 4;
carId = 0;
carsAlive = 0;
maxCars = 5;
score = 0;
nextCar = false;
distTrav = 0;
messages = 0;
targetsLeft = 3 + _root.levelnum;
trace((("targetsLeft= " + targetsLeft) + " _root.levelnum ") + _root.levelnum);
targetsStored = targetsLeft;
targetTime = 20;
missionCompleteShown = false;
currentLife = 0;
averageSpeed = 0;
deathRattle = 0;
timerL = 0;
lifeStored = 0;
var delayTime = 0.8;
var setMessagNum = 0;
_root.bgSound.stop();
messages = messages + 1;
var tween_handler;
_root.hud.messageD._alpha = 0;
_root.hud.messageD.msg_txt.text = "";
var checkInter;
var checkLife = true;
var checkRange = false;
var pLife1;
var hitLife = 0;
_root.timervalue = 180;
this.onEnterFrame = function () {
if (_root.timervalue <= 0) {
gotoAndStop ("death");
delete this.onEnterFrame;
}
if (_root.asd == preval) {
_root.asd = 0;
if (_root.asd2 > 0) {
_root.asd2 = _root.asd2 - 0.2345;
}
}
if (_root.asd2 <= 0) {
_root.asd2 = _root.asd2 + 0.2345;
}
if (_root.asd >= 10) {
_root.asd = 1;
}
preval = _root.asd;
if (game.player.life < 1) {
deathRattle = deathRattle + 1;
}
if (deathRattle > 20) {
gotoAndPlay ("death");
delete this.onEnterFrame;
}
if (targetsLeft <= 0) {
targetsStored = targetsLeft;
missionCompleteShown = true;
gotoAndPlay ("levelscore3");
delete this.onEnterFrame;
}
if (targetsStored > targetsLeft) {
messages = messages + 1;
targetsStored = targetsLeft;
if (targetsLeft > 0) {
messages = messages + 1;
_root.hud.messageD.msg_txt.text = "TARGET DESTROYED ";
_root.hud.messageD.msg_txt._alpha = 100;
fadeOut(_root.hud.messageD);
hud.targetDisplay.targetDist = Math.round(_root.distTrav) + 5;
hud.targetDisplay.told = false;
}
hud.targetDisplay.told = false;
}
if ((targetsLeft == 0) && (targetTime > 0)) {
targetTime = targetTime - 1;
}
if ((targetTime == 0) && (missionCompleteShown == false)) {
messages = messages + 1;
_root.hud.messageD.msg_txt.text = "WellDone, You have successfully destroyed all the target......";
_root.hud.messageD.msg_txt._alpha = 100;
fadeOut(_root.hud.messageD);
targetsStored = targetsLeft;
missionCompleteShown = true;
delete this.onEnterFrame;
}
if (missionCompleteShown) {
}
var _local3 = (275 - (game._x + game.player._x)) * (game._xscale / 100);
_x = (_x - ((_x - _local3) / 5));
hud._x = (-_x) + 300;
moreG1Btn._x = (-_x) + 50;
if (currentDepth > 50) {
currentDepth = 0;
}
xscaler = (1 / (100 / _root.game._xscale)) + _root.game._x;
yscaler = (1 / (100 / _root.game._yscale)) + _root.game._y;
i = _root.maxCars;
while (i > 0) {
if (_root.game["car" + i]._x == undefined) {
_root.carId = i - 1;
}
i = i - 1;
}
timerL = timerL + 1;
if (timerL == 2) {
if ((game.player.life > lifeStored) && (game.player.life > 0)) {
game.player.life = game.player.life - ((game.player.life - lifeStored) * 2);
}
timerL = 0;
} else {
lifeStored = game.player.life;
}
};
bgSoundMc.swapDepths(100000);
_root.hud._visible = 1;
_root.hud._alpha = 100;
stop();
Instance of Symbol 949 MovieClip "game" in Frame 36
onClipEvent (load) {
trafficSound = new Sound(_root.game.effects);
trafficSound.attachSound("traffic");
trafficSound.start(0, 99);
}
onClipEvent (enterFrame) {
trafficSound.setVolume(_root.carsAlive * 10);
var targetXscale = 60;
_xscale = (_xscale - ((_xscale - targetXscale) / 5));
_yscale = _xscale;
}
on (keyPress "m") {
if (_root.hud.soundmc._currentframe == 1) {
_root.hud.soundmc.gotoAndPlay(2);
} else if (_root.hud.soundmc._currentframe == 2) {
_root.hud.soundmc.gotoAndPlay(1);
}
}
Instance of Symbol 686 MovieClip "hud" in Frame 36
onClipEvent (load) {
timer = 0;
timesLogged = 0;
totalSpeed = 0;
averageSpeed = 0;
fader.swapDepths(3000);
}
onClipEvent (enterFrame) {
displayText = _root.game._x;
_root.distTrav = _root.distTrav + (_root.game.player.yspeed / 5000);
var speed = Math.round(_root.game.player.yspeed * 3.5);
timer = timer + 1;
if (timer > 1) {
timesLogged = timesLogged + 1;
totalSpeed = totalSpeed + speed;
averageSpeed = Math.round(totalSpeed / timesLogged);
timer = 0;
}
_root.currentLife = _root.game.player.life;
lft_target.text = _root.targetsLeft;
_root.averageSpeed = averageSpeed;
health = Math.round(_root.currentLife);
healthMc.maskMc._yscale = Math.round(health / 6);
credits = Math.round(_root.score);
currentSpeed = speed + " Kmph";
_root.mcanimspeed = Math.abs(speed);
_root.hud.mtr._rotation = _root.mcanimspeed;
_root.game.arrmouse.maskMc._yscale = _root.mcanimspeed;
}
Frame 42
_x = 0;
_y = 0;
stopAllSounds();
messages = 0;
timer = 0;
_root.levelnum++;
remove = false;
_root.totalscore = _root.totalscore + (_root.timervalue * 2);
_root.totalscore = _root.totalscore + _root.newscorevar;
trace((_root.totalscore + " = :") + _root.newscorevar);
if (_root.levelnum >= 5) {
gotoAndStop ("gamewin");
}
stop();
Frame 45
_root.levelPlay = "story4";
stopAllSounds();
stop();
Frame 46
function fadeIn(pMc) {
var pThis = this;
tween_handler = new mx.transitions.Tween(pMc, "_alpha", mx.transitions.easing.Strong.easeInOut, 100, 0, delayTime, true);
tween_handler.onMotionFinished = function () {
var _local3 = pThis.hud.messageD.msg_txt.text;
pThis.hud.messageD._alpha = 0;
pThis.hud.messageD.msg_txt.text = "";
if ((_local3 == "WellDone, You have successfully destroyed all the target......") && (_root.missionCompleteShown)) {
delete this.onEnterFrame;
_root.gotoAndPlay("levelscore1");
} else if (setMessagNum == 0) {
setMessage();
} else {
setMessagNum = 0;
}
};
}
function fadeOut(pMc) {
var pThis = this;
tween_handler = new mx.transitions.Tween(pMc, "_alpha", mx.transitions.easing.Strong.easeInOut, 0, 100, delayTime, true);
tween_handler.onMotionFinished = function () {
pThis.fadeIn(pMc);
};
}
function setMessage() {
messages = messages + 1;
setMessagNum = 1;
_root.hud.messageD.msg_txt.text = targetsLeft + " TARGETS LEFT...";
_root.hud.messageD.msg_txt._alpha = 100;
fadeOut(_root.hud.messageD);
}
preval = -1;
_root.asd = 0;
_root.asd2 = 0;
_root.bulletnum = 100;
_root.levelno = 4;
stageOfSending = 0;
carsBlownUp = 0;
trucksKilled = 0;
pavementTime = 0;
stopAllSounds();
_root.bgsnd.start();
_root.bgsnd.setVolume(80);
_root.bgsnd.onSoundComplete = function () {
_root.bgsnd.start();
};
_root.createEmptyMovieClip("bullet_mc", _root.getNextHighestDepth());
id = 4;
carId = 0;
carsAlive = 0;
maxCars = 5;
score = 0;
nextCar = false;
distTrav = 0;
messages = 0;
targetsLeft = 3 + _root.levelnum;
trace((("targetsLeft= " + targetsLeft) + " _root.levelnum ") + _root.levelnum);
targetsStored = targetsLeft;
targetTime = 20;
missionCompleteShown = false;
currentLife = 0;
averageSpeed = 0;
deathRattle = 0;
timerL = 0;
lifeStored = 0;
var delayTime = 0.8;
var setMessagNum = 0;
_root.bgSound.stop();
messages = messages + 1;
var tween_handler;
_root.hud.messageD._alpha = 0;
_root.hud.messageD.msg_txt.text = "";
var checkInter;
var checkLife = true;
var checkRange = false;
var pLife1;
var hitLife = 0;
_root.timervalue = 180;
this.onEnterFrame = function () {
if (_root.timervalue <= 0) {
gotoAndStop ("death");
delete this.onEnterFrame;
}
if (_root.asd == preval) {
_root.asd = 0;
if (_root.asd2 > 0) {
_root.asd2 = _root.asd2 - 0.2345;
}
}
if (_root.asd2 <= 0) {
_root.asd2 = _root.asd2 + 0.2345;
}
if (_root.asd >= 10) {
_root.asd = 1;
}
preval = _root.asd;
if (game.player.life < 1) {
deathRattle = deathRattle + 1;
}
if (deathRattle > 20) {
gotoAndPlay ("death");
delete this.onEnterFrame;
}
if (targetsLeft <= 0) {
targetsStored = targetsLeft;
missionCompleteShown = true;
gotoAndPlay ("levelscore4");
delete this.onEnterFrame;
}
if (targetsStored > targetsLeft) {
messages = messages + 1;
targetsStored = targetsLeft;
if (targetsLeft > 0) {
messages = messages + 1;
_root.hud.messageD.msg_txt.text = "TARGET DESTROYED ";
_root.hud.messageD.msg_txt._alpha = 100;
fadeOut(_root.hud.messageD);
hud.targetDisplay.targetDist = Math.round(_root.distTrav) + 5;
hud.targetDisplay.told = false;
}
hud.targetDisplay.told = false;
}
if ((targetsLeft == 0) && (targetTime > 0)) {
targetTime = targetTime - 1;
}
if ((targetTime == 0) && (missionCompleteShown == false)) {
messages = messages + 1;
_root.hud.messageD.msg_txt.text = "WellDone, You have successfully destroyed all the target......";
_root.hud.messageD.msg_txt._alpha = 100;
fadeOut(_root.hud.messageD);
targetsStored = targetsLeft;
missionCompleteShown = true;
delete this.onEnterFrame;
}
if (missionCompleteShown) {
}
var _local3 = (275 - (game._x + game.player._x)) * (game._xscale / 100);
_x = (_x - ((_x - _local3) / 5));
hud._x = (-_x) + 300;
moreG1Btn._x = (-_x) + 50;
if (currentDepth > 50) {
currentDepth = 0;
}
xscaler = (1 / (100 / _root.game._xscale)) + _root.game._x;
yscaler = (1 / (100 / _root.game._yscale)) + _root.game._y;
i = _root.maxCars;
while (i > 0) {
if (_root.game["car" + i]._x == undefined) {
_root.carId = i - 1;
}
i = i - 1;
}
timerL = timerL + 1;
if (timerL == 2) {
if ((game.player.life > lifeStored) && (game.player.life > 0)) {
game.player.life = game.player.life - ((game.player.life - lifeStored) * 2);
}
timerL = 0;
} else {
lifeStored = game.player.life;
}
};
bgSoundMc.swapDepths(100000);
_root.hud._visible = 1;
_root.hud._alpha = 100;
stop();
Instance of Symbol 961 MovieClip "game" in Frame 46
onClipEvent (load) {
trafficSound = new Sound(_root.game.effects);
trafficSound.attachSound("traffic");
trafficSound.start(0, 99);
}
onClipEvent (enterFrame) {
trafficSound.setVolume(_root.carsAlive * 10);
var targetXscale = 60;
_xscale = (_xscale - ((_xscale - targetXscale) / 5));
_yscale = _xscale;
}
on (keyPress "m") {
if (_root.hud.soundmc._currentframe == 1) {
_root.hud.soundmc.gotoAndPlay(2);
} else if (_root.hud.soundmc._currentframe == 2) {
_root.hud.soundmc.gotoAndPlay(1);
}
}
Instance of Symbol 686 MovieClip "hud" in Frame 46
onClipEvent (load) {
timer = 0;
timesLogged = 0;
totalSpeed = 0;
averageSpeed = 0;
fader.swapDepths(3000);
}
onClipEvent (enterFrame) {
displayText = _root.game._x;
_root.distTrav = _root.distTrav + (_root.game.player.yspeed / 5000);
var speed = Math.round(_root.game.player.yspeed * 3.5);
timer = timer + 1;
if (timer > 1) {
timesLogged = timesLogged + 1;
totalSpeed = totalSpeed + speed;
averageSpeed = Math.round(totalSpeed / timesLogged);
timer = 0;
}
_root.currentLife = _root.game.player.life;
lft_target.text = _root.targetsLeft;
_root.averageSpeed = averageSpeed;
health = Math.round(_root.currentLife);
healthMc.maskMc._yscale = Math.round(health / 6);
credits = Math.round(_root.score);
currentSpeed = speed + " Kmph";
_root.mcanimspeed = Math.abs(speed);
_root.hud.mtr._rotation = _root.mcanimspeed;
_root.game.arrmouse.maskMc._yscale = _root.mcanimspeed;
}
Frame 52
_x = 0;
_y = 0;
stopAllSounds();
messages = 0;
timer = 0;
remove = false;
_root.levelnum++;
_root.totalscore = _root.totalscore + (_root.timervalue * 2);
_root.totalscore = _root.totalscore + _root.newscorevar;
trace((_root.totalscore + " = :") + _root.newscorevar);
if (_root.levelnum >= 5) {
gotoAndStop ("gamewin");
}
stop();
Frame 56
_root.levelPlay = "story5";
stopAllSounds();
stop();
Frame 57
function fadeIn(pMc) {
var pThis = this;
tween_handler = new mx.transitions.Tween(pMc, "_alpha", mx.transitions.easing.Strong.easeInOut, 100, 0, delayTime, true);
tween_handler.onMotionFinished = function () {
var _local3 = pThis.hud.messageD.msg_txt.text;
pThis.hud.messageD._alpha = 0;
pThis.hud.messageD.msg_txt.text = "";
if ((_local3 == "WellDone, You have successfully destroyed all the target......") && (_root.missionCompleteShown)) {
delete this.onEnterFrame;
_root.gotoAndPlay("levelscore1");
} else if (setMessagNum == 0) {
setMessage();
} else {
setMessagNum = 0;
}
};
}
function fadeOut(pMc) {
var pThis = this;
tween_handler = new mx.transitions.Tween(pMc, "_alpha", mx.transitions.easing.Strong.easeInOut, 0, 100, delayTime, true);
tween_handler.onMotionFinished = function () {
pThis.fadeIn(pMc);
};
}
function setMessage() {
messages = messages + 1;
setMessagNum = 1;
_root.hud.messageD.msg_txt.text = targetsLeft + " TARGETS LEFT...";
_root.hud.messageD.msg_txt._alpha = 100;
fadeOut(_root.hud.messageD);
}
preval = -1;
_root.asd = 0;
_root.asd2 = 0;
_root.bulletnum = 100;
_root.levelno = 5;
stageOfSending = 0;
carsBlownUp = 0;
trucksKilled = 0;
pavementTime = 0;
stopAllSounds();
_root.bgsnd.start();
_root.bgsnd.setVolume(80);
_root.bgsnd.onSoundComplete = function () {
_root.bgsnd.start();
};
_root.createEmptyMovieClip("bullet_mc", _root.getNextHighestDepth());
id = 4;
carId = 0;
carsAlive = 0;
maxCars = 5;
score = 0;
nextCar = false;
distTrav = 0;
messages = 0;
targetsLeft = 3 + _root.levelnum;
trace((("targetsLeft= " + targetsLeft) + " _root.levelnum ") + _root.levelnum);
targetsStored = targetsLeft;
targetTime = 20;
missionCompleteShown = false;
currentLife = 0;
averageSpeed = 0;
deathRattle = 0;
timerL = 0;
lifeStored = 0;
var delayTime = 0.8;
var setMessagNum = 0;
_root.bgSound.stop();
messages = messages + 1;
var tween_handler;
_root.hud.messageD._alpha = 0;
_root.hud.messageD.msg_txt.text = "";
var checkInter;
var checkLife = true;
var checkRange = false;
var pLife1;
var hitLife = 0;
_root.timervalue = 180;
this.onEnterFrame = function () {
if (_root.timervalue <= 0) {
gotoAndStop ("death");
delete this.onEnterFrame;
}
if (_root.asd == preval) {
_root.asd = 0;
if (_root.asd2 > 0) {
_root.asd2 = _root.asd2 - 0.2345;
}
}
if (_root.asd2 <= 0) {
_root.asd2 = _root.asd2 + 0.2345;
}
if (_root.asd >= 10) {
_root.asd = 1;
}
preval = _root.asd;
if (game.player.life < 1) {
deathRattle = deathRattle + 1;
}
if (deathRattle > 20) {
gotoAndPlay ("death");
delete this.onEnterFrame;
}
if (targetsLeft <= 0) {
targetsStored = targetsLeft;
missionCompleteShown = true;
gotoAndPlay ("levelscore5");
delete this.onEnterFrame;
}
if (targetsStored > targetsLeft) {
messages = messages + 1;
targetsStored = targetsLeft;
if (targetsLeft > 0) {
messages = messages + 1;
_root.hud.messageD.msg_txt.text = "TARGET DESTROYED ";
_root.hud.messageD.msg_txt._alpha = 100;
fadeOut(_root.hud.messageD);
hud.targetDisplay.targetDist = Math.round(_root.distTrav) + 5;
hud.targetDisplay.told = false;
}
hud.targetDisplay.told = false;
}
if ((targetsLeft == 0) && (targetTime > 0)) {
targetTime = targetTime - 1;
}
if ((targetTime == 0) && (missionCompleteShown == false)) {
messages = messages + 1;
_root.hud.messageD.msg_txt.text = "WellDone, You have successfully destroyed all the target......";
_root.hud.messageD.msg_txt._alpha = 100;
fadeOut(_root.hud.messageD);
targetsStored = targetsLeft;
missionCompleteShown = true;
delete this.onEnterFrame;
}
if (missionCompleteShown) {
}
var _local3 = (275 - (game._x + game.player._x)) * (game._xscale / 100);
_x = (_x - ((_x - _local3) / 5));
hud._x = (-_x) + 300;
moreG1Btn._x = (-_x) + 50;
if (currentDepth > 50) {
currentDepth = 0;
}
xscaler = (1 / (100 / _root.game._xscale)) + _root.game._x;
yscaler = (1 / (100 / _root.game._yscale)) + _root.game._y;
i = _root.maxCars;
while (i > 0) {
if (_root.game["car" + i]._x == undefined) {
_root.carId = i - 1;
}
i = i - 1;
}
timerL = timerL + 1;
if (timerL == 2) {
if ((game.player.life > lifeStored) && (game.player.life > 0)) {
game.player.life = game.player.life - ((game.player.life - lifeStored) * 2);
}
timerL = 0;
} else {
lifeStored = game.player.life;
}
};
bgSoundMc.swapDepths(100000);
_root.hud._visible = 1;
_root.hud._alpha = 100;
stop();
Instance of Symbol 973 MovieClip "game" in Frame 57
onClipEvent (load) {
trafficSound = new Sound(_root.game.effects);
trafficSound.attachSound("traffic");
trafficSound.start(0, 99);
}
onClipEvent (enterFrame) {
trafficSound.setVolume(_root.carsAlive * 10);
var targetXscale = 60;
_xscale = (_xscale - ((_xscale - targetXscale) / 5));
_yscale = _xscale;
}
on (keyPress "m") {
if (_root.hud.soundmc._currentframe == 1) {
_root.hud.soundmc.gotoAndPlay(2);
} else if (_root.hud.soundmc._currentframe == 2) {
_root.hud.soundmc.gotoAndPlay(1);
}
}
Instance of Symbol 686 MovieClip "hud" in Frame 57
onClipEvent (load) {
timer = 0;
timesLogged = 0;
totalSpeed = 0;
averageSpeed = 0;
fader.swapDepths(3000);
}
onClipEvent (enterFrame) {
displayText = _root.game._x;
_root.distTrav = _root.distTrav + (_root.game.player.yspeed / 5000);
var speed = Math.round(_root.game.player.yspeed * 3.5);
timer = timer + 1;
if (timer > 1) {
timesLogged = timesLogged + 1;
totalSpeed = totalSpeed + speed;
averageSpeed = Math.round(totalSpeed / timesLogged);
timer = 0;
}
_root.currentLife = _root.game.player.life;
lft_target.text = _root.targetsLeft;
_root.averageSpeed = averageSpeed;
health = Math.round(_root.currentLife);
healthMc.maskMc._yscale = Math.round(health / 6);
credits = Math.round(_root.score);
currentSpeed = speed + " Kmph";
_root.mcanimspeed = Math.abs(speed);
_root.hud.mtr._rotation = _root.mcanimspeed;
_root.game.arrmouse.maskMc._yscale = _root.mcanimspeed;
}
Frame 65
_x = 0;
_y = 0;
stopAllSounds();
_root.levelnum++;
messages = 0;
timer = 0;
remove = false;
_root.totalscore = _root.totalscore + (_root.timervalue * 2);
_root.totalscore = _root.totalscore + _root.newscorevar;
trace((_root.totalscore + " = :") + _root.newscorevar);
if (_root.levelnum >= 5) {
gotoAndStop ("gamewin");
}
stop();
Frame 82
stop();
Frame 99
function submitScore() {
var _local5 = _root.username;
trace(_local5);
var _local4 = _root.totalscore;
var _local2 = "";
if (_local4 == "") {
_local2 = _local2 + "The score is required\n";
}
if (_local2 != "") {
status_txt.text = _local2;
trace("hello1231233");
return(undefined);
}
var _local3 = new LoadVars();
_local3.name = _local5;
_local3.score = _local4;
_local3.send(path, "_blank", "POST");
}
_x = 0;
_y = 0;
messages = 0;
timer = 0;
remove = false;
_root.totalscore = _root.totalscore;
stopAllSounds();
stop();
var path = "http://www.gamesgeni.com/Scores/FBIChase/submit.php";
Frame 100
function submitScore() {
var _local5 = _root.username;
trace(_local5);
var _local4 = _root.totalscore;
var _local2 = "";
if (_local4 == "") {
_local2 = _local2 + "The score is required\n";
}
if (_local2 != "") {
status_txt.text = _local2;
trace("hello1231233");
return(undefined);
}
var _local3 = new LoadVars();
_local3.name = _local5;
_local3.score = _local4;
_local3.send(path, "_blank", "POST");
}
_x = 0;
_y = 0;
messages = 0;
timer = 0;
remove = false;
_root.totalscore = _root.totalscore + _root.newscorevar;
stopAllSounds();
stop();
var path = "http://www.gamesgeni.com/Scores/FBIChase/submit.php";
Symbol 1119 MovieClip [__Packages.mx.transitions.OnEnterFrameBeacon] Frame 0
class mx.transitions.OnEnterFrameBeacon
{
function OnEnterFrameBeacon () {
}
static function init() {
var _local4 = _global.MovieClip;
if (!_root.__OnEnterFrameBeacon) {
mx.transitions.BroadcasterMX.initialize(_local4);
var _local3 = _root.createEmptyMovieClip("__OnEnterFrameBeacon", 9876);
_local3.onEnterFrame = function () {
_global.MovieClip.broadcastMessage("onEnterFrame");
};
}
}
static var version = "1.1.0.52";
}
Symbol 1120 MovieClip [__Packages.mx.transitions.BroadcasterMX] Frame 0
class mx.transitions.BroadcasterMX
{
var _listeners;
function BroadcasterMX () {
}
static function initialize(o, dontCreateArray) {
if (o.broadcastMessage != undefined) {
delete o.broadcastMessage;
}
o.addListener = mx.transitions.BroadcasterMX.prototype.addListener;
o.removeListener = mx.transitions.BroadcasterMX.prototype.removeListener;
if (!dontCreateArray) {
o._listeners = new Array();
}
}
function addListener(o) {
removeListener(o);
if (broadcastMessage == undefined) {
broadcastMessage = mx.transitions.BroadcasterMX.prototype.broadcastMessage;
}
return(_listeners.push(o));
}
function removeListener(o) {
var _local2 = _listeners;
var _local3 = _local2.length;
while (_local3--) {
if (_local2[_local3] == o) {
_local2.splice(_local3, 1);
if (!_local2.length) {
broadcastMessage = undefined;
}
return(true);
}
}
return(false);
}
function broadcastMessage() {
var _local5 = String(arguments.shift());
var _local4 = _listeners.concat();
var _local6 = _local4.length;
var _local3 = 0;
while (_local3 < _local6) {
_local4[_local3][_local5].apply(_local4[_local3], arguments);
_local3++;
}
}
static var version = "1.1.0.52";
}
Symbol 1121 MovieClip [__Packages.mx.transitions.Tween] Frame 0
class mx.transitions.Tween
{
var obj, prop, begin, useSeconds, _listeners, addListener, prevTime, _time, looping, _duration, broadcastMessage, isPlaying, _fps, prevPos, _pos, change, _intervalID, _startTime;
function Tween (obj, prop, func, begin, finish, duration, useSeconds) {
mx.transitions.OnEnterFrameBeacon.init();
if (!arguments.length) {
return;
}
this.obj = obj;
this.prop = prop;
this.begin = begin;
position = (begin);
this.duration = (duration);
this.useSeconds = useSeconds;
if (func) {
this.func = func;
}
this.finish = (finish);
_listeners = [];
addListener(this);
start();
}
function set time(t) {
prevTime = _time;
if (t > duration) {
if (looping) {
rewind(t - _duration);
update();
broadcastMessage("onMotionLooped", this);
} else {
if (useSeconds) {
_time = _duration;
update();
}
stop();
broadcastMessage("onMotionFinished", this);
}
} else if (t < 0) {
rewind();
update();
} else {
_time = t;
update();
}
//return(time);
}
function get time() {
return(_time);
}
function set duration(d) {
_duration = (((d == null) || (d <= 0)) ? (_global.Infinity) : (d));
//return(duration);
}
function get duration() {
return(_duration);
}
function set FPS(fps) {
var _local2 = isPlaying;
stopEnterFrame();
_fps = fps;
if (_local2) {
startEnterFrame();
}
//return(FPS);
}
function get FPS() {
return(_fps);
}
function set position(p) {
setPosition(p);
//return(position);
}
function setPosition(p) {
prevPos = _pos;
obj[prop] = (_pos = p);
broadcastMessage("onMotionChanged", this, _pos);
updateAfterEvent();
}
function get position() {
return(getPosition());
}
function getPosition(t) {
if (t == undefined) {
t = _time;
}
return(func(t, begin, change, _duration));
}
function set finish(f) {
change = f - begin;
//return(finish);
}
function get finish() {
return(begin + change);
}
function continueTo(finish, duration) {
begin = position;
this.finish = (finish);
if (duration != undefined) {
this.duration = (duration);
}
start();
}
function yoyo() {
continueTo(begin, time);
}
function startEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.addListener(this);
} else {
_intervalID = setInterval(this, "onEnterFrame", 1000 / _fps);
}
isPlaying = true;
}
function stopEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.removeListener(this);
} else {
clearInterval(_intervalID);
}
isPlaying = false;
}
function start() {
rewind();
startEnterFrame();
broadcastMessage("onMotionStarted", this);
}
function stop() {
stopEnterFrame();
broadcastMessage("onMotionStopped", this);
}
function resume() {
fixTime();
startEnterFrame();
broadcastMessage("onMotionResumed", this);
}
function rewind(t) {
_time = ((t == undefined) ? 0 : (t));
fixTime();
update();
}
function fforward() {
time = (_duration);
fixTime();
}
function nextFrame() {
if (useSeconds) {
time = ((getTimer() - _startTime) / 1000);
} else {
time = (_time + 1);
}
}
function onEnterFrame() {
nextFrame();
}
function prevFrame() {
if (!useSeconds) {
time = (_time - 1);
}
}
function toString() {
return("[Tween]");
}
function fixTime() {
if (useSeconds) {
_startTime = getTimer() - (_time * 1000);
}
}
function update() {
position = (getPosition(_time));
}
static var version = "1.1.0.52";
static var __initBeacon = mx.transitions.OnEnterFrameBeacon.init();
static var __initBroadcaster = mx.transitions.BroadcasterMX.initialize(mx.transitions.Tween.prototype, true);
function func(t, b, c, d) {
return(((c * t) / d) + b);
}
}
Symbol 1122 MovieClip [__Packages.mx.transitions.easing.Strong] Frame 0
class mx.transitions.easing.Strong
{
function Strong () {
}
static function easeIn(t, b, c, d) {
t = t / d;
return((((((c * t) * t) * t) * t) * t) + b);
}
static function easeOut(t, b, c, d) {
t = (t / d) - 1;
return((c * (((((t * t) * t) * t) * t) + 1)) + b);
}
static function easeInOut(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return(((((((c / 2) * t) * t) * t) * t) * t) + b);
}
t = t - 2;
return(((c / 2) * (((((t * t) * t) * t) * t) + 2)) + b);
}
static var version = "1.1.0.52";
}
Symbol 9 MovieClip Frame 1
stop();
Symbol 9 MovieClip Frame 100
stop();
Symbol 23 MovieClip Frame 15
stop();
Symbol 40 MovieClip Frame 30
stop();
Symbol 143 MovieClip Frame 49
stop();
Symbol 155 MovieClip Frame 15
stop();
Symbol 156 MovieClip Frame 55
stop();
Symbol 161 MovieClip Frame 117
stop();
Symbol 196 Button
on (release) {
showShot(1);
}
Symbol 202 MovieClip [bullet] Frame 1
stop();
frag = 5;
_root.bulletsnd.start();
divide = 6;
addx = addx / divide;
addy = addy / divide;
maziaddx = this._x;
maziaddy = this._y;
bulletLifeTimer = 0;
_root.reloadComplete = true;
bulletLifeTimerTotal = 30;
this.onEnterFrame = function () {
_root.reloadComplete = false;
i = 1;
while (i <= 6) {
j = 0;
while (j < (_root.maxCars + 2)) {
bullettarget = _root.game["car" + j];
if (bullettarget.hitTest(_root.bulletmc)) {
_root.reloadComplete = true;
break;
}
if (_root.game.car.hitTest(_root.bulletmc)) {
_root.reloadComplete = true;
break;
}
j = j + 1;
}
this._y = this._y - 2;
i++;
}
if (bulletLifeTimer >= bulletLifeTimerTotal) {
bulletLifeTimer = 0;
_root.reloadComplete = true;
this.removeMovieClip();
}
bulletLifeTimer++;
};
Symbol 216 MovieClip Frame 1
stop();
Symbol 255 MovieClip Frame 4
_root.titlesnd.start();
Symbol 255 MovieClip Frame 9
_root.titlesnd.start();
Symbol 255 MovieClip Frame 14
_root.titlesnd.start();
Symbol 255 MovieClip Frame 21
_root.menuchasesnd.start();
Symbol 255 MovieClip Frame 52
_root.btnsanim.start();
Symbol 255 MovieClip Frame 61
_root.btnsanim.start();
Symbol 255 MovieClip Frame 69
_root.btnsanim.start();
Symbol 255 MovieClip Frame 77
_root.btnsanim.start();
Symbol 255 MovieClip Frame 84
_root.menucarsnd.start();
Symbol 255 MovieClip Frame 99
_root.gotoAndStop("menu");
Symbol 256 Button
on (release) {
_root.levelPlay = "story1";
gotoAndStop ("story1");
}
on (rollOver) {
_root.btnsnd.start();
}
Symbol 257 Button
on (press) {
getURL ("http://www.gamesgeni.com/Scores/FBIChase/", "_blank");
}
on (rollOver) {
_root.btnsnd.start();
}
Symbol 258 Button
on (release) {
gotoAndStop ("help");
}
on (rollOver) {
_root.btnsnd.start();
}
Symbol 259 Button
on (release) {
getURL ("http://www.gamesgeni.com", "_blank");
}
on (rollOver) {
_root.btnsnd.start();
}
Symbol 262 MovieClip Frame 20
stop();
Symbol 269 Button
on (release) {
_root.levelPlay = "story1";
gotoAndStop ("story1");
}
on (rollOver) {
_root.btnsnd.start();
}
Symbol 270 Button
on (release) {
getURL ("http://www.gamesgeni.com", "_blank");
}
on (rollOver) {
_root.btnsnd.start();
}
Symbol 518 MovieClip Frame 1
Symbol 518 MovieClip Frame 26
Symbol 518 MovieClip Frame 50
Symbol 518 MovieClip Frame 75
Symbol 518 MovieClip Frame 107
Symbol 518 MovieClip Frame 133
Symbol 518 MovieClip Frame 158
Symbol 518 MovieClip Frame 195
Symbol 518 MovieClip Frame 221
Symbol 518 MovieClip Frame 237
Symbol 518 MovieClip Frame 238
Symbol 518 MovieClip Frame 262
stop();
Symbol 522 Button
on (rollOver) {
_root.btnsnd.start();
}
Instance of Symbol 539 MovieClip in Symbol 543 MovieClip Frame 1
onClipEvent (load) {
origY = _y;
}
onClipEvent (enterFrame) {
_y = (_y + _root.game.player.yspeed);
if (_y > (origY + 1275)) {
_y = origY;
}
}
Instance of Symbol 542 MovieClip in Symbol 543 MovieClip Frame 1
onClipEvent (load) {
origY = _y;
}
onClipEvent (enterFrame) {
_y = (_y + _root.game.player.yspeed);
if (_y > (origY + 1275)) {
_y = origY;
}
}
Instance of Symbol 539 MovieClip in Symbol 543 MovieClip Frame 1
onClipEvent (load) {
origY = _y;
}
onClipEvent (enterFrame) {
_y = (_y + _root.game.player.yspeed);
if (_y > (origY + 1275)) {
_y = origY;
}
}
Symbol 549 MovieClip Frame 1
stop();
Symbol 554 MovieClip Frame 1
stop();
Symbol 554 MovieClip Frame 2
stop();
trace("ll");
_root.blastsnd.start();
blastingg = false;
if (_parent._parent.targetCar == true) {
_root.score = _root.score + 1000;
_parent._parent.targetCar = false;
_parent._parent.deadCar = true;
_root.targetsLeft = _root.targetsLeft - 1;
_root.game.targetShow._x = -2000;
_parent._parent._alpha = _parent._parent._alpha - 3;
}
emc.onEnterFrame = function () {
_root.game.effects.id = _root.game.effects.id + 1;
duplicateMovieClip (_root.game.effects.smoke2, "spark" + _root.game.effects.id, _root.game.effects.id + 1);
_root.game.effects["spark" + _root.game.effects.id]._x = _parent._parent._x;
_root.game.effects["spark" + _root.game.effects.id]._y = _parent._parent._y;
_root.game.effects["spark" + _root.game.effects.id]._height = _root.game.effects["spark" + _root.game.effects.id]._height + _root.game.player.yspeed;
_root.game.effects["spark" + _root.game.effects.id].xspeed = _root.game.effects["spark" + _root.game.effects.id].xspeed + xspeed;
_root.game.effects["spark" + _root.game.effects.id].yspeed = _root.game.effects["spark" + _root.game.effects.id].yspeed + (yspeed * 2);
_parent._parent.timerSmoke = 0;
if (_parent._parent.targetCar == true) {
_root.score = _root.score + 1000;
_parent._parent.targetCar = false;
_parent._parent.deadCar = true;
_root.targetsLeft = _root.targetsLeft - 1;
_root.game.targetShow._x = -2000;
_parent._parent._alpha = _parent._parent._alpha - 3;
}
delete emc;
};
play();
Symbol 554 MovieClip Frame 3
Symbol 554 MovieClip Frame 20
_parent._parent._alpha = 50;
Symbol 554 MovieClip Frame 28
blostanim.removeMovieClip();
this.xposn = _parent._parent._x;
_parent._parent._x = -700;
_parent._parent._alpha = 0;
Symbol 554 MovieClip Frame 215
_parent._parent._alpha = 100;
_parent._parent._x = this.xposn;
Symbol 563 MovieClip Frame 1
stop();
Instance of Symbol 549 MovieClip "damage1" in Symbol 563 MovieClip Frame 1
onClipEvent (enterFrame) {
_alpha = (100 - _parent._parent.life);
if (this.hitTest(_root.bulletmc)) {
}
if ((_parent._parent.life < 0) && (_parent._parent.life > -50)) {
gotoAndStop (2);
}
if (_parent._parent.life < -50) {
gotoAndStop (3);
_alpha = 100;
}
}
Instance of Symbol 554 MovieClip "hhh" in Symbol 563 MovieClip Frame 1
/* no clip actions */
Instance of Symbol 549 MovieClip "damage2" in Symbol 563 MovieClip Frame 2
onClipEvent (enterFrame) {
_alpha = (100 - _parent._parent.life);
if (this.hitTest(_root.bulletmc)) {
}
if ((_parent._parent.life < 0) && (_parent._parent.life > -50)) {
gotoAndStop (2);
}
if (_parent._parent.life < -50) {
gotoAndStop (3);
_alpha = 100;
}
}
Instance of Symbol 549 MovieClip "damage3" in Symbol 563 MovieClip Frame 3
onClipEvent (enterFrame) {
_alpha = (100 - _parent._parent.life);
if (this.hitTest(_root.bulletmc)) {
}
if ((_parent._parent.life < 0) && (_parent._parent.life > -50)) {
gotoAndStop (2);
}
if (_parent._parent.life < -50) {
gotoAndStop (3);
_alpha = 100;
}
}
Instance of Symbol 549 MovieClip "damage4" in Symbol 563 MovieClip Frame 4
onClipEvent (enterFrame) {
_alpha = (100 - _parent._parent.life);
if (this.hitTest(_root.bulletmc)) {
}
if ((_parent._parent.life < 0) && (_parent._parent.life > -50)) {
gotoAndStop (2);
}
if (_parent._parent.life < -50) {
gotoAndStop (3);
_alpha = 100;
}
}
Instance of Symbol 549 MovieClip "damage5" in Symbol 563 MovieClip Frame 5
onClipEvent (enterFrame) {
_alpha = (100 - _parent._parent.life);
if (this.hitTest(_root.bulletmc)) {
}
if ((_parent._parent.life < 0) && (_parent._parent.life > -50)) {
gotoAndStop (2);
}
if (_parent._parent.life < -50) {
gotoAndStop (3);
_alpha = 100;
}
}
Instance of Symbol 549 MovieClip "damage6" in Symbol 563 MovieClip Frame 6
onClipEvent (enterFrame) {
_alpha = (100 - _parent._parent.life);
if (this.hitTest(_root.bulletmc)) {
}
if ((_parent._parent.life < 0) && (_parent._parent.life > -50)) {
gotoAndStop (2);
}
if (_parent._parent.life < -50) {
gotoAndStop (3);
_alpha = 100;
}
}
Instance of Symbol 549 MovieClip "damage7" in Symbol 563 MovieClip Frame 7
onClipEvent (enterFrame) {
_alpha = (100 - _parent._parent.life);
if (this.hitTest(_root.bulletmc)) {
}
if ((_parent._parent.life < 0) && (_parent._parent.life > -50)) {
gotoAndStop (2);
}
if (_parent._parent.life < -50) {
gotoAndStop (3);
_alpha = 100;
}
}
Instance of Symbol 549 MovieClip "damage8" in Symbol 563 MovieClip Frame 8
onClipEvent (enterFrame) {
_alpha = (100 - _parent._parent.life);
if (this.hitTest(_root.bulletmc)) {
}
if ((_parent._parent.life < 0) && (_parent._parent.life > -50)) {
gotoAndStop (2);
}
if (_parent._parent.life < -50) {
gotoAndStop (3);
_alpha = 100;
}
}
Instance of Symbol 549 MovieClip "damage9" in Symbol 563 MovieClip Frame 9
onClipEvent (enterFrame) {
_alpha = (100 - _parent._parent.life);
if (this.hitTest(_root.bulletmc)) {
}
if ((_parent._parent.life < 0) && (_parent._parent.life > -50)) {
gotoAndStop (2);
}
if (_parent._parent.life < -50) {
gotoAndStop (3);
_alpha = 100;
}
}
Symbol 564 MovieClip Frame 1
onEnterFrame = function () {
if (targetCar == true) {
ene.gotoAndStop(9);
}
};
Instance of Symbol 563 MovieClip "ene" in Symbol 564 MovieClip Frame 1
onClipEvent (load) {
_root.myname = this._parent._name;
gotoAndStop(1 + random(8));
}
Symbol 570 MovieClip Frame 1
stop();
Symbol 570 MovieClip Frame 6
gotoAndPlay (1);
Symbol 570 MovieClip Frame 14
gotoAndPlay ("loop");
Symbol 573 MovieClip Frame 1
id = 0;
i = 0;
while (i < _root.maxCars) {
duplicateMovieClip (tracker, "tracker" + i, i + 1);
i = i + 1;
}
Instance of Symbol 572 MovieClip "tracker" in Symbol 573 MovieClip Frame 1
onClipEvent (load) {
_parent.id = _parent.id + 1;
id = _parent.id;
}
onClipEvent (enterFrame) {
_x = _root.game["car" + id]._x;
_y = _root.game["car" + id]._y;
_width = (_root.game["car" + id]._width + 4);
_height = _root.game["car" + id]._height;
}
Symbol 576 MovieClip Frame 1
stop();
Symbol 595 MovieClip Frame 1
stop();
Symbol 596 MovieClip Frame 1
maxLife = 600;
life = maxLife;
stop();
maxSpeed = 70;
stop();
Instance of Symbol 595 MovieClip in Symbol 596 MovieClip Frame 1
onClipEvent (enterFrame) {
gotoAndStop(_totalframes - Math.round(_parent.life / (_parent.maxLife / _totalframes)));
}
Symbol 596 MovieClip Frame 2
stop();
Symbol 596 MovieClip Frame 3
maxLife = 1000;
life = maxLife;
maxSpeed = 50;
stop();
Symbol 596 MovieClip Frame 4
gotoAndStop (1);
Symbol 596 MovieClip Frame 5
stop();
Instance of Symbol 600 MovieClip "trail" in Symbol 601 MovieClip Frame 1
onClipEvent (load) {
function randRange(min, max) {
var _local1 = Math.floor(Math.random() * ((max - min) + 1)) + min;
return(_local1);
}
colorArr = ["0x339999", "0x99CC66", "0x993333", "0xCCCC66"];
pColor.setRGB(colorArr[randRange(0, 3)]);
}
Symbol 605 MovieClip Frame 16
stop();
Symbol 609 MovieClip Frame 21
stop();
Instance of Symbol 601 MovieClip "spark" in Symbol 619 MovieClip Frame 1
onClipEvent (load) {
var xspeed = ((-200 + random(400)) / 100);
var yspeed = 5;
var adjside = ((_x + xspeed) - _x);
var oppside = (-1 * ((_y + yspeed) - _y));
var angle = Math.atan2(oppside, adjside);
angle = (angle / 3.141593) * 180;
trail._rotation = -1 * angle;
trail._width = trail._width + ((-yspeed) / 5);
}
onClipEvent (enterFrame) {
xspeed = xspeed * 0.97;
yspeed = yspeed * 0.97;
var adjside = ((_x + xspeed) - _x);
var oppside = (-1 * ((_y + yspeed) - _y));
var angle = Math.atan2(oppside, adjside);
angle = (angle / 3.141593) * 180;
trail._rotation = -1 * angle;
_x = (_x + xspeed);
_y = (_y + (yspeed + _root.game.player.yspeed));
if (_name != "spark") {
if ((_y > 400) || (_y < -1500)) {
removeMovieClip(this);
}
}
}
Instance of Symbol 603 MovieClip "skid" in Symbol 619 MovieClip Frame 1
onClipEvent (load) {
}
onClipEvent (enterFrame) {
_y = (_y + _root.game.player.yspeed);
if (_name != "skid") {
if ((_y > 400) || (_y < -1500)) {
removeMovieClip(this);
}
}
}
Instance of Symbol 605 MovieClip "paint" in Symbol 619 MovieClip Frame 1
onClipEvent (load) {
var xspeed = ((-200 + random(400)) / 100);
var yspeed = random(5);
}
onClipEvent (enterFrame) {
_x = (_x + xspeed);
_y = (_y + (yspeed + _root.game.player.yspeed));
if (_name != "paint") {
if ((_y > 400) || (_y < -1500)) {
removeMovieClip(this);
}
}
}
Instance of Symbol 609 MovieClip "smokekk" in Symbol 619 MovieClip Frame 1
onClipEvent (load) {
var xspeed = ((-200 + random(400)) / 100);
var yspeed = random(5);
}
onClipEvent (enterFrame) {
_x = (_x + xspeed);
_y = (_y + (yspeed + _root.game.player.yspeed));
if (_name != "smoke") {
if ((_y > 400) || (_y < -1500)) {
removeMovieClip(this);
}
}
}
Instance of Symbol 609 MovieClip "smoke2kk" in Symbol 619 MovieClip Frame 1
onClipEvent (load) {
var xspeed = ((-200 + random(400)) / 100);
var yspeed = random(5);
}
onClipEvent (enterFrame) {
_x = (_x + xspeed);
_y = (_y + (yspeed + _root.game.player.yspeed));
if (_name != "smoke2") {
if ((_y > 400) || (_y < -1500)) {
removeMovieClip(this);
}
}
}
Instance of Symbol 618 MovieClip "tire" in Symbol 619 MovieClip Frame 1
onClipEvent (load) {
var xspeed = ((-200 + random(400)) / 20);
var yspeed = (-20 + random(40));
gotoAndStop(1 + random(8));
}
onClipEvent (enterFrame) {
xspeed = xspeed * 0.94;
yspeed = yspeed * 0.94;
_x = (_x + xspeed);
_y = (_y + (yspeed + _root.game.player.yspeed));
_rotation = (_rotation + xspeed);
if (_name != "tire") {
if ((_y > 400) || (_y < -1500)) {
removeMovieClip(this);
}
}
}
Symbol 629 MovieClip Frame 1
_root.game.sound.owned = 0;
_root.game.sound.owner = this;
_root.game.sound.type = 2;
_root.game.sound.size = sizeE;
if (_name == "explosion") {
stop();
}
stop();
Symbol 629 MovieClip Frame 14
if (_name != "explosion") {
removeMovieClip(this);
}
Symbol 632 MovieClip Frame 1
_root.game.sound.owned = 0;
_root.game.sound.owner = this;
_root.game.sound.type = 2;
_root.game.sound.size = sizeE;
if (_name == "explosion") {
stop();
}
Symbol 632 MovieClip Frame 32
if (_name != "explosion") {
removeMovieClip(this);
}
Symbol 644 MovieClip Frame 1
stop();
Symbol 644 MovieClip Frame 2
_root.bonussnd.start();
play();
Symbol 647 MovieClip Frame 1
_root.sirensnd.start();
_root.sirensnd.setVolume(30);
_root.sirensnd.onSoundComplete = function () {
_root.sirensnd.start();
};
Instance of Symbol 528 MovieClip "track" in Symbol 647 MovieClip Frame 1
onClipEvent (load) {
startY = _y;
_root.newscorevar = 0;
_root.scorecoinhit = false;
}
onClipEvent (enterFrame) {
_y = (_y + _parent.player.yspeed);
_parent.scorecoin._y = _parent.scorecoin._y + _parent.player.yspeed;
if ((_y + _parent.player.yspeed) > (startY + 325)) {
_y = startY;
}
if (_parent.scorecoin._y > 3333) {
_root.scorecoinhit = false;
_parent.scorecoin._x = _parent["lane" + (1 + random(4))]._x;
_parent.scorecoin._y = -2000;
}
if (_parent.scorecoin.hitTest(_root.game.player) && (_root.scorecoinhit == false)) {
_root.newscorevar = _root.newscorevar + 100;
_parent.scorecoin.gotoAndPlay(2);
_root.scorecoinhit = true;
}
}
Instance of Symbol 534 MovieClip "lane1" in Symbol 647 MovieClip Frame 1
onClipEvent (load) {
maxSpeed = 35;
targetX = _x;
id = 1;
}
Instance of Symbol 534 MovieClip "lane2" in Symbol 647 MovieClip Frame 1
onClipEvent (load) {
maxSpeed = 30;
targetX = _x;
id = 2;
}
Instance of Symbol 534 MovieClip "lane3" in Symbol 647 MovieClip Frame 1
onClipEvent (load) {
maxSpeed = 25;
targetX = _x;
id = 3;
}
Instance of Symbol 534 MovieClip "lane4" in Symbol 647 MovieClip Frame 1
onClipEvent (load) {
maxSpeed = 20;
targetX = _x;
id = 4;
}
Instance of Symbol 536 MovieClip "slower" in Symbol 647 MovieClip Frame 1
onClipEvent (load) {
_alpha = 0;
}
Instance of Symbol 543 MovieClip "walls" in Symbol 647 MovieClip Frame 1
onClipEvent (load) {
xspeed = 0;
yspeed = 0;
mass = 1000;
}
onClipEvent (enterFrame) {
xspeed = 0;
yspeed = 0;
}
Instance of Symbol 564 MovieClip "car" in Symbol 647 MovieClip Frame 1
onClipEvent (load) {
this.nofhittimes = 0;
var lane;
var laneId;
var truckLikely = (1 + random(10));
if (truckLikely == 5) {
gotoAndStop(1 + random(4));
} else {
gotoAndStop(1 + random(3));
}
startY = _y;
yspeed = 0;
xspeed = 0;
hitTimes = 0;
spin = 0;
sironBool = false;
targetX = lane.targetX;
if (_x > 0) {
up = false;
_rotation = (_rotation + 180);
yspeed = -lane.maxSpeed;
maxSpeed = lane.maxSpeed;
} else {
up = true;
_rotation = 0;
yspeed = lane.maxSpeed;
maxSpeed = lane.maxSpeed;
}
life = 100;
target = _parent.player;
mass = (_height + _width) / 33;
exploded = false;
timerSmoke = 0;
sparkNo = 0;
var targetCar;
messageShown = false;
engineStarted = false;
playerHitted = false;
sDiff = 0;
deadCar = false;
_root.targetcarinload = true;
}
onClipEvent (enterFrame) {
function hitSounds() {
var _local2 = 1 + random(3);
hitSound = new Sound(this);
if (_local2 == 1) {
hitSound.attachSound("hit1");
} else if (_local2 == 2) {
hitSound.attachSound("hit2");
} else {
hitSound.attachSound("hit3");
}
hitSound.setVolume(sparkNo * 5);
hitSound.start(0, 0);
}
if (_root.targetsLeft <= 0) {
}
if (targetCar == true) {
_root.game.targetShow._x = _x;
_root.game.targetShow._y = _y;
_root.game.targetShow.play();
lane = _root.game.lane1;
targetX = lane.targetX;
maxSpeed = lane.maxSpeed;
if (!sironBool) {
sironSound = new Sound(this);
sironSound.attachSound("siron");
sironSound.start(0, 100);
sironBool = true;
}
sironSound.setVolume(100);
if ((life < 1) && (messageShown == false)) {
_root.score = _root.score + 1000;
if (_root.targetsLeft == 0) {
_root.extraCar = true;
}
sironSound.stop();
_root.targetsLeft = _root.targetsLeft - 1;
messageShown = true;
targetCar = false;
_root.game.targetShow._x = -2000;
deadCar = true;
}
} else if ((life < 1) && (deadCar != true)) {
_root.carsBlownUp = _root.carsBlownUp + 1;
if (_currentframe == 4) {
_root.trucksKilled = _root.trucksKilled + 1;
}
deadCar = true;
}
if (_name != "car") {
_parent.showMc._x = _x;
_parent.showMc._y = passY;
i = 0;
while (i < (_root.maxCars + 2)) {
if (_root.game["car" + i]._x != undefined) {
bullettarget = _root.game["car" + i];
if (_root.game["car" + i] != this) {
target = _root.game["car" + i];
} else {
target = _parent.player;
}
if (bullettarget.hitTest(_root.bulletmc)) {
bullettarget.ene.hhh.gotoAndStop(2);
_root.reloadComplete = true;
removeMovieClip(_root.bulletmc);
} else if (_root.game.car.hitTest(_root.bulletmc)) {
this.ene.hhh.gotoAndStop(2);
_root.reloadComplete = true;
removeMovieClip(_root.bulletmc);
}
var adjside = (target._x - _x);
var oppside = (-1 * (target._y - _y));
var dist = Math.sqrt((adjside * adjside) + (oppside * oppside));
var distMax = (_height + (target._height / 2));
if (dist < distMax) {
if ((target.hitTest((_x * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y - (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true) || (target.hitTest(((_x + (_width / 2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y - (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true))) || (target.hitTest(((_x - (_width / 2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y - (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true))) {
_root.cardashsnd.start();
xspeed = xspeed + (((_x - target._x) / 40) + (target.xspeed / 5));
if ((target._x > (_x - ((_width / 2) + (target._width / 2.2)))) && (target._x < (_x + ((_width / 2) + (target._width / 2.2))))) {
var s1 = yspeed;
var s2 = target.yspeed;
var sDiff = 0;
if (((s1 < 0) && (s2 >= 0)) || ((s2 < 0) && (s1 >= 0))) {
if (s1 < 0) {
var sDiff = (s2 - s1);
} else {
var sDiff = (s1 - s2);
}
} else if ((s1 >= 0) && (s2 >= 0)) {
if (s1 > s2) {
var sDiff = (s1 - s2);
} else {
var sDiff = (s2 - s1);
}
} else {
var sDiff = (s1 - s2);
}
if (sDiff < 0) {
sDiff = -sDiff;
}
if (sDiff > 6) {
sDiff = sDiff - 5;
life = life - (((sDiff * 12) / mass) / 2);
target.life = target.life - (((sDiff * 12) / mass) / 4);
sparkNo = sDiff;
}
if (sDiff > 3) {
hitSounds();
}
if (((target == _parent.player) && (targetCar == false)) && (life > 1)) {
_parent.player.hitTime = 0;
playerHitted = true;
} else if ((target != _parent.player) && (targetCar == false)) {
playerHitted = false;
}
i == 0;
while (i < sparkNo) {
_root.game.effects.id = _root.game.effects.id + 1;
duplicateMovieClip (_parent.effects.spark, "spark" + _parent.effects.id, _parent.effects.id + 1);
_root.game.effects["spark" + _root.game.effects.id]._x = (_x - (_width / 2)) + random(_width);
_root.game.effects["spark" + _root.game.effects.id]._y = (_y - (_height / 2)) + random(_height / 2);
_root.game.effects["spark" + _root.game.effects.id].xspeed = _root.game.effects["spark" + _root.game.effects.id].xspeed + 5;
_root.game.effects["spark" + _root.game.effects.id].yspeed = _root.game.effects["spark" + _root.game.effects.id].yspeed + (yspeed * 2);
i = i + 1;
}
maxSpeed = maxSpeed - random(2);
var v1 = yspeed;
var m1 = mass;
var v2 = target.yspeed;
var m2 = target.mass;
var newV1 = ((((m1 - m2) / (m1 + m2)) * v1) + (((2 * m2) / (m1 + m2)) * v2));
var newV2 = ((((2 * m1) / (m1 + m2)) * v1) - (((m1 - m2) / (m1 + m2)) * v2));
if ((_y > target._y) && (newV1 < v1)) {
yspeed = newV1;
target.yspeed = newV2;
}
}
}
if ((target.hitTest((_x * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y + (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true) || (target.hitTest(((_x + (_width / 2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y + (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true))) || (target.hitTest(((_x - (_width / 2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y + (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true))) {
_root.cardashsnd.start();
xspeed = xspeed + (((_x - target._x) / 40) + (target.xspeed / 5));
if ((target._x > (_x - ((_width / 2) + (target._width / 2)))) && (target._x < (_x + ((_width / 2) + (target._width / 2))))) {
var s1 = yspeed;
var s2 = target.yspeed;
var sDiff = 0;
if (((s1 < 0) && (s2 >= 0)) || ((s2 < 0) && (s1 >= 0))) {
if (s1 < 0) {
var sDiff = (s2 - s1);
} else {
var sDiff = (s1 - s2);
}
} else if ((s1 >= 0) && (s2 >= 0)) {
if (s1 > s2) {
var sDiff = (s1 - s2);
} else {
var sDiff = (s2 - s1);
}
} else {
var sDiff = (s1 - s2);
}
if (sDiff < 0) {
sDiff = -sDiff;
}
if (sDiff > 6) {
sDiff = sDiff - 5;
life = life - (((sDiff * 12) / mass) / 2);
target.life = target.life - (((sDiff * 12) / mass) / 4);
sparkNo = sDiff;
}
if (sDiff > 3) {
hitSounds();
}
if (((target == _parent.player) && (targetCar == false)) && (life > 1)) {
_parent.player.hitTime = 0;
playerHitted = true;
} else if ((target != _parent.player) && (targetCar == false)) {
playerHitted = false;
}
i == 0;
while (i < sparkNo) {
_root.game.effects.id = _root.game.effects.id + 1;
duplicateMovieClip (_parent.effects.spark, "spark" + _parent.effects.id, _parent.effects.id + 1);
_root.game.effects["spark" + _root.game.effects.id]._x = (_x - (_width / 2)) + random(_width);
_root.game.effects["spark" + _root.game.effects.id]._y = (_y + (_height / 2)) - random(_height / 2);
_root.game.effects["spark" + _root.game.effects.id].xspeed = _root.game.effects["spark" + _root.game.effects.id].xspeed + 5;
_root.game.effects["spark" + _root.game.effects.id].yspeed = _root.game.effects["spark" + _root.game.effects.id].yspeed + (yspeed * 2);
i = i + 1;
}
var v1 = yspeed;
var m1 = mass;
var v2 = target.yspeed;
var m2 = target.mass;
var newV1 = ((((m1 - m2) / (m1 + m2)) * v1) + (((2 * m2) / (m1 + m2)) * v2));
var newV2 = ((((2 * m1) / (m1 + m2)) * v1) - (((m1 - m2) / (m1 + m2)) * v2));
if ((_y < target._y) && (newV1 > v1)) {
yspeed = newV1;
target.yspeed = newV2;
}
maxSpeed = maxSpeed + random(2);
}
}
if (((target.hitTest(((_x - (_width / 2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, (_y * (1 / (100 / _root.game._yscale))) + _root.game._y, true) || (target.hitTest(((_x + (_width / 2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, (_y * (1 / (100 / _root.game._yscale))) + _root.game._y, true))) || (target.hitTest(((_x - (_width / 2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y + (_height / 3)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true))) || (target.hitTest(((_x + (_width / 2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y + (height / 3)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true))) {
var speedDiff = ((xspeed - target.xspeed) + (yspeed - target.yspeed));
if (speedDiff > 0) {
var sparkNo = speedDiff;
} else {
var sparkNo = (-speedDiff);
}
hitTimes = hitTimes + 1;
var v1 = xspeed;
var m1 = mass;
var v2 = target.xspeed;
var m2 = target.mass;
var newV1 = ((((m1 - m2) / (m1 + m2)) * v1) + (((2 * m2) / (m1 + m2)) * v2));
var newV2 = ((((2 * m1) / (m1 + m2)) * v1) - (((m1 - m2) / (m1 + m2)) * v2));
if (((target == _parent.player) && (targetCar == false)) && (life > 1)) {
_parent.player.hitTime = 0;
playerHitted = true;
} else if ((target != _parent.player) && (targetCar == false)) {
playerHitted = false;
}
if ((_x > target._x) && (newV1 > v1)) {
i = 0;
while (i < sparkNo) {
_root.game.effects.id = _root.game.effects.id + 1;
duplicateMovieClip (_parent.effects.spark, "spark" + _parent.effects.id, _parent.effects.id + 1);
_root.game.effects["spark" + _root.game.effects.id]._x = (_x - (_width / 2)) + random(_width / 3);
_root.game.effects["spark" + _root.game.effects.id]._y = (_y - (_height / 2)) + random(_height);
_root.game.effects["spark" + _root.game.effects.id].xspeed = _root.game.effects["spark" + _root.game.effects.id].xspeed + xspeed;
_root.game.effects["spark" + _root.game.effects.id].yspeed = _root.game.effects["spark" + _root.game.effects.id].yspeed + (yspeed * 2);
i = i + 1;
}
xspeed = newV1;
target.xspeed = newV2;
}
if ((_x < target._x) && (newV1 < v1)) {
i = 0;
while (i < sparkNo) {
_root.game.effects.id = _root.game.effects.id + 1;
duplicateMovieClip (_parent.effects.spark, "spark" + _parent.effects.id, _parent.effects.id + 1);
_root.game.effects["spark" + _root.game.effects.id]._x = (_x + (_width / 2)) - random(_width / 3);
_root.game.effects["spark" + _root.game.effects.id]._y = (_y - (_height / 2)) + random(_height);
_root.game.effects["spark" + _root.game.effects.id].xspeed = _root.game.effects["spark" + _root.game.effects.id].xspeed + xspeed;
_root.game.effects["spark" + _root.game.effects.id].yspeed = _root.game.effects["spark" + _root.game.effects.id].yspeed + (yspeed * 2);
i = i + 1;
}
xspeed = newV1;
target.xspeed = newV2;
}
life = life - (((sparkNo * 12) / mass) / 8);
}
}
}
i = i + 1;
}
var target = _parent.walls;
if ((target.hitTest((_x * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y - (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true) || (target.hitTest(((_x + (_width / 2.4)) * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y - (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true))) || (target.hitTest(((_x - (_width / 2.4)) * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y - (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true))) {
if (yspeed > 0) {
var sparkNo = yspeed;
}
if (yspeed < 0) {
var sparkNo = (-yspeed);
}
hitSounds();
i = 0;
while (i < (sparkNo / 4)) {
_root.game.effects.id = _root.game.effects.id + 1;
duplicateMovieClip (_parent.effects.spark, "spark" + _parent.effects.id, _parent.effects.id + 1);
_root.game.effects["spark" + _root.game.effects.id]._x = (_x + (_width / 2)) - random(_width / 3);
_root.game.effects["spark" + _root.game.effects.id]._y = (_y - (_height / 2)) + random(_height);
_root.game.effects["spark" + _root.game.effects.id].xspeed = _root.game.effects["spark" + _root.game.effects.id].xspeed + xspeed;
_root.game.effects["spark" + _root.game.effects.id].yspeed = _root.game.effects["spark" + _root.game.effects.id].yspeed + (yspeed * 2);
i = i + 1;
}
life = life - (((sparkNo * 12) / mass) / 2);
yspeed = (-yspeed) * 0.5;
}
if ((target.hitTest((_x * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y + (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true) || (target.hitTest(((_x + (_width / 2.2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y + (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true))) || (target.hitTest(((_x - (_width / 2.2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y + (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true))) {
var s1 = yspeed;
var s2 = target.yspeed;
var sDiff = 0;
if (((s1 < 0) && (s2 >= 0)) || ((s2 < 0) && (s1 >= 0))) {
if (s1 < 0) {
sDiff = s2 - s1;
} else {
sDiff = s1 - s2;
}
} else if ((s1 >= 0) && (s2 >= 0)) {
if (s1 > s2) {
sDiff = s1 - s2;
} else {
sDiff = s2 - s1;
}
} else {
sDiff = s1 - s2;
}
if (sDiff < 0) {
sDiff = -sDiff;
}
sparksNo = sDiff;
hitSounds();
i = 0;
while (i < (sparkNo / 4)) {
hitSounds();
_root.game.effects.id = _root.game.effects.id + 1;
duplicateMovieClip (_parent.effects.spark, "spark" + _parent.effects.id, _parent.effects.id + 1);
_root.game.effects["spark" + _root.game.effects.id]._x = (_x + (_width / 2)) - random(_width / 3);
_root.game.effects["spark" + _root.game.effects.id]._y = (_y - (_height / 2)) + random(_height);
_root.game.effects["spark" + _root.game.effects.id].xspeed = _root.game.effects["spark" + _root.game.effects.id].xspeed + xspeed;
_root.game.effects["spark" + _root.game.effects.id].yspeed = _root.game.effects["spark" + _root.game.effects.id].yspeed + (yspeed * 2);
i = i + 1;
}
life = life - (((sparkNo * 12) / mass) / 2);
yspeed = (-yspeed) * 0.5;
}
if (target.hitTest(((_x - (_width / 2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, (_y * (1 / (100 / _root.game._yscale))) + _root.game._y, true)) {
_x = (_x - (xspeed / 3));
xspeed = (-xspeed) * 0.2;
if (yspeed > 0) {
var sparkNo = yspeed;
}
if (yspeed < 0) {
var sparkNo = (-yspeed);
}
if ((sparkNo / 4) > 1) {
hitSounds();
}
hitSounds();
i = 0;
while (i < (sparkNo / 4)) {
_root.game.effects.id = _root.game.effects.id + 1;
duplicateMovieClip (_parent.effects.spark, "spark" + _parent.effects.id, _parent.effects.id + 1);
_root.game.effects["spark" + _root.game.effects.id]._x = (_x - (_width / 2)) + random(_width / 3);
_root.game.effects["spark" + _root.game.effects.id]._y = (_y - (_height / 2)) + random(_height);
_root.game.effects["spark" + _root.game.effects.id].xspeed = _root.game.effects["spark" + _root.game.effects.id].xspeed + xspeed;
_root.game.effects["spark" + _root.game.effects.id].yspeed = _root.game.effects["spark" + _root.game.effects.id].yspeed + (yspeed * 2);
i = i + 1;
}
life = life - (((sparkNo * 12) / mass) / 6);
}
if (target.hitTest(((_x + (_width / 2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, (_y * (1 / (100 / _root.game._yscale))) + _root.game._y, true)) {
_x = (_x - (xspeed / 3));
xspeed = (-xspeed) * 0.2;
if (yspeed > 0) {
var sparkNo = yspeed;
}
if (yspeed < 0) {
var sparkNo = (-yspeed);
}
if ((sparkNo / 4) > 1) {
hitSounds();
}
i = 0;
while (i < (sparkNo / 4)) {
_root.game.effects.id = _root.game.effects.id + 1;
duplicateMovieClip (_parent.effects.spark, "spark" + _parent.effects.id, _parent.effects.id + 1);
_root.game.effects["spark" + _root.game.effects.id]._x = (_x + (_width / 2)) - random(_width / 3);
_root.game.effects["spark" + _root.game.effects.id]._y = (_y - (_height / 2)) + random(_height);
_root.game.effects["spark" + _root.game.effects.id].xspeed = _root.game.effects["spark" + _root.game.effects.id].xspeed + xspeed;
_root.game.effects["spark" + _root.game.effects.id].yspeed = _root.game.effects["spark" + _root.game.effects.id].yspeed + (yspeed * 2);
i = i + 1;
}
life = life - (((sparkNo * 12) / mass) / 6);
}
if (_root.game.sound.type == 2) {
var dist = Math.sqrt(((_x - _root.game.sound._x) * (_x - _root.game.sound._x)) + ((_y - _root.game.sound._y) * (_y - _root.game.sound._y)));
if (dist < 300) {
interestX = _root.game.sound._x;
interestY = _root.game.sound._y;
interestLevel = interestLevel + 50;
}
if (dist < (_root.game.sound.size * 2)) {
life = life - (((_root.game.sound.size * 2) - dist) / 8);
var adjside = (_root.game.sound._x - _x);
var oppside = (-1 * (_root.game.sound._y - _y));
var angle = Math.atan2(oppside, adjside);
angle = (angle / 3.141593) * 180;
var throwRot = (-1 * angle);
xspeed = xspeed - (Math.cos(throwRot * 0.01745329) * (((_root.game.sound.size * 2) - dist) / (10 * mass)));
yspeed = yspeed + (Math.sin(throwRot * 0.01745329) * (((_root.game.sound.size * 2) - dist) / (10 * mass)));
}
}
if ((life < -75) && (exploded == false)) {
trace(_name);
exploded = true;
_root.id = _root.id + 1;
_root.game.expTargetX = _x;
_root.game.expTargetY = _y;
_root.game.expSize = _height;
_root.game.expSize = _height;
trace("exppp");
_root.blastsnd.setVolume(20);
_root.blastsnd.start();
duplicateMovieClip (_root.game.explosion, "explosion" + _root.id, _root.id + 300);
_root.game["explosion" + _root.id]._x = _x;
_root.game["explosion" + _root.id]._y = _y;
_root.game["explosion" + _root.id]._height = _root.game.expSize / 2.5;
_root.game["explosion" + _root.id]._width = _root.game.expSize / 2.5;
_root.game["explosion" + _root.id].sizeE = _root.game.expSize * 2;
i = 0;
while (i < 4) {
_root.game.effects2.id = _root.game.effects2.id + 1;
duplicateMovieClip (_parent.effects2.tire, "spark" + _parent.effects2.id, _parent.effects2.id + 1);
_root.game.effects2["spark" + _root.game.effects2.id]._x = _x;
_root.game.effects2["spark" + _root.game.effects2.id]._y = _y;
i = i + 1;
}
}
if ((life < 50) && (life > -75)) {
timerSmoke = timerSmoke + 1;
if (timerSmoke > 1) {
_root.game.effects.id = _root.game.effects.id + 1;
duplicateMovieClip (_parent.effects.smoke, "spark" + _parent.effects.id, _parent.effects.id + 1);
_root.game.effects["spark" + _root.game.effects.id]._x = _x;
_root.game.effects["spark" + _root.game.effects.id]._y = _y;
_root.game.effects["spark" + _root.game.effects.id]._height = _root.game.effects["spark" + _root.game.effects.id]._height + _root.game.player.yspeed;
_root.game.effects["spark" + _root.game.effects.id].xspeed = _root.game.effects["spark" + _root.game.effects.id].xspeed + xspeed;
_root.game.effects["spark" + _root.game.effects.id].yspeed = _root.game.effects["spark" + _root.game.effects.id].yspeed + (yspeed * 2);
timerSmoke = 0;
}
}
if (life < -75) {
timerSmoke = timerSmoke + 1;
if (timerSmoke > 1) {
_root.game.effects.id = _root.game.effects.id + 1;
duplicateMovieClip (_parent.effects.smoke2, "spark" + _parent.effects.id, _parent.effects.id + 1);
_root.game.effects["spark" + _root.game.effects.id]._x = _x;
_root.game.effects["spark" + _root.game.effects.id]._y = _y;
_root.game.effects["spark" + _root.game.effects.id]._height = _root.game.effects["spark" + _root.game.effects.id]._height + _root.game.player.yspeed;
_root.game.effects["spark" + _root.game.effects.id].xspeed = _root.game.effects["spark" + _root.game.effects.id].xspeed + xspeed;
_root.game.effects["spark" + _root.game.effects.id].yspeed = _root.game.effects["spark" + _root.game.effects.id].yspeed + (yspeed * 2);
timerSmoke = 0;
}
}
if (life > 0) {
if ((_x + xspeed) < targetX) {
xspeed = xspeed + 0.2;
} else if ((_x < targetX) && (xspeed > 0)) {
xspeed = xspeed * 0.97;
}
if ((_x + xspeed) > targetX) {
xspeed = xspeed - 0.2;
}
if ((_x > targetX) && (xspeed < 0)) {
xspeed = xspeed * 0.97;
}
if (up == false) {
if (yspeed > (-maxSpeed)) {
yspeed = yspeed - (maxSpeed / 30);
}
_rotation = (((xspeed * 3) + spin) + 180);
} else {
var laneChange = random(500);
if (laneChange == 10) {
var chooseLane = (1 + random(3));
lane = _root.game["lane" + chooseLane];
targetX = lane.targetX;
maxSpeed = lane.maxSpeed;
}
if (yspeed < maxSpeed) {
yspeed = yspeed + (maxSpeed / 30);
}
_rotation = ((xspeed * 6) / mass);
}
} else {
_rotation = (_rotation + ((xspeed * 10) / mass));
}
if ((life < 0) && (targetCar != true)) {
if (playerHitted == true) {
playerHitted = false;
}
}
if ((_name != "car") && (targetCar != true)) {
if ((_y > 600) || (_y < -1700)) {
_root.carsAlive = _root.carsAlive - 1;
engineSound.stop();
removeMovieClip(this);
}
}
xspeed = xspeed * 0.97;
yspeed = yspeed * 0.97;
showy = _y;
showx = _x;
_x = (_x + xspeed);
_y = (_y - ((-_parent.player.yspeed) + yspeed));
if (targetCar == true) {
_root.game.targetShow._x = _x;
_root.game.targetShow._y = _y;
var pScore = (10 - Math.ceil(life / 10));
if (pScore < 1) {
pScore = 1;
}
_root.game.targetShow.arrowMc.arrowSubMc.gotoAndStop(pScore);
}
}
}
Instance of Symbol 570 MovieClip "targetShow" in Symbol 647 MovieClip Frame 1
onClipEvent (enterFrame) {
this.swapDepths(501);
}
Instance of Symbol 575 MovieClip in Symbol 647 MovieClip Frame 1
onClipEvent (load) {
timer = 0;
spawnTime = 200;
startX = _x;
newLane = none;
oldLane = alsoNone;
lastCar = none;
createCar = true;
targetSpawned = false;
}
onClipEvent (enterFrame) {
if (_root.nextCar == true) {
var amount = (1 + random(4));
_x = _root.game["lane" + amount]._x;
newLane = _root.game["lane" + amount];
} else {
var amount = (1 + random(4));
_x = _root.game["lane" + amount]._x;
newLane = _root.game["lane" + amount];
}
timer = timer + (_root.game.player.yspeed + random(_root.game.player.yspeed / 2));
if (newLane != oldLane) {
if (lastCar._y < (_y + lastCar._height)) {
createCar = false;
} else {
createCar = true;
}
} else {
createCar = false;
}
if ((((timer > spawnTime) && (_root.carsAlive < _root.maxCars)) && (createCar == true)) && (_root.carId != 10)) {
_root.carsAlive = _root.carsAlive + 1;
_root.carId = _root.carId + 1;
if (_root.game["car" + _root.carId]._x == undefined) {
duplicateMovieClip (_parent.car, "car" + _root.carId, _root.carId + 151);
if (_root.nextCar == true) {
_root.game["car" + _root.carId]._x = (_x - 2) + random(4);
_root.game["car" + _root.carId]._y = _y;
_root.game["car" + _root.carId].lane = _root.game["lane" + amount];
_root.game["car" + _root.carId].laneId = 2;
_root.game["car" + _root.carId].targetCar = true;
_root.nextCar = false;
_root.targetcarinload = true;
_root.game["car" + _root.carId].gotoAndStop(1);
} else {
_root.game["car" + _root.carId]._x = (_x - 2) + random(4);
_root.game["car" + _root.carId]._y = _y;
_root.game["car" + _root.carId].lane = _root.game["lane" + amount];
_root.game["car" + _root.carId].laneId = amount;
_root.game["car" + _root.carId].targetCar = false;
_root.game["car" + _root.carId].gotoAndStop(1 + random(8));
}
lastCar = _root.game["car" + _root.carId];
timer = 0;
}
oldLane = _root.game["lane" + amount];
}
}
Instance of Symbol 576 MovieClip "prop" in Symbol 647 MovieClip Frame 1
onClipEvent (load) {
startY = _y;
yspeed = 0;
xspeed = 0;
hitTimes = 0;
}
onClipEvent (enterFrame) {
if (_parent.player.hitTest((_x * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y + _parent.player.yspeed) * (1 / (100 / _root.game._yscale))) + _root.game._y, true)) {
hitTimes = hitTimes + 1;
if (_currentframe == 1) {
yspeed = yspeed - _parent.player.yspeed;
} else {
yspeed = yspeed - (_parent.player.yspeed * 0.5);
}
xspeed = xspeed + (((_x - _parent.player._x) / 40) + (_parent.player.xspeed / 2));
_parent.player.yspeed = _parent.player.yspeed / 1.01;
gotoAndStop (2);
}
if (hitTimes > 10) {
_root.hud.displayText = "Cone carrying bonus 200 points!";
_root.hud.score = _root.hud.score + 200;
}
var target = _parent.walls;
if (target.hitTest((_x * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y - (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true)) {
yspeed = (-yspeed) * 0.5;
}
if (target.hitTest((_x * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y + (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true) && (yspeed + _root.game.player.yspeed)) {
yspeed = (-yspeed) * 0.5;
}
if (target.hitTest(((_x - (_width / 2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, (_y * (1 / (100 / _root.game._yscale))) + _root.game._y, true) && (xspeed < 0)) {
_x = (_x - xspeed);
xspeed = (-xspeed) * 0.2;
}
if (target.hitTest(((_x + (_width / 2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, (_y * (1 / (100 / _root.game._yscale))) + _root.game._y, true) && (xspeed > 0)) {
_x = (_x - xspeed);
xspeed = (-xspeed) * 0.2;
}
xspeed = xspeed * 0.97;
yspeed = yspeed * 0.97;
showy = _y;
showx = _x;
_rotation = (_rotation + ((xspeed + yspeed) * 4));
_x = (_x + xspeed);
_y = (_y + (_parent.player.yspeed + yspeed));
}
Instance of Symbol 596 MovieClip "player" in Symbol 647 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop (1);
_root.reloadComplete = true;
maxSpeed = 50;
yspeed = 50;
xspeed = 0;
mass = ((_height + _width) / 33) * 5;
maxLife = 400;
life = maxLife;
slowTimer = 0;
origWidth = _width;
this.swapDepths(2);
yspeed = 60;
exploded = false;
smokeTime = 0;
hitTime = 0;
skidPlaying = false;
rev = true;
revLength = 0;
explodeTimer = 10;
colorArr = ["0x339999", "0x99CC66", "0x993333", "0xCCCC66"];
}
onClipEvent (enterFrame) {
if (_root.hud.speed >= 200) {
skidActive = true;
}
if (Key.isDown(40)) {
}
if (skidActive == true) {
if (Key.isDown(40)) {
} else {
skidActive = false;
}
}
if ((skidActive == true) && (_root.hud.speed <= 30)) {
_root.skidDone = true;
}
if (_root.game.cars.hitTest((_x * (1 / (100 / _root.game._xscale))) + _root.game._x, (_y * (1 / (100 / _root.game._yscale))) + _root.game._y, true) && (yspeed > 30)) {
hitTime = hitTime + 1;
} else if (hitTime > 0) {
hitTime = 0;
} else {
hitTime = 0;
}
if (yspeed < 0) {
yspeed = yspeed - (yspeed / 2);
}
if ((yspeed / 5) < 3.5) {
var turnSpeed = (yspeed / 5);
} else {
turnSpeed = 3.5;
}
if ((_root.gocar && (yspeed < maxSpeed)) && (life > 0)) {
}
if ((Key.isDown(38) && (yspeed < maxSpeed)) && (life > 0)) {
yspeed = yspeed + 0.8;
}
if ((Key.isDown(32) && (yspeed > 0)) && (life > 0)) {
_root.pressspace = true;
} else {
if (turnSpeed > 3.5) {
turnSpeed = turnSpeed - 0.1;
}
skidPlaying = false;
skidSound.stop();
}
if (Key.isDown(39) && (life > 0)) {
xspeed = xspeed + turnSpeed;
}
if (Key.isDown(37) && (life > 0)) {
xspeed = xspeed - turnSpeed;
}
_rotation = (xspeed / 2);
xspeed = xspeed * 0.8;
_x = (_x + xspeed);
yspeed = yspeed * 0.99;
showx = _x;
showy = _y;
if (life < 0) {
explodeTimer = explodeTimer + 1;
}
if ((life < 0) && (explodeTimer > 20)) {
explodeTimer = 0;
exploded = true;
_root.id = _root.id + 1;
_root.game.expTargetX = _x;
_root.game.expTargetY = _y;
_root.game.expSize = _height;
_root.game.expSize = _height;
duplicateMovieClip (_root.game.explosion, "explosion" + _root.id, _root.id + 1);
_root.game["explosion" + _root.id]._x = _x;
_root.game["explosion" + _root.id]._y = _y;
_root.game["explosion" + _root.id]._height = _root.game.expSize / 3;
_root.game["explosion" + _root.id]._width = _root.game.expSize / 3;
_root.game["explosion" + _root.id].sizeE = _root.game.expSize * 2;
}
if (life < 40) {
smokeTime = smokeTime + (yspeed / 5);
if (smokeTime > 5) {
_root.game.effects.id = _root.game.effects.id + 1;
duplicateMovieClip (_parent.effects.smoke, "spark" + _parent.effects.id, _parent.effects.id + 1);
_root.game.effects["spark" + _root.game.effects.id]._x = _x;
_root.game.effects["spark" + _root.game.effects.id]._y = _y - (_height / 2);
_root.game.effects["spark" + _root.game.effects.id]._height = _root.game.effects["spark" + _root.game.effects.id]._height + yspeed;
_root.game.effects["spark" + _root.game.effects.id].xspeed = _root.game.effects["spark" + _root.game.effects.id].xspeed + xspeed;
_root.game.effects["spark" + _root.game.effects.id].yspeed = yspeed;
_root.game.effects.id = _root.game.effects.id + 1;
smokeTime = 0;
}
}
var target = _parent.walls;
if ((target.hitTest((_x * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y - (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true) || (target.hitTest(((_x + (_width / 3)) * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y - (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true))) || (target.hitTest(((_x - (_width / 3)) * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y - (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true))) {
if (yspeed > 0) {
life = life - yspeed;
} else {
life = life + yspeed;
}
yspeed = (-yspeed) * 1;
}
if (target.hitTest((_x * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y + (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true) && (yspeed + _root.game.player.yspeed)) {
if (yspeed > 0) {
life = life - yspeed;
} else {
life = life + yspeed;
}
_y = (_y - yspeed);
yspeed = (-yspeed) * 1;
}
if (target.hitTest(((_x - (_width / 2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, (_y * (1 / (100 / _root.game._yscale))) + _root.game._y, true) && (xspeed < 0)) {
_x = (_x - xspeed);
xspeed = (-xspeed) * 0.2;
var sparkNo = ((yspeed / 5) - 2);
life = life - (sparkNo / 5);
i = 0;
while (i < sparkNo) {
_root.game.effects.id = _root.game.effects.id + 1;
duplicateMovieClip (_root.game.effects.spark, "spark" + _root.game.effects.id, _root.game.effects.id + 1);
_root.game.effects["spark" + _root.game.effects.id]._x = (_x - (_width / 2)) + random(_width / 3);
_root.game.effects["spark" + _root.game.effects.id]._y = (_y - (_height / 2)) + random(_height);
_root.game.effects["spark" + _root.game.effects.id].xspeed = _root.game.effects["spark" + _root.game.effects.id].xspeed + xspeed;
_root.game.effects["spark" + _root.game.effects.id].yspeed = _root.game.effects["spark" + _root.game.effects.id].yspeed + (yspeed * 2);
i = i + 1;
}
i = 0;
while (i < (sparkNo / 4)) {
_root.game.effects.id = _root.game.effects.id + 1;
duplicateMovieClip (_root.game.effects.paint, "spark" + _root.game.effects.id, _root.game.effects.id + 1);
_root.game.effects["spark" + _root.game.effects.id]._x = (_x - (_width / 2)) + random(_width / 3);
_root.game.effects["spark" + _root.game.effects.id]._y = (_y - (_height / 2)) + random(_height);
_root.game.effects["spark" + _root.game.effects.id].xspeed = _root.game.effects["spark" + _root.game.effects.id].xspeed + xspeed;
_root.game.effects["spark" + _root.game.effects.id].yspeed = yspeed * 1.5;
i = i + 1;
}
}
if (target.hitTest(((_x + (_width / 2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, (_y * (1 / (100 / _root.game._yscale))) + _root.game._y, true) && (xspeed > 0)) {
_x = (_x - xspeed);
xspeed = (-xspeed) * 0.2;
var sparkNo = ((yspeed / 5) - 2);
life = life - (sparkNo / 5);
i = 0;
while (i < sparkNo) {
_root.game.effects.id = _root.game.effects.id + 1;
duplicateMovieClip (_root.game.effects.spark, "spark" + _root.game.effects.id, _parent.effects.id + 1);
var pColor = new Color(_root.game.effects["spark" + _root.game.effects.id]);
_root.game.effects["spark" + _root.game.effects.id]._x = (_x + (_width / 2)) - random(_width / 3);
_root.game.effects["spark" + _root.game.effects.id]._y = (_y - (_height / 2)) + random(_height);
_root.game.effects["spark" + _root.game.effects.id].xspeed = _root.game.effects["spark" + _root.game.effects.id].xspeed + xspeed;
_root.game.effects["spark" + _root.game.effects.id].yspeed = _root.game.effects["spark" + _root.game.effects.id].yspeed + (yspeed * 2);
i = i + 1;
}
i = 0;
while (i < (sparkNo / 4)) {
_root.game.effects.id = _root.game.effects.id + 1;
duplicateMovieClip (_root.game.effects.paint, "spark" + _root.game.effects.id, _parent.effects.id + 1);
_root.game.effects["spark" + _root.game.effects.id]._x = (_x + (_width / 2)) - random(_width / 3);
_root.game.effects["spark" + _root.game.effects.id]._y = (_y - (_height / 2)) + random(_height);
_root.game.effects["spark" + _root.game.effects.id].xspeed = _root.game.effects["spark" + _root.game.effects.id].xspeed + xspeed;
_root.game.effects["spark" + _root.game.effects.id].yspeed = yspeed * 1.5;
i = i + 1;
}
}
if (_root.game.slower.hitTest((_x * (1 / (100 / _root.game._xscale))) + _root.game._x, (_y * (1 / (100 / _root.game._yscale))) + _root.game._y, true)) {
if ((_x * (1 / (100 / _root.game._xscale))) < 0) {
_root.pavementTime = _root.pavementTime + 1;
}
if (slowTimer < 20) {
slowTimer = slowTimer + 1;
} else {
yspeed = yspeed * 0.98;
}
} else if (slowTimer > 0) {
slowTimer = slowTimer - 1;
}
if (_root.game.sound.type == 2) {
var dist = Math.sqrt(((_x - _root.game.sound._x) * (_x - _root.game.sound._x)) + ((_y - _root.game.sound._y) * (_y - _root.game.sound._y)));
if (dist < 300) {
interestX = _root.game.sound._x;
interestY = _root.game.sound._y;
interestLevel = interestLevel + 50;
}
if (dist < (_root.game.sound.size * 2)) {
life = life - (((_root.game.sound.size * 2) - dist) / 50);
var adjside = (_root.game.sound._x - _x);
var oppside = (-1 * (_root.game.sound._y - _y));
var angle = Math.atan2(oppside, adjside);
angle = (angle / 3.141593) * 180;
var throwRot = (-1 * angle);
xspeed = xspeed - (Math.cos(throwRot * 0.01745329) * (((_root.game.sound.size * 2) - dist) / (5 * mass)));
yspeed = yspeed + (Math.sin(throwRot * 0.01745329) * (((_root.game.sound.size * 2) - dist) / (5 * mass)));
}
}
}
Instance of Symbol 598 MovieClip "gun" in Symbol 647 MovieClip Frame 1
onClipEvent (load) {
targetC = _parent.targetShow;
}
onClipEvent (enterFrame) {
if (_root.pressspace == true) {
_root.pressspace = false;
if (_root.reloadComplete == true) {
_root.reloadComplete = false;
_root.bulletmc = _parent.attachMovie("bullet", "bullet" + _root.bulletnum, _root.getNextHighestDepth());
randomNum = random(20) - 10;
bulletAngle = (((_rotation + randomNum) - 90) * Math.PI) / 180;
_root.bulletmc.xSpeed = Math.cos(_root.gunangles) * 10;
_root.bulletmc.ySpeed = Math.sin(_root.gunangles) * 10;
_root.bulletmc._x = _root.game.gun._x;
_root.bulletmc._y = _root.game.gun._y;
_root.bspeed = 10;
_root.bulletnum++;
}
}
if ((_root.hud.targetDisplay.pDist < 1) && (_root.nextCar == false)) {
_alpha = 0;
} else {
_alpha = 0;
}
_x = _root.game.player._x;
this.swapDepths(_root.game.getNextHighestDepth());
var adjside = (targetC._x - _x);
var oppside = (-1 * (targetC._y - _y));
var angle = Math.atan2(oppside, adjside);
angle = (angle / 3.141593) * 180;
_root.gunangles = angle;
if (angle > 0) {
}
}
Instance of Symbol 619 MovieClip "effects" in Symbol 647 MovieClip Frame 1
onClipEvent (load) {
id = 0;
}
onClipEvent (enterFrame) {
this.swapDepths(300);
if (id > 50) {
id = 0;
}
}
Instance of Symbol 632 MovieClip "explosion" in Symbol 647 MovieClip Frame 1
onClipEvent (load) {
var sizeE;
if ((_x - _root.game.player._x) > 100) {
pan = 100;
} else if ((_x - _root.game.player._x) < -100) {
pan = -100;
} else {
pan = _x - _root.game.player._x;
}
vol = 100 - (Math.sqrt(((_x - _root.game.player._x) * (_x - _root.game.player._x)) + ((_y - _root.game.player._y) * (_y - _root.game.player._y))) / 10);
if (vol > 100) {
vol = 100;
}
if (vol < 0) {
vol = 0;
}
if (_name == "explosion") {
_visible = false;
} else {
explosionSound = new Sound(this);
explosionSound.attachSound("explosion");
explosionSound.setPan(pan);
explosionSound.setVolume(vol);
explosionSound.start(0, 0);
explosionSound.setPan(pan);
explosionSound.setVolume(vol);
}
time = 100;
}
onClipEvent (enterFrame) {
_y = (_y + _root.game.player.yspeed);
if ((_x - _root.game.player._x) > 100) {
pan = 100;
} else if ((_x - _root.game.player._x) < -100) {
pan = -100;
} else {
pan = _x - _root.game.player._x;
}
vol = 100 - (Math.sqrt(((_x - _root.game.player._x) * (_x - _root.game.player._x)) + ((_y - _root.game.player._y) * (_y - _root.game.player._y))) / 10);
if (vol > 100) {
vol = 100;
}
if (vol < 0) {
vol = 0;
}
explosionSound.setPan(pan);
explosionSound.setVolume(vol);
}
Instance of Symbol 619 MovieClip "effects2" in Symbol 647 MovieClip Frame 1
onClipEvent (load) {
id = 0;
_x = 0;
_y = 0;
}
onClipEvent (enterFrame) {
this.swapDepths(1);
if (id > 50) {
id = 0;
}
}
Instance of Symbol 634 MovieClip in Symbol 647 MovieClip Frame 1
onClipEvent (enterFrame) {
this.swapDepths(1001);
}
Instance of Symbol 646 MovieClip in Symbol 647 MovieClip Frame 1
onClipEvent (load) {
targetC = _parent.targetShow;
}
onClipEvent (enterFrame) {
if ((_root.hud.targetDisplay.pDist < 1) && (_root.nextCar == false)) {
_alpha = 100;
} else {
_alpha = 0;
}
_x = _root.game.player._x;
this.swapDepths(_root.game.getNextHighestDepth());
var adjside = (targetC._x - _x);
var oppside = (-1 * (targetC._y - _y));
var angle = Math.atan2(oppside, adjside);
angle = (angle / 3.141593) * 180;
_rotation = (-1 * angle);
}
Symbol 669 MovieClip Frame 1
stop();
Symbol 669 MovieClip Frame 11
gotoAndPlay ("start");
Symbol 675 Button
on (release) {
_root.btnsnd.setVolume(0);
nextFrame();
}
Symbol 678 Button
on (release) {
_root.btnsnd.setVolume(100);
prevFrame();
}
Symbol 679 MovieClip Frame 1
stop();
_root.btnsnd.setVolume(100);
Symbol 679 MovieClip Frame 2
stop();
_root.btnsnd.setVolume(0);
Instance of Symbol 657 MovieClip "targetDisplay" in Symbol 686 MovieClip Frame 1
onClipEvent (load) {
timeSoFar = 1200;
secs = 0;
mins = 8;
targetDist = 5;
told = false;
pDist = 0;
_parent.aheadMc._visible = false;
}
onClipEvent (enterFrame) {
if (((targetDist - Math.round(_root.distTrav)) < 1) && (told == false)) {
if (_root.levelPlay == "story4") {
if (_root.totalTargetCar < 6) {
_root.nextCar = true;
told = true;
}
} else {
_root.nextCar = true;
told = true;
}
}
if (told == false) {
_alpha = 100;
}
pDist = targetDist - Math.round(_root.distTrav);
dist = pDist + "Km";
timeSoFar = timeSoFar + 1;
if (Math.round(timeSoFar / 25) < 10) {
secs = "0" + Math.round(timeSoFar / 25);
} else {
secs = Math.round(timeSoFar / 25);
}
if (secs == 60) {
mins = mins + 1;
timeSoFar = 0;
}
time = (("8:5" + mins) + ".") + secs;
}
Symbol 689 MovieClip Frame 1
Symbol 689 MovieClip Frame 25
_root.timervalue--;
Symbol 694 MovieClip Frame 12
stop();
Symbol 910 MovieClip Frame 2
Symbol 910 MovieClip Frame 37
Symbol 910 MovieClip Frame 62
Symbol 910 MovieClip Frame 78
Symbol 910 MovieClip Frame 87
Symbol 910 MovieClip Frame 113
Symbol 910 MovieClip Frame 139
Symbol 910 MovieClip Frame 163
Symbol 910 MovieClip Frame 190
Symbol 910 MovieClip Frame 205
Symbol 910 MovieClip Frame 216
Symbol 910 MovieClip Frame 241
Symbol 910 MovieClip Frame 245
Symbol 910 MovieClip Frame 249
stop();
Symbol 914 Button
on (release) {
gotoandplaylevel();
}
on (rollOver) {
_root.btnsnd.start();
}
Symbol 920 Button
on (release) {
gotoandplaylevel();
}
Instance of Symbol 929 MovieClip in Symbol 933 MovieClip Frame 1
onClipEvent (load) {
origY = _y;
}
onClipEvent (enterFrame) {
_y = (_y + _root.game.player.yspeed);
if (_y > (origY + 1230)) {
_y = origY;
}
}
Instance of Symbol 932 MovieClip in Symbol 933 MovieClip Frame 1
onClipEvent (load) {
origY = _y;
}
onClipEvent (enterFrame) {
_y = (_y + _root.game.player.yspeed);
if (_y > (origY + 1230)) {
_y = origY;
}
}
Symbol 934 MovieClip Frame 1
_root.sirensnd.start();
_root.sirensnd.setVolume(30);
_root.sirensnd.onSoundComplete = function () {
_root.sirensnd.start();
};
Instance of Symbol 925 MovieClip "track" in Symbol 934 MovieClip Frame 1
onClipEvent (load) {
startY = _y;
_root.newscorevar = 0;
_root.scorecoinhit = false;
}
onClipEvent (enterFrame) {
_y = (_y + _parent.player.yspeed);
_parent.scorecoin._y = _parent.scorecoin._y + _parent.player.yspeed;
if ((_y + _parent.player.yspeed) > (startY + 325)) {
_y = startY;
}
if (_parent.scorecoin._y > 3333) {
_root.scorecoinhit = false;
_parent.scorecoin._x = _parent["lane" + (1 + random(4))]._x;
_parent.scorecoin._y = -2000;
}
if (_parent.scorecoin.hitTest(_root.game.player) && (_root.scorecoinhit == false)) {
_root.newscorevar = _root.newscorevar + 100;
_parent.scorecoin.gotoAndPlay(2);
_root.scorecoinhit = true;
}
}
Instance of Symbol 534 MovieClip "lane1" in Symbol 934 MovieClip Frame 1
onClipEvent (load) {
maxSpeed = 35;
targetX = _x;
id = 1;
}
Instance of Symbol 534 MovieClip "lane2" in Symbol 934 MovieClip Frame 1
onClipEvent (load) {
maxSpeed = 30;
targetX = _x;
id = 2;
}
Instance of Symbol 534 MovieClip "lane3" in Symbol 934 MovieClip Frame 1
onClipEvent (load) {
maxSpeed = 25;
targetX = _x;
id = 3;
}
Instance of Symbol 534 MovieClip "lane4" in Symbol 934 MovieClip Frame 1
onClipEvent (load) {
maxSpeed = 20;
targetX = _x;
id = 4;
}
Instance of Symbol 536 MovieClip "slower" in Symbol 934 MovieClip Frame 1
onClipEvent (load) {
_alpha = 0;
}
Instance of Symbol 933 MovieClip "walls" in Symbol 934 MovieClip Frame 1
onClipEvent (load) {
xspeed = 0;
yspeed = 0;
mass = 1000;
}
onClipEvent (enterFrame) {
xspeed = 0;
yspeed = 0;
}
Instance of Symbol 564 MovieClip "car" in Symbol 934 MovieClip Frame 1
onClipEvent (load) {
this.nofhittimes = 0;
var lane;
var laneId;
var truckLikely = (1 + random(10));
if (truckLikely == 5) {
gotoAndStop(1 + random(4));
} else {
gotoAndStop(1 + random(3));
}
startY = _y;
yspeed = 0;
xspeed = 0;
hitTimes = 0;
spin = 0;
sironBool = false;
targetX = lane.targetX;
if (_x > 0) {
up = false;
_rotation = (_rotation + 180);
yspeed = -lane.maxSpeed;
maxSpeed = lane.maxSpeed;
} else {
up = true;
_rotation = 0;
yspeed = lane.maxSpeed;
maxSpeed = lane.maxSpeed;
}
life = 100;
target = _parent.player;
mass = (_height + _width) / 33;
exploded = false;
timerSmoke = 0;
sparkNo = 0;
var targetCar;
messageShown = false;
engineStarted = false;
playerHitted = false;
sDiff = 0;
deadCar = false;
_root.targetcarinload = true;
}
onClipEvent (enterFrame) {
function hitSounds() {
var _local2 = 1 + random(3);
hitSound = new Sound(this);
if (_local2 == 1) {
hitSound.attachSound("hit1");
} else if (_local2 == 2) {
hitSound.attachSound("hit2");
} else {
hitSound.attachSound("hit3");
}
hitSound.setVolume(sparkNo * 5);
hitSound.start(0, 0);
}
if (_root.targetsLeft <= 0) {
}
if (targetCar == true) {
_root.game.targetShow._x = _x;
_root.game.targetShow._y = _y;
_root.game.targetShow.play();
lane = _root.game.lane1;
targetX = lane.targetX;
maxSpeed = lane.maxSpeed;
if (!sironBool) {
sironSound = new Sound(this);
sironSound.attachSound("siron");
sironSound.start(0, 100);
sironBool = true;
}
sironSound.setVolume(100);
if ((life < 1) && (messageShown == false)) {
_root.score = _root.score + 1000;
if (_root.targetsLeft == 0) {
_root.extraCar = true;
}
sironSound.stop();
_root.targetsLeft = _root.targetsLeft - 1;
messageShown = true;
targetCar = false;
_root.game.targetShow._x = -2000;
deadCar = true;
}
} else if ((life < 1) && (deadCar != true)) {
_root.carsBlownUp = _root.carsBlownUp + 1;
if (_currentframe == 4) {
_root.trucksKilled = _root.trucksKilled + 1;
}
deadCar = true;
}
if (_name != "car") {
_parent.showMc._x = _x;
_parent.showMc._y = passY;
i = 0;
while (i < (_root.maxCars + 2)) {
if (_root.game["car" + i]._x != undefined) {
bullettarget = _root.game["car" + i];
if (_root.game["car" + i] != this) {
target = _root.game["car" + i];
} else {
target = _parent.player;
}
if (bullettarget.hitTest(_root.bulletmc)) {
bullettarget.ene.hhh.gotoAndStop(2);
_root.reloadComplete = true;
removeMovieClip(_root.bulletmc);
} else if (_root.game.car.hitTest(_root.bulletmc)) {
this.ene.hhh.gotoAndStop(2);
_root.reloadComplete = true;
removeMovieClip(_root.bulletmc);
}
var adjside = (target._x - _x);
var oppside = (-1 * (target._y - _y));
var dist = Math.sqrt((adjside * adjside) + (oppside * oppside));
var distMax = (_height + (target._height / 2));
if (dist < distMax) {
if ((target.hitTest((_x * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y - (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true) || (target.hitTest(((_x + (_width / 2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y - (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true))) || (target.hitTest(((_x - (_width / 2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y - (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true))) {
_root.cardashsnd.start();
xspeed = xspeed + (((_x - target._x) / 40) + (target.xspeed / 5));
if ((target._x > (_x - ((_width / 2) + (target._width / 2.2)))) && (target._x < (_x + ((_width / 2) + (target._width / 2.2))))) {
var s1 = yspeed;
var s2 = target.yspeed;
var sDiff = 0;
if (((s1 < 0) && (s2 >= 0)) || ((s2 < 0) && (s1 >= 0))) {
if (s1 < 0) {
var sDiff = (s2 - s1);
} else {
var sDiff = (s1 - s2);
}
} else if ((s1 >= 0) && (s2 >= 0)) {
if (s1 > s2) {
var sDiff = (s1 - s2);
} else {
var sDiff = (s2 - s1);
}
} else {
var sDiff = (s1 - s2);
}
if (sDiff < 0) {
sDiff = -sDiff;
}
if (sDiff > 6) {
sDiff = sDiff - 5;
life = life - (((sDiff * 12) / mass) / 2);
target.life = target.life - (((sDiff * 12) / mass) / 4);
sparkNo = sDiff;
}
if (sDiff > 3) {
hitSounds();
}
if (((target == _parent.player) && (targetCar == false)) && (life > 1)) {
_parent.player.hitTime = 0;
playerHitted = true;
} else if ((target != _parent.player) && (targetCar == false)) {
playerHitted = false;
}
i == 0;
while (i < sparkNo) {
_root.game.effects.id = _root.game.effects.id + 1;
duplicateMovieClip (_parent.effects.spark, "spark" + _parent.effects.id, _parent.effects.id + 1);
_root.game.effects["spark" + _root.game.effects.id]._x = (_x - (_width / 2)) + random(_width);
_root.game.effects["spark" + _root.game.effects.id]._y = (_y - (_height / 2)) + random(_height / 2);
_root.game.effects["spark" + _root.game.effects.id].xspeed = _root.game.effects["spark" + _root.game.effects.id].xspeed + 5;
_root.game.effects["spark" + _root.game.effects.id].yspeed = _root.game.effects["spark" + _root.game.effects.id].yspeed + (yspeed * 2);
i = i + 1;
}
maxSpeed = maxSpeed - random(2);
var v1 = yspeed;
var m1 = mass;
var v2 = target.yspeed;
var m2 = target.mass;
var newV1 = ((((m1 - m2) / (m1 + m2)) * v1) + (((2 * m2) / (m1 + m2)) * v2));
var newV2 = ((((2 * m1) / (m1 + m2)) * v1) - (((m1 - m2) / (m1 + m2)) * v2));
if ((_y > target._y) && (newV1 < v1)) {
yspeed = newV1;
target.yspeed = newV2;
}
}
}
if ((target.hitTest((_x * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y + (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true) || (target.hitTest(((_x + (_width / 2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y + (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true))) || (target.hitTest(((_x - (_width / 2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y + (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true))) {
_root.cardashsnd.start();
xspeed = xspeed + (((_x - target._x) / 40) + (target.xspeed / 5));
if ((target._x > (_x - ((_width / 2) + (target._width / 2)))) && (target._x < (_x + ((_width / 2) + (target._width / 2))))) {
var s1 = yspeed;
var s2 = target.yspeed;
var sDiff = 0;
if (((s1 < 0) && (s2 >= 0)) || ((s2 < 0) && (s1 >= 0))) {
if (s1 < 0) {
var sDiff = (s2 - s1);
} else {
var sDiff = (s1 - s2);
}
} else if ((s1 >= 0) && (s2 >= 0)) {
if (s1 > s2) {
var sDiff = (s1 - s2);
} else {
var sDiff = (s2 - s1);
}
} else {
var sDiff = (s1 - s2);
}
if (sDiff < 0) {
sDiff = -sDiff;
}
if (sDiff > 6) {
sDiff = sDiff - 5;
life = life - (((sDiff * 12) / mass) / 2);
target.life = target.life - (((sDiff * 12) / mass) / 4);
sparkNo = sDiff;
}
if (sDiff > 3) {
hitSounds();
}
if (((target == _parent.player) && (targetCar == false)) && (life > 1)) {
_parent.player.hitTime = 0;
playerHitted = true;
} else if ((target != _parent.player) && (targetCar == false)) {
playerHitted = false;
}
i == 0;
while (i < sparkNo) {
_root.game.effects.id = _root.game.effects.id + 1;
duplicateMovieClip (_parent.effects.spark, "spark" + _parent.effects.id, _parent.effects.id + 1);
_root.game.effects["spark" + _root.game.effects.id]._x = (_x - (_width / 2)) + random(_width);
_root.game.effects["spark" + _root.game.effects.id]._y = (_y + (_height / 2)) - random(_height / 2);
_root.game.effects["spark" + _root.game.effects.id].xspeed = _root.game.effects["spark" + _root.game.effects.id].xspeed + 5;
_root.game.effects["spark" + _root.game.effects.id].yspeed = _root.game.effects["spark" + _root.game.effects.id].yspeed + (yspeed * 2);
i = i + 1;
}
var v1 = yspeed;
var m1 = mass;
var v2 = target.yspeed;
var m2 = target.mass;
var newV1 = ((((m1 - m2) / (m1 + m2)) * v1) + (((2 * m2) / (m1 + m2)) * v2));
var newV2 = ((((2 * m1) / (m1 + m2)) * v1) - (((m1 - m2) / (m1 + m2)) * v2));
if ((_y < target._y) && (newV1 > v1)) {
yspeed = newV1;
target.yspeed = newV2;
}
maxSpeed = maxSpeed + random(2);
}
}
if (((target.hitTest(((_x - (_width / 2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, (_y * (1 / (100 / _root.game._yscale))) + _root.game._y, true) || (target.hitTest(((_x + (_width / 2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, (_y * (1 / (100 / _root.game._yscale))) + _root.game._y, true))) || (target.hitTest(((_x - (_width / 2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y + (_height / 3)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true))) || (target.hitTest(((_x + (_width / 2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y + (height / 3)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true))) {
var speedDiff = ((xspeed - target.xspeed) + (yspeed - target.yspeed));
if (speedDiff > 0) {
var sparkNo = speedDiff;
} else {
var sparkNo = (-speedDiff);
}
hitTimes = hitTimes + 1;
var v1 = xspeed;
var m1 = mass;
var v2 = target.xspeed;
var m2 = target.mass;
var newV1 = ((((m1 - m2) / (m1 + m2)) * v1) + (((2 * m2) / (m1 + m2)) * v2));
var newV2 = ((((2 * m1) / (m1 + m2)) * v1) - (((m1 - m2) / (m1 + m2)) * v2));
if (((target == _parent.player) && (targetCar == false)) && (life > 1)) {
_parent.player.hitTime = 0;
playerHitted = true;
} else if ((target != _parent.player) && (targetCar == false)) {
playerHitted = false;
}
if ((_x > target._x) && (newV1 > v1)) {
i = 0;
while (i < sparkNo) {
_root.game.effects.id = _root.game.effects.id + 1;
duplicateMovieClip (_parent.effects.spark, "spark" + _parent.effects.id, _parent.effects.id + 1);
_root.game.effects["spark" + _root.game.effects.id]._x = (_x - (_width / 2)) + random(_width / 3);
_root.game.effects["spark" + _root.game.effects.id]._y = (_y - (_height / 2)) + random(_height);
_root.game.effects["spark" + _root.game.effects.id].xspeed = _root.game.effects["spark" + _root.game.effects.id].xspeed + xspeed;
_root.game.effects["spark" + _root.game.effects.id].yspeed = _root.game.effects["spark" + _root.game.effects.id].yspeed + (yspeed * 2);
i = i + 1;
}
xspeed = newV1;
target.xspeed = newV2;
}
if ((_x < target._x) && (newV1 < v1)) {
i = 0;
while (i < sparkNo) {
_root.game.effects.id = _root.game.effects.id + 1;
duplicateMovieClip (_parent.effects.spark, "spark" + _parent.effects.id, _parent.effects.id + 1);
_root.game.effects["spark" + _root.game.effects.id]._x = (_x + (_width / 2)) - random(_width / 3);
_root.game.effects["spark" + _root.game.effects.id]._y = (_y - (_height / 2)) + random(_height);
_root.game.effects["spark" + _root.game.effects.id].xspeed = _root.game.effects["spark" + _root.game.effects.id].xspeed + xspeed;
_root.game.effects["spark" + _root.game.effects.id].yspeed = _root.game.effects["spark" + _root.game.effects.id].yspeed + (yspeed * 2);
i = i + 1;
}
xspeed = newV1;
target.xspeed = newV2;
}
life = life - (((sparkNo * 12) / mass) / 8);
}
}
}
i = i + 1;
}
var target = _parent.walls;
if ((target.hitTest((_x * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y - (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true) || (target.hitTest(((_x + (_width / 2.4)) * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y - (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true))) || (target.hitTest(((_x - (_width / 2.4)) * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y - (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true))) {
if (yspeed > 0) {
var sparkNo = yspeed;
}
if (yspeed < 0) {
var sparkNo = (-yspeed);
}
hitSounds();
i = 0;
while (i < (sparkNo / 4)) {
_root.game.effects.id = _root.game.effects.id + 1;
duplicateMovieClip (_parent.effects.spark, "spark" + _parent.effects.id, _parent.effects.id + 1);
_root.game.effects["spark" + _root.game.effects.id]._x = (_x + (_width / 2)) - random(_width / 3);
_root.game.effects["spark" + _root.game.effects.id]._y = (_y - (_height / 2)) + random(_height);
_root.game.effects["spark" + _root.game.effects.id].xspeed = _root.game.effects["spark" + _root.game.effects.id].xspeed + xspeed;
_root.game.effects["spark" + _root.game.effects.id].yspeed = _root.game.effects["spark" + _root.game.effects.id].yspeed + (yspeed * 2);
i = i + 1;
}
life = life - (((sparkNo * 12) / mass) / 2);
yspeed = (-yspeed) * 0.5;
}
if ((target.hitTest((_x * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y + (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true) || (target.hitTest(((_x + (_width / 2.2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y + (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true))) || (target.hitTest(((_x - (_width / 2.2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y + (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true))) {
var s1 = yspeed;
var s2 = target.yspeed;
var sDiff = 0;
if (((s1 < 0) && (s2 >= 0)) || ((s2 < 0) && (s1 >= 0))) {
if (s1 < 0) {
sDiff = s2 - s1;
} else {
sDiff = s1 - s2;
}
} else if ((s1 >= 0) && (s2 >= 0)) {
if (s1 > s2) {
sDiff = s1 - s2;
} else {
sDiff = s2 - s1;
}
} else {
sDiff = s1 - s2;
}
if (sDiff < 0) {
sDiff = -sDiff;
}
sparksNo = sDiff;
hitSounds();
i = 0;
while (i < (sparkNo / 4)) {
hitSounds();
_root.game.effects.id = _root.game.effects.id + 1;
duplicateMovieClip (_parent.effects.spark, "spark" + _parent.effects.id, _parent.effects.id + 1);
_root.game.effects["spark" + _root.game.effects.id]._x = (_x + (_width / 2)) - random(_width / 3);
_root.game.effects["spark" + _root.game.effects.id]._y = (_y - (_height / 2)) + random(_height);
_root.game.effects["spark" + _root.game.effects.id].xspeed = _root.game.effects["spark" + _root.game.effects.id].xspeed + xspeed;
_root.game.effects["spark" + _root.game.effects.id].yspeed = _root.game.effects["spark" + _root.game.effects.id].yspeed + (yspeed * 2);
i = i + 1;
}
life = life - (((sparkNo * 12) / mass) / 2);
yspeed = (-yspeed) * 0.5;
}
if (target.hitTest(((_x - (_width / 2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, (_y * (1 / (100 / _root.game._yscale))) + _root.game._y, true)) {
_x = (_x - (xspeed / 3));
xspeed = (-xspeed) * 0.2;
if (yspeed > 0) {
var sparkNo = yspeed;
}
if (yspeed < 0) {
var sparkNo = (-yspeed);
}
if ((sparkNo / 4) > 1) {
hitSounds();
}
hitSounds();
i = 0;
while (i < (sparkNo / 4)) {
_root.game.effects.id = _root.game.effects.id + 1;
duplicateMovieClip (_parent.effects.spark, "spark" + _parent.effects.id, _parent.effects.id + 1);
_root.game.effects["spark" + _root.game.effects.id]._x = (_x - (_width / 2)) + random(_width / 3);
_root.game.effects["spark" + _root.game.effects.id]._y = (_y - (_height / 2)) + random(_height);
_root.game.effects["spark" + _root.game.effects.id].xspeed = _root.game.effects["spark" + _root.game.effects.id].xspeed + xspeed;
_root.game.effects["spark" + _root.game.effects.id].yspeed = _root.game.effects["spark" + _root.game.effects.id].yspeed + (yspeed * 2);
i = i + 1;
}
life = life - (((sparkNo * 12) / mass) / 6);
}
if (target.hitTest(((_x + (_width / 2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, (_y * (1 / (100 / _root.game._yscale))) + _root.game._y, true)) {
_x = (_x - (xspeed / 3));
xspeed = (-xspeed) * 0.2;
if (yspeed > 0) {
var sparkNo = yspeed;
}
if (yspeed < 0) {
var sparkNo = (-yspeed);
}
if ((sparkNo / 4) > 1) {
hitSounds();
}
i = 0;
while (i < (sparkNo / 4)) {
_root.game.effects.id = _root.game.effects.id + 1;
duplicateMovieClip (_parent.effects.spark, "spark" + _parent.effects.id, _parent.effects.id + 1);
_root.game.effects["spark" + _root.game.effects.id]._x = (_x + (_width / 2)) - random(_width / 3);
_root.game.effects["spark" + _root.game.effects.id]._y = (_y - (_height / 2)) + random(_height);
_root.game.effects["spark" + _root.game.effects.id].xspeed = _root.game.effects["spark" + _root.game.effects.id].xspeed + xspeed;
_root.game.effects["spark" + _root.game.effects.id].yspeed = _root.game.effects["spark" + _root.game.effects.id].yspeed + (yspeed * 2);
i = i + 1;
}
life = life - (((sparkNo * 12) / mass) / 6);
}
if (_root.game.sound.type == 2) {
var dist = Math.sqrt(((_x - _root.game.sound._x) * (_x - _root.game.sound._x)) + ((_y - _root.game.sound._y) * (_y - _root.game.sound._y)));
if (dist < 300) {
interestX = _root.game.sound._x;
interestY = _root.game.sound._y;
interestLevel = interestLevel + 50;
}
if (dist < (_root.game.sound.size * 2)) {
life = life - (((_root.game.sound.size * 2) - dist) / 8);
var adjside = (_root.game.sound._x - _x);
var oppside = (-1 * (_root.game.sound._y - _y));
var angle = Math.atan2(oppside, adjside);
angle = (angle / 3.141593) * 180;
var throwRot = (-1 * angle);
xspeed = xspeed - (Math.cos(throwRot * 0.01745329) * (((_root.game.sound.size * 2) - dist) / (10 * mass)));
yspeed = yspeed + (Math.sin(throwRot * 0.01745329) * (((_root.game.sound.size * 2) - dist) / (10 * mass)));
}
}
if ((life < -75) && (exploded == false)) {
trace(_name);
exploded = true;
_root.id = _root.id + 1;
_root.game.expTargetX = _x;
_root.game.expTargetY = _y;
_root.game.expSize = _height;
_root.game.expSize = _height;
trace("exp22");
_root.blastsnd.start();
duplicateMovieClip (_root.game.explosion, "explosion" + _root.id, _root.id + 300);
_root.game["explosion" + _root.id]._x = _x;
_root.game["explosion" + _root.id]._y = _y;
_root.game["explosion" + _root.id]._height = _root.game.expSize / 2.5;
_root.game["explosion" + _root.id]._width = _root.game.expSize / 2.5;
_root.game["explosion" + _root.id].sizeE = _root.game.expSize * 2;
i = 0;
while (i < 4) {
_root.game.effects2.id = _root.game.effects2.id + 1;
duplicateMovieClip (_parent.effects2.tire, "spark" + _parent.effects2.id, _parent.effects2.id + 1);
_root.game.effects2["spark" + _root.game.effects2.id]._x = _x;
_root.game.effects2["spark" + _root.game.effects2.id]._y = _y;
i = i + 1;
}
}
if ((life < 50) && (life > -75)) {
timerSmoke = timerSmoke + 1;
if (timerSmoke > 1) {
_root.game.effects.id = _root.game.effects.id + 1;
duplicateMovieClip (_parent.effects.smoke, "spark" + _parent.effects.id, _parent.effects.id + 1);
_root.game.effects["spark" + _root.game.effects.id]._x = _x;
_root.game.effects["spark" + _root.game.effects.id]._y = _y;
_root.game.effects["spark" + _root.game.effects.id]._height = _root.game.effects["spark" + _root.game.effects.id]._height + _root.game.player.yspeed;
_root.game.effects["spark" + _root.game.effects.id].xspeed = _root.game.effects["spark" + _root.game.effects.id].xspeed + xspeed;
_root.game.effects["spark" + _root.game.effects.id].yspeed = _root.game.effects["spark" + _root.game.effects.id].yspeed + (yspeed * 2);
timerSmoke = 0;
}
}
if (life < -75) {
timerSmoke = timerSmoke + 1;
if (timerSmoke > 1) {
_root.game.effects.id = _root.game.effects.id + 1;
duplicateMovieClip (_parent.effects.smoke2, "spark" + _parent.effects.id, _parent.effects.id + 1);
_root.game.effects["spark" + _root.game.effects.id]._x = _x;
_root.game.effects["spark" + _root.game.effects.id]._y = _y;
_root.game.effects["spark" + _root.game.effects.id]._height = _root.game.effects["spark" + _root.game.effects.id]._height + _root.game.player.yspeed;
_root.game.effects["spark" + _root.game.effects.id].xspeed = _root.game.effects["spark" + _root.game.effects.id].xspeed + xspeed;
_root.game.effects["spark" + _root.game.effects.id].yspeed = _root.game.effects["spark" + _root.game.effects.id].yspeed + (yspeed * 2);
timerSmoke = 0;
}
}
if (life > 0) {
if ((_x + xspeed) < targetX) {
xspeed = xspeed + 0.2;
} else if ((_x < targetX) && (xspeed > 0)) {
xspeed = xspeed * 0.97;
}
if ((_x + xspeed) > targetX) {
xspeed = xspeed - 0.2;
}
if ((_x > targetX) && (xspeed < 0)) {
xspeed = xspeed * 0.97;
}
if (up == false) {
if (yspeed > (-maxSpeed)) {
yspeed = yspeed - (maxSpeed / 30);
}
_rotation = (((xspeed * 3) + spin) + 180);
} else {
var laneChange = random(500);
if (laneChange == 10) {
var chooseLane = (1 + random(3));
lane = _root.game["lane" + chooseLane];
targetX = lane.targetX;
maxSpeed = lane.maxSpeed;
}
if (yspeed < maxSpeed) {
yspeed = yspeed + (maxSpeed / 30);
}
_rotation = ((xspeed * 6) / mass);
}
} else {
_rotation = (_rotation + ((xspeed * 10) / mass));
}
if ((life < 0) && (targetCar != true)) {
if (playerHitted == true) {
playerHitted = false;
}
}
if ((_name != "car") && (targetCar != true)) {
if ((_y > 600) || (_y < -1700)) {
_root.carsAlive = _root.carsAlive - 1;
engineSound.stop();
removeMovieClip(this);
}
}
xspeed = xspeed * 0.97;
yspeed = yspeed * 0.97;
showy = _y;
showx = _x;
_x = (_x + xspeed);
_y = (_y - ((-_parent.player.yspeed) + yspeed));
if (targetCar == true) {
_root.game.targetShow._x = _x;
_root.game.targetShow._y = _y;
var pScore = (10 - Math.ceil(life / 10));
if (pScore < 1) {
pScore = 1;
}
_root.game.targetShow.arrowMc.arrowSubMc.gotoAndStop(pScore);
}
}
}
Instance of Symbol 570 MovieClip "targetShow" in Symbol 934 MovieClip Frame 1
onClipEvent (enterFrame) {
this.swapDepths(501);
}
Instance of Symbol 575 MovieClip in Symbol 934 MovieClip Frame 1
onClipEvent (load) {
timer = 0;
spawnTime = 200;
startX = _x;
newLane = none;
oldLane = alsoNone;
lastCar = none;
createCar = true;
targetSpawned = false;
}
onClipEvent (enterFrame) {
if (_root.nextCar == true) {
var amount = (1 + random(4));
_x = _root.game["lane" + amount]._x;
newLane = _root.game["lane" + amount];
} else {
var amount = (1 + random(4));
_x = _root.game["lane" + amount]._x;
newLane = _root.game["lane" + amount];
}
timer = timer + (_root.game.player.yspeed + random(_root.game.player.yspeed / 2));
if (newLane != oldLane) {
if (lastCar._y < (_y + lastCar._height)) {
createCar = false;
} else {
createCar = true;
}
} else {
createCar = false;
}
if ((((timer > spawnTime) && (_root.carsAlive < _root.maxCars)) && (createCar == true)) && (_root.carId != 10)) {
_root.carsAlive = _root.carsAlive + 1;
_root.carId = _root.carId + 1;
if (_root.game["car" + _root.carId]._x == undefined) {
duplicateMovieClip (_parent.car, "car" + _root.carId, _root.carId + 151);
if (_root.nextCar == true) {
_root.game["car" + _root.carId]._x = (_x - 2) + random(4);
_root.game["car" + _root.carId]._y = _y;
_root.game["car" + _root.carId].lane = _root.game["lane" + amount];
_root.game["car" + _root.carId].laneId = 2;
_root.game["car" + _root.carId].targetCar = true;
_root.nextCar = false;
} else {
_root.game["car" + _root.carId]._x = (_x - 2) + random(4);
_root.game["car" + _root.carId]._y = _y;
_root.game["car" + _root.carId].lane = _root.game["lane" + amount];
_root.game["car" + _root.carId].laneId = amount;
_root.game["car" + _root.carId].targetCar = false;
}
lastCar = _root.game["car" + _root.carId];
timer = 0;
}
oldLane = _root.game["lane" + amount];
}
}
Instance of Symbol 576 MovieClip "prop" in Symbol 934 MovieClip Frame 1
onClipEvent (load) {
startY = _y;
yspeed = 0;
xspeed = 0;
hitTimes = 0;
}
onClipEvent (enterFrame) {
if (_parent.player.hitTest((_x * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y + _parent.player.yspeed) * (1 / (100 / _root.game._yscale))) + _root.game._y, true)) {
hitTimes = hitTimes + 1;
if (_currentframe == 1) {
yspeed = yspeed - _parent.player.yspeed;
} else {
yspeed = yspeed - (_parent.player.yspeed * 0.5);
}
xspeed = xspeed + (((_x - _parent.player._x) / 40) + (_parent.player.xspeed / 2));
_parent.player.yspeed = _parent.player.yspeed / 1.01;
gotoAndStop (2);
}
if (hitTimes > 10) {
_root.hud.displayText = "Cone carrying bonus 200 points!";
_root.hud.score = _root.hud.score + 200;
}
var target = _parent.walls;
if (target.hitTest((_x * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y - (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true)) {
yspeed = (-yspeed) * 0.5;
}
if (target.hitTest((_x * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y + (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true) && (yspeed + _root.game.player.yspeed)) {
yspeed = (-yspeed) * 0.5;
}
if (target.hitTest(((_x - (_width / 2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, (_y * (1 / (100 / _root.game._yscale))) + _root.game._y, true) && (xspeed < 0)) {
_x = (_x - xspeed);
xspeed = (-xspeed) * 0.2;
}
if (target.hitTest(((_x + (_width / 2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, (_y * (1 / (100 / _root.game._yscale))) + _root.game._y, true) && (xspeed > 0)) {
_x = (_x - xspeed);
xspeed = (-xspeed) * 0.2;
}
xspeed = xspeed * 0.97;
yspeed = yspeed * 0.97;
showy = _y;
showx = _x;
_rotation = (_rotation + ((xspeed + yspeed) * 4));
_x = (_x + xspeed);
_y = (_y + (_parent.player.yspeed + yspeed));
}
Instance of Symbol 596 MovieClip "player" in Symbol 934 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop (1);
_root.reloadComplete = true;
maxSpeed = 50;
yspeed = 50;
xspeed = 0;
mass = ((_height + _width) / 33) * 5;
maxLife = 400;
life = maxLife;
slowTimer = 0;
origWidth = _width;
this.swapDepths(2);
yspeed = 60;
exploded = false;
smokeTime = 0;
hitTime = 0;
skidPlaying = false;
rev = true;
revLength = 0;
explodeTimer = 10;
colorArr = ["0x339999", "0x99CC66", "0x993333", "0xCCCC66"];
}
onClipEvent (enterFrame) {
if (_root.hud.speed >= 200) {
skidActive = true;
}
if (Key.isDown(40)) {
}
if (skidActive == true) {
if (Key.isDown(40)) {
} else {
skidActive = false;
}
}
if ((skidActive == true) && (_root.hud.speed <= 30)) {
_root.skidDone = true;
}
if (_root.game.cars.hitTest((_x * (1 / (100 / _root.game._xscale))) + _root.game._x, (_y * (1 / (100 / _root.game._yscale))) + _root.game._y, true) && (yspeed > 30)) {
hitTime = hitTime + 1;
} else if (hitTime > 0) {
hitTime = 0;
} else {
hitTime = 0;
}
if (yspeed < 0) {
yspeed = yspeed - (yspeed / 2);
}
if ((yspeed / 5) < 3.5) {
var turnSpeed = (yspeed / 5);
} else {
turnSpeed = 3.5;
}
if ((_root.gocar && (yspeed < maxSpeed)) && (life > 0)) {
}
if ((Key.isDown(38) && (yspeed < maxSpeed)) && (life > 0)) {
yspeed = yspeed + 0.8;
}
if ((Key.isDown(32) && (yspeed > 0)) && (life > 0)) {
_root.pressspace = true;
} else {
if (turnSpeed > 3.5) {
turnSpeed = turnSpeed - 0.1;
}
skidPlaying = false;
skidSound.stop();
}
if (Key.isDown(39) && (life > 0)) {
xspeed = xspeed + turnSpeed;
}
if (Key.isDown(37) && (life > 0)) {
xspeed = xspeed - turnSpeed;
}
_rotation = (xspeed / 2);
xspeed = xspeed * 0.8;
_x = (_x + xspeed);
yspeed = yspeed * 0.99;
showx = _x;
showy = _y;
if (life < 0) {
explodeTimer = explodeTimer + 1;
}
if ((life < 0) && (explodeTimer > 20)) {
explodeTimer = 0;
exploded = true;
_root.id = _root.id + 1;
_root.game.expTargetX = _x;
_root.game.expTargetY = _y;
_root.game.expSize = _height;
_root.game.expSize = _height;
duplicateMovieClip (_root.game.explosion, "explosion" + _root.id, _root.id + 1);
_root.game["explosion" + _root.id]._x = _x;
_root.game["explosion" + _root.id]._y = _y;
_root.game["explosion" + _root.id]._height = _root.game.expSize / 3;
_root.game["explosion" + _root.id]._width = _root.game.expSize / 3;
_root.game["explosion" + _root.id].sizeE = _root.game.expSize * 2;
}
if (life < 40) {
smokeTime = smokeTime + (yspeed / 5);
if (smokeTime > 5) {
_root.game.effects.id = _root.game.effects.id + 1;
duplicateMovieClip (_parent.effects.smoke, "spark" + _parent.effects.id, _parent.effects.id + 1);
_root.game.effects["spark" + _root.game.effects.id]._x = _x;
_root.game.effects["spark" + _root.game.effects.id]._y = _y - (_height / 2);
_root.game.effects["spark" + _root.game.effects.id]._height = _root.game.effects["spark" + _root.game.effects.id]._height + yspeed;
_root.game.effects["spark" + _root.game.effects.id].xspeed = _root.game.effects["spark" + _root.game.effects.id].xspeed + xspeed;
_root.game.effects["spark" + _root.game.effects.id].yspeed = yspeed;
_root.game.effects.id = _root.game.effects.id + 1;
smokeTime = 0;
}
}
var target = _parent.walls;
if ((target.hitTest((_x * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y - (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true) || (target.hitTest(((_x + (_width / 3)) * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y - (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true))) || (target.hitTest(((_x - (_width / 3)) * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y - (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true))) {
if (yspeed > 0) {
life = life - yspeed;
} else {
life = life + yspeed;
}
yspeed = (-yspeed) * 1;
}
if (target.hitTest((_x * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y + (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true) && (yspeed + _root.game.player.yspeed)) {
if (yspeed > 0) {
life = life - yspeed;
} else {
life = life + yspeed;
}
_y = (_y - yspeed);
yspeed = (-yspeed) * 1;
}
if (target.hitTest(((_x - (_width / 2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, (_y * (1 / (100 / _root.game._yscale))) + _root.game._y, true) && (xspeed < 0)) {
_x = (_x - xspeed);
xspeed = (-xspeed) * 0.2;
var sparkNo = ((yspeed / 5) - 2);
life = life - (sparkNo / 5);
i = 0;
while (i < sparkNo) {
_root.game.effects.id = _root.game.effects.id + 1;
duplicateMovieClip (_root.game.effects.spark, "spark" + _root.game.effects.id, _root.game.effects.id + 1);
_root.game.effects["spark" + _root.game.effects.id]._x = (_x - (_width / 2)) + random(_width / 3);
_root.game.effects["spark" + _root.game.effects.id]._y = (_y - (_height / 2)) + random(_height);
_root.game.effects["spark" + _root.game.effects.id].xspeed = _root.game.effects["spark" + _root.game.effects.id].xspeed + xspeed;
_root.game.effects["spark" + _root.game.effects.id].yspeed = _root.game.effects["spark" + _root.game.effects.id].yspeed + (yspeed * 2);
i = i + 1;
}
i = 0;
while (i < (sparkNo / 4)) {
_root.game.effects.id = _root.game.effects.id + 1;
duplicateMovieClip (_root.game.effects.paint, "spark" + _root.game.effects.id, _root.game.effects.id + 1);
_root.game.effects["spark" + _root.game.effects.id]._x = (_x - (_width / 2)) + random(_width / 3);
_root.game.effects["spark" + _root.game.effects.id]._y = (_y - (_height / 2)) + random(_height);
_root.game.effects["spark" + _root.game.effects.id].xspeed = _root.game.effects["spark" + _root.game.effects.id].xspeed + xspeed;
_root.game.effects["spark" + _root.game.effects.id].yspeed = yspeed * 1.5;
i = i + 1;
}
}
if (target.hitTest(((_x + (_width / 2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, (_y * (1 / (100 / _root.game._yscale))) + _root.game._y, true) && (xspeed > 0)) {
_x = (_x - xspeed);
xspeed = (-xspeed) * 0.2;
var sparkNo = ((yspeed / 5) - 2);
life = life - (sparkNo / 5);
i = 0;
while (i < sparkNo) {
_root.game.effects.id = _root.game.effects.id + 1;
duplicateMovieClip (_root.game.effects.spark, "spark" + _root.game.effects.id, _parent.effects.id + 1);
var pColor = new Color(_root.game.effects["spark" + _root.game.effects.id]);
_root.game.effects["spark" + _root.game.effects.id]._x = (_x + (_width / 2)) - random(_width / 3);
_root.game.effects["spark" + _root.game.effects.id]._y = (_y - (_height / 2)) + random(_height);
_root.game.effects["spark" + _root.game.effects.id].xspeed = _root.game.effects["spark" + _root.game.effects.id].xspeed + xspeed;
_root.game.effects["spark" + _root.game.effects.id].yspeed = _root.game.effects["spark" + _root.game.effects.id].yspeed + (yspeed * 2);
i = i + 1;
}
i = 0;
while (i < (sparkNo / 4)) {
_root.game.effects.id = _root.game.effects.id + 1;
duplicateMovieClip (_root.game.effects.paint, "spark" + _root.game.effects.id, _parent.effects.id + 1);
_root.game.effects["spark" + _root.game.effects.id]._x = (_x + (_width / 2)) - random(_width / 3);
_root.game.effects["spark" + _root.game.effects.id]._y = (_y - (_height / 2)) + random(_height);
_root.game.effects["spark" + _root.game.effects.id].xspeed = _root.game.effects["spark" + _root.game.effects.id].xspeed + xspeed;
_root.game.effects["spark" + _root.game.effects.id].yspeed = yspeed * 1.5;
i = i + 1;
}
}
if (_root.game.slower.hitTest((_x * (1 / (100 / _root.game._xscale))) + _root.game._x, (_y * (1 / (100 / _root.game._yscale))) + _root.game._y, true)) {
if ((_x * (1 / (100 / _root.game._xscale))) < 0) {
_root.pavementTime = _root.pavementTime + 1;
}
if (slowTimer < 20) {
slowTimer = slowTimer + 1;
} else {
yspeed = yspeed * 0.98;
}
} else if (slowTimer > 0) {
slowTimer = slowTimer - 1;
}
if (_root.game.sound.type == 2) {
var dist = Math.sqrt(((_x - _root.game.sound._x) * (_x - _root.game.sound._x)) + ((_y - _root.game.sound._y) * (_y - _root.game.sound._y)));
if (dist < 300) {
interestX = _root.game.sound._x;
interestY = _root.game.sound._y;
interestLevel = interestLevel + 50;
}
if (dist < (_root.game.sound.size * 2)) {
life = life - (((_root.game.sound.size * 2) - dist) / 50);
var adjside = (_root.game.sound._x - _x);
var oppside = (-1 * (_root.game.sound._y - _y));
var angle = Math.atan2(oppside, adjside);
angle = (angle / 3.141593) * 180;
var throwRot = (-1 * angle);
xspeed = xspeed - (Math.cos(throwRot * 0.01745329) * (((_root.game.sound.size * 2) - dist) / (5 * mass)));
yspeed = yspeed + (Math.sin(throwRot * 0.01745329) * (((_root.game.sound.size * 2) - dist) / (5 * mass)));
}
}
}
Instance of Symbol 598 MovieClip "gun" in Symbol 934 MovieClip Frame 1
onClipEvent (load) {
targetC = _parent.targetShow;
}
onClipEvent (enterFrame) {
if (_root.pressspace == true) {
_root.pressspace = false;
if (_root.reloadComplete == true) {
_root.reloadComplete = false;
_root.bulletmc = _parent.attachMovie("bullet", "bullet" + _root.bulletnum, _root.getNextHighestDepth());
randomNum = random(20) - 10;
bulletAngle = (((_rotation + randomNum) - 90) * Math.PI) / 180;
_root.bulletmc.xSpeed = Math.cos(_root.gunangles) * 10;
_root.bulletmc.ySpeed = Math.sin(_root.gunangles) * 10;
_root.bulletmc._x = _root.game.gun._x;
_root.bulletmc._y = _root.game.gun._y;
_root.bspeed = 10;
_root.bulletnum++;
}
}
if ((_root.hud.targetDisplay.pDist < 1) && (_root.nextCar == false)) {
_alpha = 0;
} else {
_alpha = 0;
}
_x = _root.game.player._x;
this.swapDepths(_root.game.getNextHighestDepth());
var adjside = (targetC._x - _x);
var oppside = (-1 * (targetC._y - _y));
var angle = Math.atan2(oppside, adjside);
angle = (angle / 3.141593) * 180;
_root.gunangles = angle;
if (angle > 0) {
}
}
Instance of Symbol 619 MovieClip "effects" in Symbol 934 MovieClip Frame 1
onClipEvent (load) {
id = 0;
}
onClipEvent (enterFrame) {
this.swapDepths(300);
if (id > 50) {
id = 0;
}
}
Instance of Symbol 632 MovieClip "explosion" in Symbol 934 MovieClip Frame 1
onClipEvent (load) {
var sizeE;
if ((_x - _root.game.player._x) > 100) {
pan = 100;
} else if ((_x - _root.game.player._x) < -100) {
pan = -100;
} else {
pan = _x - _root.game.player._x;
}
vol = 100 - (Math.sqrt(((_x - _root.game.player._x) * (_x - _root.game.player._x)) + ((_y - _root.game.player._y) * (_y - _root.game.player._y))) / 10);
if (vol > 100) {
vol = 100;
}
if (vol < 0) {
vol = 0;
}
if (_name == "explosion") {
_visible = false;
} else {
explosionSound = new Sound(this);
explosionSound.attachSound("explosion");
explosionSound.setPan(pan);
explosionSound.setVolume(vol);
explosionSound.start(0, 0);
explosionSound.setPan(pan);
explosionSound.setVolume(vol);
}
time = 100;
}
onClipEvent (enterFrame) {
_y = (_y + _root.game.player.yspeed);
if ((_x - _root.game.player._x) > 100) {
pan = 100;
} else if ((_x - _root.game.player._x) < -100) {
pan = -100;
} else {
pan = _x - _root.game.player._x;
}
vol = 100 - (Math.sqrt(((_x - _root.game.player._x) * (_x - _root.game.player._x)) + ((_y - _root.game.player._y) * (_y - _root.game.player._y))) / 10);
if (vol > 100) {
vol = 100;
}
if (vol < 0) {
vol = 0;
}
explosionSound.setPan(pan);
explosionSound.setVolume(vol);
}
Instance of Symbol 619 MovieClip "effects2" in Symbol 934 MovieClip Frame 1
onClipEvent (load) {
id = 0;
_x = 0;
_y = 0;
}
onClipEvent (enterFrame) {
this.swapDepths(1);
if (id > 50) {
id = 0;
}
}
Instance of Symbol 634 MovieClip in Symbol 934 MovieClip Frame 1
onClipEvent (enterFrame) {
this._alpha = 0;
this.swapDepths(1001);
}
Instance of Symbol 646 MovieClip in Symbol 934 MovieClip Frame 1
onClipEvent (load) {
targetC = _parent.targetShow;
}
onClipEvent (enterFrame) {
if ((_root.hud.targetDisplay.pDist < 1) && (_root.nextCar == false)) {
_alpha = 100;
} else {
_alpha = 0;
}
_x = _root.game.player._x;
this.swapDepths(_root.game.getNextHighestDepth());
var adjside = (targetC._x - _x);
var oppside = (-1 * (targetC._y - _y));
var angle = Math.atan2(oppside, adjside);
angle = (angle / 3.141593) * 180;
_rotation = (-1 * angle);
}
Instance of Symbol 942 MovieClip in Symbol 946 MovieClip Frame 1
onClipEvent (load) {
origY = _y;
}
onClipEvent (enterFrame) {
_y = (_y + _root.game.player.yspeed);
if (_y > (origY + 1275)) {
_y = origY;
}
}
Instance of Symbol 945 MovieClip in Symbol 946 MovieClip Frame 1
onClipEvent (load) {
origY = _y;
}
onClipEvent (enterFrame) {
_y = (_y + _root.game.player.yspeed);
if (_y > (origY + 1275)) {
_y = origY;
}
}
Symbol 947 MovieClip Frame 1
maxLife = 600;
life = maxLife;
stop();
maxSpeed = 70;
stop();
Instance of Symbol 595 MovieClip in Symbol 947 MovieClip Frame 1
onClipEvent (enterFrame) {
gotoAndStop(_totalframes - Math.round(_parent.life / (_parent.maxLife / _totalframes)));
}
Symbol 947 MovieClip Frame 2
stop();
Symbol 947 MovieClip Frame 3
maxLife = 1000;
life = maxLife;
maxSpeed = 50;
stop();
Symbol 947 MovieClip Frame 4
gotoAndStop (1);
Symbol 947 MovieClip Frame 5
stop();
Symbol 949 MovieClip Frame 1
_root.sirensnd.start();
_root.sirensnd.setVolume(30);
_root.sirensnd.onSoundComplete = function () {
_root.sirensnd.start();
};
Instance of Symbol 939 MovieClip "track" in Symbol 949 MovieClip Frame 1
onClipEvent (load) {
startY = _y;
_root.newscorevar = 0;
_root.scorecoinhit = false;
}
onClipEvent (enterFrame) {
_y = (_y + _parent.player.yspeed);
_parent.scorecoin._y = _parent.scorecoin._y + _parent.player.yspeed;
if ((_y + _parent.player.yspeed) > (startY + 325)) {
_y = startY;
}
if (_parent.scorecoin._y > 3333) {
_root.scorecoinhit = false;
_parent.scorecoin._x = _parent["lane" + (1 + random(4))]._x;
_parent.scorecoin._y = -2000;
}
if (_parent.scorecoin.hitTest(_root.game.player) && (_root.scorecoinhit == false)) {
_root.newscorevar = _root.newscorevar + 100;
_parent.scorecoin.gotoAndPlay(2);
_root.scorecoinhit = true;
}
}
Instance of Symbol 534 MovieClip "lane1" in Symbol 949 MovieClip Frame 1
onClipEvent (load) {
maxSpeed = 35;
targetX = _x;
id = 1;
}
Instance of Symbol 534 MovieClip "lane2" in Symbol 949 MovieClip Frame 1
onClipEvent (load) {
maxSpeed = 30;
targetX = _x;
id = 2;
}
Instance of Symbol 534 MovieClip "lane3" in Symbol 949 MovieClip Frame 1
onClipEvent (load) {
maxSpeed = 25;
targetX = _x;
id = 3;
}
Instance of Symbol 534 MovieClip "lane4" in Symbol 949 MovieClip Frame 1
onClipEvent (load) {
maxSpeed = 20;
targetX = _x;
id = 4;
}
Instance of Symbol 536 MovieClip "slower" in Symbol 949 MovieClip Frame 1
onClipEvent (load) {
_alpha = 0;
}
Instance of Symbol 946 MovieClip "walls" in Symbol 949 MovieClip Frame 1
onClipEvent (load) {
xspeed = 0;
yspeed = 0;
mass = 1000;
}
onClipEvent (enterFrame) {
xspeed = 0;
yspeed = 0;
}
Instance of Symbol 564 MovieClip "car" in Symbol 949 MovieClip Frame 1
onClipEvent (load) {
this.nofhittimes = 0;
var lane;
var laneId;
var truckLikely = (1 + random(10));
if (truckLikely == 5) {
gotoAndStop(1 + random(4));
} else {
gotoAndStop(1 + random(3));
}
startY = _y;
yspeed = 0;
xspeed = 0;
hitTimes = 0;
spin = 0;
sironBool = false;
targetX = lane.targetX;
if (_x > 0) {
up = false;
_rotation = (_rotation + 180);
yspeed = -lane.maxSpeed;
maxSpeed = lane.maxSpeed;
} else {
up = true;
_rotation = 0;
yspeed = lane.maxSpeed;
maxSpeed = lane.maxSpeed;
}
life = 100;
target = _parent.player;
mass = (_height + _width) / 33;
exploded = false;
timerSmoke = 0;
sparkNo = 0;
var targetCar;
messageShown = false;
engineStarted = false;
playerHitted = false;
sDiff = 0;
deadCar = false;
_root.targetcarinload = true;
}
onClipEvent (enterFrame) {
function hitSounds() {
var _local2 = 1 + random(3);
hitSound = new Sound(this);
if (_local2 == 1) {
hitSound.attachSound("hit1");
} else if (_local2 == 2) {
hitSound.attachSound("hit2");
} else {
hitSound.attachSound("hit3");
}
hitSound.setVolume(sparkNo * 5);
hitSound.start(0, 0);
}
if (_root.targetsLeft <= 0) {
}
if (targetCar == true) {
_root.game.targetShow._x = _x;
_root.game.targetShow._y = _y;
_root.game.targetShow.play();
lane = _root.game.lane1;
targetX = lane.targetX;
maxSpeed = lane.maxSpeed;
if (!sironBool) {
sironSound = new Sound(this);
sironSound.attachSound("siron");
sironSound.start(0, 100);
sironBool = true;
}
sironSound.setVolume(100);
if ((life < 1) && (messageShown == false)) {
_root.score = _root.score + 1000;
if (_root.targetsLeft == 0) {
_root.extraCar = true;
}
sironSound.stop();
_root.targetsLeft = _root.targetsLeft - 1;
messageShown = true;
targetCar = false;
_root.game.targetShow._x = -2000;
deadCar = true;
}
} else if ((life < 1) && (deadCar != true)) {
_root.carsBlownUp = _root.carsBlownUp + 1;
if (_currentframe == 4) {
_root.trucksKilled = _root.trucksKilled + 1;
}
deadCar = true;
}
if (_name != "car") {
_parent.showMc._x = _x;
_parent.showMc._y = passY;
i = 0;
while (i < (_root.maxCars + 2)) {
if (_root.game["car" + i]._x != undefined) {
bullettarget = _root.game["car" + i];
if (_root.game["car" + i] != this) {
target = _root.game["car" + i];
} else {
target = _parent.player;
}
if (bullettarget.hitTest(_root.bulletmc)) {
bullettarget.ene.hhh.gotoAndStop(2);
_root.reloadComplete = true;
removeMovieClip(_root.bulletmc);
} else if (_root.game.car.hitTest(_root.bulletmc)) {
this.ene.hhh.gotoAndStop(2);
_root.reloadComplete = true;
removeMovieClip(_root.bulletmc);
}
var adjside = (target._x - _x);
var oppside = (-1 * (target._y - _y));
var dist = Math.sqrt((adjside * adjside) + (oppside * oppside));
var distMax = (_height + (target._height / 2));
if (dist < distMax) {
if ((target.hitTest((_x * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y - (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true) || (target.hitTest(((_x + (_width / 2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y - (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true))) || (target.hitTest(((_x - (_width / 2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y - (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true))) {
_root.cardashsnd.start();
xspeed = xspeed + (((_x - target._x) / 40) + (target.xspeed / 5));
if ((target._x > (_x - ((_width / 2) + (target._width / 2.2)))) && (target._x < (_x + ((_width / 2) + (target._width / 2.2))))) {
var s1 = yspeed;
var s2 = target.yspeed;
var sDiff = 0;
if (((s1 < 0) && (s2 >= 0)) || ((s2 < 0) && (s1 >= 0))) {
if (s1 < 0) {
var sDiff = (s2 - s1);
} else {
var sDiff = (s1 - s2);
}
} else if ((s1 >= 0) && (s2 >= 0)) {
if (s1 > s2) {
var sDiff = (s1 - s2);
} else {
var sDiff = (s2 - s1);
}
} else {
var sDiff = (s1 - s2);
}
if (sDiff < 0) {
sDiff = -sDiff;
}
if (sDiff > 6) {
sDiff = sDiff - 5;
life = life - (((sDiff * 12) / mass) / 2);
target.life = target.life - (((sDiff * 12) / mass) / 4);
sparkNo = sDiff;
}
if (sDiff > 3) {
hitSounds();
}
if (((target == _parent.player) && (targetCar == false)) && (life > 1)) {
_parent.player.hitTime = 0;
playerHitted = true;
} else if ((target != _parent.player) && (targetCar == false)) {
playerHitted = false;
}
i == 0;
while (i < sparkNo) {
_root.game.effects.id = _root.game.effects.id + 1;
duplicateMovieClip (_parent.effects.spark, "spark" + _parent.effects.id, _parent.effects.id + 1);
_root.game.effects["spark" + _root.game.effects.id]._x = (_x - (_width / 2)) + random(_width);
_root.game.effects["spark" + _root.game.effects.id]._y = (_y - (_height / 2)) + random(_height / 2);
_root.game.effects["spark" + _root.game.effects.id].xspeed = _root.game.effects["spark" + _root.game.effects.id].xspeed + 5;
_root.game.effects["spark" + _root.game.effects.id].yspeed = _root.game.effects["spark" + _root.game.effects.id].yspeed + (yspeed * 2);
i = i + 1;
}
maxSpeed = maxSpeed - random(2);
var v1 = yspeed;
var m1 = mass;
var v2 = target.yspeed;
var m2 = target.mass;
var newV1 = ((((m1 - m2) / (m1 + m2)) * v1) + (((2 * m2) / (m1 + m2)) * v2));
var newV2 = ((((2 * m1) / (m1 + m2)) * v1) - (((m1 - m2) / (m1 + m2)) * v2));
if ((_y > target._y) && (newV1 < v1)) {
yspeed = newV1;
target.yspeed = newV2;
}
}
}
if ((target.hitTest((_x * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y + (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true) || (target.hitTest(((_x + (_width / 2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y + (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true))) || (target.hitTest(((_x - (_width / 2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y + (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true))) {
_root.cardashsnd.start();
xspeed = xspeed + (((_x - target._x) / 40) + (target.xspeed / 5));
if ((target._x > (_x - ((_width / 2) + (target._width / 2)))) && (target._x < (_x + ((_width / 2) + (target._width / 2))))) {
var s1 = yspeed;
var s2 = target.yspeed;
var sDiff = 0;
if (((s1 < 0) && (s2 >= 0)) || ((s2 < 0) && (s1 >= 0))) {
if (s1 < 0) {
var sDiff = (s2 - s1);
} else {
var sDiff = (s1 - s2);
}
} else if ((s1 >= 0) && (s2 >= 0)) {
if (s1 > s2) {
var sDiff = (s1 - s2);
} else {
var sDiff = (s2 - s1);
}
} else {
var sDiff = (s1 - s2);
}
if (sDiff < 0) {
sDiff = -sDiff;
}
if (sDiff > 6) {
sDiff = sDiff - 5;
life = life - (((sDiff * 12) / mass) / 2);
target.life = target.life - (((sDiff * 12) / mass) / 4);
sparkNo = sDiff;
}
if (sDiff > 3) {
hitSounds();
}
if (((target == _parent.player) && (targetCar == false)) && (life > 1)) {
_parent.player.hitTime = 0;
playerHitted = true;
} else if ((target != _parent.player) && (targetCar == false)) {
playerHitted = false;
}
i == 0;
while (i < sparkNo) {
_root.game.effects.id = _root.game.effects.id + 1;
duplicateMovieClip (_parent.effects.spark, "spark" + _parent.effects.id, _parent.effects.id + 1);
_root.game.effects["spark" + _root.game.effects.id]._x = (_x - (_width / 2)) + random(_width);
_root.game.effects["spark" + _root.game.effects.id]._y = (_y + (_height / 2)) - random(_height / 2);
_root.game.effects["spark" + _root.game.effects.id].xspeed = _root.game.effects["spark" + _root.game.effects.id].xspeed + 5;
_root.game.effects["spark" + _root.game.effects.id].yspeed = _root.game.effects["spark" + _root.game.effects.id].yspeed + (yspeed * 2);
i = i + 1;
}
var v1 = yspeed;
var m1 = mass;
var v2 = target.yspeed;
var m2 = target.mass;
var newV1 = ((((m1 - m2) / (m1 + m2)) * v1) + (((2 * m2) / (m1 + m2)) * v2));
var newV2 = ((((2 * m1) / (m1 + m2)) * v1) - (((m1 - m2) / (m1 + m2)) * v2));
if ((_y < target._y) && (newV1 > v1)) {
yspeed = newV1;
target.yspeed = newV2;
}
maxSpeed = maxSpeed + random(2);
}
}
if (((target.hitTest(((_x - (_width / 2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, (_y * (1 / (100 / _root.game._yscale))) + _root.game._y, true) || (target.hitTest(((_x + (_width / 2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, (_y * (1 / (100 / _root.game._yscale))) + _root.game._y, true))) || (target.hitTest(((_x - (_width / 2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y + (_height / 3)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true))) || (target.hitTest(((_x + (_width / 2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y + (height / 3)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true))) {
var speedDiff = ((xspeed - target.xspeed) + (yspeed - target.yspeed));
if (speedDiff > 0) {
var sparkNo = speedDiff;
} else {
var sparkNo = (-speedDiff);
}
hitTimes = hitTimes + 1;
var v1 = xspeed;
var m1 = mass;
var v2 = target.xspeed;
var m2 = target.mass;
var newV1 = ((((m1 - m2) / (m1 + m2)) * v1) + (((2 * m2) / (m1 + m2)) * v2));
var newV2 = ((((2 * m1) / (m1 + m2)) * v1) - (((m1 - m2) / (m1 + m2)) * v2));
if (((target == _parent.player) && (targetCar == false)) && (life > 1)) {
_parent.player.hitTime = 0;
playerHitted = true;
} else if ((target != _parent.player) && (targetCar == false)) {
playerHitted = false;
}
if ((_x > target._x) && (newV1 > v1)) {
i = 0;
while (i < sparkNo) {
_root.game.effects.id = _root.game.effects.id + 1;
duplicateMovieClip (_parent.effects.spark, "spark" + _parent.effects.id, _parent.effects.id + 1);
_root.game.effects["spark" + _root.game.effects.id]._x = (_x - (_width / 2)) + random(_width / 3);
_root.game.effects["spark" + _root.game.effects.id]._y = (_y - (_height / 2)) + random(_height);
_root.game.effects["spark" + _root.game.effects.id].xspeed = _root.game.effects["spark" + _root.game.effects.id].xspeed + xspeed;
_root.game.effects["spark" + _root.game.effects.id].yspeed = _root.game.effects["spark" + _root.game.effects.id].yspeed + (yspeed * 2);
i = i + 1;
}
xspeed = newV1;
target.xspeed = newV2;
}
if ((_x < target._x) && (newV1 < v1)) {
i = 0;
while (i < sparkNo) {
_root.game.effects.id = _root.game.effects.id + 1;
duplicateMovieClip (_parent.effects.spark, "spark" + _parent.effects.id, _parent.effects.id + 1);
_root.game.effects["spark" + _root.game.effects.id]._x = (_x + (_width / 2)) - random(_width / 3);
_root.game.effects["spark" + _root.game.effects.id]._y = (_y - (_height / 2)) + random(_height);
_root.game.effects["spark" + _root.game.effects.id].xspeed = _root.game.effects["spark" + _root.game.effects.id].xspeed + xspeed;
_root.game.effects["spark" + _root.game.effects.id].yspeed = _root.game.effects["spark" + _root.game.effects.id].yspeed + (yspeed * 2);
i = i + 1;
}
xspeed = newV1;
target.xspeed = newV2;
}
life = life - (((sparkNo * 12) / mass) / 8);
}
}
}
i = i + 1;
}
var target = _parent.walls;
if ((target.hitTest((_x * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y - (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true) || (target.hitTest(((_x + (_width / 2.4)) * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y - (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true))) || (target.hitTest(((_x - (_width / 2.4)) * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y - (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true))) {
if (yspeed > 0) {
var sparkNo = yspeed;
}
if (yspeed < 0) {
var sparkNo = (-yspeed);
}
hitSounds();
i = 0;
while (i < (sparkNo / 4)) {
_root.game.effects.id = _root.game.effects.id + 1;
duplicateMovieClip (_parent.effects.spark, "spark" + _parent.effects.id, _parent.effects.id + 1);
_root.game.effects["spark" + _root.game.effects.id]._x = (_x + (_width / 2)) - random(_width / 3);
_root.game.effects["spark" + _root.game.effects.id]._y = (_y - (_height / 2)) + random(_height);
_root.game.effects["spark" + _root.game.effects.id].xspeed = _root.game.effects["spark" + _root.game.effects.id].xspeed + xspeed;
_root.game.effects["spark" + _root.game.effects.id].yspeed = _root.game.effects["spark" + _root.game.effects.id].yspeed + (yspeed * 2);
i = i + 1;
}
life = life - (((sparkNo * 12) / mass) / 2);
yspeed = (-yspeed) * 0.5;
}
if ((target.hitTest((_x * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y + (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true) || (target.hitTest(((_x + (_width / 2.2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y + (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true))) || (target.hitTest(((_x - (_width / 2.2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y + (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true))) {
var s1 = yspeed;
var s2 = target.yspeed;
var sDiff = 0;
if (((s1 < 0) && (s2 >= 0)) || ((s2 < 0) && (s1 >= 0))) {
if (s1 < 0) {
sDiff = s2 - s1;
} else {
sDiff = s1 - s2;
}
} else if ((s1 >= 0) && (s2 >= 0)) {
if (s1 > s2) {
sDiff = s1 - s2;
} else {
sDiff = s2 - s1;
}
} else {
sDiff = s1 - s2;
}
if (sDiff < 0) {
sDiff = -sDiff;
}
sparksNo = sDiff;
hitSounds();
i = 0;
while (i < (sparkNo / 4)) {
hitSounds();
_root.game.effects.id = _root.game.effects.id + 1;
duplicateMovieClip (_parent.effects.spark, "spark" + _parent.effects.id, _parent.effects.id + 1);
_root.game.effects["spark" + _root.game.effects.id]._x = (_x + (_width / 2)) - random(_width / 3);
_root.game.effects["spark" + _root.game.effects.id]._y = (_y - (_height / 2)) + random(_height);
_root.game.effects["spark" + _root.game.effects.id].xspeed = _root.game.effects["spark" + _root.game.effects.id].xspeed + xspeed;
_root.game.effects["spark" + _root.game.effects.id].yspeed = _root.game.effects["spark" + _root.game.effects.id].yspeed + (yspeed * 2);
i = i + 1;
}
life = life - (((sparkNo * 12) / mass) / 2);
yspeed = (-yspeed) * 0.5;
}
if (target.hitTest(((_x - (_width / 2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, (_y * (1 / (100 / _root.game._yscale))) + _root.game._y, true)) {
_x = (_x - (xspeed / 3));
xspeed = (-xspeed) * 0.2;
if (yspeed > 0) {
var sparkNo = yspeed;
}
if (yspeed < 0) {
var sparkNo = (-yspeed);
}
if ((sparkNo / 4) > 1) {
hitSounds();
}
hitSounds();
i = 0;
while (i < (sparkNo / 4)) {
_root.game.effects.id = _root.game.effects.id + 1;
duplicateMovieClip (_parent.effects.spark, "spark" + _parent.effects.id, _parent.effects.id + 1);
_root.game.effects["spark" + _root.game.effects.id]._x = (_x - (_width / 2)) + random(_width / 3);
_root.game.effects["spark" + _root.game.effects.id]._y = (_y - (_height / 2)) + random(_height);
_root.game.effects["spark" + _root.game.effects.id].xspeed = _root.game.effects["spark" + _root.game.effects.id].xspeed + xspeed;
_root.game.effects["spark" + _root.game.effects.id].yspeed = _root.game.effects["spark" + _root.game.effects.id].yspeed + (yspeed * 2);
i = i + 1;
}
life = life - (((sparkNo * 12) / mass) / 6);
}
if (target.hitTest(((_x + (_width / 2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, (_y * (1 / (100 / _root.game._yscale))) + _root.game._y, true)) {
_x = (_x - (xspeed / 3));
xspeed = (-xspeed) * 0.2;
if (yspeed > 0) {
var sparkNo = yspeed;
}
if (yspeed < 0) {
var sparkNo = (-yspeed);
}
if ((sparkNo / 4) > 1) {
hitSounds();
}
i = 0;
while (i < (sparkNo / 4)) {
_root.game.effects.id = _root.game.effects.id + 1;
duplicateMovieClip (_parent.effects.spark, "spark" + _parent.effects.id, _parent.effects.id + 1);
_root.game.effects["spark" + _root.game.effects.id]._x = (_x + (_width / 2)) - random(_width / 3);
_root.game.effects["spark" + _root.game.effects.id]._y = (_y - (_height / 2)) + random(_height);
_root.game.effects["spark" + _root.game.effects.id].xspeed = _root.game.effects["spark" + _root.game.effects.id].xspeed + xspeed;
_root.game.effects["spark" + _root.game.effects.id].yspeed = _root.game.effects["spark" + _root.game.effects.id].yspeed + (yspeed * 2);
i = i + 1;
}
life = life - (((sparkNo * 12) / mass) / 6);
}
if (_root.game.sound.type == 2) {
var dist = Math.sqrt(((_x - _root.game.sound._x) * (_x - _root.game.sound._x)) + ((_y - _root.game.sound._y) * (_y - _root.game.sound._y)));
if (dist < 300) {
interestX = _root.game.sound._x;
interestY = _root.game.sound._y;
interestLevel = interestLevel + 50;
}
if (dist < (_root.game.sound.size * 2)) {
life = life - (((_root.game.sound.size * 2) - dist) / 8);
var adjside = (_root.game.sound._x - _x);
var oppside = (-1 * (_root.game.sound._y - _y));
var angle = Math.atan2(oppside, adjside);
angle = (angle / 3.141593) * 180;
var throwRot = (-1 * angle);
xspeed = xspeed - (Math.cos(throwRot * 0.01745329) * (((_root.game.sound.size * 2) - dist) / (10 * mass)));
yspeed = yspeed + (Math.sin(throwRot * 0.01745329) * (((_root.game.sound.size * 2) - dist) / (10 * mass)));
}
}
if ((life < -75) && (exploded == false)) {
trace(_name);
exploded = true;
_root.id = _root.id + 1;
_root.game.expTargetX = _x;
_root.game.expTargetY = _y;
_root.game.expSize = _height;
_root.game.expSize = _height;
trace("exp33");
_root.blastsnd.setVolume(20);
_root.blastsnd.start();
duplicateMovieClip (_root.game.explosion, "explosion" + _root.id, _root.id + 300);
_root.game["explosion" + _root.id]._x = _x;
_root.game["explosion" + _root.id]._y = _y;
_root.game["explosion" + _root.id]._height = _root.game.expSize / 2.5;
_root.game["explosion" + _root.id]._width = _root.game.expSize / 2.5;
_root.game["explosion" + _root.id].sizeE = _root.game.expSize * 2;
i = 0;
while (i < 4) {
_root.game.effects2.id = _root.game.effects2.id + 1;
duplicateMovieClip (_parent.effects2.tire, "spark" + _parent.effects2.id, _parent.effects2.id + 1);
_root.game.effects2["spark" + _root.game.effects2.id]._x = _x;
_root.game.effects2["spark" + _root.game.effects2.id]._y = _y;
i = i + 1;
}
}
if ((life < 50) && (life > -75)) {
timerSmoke = timerSmoke + 1;
if (timerSmoke > 1) {
_root.game.effects.id = _root.game.effects.id + 1;
duplicateMovieClip (_parent.effects.smoke, "spark" + _parent.effects.id, _parent.effects.id + 1);
_root.game.effects["spark" + _root.game.effects.id]._x = _x;
_root.game.effects["spark" + _root.game.effects.id]._y = _y;
_root.game.effects["spark" + _root.game.effects.id]._height = _root.game.effects["spark" + _root.game.effects.id]._height + _root.game.player.yspeed;
_root.game.effects["spark" + _root.game.effects.id].xspeed = _root.game.effects["spark" + _root.game.effects.id].xspeed + xspeed;
_root.game.effects["spark" + _root.game.effects.id].yspeed = _root.game.effects["spark" + _root.game.effects.id].yspeed + (yspeed * 2);
timerSmoke = 0;
}
}
if (life < -75) {
timerSmoke = timerSmoke + 1;
if (timerSmoke > 1) {
_root.game.effects.id = _root.game.effects.id + 1;
duplicateMovieClip (_parent.effects.smoke2, "spark" + _parent.effects.id, _parent.effects.id + 1);
_root.game.effects["spark" + _root.game.effects.id]._x = _x;
_root.game.effects["spark" + _root.game.effects.id]._y = _y;
_root.game.effects["spark" + _root.game.effects.id]._height = _root.game.effects["spark" + _root.game.effects.id]._height + _root.game.player.yspeed;
_root.game.effects["spark" + _root.game.effects.id].xspeed = _root.game.effects["spark" + _root.game.effects.id].xspeed + xspeed;
_root.game.effects["spark" + _root.game.effects.id].yspeed = _root.game.effects["spark" + _root.game.effects.id].yspeed + (yspeed * 2);
timerSmoke = 0;
}
}
if (life > 0) {
if ((_x + xspeed) < targetX) {
xspeed = xspeed + 0.2;
} else if ((_x < targetX) && (xspeed > 0)) {
xspeed = xspeed * 0.97;
}
if ((_x + xspeed) > targetX) {
xspeed = xspeed - 0.2;
}
if ((_x > targetX) && (xspeed < 0)) {
xspeed = xspeed * 0.97;
}
if (up == false) {
if (yspeed > (-maxSpeed)) {
yspeed = yspeed - (maxSpeed / 30);
}
_rotation = (((xspeed * 3) + spin) + 180);
} else {
var laneChange = random(500);
if (laneChange == 10) {
var chooseLane = (1 + random(3));
lane = _root.game["lane" + chooseLane];
targetX = lane.targetX;
maxSpeed = lane.maxSpeed;
}
if (yspeed < maxSpeed) {
yspeed = yspeed + (maxSpeed / 30);
}
_rotation = ((xspeed * 6) / mass);
}
} else {
_rotation = (_rotation + ((xspeed * 10) / mass));
}
if ((life < 0) && (targetCar != true)) {
if (playerHitted == true) {
playerHitted = false;
}
}
if ((_name != "car") && (targetCar != true)) {
if ((_y > 600) || (_y < -1700)) {
_root.carsAlive = _root.carsAlive - 1;
engineSound.stop();
removeMovieClip(this);
}
}
xspeed = xspeed * 0.97;
yspeed = yspeed * 0.97;
showy = _y;
showx = _x;
_x = (_x + xspeed);
_y = (_y - ((-_parent.player.yspeed) + yspeed));
if (targetCar == true) {
_root.game.targetShow._x = _x;
_root.game.targetShow._y = _y;
var pScore = (10 - Math.ceil(life / 10));
if (pScore < 1) {
pScore = 1;
}
_root.game.targetShow.arrowMc.arrowSubMc.gotoAndStop(pScore);
}
}
}
Instance of Symbol 570 MovieClip "targetShow" in Symbol 949 MovieClip Frame 1
onClipEvent (enterFrame) {
this.swapDepths(501);
}
Instance of Symbol 575 MovieClip in Symbol 949 MovieClip Frame 1
onClipEvent (load) {
timer = 0;
spawnTime = 200;
startX = _x;
newLane = none;
oldLane = alsoNone;
lastCar = none;
createCar = true;
targetSpawned = false;
}
onClipEvent (enterFrame) {
if (_root.nextCar == true) {
var amount = (1 + random(4));
_x = _root.game["lane" + amount]._x;
newLane = _root.game["lane" + amount];
} else {
var amount = (1 + random(4));
_x = _root.game["lane" + amount]._x;
newLane = _root.game["lane" + amount];
}
timer = timer + (_root.game.player.yspeed + random(_root.game.player.yspeed / 2));
if (newLane != oldLane) {
if (lastCar._y < (_y + lastCar._height)) {
createCar = false;
} else {
createCar = true;
}
} else {
createCar = false;
}
if ((((timer > spawnTime) && (_root.carsAlive < _root.maxCars)) && (createCar == true)) && (_root.carId != 10)) {
_root.carsAlive = _root.carsAlive + 1;
_root.carId = _root.carId + 1;
if (_root.game["car" + _root.carId]._x == undefined) {
duplicateMovieClip (_parent.car, "car" + _root.carId, _root.carId + 151);
if (_root.nextCar == true) {
_root.game["car" + _root.carId]._x = (_x - 2) + random(4);
_root.game["car" + _root.carId]._y = _y;
_root.game["car" + _root.carId].lane = _root.game["lane" + amount];
_root.game["car" + _root.carId].laneId = 2;
_root.game["car" + _root.carId].targetCar = true;
_root.nextCar = false;
} else {
_root.game["car" + _root.carId]._x = (_x - 2) + random(4);
_root.game["car" + _root.carId]._y = _y;
_root.game["car" + _root.carId].lane = _root.game["lane" + amount];
_root.game["car" + _root.carId].laneId = amount;
_root.game["car" + _root.carId].targetCar = false;
}
lastCar = _root.game["car" + _root.carId];
timer = 0;
}
oldLane = _root.game["lane" + amount];
}
}
Instance of Symbol 576 MovieClip "prop" in Symbol 949 MovieClip Frame 1
onClipEvent (load) {
startY = _y;
yspeed = 0;
xspeed = 0;
hitTimes = 0;
}
onClipEvent (enterFrame) {
if (_parent.player.hitTest((_x * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y + _parent.player.yspeed) * (1 / (100 / _root.game._yscale))) + _root.game._y, true)) {
hitTimes = hitTimes + 1;
if (_currentframe == 1) {
yspeed = yspeed - _parent.player.yspeed;
} else {
yspeed = yspeed - (_parent.player.yspeed * 0.5);
}
xspeed = xspeed + (((_x - _parent.player._x) / 40) + (_parent.player.xspeed / 2));
_parent.player.yspeed = _parent.player.yspeed / 1.01;
gotoAndStop (2);
}
if (hitTimes > 10) {
_root.hud.displayText = "Cone carrying bonus 200 points!";
_root.hud.score = _root.hud.score + 200;
}
var target = _parent.walls;
if (target.hitTest((_x * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y - (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true)) {
yspeed = (-yspeed) * 0.5;
}
if (target.hitTest((_x * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y + (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true) && (yspeed + _root.game.player.yspeed)) {
yspeed = (-yspeed) * 0.5;
}
if (target.hitTest(((_x - (_width / 2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, (_y * (1 / (100 / _root.game._yscale))) + _root.game._y, true) && (xspeed < 0)) {
_x = (_x - xspeed);
xspeed = (-xspeed) * 0.2;
}
if (target.hitTest(((_x + (_width / 2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, (_y * (1 / (100 / _root.game._yscale))) + _root.game._y, true) && (xspeed > 0)) {
_x = (_x - xspeed);
xspeed = (-xspeed) * 0.2;
}
xspeed = xspeed * 0.97;
yspeed = yspeed * 0.97;
showy = _y;
showx = _x;
_rotation = (_rotation + ((xspeed + yspeed) * 4));
_x = (_x + xspeed);
_y = (_y + (_parent.player.yspeed + yspeed));
}
Instance of Symbol 947 MovieClip "player" in Symbol 949 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop (1);
_root.reloadComplete = true;
maxSpeed = 50;
yspeed = 50;
xspeed = 0;
mass = ((_height + _width) / 33) * 5;
maxLife = 400;
life = maxLife;
slowTimer = 0;
origWidth = _width;
this.swapDepths(2);
yspeed = 60;
exploded = false;
smokeTime = 0;
hitTime = 0;
skidPlaying = false;
rev = true;
revLength = 0;
explodeTimer = 10;
colorArr = ["0x339999", "0x99CC66", "0x993333", "0xCCCC66"];
}
onClipEvent (enterFrame) {
if (_root.hud.speed >= 200) {
skidActive = true;
}
if (Key.isDown(40)) {
}
if (skidActive == true) {
if (Key.isDown(40)) {
} else {
skidActive = false;
}
}
if ((skidActive == true) && (_root.hud.speed <= 30)) {
_root.skidDone = true;
}
if (_root.game.cars.hitTest((_x * (1 / (100 / _root.game._xscale))) + _root.game._x, (_y * (1 / (100 / _root.game._yscale))) + _root.game._y, true) && (yspeed > 30)) {
hitTime = hitTime + 1;
} else if (hitTime > 0) {
hitTime = 0;
} else {
hitTime = 0;
}
if (yspeed < 0) {
yspeed = yspeed - (yspeed / 2);
}
if ((yspeed / 5) < 3.5) {
var turnSpeed = (yspeed / 5);
} else {
turnSpeed = 3.5;
}
if ((_root.gocar && (yspeed < maxSpeed)) && (life > 0)) {
}
if ((Key.isDown(38) && (yspeed < maxSpeed)) && (life > 0)) {
yspeed = yspeed + 0.8;
}
if ((Key.isDown(32) && (yspeed > 0)) && (life > 0)) {
_root.pressspace = true;
} else {
if (turnSpeed > 3.5) {
turnSpeed = turnSpeed - 0.1;
}
skidPlaying = false;
skidSound.stop();
}
if (Key.isDown(39) && (life > 0)) {
xspeed = xspeed + turnSpeed;
}
if (Key.isDown(37) && (life > 0)) {
xspeed = xspeed - turnSpeed;
}
_rotation = (xspeed / 2);
xspeed = xspeed * 0.8;
_x = (_x + xspeed);
yspeed = yspeed * 0.99;
showx = _x;
showy = _y;
if (life < 0) {
explodeTimer = explodeTimer + 1;
}
if ((life < 0) && (explodeTimer > 20)) {
explodeTimer = 0;
exploded = true;
_root.id = _root.id + 1;
_root.game.expTargetX = _x;
_root.game.expTargetY = _y;
_root.game.expSize = _height;
_root.game.expSize = _height;
duplicateMovieClip (_root.game.explosion, "explosion" + _root.id, _root.id + 1);
_root.game["explosion" + _root.id]._x = _x;
_root.game["explosion" + _root.id]._y = _y;
_root.game["explosion" + _root.id]._height = _root.game.expSize / 3;
_root.game["explosion" + _root.id]._width = _root.game.expSize / 3;
_root.game["explosion" + _root.id].sizeE = _root.game.expSize * 2;
}
if (life < 40) {
smokeTime = smokeTime + (yspeed / 5);
if (smokeTime > 5) {
_root.game.effects.id = _root.game.effects.id + 1;
duplicateMovieClip (_parent.effects.smoke, "spark" + _parent.effects.id, _parent.effects.id + 1);
_root.game.effects["spark" + _root.game.effects.id]._x = _x;
_root.game.effects["spark" + _root.game.effects.id]._y = _y - (_height / 2);
_root.game.effects["spark" + _root.game.effects.id]._height = _root.game.effects["spark" + _root.game.effects.id]._height + yspeed;
_root.game.effects["spark" + _root.game.effects.id].xspeed = _root.game.effects["spark" + _root.game.effects.id].xspeed + xspeed;
_root.game.effects["spark" + _root.game.effects.id].yspeed = yspeed;
_root.game.effects.id = _root.game.effects.id + 1;
smokeTime = 0;
}
}
var target = _parent.walls;
if ((target.hitTest((_x * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y - (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true) || (target.hitTest(((_x + (_width / 3)) * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y - (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true))) || (target.hitTest(((_x - (_width / 3)) * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y - (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true))) {
if (yspeed > 0) {
life = life - yspeed;
} else {
life = life + yspeed;
}
yspeed = (-yspeed) * 1;
}
if (target.hitTest((_x * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y + (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true) && (yspeed + _root.game.player.yspeed)) {
if (yspeed > 0) {
life = life - yspeed;
} else {
life = life + yspeed;
}
_y = (_y - yspeed);
yspeed = (-yspeed) * 1;
}
if (target.hitTest(((_x - (_width / 2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, (_y * (1 / (100 / _root.game._yscale))) + _root.game._y, true) && (xspeed < 0)) {
_x = (_x - xspeed);
xspeed = (-xspeed) * 0.2;
var sparkNo = ((yspeed / 5) - 2);
life = life - (sparkNo / 5);
i = 0;
while (i < sparkNo) {
_root.game.effects.id = _root.game.effects.id + 1;
duplicateMovieClip (_root.game.effects.spark, "spark" + _root.game.effects.id, _root.game.effects.id + 1);
_root.game.effects["spark" + _root.game.effects.id]._x = (_x - (_width / 2)) + random(_width / 3);
_root.game.effects["spark" + _root.game.effects.id]._y = (_y - (_height / 2)) + random(_height);
_root.game.effects["spark" + _root.game.effects.id].xspeed = _root.game.effects["spark" + _root.game.effects.id].xspeed + xspeed;
_root.game.effects["spark" + _root.game.effects.id].yspeed = _root.game.effects["spark" + _root.game.effects.id].yspeed + (yspeed * 2);
i = i + 1;
}
i = 0;
while (i < (sparkNo / 4)) {
_root.game.effects.id = _root.game.effects.id + 1;
duplicateMovieClip (_root.game.effects.paint, "spark" + _root.game.effects.id, _root.game.effects.id + 1);
_root.game.effects["spark" + _root.game.effects.id]._x = (_x - (_width / 2)) + random(_width / 3);
_root.game.effects["spark" + _root.game.effects.id]._y = (_y - (_height / 2)) + random(_height);
_root.game.effects["spark" + _root.game.effects.id].xspeed = _root.game.effects["spark" + _root.game.effects.id].xspeed + xspeed;
_root.game.effects["spark" + _root.game.effects.id].yspeed = yspeed * 1.5;
i = i + 1;
}
}
if (target.hitTest(((_x + (_width / 2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, (_y * (1 / (100 / _root.game._yscale))) + _root.game._y, true) && (xspeed > 0)) {
_x = (_x - xspeed);
xspeed = (-xspeed) * 0.2;
var sparkNo = ((yspeed / 5) - 2);
life = life - (sparkNo / 5);
i = 0;
while (i < sparkNo) {
_root.game.effects.id = _root.game.effects.id + 1;
duplicateMovieClip (_root.game.effects.spark, "spark" + _root.game.effects.id, _parent.effects.id + 1);
var pColor = new Color(_root.game.effects["spark" + _root.game.effects.id]);
_root.game.effects["spark" + _root.game.effects.id]._x = (_x + (_width / 2)) - random(_width / 3);
_root.game.effects["spark" + _root.game.effects.id]._y = (_y - (_height / 2)) + random(_height);
_root.game.effects["spark" + _root.game.effects.id].xspeed = _root.game.effects["spark" + _root.game.effects.id].xspeed + xspeed;
_root.game.effects["spark" + _root.game.effects.id].yspeed = _root.game.effects["spark" + _root.game.effects.id].yspeed + (yspeed * 2);
i = i + 1;
}
i = 0;
while (i < (sparkNo / 4)) {
_root.game.effects.id = _root.game.effects.id + 1;
duplicateMovieClip (_root.game.effects.paint, "spark" + _root.game.effects.id, _parent.effects.id + 1);
_root.game.effects["spark" + _root.game.effects.id]._x = (_x + (_width / 2)) - random(_width / 3);
_root.game.effects["spark" + _root.game.effects.id]._y = (_y - (_height / 2)) + random(_height);
_root.game.effects["spark" + _root.game.effects.id].xspeed = _root.game.effects["spark" + _root.game.effects.id].xspeed + xspeed;
_root.game.effects["spark" + _root.game.effects.id].yspeed = yspeed * 1.5;
i = i + 1;
}
}
if (_root.game.slower.hitTest((_x * (1 / (100 / _root.game._xscale))) + _root.game._x, (_y * (1 / (100 / _root.game._yscale))) + _root.game._y, true)) {
if ((_x * (1 / (100 / _root.game._xscale))) < 0) {
_root.pavementTime = _root.pavementTime + 1;
}
if (slowTimer < 20) {
slowTimer = slowTimer + 1;
} else {
yspeed = yspeed * 0.98;
}
} else if (slowTimer > 0) {
slowTimer = slowTimer - 1;
}
if (_root.game.sound.type == 2) {
var dist = Math.sqrt(((_x - _root.game.sound._x) * (_x - _root.game.sound._x)) + ((_y - _root.game.sound._y) * (_y - _root.game.sound._y)));
if (dist < 300) {
interestX = _root.game.sound._x;
interestY = _root.game.sound._y;
interestLevel = interestLevel + 50;
}
if (dist < (_root.game.sound.size * 2)) {
life = life - (((_root.game.sound.size * 2) - dist) / 50);
var adjside = (_root.game.sound._x - _x);
var oppside = (-1 * (_root.game.sound._y - _y));
var angle = Math.atan2(oppside, adjside);
angle = (angle / 3.141593) * 180;
var throwRot = (-1 * angle);
xspeed = xspeed - (Math.cos(throwRot * 0.01745329) * (((_root.game.sound.size * 2) - dist) / (5 * mass)));
yspeed = yspeed + (Math.sin(throwRot * 0.01745329) * (((_root.game.sound.size * 2) - dist) / (5 * mass)));
}
}
}
Instance of Symbol 598 MovieClip "gun" in Symbol 949 MovieClip Frame 1
onClipEvent (load) {
targetC = _parent.targetShow;
}
onClipEvent (enterFrame) {
if (_root.pressspace == true) {
_root.pressspace = false;
if (_root.reloadComplete == true) {
_root.reloadComplete = false;
_root.bulletmc = _parent.attachMovie("bullet", "bullet" + _root.bulletnum, _root.getNextHighestDepth());
randomNum = random(20) - 10;
bulletAngle = (((_rotation + randomNum) - 90) * Math.PI) / 180;
_root.bulletmc.xSpeed = Math.cos(_root.gunangles) * 10;
_root.bulletmc.ySpeed = Math.sin(_root.gunangles) * 10;
_root.bulletmc._x = _root.game.gun._x;
_root.bulletmc._y = _root.game.gun._y;
_root.bspeed = 10;
_root.bulletnum++;
}
}
if ((_root.hud.targetDisplay.pDist < 1) && (_root.nextCar == false)) {
_alpha = 0;
} else {
_alpha = 0;
}
_x = _root.game.player._x;
this.swapDepths(_root.game.getNextHighestDepth());
var adjside = (targetC._x - _x);
var oppside = (-1 * (targetC._y - _y));
var angle = Math.atan2(oppside, adjside);
angle = (angle / 3.141593) * 180;
_root.gunangles = angle;
if (angle > 0) {
}
}
Instance of Symbol 619 MovieClip "effects" in Symbol 949 MovieClip Frame 1
onClipEvent (load) {
id = 0;
}
onClipEvent (enterFrame) {
this.swapDepths(300);
if (id > 50) {
id = 0;
}
}
Instance of Symbol 632 MovieClip "explosion" in Symbol 949 MovieClip Frame 1
onClipEvent (load) {
var sizeE;
if ((_x - _root.game.player._x) > 100) {
pan = 100;
} else if ((_x - _root.game.player._x) < -100) {
pan = -100;
} else {
pan = _x - _root.game.player._x;
}
vol = 100 - (Math.sqrt(((_x - _root.game.player._x) * (_x - _root.game.player._x)) + ((_y - _root.game.player._y) * (_y - _root.game.player._y))) / 10);
if (vol > 100) {
vol = 100;
}
if (vol < 0) {
vol = 0;
}
if (_name == "explosion") {
_visible = false;
} else {
explosionSound = new Sound(this);
explosionSound.attachSound("explosion");
explosionSound.setPan(pan);
explosionSound.setVolume(vol);
explosionSound.start(0, 0);
explosionSound.setPan(pan);
explosionSound.setVolume(vol);
}
time = 100;
}
onClipEvent (enterFrame) {
_y = (_y + _root.game.player.yspeed);
if ((_x - _root.game.player._x) > 100) {
pan = 100;
} else if ((_x - _root.game.player._x) < -100) {
pan = -100;
} else {
pan = _x - _root.game.player._x;
}
vol = 100 - (Math.sqrt(((_x - _root.game.player._x) * (_x - _root.game.player._x)) + ((_y - _root.game.player._y) * (_y - _root.game.player._y))) / 10);
if (vol > 100) {
vol = 100;
}
if (vol < 0) {
vol = 0;
}
explosionSound.setPan(pan);
explosionSound.setVolume(vol);
}
Instance of Symbol 619 MovieClip "effects2" in Symbol 949 MovieClip Frame 1
onClipEvent (load) {
id = 0;
_x = 0;
_y = 0;
}
onClipEvent (enterFrame) {
this.swapDepths(1);
if (id > 50) {
id = 0;
}
}
Instance of Symbol 634 MovieClip in Symbol 949 MovieClip Frame 1
onClipEvent (enterFrame) {
this._alpha = 0;
this.swapDepths(1001);
}
Instance of Symbol 646 MovieClip in Symbol 949 MovieClip Frame 1
onClipEvent (load) {
targetC = _parent.targetShow;
}
onClipEvent (enterFrame) {
if ((_root.hud.targetDisplay.pDist < 1) && (_root.nextCar == false)) {
_alpha = 100;
} else {
_alpha = 0;
}
_x = _root.game.player._x;
this.swapDepths(_root.game.getNextHighestDepth());
var adjside = (targetC._x - _x);
var oppside = (-1 * (targetC._y - _y));
var angle = Math.atan2(oppside, adjside);
angle = (angle / 3.141593) * 180;
_rotation = (-1 * angle);
}
Symbol 950 Button
on (release) {
gotoandplaylevel();
}
on (rollOver) {
_root.btnsnd.start();
}
Instance of Symbol 957 MovieClip in Symbol 960 MovieClip Frame 1
onClipEvent (load) {
origY = _y;
}
onClipEvent (enterFrame) {
_y = (_y + _root.game.player.yspeed);
if (_y > (origY + 1275)) {
_y = origY;
}
}
Instance of Symbol 959 MovieClip in Symbol 960 MovieClip Frame 1
onClipEvent (load) {
origY = _y;
}
onClipEvent (enterFrame) {
_y = (_y + _root.game.player.yspeed);
if (_y > (origY + 1275)) {
_y = origY;
}
}
Symbol 961 MovieClip Frame 1
_root.sirensnd.start();
_root.sirensnd.setVolume(30);
_root.sirensnd.onSoundComplete = function () {
_root.sirensnd.start();
};
Instance of Symbol 954 MovieClip "track" in Symbol 961 MovieClip Frame 1
onClipEvent (load) {
startY = _y;
_root.newscorevar = 0;
_root.scorecoinhit = false;
}
onClipEvent (enterFrame) {
_y = (_y + _parent.player.yspeed);
_parent.scorecoin._y = _parent.scorecoin._y + _parent.player.yspeed;
if ((_y + _parent.player.yspeed) > (startY + 325)) {
_y = startY;
}
if (_parent.scorecoin._y > 3333) {
_root.scorecoinhit = false;
_parent.scorecoin._x = _parent["lane" + (1 + random(4))]._x;
_parent.scorecoin._y = -2000;
}
if (_parent.scorecoin.hitTest(_root.game.player) && (_root.scorecoinhit == false)) {
_root.newscorevar = _root.newscorevar + 100;
_parent.scorecoin.gotoAndPlay(2);
_root.scorecoinhit = true;
}
}
Instance of Symbol 534 MovieClip "lane1" in Symbol 961 MovieClip Frame 1
onClipEvent (load) {
maxSpeed = 35;
targetX = _x;
id = 1;
}
Instance of Symbol 534 MovieClip "lane2" in Symbol 961 MovieClip Frame 1
onClipEvent (load) {
maxSpeed = 30;
targetX = _x;
id = 2;
}
Instance of Symbol 534 MovieClip "lane3" in Symbol 961 MovieClip Frame 1
onClipEvent (load) {
maxSpeed = 25;
targetX = _x;
id = 3;
}
Instance of Symbol 534 MovieClip "lane4" in Symbol 961 MovieClip Frame 1
onClipEvent (load) {
maxSpeed = 20;
targetX = _x;
id = 4;
}
Instance of Symbol 536 MovieClip "slower" in Symbol 961 MovieClip Frame 1
onClipEvent (load) {
_alpha = 0;
}
Instance of Symbol 960 MovieClip "walls" in Symbol 961 MovieClip Frame 1
onClipEvent (load) {
xspeed = 0;
yspeed = 0;
mass = 1000;
}
onClipEvent (enterFrame) {
xspeed = 0;
yspeed = 0;
}
Instance of Symbol 564 MovieClip "car" in Symbol 961 MovieClip Frame 1
onClipEvent (load) {
this.nofhittimes = 0;
var lane;
var laneId;
var truckLikely = (1 + random(10));
if (truckLikely == 5) {
gotoAndStop(1 + random(4));
} else {
gotoAndStop(1 + random(3));
}
startY = _y;
yspeed = 0;
xspeed = 0;
hitTimes = 0;
spin = 0;
sironBool = false;
targetX = lane.targetX;
if (_x > 0) {
up = false;
_rotation = (_rotation + 180);
yspeed = -lane.maxSpeed;
maxSpeed = lane.maxSpeed;
} else {
up = true;
_rotation = 0;
yspeed = lane.maxSpeed;
maxSpeed = lane.maxSpeed;
}
life = 100;
target = _parent.player;
mass = (_height + _width) / 33;
exploded = false;
timerSmoke = 0;
sparkNo = 0;
var targetCar;
messageShown = false;
engineStarted = false;
playerHitted = false;
sDiff = 0;
deadCar = false;
_root.targetcarinload = true;
}
onClipEvent (enterFrame) {
function hitSounds() {
var _local2 = 1 + random(3);
hitSound = new Sound(this);
if (_local2 == 1) {
hitSound.attachSound("hit1");
} else if (_local2 == 2) {
hitSound.attachSound("hit2");
} else {
hitSound.attachSound("hit3");
}
hitSound.setVolume(sparkNo * 5);
hitSound.start(0, 0);
}
if (_root.targetsLeft <= 0) {
}
if (targetCar == true) {
_root.game.targetShow._x = _x;
_root.game.targetShow._y = _y;
_root.game.targetShow.play();
lane = _root.game.lane1;
targetX = lane.targetX;
maxSpeed = lane.maxSpeed;
if (!sironBool) {
sironSound = new Sound(this);
sironSound.attachSound("siron");
sironSound.start(0, 100);
sironBool = true;
}
sironSound.setVolume(100);
if ((life < 1) && (messageShown == false)) {
_root.score = _root.score + 1000;
if (_root.targetsLeft == 0) {
_root.extraCar = true;
}
sironSound.stop();
_root.targetsLeft = _root.targetsLeft - 1;
messageShown = true;
targetCar = false;
_root.game.targetShow._x = -2000;
deadCar = true;
}
} else if ((life < 1) && (deadCar != true)) {
_root.carsBlownUp = _root.carsBlownUp + 1;
if (_currentframe == 4) {
_root.trucksKilled = _root.trucksKilled + 1;
}
deadCar = true;
}
if (_name != "car") {
_parent.showMc._x = _x;
_parent.showMc._y = passY;
i = 0;
while (i < (_root.maxCars + 2)) {
if (_root.game["car" + i]._x != undefined) {
bullettarget = _root.game["car" + i];
if (_root.game["car" + i] != this) {
target = _root.game["car" + i];
} else {
target = _parent.player;
}
if (bullettarget.hitTest(_root.bulletmc)) {
bullettarget.ene.hhh.gotoAndStop(2);
_root.reloadComplete = true;
removeMovieClip(_root.bulletmc);
} else if (_root.game.car.hitTest(_root.bulletmc)) {
this.ene.hhh.gotoAndStop(2);
_root.reloadComplete = true;
removeMovieClip(_root.bulletmc);
}
var adjside = (target._x - _x);
var oppside = (-1 * (target._y - _y));
var dist = Math.sqrt((adjside * adjside) + (oppside * oppside));
var distMax = (_height + (target._height / 2));
if (dist < distMax) {
if ((target.hitTest((_x * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y - (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true) || (target.hitTest(((_x + (_width / 2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y - (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true))) || (target.hitTest(((_x - (_width / 2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y - (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true))) {
_root.cardashsnd.start();
xspeed = xspeed + (((_x - target._x) / 40) + (target.xspeed / 5));
if ((target._x > (_x - ((_width / 2) + (target._width / 2.2)))) && (target._x < (_x + ((_width / 2) + (target._width / 2.2))))) {
var s1 = yspeed;
var s2 = target.yspeed;
var sDiff = 0;
if (((s1 < 0) && (s2 >= 0)) || ((s2 < 0) && (s1 >= 0))) {
if (s1 < 0) {
var sDiff = (s2 - s1);
} else {
var sDiff = (s1 - s2);
}
} else if ((s1 >= 0) && (s2 >= 0)) {
if (s1 > s2) {
var sDiff = (s1 - s2);
} else {
var sDiff = (s2 - s1);
}
} else {
var sDiff = (s1 - s2);
}
if (sDiff < 0) {
sDiff = -sDiff;
}
if (sDiff > 6) {
sDiff = sDiff - 5;
life = life - (((sDiff * 12) / mass) / 2);
target.life = target.life - (((sDiff * 12) / mass) / 4);
sparkNo = sDiff;
}
if (sDiff > 3) {
hitSounds();
}
if (((target == _parent.player) && (targetCar == false)) && (life > 1)) {
_parent.player.hitTime = 0;
playerHitted = true;
} else if ((target != _parent.player) && (targetCar == false)) {
playerHitted = false;
}
i == 0;
while (i < sparkNo) {
_root.game.effects.id = _root.game.effects.id + 1;
duplicateMovieClip (_parent.effects.spark, "spark" + _parent.effects.id, _parent.effects.id + 1);
_root.game.effects["spark" + _root.game.effects.id]._x = (_x - (_width / 2)) + random(_width);
_root.game.effects["spark" + _root.game.effects.id]._y = (_y - (_height / 2)) + random(_height / 2);
_root.game.effects["spark" + _root.game.effects.id].xspeed = _root.game.effects["spark" + _root.game.effects.id].xspeed + 5;
_root.game.effects["spark" + _root.game.effects.id].yspeed = _root.game.effects["spark" + _root.game.effects.id].yspeed + (yspeed * 2);
i = i + 1;
}
maxSpeed = maxSpeed - random(2);
var v1 = yspeed;
var m1 = mass;
var v2 = target.yspeed;
var m2 = target.mass;
var newV1 = ((((m1 - m2) / (m1 + m2)) * v1) + (((2 * m2) / (m1 + m2)) * v2));
var newV2 = ((((2 * m1) / (m1 + m2)) * v1) - (((m1 - m2) / (m1 + m2)) * v2));
if ((_y > target._y) && (newV1 < v1)) {
yspeed = newV1;
target.yspeed = newV2;
}
}
}
if ((target.hitTest((_x * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y + (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true) || (target.hitTest(((_x + (_width / 2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y + (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true))) || (target.hitTest(((_x - (_width / 2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y + (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true))) {
_root.cardashsnd.start();
xspeed = xspeed + (((_x - target._x) / 40) + (target.xspeed / 5));
if ((target._x > (_x - ((_width / 2) + (target._width / 2)))) && (target._x < (_x + ((_width / 2) + (target._width / 2))))) {
var s1 = yspeed;
var s2 = target.yspeed;
var sDiff = 0;
if (((s1 < 0) && (s2 >= 0)) || ((s2 < 0) && (s1 >= 0))) {
if (s1 < 0) {
var sDiff = (s2 - s1);
} else {
var sDiff = (s1 - s2);
}
} else if ((s1 >= 0) && (s2 >= 0)) {
if (s1 > s2) {
var sDiff = (s1 - s2);
} else {
var sDiff = (s2 - s1);
}
} else {
var sDiff = (s1 - s2);
}
if (sDiff < 0) {
sDiff = -sDiff;
}
if (sDiff > 6) {
sDiff = sDiff - 5;
life = life - (((sDiff * 12) / mass) / 2);
target.life = target.life - (((sDiff * 12) / mass) / 4);
sparkNo = sDiff;
}
if (sDiff > 3) {
hitSounds();
}
if (((target == _parent.player) && (targetCar == false)) && (life > 1)) {
_parent.player.hitTime = 0;
playerHitted = true;
} else if ((target != _parent.player) && (targetCar == false)) {
playerHitted = false;
}
i == 0;
while (i < sparkNo) {
_root.game.effects.id = _root.game.effects.id + 1;
duplicateMovieClip (_parent.effects.spark, "spark" + _parent.effects.id, _parent.effects.id + 1);
_root.game.effects["spark" + _root.game.effects.id]._x = (_x - (_width / 2)) + random(_width);
_root.game.effects["spark" + _root.game.effects.id]._y = (_y + (_height / 2)) - random(_height / 2);
_root.game.effects["spark" + _root.game.effects.id].xspeed = _root.game.effects["spark" + _root.game.effects.id].xspeed + 5;
_root.game.effects["spark" + _root.game.effects.id].yspeed = _root.game.effects["spark" + _root.game.effects.id].yspeed + (yspeed * 2);
i = i + 1;
}
var v1 = yspeed;
var m1 = mass;
var v2 = target.yspeed;
var m2 = target.mass;
var newV1 = ((((m1 - m2) / (m1 + m2)) * v1) + (((2 * m2) / (m1 + m2)) * v2));
var newV2 = ((((2 * m1) / (m1 + m2)) * v1) - (((m1 - m2) / (m1 + m2)) * v2));
if ((_y < target._y) && (newV1 > v1)) {
yspeed = newV1;
target.yspeed = newV2;
}
maxSpeed = maxSpeed + random(2);
}
}
if (((target.hitTest(((_x - (_width / 2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, (_y * (1 / (100 / _root.game._yscale))) + _root.game._y, true) || (target.hitTest(((_x + (_width / 2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, (_y * (1 / (100 / _root.game._yscale))) + _root.game._y, true))) || (target.hitTest(((_x - (_width / 2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y + (_height / 3)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true))) || (target.hitTest(((_x + (_width / 2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y + (height / 3)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true))) {
var speedDiff = ((xspeed - target.xspeed) + (yspeed - target.yspeed));
if (speedDiff > 0) {
var sparkNo = speedDiff;
} else {
var sparkNo = (-speedDiff);
}
hitTimes = hitTimes + 1;
var v1 = xspeed;
var m1 = mass;
var v2 = target.xspeed;
var m2 = target.mass;
var newV1 = ((((m1 - m2) / (m1 + m2)) * v1) + (((2 * m2) / (m1 + m2)) * v2));
var newV2 = ((((2 * m1) / (m1 + m2)) * v1) - (((m1 - m2) / (m1 + m2)) * v2));
if (((target == _parent.player) && (targetCar == false)) && (life > 1)) {
_parent.player.hitTime = 0;
playerHitted = true;
} else if ((target != _parent.player) && (targetCar == false)) {
playerHitted = false;
}
if ((_x > target._x) && (newV1 > v1)) {
i = 0;
while (i < sparkNo) {
_root.game.effects.id = _root.game.effects.id + 1;
duplicateMovieClip (_parent.effects.spark, "spark" + _parent.effects.id, _parent.effects.id + 1);
_root.game.effects["spark" + _root.game.effects.id]._x = (_x - (_width / 2)) + random(_width / 3);
_root.game.effects["spark" + _root.game.effects.id]._y = (_y - (_height / 2)) + random(_height);
_root.game.effects["spark" + _root.game.effects.id].xspeed = _root.game.effects["spark" + _root.game.effects.id].xspeed + xspeed;
_root.game.effects["spark" + _root.game.effects.id].yspeed = _root.game.effects["spark" + _root.game.effects.id].yspeed + (yspeed * 2);
i = i + 1;
}
xspeed = newV1;
target.xspeed = newV2;
}
if ((_x < target._x) && (newV1 < v1)) {
i = 0;
while (i < sparkNo) {
_root.game.effects.id = _root.game.effects.id + 1;
duplicateMovieClip (_parent.effects.spark, "spark" + _parent.effects.id, _parent.effects.id + 1);
_root.game.effects["spark" + _root.game.effects.id]._x = (_x + (_width / 2)) - random(_width / 3);
_root.game.effects["spark" + _root.game.effects.id]._y = (_y - (_height / 2)) + random(_height);
_root.game.effects["spark" + _root.game.effects.id].xspeed = _root.game.effects["spark" + _root.game.effects.id].xspeed + xspeed;
_root.game.effects["spark" + _root.game.effects.id].yspeed = _root.game.effects["spark" + _root.game.effects.id].yspeed + (yspeed * 2);
i = i + 1;
}
xspeed = newV1;
target.xspeed = newV2;
}
life = life - (((sparkNo * 12) / mass) / 8);
}
}
}
i = i + 1;
}
var target = _parent.walls;
if ((target.hitTest((_x * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y - (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true) || (target.hitTest(((_x + (_width / 2.4)) * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y - (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true))) || (target.hitTest(((_x - (_width / 2.4)) * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y - (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true))) {
if (yspeed > 0) {
var sparkNo = yspeed;
}
if (yspeed < 0) {
var sparkNo = (-yspeed);
}
hitSounds();
i = 0;
while (i < (sparkNo / 4)) {
_root.game.effects.id = _root.game.effects.id + 1;
duplicateMovieClip (_parent.effects.spark, "spark" + _parent.effects.id, _parent.effects.id + 1);
_root.game.effects["spark" + _root.game.effects.id]._x = (_x + (_width / 2)) - random(_width / 3);
_root.game.effects["spark" + _root.game.effects.id]._y = (_y - (_height / 2)) + random(_height);
_root.game.effects["spark" + _root.game.effects.id].xspeed = _root.game.effects["spark" + _root.game.effects.id].xspeed + xspeed;
_root.game.effects["spark" + _root.game.effects.id].yspeed = _root.game.effects["spark" + _root.game.effects.id].yspeed + (yspeed * 2);
i = i + 1;
}
life = life - (((sparkNo * 12) / mass) / 2);
yspeed = (-yspeed) * 0.5;
}
if ((target.hitTest((_x * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y + (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true) || (target.hitTest(((_x + (_width / 2.2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y + (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true))) || (target.hitTest(((_x - (_width / 2.2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y + (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true))) {
var s1 = yspeed;
var s2 = target.yspeed;
var sDiff = 0;
if (((s1 < 0) && (s2 >= 0)) || ((s2 < 0) && (s1 >= 0))) {
if (s1 < 0) {
sDiff = s2 - s1;
} else {
sDiff = s1 - s2;
}
} else if ((s1 >= 0) && (s2 >= 0)) {
if (s1 > s2) {
sDiff = s1 - s2;
} else {
sDiff = s2 - s1;
}
} else {
sDiff = s1 - s2;
}
if (sDiff < 0) {
sDiff = -sDiff;
}
sparksNo = sDiff;
hitSounds();
i = 0;
while (i < (sparkNo / 4)) {
hitSounds();
_root.game.effects.id = _root.game.effects.id + 1;
duplicateMovieClip (_parent.effects.spark, "spark" + _parent.effects.id, _parent.effects.id + 1);
_root.game.effects["spark" + _root.game.effects.id]._x = (_x + (_width / 2)) - random(_width / 3);
_root.game.effects["spark" + _root.game.effects.id]._y = (_y - (_height / 2)) + random(_height);
_root.game.effects["spark" + _root.game.effects.id].xspeed = _root.game.effects["spark" + _root.game.effects.id].xspeed + xspeed;
_root.game.effects["spark" + _root.game.effects.id].yspeed = _root.game.effects["spark" + _root.game.effects.id].yspeed + (yspeed * 2);
i = i + 1;
}
life = life - (((sparkNo * 12) / mass) / 2);
yspeed = (-yspeed) * 0.5;
}
if (target.hitTest(((_x - (_width / 2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, (_y * (1 / (100 / _root.game._yscale))) + _root.game._y, true)) {
_x = (_x - (xspeed / 3));
xspeed = (-xspeed) * 0.2;
if (yspeed > 0) {
var sparkNo = yspeed;
}
if (yspeed < 0) {
var sparkNo = (-yspeed);
}
if ((sparkNo / 4) > 1) {
hitSounds();
}
hitSounds();
i = 0;
while (i < (sparkNo / 4)) {
_root.game.effects.id = _root.game.effects.id + 1;
duplicateMovieClip (_parent.effects.spark, "spark" + _parent.effects.id, _parent.effects.id + 1);
_root.game.effects["spark" + _root.game.effects.id]._x = (_x - (_width / 2)) + random(_width / 3);
_root.game.effects["spark" + _root.game.effects.id]._y = (_y - (_height / 2)) + random(_height);
_root.game.effects["spark" + _root.game.effects.id].xspeed = _root.game.effects["spark" + _root.game.effects.id].xspeed + xspeed;
_root.game.effects["spark" + _root.game.effects.id].yspeed = _root.game.effects["spark" + _root.game.effects.id].yspeed + (yspeed * 2);
i = i + 1;
}
life = life - (((sparkNo * 12) / mass) / 6);
}
if (target.hitTest(((_x + (_width / 2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, (_y * (1 / (100 / _root.game._yscale))) + _root.game._y, true)) {
_x = (_x - (xspeed / 3));
xspeed = (-xspeed) * 0.2;
if (yspeed > 0) {
var sparkNo = yspeed;
}
if (yspeed < 0) {
var sparkNo = (-yspeed);
}
if ((sparkNo / 4) > 1) {
hitSounds();
}
i = 0;
while (i < (sparkNo / 4)) {
_root.game.effects.id = _root.game.effects.id + 1;
duplicateMovieClip (_parent.effects.spark, "spark" + _parent.effects.id, _parent.effects.id + 1);
_root.game.effects["spark" + _root.game.effects.id]._x = (_x + (_width / 2)) - random(_width / 3);
_root.game.effects["spark" + _root.game.effects.id]._y = (_y - (_height / 2)) + random(_height);
_root.game.effects["spark" + _root.game.effects.id].xspeed = _root.game.effects["spark" + _root.game.effects.id].xspeed + xspeed;
_root.game.effects["spark" + _root.game.effects.id].yspeed = _root.game.effects["spark" + _root.game.effects.id].yspeed + (yspeed * 2);
i = i + 1;
}
life = life - (((sparkNo * 12) / mass) / 6);
}
if (_root.game.sound.type == 2) {
var dist = Math.sqrt(((_x - _root.game.sound._x) * (_x - _root.game.sound._x)) + ((_y - _root.game.sound._y) * (_y - _root.game.sound._y)));
if (dist < 300) {
interestX = _root.game.sound._x;
interestY = _root.game.sound._y;
interestLevel = interestLevel + 50;
}
if (dist < (_root.game.sound.size * 2)) {
life = life - (((_root.game.sound.size * 2) - dist) / 8);
var adjside = (_root.game.sound._x - _x);
var oppside = (-1 * (_root.game.sound._y - _y));
var angle = Math.atan2(oppside, adjside);
angle = (angle / 3.141593) * 180;
var throwRot = (-1 * angle);
xspeed = xspeed - (Math.cos(throwRot * 0.01745329) * (((_root.game.sound.size * 2) - dist) / (10 * mass)));
yspeed = yspeed + (Math.sin(throwRot * 0.01745329) * (((_root.game.sound.size * 2) - dist) / (10 * mass)));
}
}
if ((life < -75) && (exploded == false)) {
exploded = true;
_root.id = _root.id + 1;
_root.game.expTargetX = _x;
_root.game.expTargetY = _y;
_root.game.expSize = _height;
_root.game.expSize = _height;
trace("exp44");
_root.blastsnd.setVolume(20);
_root.blastsnd.start();
duplicateMovieClip (_root.game.explosion, "explosion" + _root.id, _root.id + 300);
_root.game["explosion" + _root.id]._x = _x;
_root.game["explosion" + _root.id]._y = _y;
_root.game["explosion" + _root.id]._height = _root.game.expSize / 2.5;
_root.game["explosion" + _root.id]._width = _root.game.expSize / 2.5;
_root.game["explosion" + _root.id].sizeE = _root.game.expSize * 2;
i = 0;
while (i < 4) {
_root.game.effects2.id = _root.game.effects2.id + 1;
duplicateMovieClip (_parent.effects2.tire, "spark" + _parent.effects2.id, _parent.effects2.id + 1);
_root.game.effects2["spark" + _root.game.effects2.id]._x = _x;
_root.game.effects2["spark" + _root.game.effects2.id]._y = _y;
i = i + 1;
}
}
if ((life < 50) && (life > -75)) {
timerSmoke = timerSmoke + 1;
if (timerSmoke > 1) {
_root.game.effects.id = _root.game.effects.id + 1;
duplicateMovieClip (_parent.effects.smoke, "spark" + _parent.effects.id, _parent.effects.id + 1);
_root.game.effects["spark" + _root.game.effects.id]._x = _x;
_root.game.effects["spark" + _root.game.effects.id]._y = _y;
_root.game.effects["spark" + _root.game.effects.id]._height = _root.game.effects["spark" + _root.game.effects.id]._height + _root.game.player.yspeed;
_root.game.effects["spark" + _root.game.effects.id].xspeed = _root.game.effects["spark" + _root.game.effects.id].xspeed + xspeed;
_root.game.effects["spark" + _root.game.effects.id].yspeed = _root.game.effects["spark" + _root.game.effects.id].yspeed + (yspeed * 2);
timerSmoke = 0;
}
}
if (life < -75) {
timerSmoke = timerSmoke + 1;
if (timerSmoke > 1) {
_root.game.effects.id = _root.game.effects.id + 1;
duplicateMovieClip (_parent.effects.smoke2, "spark" + _parent.effects.id, _parent.effects.id + 1);
_root.game.effects["spark" + _root.game.effects.id]._x = _x;
_root.game.effects["spark" + _root.game.effects.id]._y = _y;
_root.game.effects["spark" + _root.game.effects.id]._height = _root.game.effects["spark" + _root.game.effects.id]._height + _root.game.player.yspeed;
_root.game.effects["spark" + _root.game.effects.id].xspeed = _root.game.effects["spark" + _root.game.effects.id].xspeed + xspeed;
_root.game.effects["spark" + _root.game.effects.id].yspeed = _root.game.effects["spark" + _root.game.effects.id].yspeed + (yspeed * 2);
timerSmoke = 0;
}
}
if (life > 0) {
if ((_x + xspeed) < targetX) {
xspeed = xspeed + 0.2;
} else if ((_x < targetX) && (xspeed > 0)) {
xspeed = xspeed * 0.97;
}
if ((_x + xspeed) > targetX) {
xspeed = xspeed - 0.2;
}
if ((_x > targetX) && (xspeed < 0)) {
xspeed = xspeed * 0.97;
}
if (up == false) {
if (yspeed > (-maxSpeed)) {
yspeed = yspeed - (maxSpeed / 30);
}
_rotation = (((xspeed * 3) + spin) + 180);
} else {
var laneChange = random(500);
if (laneChange == 10) {
var chooseLane = (1 + random(3));
lane = _root.game["lane" + chooseLane];
targetX = lane.targetX;
maxSpeed = lane.maxSpeed;
}
if (yspeed < maxSpeed) {
yspeed = yspeed + (maxSpeed / 30);
}
_rotation = ((xspeed * 6) / mass);
}
} else {
_rotation = (_rotation + ((xspeed * 10) / mass));
}
if ((life < 0) && (targetCar != true)) {
if (playerHitted == true) {
playerHitted = false;
}
}
if ((_name != "car") && (targetCar != true)) {
if ((_y > 600) || (_y < -1700)) {
_root.carsAlive = _root.carsAlive - 1;
engineSound.stop();
removeMovieClip(this);
}
}
xspeed = xspeed * 0.97;
yspeed = yspeed * 0.97;
showy = _y;
showx = _x;
_x = (_x + xspeed);
_y = (_y - ((-_parent.player.yspeed) + yspeed));
if (targetCar == true) {
_root.game.targetShow._x = _x;
_root.game.targetShow._y = _y;
var pScore = (10 - Math.ceil(life / 10));
if (pScore < 1) {
pScore = 1;
}
_root.game.targetShow.arrowMc.arrowSubMc.gotoAndStop(pScore);
}
}
}
Instance of Symbol 570 MovieClip "targetShow" in Symbol 961 MovieClip Frame 1
onClipEvent (enterFrame) {
this.swapDepths(501);
}
Instance of Symbol 575 MovieClip in Symbol 961 MovieClip Frame 1
onClipEvent (load) {
timer = 0;
spawnTime = 200;
startX = _x;
newLane = none;
oldLane = alsoNone;
lastCar = none;
createCar = true;
targetSpawned = false;
}
onClipEvent (enterFrame) {
if (_root.nextCar == true) {
var amount = (1 + random(4));
_x = _root.game["lane" + amount]._x;
newLane = _root.game["lane" + amount];
} else {
var amount = (1 + random(4));
_x = _root.game["lane" + amount]._x;
newLane = _root.game["lane" + amount];
}
timer = timer + (_root.game.player.yspeed + random(_root.game.player.yspeed / 2));
if (newLane != oldLane) {
if (lastCar._y < (_y + lastCar._height)) {
createCar = false;
} else {
createCar = true;
}
} else {
createCar = false;
}
if ((((timer > spawnTime) && (_root.carsAlive < _root.maxCars)) && (createCar == true)) && (_root.carId != 10)) {
_root.carsAlive = _root.carsAlive + 1;
_root.carId = _root.carId + 1;
if (_root.game["car" + _root.carId]._x == undefined) {
duplicateMovieClip (_parent.car, "car" + _root.carId, _root.carId + 151);
if (_root.nextCar == true) {
_root.game["car" + _root.carId]._x = (_x - 2) + random(4);
_root.game["car" + _root.carId]._y = _y;
_root.game["car" + _root.carId].lane = _root.game["lane" + amount];
_root.game["car" + _root.carId].laneId = 2;
_root.game["car" + _root.carId].targetCar = true;
_root.nextCar = false;
} else {
_root.game["car" + _root.carId]._x = (_x - 2) + random(4);
_root.game["car" + _root.carId]._y = _y;
_root.game["car" + _root.carId].lane = _root.game["lane" + amount];
_root.game["car" + _root.carId].laneId = amount;
_root.game["car" + _root.carId].targetCar = false;
}
lastCar = _root.game["car" + _root.carId];
timer = 0;
}
oldLane = _root.game["lane" + amount];
}
}
Instance of Symbol 576 MovieClip "prop" in Symbol 961 MovieClip Frame 1
onClipEvent (load) {
startY = _y;
yspeed = 0;
xspeed = 0;
hitTimes = 0;
}
onClipEvent (enterFrame) {
if (_parent.player.hitTest((_x * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y + _parent.player.yspeed) * (1 / (100 / _root.game._yscale))) + _root.game._y, true)) {
hitTimes = hitTimes + 1;
if (_currentframe == 1) {
yspeed = yspeed - _parent.player.yspeed;
} else {
yspeed = yspeed - (_parent.player.yspeed * 0.5);
}
xspeed = xspeed + (((_x - _parent.player._x) / 40) + (_parent.player.xspeed / 2));
_parent.player.yspeed = _parent.player.yspeed / 1.01;
gotoAndStop (2);
}
if (hitTimes > 10) {
_root.hud.displayText = "Cone carrying bonus 200 points!";
_root.hud.score = _root.hud.score + 200;
}
var target = _parent.walls;
if (target.hitTest((_x * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y - (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true)) {
yspeed = (-yspeed) * 0.5;
}
if (target.hitTest((_x * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y + (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true) && (yspeed + _root.game.player.yspeed)) {
yspeed = (-yspeed) * 0.5;
}
if (target.hitTest(((_x - (_width / 2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, (_y * (1 / (100 / _root.game._yscale))) + _root.game._y, true) && (xspeed < 0)) {
_x = (_x - xspeed);
xspeed = (-xspeed) * 0.2;
}
if (target.hitTest(((_x + (_width / 2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, (_y * (1 / (100 / _root.game._yscale))) + _root.game._y, true) && (xspeed > 0)) {
_x = (_x - xspeed);
xspeed = (-xspeed) * 0.2;
}
xspeed = xspeed * 0.97;
yspeed = yspeed * 0.97;
showy = _y;
showx = _x;
_rotation = (_rotation + ((xspeed + yspeed) * 4));
_x = (_x + xspeed);
_y = (_y + (_parent.player.yspeed + yspeed));
}
Instance of Symbol 947 MovieClip "player" in Symbol 961 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop (1);
_root.reloadComplete = true;
maxSpeed = 50;
yspeed = 50;
xspeed = 0;
mass = ((_height + _width) / 33) * 5;
maxLife = 400;
life = maxLife;
slowTimer = 0;
origWidth = _width;
this.swapDepths(2);
yspeed = 60;
exploded = false;
smokeTime = 0;
hitTime = 0;
skidPlaying = false;
rev = true;
revLength = 0;
explodeTimer = 10;
colorArr = ["0x339999", "0x99CC66", "0x993333", "0xCCCC66"];
}
onClipEvent (enterFrame) {
if (_root.hud.speed >= 200) {
skidActive = true;
}
if (Key.isDown(40)) {
}
if (skidActive == true) {
if (Key.isDown(40)) {
} else {
skidActive = false;
}
}
if ((skidActive == true) && (_root.hud.speed <= 30)) {
_root.skidDone = true;
}
if (_root.game.cars.hitTest((_x * (1 / (100 / _root.game._xscale))) + _root.game._x, (_y * (1 / (100 / _root.game._yscale))) + _root.game._y, true) && (yspeed > 30)) {
hitTime = hitTime + 1;
} else if (hitTime > 0) {
hitTime = 0;
} else {
hitTime = 0;
}
if (yspeed < 0) {
yspeed = yspeed - (yspeed / 2);
}
if ((yspeed / 5) < 3.5) {
var turnSpeed = (yspeed / 5);
} else {
turnSpeed = 3.5;
}
if ((_root.gocar && (yspeed < maxSpeed)) && (life > 0)) {
}
if ((Key.isDown(38) && (yspeed < maxSpeed)) && (life > 0)) {
yspeed = yspeed + 0.8;
}
if ((Key.isDown(32) && (yspeed > 0)) && (life > 0)) {
_root.pressspace = true;
} else {
if (turnSpeed > 3.5) {
turnSpeed = turnSpeed - 0.1;
}
skidPlaying = false;
skidSound.stop();
}
if (Key.isDown(39) && (life > 0)) {
xspeed = xspeed + turnSpeed;
}
if (Key.isDown(37) && (life > 0)) {
xspeed = xspeed - turnSpeed;
}
_rotation = (xspeed / 2);
xspeed = xspeed * 0.8;
_x = (_x + xspeed);
yspeed = yspeed * 0.99;
showx = _x;
showy = _y;
if (life < 0) {
explodeTimer = explodeTimer + 1;
}
if ((life < 0) && (explodeTimer > 20)) {
explodeTimer = 0;
exploded = true;
_root.id = _root.id + 1;
_root.game.expTargetX = _x;
_root.game.expTargetY = _y;
_root.game.expSize = _height;
_root.game.expSize = _height;
duplicateMovieClip (_root.game.explosion, "explosion" + _root.id, _root.id + 1);
_root.game["explosion" + _root.id]._x = _x;
_root.game["explosion" + _root.id]._y = _y;
_root.game["explosion" + _root.id]._height = _root.game.expSize / 3;
_root.game["explosion" + _root.id]._width = _root.game.expSize / 3;
_root.game["explosion" + _root.id].sizeE = _root.game.expSize * 2;
}
if (life < 40) {
smokeTime = smokeTime + (yspeed / 5);
if (smokeTime > 5) {
_root.game.effects.id = _root.game.effects.id + 1;
duplicateMovieClip (_parent.effects.smoke, "spark" + _parent.effects.id, _parent.effects.id + 1);
_root.game.effects["spark" + _root.game.effects.id]._x = _x;
_root.game.effects["spark" + _root.game.effects.id]._y = _y - (_height / 2);
_root.game.effects["spark" + _root.game.effects.id]._height = _root.game.effects["spark" + _root.game.effects.id]._height + yspeed;
_root.game.effects["spark" + _root.game.effects.id].xspeed = _root.game.effects["spark" + _root.game.effects.id].xspeed + xspeed;
_root.game.effects["spark" + _root.game.effects.id].yspeed = yspeed;
_root.game.effects.id = _root.game.effects.id + 1;
smokeTime = 0;
}
}
var target = _parent.walls;
if ((target.hitTest((_x * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y - (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true) || (target.hitTest(((_x + (_width / 3)) * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y - (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true))) || (target.hitTest(((_x - (_width / 3)) * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y - (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true))) {
if (yspeed > 0) {
life = life - yspeed;
} else {
life = life + yspeed;
}
yspeed = (-yspeed) * 1;
}
if (target.hitTest((_x * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y + (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true) && (yspeed + _root.game.player.yspeed)) {
if (yspeed > 0) {
life = life - yspeed;
} else {
life = life + yspeed;
}
_y = (_y - yspeed);
yspeed = (-yspeed) * 1;
}
if (target.hitTest(((_x - (_width / 2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, (_y * (1 / (100 / _root.game._yscale))) + _root.game._y, true) && (xspeed < 0)) {
_x = (_x - xspeed);
xspeed = (-xspeed) * 0.2;
var sparkNo = ((yspeed / 5) - 2);
life = life - (sparkNo / 5);
i = 0;
while (i < sparkNo) {
_root.game.effects.id = _root.game.effects.id + 1;
duplicateMovieClip (_root.game.effects.spark, "spark" + _root.game.effects.id, _root.game.effects.id + 1);
_root.game.effects["spark" + _root.game.effects.id]._x = (_x - (_width / 2)) + random(_width / 3);
_root.game.effects["spark" + _root.game.effects.id]._y = (_y - (_height / 2)) + random(_height);
_root.game.effects["spark" + _root.game.effects.id].xspeed = _root.game.effects["spark" + _root.game.effects.id].xspeed + xspeed;
_root.game.effects["spark" + _root.game.effects.id].yspeed = _root.game.effects["spark" + _root.game.effects.id].yspeed + (yspeed * 2);
i = i + 1;
}
i = 0;
while (i < (sparkNo / 4)) {
_root.game.effects.id = _root.game.effects.id + 1;
duplicateMovieClip (_root.game.effects.paint, "spark" + _root.game.effects.id, _root.game.effects.id + 1);
_root.game.effects["spark" + _root.game.effects.id]._x = (_x - (_width / 2)) + random(_width / 3);
_root.game.effects["spark" + _root.game.effects.id]._y = (_y - (_height / 2)) + random(_height);
_root.game.effects["spark" + _root.game.effects.id].xspeed = _root.game.effects["spark" + _root.game.effects.id].xspeed + xspeed;
_root.game.effects["spark" + _root.game.effects.id].yspeed = yspeed * 1.5;
i = i + 1;
}
}
if (target.hitTest(((_x + (_width / 2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, (_y * (1 / (100 / _root.game._yscale))) + _root.game._y, true) && (xspeed > 0)) {
_x = (_x - xspeed);
xspeed = (-xspeed) * 0.2;
var sparkNo = ((yspeed / 5) - 2);
life = life - (sparkNo / 5);
i = 0;
while (i < sparkNo) {
_root.game.effects.id = _root.game.effects.id + 1;
duplicateMovieClip (_root.game.effects.spark, "spark" + _root.game.effects.id, _parent.effects.id + 1);
var pColor = new Color(_root.game.effects["spark" + _root.game.effects.id]);
_root.game.effects["spark" + _root.game.effects.id]._x = (_x + (_width / 2)) - random(_width / 3);
_root.game.effects["spark" + _root.game.effects.id]._y = (_y - (_height / 2)) + random(_height);
_root.game.effects["spark" + _root.game.effects.id].xspeed = _root.game.effects["spark" + _root.game.effects.id].xspeed + xspeed;
_root.game.effects["spark" + _root.game.effects.id].yspeed = _root.game.effects["spark" + _root.game.effects.id].yspeed + (yspeed * 2);
i = i + 1;
}
i = 0;
while (i < (sparkNo / 4)) {
_root.game.effects.id = _root.game.effects.id + 1;
duplicateMovieClip (_root.game.effects.paint, "spark" + _root.game.effects.id, _parent.effects.id + 1);
_root.game.effects["spark" + _root.game.effects.id]._x = (_x + (_width / 2)) - random(_width / 3);
_root.game.effects["spark" + _root.game.effects.id]._y = (_y - (_height / 2)) + random(_height);
_root.game.effects["spark" + _root.game.effects.id].xspeed = _root.game.effects["spark" + _root.game.effects.id].xspeed + xspeed;
_root.game.effects["spark" + _root.game.effects.id].yspeed = yspeed * 1.5;
i = i + 1;
}
}
if (_root.game.slower.hitTest((_x * (1 / (100 / _root.game._xscale))) + _root.game._x, (_y * (1 / (100 / _root.game._yscale))) + _root.game._y, true)) {
if ((_x * (1 / (100 / _root.game._xscale))) < 0) {
_root.pavementTime = _root.pavementTime + 1;
}
if (slowTimer < 20) {
slowTimer = slowTimer + 1;
} else {
yspeed = yspeed * 0.98;
}
} else if (slowTimer > 0) {
slowTimer = slowTimer - 1;
}
if (_root.game.sound.type == 2) {
var dist = Math.sqrt(((_x - _root.game.sound._x) * (_x - _root.game.sound._x)) + ((_y - _root.game.sound._y) * (_y - _root.game.sound._y)));
if (dist < 300) {
interestX = _root.game.sound._x;
interestY = _root.game.sound._y;
interestLevel = interestLevel + 50;
}
if (dist < (_root.game.sound.size * 2)) {
life = life - (((_root.game.sound.size * 2) - dist) / 50);
var adjside = (_root.game.sound._x - _x);
var oppside = (-1 * (_root.game.sound._y - _y));
var angle = Math.atan2(oppside, adjside);
angle = (angle / 3.141593) * 180;
var throwRot = (-1 * angle);
xspeed = xspeed - (Math.cos(throwRot * 0.01745329) * (((_root.game.sound.size * 2) - dist) / (5 * mass)));
yspeed = yspeed + (Math.sin(throwRot * 0.01745329) * (((_root.game.sound.size * 2) - dist) / (5 * mass)));
}
}
}
Instance of Symbol 598 MovieClip "gun" in Symbol 961 MovieClip Frame 1
onClipEvent (load) {
targetC = _parent.targetShow;
}
onClipEvent (enterFrame) {
if (_root.pressspace == true) {
_root.pressspace = false;
if (_root.reloadComplete == true) {
_root.reloadComplete = false;
_root.bulletmc = _parent.attachMovie("bullet", "bullet" + _root.bulletnum, _root.getNextHighestDepth());
randomNum = random(20) - 10;
bulletAngle = (((_rotation + randomNum) - 90) * Math.PI) / 180;
_root.bulletmc.xSpeed = Math.cos(_root.gunangles) * 10;
_root.bulletmc.ySpeed = Math.sin(_root.gunangles) * 10;
_root.bulletmc._x = _root.game.gun._x;
_root.bulletmc._y = _root.game.gun._y;
_root.bspeed = 10;
_root.bulletnum++;
}
}
if ((_root.hud.targetDisplay.pDist < 1) && (_root.nextCar == false)) {
_alpha = 0;
} else {
_alpha = 0;
}
_x = _root.game.player._x;
this.swapDepths(_root.game.getNextHighestDepth());
var adjside = (targetC._x - _x);
var oppside = (-1 * (targetC._y - _y));
var angle = Math.atan2(oppside, adjside);
angle = (angle / 3.141593) * 180;
_root.gunangles = angle;
if (angle > 0) {
}
}
Instance of Symbol 619 MovieClip "effects" in Symbol 961 MovieClip Frame 1
onClipEvent (load) {
id = 0;
}
onClipEvent (enterFrame) {
this.swapDepths(300);
if (id > 50) {
id = 0;
}
}
Instance of Symbol 632 MovieClip "explosion" in Symbol 961 MovieClip Frame 1
onClipEvent (load) {
var sizeE;
if ((_x - _root.game.player._x) > 100) {
pan = 100;
} else if ((_x - _root.game.player._x) < -100) {
pan = -100;
} else {
pan = _x - _root.game.player._x;
}
vol = 100 - (Math.sqrt(((_x - _root.game.player._x) * (_x - _root.game.player._x)) + ((_y - _root.game.player._y) * (_y - _root.game.player._y))) / 10);
if (vol > 100) {
vol = 100;
}
if (vol < 0) {
vol = 0;
}
if (_name == "explosion") {
_visible = false;
} else {
explosionSound = new Sound(this);
explosionSound.attachSound("explosion");
explosionSound.setPan(pan);
explosionSound.setVolume(vol);
explosionSound.start(0, 0);
explosionSound.setPan(pan);
explosionSound.setVolume(vol);
}
time = 100;
}
onClipEvent (enterFrame) {
_y = (_y + _root.game.player.yspeed);
if ((_x - _root.game.player._x) > 100) {
pan = 100;
} else if ((_x - _root.game.player._x) < -100) {
pan = -100;
} else {
pan = _x - _root.game.player._x;
}
vol = 100 - (Math.sqrt(((_x - _root.game.player._x) * (_x - _root.game.player._x)) + ((_y - _root.game.player._y) * (_y - _root.game.player._y))) / 10);
if (vol > 100) {
vol = 100;
}
if (vol < 0) {
vol = 0;
}
explosionSound.setPan(pan);
explosionSound.setVolume(vol);
}
Instance of Symbol 619 MovieClip "effects2" in Symbol 961 MovieClip Frame 1
onClipEvent (load) {
id = 0;
_x = 0;
_y = 0;
}
onClipEvent (enterFrame) {
this.swapDepths(1);
if (id > 50) {
id = 0;
}
}
Instance of Symbol 634 MovieClip in Symbol 961 MovieClip Frame 1
onClipEvent (enterFrame) {
this._alpha = 0;
this.swapDepths(1001);
}
Instance of Symbol 646 MovieClip in Symbol 961 MovieClip Frame 1
onClipEvent (load) {
targetC = _parent.targetShow;
}
onClipEvent (enterFrame) {
if ((_root.hud.targetDisplay.pDist < 1) && (_root.nextCar == false)) {
_alpha = 100;
} else {
_alpha = 0;
}
_x = _root.game.player._x;
this.swapDepths(_root.game.getNextHighestDepth());
var adjside = (targetC._x - _x);
var oppside = (-1 * (targetC._y - _y));
var angle = Math.atan2(oppside, adjside);
angle = (angle / 3.141593) * 180;
_rotation = (-1 * angle);
}
Symbol 962 Button
on (release) {
getURL ("http://www.gamesgeni.com", "_blank");
}
on (rollOver) {
_root.btnsnd.start();
}
Instance of Symbol 969 MovieClip in Symbol 972 MovieClip Frame 1
onClipEvent (load) {
origY = _y;
}
onClipEvent (enterFrame) {
_y = (_y + _root.game.player.yspeed);
if (_y > (origY + 1275)) {
_y = origY;
}
}
Instance of Symbol 971 MovieClip in Symbol 972 MovieClip Frame 1
onClipEvent (load) {
origY = _y;
}
onClipEvent (enterFrame) {
_y = (_y + _root.game.player.yspeed);
if (_y > (origY + 1275)) {
_y = origY;
}
}
Symbol 973 MovieClip Frame 1
_root.sirensnd.start();
_root.sirensnd.setVolume(30);
_root.sirensnd.onSoundComplete = function () {
_root.sirensnd.start();
};
Instance of Symbol 966 MovieClip "track" in Symbol 973 MovieClip Frame 1
onClipEvent (load) {
startY = _y;
_root.newscorevar = 0;
_root.scorecoinhit = false;
}
onClipEvent (enterFrame) {
_y = (_y + _parent.player.yspeed);
_parent.scorecoin._y = _parent.scorecoin._y + _parent.player.yspeed;
if ((_y + _parent.player.yspeed) > (startY + 325)) {
_y = startY;
}
if (_parent.scorecoin._y > 3333) {
_root.scorecoinhit = false;
_parent.scorecoin._x = _parent["lane" + (1 + random(4))]._x;
_parent.scorecoin._y = -2000;
}
if (_parent.scorecoin.hitTest(_root.game.player) && (_root.scorecoinhit == false)) {
_root.newscorevar = _root.newscorevar + 100;
_parent.scorecoin.gotoAndPlay(2);
_root.scorecoinhit = true;
}
}
Instance of Symbol 534 MovieClip "lane1" in Symbol 973 MovieClip Frame 1
onClipEvent (load) {
maxSpeed = 35;
targetX = _x;
id = 1;
}
Instance of Symbol 534 MovieClip "lane2" in Symbol 973 MovieClip Frame 1
onClipEvent (load) {
maxSpeed = 30;
targetX = _x;
id = 2;
}
Instance of Symbol 534 MovieClip "lane3" in Symbol 973 MovieClip Frame 1
onClipEvent (load) {
maxSpeed = 25;
targetX = _x;
id = 3;
}
Instance of Symbol 534 MovieClip "lane4" in Symbol 973 MovieClip Frame 1
onClipEvent (load) {
maxSpeed = 20;
targetX = _x;
id = 4;
}
Instance of Symbol 536 MovieClip "slower" in Symbol 973 MovieClip Frame 1
onClipEvent (load) {
_alpha = 0;
}
Instance of Symbol 972 MovieClip "walls" in Symbol 973 MovieClip Frame 1
onClipEvent (load) {
xspeed = 0;
yspeed = 0;
mass = 1000;
}
onClipEvent (enterFrame) {
xspeed = 0;
yspeed = 0;
}
Instance of Symbol 564 MovieClip "car" in Symbol 973 MovieClip Frame 1
onClipEvent (load) {
this.nofhittimes = 0;
var lane;
var laneId;
var truckLikely = (1 + random(10));
if (truckLikely == 5) {
gotoAndStop(1 + random(4));
} else {
gotoAndStop(1 + random(3));
}
startY = _y;
yspeed = 0;
xspeed = 0;
hitTimes = 0;
spin = 0;
sironBool = false;
targetX = lane.targetX;
if (_x > 0) {
up = false;
_rotation = (_rotation + 180);
yspeed = -lane.maxSpeed;
maxSpeed = lane.maxSpeed;
} else {
up = true;
_rotation = 0;
yspeed = lane.maxSpeed;
maxSpeed = lane.maxSpeed;
}
life = 100;
target = _parent.player;
mass = (_height + _width) / 33;
exploded = false;
timerSmoke = 0;
sparkNo = 0;
var targetCar;
messageShown = false;
engineStarted = false;
playerHitted = false;
sDiff = 0;
deadCar = false;
_root.targetcarinload = true;
}
onClipEvent (enterFrame) {
function hitSounds() {
var _local2 = 1 + random(3);
hitSound = new Sound(this);
if (_local2 == 1) {
hitSound.attachSound("hit1");
} else if (_local2 == 2) {
hitSound.attachSound("hit2");
} else {
hitSound.attachSound("hit3");
}
hitSound.setVolume(sparkNo * 5);
hitSound.start(0, 0);
}
if (_root.targetsLeft <= 0) {
}
if (targetCar == true) {
_root.game.targetShow._x = _x;
_root.game.targetShow._y = _y;
_root.game.targetShow.play();
lane = _root.game.lane1;
targetX = lane.targetX;
maxSpeed = lane.maxSpeed;
if (!sironBool) {
sironSound = new Sound(this);
sironSound.attachSound("siron");
sironSound.start(0, 100);
sironBool = true;
}
sironSound.setVolume(100);
if ((life < 1) && (messageShown == false)) {
_root.score = _root.score + 1000;
if (_root.targetsLeft == 0) {
_root.extraCar = true;
}
sironSound.stop();
_root.targetsLeft = _root.targetsLeft - 1;
messageShown = true;
targetCar = false;
_root.game.targetShow._x = -2000;
deadCar = true;
}
} else if ((life < 1) && (deadCar != true)) {
_root.carsBlownUp = _root.carsBlownUp + 1;
if (_currentframe == 4) {
_root.trucksKilled = _root.trucksKilled + 1;
}
deadCar = true;
}
if (_name != "car") {
_parent.showMc._x = _x;
_parent.showMc._y = passY;
i = 0;
while (i < (_root.maxCars + 2)) {
if (_root.game["car" + i]._x != undefined) {
bullettarget = _root.game["car" + i];
if (_root.game["car" + i] != this) {
target = _root.game["car" + i];
} else {
target = _parent.player;
}
if (bullettarget.hitTest(_root.bulletmc)) {
bullettarget.ene.hhh.gotoAndStop(2);
_root.reloadComplete = true;
removeMovieClip(_root.bulletmc);
} else if (_root.game.car.hitTest(_root.bulletmc)) {
this.ene.hhh.gotoAndStop(2);
_root.reloadComplete = true;
removeMovieClip(_root.bulletmc);
}
var adjside = (target._x - _x);
var oppside = (-1 * (target._y - _y));
var dist = Math.sqrt((adjside * adjside) + (oppside * oppside));
var distMax = (_height + (target._height / 2));
if (dist < distMax) {
if ((target.hitTest((_x * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y - (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true) || (target.hitTest(((_x + (_width / 2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y - (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true))) || (target.hitTest(((_x - (_width / 2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y - (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true))) {
_root.cardashsnd.start();
xspeed = xspeed + (((_x - target._x) / 40) + (target.xspeed / 5));
if ((target._x > (_x - ((_width / 2) + (target._width / 2.2)))) && (target._x < (_x + ((_width / 2) + (target._width / 2.2))))) {
var s1 = yspeed;
var s2 = target.yspeed;
var sDiff = 0;
if (((s1 < 0) && (s2 >= 0)) || ((s2 < 0) && (s1 >= 0))) {
if (s1 < 0) {
var sDiff = (s2 - s1);
} else {
var sDiff = (s1 - s2);
}
} else if ((s1 >= 0) && (s2 >= 0)) {
if (s1 > s2) {
var sDiff = (s1 - s2);
} else {
var sDiff = (s2 - s1);
}
} else {
var sDiff = (s1 - s2);
}
if (sDiff < 0) {
sDiff = -sDiff;
}
if (sDiff > 6) {
sDiff = sDiff - 5;
life = life - (((sDiff * 12) / mass) / 2);
target.life = target.life - (((sDiff * 12) / mass) / 4);
sparkNo = sDiff;
}
if (sDiff > 3) {
hitSounds();
}
if (((target == _parent.player) && (targetCar == false)) && (life > 1)) {
_parent.player.hitTime = 0;
playerHitted = true;
} else if ((target != _parent.player) && (targetCar == false)) {
playerHitted = false;
}
i == 0;
while (i < sparkNo) {
_root.game.effects.id = _root.game.effects.id + 1;
duplicateMovieClip (_parent.effects.spark, "spark" + _parent.effects.id, _parent.effects.id + 1);
_root.game.effects["spark" + _root.game.effects.id]._x = (_x - (_width / 2)) + random(_width);
_root.game.effects["spark" + _root.game.effects.id]._y = (_y - (_height / 2)) + random(_height / 2);
_root.game.effects["spark" + _root.game.effects.id].xspeed = _root.game.effects["spark" + _root.game.effects.id].xspeed + 5;
_root.game.effects["spark" + _root.game.effects.id].yspeed = _root.game.effects["spark" + _root.game.effects.id].yspeed + (yspeed * 2);
i = i + 1;
}
maxSpeed = maxSpeed - random(2);
var v1 = yspeed;
var m1 = mass;
var v2 = target.yspeed;
var m2 = target.mass;
var newV1 = ((((m1 - m2) / (m1 + m2)) * v1) + (((2 * m2) / (m1 + m2)) * v2));
var newV2 = ((((2 * m1) / (m1 + m2)) * v1) - (((m1 - m2) / (m1 + m2)) * v2));
if ((_y > target._y) && (newV1 < v1)) {
yspeed = newV1;
target.yspeed = newV2;
}
}
}
if ((target.hitTest((_x * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y + (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true) || (target.hitTest(((_x + (_width / 2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y + (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true))) || (target.hitTest(((_x - (_width / 2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y + (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true))) {
_root.cardashsnd.start();
xspeed = xspeed + (((_x - target._x) / 40) + (target.xspeed / 5));
if ((target._x > (_x - ((_width / 2) + (target._width / 2)))) && (target._x < (_x + ((_width / 2) + (target._width / 2))))) {
var s1 = yspeed;
var s2 = target.yspeed;
var sDiff = 0;
if (((s1 < 0) && (s2 >= 0)) || ((s2 < 0) && (s1 >= 0))) {
if (s1 < 0) {
var sDiff = (s2 - s1);
} else {
var sDiff = (s1 - s2);
}
} else if ((s1 >= 0) && (s2 >= 0)) {
if (s1 > s2) {
var sDiff = (s1 - s2);
} else {
var sDiff = (s2 - s1);
}
} else {
var sDiff = (s1 - s2);
}
if (sDiff < 0) {
sDiff = -sDiff;
}
if (sDiff > 6) {
sDiff = sDiff - 5;
life = life - (((sDiff * 12) / mass) / 2);
target.life = target.life - (((sDiff * 12) / mass) / 4);
sparkNo = sDiff;
}
if (sDiff > 3) {
hitSounds();
}
if (((target == _parent.player) && (targetCar == false)) && (life > 1)) {
_parent.player.hitTime = 0;
playerHitted = true;
} else if ((target != _parent.player) && (targetCar == false)) {
playerHitted = false;
}
i == 0;
while (i < sparkNo) {
_root.game.effects.id = _root.game.effects.id + 1;
duplicateMovieClip (_parent.effects.spark, "spark" + _parent.effects.id, _parent.effects.id + 1);
_root.game.effects["spark" + _root.game.effects.id]._x = (_x - (_width / 2)) + random(_width);
_root.game.effects["spark" + _root.game.effects.id]._y = (_y + (_height / 2)) - random(_height / 2);
_root.game.effects["spark" + _root.game.effects.id].xspeed = _root.game.effects["spark" + _root.game.effects.id].xspeed + 5;
_root.game.effects["spark" + _root.game.effects.id].yspeed = _root.game.effects["spark" + _root.game.effects.id].yspeed + (yspeed * 2);
i = i + 1;
}
var v1 = yspeed;
var m1 = mass;
var v2 = target.yspeed;
var m2 = target.mass;
var newV1 = ((((m1 - m2) / (m1 + m2)) * v1) + (((2 * m2) / (m1 + m2)) * v2));
var newV2 = ((((2 * m1) / (m1 + m2)) * v1) - (((m1 - m2) / (m1 + m2)) * v2));
if ((_y < target._y) && (newV1 > v1)) {
yspeed = newV1;
target.yspeed = newV2;
}
maxSpeed = maxSpeed + random(2);
}
}
if (((target.hitTest(((_x - (_width / 2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, (_y * (1 / (100 / _root.game._yscale))) + _root.game._y, true) || (target.hitTest(((_x + (_width / 2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, (_y * (1 / (100 / _root.game._yscale))) + _root.game._y, true))) || (target.hitTest(((_x - (_width / 2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y + (_height / 3)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true))) || (target.hitTest(((_x + (_width / 2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y + (height / 3)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true))) {
var speedDiff = ((xspeed - target.xspeed) + (yspeed - target.yspeed));
if (speedDiff > 0) {
var sparkNo = speedDiff;
} else {
var sparkNo = (-speedDiff);
}
hitTimes = hitTimes + 1;
var v1 = xspeed;
var m1 = mass;
var v2 = target.xspeed;
var m2 = target.mass;
var newV1 = ((((m1 - m2) / (m1 + m2)) * v1) + (((2 * m2) / (m1 + m2)) * v2));
var newV2 = ((((2 * m1) / (m1 + m2)) * v1) - (((m1 - m2) / (m1 + m2)) * v2));
if (((target == _parent.player) && (targetCar == false)) && (life > 1)) {
_parent.player.hitTime = 0;
playerHitted = true;
} else if ((target != _parent.player) && (targetCar == false)) {
playerHitted = false;
}
if ((_x > target._x) && (newV1 > v1)) {
i = 0;
while (i < sparkNo) {
_root.game.effects.id = _root.game.effects.id + 1;
duplicateMovieClip (_parent.effects.spark, "spark" + _parent.effects.id, _parent.effects.id + 1);
_root.game.effects["spark" + _root.game.effects.id]._x = (_x - (_width / 2)) + random(_width / 3);
_root.game.effects["spark" + _root.game.effects.id]._y = (_y - (_height / 2)) + random(_height);
_root.game.effects["spark" + _root.game.effects.id].xspeed = _root.game.effects["spark" + _root.game.effects.id].xspeed + xspeed;
_root.game.effects["spark" + _root.game.effects.id].yspeed = _root.game.effects["spark" + _root.game.effects.id].yspeed + (yspeed * 2);
i = i + 1;
}
xspeed = newV1;
target.xspeed = newV2;
}
if ((_x < target._x) && (newV1 < v1)) {
i = 0;
while (i < sparkNo) {
_root.game.effects.id = _root.game.effects.id + 1;
duplicateMovieClip (_parent.effects.spark, "spark" + _parent.effects.id, _parent.effects.id + 1);
_root.game.effects["spark" + _root.game.effects.id]._x = (_x + (_width / 2)) - random(_width / 3);
_root.game.effects["spark" + _root.game.effects.id]._y = (_y - (_height / 2)) + random(_height);
_root.game.effects["spark" + _root.game.effects.id].xspeed = _root.game.effects["spark" + _root.game.effects.id].xspeed + xspeed;
_root.game.effects["spark" + _root.game.effects.id].yspeed = _root.game.effects["spark" + _root.game.effects.id].yspeed + (yspeed * 2);
i = i + 1;
}
xspeed = newV1;
target.xspeed = newV2;
}
life = life - (((sparkNo * 12) / mass) / 8);
}
}
}
i = i + 1;
}
var target = _parent.walls;
if ((target.hitTest((_x * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y - (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true) || (target.hitTest(((_x + (_width / 2.4)) * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y - (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true))) || (target.hitTest(((_x - (_width / 2.4)) * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y - (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true))) {
if (yspeed > 0) {
var sparkNo = yspeed;
}
if (yspeed < 0) {
var sparkNo = (-yspeed);
}
hitSounds();
i = 0;
while (i < (sparkNo / 4)) {
_root.game.effects.id = _root.game.effects.id + 1;
duplicateMovieClip (_parent.effects.spark, "spark" + _parent.effects.id, _parent.effects.id + 1);
_root.game.effects["spark" + _root.game.effects.id]._x = (_x + (_width / 2)) - random(_width / 3);
_root.game.effects["spark" + _root.game.effects.id]._y = (_y - (_height / 2)) + random(_height);
_root.game.effects["spark" + _root.game.effects.id].xspeed = _root.game.effects["spark" + _root.game.effects.id].xspeed + xspeed;
_root.game.effects["spark" + _root.game.effects.id].yspeed = _root.game.effects["spark" + _root.game.effects.id].yspeed + (yspeed * 2);
i = i + 1;
}
life = life - (((sparkNo * 12) / mass) / 2);
yspeed = (-yspeed) * 0.5;
}
if ((target.hitTest((_x * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y + (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true) || (target.hitTest(((_x + (_width / 2.2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y + (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true))) || (target.hitTest(((_x - (_width / 2.2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y + (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true))) {
var s1 = yspeed;
var s2 = target.yspeed;
var sDiff = 0;
if (((s1 < 0) && (s2 >= 0)) || ((s2 < 0) && (s1 >= 0))) {
if (s1 < 0) {
sDiff = s2 - s1;
} else {
sDiff = s1 - s2;
}
} else if ((s1 >= 0) && (s2 >= 0)) {
if (s1 > s2) {
sDiff = s1 - s2;
} else {
sDiff = s2 - s1;
}
} else {
sDiff = s1 - s2;
}
if (sDiff < 0) {
sDiff = -sDiff;
}
sparksNo = sDiff;
hitSounds();
i = 0;
while (i < (sparkNo / 4)) {
hitSounds();
_root.game.effects.id = _root.game.effects.id + 1;
duplicateMovieClip (_parent.effects.spark, "spark" + _parent.effects.id, _parent.effects.id + 1);
_root.game.effects["spark" + _root.game.effects.id]._x = (_x + (_width / 2)) - random(_width / 3);
_root.game.effects["spark" + _root.game.effects.id]._y = (_y - (_height / 2)) + random(_height);
_root.game.effects["spark" + _root.game.effects.id].xspeed = _root.game.effects["spark" + _root.game.effects.id].xspeed + xspeed;
_root.game.effects["spark" + _root.game.effects.id].yspeed = _root.game.effects["spark" + _root.game.effects.id].yspeed + (yspeed * 2);
i = i + 1;
}
life = life - (((sparkNo * 12) / mass) / 2);
yspeed = (-yspeed) * 0.5;
}
if (target.hitTest(((_x - (_width / 2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, (_y * (1 / (100 / _root.game._yscale))) + _root.game._y, true)) {
_x = (_x - (xspeed / 3));
xspeed = (-xspeed) * 0.2;
if (yspeed > 0) {
var sparkNo = yspeed;
}
if (yspeed < 0) {
var sparkNo = (-yspeed);
}
if ((sparkNo / 4) > 1) {
hitSounds();
}
hitSounds();
i = 0;
while (i < (sparkNo / 4)) {
_root.game.effects.id = _root.game.effects.id + 1;
duplicateMovieClip (_parent.effects.spark, "spark" + _parent.effects.id, _parent.effects.id + 1);
_root.game.effects["spark" + _root.game.effects.id]._x = (_x - (_width / 2)) + random(_width / 3);
_root.game.effects["spark" + _root.game.effects.id]._y = (_y - (_height / 2)) + random(_height);
_root.game.effects["spark" + _root.game.effects.id].xspeed = _root.game.effects["spark" + _root.game.effects.id].xspeed + xspeed;
_root.game.effects["spark" + _root.game.effects.id].yspeed = _root.game.effects["spark" + _root.game.effects.id].yspeed + (yspeed * 2);
i = i + 1;
}
life = life - (((sparkNo * 12) / mass) / 6);
}
if (target.hitTest(((_x + (_width / 2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, (_y * (1 / (100 / _root.game._yscale))) + _root.game._y, true)) {
_x = (_x - (xspeed / 3));
xspeed = (-xspeed) * 0.2;
if (yspeed > 0) {
var sparkNo = yspeed;
}
if (yspeed < 0) {
var sparkNo = (-yspeed);
}
if ((sparkNo / 4) > 1) {
hitSounds();
}
i = 0;
while (i < (sparkNo / 4)) {
_root.game.effects.id = _root.game.effects.id + 1;
duplicateMovieClip (_parent.effects.spark, "spark" + _parent.effects.id, _parent.effects.id + 1);
_root.game.effects["spark" + _root.game.effects.id]._x = (_x + (_width / 2)) - random(_width / 3);
_root.game.effects["spark" + _root.game.effects.id]._y = (_y - (_height / 2)) + random(_height);
_root.game.effects["spark" + _root.game.effects.id].xspeed = _root.game.effects["spark" + _root.game.effects.id].xspeed + xspeed;
_root.game.effects["spark" + _root.game.effects.id].yspeed = _root.game.effects["spark" + _root.game.effects.id].yspeed + (yspeed * 2);
i = i + 1;
}
life = life - (((sparkNo * 12) / mass) / 6);
}
if (_root.game.sound.type == 2) {
var dist = Math.sqrt(((_x - _root.game.sound._x) * (_x - _root.game.sound._x)) + ((_y - _root.game.sound._y) * (_y - _root.game.sound._y)));
if (dist < 300) {
interestX = _root.game.sound._x;
interestY = _root.game.sound._y;
interestLevel = interestLevel + 50;
}
if (dist < (_root.game.sound.size * 2)) {
life = life - (((_root.game.sound.size * 2) - dist) / 8);
var adjside = (_root.game.sound._x - _x);
var oppside = (-1 * (_root.game.sound._y - _y));
var angle = Math.atan2(oppside, adjside);
angle = (angle / 3.141593) * 180;
var throwRot = (-1 * angle);
xspeed = xspeed - (Math.cos(throwRot * 0.01745329) * (((_root.game.sound.size * 2) - dist) / (10 * mass)));
yspeed = yspeed + (Math.sin(throwRot * 0.01745329) * (((_root.game.sound.size * 2) - dist) / (10 * mass)));
}
}
if ((life < -75) && (exploded == false)) {
exploded = true;
_root.id = _root.id + 1;
_root.game.expTargetX = _x;
_root.game.expTargetY = _y;
_root.game.expSize = _height;
_root.game.expSize = _height;
trace("exp552");
_root.blastsnd.setVolume(20);
_root.blastsnd.start();
duplicateMovieClip (_root.game.explosion, "explosion" + _root.id, _root.id + 300);
_root.game["explosion" + _root.id]._x = _x;
_root.game["explosion" + _root.id]._y = _y;
_root.game["explosion" + _root.id]._height = _root.game.expSize / 2.5;
_root.game["explosion" + _root.id]._width = _root.game.expSize / 2.5;
_root.game["explosion" + _root.id].sizeE = _root.game.expSize * 2;
i = 0;
while (i < 4) {
_root.game.effects2.id = _root.game.effects2.id + 1;
duplicateMovieClip (_parent.effects2.tire, "spark" + _parent.effects2.id, _parent.effects2.id + 1);
_root.game.effects2["spark" + _root.game.effects2.id]._x = _x;
_root.game.effects2["spark" + _root.game.effects2.id]._y = _y;
i = i + 1;
}
}
if ((life < 50) && (life > -75)) {
timerSmoke = timerSmoke + 1;
if (timerSmoke > 1) {
_root.game.effects.id = _root.game.effects.id + 1;
duplicateMovieClip (_parent.effects.smoke, "spark" + _parent.effects.id, _parent.effects.id + 1);
_root.game.effects["spark" + _root.game.effects.id]._x = _x;
_root.game.effects["spark" + _root.game.effects.id]._y = _y;
_root.game.effects["spark" + _root.game.effects.id]._height = _root.game.effects["spark" + _root.game.effects.id]._height + _root.game.player.yspeed;
_root.game.effects["spark" + _root.game.effects.id].xspeed = _root.game.effects["spark" + _root.game.effects.id].xspeed + xspeed;
_root.game.effects["spark" + _root.game.effects.id].yspeed = _root.game.effects["spark" + _root.game.effects.id].yspeed + (yspeed * 2);
timerSmoke = 0;
}
}
if (life < -75) {
timerSmoke = timerSmoke + 1;
if (timerSmoke > 1) {
_root.game.effects.id = _root.game.effects.id + 1;
duplicateMovieClip (_parent.effects.smoke2, "spark" + _parent.effects.id, _parent.effects.id + 1);
_root.game.effects["spark" + _root.game.effects.id]._x = _x;
_root.game.effects["spark" + _root.game.effects.id]._y = _y;
_root.game.effects["spark" + _root.game.effects.id]._height = _root.game.effects["spark" + _root.game.effects.id]._height + _root.game.player.yspeed;
_root.game.effects["spark" + _root.game.effects.id].xspeed = _root.game.effects["spark" + _root.game.effects.id].xspeed + xspeed;
_root.game.effects["spark" + _root.game.effects.id].yspeed = _root.game.effects["spark" + _root.game.effects.id].yspeed + (yspeed * 2);
timerSmoke = 0;
}
}
if (life > 0) {
if ((_x + xspeed) < targetX) {
xspeed = xspeed + 0.2;
} else if ((_x < targetX) && (xspeed > 0)) {
xspeed = xspeed * 0.97;
}
if ((_x + xspeed) > targetX) {
xspeed = xspeed - 0.2;
}
if ((_x > targetX) && (xspeed < 0)) {
xspeed = xspeed * 0.97;
}
if (up == false) {
if (yspeed > (-maxSpeed)) {
yspeed = yspeed - (maxSpeed / 30);
}
_rotation = (((xspeed * 3) + spin) + 180);
} else {
var laneChange = random(500);
if (laneChange == 10) {
var chooseLane = (1 + random(3));
lane = _root.game["lane" + chooseLane];
targetX = lane.targetX;
maxSpeed = lane.maxSpeed;
}
if (yspeed < maxSpeed) {
yspeed = yspeed + (maxSpeed / 30);
}
_rotation = ((xspeed * 6) / mass);
}
} else {
_rotation = (_rotation + ((xspeed * 10) / mass));
}
if ((life < 0) && (targetCar != true)) {
if (playerHitted == true) {
playerHitted = false;
}
}
if ((_name != "car") && (targetCar != true)) {
if ((_y > 600) || (_y < -1700)) {
_root.carsAlive = _root.carsAlive - 1;
engineSound.stop();
removeMovieClip(this);
}
}
xspeed = xspeed * 0.97;
yspeed = yspeed * 0.97;
showy = _y;
showx = _x;
_x = (_x + xspeed);
_y = (_y - ((-_parent.player.yspeed) + yspeed));
if (targetCar == true) {
_root.game.targetShow._x = _x;
_root.game.targetShow._y = _y;
var pScore = (10 - Math.ceil(life / 10));
if (pScore < 1) {
pScore = 1;
}
_root.game.targetShow.arrowMc.arrowSubMc.gotoAndStop(pScore);
}
}
}
Instance of Symbol 570 MovieClip "targetShow" in Symbol 973 MovieClip Frame 1
onClipEvent (enterFrame) {
this.swapDepths(501);
}
Instance of Symbol 575 MovieClip in Symbol 973 MovieClip Frame 1
onClipEvent (load) {
timer = 0;
spawnTime = 200;
startX = _x;
newLane = none;
oldLane = alsoNone;
lastCar = none;
createCar = true;
targetSpawned = false;
}
onClipEvent (enterFrame) {
if (_root.nextCar == true) {
var amount = (1 + random(4));
_x = _root.game["lane" + amount]._x;
newLane = _root.game["lane" + amount];
} else {
var amount = (1 + random(4));
_x = _root.game["lane" + amount]._x;
newLane = _root.game["lane" + amount];
}
timer = timer + (_root.game.player.yspeed + random(_root.game.player.yspeed / 2));
if (newLane != oldLane) {
if (lastCar._y < (_y + lastCar._height)) {
createCar = false;
} else {
createCar = true;
}
} else {
createCar = false;
}
if ((((timer > spawnTime) && (_root.carsAlive < _root.maxCars)) && (createCar == true)) && (_root.carId != 10)) {
_root.carsAlive = _root.carsAlive + 1;
_root.carId = _root.carId + 1;
if (_root.game["car" + _root.carId]._x == undefined) {
duplicateMovieClip (_parent.car, "car" + _root.carId, _root.carId + 151);
if (_root.nextCar == true) {
_root.game["car" + _root.carId]._x = (_x - 2) + random(4);
_root.game["car" + _root.carId]._y = _y;
_root.game["car" + _root.carId].lane = _root.game["lane" + amount];
_root.game["car" + _root.carId].laneId = 2;
_root.game["car" + _root.carId].targetCar = true;
_root.nextCar = false;
} else {
_root.game["car" + _root.carId]._x = (_x - 2) + random(4);
_root.game["car" + _root.carId]._y = _y;
_root.game["car" + _root.carId].lane = _root.game["lane" + amount];
_root.game["car" + _root.carId].laneId = amount;
_root.game["car" + _root.carId].targetCar = false;
}
lastCar = _root.game["car" + _root.carId];
timer = 0;
}
oldLane = _root.game["lane" + amount];
}
}
Instance of Symbol 576 MovieClip "prop" in Symbol 973 MovieClip Frame 1
onClipEvent (load) {
startY = _y;
yspeed = 0;
xspeed = 0;
hitTimes = 0;
}
onClipEvent (enterFrame) {
if (_parent.player.hitTest((_x * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y + _parent.player.yspeed) * (1 / (100 / _root.game._yscale))) + _root.game._y, true)) {
hitTimes = hitTimes + 1;
if (_currentframe == 1) {
yspeed = yspeed - _parent.player.yspeed;
} else {
yspeed = yspeed - (_parent.player.yspeed * 0.5);
}
xspeed = xspeed + (((_x - _parent.player._x) / 40) + (_parent.player.xspeed / 2));
_parent.player.yspeed = _parent.player.yspeed / 1.01;
gotoAndStop (2);
}
if (hitTimes > 10) {
_root.hud.displayText = "Cone carrying bonus 200 points!";
_root.hud.score = _root.hud.score + 200;
}
var target = _parent.walls;
if (target.hitTest((_x * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y - (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true)) {
yspeed = (-yspeed) * 0.5;
}
if (target.hitTest((_x * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y + (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true) && (yspeed + _root.game.player.yspeed)) {
yspeed = (-yspeed) * 0.5;
}
if (target.hitTest(((_x - (_width / 2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, (_y * (1 / (100 / _root.game._yscale))) + _root.game._y, true) && (xspeed < 0)) {
_x = (_x - xspeed);
xspeed = (-xspeed) * 0.2;
}
if (target.hitTest(((_x + (_width / 2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, (_y * (1 / (100 / _root.game._yscale))) + _root.game._y, true) && (xspeed > 0)) {
_x = (_x - xspeed);
xspeed = (-xspeed) * 0.2;
}
xspeed = xspeed * 0.97;
yspeed = yspeed * 0.97;
showy = _y;
showx = _x;
_rotation = (_rotation + ((xspeed + yspeed) * 4));
_x = (_x + xspeed);
_y = (_y + (_parent.player.yspeed + yspeed));
}
Instance of Symbol 947 MovieClip "player" in Symbol 973 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop (1);
_root.reloadComplete = true;
maxSpeed = 50;
yspeed = 50;
xspeed = 0;
mass = ((_height + _width) / 33) * 5;
maxLife = 400;
life = maxLife;
slowTimer = 0;
origWidth = _width;
this.swapDepths(2);
yspeed = 60;
exploded = false;
smokeTime = 0;
hitTime = 0;
skidPlaying = false;
rev = true;
revLength = 0;
explodeTimer = 10;
colorArr = ["0x339999", "0x99CC66", "0x993333", "0xCCCC66"];
}
onClipEvent (enterFrame) {
if (_root.hud.speed >= 200) {
skidActive = true;
}
if (Key.isDown(40)) {
}
if (skidActive == true) {
if (Key.isDown(40)) {
} else {
skidActive = false;
}
}
if ((skidActive == true) && (_root.hud.speed <= 30)) {
_root.skidDone = true;
}
if (_root.game.cars.hitTest((_x * (1 / (100 / _root.game._xscale))) + _root.game._x, (_y * (1 / (100 / _root.game._yscale))) + _root.game._y, true) && (yspeed > 30)) {
hitTime = hitTime + 1;
} else if (hitTime > 0) {
hitTime = 0;
} else {
hitTime = 0;
}
if (yspeed < 0) {
yspeed = yspeed - (yspeed / 2);
}
if ((yspeed / 5) < 3.5) {
var turnSpeed = (yspeed / 5);
} else {
turnSpeed = 3.5;
}
if ((_root.gocar && (yspeed < maxSpeed)) && (life > 0)) {
}
if ((Key.isDown(38) && (yspeed < maxSpeed)) && (life > 0)) {
yspeed = yspeed + 0.8;
}
if ((Key.isDown(32) && (yspeed > 0)) && (life > 0)) {
_root.pressspace = true;
} else {
if (turnSpeed > 3.5) {
turnSpeed = turnSpeed - 0.1;
}
skidPlaying = false;
skidSound.stop();
}
if (Key.isDown(39) && (life > 0)) {
xspeed = xspeed + turnSpeed;
}
if (Key.isDown(37) && (life > 0)) {
xspeed = xspeed - turnSpeed;
}
_rotation = (xspeed / 2);
xspeed = xspeed * 0.8;
_x = (_x + xspeed);
yspeed = yspeed * 0.99;
showx = _x;
showy = _y;
if (life < 0) {
explodeTimer = explodeTimer + 1;
}
if ((life < 0) && (explodeTimer > 20)) {
explodeTimer = 0;
exploded = true;
_root.id = _root.id + 1;
_root.game.expTargetX = _x;
_root.game.expTargetY = _y;
_root.game.expSize = _height;
_root.game.expSize = _height;
duplicateMovieClip (_root.game.explosion, "explosion" + _root.id, _root.id + 1);
_root.game["explosion" + _root.id]._x = _x;
_root.game["explosion" + _root.id]._y = _y;
_root.game["explosion" + _root.id]._height = _root.game.expSize / 3;
_root.game["explosion" + _root.id]._width = _root.game.expSize / 3;
_root.game["explosion" + _root.id].sizeE = _root.game.expSize * 2;
}
if (life < 40) {
smokeTime = smokeTime + (yspeed / 5);
if (smokeTime > 5) {
_root.game.effects.id = _root.game.effects.id + 1;
duplicateMovieClip (_parent.effects.smoke, "spark" + _parent.effects.id, _parent.effects.id + 1);
_root.game.effects["spark" + _root.game.effects.id]._x = _x;
_root.game.effects["spark" + _root.game.effects.id]._y = _y - (_height / 2);
_root.game.effects["spark" + _root.game.effects.id]._height = _root.game.effects["spark" + _root.game.effects.id]._height + yspeed;
_root.game.effects["spark" + _root.game.effects.id].xspeed = _root.game.effects["spark" + _root.game.effects.id].xspeed + xspeed;
_root.game.effects["spark" + _root.game.effects.id].yspeed = yspeed;
_root.game.effects.id = _root.game.effects.id + 1;
smokeTime = 0;
}
}
var target = _parent.walls;
if ((target.hitTest((_x * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y - (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true) || (target.hitTest(((_x + (_width / 3)) * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y - (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true))) || (target.hitTest(((_x - (_width / 3)) * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y - (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true))) {
if (yspeed > 0) {
life = life - yspeed;
} else {
life = life + yspeed;
}
yspeed = (-yspeed) * 1;
}
if (target.hitTest((_x * (1 / (100 / _root.game._xscale))) + _root.game._x, ((_y + (_height / 2)) * (1 / (100 / _root.game._yscale))) + _root.game._y, true) && (yspeed + _root.game.player.yspeed)) {
if (yspeed > 0) {
life = life - yspeed;
} else {
life = life + yspeed;
}
_y = (_y - yspeed);
yspeed = (-yspeed) * 1;
}
if (target.hitTest(((_x - (_width / 2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, (_y * (1 / (100 / _root.game._yscale))) + _root.game._y, true) && (xspeed < 0)) {
_x = (_x - xspeed);
xspeed = (-xspeed) * 0.2;
var sparkNo = ((yspeed / 5) - 2);
life = life - (sparkNo / 5);
i = 0;
while (i < sparkNo) {
_root.game.effects.id = _root.game.effects.id + 1;
duplicateMovieClip (_root.game.effects.spark, "spark" + _root.game.effects.id, _root.game.effects.id + 1);
_root.game.effects["spark" + _root.game.effects.id]._x = (_x - (_width / 2)) + random(_width / 3);
_root.game.effects["spark" + _root.game.effects.id]._y = (_y - (_height / 2)) + random(_height);
_root.game.effects["spark" + _root.game.effects.id].xspeed = _root.game.effects["spark" + _root.game.effects.id].xspeed + xspeed;
_root.game.effects["spark" + _root.game.effects.id].yspeed = _root.game.effects["spark" + _root.game.effects.id].yspeed + (yspeed * 2);
i = i + 1;
}
i = 0;
while (i < (sparkNo / 4)) {
_root.game.effects.id = _root.game.effects.id + 1;
duplicateMovieClip (_root.game.effects.paint, "spark" + _root.game.effects.id, _root.game.effects.id + 1);
_root.game.effects["spark" + _root.game.effects.id]._x = (_x - (_width / 2)) + random(_width / 3);
_root.game.effects["spark" + _root.game.effects.id]._y = (_y - (_height / 2)) + random(_height);
_root.game.effects["spark" + _root.game.effects.id].xspeed = _root.game.effects["spark" + _root.game.effects.id].xspeed + xspeed;
_root.game.effects["spark" + _root.game.effects.id].yspeed = yspeed * 1.5;
i = i + 1;
}
}
if (target.hitTest(((_x + (_width / 2)) * (1 / (100 / _root.game._xscale))) + _root.game._x, (_y * (1 / (100 / _root.game._yscale))) + _root.game._y, true) && (xspeed > 0)) {
_x = (_x - xspeed);
xspeed = (-xspeed) * 0.2;
var sparkNo = ((yspeed / 5) - 2);
life = life - (sparkNo / 5);
i = 0;
while (i < sparkNo) {
_root.game.effects.id = _root.game.effects.id + 1;
duplicateMovieClip (_root.game.effects.spark, "spark" + _root.game.effects.id, _parent.effects.id + 1);
var pColor = new Color(_root.game.effects["spark" + _root.game.effects.id]);
_root.game.effects["spark" + _root.game.effects.id]._x = (_x + (_width / 2)) - random(_width / 3);
_root.game.effects["spark" + _root.game.effects.id]._y = (_y - (_height / 2)) + random(_height);
_root.game.effects["spark" + _root.game.effects.id].xspeed = _root.game.effects["spark" + _root.game.effects.id].xspeed + xspeed;
_root.game.effects["spark" + _root.game.effects.id].yspeed = _root.game.effects["spark" + _root.game.effects.id].yspeed + (yspeed * 2);
i = i + 1;
}
i = 0;
while (i < (sparkNo / 4)) {
_root.game.effects.id = _root.game.effects.id + 1;
duplicateMovieClip (_root.game.effects.paint, "spark" + _root.game.effects.id, _parent.effects.id + 1);
_root.game.effects["spark" + _root.game.effects.id]._x = (_x + (_width / 2)) - random(_width / 3);
_root.game.effects["spark" + _root.game.effects.id]._y = (_y - (_height / 2)) + random(_height);
_root.game.effects["spark" + _root.game.effects.id].xspeed = _root.game.effects["spark" + _root.game.effects.id].xspeed + xspeed;
_root.game.effects["spark" + _root.game.effects.id].yspeed = yspeed * 1.5;
i = i + 1;
}
}
if (_root.game.slower.hitTest((_x * (1 / (100 / _root.game._xscale))) + _root.game._x, (_y * (1 / (100 / _root.game._yscale))) + _root.game._y, true)) {
if ((_x * (1 / (100 / _root.game._xscale))) < 0) {
_root.pavementTime = _root.pavementTime + 1;
}
if (slowTimer < 20) {
slowTimer = slowTimer + 1;
} else {
yspeed = yspeed * 0.98;
}
} else if (slowTimer > 0) {
slowTimer = slowTimer - 1;
}
if (_root.game.sound.type == 2) {
var dist = Math.sqrt(((_x - _root.game.sound._x) * (_x - _root.game.sound._x)) + ((_y - _root.game.sound._y) * (_y - _root.game.sound._y)));
if (dist < 300) {
interestX = _root.game.sound._x;
interestY = _root.game.sound._y;
interestLevel = interestLevel + 50;
}
if (dist < (_root.game.sound.size * 2)) {
life = life - (((_root.game.sound.size * 2) - dist) / 50);
var adjside = (_root.game.sound._x - _x);
var oppside = (-1 * (_root.game.sound._y - _y));
var angle = Math.atan2(oppside, adjside);
angle = (angle / 3.141593) * 180;
var throwRot = (-1 * angle);
xspeed = xspeed - (Math.cos(throwRot * 0.01745329) * (((_root.game.sound.size * 2) - dist) / (5 * mass)));
yspeed = yspeed + (Math.sin(throwRot * 0.01745329) * (((_root.game.sound.size * 2) - dist) / (5 * mass)));
}
}
}
Instance of Symbol 598 MovieClip "gun" in Symbol 973 MovieClip Frame 1
onClipEvent (load) {
targetC = _parent.targetShow;
}
onClipEvent (enterFrame) {
if (_root.pressspace == true) {
_root.pressspace = false;
if (_root.reloadComplete == true) {
_root.reloadComplete = false;
_root.bulletmc = _parent.attachMovie("bullet", "bullet" + _root.bulletnum, _root.getNextHighestDepth());
randomNum = random(20) - 10;
bulletAngle = (((_rotation + randomNum) - 90) * Math.PI) / 180;
_root.bulletmc.xSpeed = Math.cos(_root.gunangles) * 10;
_root.bulletmc.ySpeed = Math.sin(_root.gunangles) * 10;
_root.bulletmc._x = _root.game.gun._x;
_root.bulletmc._y = _root.game.gun._y;
_root.bspeed = 10;
_root.bulletnum++;
}
}
if ((_root.hud.targetDisplay.pDist < 1) && (_root.nextCar == false)) {
_alpha = 0;
} else {
_alpha = 0;
}
_x = _root.game.player._x;
this.swapDepths(_root.game.getNextHighestDepth());
var adjside = (targetC._x - _x);
var oppside = (-1 * (targetC._y - _y));
var angle = Math.atan2(oppside, adjside);
angle = (angle / 3.141593) * 180;
_root.gunangles = angle;
if (angle > 0) {
}
}
Instance of Symbol 619 MovieClip "effects" in Symbol 973 MovieClip Frame 1
onClipEvent (load) {
id = 0;
}
onClipEvent (enterFrame) {
this.swapDepths(300);
if (id > 50) {
id = 0;
}
}
Instance of Symbol 632 MovieClip "explosion" in Symbol 973 MovieClip Frame 1
onClipEvent (load) {
var sizeE;
if ((_x - _root.game.player._x) > 100) {
pan = 100;
} else if ((_x - _root.game.player._x) < -100) {
pan = -100;
} else {
pan = _x - _root.game.player._x;
}
vol = 100 - (Math.sqrt(((_x - _root.game.player._x) * (_x - _root.game.player._x)) + ((_y - _root.game.player._y) * (_y - _root.game.player._y))) / 10);
if (vol > 100) {
vol = 100;
}
if (vol < 0) {
vol = 0;
}
if (_name == "explosion") {
_visible = false;
} else {
explosionSound = new Sound(this);
explosionSound.attachSound("explosion");
explosionSound.setPan(pan);
explosionSound.setVolume(vol);
explosionSound.start(0, 0);
explosionSound.setPan(pan);
explosionSound.setVolume(vol);
}
time = 100;
}
onClipEvent (enterFrame) {
_y = (_y + _root.game.player.yspeed);
if ((_x - _root.game.player._x) > 100) {
pan = 100;
} else if ((_x - _root.game.player._x) < -100) {
pan = -100;
} else {
pan = _x - _root.game.player._x;
}
vol = 100 - (Math.sqrt(((_x - _root.game.player._x) * (_x - _root.game.player._x)) + ((_y - _root.game.player._y) * (_y - _root.game.player._y))) / 10);
if (vol > 100) {
vol = 100;
}
if (vol < 0) {
vol = 0;
}
explosionSound.setPan(pan);
explosionSound.setVolume(vol);
}
Instance of Symbol 619 MovieClip "effects2" in Symbol 973 MovieClip Frame 1
onClipEvent (load) {
id = 0;
_x = 0;
_y = 0;
}
onClipEvent (enterFrame) {
this.swapDepths(1);
if (id > 50) {
id = 0;
}
}
Instance of Symbol 634 MovieClip in Symbol 973 MovieClip Frame 1
onClipEvent (enterFrame) {
this._alpha = 0;
this.swapDepths(1001);
}
Instance of Symbol 646 MovieClip in Symbol 973 MovieClip Frame 1
onClipEvent (load) {
targetC = _parent.targetShow;
}
onClipEvent (enterFrame) {
if ((_root.hud.targetDisplay.pDist < 1) && (_root.nextCar == false)) {
_alpha = 100;
} else {
_alpha = 0;
}
_x = _root.game.player._x;
this.swapDepths(_root.game.getNextHighestDepth());
var adjside = (targetC._x - _x);
var oppside = (-1 * (targetC._y - _y));
var angle = Math.atan2(oppside, adjside);
angle = (angle / 3.141593) * 180;
_rotation = (-1 * angle);
}
Symbol 985 MovieClip Frame 20
stop();
Symbol 986 MovieClip Frame 15
stop();
Symbol 990 Button
on (release) {
gotoandplaylevel();
}
on (rollOver) {
_root.btnsnd.start();
}
Symbol 995 Button
on (press) {
submitScore();
}
on (release) {
gotoAndPlay ("menuanimation");
}
on (rollOver) {
_root.btnsnd.start();
}
Symbol 1052 MovieClip Frame 19
Symbol 1052 MovieClip Frame 45
Symbol 1052 MovieClip Frame 74
stop();
Symbol 1054 MovieClip Frame 21
stop();
Symbol 1055 MovieClip Frame 15
stop();
Symbol 1059 Button
on (release) {
gotoAndStop ("menuanimation");
}
on (rollOver) {
_root.btnsnd.start();
}
Symbol 1118 MovieClip Frame 85
stop();