Frame 1
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
var pv;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
pv = ((fv == 5) ? (getVersion()) : (System.capabilities.version));
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=8&fv=") + fv) + "&v=") + escape(pv)) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
__com_mochibot__("4a4e9b2b", this, 10301, true);
var soundOn = true;
Stage.showMenu = false;
cMore.onRelease = function () {
getURL ("http://www.cartitans.com", "_blank");
};
stop();
onEnterFrame = function () {
if (_root.getBytesLoaded() == _root.getBytesTotal()) {
delete onEnterFrame;
_root.gotoAndStop("TS");
} else {
var _local2 = Math.round((_root.getBytesLoaded() / _root.getBytesTotal()) * 500);
cMore.preloadClip.growBar.gotoAndStop(_local2);
}
};
Frame 2
function sound1() {
if (soundOn == true) {
var _local1 = new Sound();
_local1.attachSound("Loop");
_local1.start(0, 99999);
_local1.setVolume(100);
}
}
user_so = SharedObject.getLocal("user");
if (user_so.data.levelsDone == undefined) {
tuto = true;
user_so.data.levelsDone = 0;
continue_btn._alpha = 50;
start_btn.onRelease = function () {
gotoAndStop ("game");
};
} else {
tuto = false;
start_btn.onRelease = function () {
user_so.data.levelsDone = 0;
gotoAndStop ("game");
};
continue_btn.onRelease = function () {
gotoAndStop ("game");
};
continue_btn.onRollOver = function () {
continue_btn.gotoAndStop(2);
};
continue_btn.onRollOut = function () {
continue_btn.gotoAndStop(1);
};
}
start_btn.onRollOver = function () {
start_btn.gotoAndStop(2);
};
start_btn.onRollOut = function () {
start_btn.gotoAndStop(1);
};
sound1();
stop();
Instance of Symbol 121 MovieClip [popUp] in Frame 2
on (rollOver) {
Mouse.show();
}
Instance of Symbol 141 MovieClip [popDeath] in Frame 2
on (rollOver) {
Mouse.show();
}
Frame 3
function time_f() {
userInterface.tipometer.time_left_mc.time_left.text = "$" + sec;
userInterface.tipometer.gotoAndStop(Math.ceil((sec / tipTarget) * 100) + 1);
if ((deliveryStarted && (!deliveryStopped)) && (!game_pause)) {
sec--;
if (sec == 0) {
difiLevel = 85;
death1();
}
}
}
function addSeconds(the_target) {
if (pizzasLoaded == 1) {
distx = wall.car._x - the_target._x;
disty = wall.car._y - the_target._y;
}
if (pizzasLoaded == 2) {
var _local2 = 1;
while (_local2 <= 3) {
if (_root["pizzaPlace" + _local2]._visible) {
otherPizza = _root["pizzaPlace" + _local2];
distx = otherPizza._x - the_target._x;
disty = otherPizza._y - the_target._y;
}
_local2++;
}
}
if (pizzasLoaded == 3) {
var _local2 = 1;
while (_local2 <= 3) {
if (!_root["pizzaPlace" + _local2]._visible) {
missingPizza = _root["pizzaPlace" + _local2];
distx = otherPizza._x - missingPizza._x;
disty = otherPizza._y - missingPizza._y;
}
_local2++;
}
}
distance = Math.sqrt((distx * distx) + (disty * disty));
sec = sec + Math.round(distance / difiLevel);
}
function sound2() {
if (_root.soundOn == true) {
var _local2 = new Sound();
_local2.attachSound("Loop");
_local2.start(0, 99999);
}
}
function checkForHits() {
if (!game_pause) {
var _local2 = new Object();
for (var _local3 in _root.wall.car.car_in.hit_points) {
_local2.x = wall.car.car_in.hit_points[_local3]._x;
_local2.y = wall.car.car_in.hit_points[_local3]._y;
wall.car.car_in.hit_points.localToGlobal(_local2);
if (wall.wall.hitTest(_local2.x, _local2.y, true)) {
return(true);
}
}
}
}
function generatePizzaPlace(numberOfPizza) {
randomPizzaNumber = Math.ceil(Math.random() * totalPizzas);
if (wall.pizzas["theNewPizzaPlace" + randomPizzaNumber]._visible) {
generatePizzaPlace(numberOfPizza);
return(undefined);
}
_root["pizzaPlace" + numberOfPizza] = wall.pizzas["theNewPizzaPlace" + randomPizzaNumber];
harta.the_map_in["pizza" + numberOfPizza]._x = _root["pizzaPlace" + numberOfPizza]._x / 10;
harta.the_map_in["pizza" + numberOfPizza]._y = _root["pizzaPlace" + numberOfPizza]._y / 10;
harta.the_map_in["pizza" + numberOfPizza]._visible = true;
}
function carHitObstacle() {
if (game_pause == false) {
}
}
function carHitWall() {
if (game_pause == false) {
speed = -(speed / 2);
}
}
function carSounds() {
var _local3 = 1 + random(3);
carSound = new Sound(this);
if (_local3 == 1) {
carSound.attachSound("car1");
} else if (_local3 == 2) {
carSound.attachSound("car2");
} else {
carSound.attachSound("car1");
}
if (_root.soundOn) {
if ((speed > 0.6) || (speed < -0.6)) {
carSound.start(0, 1);
}
}
}
function hitSounds() {
luckyNumber++;
if (luckyNumber > 7) {
luckyNumber = 1;
}
hitSound = new Sound(this);
hitSound.attachSound("thanks" + luckyNumber);
if (_root.soundOn) {
hitSound.start(0, 1);
}
}
function time_to_string(time_to_convert) {
elapsed_minutes = Math.floor(time_to_convert / 60);
elapsed_seconds = time_to_convert - (elapsed_minutes * 60);
if (elapsed_minutes < 10) {
minutes = "0" + elapsed_minutes.toString();
} else {
minutes = elapsed_minutes.toString();
}
if (elapsed_seconds < 10) {
seconds = "0" + elapsed_seconds.toString();
} else {
seconds = elapsed_seconds.toString();
}
return((minutes + ":") + seconds);
}
function gotoTheList1() {
if (tuto) {
userInterface.tutorial3.stop();
}
game_pause = true;
speed = 0;
_root.attachMovie("theList", "theList", _root.getNextHighestDepth(), {_x:halfStageWidth, _y:halfStageHeight});
var _local2 = 1;
while (_local2 <= 3) {
theList.map_in["pizza" + _local2]._x = harta.the_map_in["pizza" + _local2]._x;
theList.map_in["pizza" + _local2]._y = harta.the_map_in["pizza" + _local2]._y;
theList.map_in["pizza" + _local2]._visible = false;
theList.map_in["pizza" + _local2]._visible = harta.the_map_in["pizza" + _local2]._visible;
theList.map_in.car._x = -harta.the_map_in._x;
theList.map_in.car._y = -harta.the_map_in._y;
theList.map_in.car._rotation = wall.car._rotation;
theList.map_in.car._visible = true;
_local2++;
}
theListTweenX = new mx.transitions.Tween(theList, "_xscale", Strong.easeIn, 70, 100, 0.3, true);
theListTweenY = new mx.transitions.Tween(theList, "_yscale", Strong.easeIn, 70, 100, 0.3, true);
theListTweenA = new mx.transitions.Tween(theList, "_alpha", Strong.easeIn, 0, 100, 0.3, true);
}
function gotoTheList2(currentLevel) {
if (currentLevel == undefined) {
currentLevel = level;
}
if (tuto) {
if (userInterface.tutorial3._visible) {
userInterface.tutorial3.play();
}
}
theListTweenX.continueTo(70, 0.3);
theListTweenY.continueTo(70, 0.3);
theListTweenA.continueTo(0, 0.3);
if (theListTweenA == undefined) {
game_pause = false;
removeMovieClip(_root.theList);
}
theList.onEnterFrame = function () {
if (theList._alpha == 0) {
game_pause = false;
removeMovieClip(this);
delete this.onEnterFrame;
}
};
}
function levelUp1() {
if (user_so.data.levelsDone < level) {
user_so.data.levelsDone = level;
}
_root["scoreLevel" + level] = pizzasDeliverd;
game_pause = true;
speed = 0;
_root.attachMovie("popUp", "popUp", _root.getNextHighestDepth(), {_x:halfStageWidth, _y:halfStageHeight});
popTweenX = new mx.transitions.Tween(popUp, "_xscale", Strong.easeIn, 70, 100, 0.3, true);
popTweenY = new mx.transitions.Tween(popUp, "_yscale", Strong.easeIn, 70, 100, 0.3, true);
popTweenA = new mx.transitions.Tween(popUp, "_alpha", Strong.easeIn, 0, 100, 0.3, true);
popUp.popText.time_scoredVAR = "Pizzas Deliverd: " + pizzasDeliverd;
popUp.onEnterFrame = function () {
if (popUp._alpha == 100) {
position_bg(level, true);
delete this.onEnterFrame;
}
};
}
function levelUp2() {
speed = 0;
popTweenX.continueTo(70, 0.3);
popTweenY.continueTo(70, 0.3);
popTweenA.continueTo(0, 0.3);
if (popTweenY == undefined) {
position_bg(level, false);
removeMovieClip(popUp);
}
popUp.onEnterFrame = function () {
if (popUp._alpha == 0) {
position_bg(level, false);
removeMovieClip(this);
}
};
}
function gameWon() {
game_pause = true;
_root["scoreLevel" + level] = elapsed_time;
speed = 0;
the_final_score = Math.floor(((scoreLevel1 + scoreLevel2) + scoreLevel3) / 1);
trace(the_final_score);
_root.gotoAndStop("congrats");
}
function sndVolOn() {
_root.sndVol.setVolume(100);
}
function sndVolOff() {
_root.sndVol.setVolume(0);
}
function death1() {
if (!game_pause) {
game_pause = true;
speed = 0;
_root.attachMovie("popDeath", "popDeath", _root.getNextHighestDepth(), {_x:halfStageWidth, _y:halfStageHeight});
tweenX = new mx.transitions.Tween(popDeath, "_xscale", Strong.easeIn, 70, 100, 0.3, true);
tweenY = new mx.transitions.Tween(popDeath, "_yscale", Strong.easeIn, 70, 100, 0.3, true);
tweenA = new mx.transitions.Tween(popDeath, "_alpha", Strong.easeIn, 0, 100, 0.3, true);
popDeath.onEnterFrame = function () {
if (popDeath._alpha == 100) {
position_bg(level, true);
delete this.onEnterFrame;
}
};
}
}
function death2() {
tweenX.continueTo(70, 0.3);
tweenY.continueTo(70, 0.3);
tweenA.continueTo(0, 0.3);
if (tweenY == undefined) {
game_pause = true;
position_bg(level, false);
removeMovieClip(popDeath);
}
popDeath.onEnterFrame = function () {
if (popDeath._alpha == 0) {
game_pause = true;
position_bg(level, false);
removeMovieClip(this);
}
};
}
function swapScreen(screen) {
if (_root.popUp != undefined) {
removeMovieClip(_root.popUp);
}
if (_root.popDeath != undefined) {
removeMovieClip(_root.popDeath);
}
if (_root.theList != undefined) {
removeMovieClip(_root.theList);
}
_root.attachMovie(screen, screen, _root.getNextHighestDepth(), {_x:halfStageWidth, _y:halfStageHeight});
}
function position_bg(level, Paused) {
deliveryStarted = false;
deliveryStopped = false;
pizzasLoaded = 0;
_root.wall.wall._visible = false;
wallWidth = wall.lvl._width;
wallHeight = wall.lvl._height;
sec = 0;
if (level == 0) {
level++;
}
time_f();
for (var _local2 in wall.car.car_in.hit_points) {
wall.car.car_in.hit_points[_local2]._visible = false;
}
var _local2 = 1;
while (_local2 <= 3) {
harta.the_map_in["pizza" + _local2]._visible = false;
userInterface.minimap["pointer" + _local2]._visible = false;
wall["pointer" + _local2]._visible = false;
if (_local2 > level) {
wall["pizza" + _local2]._visible = false;
} else {
wall["pizza" + _local2]._visible = true;
}
_local2++;
}
wheel_rot = 0;
wall.car._x = initialCarX;
wall.car._y = initialCarY;
wall.car._rotation = initialCarRotation;
userInterface.level_text.text = "Level: " + level;
wall._x = -(wall.car._x - halfStageWidth);
wall._y = -(wall.car._y - halfStageHeight);
wall.car.gotoAndStop(pizzasLoaded + 1);
userInterface.UI_pizzasLoaded.gotoAndStop(pizzasLoaded + 1);
if (Paused) {
game_pause = true;
} else {
game_pause = false;
_root.wall.car.gotoAndPlay(1);
}
}
stop();
level = 1;
initialCarX = wall.car._x;
initialCarY = wall.car._y;
initialCarRotation = wall.car._rotation;
userInterface.tutorial3._visible = false;
userInterface.tutorial2._visible = false;
if (!tuto) {
wall.tutorial1._visible = false;
}
stageHeight = Stage.height;
stageWidth = Stage.width;
halfStageHeight = Stage.height / 2;
halfStageWidth = Stage.width / 2;
var sec = 0;
var sndVol;
sndVol = new Sound();
var wallHeight;
var wallWidth;
var energy = 1;
var speed = 0;
var rot = 3;
var wheel_rot = 0;
var wheel_rot_speed = 1.2;
var acc = 0.3;
var maxforw = 9;
var maxbackw = -3.5;
var friction = 0.92;
var game_pause = true;
var elapsed_time = 0;
var hitting = false;
var start_time = 0;
var totalPizzas = 0;
var pizzasLoaded = 0;
var pizzaPlace1;
var pizzaPlace2;
var pizzaPlace3;
var otherPizza;
var missingPizza;
var difiLevel = 85;
var deliveryStarted = false;
var deliveryStopped = false;
var pizzasDeliverd = 0;
var harta = userInterface.minimap.minimap_in.the_map;
var tipTargetArray = new Array(100, 250, 500);
var luckyNumber = 0;
var tipTarget = tipTargetArray[level - 1];
harta.the_map_in.car._visible = false;
userInterface.target_txt.text = tipTarget;
setInterval(time_f, 1000);
for (var i in wall.pizzas) {
totalPizzas++;
wall.pizzas.attachMovie("pizzaPlaceMc", "theNewPizzaPlace" + totalPizzas, totalPizzas);
wall.pizzas["theNewPizzaPlace" + totalPizzas]._x = wall.pizzas[i]._x;
wall.pizzas["theNewPizzaPlace" + totalPizzas]._y = wall.pizzas[i]._y;
wall.pizzas["theNewPizzaPlace" + totalPizzas]._rotation = wall.pizzas[i]._rotation;
wall.pizzas["theNewPizzaPlace" + totalPizzas]._visible = false;
unloadMovie (wall.pizzas[i]);
}
position_bg(user_so.data.levelsDone + 1, false);
wall.car.onEnterFrame = function () {
harta.the_map_in._x = (-wall.car._x) / 10;
harta.the_map_in._y = (-wall.car._y) / 10;
harta._xscale = 100 - (speed * 2);
harta._yscale = harta._xscale;
userInterface.minimap.rotator._rotation = wall.car._rotation;
if (pizzasLoaded == 0) {
distx = wall.car._x - wall.above.base._x;
disty = wall.car._y - wall.above.base._y;
distance = Math.sqrt((distx * distx) + (disty * disty));
if (distance > 720) {
if (!userInterface.minimap.basePointer._visible) {
userInterface.minimap.basePointer._visible = true;
}
if (!wall.basePointer._visible) {
wall.basePointer._visible = true;
}
pointerRadians = Math.atan2(disty, distx);
pointerDegrees = (pointerRadians * 57.2957795130823) - 90;
userInterface.minimap.basePointer._rotation = pointerDegrees;
wall.basePointer._rotation = pointerDegrees;
wall.basePointer._x = wall.car._x;
wall.basePointer._y = wall.car._y;
} else {
if (userInterface.minimap.basePointer._visible) {
userInterface.minimap.basePointer._visible = false;
}
if (wall.basePointer._visible) {
wall.basePointer._visible = false;
}
}
}
var _local2 = 1;
while (_local2 <= 3) {
if (harta.the_map_in["pizza" + _local2]._visible) {
distx = wall.car._x - _root["pizzaPlace" + _local2]._x;
disty = wall.car._y - _root["pizzaPlace" + _local2]._y;
distance = Math.sqrt((distx * distx) + (disty * disty));
if ((distance > 720) && (harta.the_map_in["pizza" + _local2]._visible)) {
if (!userInterface.minimap["pointer" + _local2]._visible) {
userInterface.minimap["pointer" + _local2]._visible = true;
}
if (!wall["pointer" + _local2]._visible) {
wall["pointer" + _local2]._visible = true;
}
pointerRadians = Math.atan2(disty, distx);
pointerDegrees = (pointerRadians * 57.2957795130823) - 90;
userInterface.minimap["pointer" + _local2]._rotation = pointerDegrees;
wall["pointer" + _local2]._rotation = pointerDegrees;
wall["pointer" + _local2]._x = wall.car._x;
wall["pointer" + _local2]._y = wall.car._y;
} else {
if (userInterface.minimap["pointer" + _local2]._visible) {
userInterface.minimap["pointer" + _local2]._visible = false;
}
if (wall["pointer" + _local2]._visible) {
wall["pointer" + _local2]._visible = false;
}
}
}
if (wall["pizza" + _local2].hitTest(wall.car)) {
if (wall["pizza" + _local2]._visible) {
if (tuto) {
wall.tutorial1._visible = false;
userInterface.tutorial2._visible = true;
userInterface.tutorial2.play();
}
pizzasLoaded = pizzasLoaded + 1;
wall.car.gotoAndStop(pizzasLoaded + 1);
userInterface.UI_pizzasLoaded.gotoAndStop(pizzasLoaded + 1);
generatePizzaPlace(_local2);
wall["pizza" + _local2]._visible = false;
addSeconds(_root["pizzaPlace" + _local2]);
_root["pizzaPlace" + _local2]._visible = true;
deliveryStarted = true;
deliveryStopped = false;
userInterface.time_left_mc.time_left.text = time_to_string(sec);
userInterface.time_left_mc.gotoAndPlay("good");
userInterface.time_left_mc.time_left.text = time_to_string(sec);
}
}
if (_root["pizzaPlace" + _local2]._visible) {
if (_root["pizzaPlace" + _local2].hitTest(wall._x + wall.car._x, wall._y + wall.car._y, true)) {
if (speed == 0) {
if (_root["pizzaPlace" + _local2]._currentframe < 50) {
_root["pizzaPlace" + _local2].play();
_root["pizzaPlace" + _local2].the_man.play();
deliveryStopped = true;
}
if (_root["pizzaPlace" + _local2].deliverd) {
if (tuto) {
userInterface.tutorial3._visible = true;
userInterface.tutorial3.play();
}
_root["pizzaPlace" + _local2].deliverd = false;
pizzasLoaded--;
hitSounds();
harta.the_map_in["pizza" + _local2]._visible = false;
wall.car.gotoAndStop(pizzasLoaded + 1);
userInterface.UI_pizzasLoaded.gotoAndStop(pizzasLoaded + 1);
difiLevel = difiLevel + level;
pizzasDeliverd++;
if (pizzasLoaded == 0) {
deliveryStopped = true;
var _local3 = 1;
while (_local3 <= level) {
wall["pizza" + _local3]._visible = true;
_local3++;
}
if (sec >= tipTarget) {
level++;
if (level == 4) {
gameWon();
return(undefined);
}
tipTarget = tipTargetArray[level - 1];
userInterface.target_txt.text = tipTarget;
levelUp1();
}
} else {
deliveryStopped = false;
}
}
} else if ((speed != 0) && (_root["pizzaPlace" + _local2]._currentframe < 50)) {
_root["pizzaPlace" + _local2].stop();
_root["pizzaPlace" + _local2].the_man.gotoAndStop(1);
deliveryStopped = false;
}
}
}
_local2++;
}
if (energy <= 0) {
energy = 1;
death1();
}
car_x = wall.car._x + wall._x;
car_y = wall.car._y + wall._y;
wall.car._x = wall.car._x + (Math.sin(wall.car._rotation * (Math.PI/180)) * speed);
wall.car._y = wall.car._y - (Math.cos(wall.car._rotation * (Math.PI/180)) * speed);
if ((wallHeight != stageHeight) && (wallWidth == stageWidth)) {
if (wall._y < (stageHeight - wallHeight)) {
wall._y = stageHeight - wallHeight;
} else if (wall._y > 0) {
wall._y = 0;
}
if ((wall._y != (stageHeight - wallHeight)) && (wall._y != 0)) {
wall._y = wall._y + (Math.cos(wall.car._rotation * (Math.PI/180)) * speed);
}
if (wall._y == (stageHeight - wallHeight)) {
if (car_y >= halfStageHeight) {
} else {
wall._y = wall._y + (Math.cos(wall.car._rotation * (Math.PI/180)) * speed);
wall.car._y = halfStageHeight - wall._y;
}
}
if (wall._y == 0) {
if (car_y <= halfStageHeight) {
} else {
wall._y = wall._y + (Math.cos(wall.car._rotation * (Math.PI/180)) * speed);
wall.car._y = halfStageHeight - wall._y;
car_y = halfStageHeight;
}
}
} else if ((wallHeight != stageHeight) && (wallWidth != stageWidth)) {
if (wall._y < (stageHeight - wallHeight)) {
wall._y = stageHeight - wallHeight;
} else if (wall._y > 0) {
wall._y = 0;
} else if (wall._x < (stageWidth - wallWidth)) {
wall._x = stageWidth - wallWidth;
} else if (wall._x > 0) {
wall._x = 0;
}
if ((((wall._y != (stageHeight - wallHeight)) && (wall._y != 0)) && (wall._x != (stageWidth - wallWidth))) && (wall._x != 0)) {
wall._x = wall._x - (Math.sin(wall.car._rotation * (Math.PI/180)) * speed);
wall._y = wall._y + (Math.cos(wall.car._rotation * (Math.PI/180)) * speed);
}
if (((wall._y == (stageHeight - wallHeight)) && (wall._x != 0)) && (wall._x != (stageWidth - wallWidth))) {
wall._x = wall._x - (Math.sin(wall.car._rotation * (Math.PI/180)) * speed);
if (car_y >= halfStageHeight) {
} else {
wall._y = wall._y + (Math.cos(wall.car._rotation * (Math.PI/180)) * speed);
wall.car._y = halfStageHeight - wall._y;
car_y = halfStageHeight;
}
}
if (((wall._y == 0) && (wall._x != 0)) && (wall._x != (stageWidth - wallWidth))) {
wall._x = wall._x - (Math.sin(wall.car._rotation * (Math.PI/180)) * speed);
if (car_y <= halfStageHeight) {
} else {
wall._y = wall._y + (Math.cos(wall.car._rotation * (Math.PI/180)) * speed);
wall.car._y = halfStageHeight - wall._y;
car_y = halfStageHeight;
}
}
if (((wall._x == (stageWidth - wallWidth)) && (wall._y != 0)) && (wall._y != (stageHeight - wallHeight))) {
if (car_x >= halfStageWidth) {
} else {
wall._x = wall._x - (Math.sin(wall.car._rotation * (Math.PI/180)) * speed);
wall.car._x = halfStageWidth - wall._x;
car_x = halfStageWidth;
}
wall._y = wall._y + (Math.cos(wall.car._rotation * (Math.PI/180)) * speed);
}
if (((wall._x == 0) && (wall._y != 0)) && (wall._y != (stageHeight - wallHeight))) {
if (car_x <= halfStageWidth) {
} else {
wall._x = wall._x - (Math.sin(wall.car._rotation * (Math.PI/180)) * speed);
wall.car._x = halfStageWidth - wall._x;
car_x = halfStageWidth;
}
wall._y = wall._y + (Math.cos(wall.car._rotation * (Math.PI/180)) * speed);
}
if ((wall._x == (stageWidth - wallWidth)) && (wall._y == 0)) {
if (car_x >= halfStageWidth) {
} else {
wall._x = wall._x - (Math.sin(wall.car._rotation * (Math.PI/180)) * speed);
wall.car._x = halfStageWidth - wall._x;
car_x = halfStageWidth;
}
if (car_y <= halfStageHeight) {
} else {
wall._y = wall._y + (Math.cos(wall.car._rotation * (Math.PI/180)) * speed);
wall.car._y = halfStageHeight - wall._y;
car_y = halfStageHeight;
}
}
if ((wall._x == 0) && (wall._y == 0)) {
if (car_x <= halfStageWidth) {
} else {
wall._x = wall._x - (Math.sin(wall.car._rotation * (Math.PI/180)) * speed);
wall.car._x = halfStageWidth - wall._x;
car_x = halfStageWidth;
}
if (car_y <= halfStageHeight) {
} else {
wall._y = wall._y + (Math.cos(wall.car._rotation * (Math.PI/180)) * speed);
wall.car._y = halfStageHeight - wall._y;
car_y = halfStageHeight;
}
}
if ((wall._x == 0) && (wall._y == (stageHeight - wallHeight))) {
if (car_x <= halfStageWidth) {
} else {
wall._x = wall._x - (Math.sin(wall.car._rotation * (Math.PI/180)) * speed);
wall.car._x = halfStageWidth - wall._x;
car_x = halfStageWidth;
}
if (car_y >= halfStageHeight) {
} else {
wall._y = wall._y + (Math.cos(wall.car._rotation * (Math.PI/180)) * speed);
wall.car._y = halfStageHeight - wall._y;
car_y = halfStageHeight;
}
}
if ((wall._x == (stageWidth - wallWidth)) && (wall._y == (stageHeight - wallHeight))) {
if (car_x >= halfStageWidth) {
} else {
wall._x = wall._x - (Math.sin(wall.car._rotation * (Math.PI/180)) * speed);
wall.car._x = halfStageWidth - wall._x;
car_x = halfStageWidth;
}
if (car_y >= halfStageHeight) {
} else {
wall._y = wall._y + (Math.cos(wall.car._rotation * (Math.PI/180)) * speed);
wall.car._y = halfStageHeight - wall._y;
car_y = halfStageHeight;
}
}
}
if (!game_pause) {
if (Key.isDown(32) && (speed > 1)) {
speed = speed - (acc * 2);
}
if (Key.isDown(32) && (speed < -1)) {
speed = speed + (acc * 2);
}
if ((Key.isDown(87) && (speed < maxforw)) || (Key.isDown(38) && (speed < maxforw))) {
if (speed < 5) {
speed = speed + acc;
} else if (speed > 3) {
speed = speed + (acc * 1.3);
}
} else if ((Key.isDown(83) && (speed > maxbackw)) || (Key.isDown(40) && (speed > maxbackw))) {
if (speed > 0) {
speed = speed - (acc * 2);
}
speed = speed - acc;
} else if (((!Key.isDown(83)) || ((!Key.isDown(38)) && (!Key.isDown(87)))) || (!Key.isDown(40))) {
if ((speed < wheel_rot_speed) && (speed > (-wheel_rot_speed))) {
speed = 0;
} else {
speed = speed * friction;
}
}
if (Key.isDown(65) || (Key.isDown(37))) {
wall.car._rotation = wall.car._rotation - (rot * Math.min(speed / maxforw, 1));
if (wheel_rot >= -20) {
wheel_rot = wheel_rot - wheel_rot_speed;
}
}
if (Key.isDown(68) || (Key.isDown(39))) {
wall.car._rotation = wall.car._rotation + (rot * Math.min(speed / maxforw, 1));
if (wheel_rot <= 20) {
wheel_rot = wheel_rot + wheel_rot_speed;
}
}
if ((((!Key.isDown(65)) && (!Key.isDown(37))) && (!Key.isDown(68))) && (!Key.isDown(39))) {
if (wheel_rot < wheel_rot_speed) {
wheel_rot = wheel_rot + wheel_rot_speed;
} else if (wheel_rot > wheel_rot_speed) {
wheel_rot = wheel_rot - wheel_rot_speed;
}
}
if (currentCar != 3) {
wall.car.car_in["left_wheel" + currentCar]._rotation = wheel_rot;
wall.car.car_in["right_wheel" + currentCar]._rotation = wheel_rot;
} else {
wall.car.car_in["left_wheel" + currentCar]._rotation = -wheel_rot;
wall.car.car_in["right_wheel" + currentCar]._rotation = -wheel_rot;
}
}
if (!game_pause) {
if (checkForHits() && (!hitting)) {
if (speed > 0) {
speed = -2.5;
} else {
speed = 3.5;
}
hitting = true;
return(undefined);
}
if ((!checkForHits()) && (hitting)) {
hitting = false;
return(undefined);
}
}
};
Frame 4
final_score.text = pizzasDeliverd;
stop();
Symbol 78 MovieClip Frame 49
gotoAndPlay (1);
Symbol 86 MovieClip Frame 75
gotoAndPlay (1);
Symbol 87 MovieClip Frame 72
stop();
Symbol 375 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 376 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 377 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 95 Button
on (rollOver) {
Mouse.show();
this.backGround.useHandCursor = false;
}
Symbol 98 Button
on (release) {
_root.currentCar = 1;
cars_display.gotoAndStop(_root.currentCar);
_root.position_bg(level, true);
}
Symbol 100 Button
on (release) {
_root.currentCar = 2;
cars_display.gotoAndStop(_root.currentCar);
_root.position_bg(level, true);
}
Symbol 103 Button
on (release) {
_root.currentCar = 3;
cars_display.gotoAndStop(_root.currentCar);
_root.position_bg(level, true);
}
Symbol 106 Button
on (release) {
_root.currentCar = 4;
cars_display.gotoAndStop(_root.currentCar);
_root.position_bg(level, true);
}
Symbol 112 Button
on (release, keyPress "<Space>") {
_root.levelUp2();
}
Symbol 116 Button
on (release) {
getURL ("http://www.cartitans.com", _blank);
}
Symbol 119 MovieClip Frame 1
stop();
var level_scoredVAR;
var ammunitionLeftVAR;
var lifeLeftVAR;
var time_scoredVAR;
if (time_scoredVAR != undefined) {
text_holder.time_scored.text = time_scoredVAR;
}
text_holder.level_scored.text = level_scoredVAR;
text_holder.ammunitionLeft.text = ammunitionLeftVAR;
text_holder.lifeLeft.text = lifeLeftVAR;
Instance of Symbol 107 MovieClip "cars_display" in Symbol 121 MovieClip [popUp] Frame 1
onClipEvent (load) {
this.gotoAndStop(_root.currentCar);
}
Symbol 122 Button
on (rollOver) {
this.useHandCursor = false;
}
Symbol 132 Button
on (release, keyPress "<Space>") {
_root.gotoTheList2();
}
Symbol 133 MovieClip [theList] Frame 1
levels_pannel_on.gotoAndStop(_root.user_so.data.levelsDone + 1);
Symbol 138 Button
on (release, keyPress "<Space>") {
_root.death2();
}
Symbol 139 Button
on (release) {
getURL ("http://www.cartitans.com", "_blank");
}
Symbol 144 MovieClip Frame 1
stop();
Symbol 149 MovieClip Frame 1
stop();
Symbol 151 Button
on (release) {
getURL ("http://www.cartitans.com", _blank);
}
Symbol 155 MovieClip Frame 1
stop();
Symbol 159 MovieClip Frame 1
stop();
Symbol 160 MovieClip Frame 1
soundOnOff.onRelease = function () {
if (_root.soundOn == true) {
this.gotoAndStop(2);
_root.soundOn = false;
_root.sndVolOff();
stopAllSounds();
} else {
this.gotoAndStop(1);
_root.soundOn = true;
_root.sndVolOn();
playSound = new Sound(this);
playSound.attachSound("Loop");
playSound.start(0, 9999);
}
};
soundOnOff.onRollOver = function () {
if (_root.soundOn == true) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
};
soundOnOff.onRollOut = function () {
if (_root.soundOn == true) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
};
Symbol 163 Button
on (release) {
getURL ("http://www.juegosjuegos.com", "_blank");
}
Symbol 186 MovieClip Frame 1
stop();
Symbol 187 MovieClip Frame 1
stop();
Symbol 235 MovieClip [pizzaPlaceMc] Frame 1
stop();
the_man.gotoAndStop(1);
deliverd = false;
Symbol 235 MovieClip [pizzaPlaceMc] Frame 50
deliverd = true;
Symbol 235 MovieClip [pizzaPlaceMc] Frame 88
stop();
the_man.gotoAndStop(1);
this._visible = false;
this.gotoAndStop(1);
Symbol 332 Button
on (release) {
getURL ("http://www.cartitans.com", _blank);
}
Symbol 337 MovieClip Frame 1
stop();
Instance of Symbol 337 MovieClip "minimap_in" in Symbol 338 MovieClip Frame 1
on (release) {
if (!_root.game_pause) {
_root.gotoTheList1();
}
}
Symbol 343 MovieClip Frame 1
stop();
Symbol 348 MovieClip Frame 1
stop();
_root.userInterface.time_left_mc.time_left.text = _root.time_to_string(_root.sec);
Symbol 348 MovieClip Frame 105
gotoAndStop (1);
Symbol 348 MovieClip Frame 155
gotoAndStop (1);
Symbol 360 MovieClip Frame 1
stop();
Symbol 360 MovieClip Frame 461
stop();
_root.tuto = false;
Symbol 362 MovieClip Frame 1
stop();
Symbol 362 MovieClip Frame 161
stop();
Symbol 365 MovieClip Frame 1
stopAllSounds();
Symbol 365 MovieClip Frame 2
stop();
Symbol 374 Button
on (release) {
_root.gotoAndStop("TS");
}