Frame 1
this.onEnterFrame = function () {
var _local1 = this;
if (_local1.getBytesLoaded() >= _local1.getBytesTotal()) {
gotoAndPlay (2);
delete _local1.onEnterFrame;
}
};
Frame 2
function startGame() {
gotoAndPlay (4);
}
function showInstructions() {
nextFrame();
}
function replay() {
_root.interface.removeMovieClip();
gotoAndStop (98);
}
function saveScore() {
gtbInfo_so.flush();
}
function checkScore() {
if (control.score >= gtbInfo_so.data.highScore) {
gtbInfo_so.data.highScore = control.score;
saveScore();
}
if (gtbInfo_so.data.highScore != undefined) {
hiscoreText.text = "HIGH SCORE: " + gtbInfo_so.data.highScore;
} else {
hiscoreText.text = "HIGH SCORE: N/A";
}
}
stop();
interface.removeMovieClip();
instructions._visible = 0;
gtbInfo_so = SharedObject.getLocal("gtbInfo");
checkScore();
themeSound = new Sound();
themeSound.attachSound("siren_theme");
themeSound.start();
Instance of Symbol 399 MovieClip "playButton" in Frame 2
//component parameters
onClipEvent (initialize) {
label = "";
wide = 60;
c1 = 255;
c2 = 188;
c3 = 0;
hc1 = 230;
hc2 = 235;
hc3 = 156;
baseMode = false;
widthMode = true;
rgb = 16759808 /* 0xFFBC00 */;
rb = 255;
gb = 255;
bb = 255;
hilitergb = 15133596 /* 0xE6EB9C */;
}
Instance of Symbol 399 MovieClip "instructionsButton" in Frame 2
//component parameters
onClipEvent (initialize) {
label = "";
wide = 133;
c1 = 255;
c2 = 188;
c3 = 0;
hc1 = 230;
hc2 = 235;
hc3 = 156;
baseMode = true;
widthMode = true;
rgb = 16759808 /* 0xFFBC00 */;
rb = 255;
gb = 255;
bb = 255;
hilitergb = 15133596 /* 0xE6EB9C */;
}
Frame 98
_global.jmsCurrentCop = "none";
_global.jmsPreviousCop = "none";
_global.shoutAvail = 0;
_global.gamePath = "/games/assets/reno/petty_theft/";
jmsPosSound0 = new Sound(jmsSound0);
jmsPosSound1 = new Sound(jmsSound1);
jmsPosSound2 = new Sound(jmsSound2);
jmsPosSound3 = new Sound(jmsSound3);
jmsPosSound4 = new Sound(jmsSound4);
jmsPosSound5 = new Sound(jmsSound5);
jmsPosSound6 = new Sound(jmsSound6);
jmsNegSound0 = new Sound(jmsSound7);
jmsNegSound1 = new Sound(jmsSound8);
jmsNegSound2 = new Sound(jmsSound9);
jmsNegSound3 = new Sound(jmsSound10);
jmsNegSound4 = new Sound(jmsSound11);
jmsNegSound5 = new Sound(jmsSound12);
jmsNegSound6 = new Sound(jmsSound13);
jmsPosSound0.onSoundComplete = function () {
_global.shoutAvail = 1;
};
jmsPosSound1.onSoundComplete = function () {
_global.shoutAvail = 1;
};
jmsPosSound2.onSoundComplete = function () {
_global.shoutAvail = 1;
};
jmsPosSound3.onSoundComplete = function () {
_global.shoutAvail = 1;
};
jmsPosSound4.onSoundComplete = function () {
_global.shoutAvail = 1;
};
jmsPosSound5.onSoundComplete = function () {
_global.shoutAvail = 1;
};
jmsPosSound6.onSoundComplete = function () {
_global.shoutAvail = 1;
};
jmsNegSound0.onSoundComplete = function () {
_global.shoutAvail = 1;
};
jmsNegSound1.onSoundComplete = function () {
_global.shoutAvail = 1;
};
jmsNegSound2.onSoundComplete = function () {
_global.shoutAvail = 1;
};
jmsNegSound3.onSoundComplete = function () {
_global.shoutAvail = 1;
};
jmsNegSound4.onSoundComplete = function () {
_global.shoutAvail = 1;
};
jmsNegSound5.onSoundComplete = function () {
_global.shoutAvail = 1;
};
jmsNegSound6.onSoundComplete = function () {
_global.shoutAvail = 1;
};
jmsHitBike = [jmsNegSound0, jmsNegSound1, jmsNegSound2, jmsNegSound3, jmsNegSound4, jmsNegSound5, jmsNegSound6];
jmsInPursuit = [jmsPosSound0, jmsPosSound1, jmsPosSound2, jmsPosSound3, jmsPosSound4, jmsPosSound5, jmsPosSound6];
jmsActions.onEnterFrame = function () {
var _local1 = _global;
var _local3 = _root;
currentTime = getTimer() / 1000;
if (_local1.jmsPreviousCop != "none") {
if ((currentTime - _local3.shoutMark) >= (random(5) + 10)) {
if (_local1.shoutAvail == 1) {
_local1.shoutAvail = 0;
_local3.posSounds[random(7)].start();
_local3.shoutMark = currentTime;
}
}
}
_local3.posSounds = jmsInPursuit;
_local3.negSounds = jmsHitBike;
if ((jmsCurrentCop == "garcia") && (jmsCurrentCop != jmsPreviousCop)) {
_local1.jmsCurrentCop = "none";
_local1.jmsPreviousCop = "garcia";
var _local2 = _local1.gamePath + "new_sounds/garcia/in_pursuit/";
jmsPosSound0.loadSound(_local2 + "01.mp3", false);
jmsPosSound1.loadSound(_local2 + "02.mp3", false);
jmsPosSound2.loadSound(_local2 + "03.mp3", false);
jmsPosSound3.loadSound(_local2 + "04.mp3", false);
jmsPosSound4.loadSound(_local2 + "01.mp3", false);
jmsPosSound5.loadSound(_local2 + "02.mp3", false);
jmsPosSound6.loadSound(_local2 + "03.mp3", false);
_local2 = _local1.gamePath + "new_sounds/garcia/hit_bike/";
jmsNegSound0.loadSound(_local2 + "01.mp3", false);
jmsNegSound1.loadSound(_local2 + "02.mp3", false);
jmsNegSound2.loadSound(_local2 + "03.mp3", false);
jmsNegSound3.loadSound(_local2 + "04.mp3", false);
jmsNegSound4.loadSound(_local2 + "05.mp3", false);
jmsNegSound5.loadSound(_local2 + "06.mp3", false);
jmsNegSound6.loadSound(_local2 + "01.mp3", false);
} else if ((jmsCurrentCop == "junior") && (jmsCurrentCop != jmsPreviousCop)) {
_local1.jmsCurrentCop = "none";
_local1.jmsPreviousCop = "junior";
var _local2 = _local1.gamePath + "new_sounds/junior/in_pursuit/";
jmsPosSound1.loadSound(_local2 + "01.mp3", false);
jmsPosSound2.loadSound(_local2 + "02.mp3", false);
jmsPosSound3.loadSound(_local2 + "03.mp3", false);
jmsPosSound4.loadSound(_local2 + "04.mp3", false);
jmsPosSound5.loadSound(_local2 + "01.mp3", false);
jmsPosSound6.loadSound(_local2 + "02.mp3", false);
jmsPosSound7.loadSound(_local2 + "03.mp3", false);
_local2 = _local1.gamePath + "new_sounds/junior/hit_bike/";
jmsNegSound1.loadSound(_local2 + "01.mp3", false);
jmsNegSound2.loadSound(_local2 + "02.mp3", false);
jmsNegSound3.loadSound(_local2 + "03.mp3", false);
jmsNegSound4.loadSound(_local2 + "04.mp3", false);
jmsNegSound5.loadSound(_local2 + "01.mp3", false);
jmsNegSound6.loadSound(_local2 + "02.mp3", false);
jmsNegSound7.loadSound(_local2 + "03.mp3", false);
} else if ((jmsCurrentCop == "johnson") && (jmsCurrentCop != jmsPreviousCop)) {
_local1.jmsCurrentCop = "none";
_local1.jmsPreviousCop = "johnson";
jmsPosSound1.loadSound(_local1.gamePath + "new_sounds/johnson/in_pursuit/01.mp3", false);
jmsPosSound2.loadSound(_local1.gamePath + "new_sounds/johnson/in_pursuit/02.mp3", false);
jmsPosSound3.loadSound(_local1.gamePath + "new_sounds/johnson/in_pursuit/03.mp3", false);
jmsPosSound4.loadSound(_local1.gamePath + "new_sounds/johnson/in_pursuit/01.mp3", false);
jmsPosSound5.loadSound(_local1.gamePath + "new_sounds/johnson/in_pursuit/02.mp3", false);
jmsPosSound6.loadSound(_local1.gamePath + "new_sounds/johnson/in_pursuit/03.mp3", false);
jmsPosSound7.loadSound(_local1.gamePath + "new_sounds/johnson/in_pursuit/01.mp3", false);
jmsNegSound1.loadSound(_local1.gamePath + "new_sounds/johnson/hit_bike/01.mp3", false);
jmsNegSound2.loadSound(_local1.gamePath + "new_sounds/johnson/hit_bike/02.mp3", false);
jmsNegSound3.loadSound(_local1.gamePath + "new_sounds/johnson/hit_bike/03.mp3", false);
jmsNegSound4.loadSound(_local1.gamePath + "new_sounds/johnson/hit_bike/01.mp3", false);
jmsNegSound5.loadSound(_local1.gamePath + "new_sounds/johnson/hit_bike/02.mp3", false);
jmsNegSound6.loadSound(_local1.gamePath + "new_sounds/johnson/hit_bike/03.mp3", false);
jmsNegSound7.loadSound(_local1.gamePath + "new_sounds/johnson/hit_bike/01.mp3", false);
} else if ((jmsCurrentCop == "jones") && (jmsCurrentCop != jmsPreviousCop)) {
_local1.jmsCurrentCop = "none";
_local1.jmsPreviousCop = "jones";
jmsPosSound1.loadSound(_local1.gamePath + "new_sounds/jones/in_pursuit/01.mp3", false);
jmsPosSound2.loadSound(_local1.gamePath + "new_sounds/jones/in_pursuit/02.mp3", false);
jmsPosSound3.loadSound(_local1.gamePath + "new_sounds/jones/in_pursuit/03.mp3", false);
jmsPosSound4.loadSound(_local1.gamePath + "new_sounds/jones/in_pursuit/04.mp3", false);
jmsPosSound5.loadSound(_local1.gamePath + "new_sounds/jones/in_pursuit/05.mp3", false);
jmsPosSound6.loadSound(_local1.gamePath + "new_sounds/jones/in_pursuit/06.mp3", false);
jmsPosSound7.loadSound(_local1.gamePath + "new_sounds/jones/in_pursuit/07.mp3", false);
jmsNegSound1.loadSound(_local1.gamePath + "new_sounds/jones/hit_bike/01.mp3", false);
jmsNegSound2.loadSound(_local1.gamePath + "new_sounds/jones/hit_bike/02.mp3", false);
jmsNegSound3.loadSound(_local1.gamePath + "new_sounds/jones/hit_bike/03.mp3", false);
jmsNegSound4.loadSound(_local1.gamePath + "new_sounds/jones/hit_bike/04.mp3", false);
jmsNegSound5.loadSound(_local1.gamePath + "new_sounds/jones/hit_bike/01.mp3", false);
jmsNegSound6.loadSound(_local1.gamePath + "new_sounds/jones/hit_bike/02.mp3", false);
jmsNegSound7.loadSound(_local1.gamePath + "new_sounds/jones/hit_bike/03.mp3", false);
} else if ((jmsCurrentCop == "williams") && (jmsCurrentCop != jmsPreviousCop)) {
_local1.jmsCurrentCop = "none";
_local1.jmsPreviousCop = "williams";
jmsPosSound1.loadSound(_local1.gamePath + "new_sounds/williams/in_pursuit/01.mp3", false);
jmsPosSound2.loadSound(_local1.gamePath + "new_sounds/williams/in_pursuit/02.mp3", false);
jmsPosSound3.loadSound(_local1.gamePath + "new_sounds/williams/in_pursuit/03.mp3", false);
jmsPosSound4.loadSound(_local1.gamePath + "new_sounds/williams/in_pursuit/04.mp3", false);
jmsPosSound5.loadSound(_local1.gamePath + "new_sounds/williams/in_pursuit/05.mp3", false);
jmsPosSound6.loadSound(_local1.gamePath + "new_sounds/williams/in_pursuit/01.mp3", false);
jmsPosSound7.loadSound(_local1.gamePath + "new_sounds/williams/in_pursuit/02.mp3", false);
jmsNegSound1.loadSound(_local1.gamePath + "new_sounds/williams/hit_bike/01.mp3", false);
jmsNegSound2.loadSound(_local1.gamePath + "new_sounds/williams/hit_bike/02.mp3", false);
jmsNegSound3.loadSound(_local1.gamePath + "new_sounds/williams/hit_bike/03.mp3", false);
jmsNegSound4.loadSound(_local1.gamePath + "new_sounds/williams/hit_bike/01.mp3", false);
jmsNegSound5.loadSound(_local1.gamePath + "new_sounds/williams/hit_bike/02.mp3", false);
jmsNegSound6.loadSound(_local1.gamePath + "new_sounds/williams/hit_bike/03.mp3", false);
jmsNegSound7.loadSound(_local1.gamePath + "new_sounds/williams/hit_bike/01.mp3", false);
} else if ((jmsCurrentCop == "wiegel") && (jmsCurrentCop != jmsPreviousCop)) {
_local1.jmsCurrentCop = "none";
_local1.jmsPreviousCop = "wiegel";
jmsPosSound1.loadSound(_local1.gamePath + "new_sounds/wiegel/in_pursuit/01.mp3", false);
jmsPosSound2.loadSound(_local1.gamePath + "new_sounds/wiegel/in_pursuit/02.mp3", false);
jmsPosSound3.loadSound(_local1.gamePath + "new_sounds/wiegel/in_pursuit/03.mp3", false);
jmsPosSound4.loadSound(_local1.gamePath + "new_sounds/wiegel/in_pursuit/01.mp3", false);
jmsPosSound5.loadSound(_local1.gamePath + "new_sounds/wiegel/in_pursuit/02.mp3", false);
jmsPosSound6.loadSound(_local1.gamePath + "new_sounds/wiegel/in_pursuit/03.mp3", false);
jmsPosSound7.loadSound(_local1.gamePath + "new_sounds/wiegel/in_pursuit/01.mp3", false);
jmsNegSound1.loadSound(_local1.gamePath + "new_sounds/wiegel/hit_bike/01.mp3", false);
jmsNegSound2.loadSound(_local1.gamePath + "new_sounds/wiegel/hit_bike/02.mp3", false);
jmsNegSound3.loadSound(_local1.gamePath + "new_sounds/wiegel/hit_bike/01.mp3", false);
jmsNegSound4.loadSound(_local1.gamePath + "new_sounds/wiegel/hit_bike/02.mp3", false);
jmsNegSound5.loadSound(_local1.gamePath + "new_sounds/wiegel/hit_bike/01.mp3", false);
jmsNegSound6.loadSound(_local1.gamePath + "new_sounds/wiegel/hit_bike/02.mp3", false);
jmsNegSound7.loadSound(_local1.gamePath + "new_sounds/wiegel/hit_bike/01.mp3", false);
}
};
_global.brakeSound = new Sound(sndBrake);
_global.brakeSound.attachSound("brake");
_global.brakeSound.setVolume(50);
_global.crashSound = new Sound(sndCrash);
_global.crashSound.attachSound("crash");
_global.crashSound.setVolume(50);
_global.dangumitSound = new Sound(sndDangumit);
_global.dangumitSound.attachSound("dangumit");
_global.dangumitSound.setVolume(50);
_global.heloSound = new Sound(jmsSoundHelicopter);
_global.heloSound.attachSound("Heliout");
_global.heloSound.setVolume(10);
_global.sirenSound = new Sound(sndSiren);
_global.sirenSound.attachSound("siren");
_global.sirenSound.setVolume(50);
_global.splutSound = new Sound(sndSplut);
_global.splutSound.attachSound("splut");
_global.splutSound.setVolume(50);
_global.suckerSound = new Sound(sndSucker);
_global.suckerSound.attachSound("sucker");
_global.suckerSound.setVolume(50);
_global.oowhSound = new Sound(sndOowh);
_global.oowhSound.attachSound("oowh");
_global.oowhSound.setVolume(50);
_global.owSound = new Sound(sndOw);
_global.owSound.attachSound("ow");
_global.owSound.setVolume(50);
_global.urrgSound = new Sound(sndUrrg);
_global.urrgSound.attachSound("urrg");
_global.urrgSound.setVolume(50);
_global.introSound1 = new Sound();
_global.introSound1.attachSound("garcia_intro");
_global.introSound2 = new Sound();
_global.introSound2.attachSound("travis_intro");
_global.introSound3 = new Sound();
_global.introSound3.attachSound("johnson_intro");
_global.introSound4 = new Sound();
_global.introSound4.attachSound("jones_intro");
_global.introSound5 = new Sound();
_global.introSound5.attachSound("williams_intro");
_global.introSound6 = new Sound();
_global.introSound6.attachSound("wiegel_intro");
_global.introSound1.onSoundComplete = function () {
_global.shoutAvail = 1;
};
_global.introSound2.onSoundComplete = function () {
_global.shoutAvail = 1;
};
_global.introSound3.onSoundComplete = function () {
_global.shoutAvail = 1;
};
_global.introSound4.onSoundComplete = function () {
_global.shoutAvail = 1;
};
_global.introSound5.onSoundComplete = function () {
_global.shoutAvail = 1;
};
_global.introSound6.onSoundComplete = function () {
_global.shoutAvail = 1;
};
posSounds = new Array();
posSounds = [posSound1, posSound2, posSound3, posSound4, posSound5, posSound6];
negSounds = new Array();
negSounds = [negSound1, negSound2, negSound3, negSound4, negSound5, negSound6];
function MapController() {
var _local1 = this;
_local1.x = 312.5;
_local1.y = 275;
_local1.depth = 1;
_local1.initMapArray();
}
stop();
MapController.prototype = new Object();
MapController.prototype.initMapArray = function () {
var _local1 = this;
_local1.row1 = ["01", "07", "02", "01", "02", "01", "06", "07", "06", "02"];
_local1.row2 = ["05", "05", "03", "04", "05", "05", "01", "08", "02", "05"];
_local1.row3 = ["05", "03", "07", "07", "10", "09", "10", "01", "08", "10"];
_local1.row4 = ["03", "02", "05", "05", "03", "04", "05", "09", "07", "04"];
_local1.row5 = ["01", "10", "03", "11", "06", "02", "05", "09", "08", "02"];
_local1.row6 = ["03", "10", "01", "10", "01", "11", "08", "10", "01", "10"];
_local1.row7 = ["01", "08", "10", "05", "09", "04", "01", "08", "08", "04"];
_local1.row8 = ["03", "07", "10", "09", "08", "07", "10", "01", "06", "02"];
_local1.row9 = ["01", "04", "05", "03", "02", "05", "03", "08", "02", "05"];
_local1.row10 = ["03", "06", "08", "06", "04", "03", "06", "06", "08", "04"];
_local1.map_array = [_local1.row1, _local1.row2, _local1.row3, _local1.row4, _local1.row5, _local1.row6, _local1.row7, _local1.row8, _local1.row9, _local1.row10];
_local1.mapRows = 10;
_local1.mapCols = 10;
};
MapController.prototype.loadMap = function (row, col) {
var _local1 = this;
var _local2 = "map" + _local1.map_array[Number(row) - 1][Number(col) - 1];
attachMovie(_local2, "map", _local1.depth);
map._x = _local1.x;
map._y = _local1.y;
};
MapController.prototype.removeMap = function () {
removeMovieClip(map);
};
mapControl = new MapController();
function RandomItems() {
var _local1 = this;
_local1.playSoundFX = 1;
_local1.soundDelay = 5;
_local1.init();
}
RandomItems.prototype = new MovieClip();
Object.registerClass("potholeClip", RandomItems);
Object.registerClass("oilSlickClip", RandomItems);
Object.registerClass("movingCarClip", RandomItems);
Object.registerClass("staticCarClip", RandomItems);
Object.registerClass("constructionClip", RandomItems);
Object.registerClass("pedestrianClip1", RandomItems);
Object.registerClass("pedestrianClip2", RandomItems);
Object.registerClass("pedestrianClip3", RandomItems);
Object.registerClass("cokebag", RandomItems);
Object.registerClass("food", RandomItems);
RandomItems.prototype.init = function () {
var _local1 = this;
var _local2 = _root;
while (_local2.map.road.hitTest(_local1._x, _local1._y, true) == false) {
_local1._x = random(540) + 40;
_local1._y = random(395) + 40;
}
};
RandomItems.prototype.playSound = function (fx) {
var _local1 = _root;
var _local2 = this;
if (_local2.playSoundFX && ((((policeCar._x > 0) && (policeCar._y > 0)) && (policeCar._x < 600)) && (policeCar._y < 400))) {
_local2.playSoundFX = 0;
_local2.soundCount = 0;
switch (fx) {
case "pothole" :
if ((_local1.posSounds[_local1.control.officer].position == 0) || (_local1.posSounds[_local1.control.officer].position >= _local1.posSounds[_local1.control.officer].duration)) {
_local1.posSounds[_local1.control.officer].start();
}
return;
case "oilslick" :
brakeSound.start();
if ((_local1.posSounds[_local1.control.officer].position == 0) || (_local1.posSounds[_local1.control.officer].position >= _local1.posSounds[_local1.control.officer].duration)) {
_local1.posSounds[_local1.control.officer].start();
}
return;
case "car" :
crashSound.start();
return;
case "staticCar" :
crashSound.start();
if ((_local1.posSounds[_local1.control.officer].position == 0) || (_local1.posSounds[_local1.control.officer].position >= _local1.posSounds[_local1.control.officer].duration)) {
_local1.posSounds[_local1.control.officer].start();
}
return;
case "construction" :
if ((_local1.posSounds[_local1.control.officer].position == 0) || (_local1.posSounds[_local1.control.officer].position >= _local1.posSounds[_local1.control.officer].duration)) {
_local1.posSounds[_local1.control.officer].start();
}
return;
case "pedestrian" :
if (!((owSound.position == 0) || (owSound.position >= owSound.duration))) {
break;
}
owSound.start();
}
}
};
RandomItems.prototype.onEnterFrame = function () {
var _local1 = this;
var _local2 = _root;
if (_local1.hitTest(_local2.dweeb._x, _local2.dweeb._y, true) && (_local2.dweeb.move == true)) {
switch (_local1.itemType) {
case "pothole" :
_local2.control.hitPotHole(_local2.dweeb);
break;
case "oilslick" :
_local2.control.hitOilSlick(_local2.dweeb);
break;
case "construction" :
_local2.control.hitConstruction(_local2.dweeb);
break;
case "car" :
oowhSound.start();
crashSound.start();
_local1.hit = 1;
dweeb._x = dweeb._x - (dweeb.getSpeedX() * 4);
dweeb._y = dweeb._y - (dweeb.getSpeedY() * 4);
dweeb.crash(24);
_local2.control.setHealth(10);
break;
case "staticCar" :
oowhSound.start();
crashSound.start();
dweeb._x = dweeb._x - (dweeb.getSpeedX() * 4);
dweeb._y = dweeb._y - (dweeb.getSpeedY() * 4);
dweeb.crash(24);
_local2.control.setHealth(10);
break;
case "pedestrian" :
if (_local1._currentframe <= 3) {
splutSound.start(0.15, 0);
_local1.gotoAndStop(4);
control.setScore(250);
} else {
_local2.control.hitOilSlick(_local2.dweeb);
}
break;
case "cokebag" :
_local2.dweeb.maxSpeed = 17;
_local2.dweeb.speed = _local2.dweeb.maxSpeed;
_local2.dweeb.onCoke = 1;
control.setScore(500);
_local1.removeMovieClip();
break;
case "food" :
_local2.control.setHealth(-10);
_local2.dweeb.flash.play();
_local1.removeMovieClip();
}
} else if (_local2.dweeb.speed > _local2.dweeb.maxSpeed) {
_local2.dweeb.speed = Math.min(_local2.dweeb.speed, _local2.dweeb.maxSpeed);
}
if (_local1.hitTest(_local2.policeCar) && (_local2.policeCar.move == true)) {
switch (_local1.itemType) {
case "pothole" :
_local2.control.hitPotHole(_local2.policeCar);
_local2.control.setScore(10);
_local1.playSound("pothole");
break;
case "oilslick" :
_local2.control.hitOilSlick(_local2.policeCar);
_local2.control.setScore(25);
_local1.playSound("oilslick");
break;
case "car" :
_local1.hit = 1;
policeCar.staticCarCrash(_local1);
policeCar.setHealth(10);
_local2.control.setScore(200);
_local1.playSound("staticCar");
break;
case "staticCar" :
policeCar.staticCarCrash(_local1);
policeCar.setHealth(10);
_local2.control.setScore(100);
_local1.playSound("staticCar");
break;
case "construction" :
policeCar.speed = Math.max(policeCar.speed - 4, 2);
policeCar.setHealth(5);
_local2.control.setScore(10);
_local1.playSound("construction");
break;
case "pedestrian" :
if (_local1._currentframe <= 3) {
policeCar.speed = 0;
policeCar.move = false;
policeCar._x = policeCar._x - policeCar.xstep;
policeCar._y = policeCar._y - policeCar.ystep;
_local2.control.setScore(5);
_local1.playSound("pedestrian");
} else {
if (_local1.deadPed._currentframe == 1) {
splutSound.start(0.15, 0);
}
_local1.deadPed.gotoAndStop(2);
_local2.control.hitOilSlick(_local2.policeCar);
_local2.control.setScore(25);
_local1.playSound("oilslick");
}
}
} else {
if (_local1.playSoundFX == 0) {
_local1.soundCount++;
if (_local1.soundCount == _local1.soundDelay) {
_local1.playSoundFX = 1;
_local1.soundCount = 0;
}
}
_local2.policeCar.speed = Math.min(_local2.policeCar.speed, _local2.policeCar.maxSpeed);
}
if (_local1.itemType == "pedestrian") {
if (_local1._currentframe != 4) {
if (_local1.dir) {
_local1._x = _local1._x + (_local1.speed * _local1.sign);
} else {
_local1._y = _local1._y + (_local1.speed * _local1.sign);
}
if ((_local1.speed * _local1.sign) < 0) {
if (_local1.dir) {
_local1._xscale = -100;
} else {
_local1._yscale = -100;
}
}
if (!_local2.map.road.hitTest(_local1._x, _local1._y, true)) {
_local1.speed = 0;
_local1.gotoAndStop(3);
} else {
_local1.speed = 2;
if (_local1._currentframe == 3) {
_local1.gotoAndStop(_local1.playFrame);
}
}
}
} else if (_local1.itemType == "car") {
if (_local2.dweeb.move) {
if (_local1.dir) {
_local1._x = _local1._x + (_local1.speed * _local1.sign);
} else {
_local1._y = _local1._y + (_local1.speed * _local1.sign);
}
}
if (!_local2.map.road.hitTest(_local1._x, _local1._y, true)) {
if (_local1.hitTest(_local2.map) && (_local1.speed != 0)) {
}
_local1.speed = 0;
} else if (_local1.hit != 1) {
_local1.speed = 4;
} else {
_local1.speed = 0;
count++;
if (count == 60) {
count = 0;
_local1.hit = 0;
}
}
}
};
function GameControl() {
var _local1 = this;
_local1.health = 100;
_local1.score = 0;
_local1.evadeCount = 0;
_local1.dweebDepth = 5000;
_local1.policeDepth = 4990;
_local1.smokeDepth = 7000;
_local1.collisionDepth = 4991;
_local1.itemDepth = 2900;
_local1.topItemDepth = 4900;
_local1.donutDepth = 5500;
_local1.itemsArray = new Array();
_local1.loadDweeb();
_local1.addPoliceCar = true;
_local1.officer = undefined;
_local1.initWayPoints();
_local1.randomItemsArray = ["potholeClip", "oilSlickClip", "constructionClip", "staticCarClip", "movingCarClip", "pedestrianClip1", "pedestrianClip2", "pedestrianClip3", "cokebag", "food"];
}
GameControl.prototype = new Object();
GameControl.prototype.initWayPoints = function () {
var _local1 = this;
var row1 = (random(2) + 1);
var _local3 = random(3) + 1;
var row2 = 9;
var _local2 = 10;
_local1.startRow = row1;
_local1.startCol = _local3;
_local1.finishRow = row2;
_local1.finishCol = _local2;
compass.endRow = _local1.finishRow;
compass.endCol = _local1.finishCol;
mapControl.loadMap(_local1.startRow, _local1.startCol);
_local1.currentRow = _local1.startRow;
_local1.currentCol = _local1.startCol;
compass.checkCompassPosition(_local1.currentRow, _local1.currentCol);
interface.healthMeter._xscale = 100;
};
GameControl.prototype.loadDweeb = function () {
attachMovie("dweeb", "dweeb", this.dweebDepth);
};
GameControl.prototype.loadPoliceCar = function () {
var _local1 = this;
attachMovie("policeCar", "policeCar", _local1.policeDepth);
for (var _local2 in _local1.itemsArray) {
if (policeCar.hitTest(_local1.itemsArray[_local2])) {
_local1.itemsArray[_local2].removeMovieClip();
_local1.itemsArray.splice(_local2, 1);
}
}
_local1.itemsArray.push(policeCar);
_local1.addPoliceCar = false;
};
GameControl.prototype.evadedPolice = function () {
var _local1 = this;
for (var _local2 in _local1.itemsArray) {
if (_local1.itemsArray[_local2] == _level0.policeCar) {
_local1.itemsArray.splice(_local2, 1);
break;
}
}
_local1.evadeCount++;
interface.evadeText.text = _local1.evadeCount;
interface.car.play();
_local1.setScore(1000);
_local1.addPoliceCar = true;
};
GameControl.prototype.setCollision = function () {
dweeb.crash(24);
policeCar.dweebCrash();
attachMovie("collisionClip", "collisionClip", this.collisionDepth);
this.setHealth(20);
};
GameControl.prototype.hitPotHole = function (clip) {
var _local1 = random(2);
if (!_local1) {
_local1 = -1;
}
if (clip == _root.dweeb) {
dweeb.speed = Math.min(8, dweeb.speed);
dweeb._rotation = dweeb._rotation + (15 * _local1);
} else {
policeCar._rotation = policeCar._rotation + (5 * _local1);
policeCar.speed = Math.max(policeCar.speed - 3, policeCar.turnSpeed);
policeCar.setHealth(5);
}
};
GameControl.prototype.hitOilSlick = function (clip) {
clip.speed = clip.speed + 2;
var _local1 = random(2);
if (!_local1) {
_local1 = -1;
}
clip._rotation = clip._rotation + (45 * _local1);
};
GameControl.prototype.hitConstruction = function (clip) {
var _local2 = clip;
_local2.speed = Math.max(2, _local2.speed - 4);
var _local1 = random(2);
if (!_local1) {
_local1 = -1;
}
_local2._rotation = _local2._rotation + (30 * _local1);
};
GameControl.prototype.loadRandomItem = function () {
var _local1 = this;
var _local2 = _root;
if (random(10) >= 5) {
var _local3 = random(_local1.randomItemsArray.length);
var clip = _local1.randomItemsArray[_local3];
if (_local3 <= 3) {
attachMovie(clip, "item" + _local1.itemDepth, _local1.itemDepth);
for (var i in _local1.itemsArray) {
if (_local2["item" + _local1.itemDepth].hitTest(_local1.itemsArray[i])) {
_local2["item" + _local1.itemDepth].removeMovieClip();
}
}
if (typeof(_local2["item" + _local1.itemDepth]) == "movieclip") {
_local1.itemsArray.push(_local2["item" + _local1.itemDepth]);
_local1.itemDepth--;
}
} else if (((_local3 >= (_local1.randomItemsArray.length - 2)) && (random(10) <= 8)) || (_local3 < (_local1.randomItemsArray.length - 2))) {
attachMovie(clip, "item" + _local1.topItemDepth, _local1.topItemDepth);
for (var i in _local1.itemsArray) {
if (_local2["item" + _local1.topItemDepth].hitTest(_local1.itemsArray[i])) {
_local2["item" + _local1.topItemDepth].removeMovieClip();
}
}
if (typeof(_local2["item" + _local1.topItemDepth]) == "movieclip") {
_local1.itemsArray.push(_local2["item" + _local1.topItemDepth]);
_local1.topItemDepth--;
}
}
}
};
GameControl.prototype.changeRow = function (sign) {
var _local1 = this;
_local1.currentRow = _local1.currentRow + sign;
mapControl.loadMap(_local1.currentRow, _local1.currentCol);
_local1.moveItems("y", sign);
compass.checkCompassPosition(_local1.currentRow, _local1.currentCol);
_local1.checkFinishPoint();
};
GameControl.prototype.changeCol = function (sign) {
var _local1 = this;
_local1.currentCol = _local1.currentCol + sign;
mapControl.loadMap(_local1.currentRow, _local1.currentCol);
_local1.moveItems("x", sign);
compass.checkCompassPosition(_local1.currentRow, _local1.currentCol);
_local1.checkFinishPoint();
};
GameControl.prototype.moveItems = function (dir, sign) {
var _local1 = this;
var _local2 = sign;
if ((_local1.screen_sound == 0) || (_local1.screen_sound == undefined)) {
heloSound.start();
_local1.screen_sound = 1;
} else {
_local1.screen_sound++;
if (_local1.screen_sound == 6) {
_local1.screen_sound = 0;
}
}
for (var _local3 in _local1.itemsArray) {
if ((_local1.itemsArray[_local3].itemType == "car") && (_local1.itemsArray[_local3].remove == 1)) {
_local1.itemsArray[_local3].removeMovieClip();
_local1.itemsArray.splice(_local3, 1);
continue;
}
if (dir == "x") {
_local1.itemsArray[_local3]._x = _local1.itemsArray[_local3]._x - (600 * _local2);
} else {
_local1.itemsArray[_local3]._y = _local1.itemsArray[_local3]._y - (400 * _local2);
}
}
if (_local1.addPoliceCar) {
_local1.loadPoliceCar();
}
_local1.loadRandomItem();
_local1.removeSmoke = 1;
};
GameControl.prototype.checkFinishPoint = function () {
var _local1 = this;
if ((_local1.currentRow == _local1.finishRow) && (_local1.currentCol == _local1.finishCol)) {
attachMovie("finishPoints", "finishPoints", 90);
}
};
GameControl.prototype.setHealth = function (num) {
var _local1 = this;
_local1.health = Math.max(0, _local1.health - num);
_local1.health = ((_local1.health >= 100) ? 100 : (_local1.health));
interface.healthMeter._xscale = _local1.health;
if (_local1.health < 30) {
interface.heart.play();
}
if (_local1.health == 0) {
_local1.gameOver = true;
urrgSound.start();
_local1.endGame();
}
};
GameControl.prototype.endGame = function () {
this.restartGame();
};
GameControl.prototype.winner = function () {
this.setScore(this.health * 10);
_root.gotoAndStop(_root._currentframe + 1);
};
GameControl.prototype.restartGame = function () {
this.setScore(this.health * 10);
_root.gotoAndStop(_root._currentframe + 2);
};
GameControl.prototype.setScore = function (num) {
this.score = this.score + num;
interface.scoreText.text = "SCORE: " + this.score;
};
GameControl.prototype.setTimerScore = function () {
var _local1 = this;
var _local2 = int(10000 / Number(_local1.Minutes)) + int(10000 / Number(_local1.Seconds));
_local1.setScore(_local2);
};
GameControl.prototype.setTimer = function () {
var _local1 = this;
var _local3 = int((int(getTimer() / 1000) - _local1.startTime) / 60);
_local1.Minutes = int(_local3);
if (_local1.Minutes < 1) {
_local1.Minutes = "00";
} else if (_local1.Minutes <= 9) {
_local1.Minutes = _local3;
}
var _local2 = int(getTimer() / 1000) - _local1.startTime;
if (_local2 >= 60) {
_local2 = _local2 % 60;
}
if (_local2 <= 9) {
_local1.Seconds = "0" + _local2;
} else {
_local1.Seconds = _local2;
}
interface.timerText.text = (("TIME: " + _local1.Minutes) + ":") + _local1.Seconds;
};
this.control = new GameControl();
Frame 99
_global.shoutAvail = 1;
_global.jmsPreviousCop = "none";
stop();
stopAllSounds();
interface.pop_up._visible = 0;
for (var i in _root) {
if (_root[i] != interface) {
_root[i].removeMovieClip();
}
}
scoreText.text = "SCORE: " + control.score;
timerText.text = (("TIME: " + control.Minutes) + ":") + control.Seconds;
checkScore();
Instance of Symbol 399 MovieClip "replayButton" in Frame 99
//component parameters
onClipEvent (initialize) {
label = "";
wide = 67;
c1 = 255;
c2 = 188;
c3 = 0;
hc1 = 200;
hc2 = 200;
hc3 = 200;
baseMode = true;
widthMode = true;
rgb = 16759808 /* 0xFFBC00 */;
rb = 255;
gb = 255;
bb = 255;
hilitergb = 13158600 /* 0xC8C8C8 */;
}
Frame 100
_global.shoutAvail = 1;
_global.jmsPreviousCop = "none";
stop();
stopAllSounds();
interface.pop_up._visible = 0;
for (var i in _root) {
if (_root[i] != interface) {
_root[i].removeMovieClip();
}
}
scoreText.text = "SCORE: " + control.score;
timerText.text = (("TIME: " + control.Minutes) + ":") + control.Seconds;
checkScore();
Symbol 46 MovieClip [cokebag] Frame 1
#initclip 17
this = new RandomItems();
#endinitclip
this.itemType = "cokebag";
Symbol 48 MovieClip [donut_trail] Frame 1
#initclip 1
function DonutTrails() {
var _local1 = this;
_local1.fadeInc = 1;
_local1._visible = 0;
_local1.moved = 0;
}
DonutTrails.prototype = new MovieClip();
Object.registerClass("donut_trail", DonutTrails);
DonutTrails.prototype.onEnterFrame = function () {
var _local1 = this;
if (_local1.hitTest(_root.policeCar)) {
_local1._visible = 0;
} else {
_local1._visible = 1;
}
_local1._alpha = _local1._alpha - _local1.fadeInc;
if (_local1._alpha <= 5) {
_local1.removeMovieClip();
}
if (_local1.moved == 0) {
_local1.moved = 1;
_local1._x = _local1._x + random(25);
_local1._y = _local1._y + random(25);
}
};
#endinitclip
Symbol 52 MovieClip [food] Frame 1
#initclip 2
this = new RandomItems();
#endinitclip
this.itemType = "food";
this.gotoAndStop(random(this._totalframes) + 1);
Symbol 53 MovieClip [donut] Frame 1
#initclip 3
this = new RandomItems();
#endinitclip
this.itemType = "donut";
Symbol 77 MovieClip Frame 1
stop();
Symbol 78 MovieClip [pedestrianClip3] Frame 1
#initclip 4
this = new RandomItems();
#endinitclip
this.itemType = "pedestrian";
this.dir = random(2);
this.speed = 2;
this.sign = random(2);
if (!this.sign) {
this.sign = -1;
}
if (this.dir == 1) {
this.playFrame = 2;
this.gotoAndStop(2);
} else {
stop();
this.playFrame = 1;
}
Symbol 92 MovieClip Frame 1
stop();
Symbol 93 MovieClip [pedestrianClip2] Frame 1
#initclip 5
this = new RandomItems();
#endinitclip
this.itemType = "pedestrian";
this.dir = random(2);
this.speed = 2;
this.sign = random(2);
if (!this.sign) {
this.sign = -1;
}
if (this.dir == 1) {
this.playFrame = 2;
this.gotoAndStop(2);
} else {
stop();
this.playFrame = 1;
}
Symbol 111 MovieClip Frame 1
stop();
Symbol 112 MovieClip [pedestrianClip1] Frame 1
#initclip 6
this = new RandomItems();
#endinitclip
this.itemType = "pedestrian";
this.dir = random(2);
this.speed = 2;
this.sign = random(2);
if (!this.sign) {
this.sign = -1;
}
if (this.dir == 1) {
this.playFrame = 2;
this.gotoAndStop(2);
} else {
stop();
this.playFrame = 1;
}
Symbol 118 MovieClip Frame 1
stop();
this._visible = 0;
Symbol 118 MovieClip Frame 2
this._visible = 1;
Symbol 143 MovieClip [dweeb] Frame 1
#initclip 7
function DweebControl() {
var _local1 = this;
_local1._x = 312.5;
_local1._y = 270;
_local1.maxX = 612.5;
_local1.minX = 12.5;
_local1.maxY = 475;
_local1.minY = 75;
_local1.startTimer = 0;
_local1.speed = 0;
_local1.maxSpeed = 12;
_local1.minSpeed = -4;
_local1.speedIncrement = 2;
_local1.onCoke = 0;
_local1.cokeCount = 0;
_local1.cokeLimit = 300;
_local1._rotation = 45;
_local1.rotIncrement = 15;
_local1.initDweeb();
}
DweebControl.prototype = new MovieClip();
Object.registerClass("dweeb", DweebControl);
DweebControl.prototype.initDweeb = function () {
var _local1 = this;
Key.addListener(_local1);
_local1.onKeyDown = function () {
var _local1 = this;
if (!_local1.startTimer) {
_local1.startTimer = 1;
control.startTime = int(getTimer() / 1000);
}
if (_local1.move) {
switch (Key.getCode()) {
case 37 :
_local1.turn(-1);
return;
case 38 :
_local1.changeSpeed(1);
return;
case 39 :
_local1.turn(1);
return;
case 40 :
_local1.changeSpeed(-1);
return;
case 32 :
_local1.changeSpeed(-1);
}
}
};
_local1.move = true;
};
DweebControl.prototype.changeSpeed = function (sign) {
var _local1 = this;
_local1.speed = Math.min(_local1.speed + (_local1.speedIncrement * sign), _local1.maxSpeed);
if (_local1.speed < _local1.minSpeed) {
_local1.speed = _local1.minSpeed;
}
};
DweebControl.prototype.turn = function (sign) {
this._rotation = this._rotation + (this.rotIncrement * sign);
};
DweebControl.prototype.getSpeedX = function () {
return(this.speed * Math.cos((this._rotation * Math.PI) / 180));
};
DweebControl.prototype.getSpeedY = function () {
return(this.speed * Math.sin((this._rotation * Math.PI) / 180));
};
DweebControl.prototype.onEnterFrame = function () {
var _local1 = this;
if (control.gameOver != true) {
if (_local1.move) {
_local1.checkMapPosition();
_local1._x = _local1._x + _local1.getSpeedX();
_local1._y = _local1._y + _local1.getSpeedY();
_local1.checkObstacles();
} else {
_local1.pauseCount++;
if (_local1.pauseCount == _local1.pauseTime) {
_local1.move = true;
_local1.gotoAndStop(1);
}
}
if (_local1.startTimer) {
_root.control.setTimer();
}
if (_local1.onCoke) {
_local1.cokeCount++;
if (_local1.cokeCount == _local1.cokeLimit) {
_local1.maxSpeed = 12;
if (_local1.speed > _local1.maxSpeed) {
_local1.speed = _local1.maxSpeed;
}
}
}
}
};
DweebControl.prototype.crash = function (num) {
var _local1 = this;
_local1.pause = true;
_local1.pauseCount = 0;
_local1.pauseTime = random(num) + 12;
_local1.move = false;
_local1.speed = 0;
_local1.gotoAndStop(2);
};
DweebControl.prototype.checkObstacles = function () {
var _local1 = this;
var _local3 = _root;
var _local2 = 1;
while (_local2 <= _local3.map.tmax) {
if (_local3.map["t" + _local2].hitTest(_local1._x, _local1._y, true)) {
if ((crashSound.position == 0) || (crashSound.position >= crashSound.duration)) {
crashSound.start();
}
_local1._x = _local1._x - _local1.getSpeedX();
_local1._y = _local1._y - _local1.getSpeedY();
return;
}
_local2++;
}
};
DweebControl.prototype.checkMapPosition = function () {
var _local1 = this;
if (_local1._x <= _local1.minX) {
if (control.currentCol >= 2) {
control.changeCol(-1);
_local1.newMapPosition(_local1._x, 1);
} else {
_local1.speed = _local1.speed * -1;
}
} else if (_local1._x >= _local1.maxX) {
if (control.currentCol <= 9) {
control.changeCol(1);
_local1.newMapPosition(_local1._x, -1);
} else {
_local1.speed = _local1.speed * -1;
}
} else if (_local1._y <= _local1.minY) {
if (control.currentRow >= 2) {
control.changeRow(-1);
_local1.newMapPosition(_local1._y, 1);
} else {
_local1.speed = _local1.speed * -1;
}
} else if (_local1._y >= _local1.maxY) {
if (control.currentRow <= 9) {
control.changeRow(1);
_local1.newMapPosition(_local1._y, -1);
} else {
_local1.speed = _local1.speed * -1;
}
} else {
control.removeSmoke = 0;
}
_local1.checkRoadPosition();
};
DweebControl.prototype.checkRoadPosition = function () {
var _local1 = this;
if (!_root.map.road.hitTest(_local1._x, _local1._y, true)) {
if (!((((_local1._x < _local1.minX) || (_local1._x > _local1.maxX)) || (_local1._y < _local1.minY)) || (_local1._y > _local1.maxY))) {
if (_local1.newPosition != 1) {
_local1.speed = Math.min(_local1.speed, 3);
} else {
_local1.newPosition = 0;
}
}
}
};
DweebControl.prototype.newMapPosition = function (coord, sign) {
var _local1 = this;
if (_local1._x == coord) {
_local1._x = _local1._x + (600 * sign);
} else {
_local1._y = _local1._y + (400 * sign);
}
_local1.newPosition = 1;
};
DweebControl.prototype.checkFinishPoint = function () {
var _local1 = _root;
if (this.hitTest(_local1.finishPoints.dot) && (_local1.finishPoints._currentframe == 1)) {
control.setTimerScore();
control.gameOver = true;
control.winner();
_local1.finishPoints.gotoAndStop(2);
}
};
#endinitclip
stop();
Symbol 201 MovieClip [map04] Frame 1
tmax = 6;
Symbol 227 MovieClip [map03] Frame 1
tmax = 9;
Symbol 242 MovieClip [map02] Frame 1
tmax = 4;
Symbol 255 MovieClip [map08] Frame 1
tmax = 5;
Symbol 257 MovieClip [map07] Frame 1
tmax = 7;
Symbol 265 MovieClip [map06] Frame 1
tmax = 6;
Symbol 270 MovieClip [map05] Frame 1
tmax = 6;
Symbol 280 MovieClip [map11] Frame 1
tmax = 6;
Symbol 286 MovieClip [map10] Frame 1
tmax = 7;
Symbol 289 MovieClip [map09] Frame 1
tmax = 7;
Symbol 291 MovieClip [map01] Frame 1
tmax = 7;
Symbol 307 MovieClip [finishPoints] Frame 1
#initclip 18
function endPoint() {
var _local1 = this;
_local1._x = 312.5;
_local1._y = 340;
_local1.row = _root.control.currentRow;
_local1.col = _root.control.currentCol;
}
endPoint.prototype = new MovieClip();
Object.registerClass("finishPoints", endPoint);
endPoint.prototype.onEnterFrame = function () {
_root.dweeb.checkFinishPoint();
this.checkMap();
};
endPoint.prototype.checkMap = function () {
var _local1 = this;
if ((_local1.row != _root.control.currentRow) || (_local1.col != _root.control.currentCol)) {
_local1.removeMovieClip();
}
};
#endinitclip
stop();
Symbol 307 MovieClip [finishPoints] Frame 2
_root.control.endGame();
Symbol 309 MovieClip [staticCarClip] Frame 1
#initclip 9
this = new RandomItems();
#endinitclip
this.itemType = "staticCar";
this.gotoAndStop(random(this._totalframes) + 1);
if ((this._x > 220) && (this._x < 380)) {
this._rotation = 90 - (180 * random(2));
} else {
this._rotation = 180 - (180 * random(2));
}
Symbol 324 MovieClip [policeCar] Frame 1
#initclip 10
function PoliceControl() {
var _local1 = this;
_local1._x = 330;
_local1._y = 270;
_local1.maxX = 612.5;
_local1.minX = 12.5;
_local1.maxY = 475;
_local1.minY = 75;
_local1.speed = 0;
_local1.maxSpeed = Math.min(22, 14 + int(control.score / 10000));
_local1.minSpeed = 0;
_local1.speedIncrement = 2;
_local1.turnSpeed = 7;
_local1.reverseCount = 0;
_local1.health = 100;
_local1._rotation = 1;
_local1.rotIncrement = 6;
_local1.onRoad = true;
_local1.hitBuilding = false;
_local1.flasher.stop();
_local1.flasher._visible = 0;
_root.interface.pop_up._visible = 1;
_root.interface.pop_up.newCop = 1;
_local1.pauseCount = 100;
sirenSound.start();
_local1.init();
}
PoliceControl.prototype = new MovieClip();
Object.registerClass("policeCar", PoliceControl);
PoliceControl.prototype.init = function () {
var _local1 = this;
_local1.move = true;
_local1.setDirVector();
_local1.setDweebVector();
_local1.centered = false;
};
PoliceControl.prototype.onEnterFrame = function () {
var _local1 = this;
if (control.gameOver != true) {
_local1.checkBounds();
_local1.checkObstacles();
if (_local1.move && (_root.dweeb.move)) {
_local1.setDweebVector();
_local1.setDirVector();
_local1.checkHeading();
_local1.moveCar();
_local1.hitDweeb();
_local1.checkRoad();
if (_local1.donuts) {
_root.control.dropDonuts();
}
} else if (_local1.hitBuilding) {
_local1.hitDweeb();
_local1.checkRoad();
_local1.reverseCar();
} else if (_local1.pauseCount < _local1.pauseTime) {
_local1.pauseCount++;
} else {
_local1.move = true;
}
if ((_local1.smokeAmount >= 1) && (_local1.onscreen == 0)) {
attachMovie("smoke", "smoke" + control.smokeDepth, control.smokeDepth);
control.smokeDepth++;
}
}
};
PoliceControl.prototype.moveCar = function () {
var _local1 = this;
var _local2 = (_local1._rotation * Math.PI) / 180;
_local1.lastX = _local1._x;
_local1.lastY = _local1._y;
_local1.xstep = _local1.speed * Math.cos(_local2);
_local1.ystep = _local1.speed * Math.sin(_local2);
_local1._x = _local1._x + _local1.xstep;
_local1._y = _local1._y + _local1.ystep;
};
PoliceControl.prototype.reverseCar = function () {
var _local1 = this;
if (_local1.reverseCount < 5) {
_local1._x = _local1._x - _local1.xstep;
_local1._y = _local1._y - _local1.ystep;
_local1.reverseCount++;
} else {
_local1.reverseCount = 0;
_local1.hitBuilding = false;
_local1.move = true;
}
};
PoliceControl.prototype.checkObstacles = function () {
var _local2 = this;
var _local3 = _root;
var _local1 = 1;
while (_local1 <= _local3.map.tmax) {
if (_local2.hitArea.hitTest(_local3.map["t" + _local1])) {
if ((crashSound.position == 0) || (crashSound.position >= crashSound.duration)) {
crashSound.start();
}
_local2.hitBuilding = true;
_local2.move = false;
return;
}
_local1++;
}
};
PoliceControl.prototype.hitDweeb = function () {
var _local1 = this;
var _local2 = _root;
if (_local1.hitArea.hitTest(_local2.dweeb) && ((_local1.move == true) || (((_local1.onRoad == false) && (_local1.move == false)) && (_local2.dweeb.move == true)))) {
_local1._x = _local1._x - (_local1.xstep * 4);
_local1._y = _local1._y - (_local1.ystep * 4);
_local2.control.setCollision();
_local1.move = false;
_local1.speed = 0;
crashSound.start();
crashSound.onSoundComplete = _local1.officerSound();
}
};
PoliceControl.prototype.officerSound = function () {
if (_global.shoutAvail == 1) {
_global.shoutAvail = 0;
_root.negSounds[random(7)].start();
}
};
PoliceControl.prototype.dweebCrash = function () {
this.pauseTime = dweeb.pauseTime + 36;
this.pauseCount = 0;
};
PoliceControl.prototype.staticCarCrash = function (car) {
var _local1 = this;
var _local2 = car;
if ((_local1.xstep == 0) && (_local1.ystep == 0)) {
_local2.removeMovieClip();
}
_local1._x = _local1._x - (_local1.xstep * 2);
_local1._y = _local1._y - (_local1.ystep * 2);
if ((_local2._rotation == 0) || (_local2._rotation == 180)) {
_local2._x = _local2._x + (_local1.xstep * 2);
} else {
_local2._y = _local2._y + (_local1.ystep * 2);
}
_local1.pauseTime = 18;
_local1.pauseCount = 0;
_local1.move = false;
_local1.speed = 0;
};
PoliceControl.prototype.checkRoad = function () {
var _local1 = this;
var _local2 = _root;
if (!_local2.map.road.hitTest(_local1._x, _local1._y, true)) {
if (_local2.map.hitTest(_local1._x, _local1._y, true)) {
_local2.interface.pop_up._visible = 1;
if (_local1.onRoad) {
_local1.speed = Math.max(_local1.turnSpeed, _local1.speed - 1);
if (_local1.centered && (!_local2.map.road.hitTest(_local1))) {
_local1._x = _local1._x + 5000;
_local1.checkBounds();
}
}
_local1.onRoad = false;
_local1.move = false;
} else {
_local2.interface.pop_up._visible = 0;
_local1.onRoad = true;
if (!_local1.centered) {
_local1.moveToCenter();
}
}
} else {
_local2.interface.pop_up._visible = 1;
_local1.centered = false;
if (_local1.onRoad == false) {
_local1.onRoad = true;
_local1.init();
}
}
};
PoliceControl.prototype.moveToRoad = function () {
var _local1 = this;
_local1.setDirVector();
var _local2 = Math.abs(Math.abs(_local1.getDirVector()) - Math.abs(_local1.getRoadVector()));
if ((Math.round(_local1.getDirVector()) != _local1.getRoadVector()) && (_local2 > _local1.rotIncrement)) {
if (Math.round(_local1.getDirVector()) < _local1.getRoadVector()) {
_local1._rotation = _local1._rotation + _local1.rotIncrement;
} else {
_local1._rotation = _local1._rotation - _local1.rotIncrement;
}
} else {
_local1._rotation = _local1.getRoadVector();
}
_local1.moveCar();
};
PoliceControl.prototype.moveToCenter = function () {
var _local1 = this;
if ((_local1._x < _local1.minX) || (_local1._x > _local1.maxX)) {
_local1._y = _local1.maxY / 2;
}
if ((_local1._y < _local1.minY) || (_local1._y > _local1.maxY)) {
_local1._x = _local1.maxX / 2;
}
_local1._rotation = _local1.getRoadVector();
_local1.speed = _local1.maxSpeed;
_local1.setDirVector();
_local1.centered = true;
};
PoliceControl.prototype.checkBounds = function () {
var _local1 = this;
if ((((_local1._x < (_local1.minX - _local1.maxX)) || (_local1._x > (_local1.maxX + _local1.maxX))) || (_local1._y < (_local1.minY - _local1.maxY))) || (_local1._y > (_local1.maxY + _local1.maxY))) {
_root.control.evadedPolice();
_local1.removeMovieClip();
} else if ((((_local1._x < _local1.minX) || (_local1._x > _local1.maxX)) || (_local1._y < _local1.minY)) || (_local1._y > _local1.maxY)) {
_local1.onscreen = 1;
} else {
_local1.onscreen = 0;
}
};
PoliceControl.prototype.getRoadVector = function () {
var _local3 = this;
var _local2 = 312.5 - _local3._x;
var _local1 = 275 - _local3._y;
var angle = ((Math.atan(_local1 / _local2) * 180) / Math.PI);
if (_local3._x > 312.5) {
}
return(Math.round(angle));
};
PoliceControl.prototype.setDirVector = function () {
var _local1 = this._rotation;
this.dirVector = _local1;
};
PoliceControl.prototype.getDirVector = function () {
return(this.dirVector);
};
PoliceControl.prototype.checkHeading = function () {
var _local1 = this;
if (_local1.getDirVector() != _local1.getDweebVector()) {
_local1.turnCar();
} else if (_local1.onRoad == true) {
_local1.changeSpeed(1);
}
};
PoliceControl.prototype.setDweebVector = function () {
var _local2 = this;
var dX = (_root.dweeb._x - _local2._x);
var _local3 = _root.dweeb._y - _local2._y;
var _local1 = (Math.atan(_local3 / dX) * 180) / Math.PI;
if (_root.dweeb._x < _local2._x) {
if (_local1 < 0) {
_local1 = _local1 + 180;
} else {
_local1 = _local1 - 180;
}
}
_local2.dweebVector = Math.round(_local1);
};
PoliceControl.prototype.getDweebVector = function () {
return(this.dweebVector);
};
PoliceControl.prototype.turnCar = function (sign) {
var _local1 = this;
if ((_local1.getDirVector() >= (_local1.getDweebVector() - _local1.rotIncrement)) && (_local1.getDirVector() <= (_local1.getDweebVector() + _local1.rotIncrement))) {
_local1._rotation = _local1.getDweebVector();
_local1.changeSpeed(1);
} else {
_local1.moveToTarget();
}
};
PoliceControl.prototype.moveToTarget = function () {
var _local1 = this;
var _local3 = _root;
var _local2;
if ((_local1._x > _local3.dweeb._x) && (_local1._y < _local3.dweeb._y)) {
if ((_local1.getDirVector() > -90) && (_local1.getDirVector() < _local1.getDweebVector())) {
_local2 = 1;
} else {
_local2 = -1;
}
} else if ((_local1._x < _local3.dweeb._x) && (_local1._y < _local3.dweeb._y)) {
if ((_local1.getDirVector() > -90) && (_local1.getDirVector() < _local1.getDweebVector())) {
_local2 = 1;
} else {
_local2 = -1;
}
} else if ((_local1._x > _local3.dweeb._x) && (_local1._y > _local3.dweeb._y)) {
if ((_local1.getDirVector() > 90) || (_local1.getDirVector() < _local1.getDweebVector())) {
_local2 = 1;
} else {
_local2 = -1;
}
} else if ((_local1._x < _local3.dweeb._x) && (_local1._y > _local3.dweeb._y)) {
if ((_local1.getDirVector() > 90) || (_local1.getDirVector() > _local1.getDweebVector())) {
_local2 = -1;
} else {
_local2 = 1;
}
} else {
_local2 = 0;
}
_local1._rotation = _local1._rotation + (_local1.rotIncrement * _local2);
_local1.setDirVector();
if (_local1.speed > _local1.turnSpeed) {
_local1.changeSpeed(-1);
} else {
_local1.changeSpeed(1);
}
};
PoliceControl.prototype.changeSpeed = function (sign) {
var _local1 = this;
_local1.speed = Math.min(_local1.maxSpeed, _local1.speed + (_local1.speedIncrement * sign));
if (_local1.speed < 0) {
_local1.speed = 0;
} else if (_local1.speed == _local1.maxSpeed) {
_local1.flasher.play();
_local1.flasher._visible = 1;
}
};
PoliceControl.prototype.setHealth = function (num) {
this.health = this.health - num;
this.checkHealth();
};
PoliceControl.prototype.checkHealth = function () {
var _local1 = this;
if (_local1.health <= 50) {
_local1.smokeAmount = 1;
} else {
_local1.smokeAmount = 0;
}
};
#endinitclip
Symbol 329 MovieClip [collisionClip] Frame 1
#initclip 11
function CollisionGraphic() {
var _local1 = _root;
this._x = _local1.policeCar._x + _local1.policeCar.xstep;
this._y = _local1.policeCar._y + _local1.policeCar.ystep;
}
CollisionGraphic.prototype = new MovieClip();
Object.registerClass("collisionClip", CollisionGraphic);
#endinitclip
Symbol 329 MovieClip [collisionClip] Frame 6
this.removeMovieClip();
Symbol 336 MovieClip [gameOverWindow] Frame 10
stop();
blankButton.onPress = function () {
_root.control.restartGame();
};
Symbol 338 MovieClip [smoke] Frame 1
#initclip 12
function SmokeControl() {
var _local1 = this;
_local1._x = policeCar._x;
_local1._y = policeCar._y;
_local1.xstep = 1;
_local1.ystep = -2;
}
SmokeControl.prototype = new MovieClip();
Object.registerClass("smoke", SmokeControl);
SmokeControl.prototype.onEnterFrame = function () {
var _local1 = this;
var _local2 = random(2);
if (!_local2) {
_local2 = -1;
}
_local1._x = _local1._x + (_local1.xstep * _local2);
_local1._y = _local1._y + _local1.ystep;
_local1._alpha = _local1._alpha - 5;
if ((_local1._alpha <= 10) || (_root.control.removeSmoke == 1)) {
_local1.removeMovieClip();
}
};
#endinitclip
Symbol 351 MovieClip Frame 1
stop();
Symbol 355 MovieClip [compass] Frame 1
#initclip 13
function DirectionControl() {
var _local1 = this;
_local1.swapDepths(9997);
_local1.youarehere._visible = 0;
_local1.init();
}
DirectionControl.prototype = new MovieClip();
Object.registerClass("compass", DirectionControl);
DirectionControl.prototype.init = function () {
var _local1 = this;
_local1.onRollOver = function () {
var _local1 = this;
_local1.youarehere._x = _local1[(("s" + _local1.row) + "_") + _local1.col]._x;
_local1.youarehere._y = _local1[(("s" + _local1.row) + "_") + _local1.col]._y;
_local1.youarehere._visible = 1;
};
_local1.onRollOut = function () {
this.youarehere._visible = 0;
};
};
DirectionControl.prototype.checkCompassPosition = function (row, col) {
var _local3 = this;
_local3.row = row;
_local3.col = col;
var _local2 = 1;
while (_local2 <= 10) {
var _local1 = 1;
while (_local1 <= 10) {
if (_local3[(("s" + _local2) + "_") + _local1]._currentframe == 2) {
_local3[(("s" + _local2) + "_") + _local1].gotoAndStop(1);
}
_local1++;
}
_local2++;
}
_local3[(("s" + _local3.endRow) + "_") + _local3.endCol].gotoAndStop(3);
_local3[(("s" + _local3.row) + "_") + _local3.col].gotoAndStop(2);
};
#endinitclip
Symbol 357 MovieClip [potholeClip] Frame 1
#initclip 14
this = new RandomItems();
#endinitclip
this.itemType = "pothole";
Symbol 359 MovieClip [oilSlickClip] Frame 1
#initclip 15
this = new RandomItems();
#endinitclip
this.itemType = "oilslick";
Symbol 360 MovieClip [movingCarClip] Frame 1
#initclip 8
this = new RandomItems();
#endinitclip
this.itemType = "car";
this.gotoAndStop(random(this._totalframes) + 1);
if ((this._x > 220) && (this._x < 380)) {
this._rotation = 90 - (180 * random(2));
this.dir = 0;
if (this._rotation == 90) {
this.sign = 1;
} else {
this.sign = -1;
}
} else {
this._rotation = 180 - (180 * random(2));
this.dir = 1;
if (this._rotation == 0) {
this.sign = 1;
} else {
this.sign = -1;
}
}
Symbol 363 MovieClip [constructionClip] Frame 1
#initclip 16
this = new RandomItems();
#endinitclip
this.itemType = "construction";
Symbol 399 MovieClip Frame 1
this.onPress = function () {
if (this._name == "replayButton") {
_root.replay();
} else if (this._name == "instructionsButton") {
_root.showInstructions();
}
pressing = true;
i = 1;
while (i <= 3) {
buttonColor = new Color(eval ("piece" + i).colorchip);
buttonColor.setRGB(16763904);
lowColor = new Color(eval ("piece" + i).bottomhilite);
lowColorTransform = new Object();
lowColorTransform = {ra:"0", rb:"230", ga:"0", gb:"191", ba:"0", bb:"55", aa:"100", ab:"0"};
lowColor.setTransform(lowColorTransform);
i++;
}
};
this.onRelease = function () {
if (this._name == "playButton") {
_root.startGame();
}
pressing = false;
};
this.onReleaseOutside = function () {
pressing = false;
};
this.onEnterFrame = function () {
if (pressing != true) {
i = 1;
while (i <= 3) {
buttonColor = new Color(eval ("piece" + i).colorchip);
buttonColor.setRGB(rgb);
lowColor = new Color(eval ("piece" + i).bottomhilite);
lowColorTransform = new Object();
lowColorTransform = {ra:"0", rb:hc1, ga:"0", gb:hc2, ba:"0", bb:hc3, aa:"100", ab:"0"};
lowColor.setTransform(lowColorTransform);
i++;
}
}
};
with (piece2) {
_width = _parent.wide;
piece1._x = _x - (_width / 2);
piece3._x = _x + (_width / 2);
_parent.midshadow._width = _width;
_parent.leftshadow._x = _x - (_width / 2);
_parent.rightshadow._x = _x + (_width / 2);
}
label1.autoSize = "center";
label2.autoSize = "center";
Symbol 404 Button
on (press) {
getURL ("http://www.interfuel.com", "_blank");
}
Symbol 474 Button
on (press) {
gotoAndStop (98);
}
Symbol 579 MovieClip Frame 1
_root.jmsCurrentCop = "garcia";
_root.shoutTimer = getTimer() / 1000;
Symbol 579 MovieClip Frame 2
_root.jmsCurrentCop = "junior";
_root.shoutTimer = getTimer() / 1000;
Symbol 579 MovieClip Frame 3
_root.jmsCurrentCop = "johnson";
_root.shoutTimer = getTimer() / 1000;
Symbol 579 MovieClip Frame 4
_root.jmsCurrentCop = "jones";
_root.shoutTimer = getTimer() / 1000;
Symbol 579 MovieClip Frame 5
_root.jmsCurrentCop = "williams";
_root.shoutTimer = getTimer() / 1000;
Symbol 579 MovieClip Frame 6
_root.jmsCurrentCop = "wiegel";
_root.shoutTimer = getTimer() / 1000;
Symbol 580 MovieClip Frame 6
stop();
if (this.newCop) {
this.frame = random(cops._totalframes) + 1;
this.newCop = 0;
}
cops.gotoAndStop(this.frame);
if (this.onFrame != this.frame) {
_global.shoutAvail = 0;
_global["introSound" + this.frame].start();
}
this.onFrame = this.frame;
_root.control.officer = this.frame - 1;
Symbol 596 MovieClip Frame 1
stop();
Symbol 602 MovieClip Frame 1
this.swapDepths(9995);
this.heart.stop();
Instance of Symbol 538 MovieClip in Symbol 602 MovieClip Frame 1
/* no clip actions */
Instance of Symbol 580 MovieClip "pop_up" in Symbol 602 MovieClip Frame 1
onClipEvent (load) {
stop();
this._visible = 0;
}
onClipEvent (enterFrame) {
if (this._visible) {
if (this._currentframe == 1) {
play();
}
} else if (this._currentframe != 1) {
this.gotoAndStop(1);
}
}
Symbol 622 MovieClip Frame 58
stop();
Symbol 638 MovieClip Frame 31
stop();