Frame 1
Stage.showMenu = false;
var MochiAd = {getVersion:function () {
return("2.1");
}, showPreGameAd:function (options) {
var _local27 = {clip:_root, ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:16747008, background:16777161, outline:13994812, ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}};
options = MochiAd._parseOptions(options, _local27);
var clip = options.clip;
var _local23 = 11000;
var _local26 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!MochiAd.load(options)) {
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local14 = MochiAd._getRes(options);
var _local4 = _local14[0];
var _local13 = _local14[1];
mc._x = _local4 * 0.5;
mc._y = _local13 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk._x = _local4 * -0.5;
chk._y = _local13 * -0.5;
var _local7 = chk.createEmptyMovieClip("_mochiad_bar", 4);
_local7._x = 10;
_local7._y = _local13 - 20;
var _local22 = options.color;
delete options.color;
var _local19 = options.background;
delete options.background;
var _local24 = options.outline;
delete options.outline;
var _local5 = _local7.createEmptyMovieClip("_outline", 1);
_local5.beginFill(_local19);
_local5.moveTo(0, 0);
_local5.lineTo(_local4 - 20, 0);
_local5.lineTo(_local4 - 20, 10);
_local5.lineTo(0, 10);
_local5.lineTo(0, 0);
_local5.endFill();
var _local3 = _local7.createEmptyMovieClip("_inside", 2);
_local3.beginFill(_local22);
_local3.moveTo(0, 0);
_local3.lineTo(_local4 - 20, 0);
_local3.lineTo(_local4 - 20, 10);
_local3.lineTo(0, 10);
_local3.lineTo(0, 0);
_local3.endFill();
_local3._xscale = 0;
var _local6 = _local7.createEmptyMovieClip("_outline", 3);
_local6.lineStyle(0, _local24, 100);
_local6.moveTo(0, 0);
_local6.lineTo(_local4 - 20, 0);
_local6.lineTo(_local4 - 20, 10);
_local6.lineTo(0, 10);
_local6.lineTo(0, 0);
chk.ad_msec = _local23;
chk.ad_timeout = _local26;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = function (width, height) {
};
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec;
};
chk.onEnterFrame = function () {
var _local6 = this._parent._parent;
var _local12 = this._parent._mochiad_ctr;
var _local5 = getTimer() - this.started;
var _local3 = false;
var _local4 = _local6.getBytesTotal();
var _local8 = _local6.getBytesLoaded();
var _local10 = (100 * _local8) / _local4;
var _local11 = (100 * _local5) / chk.ad_msec;
var _local9 = this._mochiad_bar._inside;
var _local2 = Math.min(100, Math.min(_local10 || 0, _local11));
_local2 = Math.max(this.last_pcnt, _local2);
this.last_pcnt = _local2;
_local9._xscale = _local2;
if (!chk.showing) {
var _local7 = _local12.getBytesTotal();
if ((_local7 > 0) || (typeof(_local7) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local5 > chk.ad_timeout) {
_local3 = true;
}
}
if (_local5 > chk.ad_msec) {
_local3 = true;
}
if (((_local4 > 0) && (_local8 >= _local4)) && (_local3)) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
}
}
};
}, showInterLevelAd:function (options) {
var _local13 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}};
options = MochiAd._parseOptions(options, _local13);
var clip = options.clip;
var _local10 = 11000;
var _local12 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!MochiAd.load(options)) {
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local5 = MochiAd._getRes(options);
var _local14 = _local5[0];
var _local11 = _local5[1];
mc._x = _local14 * 0.5;
mc._y = _local11 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_msec = _local10;
chk.ad_timeout = _local12;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = function (width, height) {
};
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec - 250;
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
_local2 = true;
}
}
if (_local4 > chk.ad_msec) {
_local2 = true;
}
if (_local2) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
}
}
};
}, showTimedAd:function (options) {
MochiAd.showInterLevelAd(options);
}, showPreloaderAd:function (options) {
MochiAd.showPreGameAd(options);
}, _allowDomains:function (server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}, _loadCommunicator:function (options) {
var _local26 = {clip:_root, com_server:"http://x.mochiads.com/com/1/", method:"loadCommunicator", depth:10337, id:"_UNKNOWN_"};
options = MochiAd._parseOptions(options, _local26);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = MochiAd.getVersion();
var _local18 = options.clip;
var _local20 = "_mochiad_com_" + options.id;
if (!MochiAd._isNetworkAvailable()) {
return(null);
}
if (_local18[_local20]) {
return(_local18[_local20].lc);
}
var _local21 = options.com_server + options.id;
MochiAd._allowDomains(_local21);
delete options.id;
delete options.com_server;
var _local25 = options.depth;
delete options.depth;
var _local17 = _local18.createEmptyMovieClip(_local20, _local25);
var _local11 = _local17.createEmptyMovieClip("_mochiad_com", 1);
for (var _local15 in options) {
_local11[_local15] = options[_local15];
}
var _local6 = new LocalConnection();
var _local16 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local6.mc = _local17;
_local6.name = _local16;
_local6.allowDomain = function (d) {
return(true);
};
_local6.allowInsecureDomain = _local6.allowDomain;
_local6.connect(_local16);
_local17.lc = _local6;
_local11.lc = _local16;
_local6._id = 0;
_local6._queue = [];
_local6.rpcResult = function (cb_arg) {
var _local8 = parseInt(cb_arg);
var _local4 = this._callbacks[_local8];
if (!_local4) {
return(undefined);
}
delete this._callbacks[_local8];
var _local5 = [];
var _local3 = 2;
while (_local3 < _local4.length) {
_local5.push(_local4[_local3]);
_local3++;
}
_local3 = 1;
while (_local3 < arguments.length) {
_local5.push(arguments[_local3]);
_local3++;
}
var _local6 = _local4[1];
var _local7 = _local4[0];
if (_local7 && (typeof(_local6) == "string")) {
_local6 = _local7[_local6];
}
if (_local6) {
_local6.apply(_local7, _local5);
}
};
_local6._didConnect = function (endpoint) {
this._endpoint = endpoint;
var _local4 = this._queue;
delete this._queue;
var _local5 = this.doSend;
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = _local4[_local2];
_local5.apply(this, _local3);
_local2++;
}
};
_local6.doSend = function (args, cbobj, cbfn) {
if (this._endpoint == null) {
var _local4 = [];
var _local3 = 0;
while (_local3 < arguments.length) {
_local4.push(arguments[_local3]);
_local3++;
}
this._queue.push(_local4);
return(undefined);
}
this._id = this._id + 1;
var _local5 = this._id;
if ((cbfn === undefined) || (cbfn === null)) {
cbfn = cbobj;
}
this._callbacks[_local5] = [cbobj, cbfn];
var _local7 = new LocalConnection();
var _local9 = _local7.send(this._endpoint, "rpc", _local5, args);
};
_local6._callbacks = {};
_local6._callbacks[0] = [_local6, "_didConnect"];
_local11.st = getTimer();
_local11.loadMovie(_local21 + ".swf", "POST");
return(_local6);
}, fetchHighScores:function (options, callbackObj, callbackMethod) {
var _local1 = MochiAd._loadCommunicator({id:options.id});
if (!_local1) {
return(false);
}
var _local4 = ["fetchHighScores", options];
_local1.doSend(["fetchHighScores", options], callbackObj, callbackMethod);
return(true);
}, sendHighScore:function (options, callbackObj, callbackMethod) {
var _local1 = MochiAd._loadCommunicator({id:options.id});
if (!_local1) {
return(false);
}
var _local4 = ["sendHighScore", options];
_local1.doSend(["sendHighScore", options], callbackObj, callbackMethod);
return(true);
}, load:function (options) {
var _local13 = {clip:_root, server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = MochiAd._parseOptions(options, _local13);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = MochiAd.getVersion();
var _local9 = options.clip;
if (!MochiAd._isNetworkAvailable()) {
return(null);
}
if (_local9._mochiad_loaded) {
return(null);
}
var _local12 = options.depth;
delete options.depth;
var _local6 = _local9.createEmptyMovieClip("_mochiad", _local12);
var _local11 = MochiAd._getRes(options);
options.res = (_local11[0] + "x") + _local11[1];
options.server = options.server + options.id;
delete options.id;
_local9._mochiad_loaded = true;
var _local4 = _local6.createEmptyMovieClip("_mochiad_ctr", 1);
for (var _local7 in options) {
_local4[_local7] = options[_local7];
}
var _local10 = _local4.server;
delete _local4.server;
var _local14 = MochiAd._allowDomains(_local10);
_local6.onEnterFrame = function () {
if (this._mochiad_ctr._url != this._url) {
this.onEnterFrame = function () {
if (!this._mochiad_ctr) {
delete this.onEnterFrame;
MochiAd.unload(this._parent);
}
};
}
};
var _local5 = new LocalConnection();
var _local8 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local5.mc = _local6;
_local5.name = _local8;
_local5.hostname = _local14;
_local5.allowDomain = function (d) {
return(true);
};
_local5.allowInsecureDomain = _local5.allowDomain;
_local5.connect(_local8);
_local6.lc = _local5;
_local4.lc = _local8;
_local4.st = getTimer();
_local4.loadMovie(_local10 + ".swf", "POST");
return(_local6);
}, unload:function (clip) {
if (typeof(clip) == "undefined") {
clip = _root;
}
if (clip.clip && (clip.clip._mochiad)) {
clip = clip.clip;
}
if (!clip._mochiad) {
return(false);
}
clip._mochiad.removeMovieClip();
delete clip._mochiad_loaded;
delete clip._mochiad;
return(true);
}, _isNetworkAvailable:function () {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}, _getRes:function (options) {
var _local3 = options.clip.getBounds();
var _local2 = 0;
var _local1 = 0;
if (typeof(options.res) != "undefined") {
var _local4 = options.res.split("x");
_local2 = parseFloat(_local4[0]);
_local1 = parseFloat(_local4[1]);
} else {
_local2 = _local3.xMax - _local3.xMin;
_local1 = _local3.yMax - _local3.yMin;
}
if ((_local2 == 0) || (_local1 == 0)) {
_local2 = Stage.width;
_local1 = Stage.height;
}
return([_local2, _local1]);
}, _parseOptions:function (options, defaults) {
var _local4 = {};
for (var _local8 in defaults) {
_local4[_local8] = defaults[_local8];
}
if (options) {
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
}
if (_root.mochiad_options) {
var _local5 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local5.length) {
var _local3 = _local5[_local2].split("=");
_local4[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
return(_local4);
}, _:null};
MochiAd.showPreGameAd({id:"82116cd4f8b01142", res:"600x500", background:16777215, color:2210070, outline:16777215, no_bg:true});
Frame 2
stop();
Frame 12
stop();
Frame 32
stop();
Frame 41
function setCars() {
place1 = "null";
place2 = "null";
place3 = "null";
place4 = "null";
_root.statusBar.pos1.gotoAndStop(1);
_root.statusBar.pos2.gotoAndStop(1);
_root.statusBar.pos3.gotoAndStop(1);
_root.statusBar.pos4.gotoAndStop(1);
_root.whiteCar._visible = true;
_root.blueCar._visible = true;
_root.yellowCar._visible = true;
_root.greenCar._visible = true;
_root[enemyArray[0]]._rotation = 0;
_root[enemyArray[1]]._rotation = 0;
_root[enemyArray[2]]._rotation = 0;
_root[hero]._rotation = 0;
_root.box._visible = true;
if (track == 1) {
_root[enemyArray[0]]._x = 465;
_root[enemyArray[0]]._y = 312;
_root[enemyArray[1]]._x = 498;
_root[enemyArray[1]]._y = 312;
_root[enemyArray[2]]._x = 530;
_root[enemyArray[2]]._y = 312;
_root[hero]._x = 562;
_root[hero]._y = 312;
enemy0Speed = 4;
enemy1Speed = 5;
enemy2Speed = 6;
} else if (track == 2) {
_root[enemyArray[0]]._x = 470;
_root[enemyArray[0]]._y = 357;
_root[enemyArray[1]]._x = 502;
_root[enemyArray[1]]._y = 357;
_root[enemyArray[2]]._x = 535;
_root[enemyArray[2]]._y = 357;
_root[hero]._x = 569;
_root[hero]._y = 357;
enemy0Speed = 3.8;
enemy1Speed = 4.8;
enemy2Speed = 6.1;
} else if (track == 3) {
_root[enemyArray[0]]._x = 124;
_root[enemyArray[0]]._y = 275;
_root[enemyArray[1]]._x = 94;
_root[enemyArray[1]]._y = 275;
_root[enemyArray[2]]._x = 64;
_root[enemyArray[2]]._y = 275;
_root[hero]._x = 34;
_root[hero]._y = 275;
enemy0Speed = 4.2;
enemy1Speed = 4.5;
enemy2Speed = 5.5;
}
if (_root.difficulty == "medium") {
enemy0Speed = enemy0Speed * 1.2;
enemy1Speed = enemy1Speed * 1.2;
enemy2Speed = enemy2Speed * 1.2;
} else if (_root.difficulty == "hard") {
enemy0Speed = enemy0Speed * 1.5;
enemy1Speed = enemy1Speed * 1.5;
enemy2Speed = enemy2Speed * 1.5;
}
}
function playSound(name) {
_root.soundFX.gotoAndPlay(name);
}
function useWeapon() {
if (heroSpeed > savedMaxSpeed) {
heroSpeed = savedMaxSpeed;
maxSpeed = savedMaxSpeed;
}
weaponNum++;
var _local2 = "weapon" + weaponNum;
_root.attachMovie(weapon, _local2, weaponNum);
_root[_local2]._x = _root[hero]._x;
_root[_local2]._y = _root[hero]._y;
_root[_local2]._rotation = _root[hero]._rotation;
_root[_local2].user = "hero";
weapon = "null";
_root.statusBar.weaponWindow.gotoAndStop(1);
}
function enemyWeapon() {
var _local2 = 0;
while (_local2 <= 2) {
var _local4 = enemyArray[_local2];
var _local6 = _local4 + "Spin";
var _local5 = ("e" + _local2) + "weapon";
if (_root[_local5] != "null") {
if ((_root[_local6] == false) && (((_root[enemyArray[_local2]].range.hitTest(_root.yellowCar.bumper) || (_root[enemyArray[_local2]].range.hitTest(_root.blueCar.bumper))) || (_root[enemyArray[_local2]].range.hitTest(_root.greenCar.bumper))) || (_root[enemyArray[_local2]].range.hitTest(_root.whiteCar.bumper)))) {
enemyWeaponNum++;
var _local3 = "weapon" + enemyWeaponNum;
_root.attachMovie(_root[_local5], _local3, enemyWeaponNum);
_root[_local3]._x = _root[_local4]._x;
_root[_local3]._y = _root[_local4]._y;
_root[_local3]._rotation = _root[_local4]._rotation;
_root[_local3].user = "enemy";
_root[_local5] = "null";
}
}
_local2++;
}
}
function moveEnemy() {
var _local6 = 0;
while (_local6 <= 2) {
var _local2 = enemyArray[_local6];
var _local3 = "ePos" + _local6;
var _local9 = ("enemy" + _local6) + "x";
var _local8 = ("enemy" + _local6) + "y";
var _local4 = (("enemy" + _local6) + "track") + track;
var _local11 = ("enemy" + _local6) + "Speed";
var _local17 = _local2 + "Spin";
if (_root[_local2].outline.hitTest(_root.box)) {
var _local27 = random(6);
var _local25 = ("e" + _local6) + "weapon";
_root[_local25] = "weapon" + _local27;
var _local15 = random(11) * 2;
var _local18 = "boxTrack" + track;
_root.box._x = _root[_local18][_local15];
_root.box._y = _root[_local18][_local15 + 1];
}
if (_root[_local17] == false) {
var _local20 = _root[_local2]._x;
var _local19 = _root[_local2]._y;
var _local26 = _root[_local4][_root[_local3]];
var _local23 = _root[_local4][_root[_local3] + 1];
var _local22 = _local26 - _local20;
var _local21 = _local23 - _local19;
var _local24 = Math.atan2(_local21, _local22);
var _local28 = (_local24 * 57.2957795130823) + 180;
_root[_local2]._rotation = _local28 - 90;
if ((_root[_local2]._x <= _root[_local4][_root[_local3]]) && (_root[_local9] == false)) {
_root[_local2]._x = _root[_local2]._x + _root[_local11];
if (_root[_local2]._x >= _root[_local4][_root[_local3]]) {
_root[_local2]._x = _root[_local4][_root[_local3]];
_root[_local9] = true;
}
} else if (_root[_local9] == false) {
_root[_local2]._x = _root[_local2]._x - _root[_local11];
if (_root[_local2]._x <= _root[_local4][_root[_local3]]) {
_root[_local2]._x = _root[_local4][_root[_local3]];
_root[_local9] = true;
}
}
if ((_root[_local2]._y <= _root[_local4][_root[_local3] + 1]) && (_root[_local8] == false)) {
_root[_local2]._y = _root[_local2]._y + _root[_local11];
if (_root[_local2]._y >= _root[_local4][_root[_local3] + 1]) {
_root[_local8] = true;
_root[_local2]._y = _root[_local4][_root[_local3] + 1];
}
} else if (_root[_local8] == false) {
_root[_local2]._y = _root[_local2]._y - _root[_local11];
if (_root[_local2]._y <= _root[_local4][_root[_local3] + 1]) {
_root[_local8] = true;
_root[_local2]._y = _root[_local4][_root[_local3] + 1];
}
}
if (_root[_local9] && (_root[_local8])) {
_root[_local9] = false;
_root[_local8] = false;
_root[_local3] = _root[_local3] + 2;
if (_root[_local3] > _root[_local4].length) {
_root[_local3] = 0;
}
}
} else {
var _local5 = _local2 + "SpinSpeed";
var _local7 = 1;
while (_local7 <= 7) {
var _local10 = "stop" + _local7;
if (_root[_local2].hitTest(_root.raceTracks[_local10])) {
_root[_local5] = -4;
}
_local7++;
}
var _local16 = _local2 + "SpinTimer";
var _local14 = _local2 + "Ang";
var _local13 = _local2 + "X";
var _local12 = _local2 + "Y";
_root[_local16]++;
_root[_local2]._rotation = _root[_local2]._rotation + 20;
if ((_root[_local14] >= 0) && (_root[_local14] <= 90)) {
_root[_local2]._x = _root[_local2]._x + (_root[_local13] * _root[_local5]);
_root[_local2]._y = _root[_local2]._y - (_root[_local12] * _root[_local5]);
} else if (_root[_local14] > 90) {
_root[_local2]._x = _root[_local2]._x + (_root[_local13] * _root[_local5]);
_root[_local2]._y = _root[_local2]._y + (_root[_local12] * _root[_local5]);
} else if (_root[_local14] < -90) {
_root[_local2]._x = _root[_local2]._x - (_root[_local13] * _root[_local5]);
_root[_local2]._y = _root[_local2]._y + (_root[_local12] * _root[_local5]);
} else {
_root[_local2]._x = _root[_local2]._x - (_root[_local13] * _root[_local5]);
_root[_local2]._y = _root[_local2]._y - (_root[_local12] * _root[_local5]);
}
if (_root[_local16] >= 30) {
_root[_local17] = false;
}
}
_local6++;
}
}
function determineAngle(hittingCar, hitCar, tempAngle) {
_root.playSound("skid");
var _local2 = hitCar + "Y";
var _local4 = hitCar + "X";
var _local5 = hitCar + "SpinSpeed";
_root[_local5] = 5;
if (hittingCar == hero) {
_root[_local5] = heroSpeed * 0.8;
}
if ((tempAngle >= 0) && (tempAngle <= 90)) {
_root[_local2] = (90 - tempAngle) / 90;
_root[_local4] = 1 - _root[_local2];
} else if (tempAngle > 90) {
_root[_local2] = (tempAngle - 90) / 90;
_root[_local4] = 1 - _root[_local2];
} else if (tempAngle < -90) {
_root[_local2] = (Math.abs(tempAngle) - 90) / 90;
_root[_local4] = 1 - _root[_local2];
} else {
_root[_local2] = (90 - Math.abs(tempAngle)) / 90;
_root[_local4] = 1 - _root[_local2];
}
}
function collisionDetection() {
if (_root.whiteCar.front.hitTest(_root.blueCar.bumper) && (blueCarSpin == false)) {
blueCarSpin = true;
blueCarSpinTimer = 0;
blueCarAng = _root.whiteCar._rotation;
determineAngle("whiteCar", "blueCar", blueCarAng);
} else if (_root.whiteCar.front.hitTest(_root.yellowCar.bumper) && (yellowCarSpin == false)) {
yellowCarSpin = true;
yellowCarSpinTimer = 0;
yellowCarAng = _root.whiteCar._rotation;
determineAngle("whiteCar", "yellowCar", yellowCarAng);
} else if (_root.whiteCar.front.hitTest(_root.greenCar.bumper) && (greenCarSpin == false)) {
greenCarSpin = true;
greenCarSpinTimer = 0;
greenCarAng = _root.whiteCar._rotation;
determineAngle("whiteCar", "greenCar", greenCarAng);
}
if (_root.blueCar.front.hitTest(_root.whiteCar.bumper) && (whiteCarSpin == false)) {
whiteCarSpin = true;
whiteCarSpinTimer = 0;
whiteCarAng = _root.blueCar._rotation;
determineAngle("blueCar", "whiteCar", whiteCarAng);
} else if (_root.blueCar.front.hitTest(_root.greenCar.bumper) && (greenCarSpin == false)) {
greenCarSpin = true;
greenCarSpinTimer = 0;
greenCarAng = _root.blueCar._rotation;
determineAngle("blueCar", "greenCar", greenCarAng);
} else if (_root.blueCar.front.hitTest(_root.yellowCar.bumper) && (yellowCarSpin == false)) {
yellowCarSpin = true;
yellowCarSpinTimer = 0;
yellowCarAng = _root.blueCar._rotation;
determineAngle("blueCar", "yellowCar", yellowCarAng);
}
if (_root.yellowCar.front.hitTest(_root.whiteCar.bumper) && (whiteCarSpin == false)) {
whiteCarSpin = true;
whiteCarSpinTimer = 0;
whiteCarAng = _root.yellowCar._rotation;
determineAngle("yellowCar", "whiteCar", whiteCarAng);
} else if (_root.yellowCar.front.hitTest(_root.greenCar.bumper) && (greenCarSpin == false)) {
greenCarSpin = true;
greenCarSpinTimer = 0;
greenCarAng = _root.yellowCar._rotation;
determineAngle("yellowCar", "greenCar", greenCarAng);
} else if (_root.yellowCar.front.hitTest(_root.blueCar.bumper) && (blueCarSpin == false)) {
blueCarSpin = true;
blueCarSpinTimer = 0;
blueCarAng = _root.yellowCar._rotation;
determineAngle("yellowCar", "blueCar", blueCarAng);
}
if (_root.greenCar.front.hitTest(_root.whiteCar.bumper) && (whiteCarSpin == false)) {
whiteCarSpin = true;
whiteCarSpinTimer = 0;
whiteCarAng = _root.greenCar._rotation;
determineAngle("greenCar", "whiteCar", whiteCarAng);
} else if (_root.greenCar.front.hitTest(_root.yellowCar.bumper) && (yellowCarSpin == false)) {
yellowCarSpin = true;
yellowCarSpinTimer = 0;
yellowCarAng = _root.greenCar._rotation;
determineAngle("greenCar", "yellowCar", yellowCarAng);
} else if (_root.greenCar.front.hitTest(_root.blueCar.bumper) && (blueCarSpin == false)) {
blueCarSpin = true;
blueCarSpinTimer = 0;
blueCarAng = _root.greenCar._rotation;
determineAngle("greenCar", "blueCar", blueCarAng);
}
if (_root[hero].outline.hitTest(_root.box)) {
var _local6 = random(7);
weapon = "weapon" + _local6;
_root.statusBar.weaponWindow.gotoAndStop(_local6 + 2);
var _local4 = random(11) * 2;
var _local5 = "boxTrack" + track;
_root.box._x = _root[_local5][_local4];
_root.box._y = _root[_local5][_local4 + 1];
}
var _local2 = 1;
while (_local2 <= 10) {
var _local3 = "grass" + _local2;
if (_root[hero].bumper.hitTest(_root.raceTracks[_local3])) {
heroSpeed = heroSpeed - 0.5;
if (heroSpeed <= 3) {
heroSpeed = 3;
}
mph = Math.round(heroSpeed * 10);
}
_local3 = "stop" + _local2;
if (_root[hero].front.hitTest(_root.raceTracks[_local3])) {
heroSpeed = -4;
mph = Math.round(heroSpeed * 10);
}
_local2++;
}
if (_root[hero].outline.hitTest(_root.raceTracks.lapLine)) {
lapTest = true;
}
if ((lapTest == true) && (_root[hero].outline.hitTest(_root.raceTracks.finishLine))) {
heroLaps++;
lapTest = false;
_root.statusBar.laps.lapText.text = (heroLaps + "/") + trackLaps;
}
if (_root[enemyArray[0]].outline.hitTest(_root.raceTracks.lapLine)) {
e1lapTest = true;
}
if ((e1lapTest == true) && (_root[enemyArray[0]].outline.hitTest(_root.raceTracks.finishLine))) {
enemy1Lap++;
e1lapTest = false;
}
if (_root[enemyArray[1]].outline.hitTest(_root.raceTracks.lapLine)) {
e2lapTest = true;
}
if ((e2lapTest == true) && (_root[enemyArray[1]].outline.hitTest(_root.raceTracks.finishLine))) {
enemy2Lap++;
e2lapTest = false;
}
if (_root[enemyArray[2]].outline.hitTest(_root.raceTracks.lapLine)) {
e3lapTest = true;
}
if ((e3lapTest == true) && (_root[enemyArray[2]].outline.hitTest(_root.raceTracks.finishLine))) {
enemy3Lap++;
e3lapTest = false;
}
if ((enemy1Lap == 8) && (e1Finished == false)) {
e1Finished = true;
if (place1 == "null") {
place1 = enemyArray[0];
pointUpdate1 = 6;
} else if (place2 == "null") {
place2 = enemyArray[0];
pointUpdate1 = 4;
} else if (place3 == "null") {
place3 = enemyArray[0];
pointUpdate1 = 2;
pointUpdateHero = 0;
endOfRace();
}
_root.statusBar.pos1.gotoAndStop(place1);
_root.statusBar.pos2.gotoAndStop(place2);
_root.statusBar.pos3.gotoAndStop(place3);
_root.statusBar.pos4.gotoAndStop(place4);
} else if ((enemy2Lap == 8) && (e2Finished == false)) {
e2Finished = true;
if (place1 == "null") {
place1 = enemyArray[1];
pointUpdate2 = 6;
} else if (place2 == "null") {
place2 = enemyArray[1];
pointUpdate2 = 4;
} else if (place3 == "null") {
place3 = enemyArray[1];
pointUpdate2 = 2;
pointUpdateHero = 0;
endOfRace();
}
_root.statusBar.pos1.gotoAndStop(place1);
_root.statusBar.pos2.gotoAndStop(place2);
_root.statusBar.pos3.gotoAndStop(place3);
_root.statusBar.pos4.gotoAndStop(place4);
} else if ((enemy3Lap == 8) && (e3Finished == false)) {
e3Finished = true;
if (place1 == "null") {
place1 = enemyArray[2];
pointUpdate3 = 6;
} else if (place2 == "null") {
place2 = enemyArray[2];
pointUpdate3 = 4;
} else if (place3 == "null") {
place3 = enemyArray[2];
pointUpdate3 = 2;
pointUpdateHero = 0;
endOfRace();
}
_root.statusBar.pos1.gotoAndStop(place1);
_root.statusBar.pos2.gotoAndStop(place2);
_root.statusBar.pos3.gotoAndStop(place3);
_root.statusBar.pos4.gotoAndStop(place4);
} else if ((heroLaps == 8) && (heroFinished == false)) {
heroFinished = true;
if (place1 == "null") {
place1 = hero;
pointUpdateHero = 6;
fillRandom(3);
} else if (place2 == "null") {
place2 = hero;
pointUpdateHero = 4;
fillRandom(2);
} else if (place3 == "null") {
place3 = hero;
pointUpdateHero = 2;
fillRandom(1);
}
endOfRace();
_root.statusBar.pos1.gotoAndStop(place1);
_root.statusBar.pos2.gotoAndStop(place2);
_root.statusBar.pos3.gotoAndStop(place3);
_root.statusBar.pos4.gotoAndStop(place4);
}
}
function fillRandom(num) {
if (num == 3) {
var _local1 = random(3);
if (_local1 == 0) {
place2 = enemyArray[0];
pointUpdate1 = 4;
place3 = enemyArray[1];
pointUpdate2 = 2;
place4 = enemyArray[2];
pointUpdate3 = 0;
} else if (_local1 == 1) {
place2 = enemyArray[2];
pointUpdate3 = 4;
place3 = enemyArray[0];
pointUpdate1 = 2;
place4 = enemyArray[1];
pointUpdate2 = 0;
} else {
place2 = enemyArray[1];
pointUpdate2 = 4;
place3 = enemyArray[2];
pointUpdate3 = 2;
place4 = enemyArray[0];
pointUpdate1 = 0;
}
} else if (num == 2) {
var _local1 = random(2);
if (_local1 == 0) {
if (e1Finished) {
place3 = enemyArray[1];
pointUpdate2 = 2;
place4 = enemyArray[2];
pointUpdate3 = 0;
} else if (e2Finished) {
place3 = enemyArray[0];
pointUpdate1 = 2;
place4 = enemyArray[2];
pointUpdate3 = 0;
} else {
place3 = enemyArray[0];
pointUpdate1 = 2;
place4 = enemyArray[1];
pointUpdate2 = 0;
}
} else if (e1Finished) {
place3 = enemyArray[2];
pointUpdate3 = 2;
place4 = enemyArray[1];
pointUpdate2 = 0;
} else if (e2Finished) {
place3 = enemyArray[2];
pointUpdate3 = 2;
place4 = enemyArray[0];
pointUpdate1 = 0;
} else {
place3 = enemyArray[1];
pointUpdate2 = 2;
place4 = enemyArray[0];
pointUpdate1 = 0;
}
} else if (e1Finished && (e2Finished)) {
place4 = enemyArray[2];
pointUpdate3 = 0;
} else if (e1Finished && (e3Finished)) {
place4 = enemyArray[1];
pointUpdate2 = 0;
} else if (e2Finished && (e3Finished)) {
place4 = enemyArray[0];
pointUpdate1 = 0;
}
}
function endOfRace() {
stopAllSounds();
e0points = e0points + pointUpdate1;
e1points = e1points + pointUpdate2;
e2points = e2points + pointUpdate3;
heroPoints = heroPoints + pointUpdateHero;
raceOver = true;
track++;
_root.raceTracks.scoreBoard._visible = true;
_root.whiteCar._visible = false;
_root.blueCar._visible = false;
_root.yellowCar._visible = false;
_root.greenCar._visible = false;
_root.box._visible = false;
enemy1Lap = 0;
enemy2Lap = 0;
enemy3Lap = 0;
heroLaps = 0;
blueCarSpin = false;
greenCarSpin = false;
whiteCarSpin = false;
yellowCarSpin = false;
e0weapon = "null";
e1weapon = "null";
e2weapon = "null";
enemyWeaponNum = 0;
e1Finished = false;
e2Finished = false;
e3Finished = false;
heroFinished = false;
ePos0 = 0;
ePos1 = 0;
ePos2 = 0;
enemy0x = false;
enemy0y = false;
enemy1x = false;
enemy1y = false;
enemy2x = false;
enemy2y = false;
e1lapTest = false;
e2lapTest = false;
e3lapTest = false;
lapTest = false;
mph = 0;
heroSpeed = 0;
_root.statusBar.laps.lapText.text = "0/" + trackLaps;
_root.statusBar.weaponWindow.gotoAndStop(1);
var _local2 = random(11) * 2;
var _local3 = "boxTrack" + track;
_root.box._x = _root[_local3][_local2];
_root.box._y = _root[_local3][_local2 + 1];
}
function moveHero() {
var _local4 = hero + "Spin";
var _local2 = hero + "SpinTimer";
if (_root[_local4] == false) {
if (Key.isDown(32) && (weapon != "null")) {
useWeapon();
}
if (Key.isDown(39)) {
_root[hero]._rotation = _root[hero]._rotation + rotationSpeed;
}
if (Key.isDown(37)) {
_root[hero]._rotation = _root[hero]._rotation - rotationSpeed;
}
if (Key.isDown(38)) {
heroSpeed = heroSpeed + (16 * (acceleration * 0.001));
if (heroSpeed > maxSpeed) {
heroSpeed = maxSpeed;
}
} else {
heroSpeed = heroSpeed - (acceleration * 0.08);
if (heroSpeed < minSpeed) {
heroSpeed = minSpeed;
}
}
} else {
heroSpeed = heroSpeed - (acceleration * 0.08);
if (heroSpeed < minSpeed) {
heroSpeed = minSpeed;
}
_root[_local2]++;
_root[hero]._rotation = _root[hero]._rotation + 20;
if (_root[_local2] >= 40) {
_root[_local4] = false;
}
}
if ((_root[hero]._rotation >= 0) && (_root[hero]._rotation <= 90)) {
var _local3 = (90 - _root[hero]._rotation) / 90;
var _local5 = 1 - _local3;
_root[hero]._x = _root[hero]._x + (heroSpeed * _local5);
_root[hero]._y = _root[hero]._y - (heroSpeed * _local3);
} else if (_root[hero]._rotation > 90) {
var _local3 = (_root[hero]._rotation - 90) / 90;
var _local5 = 1 - _local3;
_root[hero]._x = _root[hero]._x + (heroSpeed * _local5);
_root[hero]._y = _root[hero]._y + (heroSpeed * _local3);
} else if (_root[hero]._rotation < -90) {
var _local3 = (Math.abs(_root[hero]._rotation) - 90) / 90;
var _local5 = 1 - _local3;
_root[hero]._x = _root[hero]._x - (heroSpeed * _local5);
_root[hero]._y = _root[hero]._y + (heroSpeed * _local3);
} else {
var _local3 = (90 - Math.abs(_root[hero]._rotation)) / 90;
var _local5 = 1 - _local3;
_root[hero]._x = _root[hero]._x - (heroSpeed * _local5);
_root[hero]._y = _root[hero]._y - (heroSpeed * _local3);
}
mph = Math.round(heroSpeed * 10);
}
stopAllSounds();
ePos0 = 0;
ePos1 = 0;
ePos2 = 0;
enemy0x = false;
enemy0y = false;
enemy1x = false;
enemy1y = false;
enemy2x = false;
enemy2y = false;
_root.raceTracks.scoreBoard.pos1.gotoAndStop(hero);
_root.raceTracks.scoreBoard.pos2.gotoAndStop(enemyArray[0]);
_root.raceTracks.scoreBoard.pos3.gotoAndStop(enemyArray[1]);
_root.raceTracks.scoreBoard.pos4.gotoAndStop(enemyArray[2]);
minSpeed = 0;
heroSpeed = minSpeed;
weaponNum = 0;
weapon = "null";
track = 1;
_root.raceTracks.gotoAndStop(track);
mph = 0;
trackLaps = 8;
greenCarSpin = false;
yellowCarSpin = false;
blueCarSpin = false;
whiteCarSpin = false;
greenCarSpinTimer = 0;
yellowCarSpinTimer = 0;
blueCarSpinTimer = 0;
whiteCarSpinTimer = 0;
whiteCarAng = 0;
whiteCarX = 0;
whiteCarY = 0;
yellowCarAng = 0;
yellowCarX = 0;
yellowCarY = 0;
blueCarAng = 0;
blueCarX = 0;
blueCarY = 0;
greenCarAng = 0;
greenCarX = 0;
greenCarY = 0;
raceOver = true;
explodeNum = 10000;
greenCarSpinSpeed = 5;
yellowCarSpinSpeed = 5;
blueCarSpinSpeed = 5;
whiteCarSpinSpeed = 5;
e0weapon = "null";
e1weapon = "null";
e2weapon = "null";
enemyWeaponNum = 0;
e1Finished = false;
e2Finished = false;
e3Finished = false;
heroFinished = false;
e0points = 0;
e1points = 0;
e2points = 0;
heroPoints = 0;
enemy1Lap = 0;
enemy2Lap = 0;
enemy3Lap = 0;
savedMaxSpeed = maxSpeed;
pointUpdate1 = 0;
pointUpdate2 = 0;
pointUpdate3 = 0;
pointUpdateHero = 0;
_root.raceTracks.startTimer.gotoAndPlay("count");
_root.raceTracks.scoreBoard._visible = false;
boxTrack1 = [465, 200, 473, 145, 97, 120, 441, 178, 113, 146, 77, 140, 150, 178, 105, 166, 77, 390, 125, 380];
boxTrack2 = [470, 258, 360, 225, 250, 100, 344, 259, 262, 140, 50, 100, 257, 175, 105, 140, 50, 320, 502, 405];
boxTrack3 = [124, 175, 213, 145, 230, 135, 220, 175, 213, 180, 370, 135, 220, 220, 340, 180, 560, 305, 220, 450];
enemy0track1 = [465, 200, 441, 178, 150, 178, 140, 199, 140, 335, 160, 355, 435, 355, 465, 325, 465, 200];
enemy1track1 = [495, 167, 473, 145, 113, 146, 105, 166, 105, 360, 125, 380, 475, 380, 495, 360, 495, 167];
enemy2track1 = [526, 145, 503, 120, 97, 120, 77, 140, 77, 390, 97, 410, 505, 410, 525, 390];
enemy0track2 = [470, 258, 344, 259, 257, 175, 122, 175, 124, 294, 220, 390, 450, 390, 470, 370, 470, 258];
enemy1track2 = [502, 232, 360, 225, 262, 140, 87, 140, 87, 305, 208, 425, 482, 425, 502, 405, 502, 232];
enemy2track2 = [535, 190, 380, 190, 250, 85, 50, 85, 50, 320, 185, 455, 515, 455, 535, 435, 535, 190];
enemy0track3 = [124, 175, 220, 175, 220, 220, 385, 220, 385, 175, 490, 175, 490, 285, 385, 330, 385, 390, 220, 390, 220, 355, 124, 300];
enemy1track3 = [94, 145, 213, 145, 213, 180, 340, 180, 380, 140, 520, 140, 520, 300, 360, 420, 210, 420, 94, 330];
enemy2track3 = [64, 95, 190, 95, 230, 135, 370, 135, 560, 95, 560, 305, 350, 450, 220, 450, 54, 370];
var boxPos = (random(11) * 2);
_root.box._x = boxTrack1[boxPos];
_root.box._y = boxTrack1[boxPos + 1];
lapTest = false;
heroLaps = 0;
_root.statusBar.laps.lapText.text = (heroLaps + "/") + trackLaps;
setCars();
_root.onEnterFrame = function () {
if (raceOver == false) {
moveHero();
moveEnemy();
collisionDetection();
enemyWeapon();
}
};
Frame 58
stopAllSounds();
stop();
Frame 68
stopAllSounds();
stop();
Frame 89
stop();
Frame 95
stop();
Instance of Symbol 2 MovieClip in Symbol 4 MovieClip [weapon2] Frame 1
onClipEvent (enterFrame) {
var i = 0;
while (i <= 2) {
var tempEnemy = _root.enemyArray[i];
if (this.hitTest(_root[tempEnemy].bumper)) {
var tSpin = (tempEnemy + "Spin");
var tSpinTimer = (tempEnemy + "SpinTimer");
var tAng = (tempEnemy + "Ang");
_root[tSpin] = true;
_root[tSpinTimer] = 0;
_root[tAng] = _root[hero]._rotation;
_root.determineAngle(hero, tempEnemy, _root[hero]._rotation);
_root.explode();
this._parent.removeMovieClip();
}
i++;
}
if (this.hitTest(_root[_root.hero].bumper)) {
var tSpin = (_root.hero + "Spin");
var tSpinTimer = (_root.hero + "SpinTimer");
var tAng = (_root.hero + "Ang");
_root[tSpin] = true;
_root[tSpinTimer] = 0;
_root[tAng] = this._parent._rotation;
_root.determineAngle(hero, _root.hero, this._parent._rotation);
_root.explode();
this._parent.removeMovieClip();
}
}
Symbol 4 MovieClip [weapon2] Frame 10
stop();
Instance of Symbol 2 MovieClip in Symbol 4 MovieClip [weapon2] Frame 10
onClipEvent (enterFrame) {
if (_root.raceOver) {
this._parent.removeMovieClip();
}
var i = 0;
while (i <= 2) {
var tempEnemy = _root.enemyArray[i];
if (this.hitTest(_root[tempEnemy].bumper)) {
var tSpin = (tempEnemy + "Spin");
var tSpinTimer = (tempEnemy + "SpinTimer");
var tAng = (tempEnemy + "Ang");
_root[tSpin] = true;
_root[tSpinTimer] = 0;
_root[tAng] = _root[hero]._rotation;
_root.determineAngle(hero, tempEnemy, _root[hero]._rotation);
_root.playSound("nailHit");
_root.explode();
this._parent.removeMovieClip();
}
i++;
}
if (this.hitTest(_root[_root.hero].bumper)) {
var tSpin = (_root.hero + "Spin");
var tSpinTimer = (_root.hero + "SpinTimer");
var tAng = (_root.hero + "Ang");
_root[tSpin] = true;
_root[tSpinTimer] = 0;
_root[tAng] = this._parent._rotation;
_root.determineAngle(hero, _root.hero, this._parent._rotation);
_root.playSound("nailHit");
_root.explode();
this._parent.removeMovieClip();
}
}
Instance of Symbol 6 MovieClip in Symbol 10 MovieClip [weapon1] Frame 1
onClipEvent (enterFrame) {
var i = 0;
while (i <= 2) {
var tempEnemy = _root.enemyArray[i];
if (this.hitTest(_root[tempEnemy].bumper)) {
var tSpin = (tempEnemy + "Spin");
var tSpinTimer = (tempEnemy + "SpinTimer");
var tAng = (tempEnemy + "Ang");
_root[tSpin] = true;
_root[tSpinTimer] = 0;
_root[tAng] = _root[hero]._rotation;
_root.determineAngle(hero, tempEnemy, _root[hero]._rotation);
var newExplosion = ("explode" + _root.explodeNum);
_root.attachMovie("explodeAnimation", newExplosion, _root.explodeNum++);
_root[newExplosion]._x = _root[tempEnemy]._x;
_root[newExplosion]._y = _root[tempEnemy]._y;
_root[newExplosion].gotoAndPlay(2);
_root.explode();
this._parent.removeMovieClip();
}
i++;
}
if (this.hitTest(_root[_root.hero].bumper)) {
var tSpin = (_root.hero + "Spin");
var tSpinTimer = (_root.hero + "SpinTimer");
var tAng = (_root.hero + "Ang");
_root[tSpin] = true;
_root[tSpinTimer] = 0;
_root[tAng] = this._parent._rotation;
_root.determineAngle(hero, _root.hero, this._parent._rotation);
var newExplosion = ("explode" + _root.explodeNum);
_root.attachMovie("explodeAnimation", newExplosion, _root.explodeNum++);
_root[newExplosion]._x = _root[_root.hero]._x;
_root[newExplosion]._y = _root[_root.hero]._y;
_root[newExplosion].gotoAndPlay(2);
_root.explode();
this._parent.removeMovieClip();
}
}
Symbol 10 MovieClip [weapon1] Frame 30
this._parent.removeMovieClip();
this.removeMovieClip();
Instance of Symbol 6 MovieClip in Symbol 10 MovieClip [weapon1] Frame 30
onClipEvent (enterFrame) {
if (this._parent.user == "hero") {
var i = 0;
while (i <= 2) {
trace("here");
var tempEnemy = _root[enemyArray[i]];
trace(tempEnemy);
if (this.hitTest(_root[tempEnemy])) {
trace("hit " + _root[tempEnemy]);
this._parent.removeMovieClip();
}
i++;
}
}
}
Instance of Symbol 12 MovieClip in Symbol 14 MovieClip [weapon3] Frame 1
onClipEvent (enterFrame) {
var i = 0;
while (i <= 2) {
var tempEnemy = _root.enemyArray[i];
if (this.hitTest(_root[tempEnemy].bumper)) {
var tSpin = (tempEnemy + "Spin");
var tSpinTimer = (tempEnemy + "SpinTimer");
var tAng = (tempEnemy + "Ang");
_root[tSpin] = true;
_root[tSpinTimer] = 0;
_root[tAng] = _root[hero]._rotation;
_root.determineAngle(hero, tempEnemy, _root[hero]._rotation);
var newExplosion = ("explode" + _root.explodeNum);
_root.attachMovie("explodeAnimation", newExplosion, _root.explodeNum++);
_root[newExplosion]._x = _root[tempEnemy]._x;
_root[newExplosion]._y = _root[tempEnemy]._y;
_root[newExplosion].gotoAndPlay(2);
_root.explode();
this._parent.removeMovieClip();
}
i++;
}
if (this.hitTest(_root[_root.hero].bumper)) {
var tSpin = (_root.hero + "Spin");
var tSpinTimer = (_root.hero + "SpinTimer");
var tAng = (_root.hero + "Ang");
_root[tSpin] = true;
_root[tSpinTimer] = 0;
_root[tAng] = this._parent._rotation;
_root.determineAngle(hero, _root.hero, this._parent._rotation);
var newExplosion = ("explode" + _root.explodeNum);
_root.attachMovie("explodeAnimation", newExplosion, _root.explodeNum++);
_root[newExplosion]._x = _root[_root.hero]._x;
_root[newExplosion]._y = _root[_root.hero]._y;
_root[newExplosion].gotoAndPlay(2);
_root.explode();
this._parent.removeMovieClip();
}
}
Symbol 14 MovieClip [weapon3] Frame 14
this.removeMovieClip();
Instance of Symbol 16 MovieClip in Symbol 18 MovieClip [weapon5] Frame 1
onClipEvent (enterFrame) {
var i = 0;
while (i <= 2) {
var tempEnemy = _root.enemyArray[i];
if (this.hitTest(_root[tempEnemy].bumper)) {
var tSpin = (tempEnemy + "Spin");
var tSpinTimer = (tempEnemy + "SpinTimer");
var tAng = (tempEnemy + "Ang");
_root[tSpin] = true;
_root[tSpinTimer] = 0;
_root[tAng] = _root[hero]._rotation;
_root.determineAngle(hero, tempEnemy, _root[hero]._rotation);
var newExplosion = ("explode" + _root.explodeNum);
_root.attachMovie("explodeAnimation", newExplosion, _root.explodeNum++);
_root[newExplosion]._x = _root[tempEnemy]._x;
_root[newExplosion]._y = _root[tempEnemy]._y;
_root[newExplosion].gotoAndPlay(2);
this._parent.removeMovieClip();
}
i++;
}
if (this.hitTest(_root[_root.hero].bumper)) {
var tSpin = (_root.hero + "Spin");
var tSpinTimer = (_root.hero + "SpinTimer");
var tAng = (_root.hero + "Ang");
_root[tSpin] = true;
_root[tSpinTimer] = 0;
_root[tAng] = this._parent._rotation;
_root.determineAngle(hero, _root.hero, this._parent._rotation);
var newExplosion = ("explode" + _root.explodeNum);
_root.attachMovie("explodeAnimation", newExplosion, _root.explodeNum++);
_root[newExplosion]._x = _root[_root.hero]._x;
_root[newExplosion]._y = _root[_root.hero]._y;
_root[newExplosion].gotoAndPlay(2);
_root.explode();
this._parent.removeMovieClip();
}
}
Symbol 18 MovieClip [weapon5] Frame 25
this.removeMovieClip();
Instance of Symbol 16 MovieClip in Symbol 18 MovieClip [weapon5] Frame 25
onClipEvent (enterFrame) {
if (this.hitTest(_root.blueCar)) {
trace("hit");
this._parent.removeMovieClip();
}
}
Instance of Symbol 21 MovieClip [bullet] in Symbol 22 MovieClip [weapon0] Frame 2
onClipEvent (enterFrame) {
var i = 0;
while (i <= 2) {
var tempEnemy = _root.enemyArray[i];
if (this.hitTest(_root[tempEnemy].bumper)) {
var tSpin = (tempEnemy + "Spin");
var tSpinTimer = (tempEnemy + "SpinTimer");
var tAng = (tempEnemy + "Ang");
_root[tSpin] = true;
_root[tSpinTimer] = 0;
_root[tAng] = _root[hero]._rotation;
_root.determineAngle(hero, tempEnemy, _root[hero]._rotation);
_root.explode();
var newExplosion = ("explode" + _root.explodeNum);
_root.attachMovie("explodeAnimation", newExplosion, _root.explodeNum++);
_root[newExplosion]._x = _root[tempEnemy]._x;
_root[newExplosion]._y = _root[tempEnemy]._y;
_root[newExplosion].gotoAndPlay(2);
this._parent.removeMovieClip();
}
i++;
}
if (this.hitTest(_root[_root.hero].bumper)) {
var tSpin = (_root.hero + "Spin");
var tSpinTimer = (_root.hero + "SpinTimer");
var tAng = (_root.hero + "Ang");
_root[tSpin] = true;
_root[tSpinTimer] = 0;
_root[tAng] = this._parent._rotation;
_root.determineAngle(hero, _root.hero, this._parent._rotation);
var newExplosion = ("explode" + _root.explodeNum);
_root.attachMovie("explodeAnimation", newExplosion, _root.explodeNum++);
_root[newExplosion]._x = _root[_root.hero]._x;
_root[newExplosion]._y = _root[_root.hero]._y;
_root[newExplosion].gotoAndPlay(2);
_root.explode();
this._parent.removeMovieClip();
}
}
Symbol 22 MovieClip [weapon0] Frame 25
this.removeMovieClip();
Symbol 26 MovieClip [weapon4] Frame 5
stop();
Instance of Symbol 24 MovieClip in Symbol 26 MovieClip [weapon4] Frame 5
onClipEvent (enterFrame) {
if (_root.raceOver) {
this._parent.removeMovieClip();
}
var i = 0;
while (i <= 2) {
var tempEnemy = _root.enemyArray[i];
if (this.hitTest(_root[tempEnemy].bumper)) {
var tSpin = (tempEnemy + "Spin");
var tSpinTimer = (tempEnemy + "SpinTimer");
var tAng = (tempEnemy + "Ang");
_root[tSpin] = true;
_root[tSpinTimer] = 0;
_root[tAng] = _root[hero]._rotation;
_root.determineAngle(hero, tempEnemy, _root[hero]._rotation);
_root.playSound("tarHit");
_root.explode();
this._parent.removeMovieClip();
}
i++;
}
if (this.hitTest(_root[_root.hero].bumper)) {
var tSpin = (_root.hero + "Spin");
var tSpinTimer = (_root.hero + "SpinTimer");
var tAng = (_root.hero + "Ang");
_root[tSpin] = true;
_root[tSpinTimer] = 0;
_root[tAng] = this._parent._rotation;
_root.determineAngle(hero, _root.hero, this._parent._rotation);
_root.explode();
_root.playSound("tarHit");
this._parent.removeMovieClip();
}
}
Symbol 30 MovieClip [weapon6] Frame 1
_root.heroSpeed = _root.heroSpeed + 5;
_root.maxSpeed = _root.maxSpeed + 5;
_root.minSpeed = _root.minSpeed + 5;
Instance of Symbol 28 MovieClip in Symbol 30 MovieClip [weapon6] Frame 1
onClipEvent (enterFrame) {
this._parent._x = _root[_root.hero]._x;
this._parent._y = _root[_root.hero]._y;
this._parent._rotation = _root[_root.hero]._rotation;
}
Symbol 30 MovieClip [weapon6] Frame 40
_root.maxSpeed = _root.maxSpeed - 5;
_root.minSpeed = _root.minSpeed - 5;
_root.heroSpeed = _root.savedMaxSpeed;
_root.maxSpeed = _root.savedMaxSpeed;
this.removeMovieClip();
Symbol 40 MovieClip [explodeAnimation] Frame 5
this.removeMovieClip();
stop();
Symbol 64 MovieClip Frame 39
stop();
Symbol 84 MovieClip Frame 39
stop();
Symbol 110 MovieClip Frame 35
this.gotoAndPlay(1);
Symbol 113 MovieClip Frame 1
stopAllSounds();
Symbol 113 MovieClip Frame 191
stopAllSounds();
Symbol 113 MovieClip Frame 192
this.gotoAndStop(1);
_root.gotoAndStop("splash");
Symbol 137 Button
on (release) {
_root.gotoAndStop("carSelect");
}
Symbol 142 Button
on (release) {
_root.gotoAndStop("credits");
}
Symbol 157 Button
on (release) {
getURL ("http://www.axis-games.com");
}
Symbol 176 Button
on (release) {
stopAllSounds();
_root.difficulty = "easy";
_root.gotoAndStop("game");
}
Symbol 180 Button
on (release) {
stopAllSounds();
_root.difficulty = "medium";
_root.gotoAndStop("game");
}
Symbol 185 Button
on (release) {
stopAllSounds();
_root.difficulty = "hard";
_root.gotoAndStop("game");
}
Symbol 195 Button
on (release) {
_root.hero = "greenCar";
_root.enemyArray = ["blueCar", "yellowCar", "whiteCar"];
_root.maxSpeed = 9.5;
_root.rotationSpeed = 10;
_root.acceleration = 15;
_root.gotoAndStop("difficulty");
}
Symbol 200 Button
on (release) {
_root.hero = "blueCar";
_root.enemyArray = ["greenCar", "yellowCar", "whiteCar"];
_root.maxSpeed = 10;
_root.rotationSpeed = 12;
_root.acceleration = 11;
_root.gotoAndStop("difficulty");
}
Symbol 211 Button
on (release) {
_root.hero = "yellowCar";
_root.enemyArray = ["greenCar", "blueCar", "whiteCar"];
_root.maxSpeed = 10.5;
_root.rotationSpeed = 16;
_root.acceleration = 10;
_root.gotoAndStop("difficulty");
}
Symbol 220 Button
on (release) {
_root.hero = "whiteCar";
_root.enemyArray = ["greenCar", "blueCar", "yellowCar"];
_root.maxSpeed = 9;
_root.rotationSpeed = 14;
_root.acceleration = 10;
_root.gotoAndStop("difficulty");
}
Symbol 256 MovieClip Frame 1
stop();
Symbol 261 Button
on (release) {
if (_root.track == 4) {
if (((_root.heroPoints >= _root.e0points) && (_root.heroPoints >= _root.e1points)) && (_root.heroPoints >= _root.e2points)) {
_root.gotoAndStop("win");
} else {
var rand = random(2);
if (rand == 0) {
_root.gotoAndStop("gameOver1");
} else {
_root.gotoAndStop("gameOver2");
}
}
}
_root.setCars();
_root.raceTracks.gotoAndStop(_root.track);
_root.raceTracks.startTimer.gotoAndPlay(1);
_root.pointUpdate1 = 0;
_root.pointUpdate2 = 0;
_root.pointUpdate3 = 0;
_root.pointUpdateHero = 0;
_root.raceTracks.scoreBoard._visible = false;
}
Symbol 274 MovieClip Frame 96
_root.playSound("track" + _root.track);
Symbol 274 MovieClip Frame 97
_root.raceOver = false;
stop();
Symbol 284 MovieClip Frame 1
stop();
Symbol 316 MovieClip Frame 1
stop();
Symbol 316 MovieClip Frame 2
this.gotoAndStop(1);
Symbol 316 MovieClip Frame 8
this.gotoAndStop(1);
Symbol 316 MovieClip Frame 17
this.gotoAndStop(1);
Symbol 316 MovieClip Frame 25
this.gotoAndStop(1);
Symbol 316 MovieClip Frame 33
this.gotoAndStop(1);
Symbol 316 MovieClip Frame 41
this.gotoAndStop(1);
Symbol 333 MovieClip Frame 1
stop();
Symbol 347 Button
on (release) {
stopAllSounds();
_root.gotoAndStop("splash");
}
Symbol 389 MovieClip Frame 85
stopAllSounds();
_root.gotoAndStop("gameover3");
Symbol 392 MovieClip Frame 25
stop();
Symbol 399 MovieClip Frame 129
_root.gotoAndStop("gameover3");
Symbol 405 Button
on (release) {
stopAllSounds();
_root.gotoAndStop("splash");
}
Symbol 408 MovieClip Frame 31
_root.gotoAndStop("win2");