Frame 1
function preloadSite() {
var _local3 = _root.getBytesLoaded();
var _local2 = _root.getBytesTotal();
var _local1 = Math.round((_local3 / _local2) * 100);
loadingBar._xscale = _local1;
loader_bar.gotoAndStop(_local1);
bytesDisplay.text = _local1 + "%";
if (_local3 >= _local2) {
clearInterval(loadingCall);
_root.start_btn._visible = true;
}
}
function moregames() {
trace("more link 23");
getURL ("http://www.racinggames9.com/", "_blank");
}
function highScore() {
getURL ("http://www.racinggames9.com/score/RashRace/index.php", "_blank");
}
function deadClick() {
getURL ("http://www.racinggames9.com", "_blank");
}
function gotoMySite() {
getURL ("http://www.racinggames9.com", "_blank");
}
stopAllSounds();
stop();
var loadingCall = setInterval(preloadSite, 50);
var myMenu = new ContextMenu();
myMenu.hideBuiltInItems();
var mySiteLink = new ContextMenuItem("More Games", moreGames);
var copyrightNotice = new ContextMenuItem("@ www.racinggames9.com", deadClick);
myMenu.customItems.push(mySiteLink);
myMenu.customItems.push(copyrightNotice);
var a = true;
_root.menu = myMenu;
fscommand ("alloscale", false);
var menu_sound = new Sound();
menu_sound.attachSound("menubg");
var play_sound = new Sound();
play_sound.attachSound("playbg");
var btn_sound = new Sound();
btn_sound.attachSound("btn");
var a_sound = false;
_global.allsound = new Sound(_root);
playerDetails = SharedObject.getLocal("user");
if (playerDetails.data.lev == undefined) {
playerDetails.data.lev = level;
} else {
level = playerDetails.data.lev;
}
Instance of Symbol 228 MovieClip in Frame 1
on (release) {
getURL ("http://www.racinggames9.com", "_blank");
}
Frame 2
gotoAndPlay (1);
Frame 3
_root.temp = 2;
Frame 5
moto = true;
Frame 6
reset = function () {
var _local1 = _root;
_local1.terrains = ["plain"];
_local1.statistics = new Array();
_local1.totalScore = 0;
_local1.races = 0;
for (var i in _local1.terrains) {
_local1.statistics[_local1.terrains[i]] = {score:-1, checkpoints:[], winner:0};
}
Mouse.show();
};
Frame 7
stop();
scoreh = 0;
score = "00000";
stopAllSounds();
_root.menu_sound.start(0, 999);
Instance of Symbol 267 MovieClip in Frame 7
on (release) {
if (a) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
Frame 9
stop();
stopAllSounds();
_root.play_sound.start(0, 999);
Instance of Symbol 228 MovieClip in Frame 9
on (release) {
getURL ("http://www.racinggames9.com", "_blank");
}
Frame 10
prevFrame();
Frame 11
stop();
stopAllSounds();
_root.play_sound.start(0, 999);
Frame 12
prevFrame();
Frame 13
function submitScore() {
var name_s = name_txt.text;
var _local3 = totalscore;
var _local1 = "";
if (_local3 == "") {
_local1 = _local1 + "The score is required\n";
}
if (_local1 != "") {
status_txt.text = _local1;
} else {
var _local2 = new LoadVars();
_local2.name = name_s;
_local2.score = _local3;
_local2.send(path, "_blank", "POST");
gotoAndStop ("menu");
}
}
stop();
stopAllSounds();
completedon_sound.start(0, 999);
_root.help.removeMovieClip();
var path = "http://www.racinggames9.com/score/RashRace/submit.php";
totalscore = score;
stopAllSounds();
_root.menu_sound.start(0, 999);
Frame 14
function submitScore1() {
var name_s = name_txt.text;
var _local3 = totalscore;
var _local1 = "";
if (_local3 == "") {
_local1 = _local1 + "The score is required\n";
}
if (_local1 != "") {
status_txt.text = _local1;
} else {
var _local2 = new LoadVars();
_local2.name = name_s;
_local2.score = _local3;
_local2.send(path, "_blank", "POST");
gotoAndStop ("menu");
}
}
stop();
stopAllSounds();
completedon_sound.start(0, 999);
_root.help.removeMovieClip();
var path = "http://www.racinggames9.com/score/RashRace/submit.php";
totalscore = score;
stopAllSounds();
_root.menu_sound.start(0, 999);
Frame 15
trace("next level");
stopAllSounds();
levelscore = score;
Frame 16
stopAllSounds();
_root.menu_sound.start(0, 999);
Symbol 85 MovieClip Frame 101
my_mc.gotoAndStop(1 + random(my_mc._totalframes));
my1_mc.gotoAndStop(1 + random(my1_mc._totalframes));
Symbol 112 MovieClip Frame 101
my_mc.gotoAndStop(1 + random(my_mc._totalframes));
my1_mc.gotoAndStop(1 + random(my1_mc._totalframes));
Symbol 153 MovieClip Frame 101
my_mc.gotoAndStop(1 + random(my_mc._totalframes));
my1_mc.gotoAndStop(1 + random(my1_mc._totalframes));
Symbol 171 MovieClip Frame 1
stop();
Symbol 171 MovieClip Frame 4
gotoAndPlay (2);
Symbol 181 MovieClip Frame 1
stop();
Symbol 228 MovieClip Frame 1
_root.start_btn._visible = false;
Symbol 228 MovieClip Frame 125
stop();
Symbol 232 Button
on (release) {
_root.gotoAndStop("menu");
}
Symbol 234 Button
on (release) {
_root.moregames();
}
Symbol 240 MovieClip Frame 1
stop();
Symbol 240 MovieClip Frame 100
stop();
Symbol 257 Button
on (release) {
_root.level = "plain";
_root.gotoAndStop("help");
}
on (rollOver) {
_root.btn_sound.start(0, 1);
}
Symbol 258 Button
on (release) {
_root.level = "plain";
_root.gotoAndStop("help");
}
on (rollOver) {
_root.btn_sound.start(0, 1);
}
Symbol 259 Button
on (release) {
_root.highScore();
}
on (rollOver) {
_root.btn_sound.start(0, 1);
}
Symbol 260 Button
on (release) {
_root.moregames();
}
on (rollOver) {
_root.btn_sound.start(0, 1);
}
Symbol 261 Button
on (release) {
_root.gotoAndPlay("startrr");
}
on (rollOver) {
_root.btn_sound.start(0, 1);
}
Instance of Symbol 228 MovieClip in Symbol 262 MovieClip Frame 9
on (release) {
getURL ("http://www.racinggames9.com", "_blank");
}
Symbol 262 MovieClip Frame 59
stop();
Symbol 267 MovieClip Frame 1
_global.allsound.setVolume(100);
var a = true;
stop();
Symbol 267 MovieClip Frame 2
_global.allsound.setVolume(0);
a = false;
stop();
Symbol 271 MovieClip Frame 1
function lvlRead(i, pointer) {
var _local1 = this;
var _local2 = pointer;
i = i % _local1.teAmount;
if (_local2 == undefined) {
_local1.lvlReadPointer++;
_local2 = _local1.lvlReadPointer;
}
_local2 = (_local2 + _local1.lvl.length) % _local1.lvl.length;
var _local3 = _local1.tes[i];
_local3.curve = _local1.lvl[_local2][0];
_local3.dekoL = _local1.lvl[_local2][1];
_local3.dekoR = _local1.lvl[_local2][2];
_local3.mc.swapDepths(_local1.teDepthCounter--);
_local3.mc.street.dekoL.gotoAndStop(_local1.lvl[_local2][1] + 1);
_local3.mc.street.dekoR.gotoAndStop(_local1.lvl[_local2][2] + 1);
}
function init() {
var _local1 = this;
_local1.phase = 0;
_local1.accelTimeStamp = 0;
bg.gotoAndStop(_local1.level);
if (!(_local1.level === "plain")) {
} else {
_local1.teAmount = 20;
_local1.teBotMaxX = 1.9;
_local1.trackWidth = 2.7;
_local1.streetWidth = 2.2;
_local1.greenFriction = 0.93;
}
_local1.teMcHeight = 100;
_local1.teHeight = 35;
_local1.teHeightScale = 0.8;
_local1.camX = 0;
_local1.scoreFlag = true;
_local1.pl.vx = 0;
_local1.pl.ax = 0.03;
_local1.pl.fx = 0.85;
_local1.pl.x = 0;
_local1.pl.y = -1;
_local1.pl.vz = 0;
_local1.pl.az = 0.005;
_local1.pl.fz = 0.98;
_local1.lvlReadPointer = -1;
_local1.teDepthCounter = 1000000 /* 0x0F4240 */;
_local1.spriteDepthCounter = 2000000 /* 0x1E8480 */;
_local1.pl.mc = _local1.attachMovie("bike", "bike", 3000000);
_local1.pl.mc._y = 500;
_local1.pl.mc.biker.sprite.tire.stop();
var _local3 = 0;
var _local2 = 0;
while (_local2 < _local1.teAmount) {
_local1.tes[_local2] = Array();
_local1.tes[_local2].mc = _local1.attachMovie("te", "track" + _local2, _local1.teDepthCounter--);
_local1.tes[_local2].mc.street.variant.gotoAndStop((_local1.level + "_") + _local3);
_local1.lvlRead(_local2);
_local1.tes[_local2].mc.grass.variant.gotoAndStop((_local1.level + "_") + _local3);
_local2++;
}
_local1.offTe = 0;
_local1.botcfg = {vzMax:0.15, az:0.005, ax:0.005, vzVariance:0.55};
_local2 = 0;
while (_local2 < 6) {
_local1.bots[_local2] = new Object();
_local1.bots[_local2].mc = _local1.attachMovie("bike", "bot" + _local2, _local1.spriteDepthCounter--);
_local1.bots[_local2].mc.biker.tire.gotoAndStop(1);
_local1.bots[_local2].col = new Color(_local1.bots[_local2].mc);
_local1.bots[_local2].vz = 0;
_local1.bots[_local2].az = _local1.botcfg.az;
_local1.bots[_local2].ax = _local1.botcfg.ax;
_local1.resetBot(_local1.bots[_local2]);
_local1.bots[_local2].x = _local1.botBases[_local2].x;
_local1.bots[_local2].z = _local1.botBases[_local2].z;
_local2++;
}
_local1.coltrans = {ra:100, rb:0, ga:100, gb:0, ba:100, bb:0, aa:100, ab:0};
}
function resetBot(bot) {
var _local1 = this;
var _local2 = bot;
_local2.x = ((_local1.teBotMaxX * Math.random()) * 2) - _local1.teBotMaxX;
_local2.mc.biker.gotoAndStop(Math.floor(Math.random() * 7) + 2);
_local2.vzMax = _local1.botcfg.vzMax + ((Math.random() * _local1.botcfg.vzMax) * _local1.botcfg.vzVariance);
}
function startBots() {
var _local1 = this;
for (var _local2 in _local1.bots) {
_local1.bots[_local2].mc.biker.tire.play();
}
}
function gameOver() {
var _local1 = _root;
_local1.actScore = int(_local1.osd.actScore);
_local1.gotoAndStop("raceover");
}
function botSort(a, b) {
if (a.z < b.z) {
return(-1);
}
if (a.z > b.z) {
return(1);
}
return(0);
}
function draw() {
var _local1 = this;
var curve;
var _local3;
var offCurve = 0;
var distance;
var ti;
var _local2;
_local2 = (getTimer() - _local1.timestamp) / 50;
_local1.timestamp = getTimer();
if (_local2 > 200) {
} else {
if (_local1.pl.vz > 0.1) {
_local1.pl.mc.biker.sprite.tire.play();
} else {
_local1.pl.mc.biker.sprite.tire.gotoAndStop(1);
}
if (Key.isDown(27) || (Key.isDown(8) && (_root.version eq ""))) {
_local1.gameOver();
}
if (Key.isDown(38)) {
if (_local1.phase == 1) {
_root.scoreh++;
if (_root.scoreh <= 9) {
_root.score = "0000" + _root.scoreh;
} else if (_root.scoreh <= 99) {
_root.score = "000" + _root.scoreh;
} else if (_root.scoreh <= 999) {
_root.score = "00" + _root.scoreh;
} else if (_root.scoreh <= 9999) {
_root.score = "0" + _root.scoreh;
} else {
_root.score = _root.scoreh;
}
_local1.pl.mc.biker.sprite.light.gotoAndStop("off");
if (_local1.accelTimeStamp > 0) {
var a = (getTimer() - _local1.accelTimeStamp);
if ((a > 0) || (a < -1000)) {
_local1.accelTimeStamp = 0;
} else {
_local1.pl.vz = _local1.pl.vz + (_local1.pl.az * _local2);
}
}
_local1.pl.vz = _local1.pl.vz + (_local1.pl.az * _local2);
_local1.distance = _local1.distance - (0.05 * _local2);
} else if ((_local1.phase == 0) && (_local1.keyAccelTokens > 0)) {
trace(" name score");
_local1.keyAccelTokens = 0;
_local1.accelTimeStamp = getTimer() + 1000;
}
} else {
_local1.pl.mc.biker.sprite.light.gotoAndStop("on");
_local1.keyAccelTokens = 1;
}
if (Key.isDown(40)) {
_local1.pl.vz = _local1.pl.vz * Math.pow(0.95, _local2);
}
if (_local1.phase >= 2) {
_local1.pl.vz = _local1.pl.vz * Math.pow(0.95, _local2);
} else {
_local1.pl.vz = _local1.pl.vz * Math.pow(_local1.pl.fz, _local2);
}
var volSqueal = 0;
if (Key.isDown(37) && (_local1.phase > 0)) {
volSqueal = Math.max(0, Math.abs(_local1.pl.vx) - 0.3);
_local1.pl.vx = _local1.pl.vx - (0.1 * _local2);
if (!Key.isDown(38)) {
_local1.pl.vx = _local1.pl.vx - (0.05 * _local2);
}
}
if (Key.isDown(39) && (_local1.phase > 0)) {
volSqueal = Math.max(0, Math.abs(_local1.pl.vx) - 0.3);
_local1.pl.vx = _local1.pl.vx + (0.1 * _local2);
if (!Key.isDown(38)) {
_local1.pl.vx = _local1.pl.vx + (0.05 * _local2);
}
}
if (volSqueal > 0) {
_root.snd.fadeChannel(_root.sndChannelSqueal, volSqueal * 0.53, 5);
} else {
_root.snd.fadeChannel(_root.sndChannelSqueal, volSqueal, 5);
}
if (_root.version == "") {
if (((!Key.isDown(16)) && (Key.isDown(34))) && (_local1.keyRightTokens > 0)) {
_local1.keyRightTokens = 0;
_local1.pl.vz = 0;
_local1.levedAlter(0, -1);
} else {
_local1.keyRightTokens = 1;
}
if (((!Key.isDown(16)) && (Key.isDown(46))) && (_local1.keyLeftTokens > 0)) {
_local1.keyLeftTokens = 0;
_local1.pl.vz = 0;
_local1.levedAlter(0, 1);
} else {
_local1.keyLeftTokens = 1;
}
if (Key.isDown(35) && (_local1.keyDownTokens > 0)) {
_local1.pl.vz = 0;
_local1.distance = int(_local1.distance) + 1.1;
_local1.keyDownTokens = 0;
} else {
_local1.keyDownTokens = 1;
}
if (Key.isDown(36) && (_local1.keyUpTokens > 0)) {
_local1.pl.vz = 0;
_local1.keyUpTokens = 0;
_local1.distance = int(_local1.distance) - 1;
} else {
_local1.keyUpTokens = 1;
}
}
_local1.pl.vx = _local1.pl.vx * Math.pow(_local1.pl.fx, _local2);
_local1.pl.mc.biker._rotation = (_local1.pl.mc.biker._rotation * 0.8) + (((_local1.pl.vx * Math.max(0.08, Math.abs(_local1.pl.vz))) * 330) * 0.2);
_local1.pl.mc.biker.sprite.gotoAndStop(Math.min(20, Math.max(1, int((_local1.pl.vx + 0.5) * 20))));
_local1._rotation = (_local1.pl.vx * Math.abs(_local1.pl.vz)) * 90;
_local1.distance = _local1.distance - (_local1.pl.vz * _local2);
_root.osd.actScore = _root.osd.actScore + ((_local1.pl.vz * _local2) * 5);
if (_local1.phase > 1) {
if ((_local1.phase == 2) || (_local1.phase == 3)) {
if (_local1.phase == 3) {
_local1.pl.vz = _local1.pl.vz * Math.pow(0.95, _local2);
}
if (_local1.pl.vz < 0.003) {
trace("over it");
_local1.phase = 4;
if (_root.aa_txt.text == 11111) {
_root.gotoAndStop("level");
} else {
_local1.gameOver();
}
} else if (_local1.pl.vz < 0.015) {
_local1.pl.vz * 0.5;
}
}
}
var control;
_local1.pl.x = Math.max(-1 * _local1.trackWidth, Math.min(_local1.trackWidth, _local1.pl.x));
control = 0.2;
if (_local1.level == "dirt") {
control = 0.15;
if (Math.abs(_local1.pl.x) > _local1.streetWidth) {
control = 0.12;
} else if (Math.abs(_local1.pl.x) > 1) {
control = 0.1;
_local1.pl.vz = _local1.pl.vz * Math.pow(0.997, _local2);
}
}
_local1.pl.x = _local1.pl.x + (((_local1.pl.vx * _local2) * control) * Math.max(0.7, Math.min(0.8, _local1.pl.vz * 10)));
_local1.pl.vz = Math.max(0, _local1.pl.vz - (Math.abs(_local1.pl.vx * 0.001) * _local2));
_local1.camX = _local1.pl.x * -100;
while (_local1.distance < 0) {
_local1.distance = _local1.distance + 1;
_local1.lvlRead(_local1.offTe);
_local1.offTe++;
_local1.scoreFlag = true;
}
while (_local1.distance > 1) {
_local1.lvlReadPointer--;
_local1.lvlRead(_local1.offTe, (_local1.lvlReadPointer - _local1.teAmount) + 1);
_local1.distance = _local1.distance - 1;
_local1.offTe--;
}
p = Math.pow(0.64, _local1.pl.y);
_local3 = _local1.pl.mc;
_local3._y = p * 100;
_local3._xscale = (_local3._yscale = p * 100);
_local3._x = ((_local1.pl.x * p) * 100) + _local1.camX;
var _loc3 = 0;
while (_loc3 < _local1.teAmount) {
te = _local1.tes[(_loc3 + _local1.offTe) % _local1.teAmount];
_local3 = te.mc;
distance = (_local1.distance - 2) + _loc3;
_local1.sfx(te, distance);
p = Math.pow(0.64, distance);
_local3._y = p * 100;
scale = p * 100;
_local3.street._xscale = scale;
_local3.street._yscale = scale;
_local3.grass._yscale = scale;
curve = te.curve;
if (_loc3 == 0) {
x = _local1.camX * p;
curve = curve * _local1.distance;
} else {
x = spliceX;
}
if (_loc3 == 0) {
var dx = (((_local1.pl.vz * te.curve) * 0.09) * _local2);
_local1.pl.x = _local1.pl.x + dx;
_local1.bg.shil._x = ((_local1.bg.shil._x + (dx * 60)) + 700) % 700;
}
if (_loc3 == 1) {
if (Math.abs(_local1.pl.x) > (_local1.streetWidth + 0.1)) {
_local1.pl.vz = _local1.pl.vz * Math.pow(_local1.greenFriction, _local2);
if ((_local1.pl.x > 0) && (te.dekoR > 0)) {
_root.snd.playEvent("sndHitDeko", Math.abs(_local1.pl.vz) * 12);
_local1.pl.vz = _local1.pl.vz * Math.pow(0.7, _local2);
_local1.pl.vx = _local1.pl.vx - (0.5 * _local2);
} else if ((_local1.pl.x < 0) && (te.dekoL > 0)) {
_root.snd.playEvent("sndHitDeko", Math.abs(_local1.pl.vz) * 12);
_local1.pl.vz = _local1.pl.vz * Math.pow(0.7, _local2);
_local1.pl.vx = _local1.pl.vx + (0.5 * _local2);
}
}
if ((te.dekoL == 11) || (te.dekoL == 12)) {
if (_local1.scoreFlag == true) {
_root.statistics[_root.level].checkpoints.push({score:0, time:0});
_root.osd.score(false, te.dekoL == 12);
_local1.scoreFlag = false;
_local1.phase = 1;
}
if ((te.dekoL == 12) && (_root.version != "")) {
_root.statistics[_root.level].winner = true;
_local1.phase = 3;
}
}
}
_local3.street._x = x;
_local1.bufferOffX[_loc3] = x;
_local1.bufferCurve[_loc3] = te.curve;
offCurve = offCurve + curve;
curve = (_local1.camX * 0.094) + offCurve;
spliceX = x - ((curve * 3.8) * p);
curve = Math.min(Math.max(71 - int(curve), 1), 141);
_local3.street.gotoAndStop(curve);
_loc3++;
}
_local1.bufferOffX[_loc3] = _local1.bufferOffX[_loc3 - 1];
var d;
var rot;
var strategy;
_local1.bots.sort(_local1.botSort);
var sndVolume = 0.5;
var _loc3 = 0;
while (_loc3 < _local1.bots.length) {
_loc3 = int(_loc3);
bot = _local1.bots[_loc3];
if (bot.z < 0) {
sndVolume = sndVolume + (Math.max(0, bot.z + 5) * 0.06);
} else {
sndVolume = sndVolume + (Math.max(0, 3 - bot.z) * 0.06);
}
if ((_local1.phase == 1) || (_local1.phase == 2)) {
bot.vz = Math.min(bot.vz + (bot.az * _local2), bot.vzMax);
} else {
bot.vz = bot.vz * Math.pow(0.96, _local2);
bot.vx = bot.vx * 0.5;
}
if ((_local1.phase == 0) || (_local1.phase == 4)) {
bot.vz = 0;
bot.vx = 0;
}
bot.z = bot.z + ((bot.vz - _local1.pl.vz) * _local2);
bot.x = bot.x + (bot.vx * _local2);
bot.vx = bot.vx * Math.pow(0.95, _local2);
_local3 = bot.mc;
if ((bot.z < -2) || (bot.z >= (_local1.teAmount - 3))) {
if (bot.z > (_local1.teAmount + 6)) {
bot.z = bot.z - (_local1.teAmount + 8);
}
if (bot.z < -5) {
bot.z = _local1.teAmount + (Math.random() * 5);
}
_local3._visible = false;
} else {
_local3._visible = true;
if (bot.z < -1) {
_local3.swapDepths((4000000 - int(bot.z * 10000)) - _loc3);
} else {
_local3.swapDepths((2000000 - int(bot.z * 10000)) - _loc3);
}
ti = (bot.z + 2) - _local1.distance;
distance = 1 - (ti - Math.floor(ti));
ti = Math.ceil(ti);
_local1.sfx(bot, bot.z);
curve = _local1.tes[(ti + _local1.offTe) % _local1.teAmount].curve;
rot = curve + (bot.vx * -100);
_local3.biker._rotation = Math.max(Math.min((_local3.biker._rotation * 0.9) + ((rot * -6.5) * 0.1), 33), -33);
p = Math.pow(0.64, bot.z);
_local3._y = p * 100;
_local3._x = (((bot.x * p) * 100) + (_local1.bufferOffX[ti] * distance)) + (_local1.bufferOffX[ti + 1] * (1 - distance));
_local3._xscale = (_local3._yscale = p * 100);
strategy = 0;
d = Math.abs(bot.x - _local1.pl.x);
if (d < 0.25) {
if (bot.z > -1) {
if (bot.z < -0.63) {
_root.snd.playEvent("sndHit", (_local1.pl.vz - bot.vz) * 10);
_local1.pl.vz = Math.min(_local1.pl.vz, bot.vz) * Math.pow(0.7, _local2);
}
} else if (bot.z > -1.37) {
_root.snd.playEvent("sndHit", (bot.vz - _local1.pl.vz) * 10);
bot.vz = Math.min(_local1.pl.vz, bot.vz) * Math.pow(0.7, _local2);
} else {
if (_local1.pl.x > 0) {
bot.vx = bot.vx - (bot.ax * _local2);
} else {
bot.vx = bot.vx + (bot.ax * _local2);
}
strategy = 11;
}
} else if (d < 0.5) {
if ((bot.z > -1.5) && (bot.z < -0.63)) {
_root.snd.playEvent("sndHitShoulder", Math.abs(_local1.pl.vx - bot.vx) * 10);
_local1.pl.vx = _local1.pl.vx * Math.pow(0.8, _local2);
if (_local1.pl.x > bot.x) {
bot.vx = Math.min(_local1.pl.vx * control, bot.vx) - (bot.ax * _local2);
strategy = 12;
} else {
bot.vx = Math.max(_local1.pl.vx * control, bot.vx) + (bot.ax * _local2);
strategy = 12;
}
}
}
if (Math.abs(bot.x) >= _local1.teBotMaxX) {
if (_local1.bot.x > 0) {
bot.vx = bot.vx - (bot.ax * _local2);
} else {
bot.vx = bot.vx + (bot.ax * _local2);
}
strategy = 20;
if (Math.abs(bot.x) > _local1.streetWidth) {
bot.vz = bot.vz * Math.pow(_local1.greenFriction, _local2);
}
if (_local1.level == "dirt") {
if ((Math.abs(_local1.bot.x) < _local1.streetWidth) && (Math.abs(_local1.bot.x) > 1)) {
_local1.bot.vz = _local1.bot.vz * Math.pow(0.987, _local2);
}
}
}
if (strategy == 0) {
if (_loc3 < (_local1.bots.length - 1)) {
var j = (_loc3 + 1);
while (j < _local1.bots.length) {
other = _local1.bots[j];
if ((Math.abs(bot.x - other.x) < 0.3) && ((other.z - bot.z) < 1)) {
if (bot.x > 0) {
bot.vx = bot.vx - (bot.ax * _local2);
} else {
bot.vx = bot.vx - (bot.ax * _local2);
}
bot.vz = bot.vz * Math.pow(0.95, _local2);
strategy = 30;
}
j++;
}
}
}
if (strategy == 0) {
bot.vx = bot.vx - (((bot.ax * _local2) * curve) / 15);
strategy = 40;
}
}
_loc3++;
}
sndVolume = Math.min(0.8, sndVolume) * 0.4;
_root.snd.fadeChannel(_root.sndChannelAmbience, sndVolume, 10);
if (Key.isDown(36) || (Key.isDown(35))) {
_local1.levedPrint();
}
}
}
function sfx(te, distance) {
var _local1 = this;
var _local2;
if (!(_local1.level === "plain")) {
} else {
_local2 = (1 - ((distance - 2) / (_local1.teAmount - 2))) * 100;
_local1.coltrans.ra = _local2;
_local1.coltrans.ga = _local2;
_local1.coltrans.ba = _local2;
te.col.setTransform(_local1.coltrans);
}
}
this.lvls = new Array();
this.lvls.plain = new Array([0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 5, 6], [0, 10, 1], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [-1, 7, 0], [8, 58, 7], [6, 0, 7], [4, 56, 7], [2, 0, 0], [0, 54, 55], [-2, 7, 0], [-4, 7, 52], [-6, 7, 0], [-8, 7, 51], [-10, 7, 0], [-8, 7, 0], [-6, 7, 50], [-4, 7, 0], [-2, 7, 0], [-2, 7, 52], [-2, 7, 53], [-3, 7, 0], [-4, 7, 54], [-5, 7, 0], [-7, 7, 0], [-9, 7, 56], [-10, 7, 55], [-10, 7, 0], [-10, 7, 0], [-9, 7, 0], [-9, 7, 0], [-7, 7, 0], [-5, 7, 0], [-2, 0, 0], [0, 51, 50], [0, 58, 59], [0, 57, 0], [0, 0, 0], [0, 0, 0], [0, 0, 1], [0, 0, 0], [-1, 0, 0], [-1, 0, 0], [-2, 55, 51], [-2, 0, 52], [-3, 0, 0], [-3, 53, 65], [-3, 7, 64], [-4, 7, 0], [-4, 7, 65], [-4, 7, 0], [-4, 7, 0], [-4, 7, 0], [-3, 0, 54], [-3, 51, 50], [-3, 11, 0], [-3, 52, 63], [-3, 55, 59], [-3, 65, 0], [-2, 0, 64], [-2, 0, 0], [-2, 56, 52], [-1, 61, 65], [0, 60, 63], [0, 100, 1], [0, 100, 1], [0, 100, 1], [0, 100, 1], [0, 100, 1], [-3, 7, 60], [-5, 7, 61], [-7, 7, 63], [-4, 7, 51], [-1, 65, 52], [2, 64, 65], [5, 0, 7], [8, 0, 7], [10, 0, 7], [12, 65, 7], [13, 64, 7], [10, 59, 7], [7, 0, 7], [3, 61, 0], [1, 0, 62], [0, 64, 63], [0, 65, 59], [2, 63, 0], [4, 58, 58], [7, 57, 7], [8, 0, 7], [5, 51, 7], [2, 61, 64], [-1, 65, 52], [-4, 7, 56], [-7, 7, 55], [-8, 7, 0], [-9, 7, 62], [-7, 7, 59], [-4, 7, 58], [-1, 64, 0], [2, 60, 61], [5, 64, 7], [7, 65, 7], [8, 50, 7], [7, 0, 7], [7, 51, 7], [7, 0, 7], [7, 65, 7], [5, 64, 7], [3, 65, 65], [2, 63, 62], [1, 62, 61], [0, 65, 64], [0, 64, 65], [0, 54, 55], [0, 0, 64], [0, 51, 54], [0, 0, 65], [0, 0, 64], [0, 0, 0], [0, 0, 0], [0, 21, 22], [0, 0, 65], [0, 64, 58], [3, 61, 60], [6, 63, 7], [9, 60, 7], [12, 62, 7], [11, 63, 7], [10, 64, 7], [9, 60, 7], [7, 61, 7], [5, 62, 7], [3, 64, 60], [2, 65, 64], [1, 0, 65], [0, 0, 0], [0, 23, 24], [0, 56, 65], [0, 64, 57], [3, 62, 61], [6, 60, 7], [9, 62, 7], [12, 63, 7], [11, 62, 7], [10, 63, 7], [7, 62, 7], [4, 61, 7], [2, 63, 64], [0, 60, 65], [0, 0, 0], [-3, 61, 65], [-6, 7, 64], [-9, 7, 0], [-6, 7, 50], [-3, 54, 52], [-2, 0, 54], [1, 59, 64], [2, 65, 51], [2, 0, 64], [2, 64, 65], [2, 61, 62], [2, 62, 63], [3, 65, 63], [3, 60, 61], [3, 100, 1], [3, 100, 1], [3, 100, 1], [0, 100, 1], [-2, 7, 0], [-3, 7, 0], [-4, 7, 0], [-3, 7, 0], [-2, 0, 0], [-1, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [-1, 0, 0], [-2, 7, 7], [-4, 7, 7], [-6, 7, 7], [8, 7, 7], [6, 0, 7], [4, 0, 0], [2, 0, 51], [1, 0, 52], [0, 0, 0], [0, 0, 0], [-2, 7, 0], [-4, 7, 0], [-5, 7, 0], [-4, 7, 0], [-2, 0, 0], [0, 0, 0], [2, 0, 7], [3, 0, 7], [4, 0, 7], [4, 0, 7], [4, 0, 7], [4, 0, 7], [4, 0, 7], [3, 0, 0], [2, 0, 0], [1, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [1, 0, 7], [2, 0, 7], [3, 0, 7], [2, 0, 7], [1, 0, 0], [0, 0, 1], [2, 0, 0], [3, 0, 7], [4, 0, 7], [5, 0, 7], [6, 0, 7], [7, 0, 7], [8, 0, 7], [8, 0, 7], [8, 0, 7], [8, 0, 0], [8, 0, 7], [7, 0, 7], [6, 0, 7], [5, 0, 7], [4, 0, 7], [3, 0, 0], [2, 0, 0], [1, 0, 0], [0, 0, 0], [0, 55, 0], [0, 53, 0], [0, 0, 54], [0, 0, 0], [0, 58, 50], [0, 0, 51], [0, 59, 0], [0, 0, 0], [0, 4, 9], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [1, 0, 0], [2, 52, 7], [4, 55, 7], [6, 0, 7], [6, 0, 7], [6, 0, 7], [4, 51, 7], [2, 0, 0], [0, 0, 0], [-2, 7, 52], [-4, 7, 57], [-6, 7, 0], [-8, 7, 0], [-10, 7, 58], [-8, 7, 59], [-6, 7, 0], [-4, 7, 0], [2, 0, 0], [0, 0, 0], [0, 0, 52], [0, 53, 54], [0, 0, 0], [1, 57, 7], [2, 58, 7], [3, 56, 7], [2, 0, 7], [-2, 7, 0], [-5, 7, 0], [-8, 7, 0], [-10, 7, 0], [-8, 7, 0], [-7, 7, 0], [-6, 7, 0], [-5, 7, 0], [-4, 7, 0], [-3, 7, 0], [-2, 7, 54], [-3, 7, 53], [-3, 7, 0], [-3, 7, 52], [-3, 0, 0], [-2, 0, 0], [-1, 54, 53], [0, 0, 54], [0, 0, 0], [0, 11, 1], [0, 0, 0], [0, 54, 0], [0, 0, 0], [1, 0, 0], [1, 0, 0], [2, 0, 0], [2, 20, 0], [3, 0, 7], [3, 0, 7], [3, 0, 7], [3, 0, 7], [3, 0, 0], [2, 0, 22], [2, 0, 0], [2, 0, 0], [1, 0, 0], [1, 23, 0], [0, 0, 0], [-1, 0, 0], [-1, 0, 0], [-2, 3, 8], [-2, 0, 0], [-1, 0, 0], [0, 0, 0], [0, 0, 0], [0, 1, 2], [0, 0, 0], [1, 0, 0], [2, 0, 7], [3, 0, 7], [4, 51, 7], [5, 0, 7], [6, 54, 7], [7, 0, 7], [8, 57, 7], [9, 0, 7], [10, 0, 7], [9, 0, 7], [8, 0, 7], [7, 0, 7], [6, 0, 7], [5, 55, 7], [4, 0, 7], [4, 0, 7], [3, 0, 7], [3, 0, 7], [2, 0, 0], [2, 0, 0], [1, 0, 20], [1, 53, 0], [0, 0, 0], [0, 51, 0], [0, 0, 0], [0, 0, 20], [0, 0, 0], [-1, 0, 0], [-3, 7, 0], [-5, 7, 54], [-7, 7, 0], [-8, 7, 0], [-8, 7, 0], [-7, 7, 50], [-6, 7, 51], [-4, 0, 0], [-2, 57, 53], [-1, 0, 57], [0, 0, 0], [0, 0, 0], [0, 4, 9], [0, 0, 0], [0, 0, 51], [0, 0, 0], [0, 0, 0], [0, 23, 24], [0, 0, 0], [0, 51, 52], [0, 54, 0], [-2, 7, 54], [-4, 7, 55], [-6, 7, 0], [-8, 7, 0], [-6, 7, 54], [-4, 7, 0], [-2, 0, 57], [0, 58, 59], [2, 57, 54], [4, 56, 7], [6, 55, 7], [8, 0, 7], [6, 53, 7], [4, 51, 7], [2, 50, 0], [1, 52, 51], [0, 0, 0], [0, 0, 57], [0, 56, 0], [0, 58, 59], [1, 0, 57], [1, 55, 0], [2, 52, 53], [2, 0, 7], [3, 51, 7], [3, 0, 7], [5, 53, 7], [8, 56, 7], [10, 0, 7], [10, 52, 7], [10, 0, 7], [7, 57, 7], [4, 58, 7], [3, 0, 7], [2, 0, 7], [2, 56, 0], [2, 0, 0], [2, 0, 51], [2, 58, 0], [2, 59, 56], [2, 0, 0], [2, 52, 51], [1, 55, 0], [1, 0, 0], [0, 0, 0], [0, 3, 8], [0, 0, 0], [0, 0, 0], [-2, 7, 0], [-4, 7, 0], [-6, 7, 52], [-4, 7, 0], [-2, 55, 54], [0, 0, 56], [2, 57, 7], [4, 0, 7], [6, 59, 7], [0, 100, 1], [0, 100, 1], [0, 100, 1], [0, 100, 1], [0, 100, 1], [0, 61, 63], [0, 63, 64], [0, 62, 62], [0, 61, 63], [0, 100, 1], [0, 100, 1], [0, 100, 1], [0, 100, 1], [0, 61, 50], [1, 63, 62], [2, 64, 65], [2, 65, 54], [2, 0, 0], [2, 0, 0], [1, 0, 0], [0, 0, 0], [0, 11, 1], [0, 0, 0], [0, 0, 64], [0, 54, 65], [0, 0, 64], [2, 0, 7], [3, 0, 7], [6, 65, 7], [3, 0, 7], [2, 64, 65], [0, 65, 64], [0, 20, 20], [0, 64, 0], [2, 0, 65], [4, 0, 7], [7, 0, 7], [4, 0, 7], [2, 21, 22], [0, 0, 65], [2, 65, 7], [3, 61, 7], [7, 55, 7], [6, 54, 7], [5, 0, 7], [2, 62, 63], [-2, 64, 51], [-3, 7, 0], [-5, 7, 52], [-4, 7, 0], [-3, 7, 58], [-2, 7, 59], [-3, 7, 51], [-7, 7, 0], [-3, 7, 60], [0, 65, 64], [0, 62, 0], [0, 63, 52], [0, 57, 55], [0, 59, 62], [0, 0, 58], [-3, 7, 60], [-6, 7, 55], [-8, 7, 59], [-7, 7, 63], [-5, 7, 57], [-3, 7, 64], [-1, 60, 61], [0, 63, 56], [0, 53, 52], [0, 0, 64], [2, 51, 0], [3, 65, 7], [4, 0, 7], [4, 0, 7], [4, 54, 7], [4, 54, 7], [4, 0, 7], [3, 0, 7], [3, 0, 7], [3, 0, 7], [3, 0, 7], [3, 0, 0], [0, 2, 1], [-3, 7, 0], [-6, 7, 0], [-9, 7, 0], [-12, 7, 55], [-13, 7, 56], [-12, 7, 0], [-10, 7, 58], [-8, 7, 59], [-5, 7, 51], [-2, 64, 0], [-1, 56, 52], [2, 0, 65], [4, 0, 7], [5, 0, 7], [4, 0, 7], [2, 55, 54], [1, 0, 0], [0, 59, 0], [0, 0, 58], [0, 58, 57], [0, 0, 53], [0, 0, 0], [3, 52, 7], [7, 51, 7], [9, 0, 7], [6, 54, 54], [3, 55, 56], [2, 56, 57], [0, 1, 2], [3, 52, 7], [5, 53, 7], [4, 54, 7], [2, 55, 7], [1, 59, 7], [2, 58, 7], [5, 54, 7], [7, 52, 7], [10, 50, 7], [12, 51, 7], [13, 59, 7], [10, 57, 7], [7, 56, 7], [5, 55, 7], [3, 50, 52], [1, 51, 53], [0, 56, 54], [0, 57, 58], [0, 59, 56], [0, 58, 59], [-3, 7, 52], [-5, 7, 53], [-6, 7, 52], [-6, 7, 51], [-5, 7, 53], [-5, 7, 58], [-4, 7, 59], [-4, 7, 58], [-3, 55, 57], [-3, 52, 56], [-2, 58, 59], [-2, 59, 52], [-1, 57, 53], [0, 52, 0], [0, 57, 54], [0, 54, 0], [0, 58, 53], [3, 0, 52], [6, 53, 7], [7, 55, 7], [5, 56, 7], [3, 57, 7], [2, 59, 56], [1, 58, 52], [0, 59, 53], [0, 57, 54], [0, 56, 52], [2, 57, 53], [3, 56, 7], [5, 58, 7], [4, 59, 7], [2, 51, 52], [1, 50, 53], [0, 59, 54], [0, 60, 55], [0, 54, 50], [0, 53, 0], [0, 0, 0], [0, 56, 64], [0, 0, 54], [0, 55, 65], [0, 58, 0], [0, 0, 56], [0, 52, 53], [0, 0, 54], [0, 58, 59], [0, 54, 54], [0, 0, 0], [0, 11, 1], [0, 0, 0], [0, 57, 54], [0, 56, 0], [0, 0, 0], [0, 0, 0], [0, 4, 9], [0, 0, 0], [0, 51, 52], [0, 54, 58], [0, 2, 1], [-1, 65, 57], [-3, 7, 64], [-6, 7, 0], [-8, 7, 65], [-10, 7, 0], [-11, 7, 0], [-11, 7, 53], [-11, 7, 52], [-10, 7, 0], [-9, 7, 0], [-7, 7, 51], [-6, 7, 58], [-5, 7, 0], [-8, 7, 59], [-11, 7, 0], [-13, 7, 0], [-10, 7, 52], [-7, 7, 0], [-3, 7, 53], [-2, 0, 57], [-1, 65, 64], [0, 0, 54], [0, 54, 0], [0, 0, 0], [0, 0, 64], [2, 65, 0], [5, 0, 0], [6, 0, 7], [6, 0, 7], [6, 0, 7], [5, 0, 7], [2, 0, 0], [1, 0, 0], [1, 23, 24], [1, 0, 0], [1, 0, 0], [2, 0, 0], [2, 0, 0], [2, 20, 20], [2, 64, 0], [2, 0, 0], [2, 0, 0], [2, 0, 0], [1, 23, 24], [0, 0, 0], [-1, 0, 65], [-2, 0, 0], [-2, 0, 0], [-2, 2, 1], [-2, 7, 0], [-3, 7, 0], [-3, 7, 0], [-3, 7, 0], [-6, 7, 0], [-9, 7, 0], [-11, 7, 0], [-12, 7, 0], [-12, 7, 0], [-12, 7, 0], [-10, 7, 0], [-8, 7, 0], [-6, 7, 0], [-4, 7, 0], [-2, 0, 0], [-1, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [2, 0, 0], [4, 0, 0], [6, 0, 7], [7, 0, 7], [7, 0, 7], [7, 0, 7], [7, 0, 7], [7, 0, 7], [7, 0, 7], [7, 0, 7], [5, 0, 7], [3, 0, 0], [2, 0, 0], [1, 0, 0], [0, 64, 0], [0, 61, 65], [0, 60, 62], [0, 100, 1], [1, 100, 1], [2, 100, 1], [3, 100, 1], [4, 100, 1], [5, 100, 1], [6, 100, 1], [7, 100, 1], [8, 100, 1], [9, 100, 1], [10, 100, 1], [8, 63, 7], [5, 62, 7], [2, 61, 7], [-1, 63, 65], [-4, 7, 64], [-7, 7, 0], [-9, 7, 54], [-11, 7, 0], [-8, 7, 0], [-5, 7, 64], [-3, 65, 0], [-1, 0, 63], [0, 64, 63], [0, 61, 60], [0, 63, 62], [0, 100, 1], [0, 100, 1], [0, 100, 1], [0, 100, 1], [0, 0, 54], [0, 50, 0], [0, 0, 0], [0, 0, 0], [0, 20, 20], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 23, 24], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 12, 1], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 13, 14], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0]);
this.level = _root.level;
this.lvl = this.lvls[this.level];
this.tes = new Array();
this.bufferOffX = new Array();
this.bufferCurve = new Array();
this.coltrans = new Object();
this.bots = new Array();
this.botBases = new Array();
this.botBases[0] = {x:-1, z:0};
this.botBases[1] = {x:0, z:0};
this.botBases[2] = {x:1, z:0};
this.botBases[3] = {x:-1, z:1};
this.botBases[4] = {x:0, z:1};
this.botBases[5] = {x:1, z:1};
this.pl = new Object();
init();
if (_root.version eq "") {
levedAlter = function (element, d, value, offset) {
var _local1 = this;
offset = int(offset);
var _local3 = _local1.lvl[(_local1.lvlReadPointer - 4) % _local1.lvl.length][element];
trace(_local3 + " my lvl");
if (int(d) != 0) {
value = _local3 + d;
}
if (element > 0) {
if ((((((((value == 2) || (value == 15)) || (value == 16)) || (value == 17)) || (value == 10)) || (value == 11)) || (value == 12)) || (value == 100)) {
if (element == 1) {
_local1.levedAlter(2, 0, 1);
}
} else if ((((((((_local3 == 2) || (_local3 == 15)) || (_local3 == 16)) || (_local3 == 17)) || (_local3 == 10)) || (_local3 == 11)) || (_local3 == 12)) || (_local3 == 100)) {
if (element == 1) {
_local1.levedAlter(2, 0, 0);
}
}
}
_local1.lvl[((_local1.lvlReadPointer - 4) + offset) % _local1.lvl.length][element] = value;
_local1.levedPrint();
_local1.lvlReadPointer = _local1.lvlReadPointer - _local1.teAmount;
var _local2 = 0;
while (_local2 < _local1.teAmount) {
_local1.lvlRead((_local1.offTe + _local2) % _local1.teAmount);
_local2++;
}
};
levedRead = function (element, offset) {
var _local1 = this;
return(_local1.lvl[((_local1.lvlReadPointer - 4) + offset) % _local1.lvl.length][element]);
};
levedPrint = function () {
var _local2 = this;
var pos = (_local2.lvlReadPointer - 4);
var _local3 = 0;
var angle = 0;
var drawX = 125;
var drawY = 200;
var i = pos;
while (i < (pos + 12)) {
var _local1 = _root["block" + _local3];
if (i == pos) {
_local1.gotoAndStop(2);
} else {
_local1._alpha = 40;
}
var curve = _local2.lvl[i % _local2.lvl.length][0];
_local1._x = drawX;
_local1._y = drawY;
_local1._rotation = angle;
_local1.d0.gotoAndStop(_local2.lvl[i % _local2.lvl.length][1] + 1);
_local1.d1.gotoAndStop(_local2.lvl[i % _local2.lvl.length][2] + 1);
_local1.swapDepths(10000 - _local3);
angle = angle - curve;
drawY = drawY - (Math.cos((angle / 180) * 3.141593) * 15);
drawX = drawX + (Math.sin((angle / 180) * 3.141593) * 15);
_local3++;
i++;
}
var angle = 0;
var drawX = 125;
var drawY = 200;
var i = pos;
while (i > (pos - 12)) {
var _local1 = _root["block" + _local3];
if (i == pos) {
_local1.gotoAndStop(2);
} else {
_local1._alpha = 40;
}
var curve = _local2.lvl[i % _local2.lvl.length][0];
_local1._x = drawX;
_local1._y = drawY;
_local1._rotation = angle;
_local1.d0.gotoAndStop(_local2.lvl[i % _local2.lvl.length][1] + 1);
_local1.d1.gotoAndStop(_local2.lvl[i % _local2.lvl.length][2] + 1);
_local1.swapDepths(11000 + _local3);
angle = angle + curve;
drawY = drawY + (Math.cos((angle / 180) * 3.141593) * 15);
drawX = drawX - (Math.sin((angle / 180) * 3.141593) * 15);
_local3++;
i--;
}
};
Key.addListener(this);
this.onKeyDown = function () {
var _local1 = this;
var code = Key.getCode();
if ((code >= 48) && (code < 58)) {
_local1.levedInput = (_local1.levedInput + "") + (code - 48);
} else {
switch (code) {
case 220 :
_local1.levedInput = "";
return;
case 67 :
var _local2 = 0;
var polarity = 0;
polarity = int(_local1.levedRead(0, 0)) > 0;
while ((int(_local1.levedRead(0, _local2)) != 0) && (int(_local1.levedRead(0, _local2)) == polarity)) {
_local1.levedAlter(0, 0, 0, _local2);
_local2++;
}
_local2 = -1;
while ((int(_local1.levedRead(0, _local2)) != 0) && (int(_local1.levedRead(0, _local2)) == polarity)) {
_local1.levedAlter(0, 0, 0, _local2);
_local2--;
}
return;
case 68 :
_local1.levedDeko = int(_local1.levedInput);
return;
case 73 :
_local1.levedCurveIn = int(_local1.levedInput);
var curve = _local1.levedRead(0, 0);
_local2 = 0;
while (_local2 < _local1.levedCurveIn) {
var _local3 = Math.round(curve * ((_local1.levedCurveIn - _local2) / _local1.levedCurveIn));
_local1.levedAlter(0, 0, _local3, -1 * _local2);
_local2++;
}
return;
case 76 :
_local2 = 0;
while (_local2 < 24) {
_root.attachMovie("block", "block" + _local2, 100 + _local2);
_root["block" + _local2]._xscale = (_root["block" + _local2]._yscale = 200);
_local2++;
}
_local1.levedPrint();
return;
case 79 :
_local1.levedCurveOut = int(_local1.levedInput);
var curve = _local1.levedRead(0, 0);
_local2 = 0;
while (_local2 < _local1.levedCurveOut) {
var _local3 = Math.round(curve * ((_local1.levedCurveOut - _local2) / _local1.levedCurveOut));
_local1.levedAlter(0, 0, _local3, _local2);
_local2++;
}
return;
case 84 :
_local1.levedCurveThreshold = int(_local1.levedInput);
var curve = _local1.levedRead(0, 0);
_local2 = 0;
while (_local2 < _local1.levedCurveThreshold) {
_local1.levedAlter(0, 0, curve, _local2);
_local2++;
}
return;
case 88 :
var track = _local1.lvl;
_local2 = 0;
while (_local2 < track.length) {
var _loc2 = track[_local2];
_local2++;
}
return;
case 45 :
if (Key.isDown(16) && (Key.isDown(17))) {
_local1.levedDeko = _local1.levedRead(1, 0);
} else if (Key.isDown(16)) {
_local1.levedAlter(1, 1, 0);
_local1.levedDeko = _local1.levedRead(1, 0);
} else {
_local1.levedAlter(1, 0, int(_local1.levedDeko));
}
return;
case 33 :
if (Key.isDown(16) && (Key.isDown(17))) {
_local1.levedDeko = _local1.levedRead(2, 0);
} else if (Key.isDown(16)) {
_local1.levedAlter(2, 1, 0);
_local1.levedDeko = _local1.levedRead(2, 0);
} else {
_local1.levedAlter(2, 0, int(_local1.levedDeko));
}
return;
case 46 :
if (Key.isDown(16)) {
_local1.levedAlter(1, -1, 0);
_local1.levedDeko = _local1.levedRead(1, 0);
}
return;
case 34 :
if (Key.isDown(16)) {
_local1.levedAlter(2, -1, 0);
_local1.levedDeko = _local1.levedRead(2, 0);
}
return;
case 32 :
if (_local1.pl.vz == 0) {
_local1.pl.vz = 0.225;
} else {
_local1.pl.vz = 0;
}
return;
case 16 :
case 17 :
return;
}
}
};
}
Symbol 271 MovieClip Frame 2
draw();
Symbol 271 MovieClip Frame 3
gotoAndPlay (2);
Symbol 284 Button
on (release) {
_root.moregames();
}
on (rollOver) {
_root.btn_sound.start(0, 1);
}
Symbol 294 MovieClip Frame 1
stop();
Symbol 303 MovieClip Frame 1
stop();
Symbol 303 MovieClip Frame 11
play();
Symbol 303 MovieClip Frame 12
if (Math.abs(_root.w.pl.vz) < 0.02) {
prevFrame();
}
Symbol 303 MovieClip Frame 13
gotoAndStop (1);
Symbol 303 MovieClip Frame 19
_root.snd.fadeChannel(_root.sndChannelMusic, 1, 15);
_root.snd.fadeChannel(_root.sndChannelMotor, 1, 15);
_root.snd.fadeChannel(_root.sndChannelSqueal, 1, 15);
Symbol 303 MovieClip Frame 63
gotoAndStop (1);
Symbol 303 MovieClip Frame 87
_root.snd.playEvent("sndMarks");
Symbol 303 MovieClip Frame 122
_root.snd.playEvent("sndSet");
Symbol 303 MovieClip Frame 157
_parent.go();
_root.snd.playEvent("sndGo");
_root.snd.fadeChannel(_root.sndChannelMotors, 0, 20);
_root.snd.playEvent("sndRaceStart", 0.5);
_root.sndChannelAmbience = _root.snd.playLoop("sndRaceAmbience", 0);
_root.snd.fadeChannel(_root.sndChannelAmbience, 0.5, 100);
Symbol 303 MovieClip Frame 175
gotoAndStop (1);
Symbol 308 MovieClip Frame 1
stop();
Symbol 317 MovieClip Frame 1
stop();
Symbol 324 MovieClip Frame 1
function resetFps() {
this.frames = 0;
this.ms = getTimer();
}
function score(ifInit, ifFinish) {
var _local3 = _root;
var _local1 = this;
var _local2 = _local3;
var resttime = Math.max(0, time - (getTimer() - timestamp));
timestamp = getTimer();
_local1.timeScore = getTimer();
if (!ifInit) {
var _loc2 = Math.max(int(resttime), 0);
var checkpointId = _local2.statistics[_local2.level].checkpoints.length;
trace(_local3.checkpoints + " ++ level");
var multibonus = checkpointId;
trace(checkpointId + " checkpointId");
_loc2 = _loc2 * multibonus;
trace(_loc2 + " _loc2 _loc2");
_local1.actScore = _local1.actScore + _loc2;
if (_loc2 > 0) {
_local1.titles.bonus = (multibonus + " x Bonus: ") + _loc2;
} else if ((timeDisplay <= 20) && (timeDisplay >= 10)) {
this.titles.bonus = 10000;
_local3.scoreh = _local3.scoreh + 10000;
} else if ((timeDisplay <= 10) && (timeDisplay >= 6)) {
this.titles.bonus = 5000;
_local3.scoreh = _local3.scoreh + 5000;
} else if (timeDisplay == 5) {
this.titles.bonus = 2000;
_local3.scoreh = _local3.scoreh + 2000;
} else if (timeDisplay == 4) {
this.titles.bonus = 1000;
_local3.scoreh = _local3.scoreh + 1000;
} else if (timeDisplay == 3) {
this.titles.bonus = 500;
_local3.scoreh = _local3.scoreh + 500;
} else if (timeDisplay == 2) {
this.titles.bonus = 200;
_local3.scoreh = _local3.scoreh + 200;
} else if (timeDisplay == 1) {
this.titles.bonus = 100;
_local3.scoreh = _local3.scoreh + 100;
} else if (timeDisplay == 0) {
this.titles.bonus = "no bonus";
}
var statsObj = _local2.statistics[_local2.level].checkpoints[_local2.statistics[_local2.level].checkpoints.length - 1];
statsObj.bonus = _loc2;
statsObj.time = getTimer() - _local1.checkpointTimestamp;
_local1.checkpointTimestamp = getTimer();
if (ifFinish) {
_local2.snd.playEvent("sndFinish");
_local1.titles.title = "Finish!";
} else {
_local2.snd.playEvent("sndCheckpoint");
_local1.titles.title = "Checkpoint!";
}
trace("gap check!");
_local3.aa_txt.text = _local3.aa_txt.text + 1;
_local1.titles.gotoAndPlay("checkpoint");
} else {
_local1.checkpointTimestamp = getTimer();
_local1.time = 0;
resttime = 0;
}
_local1.time = resttime + 30000;
_local1.warn = 6;
}
function go() {
resetFps();
score(true);
_root.w.phase = 1;
_root.w.startBots();
this.gotoAndPlay("loop");
}
actScore = 0;
timeScore = -100000;
timeDisplay = 30;
timeDisplayTenth = ".0";
Instance of Symbol 308 MovieClip "speedar_mc" in Symbol 324 MovieClip Frame 1
onClipEvent (enterFrame) {
this.gotoAndStop(mph);
}
Symbol 324 MovieClip Frame 7
stop();
titles.gotoAndPlay("markssetgo");
Symbol 324 MovieClip Frame 8
mph = int(_root.w.pl.vz * 800);
tacho.gotoAndStop(int(_root.w.pl.vz * 380) + 1);
speedar_mc.gotoAndStop(mph);
meter.gotoAndStop(int((this.pos / _root.w.lvl.length) * 100) + 1);
scoreD = int(actScore);
timeD = time - (getTimer() - timestamp);
if ((timeD < 0) && (_root.version ne "nkcheat")) {
timeD = 0;
if (_root.w.phase == 1) {
_root.w.phase = 2;
this.titles.title = "Time Out!";
this.titles.bonus = "";
_root.snd.fadeChannel(_root.sndChannelMusic, 0, 15);
_root.snd.fadeChannel(_root.sndChannelMotor, 0, 15);
_root.snd.fadeChannel(_root.sndChannelSqueal, 0, 15);
this.titles.gotoAndPlay("checkpoint");
_root.snd.playEvent("sndTimeout");
}
}
timeDisplay = int(timeD / 1000);
if (timeDisplay < 10) {
timeDisplay = "0" + timeDisplay;
}
timeDisplayTenth = "." + (int(timeD / 100) % 10);
if (timeDisplay < warn) {
if (warn > 1) {
_root.snd.playEvent("sndTimer");
}
mcTime.play();
warn--;
}
fps = Math.floor(((frames++) / (getTimer() - ms)) * 10000) / 10;
pos = _root.w.offTe;
if (Key.isDown(8)) {
timestamp = getTimer();
time = 30000;
resetFps();
}
Symbol 324 MovieClip Frame 9
gotoAndPlay (8);
Symbol 334 MovieClip Frame 1
amount = 250;
mWidth = Stage.width;
mHeight = Stage.height;
var i = 0;
while (i < amount) {
thisFlake = this.attachMovie("flake", "flake" + i, i);
with (thisFlake) {
_x = Math.random() * mWidth;
_y = Math.random() * mHeight;
_xscale = (_yscale = (_alpha = 20 + (Math.random() * 50)));
}
thisFlake.yspeed = (Math.random() * 8) + 0.2;
thisFlake.xspeed = (Math.random() * 3) - 0.5;
thisFlake.increment = -0.025 + (Math.random() * 0.05);
thisFlake.radian = 0;
thisFlake.onEnterFrame = function () {
var _local1 = this;
_local1.radians = _local1.radians + _local1.increment;
_local1._x = _local1._x + _local1.xspeed;
_local1._y = _local1._y + _local1.yspeed;
if (_local1._y >= mHeight) {
_local1._y = -10;
_local1._x = -10 + (Math.random() * mWidth);
}
if ((_local1._x >= mWidth) || (_local1._x <= 0)) {
_local1._y = -10;
_local1._x = -10 + (Math.random() * mWidth);
}
};
i++;
}
Symbol 338 MovieClip Frame 1
function lvlRead(i, pointer) {
var _local1 = this;
var _local2 = pointer;
i = i % _local1.teAmount;
if (_local2 == undefined) {
_local1.lvlReadPointer++;
_local2 = _local1.lvlReadPointer;
}
_local2 = (_local2 + _local1.lvl.length) % _local1.lvl.length;
var _local3 = _local1.tes[i];
_local3.curve = _local1.lvl[_local2][0];
_local3.dekoL = _local1.lvl[_local2][1];
_local3.dekoR = _local1.lvl[_local2][2];
_local3.mc.swapDepths(_local1.teDepthCounter--);
_local3.mc.street.dekoL.gotoAndStop(_local1.lvl[_local2][1] + 1);
_local3.mc.street.dekoR.gotoAndStop(_local1.lvl[_local2][2] + 1);
}
function init() {
var _local1 = this;
_local1.phase = 0;
_local1.accelTimeStamp = 0;
bg.gotoAndStop(_local1.level);
if (!(_local1.level === "plain")) {
} else {
_local1.teAmount = 20;
_local1.teBotMaxX = 1.9;
_local1.trackWidth = 2.7;
_local1.streetWidth = 2.2;
_local1.greenFriction = 0.93;
}
_local1.teMcHeight = 100;
_local1.teHeight = 35;
_local1.teHeightScale = 0.8;
_local1.camX = 0;
_local1.scoreFlag = true;
_local1.pl.vx = 0;
_local1.pl.ax = 0.03;
_local1.pl.fx = 0.85;
_local1.pl.x = 0;
_local1.pl.y = -1;
_local1.pl.vz = 0;
_local1.pl.az = 0.005;
_local1.pl.fz = 0.98;
_local1.lvlReadPointer = -1;
_local1.teDepthCounter = 1000000 /* 0x0F4240 */;
_local1.spriteDepthCounter = 2000000 /* 0x1E8480 */;
_local1.pl.mc = _local1.attachMovie("bike", "bike", 3000000);
_local1.pl.mc._y = 500;
_local1.pl.mc.biker.sprite.tire.stop();
var _local3 = 0;
var _local2 = 0;
while (_local2 < _local1.teAmount) {
_local1.tes[_local2] = Array();
_local1.tes[_local2].mc = _local1.attachMovie("tee", "track" + _local2, _local1.teDepthCounter--);
_local1.tes[_local2].mc.street.variant.gotoAndStop((_local1.level + "_") + _local3);
_local1.lvlRead(_local2);
_local1.tes[_local2].mc.grass.variant.gotoAndStop((_local1.level + "_") + _local3);
_local2++;
}
_local1.offTe = 0;
_local1.botcfg = {vzMax:0.15, az:0.005, ax:0.005, vzVariance:0.55};
_local2 = 0;
while (_local2 < 6) {
_local1.bots[_local2] = new Object();
_local1.bots[_local2].mc = _local1.attachMovie("bike", "bot" + _local2, _local1.spriteDepthCounter--);
_local1.bots[_local2].mc.biker.tire.gotoAndStop(1);
_local1.bots[_local2].col = new Color(_local1.bots[_local2].mc);
_local1.bots[_local2].vz = 0;
_local1.bots[_local2].az = _local1.botcfg.az;
_local1.bots[_local2].ax = _local1.botcfg.ax;
_local1.resetBot(_local1.bots[_local2]);
_local1.bots[_local2].x = _local1.botBases[_local2].x;
_local1.bots[_local2].z = _local1.botBases[_local2].z;
_local2++;
}
_local1.coltrans = {ra:100, rb:0, ga:100, gb:0, ba:100, bb:0, aa:100, ab:0};
}
function resetBot(bot) {
var _local1 = this;
var _local2 = bot;
_local2.x = ((_local1.teBotMaxX * Math.random()) * 2) - _local1.teBotMaxX;
_local2.mc.biker.gotoAndStop(Math.floor(Math.random() * 7) + 2);
_local2.vzMax = _local1.botcfg.vzMax + ((Math.random() * _local1.botcfg.vzMax) * _local1.botcfg.vzVariance);
}
function startBots() {
var _local1 = this;
for (var _local2 in _local1.bots) {
_local1.bots[_local2].mc.biker.tire.play();
}
}
function gameOver() {
var _local1 = _root;
_local1.actScore = int(_local1.osd.actScore);
_local1.gotoAndStop("raceover");
}
function botSort(a, b) {
if (a.z < b.z) {
return(-1);
}
if (a.z > b.z) {
return(1);
}
return(0);
}
function draw() {
var _local1 = this;
var curve;
var _local3;
var offCurve = 0;
var distance;
var ti;
var _local2;
_local2 = (getTimer() - _local1.timestamp) / 50;
_local1.timestamp = getTimer();
if (_local2 > 200) {
} else {
if (_local1.pl.vz > 0.1) {
_local1.pl.mc.biker.sprite.tire.play();
} else {
_local1.pl.mc.biker.sprite.tire.gotoAndStop(1);
}
if (Key.isDown(27) || (Key.isDown(8) && (_root.version eq ""))) {
_local1.gameOver();
}
if (Key.isDown(38)) {
if (_local1.phase == 1) {
_root.scoreh++;
if (_root.scoreh <= 9) {
_root.score = "0000" + _root.scoreh;
} else if (_root.scoreh <= 99) {
_root.score = "000" + _root.scoreh;
} else if (_root.scoreh <= 999) {
_root.score = "00" + _root.scoreh;
} else if (_root.scoreh <= 9999) {
_root.score = "0" + _root.scoreh;
} else {
_root.score = _root.scoreh;
}
_local1.pl.mc.biker.sprite.light.gotoAndStop("off");
if (_local1.accelTimeStamp > 0) {
var a = (getTimer() - _local1.accelTimeStamp);
if ((a > 0) || (a < -1000)) {
_local1.accelTimeStamp = 0;
} else {
_local1.pl.vz = _local1.pl.vz + (_local1.pl.az * _local2);
}
}
_local1.pl.vz = _local1.pl.vz + (_local1.pl.az * _local2);
_local1.distance = _local1.distance - (0.05 * _local2);
} else if ((_local1.phase == 0) && (_local1.keyAccelTokens > 0)) {
_local1.keyAccelTokens = 0;
_local1.accelTimeStamp = getTimer() + 1000;
}
} else {
_local1.pl.mc.biker.sprite.light.gotoAndStop("on");
_local1.keyAccelTokens = 1;
}
if (Key.isDown(40)) {
_local1.pl.vz = _local1.pl.vz * Math.pow(0.95, _local2);
}
if (_local1.phase >= 2) {
_local1.pl.vz = _local1.pl.vz * Math.pow(0.95, _local2);
} else {
_local1.pl.vz = _local1.pl.vz * Math.pow(_local1.pl.fz, _local2);
}
var volSqueal = 0;
if (Key.isDown(37) && (_local1.phase > 0)) {
volSqueal = Math.max(0, Math.abs(_local1.pl.vx) - 0.3);
_local1.pl.vx = _local1.pl.vx - (0.1 * _local2);
if (!Key.isDown(38)) {
_local1.pl.vx = _local1.pl.vx - (0.05 * _local2);
}
}
if (Key.isDown(39) && (_local1.phase > 0)) {
volSqueal = Math.max(0, Math.abs(_local1.pl.vx) - 0.3);
_local1.pl.vx = _local1.pl.vx + (0.1 * _local2);
if (!Key.isDown(38)) {
_local1.pl.vx = _local1.pl.vx + (0.05 * _local2);
}
}
if (volSqueal > 0) {
_root.snd.fadeChannel(_root.sndChannelSqueal, volSqueal * 0.53, 5);
} else {
_root.snd.fadeChannel(_root.sndChannelSqueal, volSqueal, 5);
}
if (_root.version == "") {
if (((!Key.isDown(16)) && (Key.isDown(34))) && (_local1.keyRightTokens > 0)) {
_local1.keyRightTokens = 0;
_local1.pl.vz = 0;
_local1.levedAlter(0, -1);
} else {
_local1.keyRightTokens = 1;
}
if (((!Key.isDown(16)) && (Key.isDown(46))) && (_local1.keyLeftTokens > 0)) {
_local1.keyLeftTokens = 0;
_local1.pl.vz = 0;
_local1.levedAlter(0, 1);
} else {
_local1.keyLeftTokens = 1;
}
if (Key.isDown(35) && (_local1.keyDownTokens > 0)) {
_local1.pl.vz = 0;
_local1.distance = int(_local1.distance) + 1.1;
_local1.keyDownTokens = 0;
} else {
_local1.keyDownTokens = 1;
}
if (Key.isDown(36) && (_local1.keyUpTokens > 0)) {
_local1.pl.vz = 0;
_local1.keyUpTokens = 0;
_local1.distance = int(_local1.distance) - 1;
} else {
_local1.keyUpTokens = 1;
}
}
_local1.pl.vx = _local1.pl.vx * Math.pow(_local1.pl.fx, _local2);
_local1.pl.mc.biker._rotation = (_local1.pl.mc.biker._rotation * 0.8) + (((_local1.pl.vx * Math.max(0.08, Math.abs(_local1.pl.vz))) * 330) * 0.2);
_local1.pl.mc.biker.sprite.gotoAndStop(Math.min(20, Math.max(1, int((_local1.pl.vx + 0.5) * 20))));
_local1._rotation = (_local1.pl.vx * Math.abs(_local1.pl.vz)) * 90;
_local1.distance = _local1.distance - (_local1.pl.vz * _local2);
_root.osd.actScore = _root.osd.actScore + ((_local1.pl.vz * _local2) * 5);
if (_local1.phase > 1) {
if ((_local1.phase == 2) || (_local1.phase == 3)) {
if (_local1.phase == 3) {
_local1.pl.vz = _local1.pl.vz * Math.pow(0.95, _local2);
}
if (_local1.pl.vz < 0.003) {
trace("over it");
_local1.phase = 4;
if (_root.aa_txt.text == 11111) {
_root.gotoAndStop("gcom");
} else {
_local1.gameOver();
}
} else if (_local1.pl.vz < 0.015) {
_local1.pl.vz * 0.5;
}
}
}
var control;
_local1.pl.x = Math.max(-1 * _local1.trackWidth, Math.min(_local1.trackWidth, _local1.pl.x));
control = 0.2;
if (_local1.level == "dirt") {
control = 0.15;
if (Math.abs(_local1.pl.x) > _local1.streetWidth) {
control = 0.12;
} else if (Math.abs(_local1.pl.x) > 1) {
control = 0.1;
_local1.pl.vz = _local1.pl.vz * Math.pow(0.997, _local2);
}
}
_local1.pl.x = _local1.pl.x + (((_local1.pl.vx * _local2) * control) * Math.max(0.7, Math.min(0.8, _local1.pl.vz * 10)));
_local1.pl.vz = Math.max(0, _local1.pl.vz - (Math.abs(_local1.pl.vx * 0.001) * _local2));
_local1.camX = _local1.pl.x * -100;
while (_local1.distance < 0) {
_local1.distance = _local1.distance + 1;
_local1.lvlRead(_local1.offTe);
_local1.offTe++;
_local1.scoreFlag = true;
}
while (_local1.distance > 1) {
_local1.lvlReadPointer--;
_local1.lvlRead(_local1.offTe, (_local1.lvlReadPointer - _local1.teAmount) + 1);
_local1.distance = _local1.distance - 1;
_local1.offTe--;
}
p = Math.pow(0.64, _local1.pl.y);
_local3 = _local1.pl.mc;
_local3._y = p * 100;
_local3._xscale = (_local3._yscale = p * 100);
_local3._x = ((_local1.pl.x * p) * 100) + _local1.camX;
var _loc3 = 0;
while (_loc3 < _local1.teAmount) {
te = _local1.tes[(_loc3 + _local1.offTe) % _local1.teAmount];
_local3 = te.mc;
distance = (_local1.distance - 2) + _loc3;
_local1.sfx(te, distance);
p = Math.pow(0.64, distance);
_local3._y = p * 100;
scale = p * 100;
_local3.street._xscale = scale;
_local3.street._yscale = scale;
_local3.grass._yscale = scale;
curve = te.curve;
if (_loc3 == 0) {
x = _local1.camX * p;
curve = curve * _local1.distance;
} else {
x = spliceX;
}
if (_loc3 == 0) {
var dx = (((_local1.pl.vz * te.curve) * 0.09) * _local2);
_local1.pl.x = _local1.pl.x + dx;
_local1.bg.shil._x = ((_local1.bg.shil._x + (dx * 60)) + 700) % 700;
}
if (_loc3 == 1) {
if (Math.abs(_local1.pl.x) > (_local1.streetWidth + 0.1)) {
_local1.pl.vz = _local1.pl.vz * Math.pow(_local1.greenFriction, _local2);
if ((_local1.pl.x > 0) && (te.dekoR > 0)) {
_root.snd.playEvent("sndHitDeko", Math.abs(_local1.pl.vz) * 12);
_local1.pl.vz = _local1.pl.vz * Math.pow(0.7, _local2);
_local1.pl.vx = _local1.pl.vx - (0.5 * _local2);
} else if ((_local1.pl.x < 0) && (te.dekoL > 0)) {
_root.snd.playEvent("sndHitDeko", Math.abs(_local1.pl.vz) * 12);
_local1.pl.vz = _local1.pl.vz * Math.pow(0.7, _local2);
_local1.pl.vx = _local1.pl.vx + (0.5 * _local2);
}
}
if ((te.dekoL == 11) || (te.dekoL == 12)) {
if (_local1.scoreFlag == true) {
_root.statistics[_root.level].checkpoints.push({score:0, time:0});
_root.osd.score(false, te.dekoL == 12);
_local1.scoreFlag = false;
_local1.phase = 1;
}
if ((te.dekoL == 12) && (_root.version != "")) {
_root.statistics[_root.level].winner = true;
_local1.phase = 3;
}
}
}
_local3.street._x = x;
_local1.bufferOffX[_loc3] = x;
_local1.bufferCurve[_loc3] = te.curve;
offCurve = offCurve + curve;
curve = (_local1.camX * 0.094) + offCurve;
spliceX = x - ((curve * 3.8) * p);
curve = Math.min(Math.max(71 - int(curve), 1), 141);
_local3.street.gotoAndStop(curve);
_loc3++;
}
_local1.bufferOffX[_loc3] = _local1.bufferOffX[_loc3 - 1];
var d;
var rot;
var strategy;
_local1.bots.sort(_local1.botSort);
var sndVolume = 0.5;
var _loc3 = 0;
while (_loc3 < _local1.bots.length) {
_loc3 = int(_loc3);
bot = _local1.bots[_loc3];
if (bot.z < 0) {
sndVolume = sndVolume + (Math.max(0, bot.z + 5) * 0.06);
} else {
sndVolume = sndVolume + (Math.max(0, 3 - bot.z) * 0.06);
}
if ((_local1.phase == 1) || (_local1.phase == 2)) {
bot.vz = Math.min(bot.vz + (bot.az * _local2), bot.vzMax);
} else {
bot.vz = bot.vz * Math.pow(0.96, _local2);
bot.vx = bot.vx * 0.5;
}
if ((_local1.phase == 0) || (_local1.phase == 4)) {
bot.vz = 0;
bot.vx = 0;
}
bot.z = bot.z + ((bot.vz - _local1.pl.vz) * _local2);
bot.x = bot.x + (bot.vx * _local2);
bot.vx = bot.vx * Math.pow(0.95, _local2);
_local3 = bot.mc;
if ((bot.z < -2) || (bot.z >= (_local1.teAmount - 3))) {
if (bot.z > (_local1.teAmount + 6)) {
bot.z = bot.z - (_local1.teAmount + 8);
}
if (bot.z < -5) {
bot.z = _local1.teAmount + (Math.random() * 5);
}
_local3._visible = false;
} else {
_local3._visible = true;
if (bot.z < -1) {
_local3.swapDepths((4000000 - int(bot.z * 10000)) - _loc3);
} else {
_local3.swapDepths((2000000 - int(bot.z * 10000)) - _loc3);
}
ti = (bot.z + 2) - _local1.distance;
distance = 1 - (ti - Math.floor(ti));
ti = Math.ceil(ti);
_local1.sfx(bot, bot.z);
curve = _local1.tes[(ti + _local1.offTe) % _local1.teAmount].curve;
rot = curve + (bot.vx * -100);
_local3.biker._rotation = Math.max(Math.min((_local3.biker._rotation * 0.9) + ((rot * -6.5) * 0.1), 33), -33);
p = Math.pow(0.64, bot.z);
_local3._y = p * 100;
_local3._x = (((bot.x * p) * 100) + (_local1.bufferOffX[ti] * distance)) + (_local1.bufferOffX[ti + 1] * (1 - distance));
_local3._xscale = (_local3._yscale = p * 100);
strategy = 0;
d = Math.abs(bot.x - _local1.pl.x);
if (d < 0.25) {
if (bot.z > -1) {
if (bot.z < -0.63) {
_root.snd.playEvent("sndHit", (_local1.pl.vz - bot.vz) * 10);
_local1.pl.vz = Math.min(_local1.pl.vz, bot.vz) * Math.pow(0.7, _local2);
}
} else if (bot.z > -1.37) {
_root.snd.playEvent("sndHit", (bot.vz - _local1.pl.vz) * 10);
bot.vz = Math.min(_local1.pl.vz, bot.vz) * Math.pow(0.7, _local2);
} else {
if (_local1.pl.x > 0) {
bot.vx = bot.vx - (bot.ax * _local2);
} else {
bot.vx = bot.vx + (bot.ax * _local2);
}
strategy = 11;
}
} else if (d < 0.5) {
if ((bot.z > -1.5) && (bot.z < -0.63)) {
_root.snd.playEvent("sndHitShoulder", Math.abs(_local1.pl.vx - bot.vx) * 10);
_local1.pl.vx = _local1.pl.vx * Math.pow(0.8, _local2);
if (_local1.pl.x > bot.x) {
bot.vx = Math.min(_local1.pl.vx * control, bot.vx) - (bot.ax * _local2);
strategy = 12;
} else {
bot.vx = Math.max(_local1.pl.vx * control, bot.vx) + (bot.ax * _local2);
strategy = 12;
}
}
}
if (Math.abs(bot.x) >= _local1.teBotMaxX) {
if (_local1.bot.x > 0) {
bot.vx = bot.vx - (bot.ax * _local2);
} else {
bot.vx = bot.vx + (bot.ax * _local2);
}
strategy = 20;
if (Math.abs(bot.x) > _local1.streetWidth) {
bot.vz = bot.vz * Math.pow(_local1.greenFriction, _local2);
}
if (_local1.level == "dirt") {
if ((Math.abs(_local1.bot.x) < _local1.streetWidth) && (Math.abs(_local1.bot.x) > 1)) {
_local1.bot.vz = _local1.bot.vz * Math.pow(0.987, _local2);
}
}
}
if (strategy == 0) {
if (_loc3 < (_local1.bots.length - 1)) {
var j = (_loc3 + 1);
while (j < _local1.bots.length) {
other = _local1.bots[j];
if ((Math.abs(bot.x - other.x) < 0.3) && ((other.z - bot.z) < 1)) {
if (bot.x > 0) {
bot.vx = bot.vx - (bot.ax * _local2);
} else {
bot.vx = bot.vx - (bot.ax * _local2);
}
bot.vz = bot.vz * Math.pow(0.95, _local2);
strategy = 30;
}
j++;
}
}
}
if (strategy == 0) {
bot.vx = bot.vx - (((bot.ax * _local2) * curve) / 15);
strategy = 40;
}
}
_loc3++;
}
sndVolume = Math.min(0.8, sndVolume) * 0.4;
_root.snd.fadeChannel(_root.sndChannelAmbience, sndVolume, 10);
if (Key.isDown(36) || (Key.isDown(35))) {
_local1.levedPrint();
}
}
}
function sfx(te, distance) {
var _local1 = this;
var _local2;
if (!(_local1.level === "plain")) {
} else {
_local2 = (1 - ((distance - 2) / (_local1.teAmount - 2))) * 100;
_local1.coltrans.ra = _local2;
_local1.coltrans.ga = _local2;
_local1.coltrans.ba = _local2;
te.col.setTransform(_local1.coltrans);
}
}
this.lvls = new Array();
this.lvls.plain = new Array([0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 5, 6], [3, 10, 1], [2, 0, 0], [1, 0, 0], [0, 0, 0], [0, 0, 0], [-1, 7, 0], [-2, 7, 0], [-3, 7, 0], [-4, 7, 0], [-5, 7, 0], [-6, 0, 0], [-5, 0, 0], [-4, 0, 0], [-3, 0, 0], [-2, 0, 0], [-1, 0, 0], [-2, 7, 7], [-4, 7, 7], [-6, 7, 7], [8, 7, 7], [6, 0, 7], [4, 0, 0], [2, 0, 51], [1, 0, 52], [0, 0, 0], [0, 0, 0], [-2, 7, 0], [-4, 7, 0], [-5, 7, 0], [-4, 7, 0], [-2, 0, 0], [0, 0, 0], [2, 0, 7], [3, 0, 7], [4, 0, 7], [4, 0, 7], [4, 0, 7], [4, 0, 7], [4, 0, 7], [3, 0, 0], [2, 0, 0], [1, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [1, 0, 7], [2, 0, 7], [3, 0, 7], [2, 0, 7], [1, 0, 0], [0, 0, 1], [2, 0, 0], [3, 0, 7], [4, 0, 7], [5, 0, 7], [6, 0, 7], [7, 0, 7], [8, 0, 7], [8, 0, 7], [8, 0, 7], [8, 0, 0], [8, 0, 7], [7, 0, 7], [6, 0, 7], [5, 0, 7], [4, 0, 7], [3, 0, 0], [2, 0, 0], [1, 0, 0], [0, 0, 0], [0, 55, 0], [0, 53, 0], [0, 0, 54], [0, 0, 0], [0, 58, 50], [0, 0, 51], [0, 59, 0], [0, 0, 0], [0, 4, 9], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [1, 0, 0], [2, 52, 7], [4, 55, 7], [6, 0, 7], [6, 0, 7], [6, 0, 7], [4, 51, 7], [2, 0, 0], [0, 0, 0], [-2, 7, 52], [-4, 7, 57], [-6, 7, 0], [-8, 7, 0], [-10, 7, 58], [-8, 7, 59], [-6, 7, 0], [-4, 7, 0], [2, 0, 0], [0, 0, 0], [0, 0, 52], [0, 53, 54], [0, 0, 0], [1, 57, 7], [2, 58, 7], [3, 56, 7], [2, 0, 7], [-2, 7, 0], [-5, 7, 0], [-8, 7, 0], [-10, 7, 0], [-8, 7, 0], [-7, 7, 0], [-6, 7, 0], [-5, 7, 0], [-4, 7, 0], [-3, 7, 0], [-2, 7, 54], [-3, 7, 53], [-3, 7, 0], [-3, 7, 52], [-3, 0, 0], [-2, 0, 0], [-1, 54, 53], [0, 0, 54], [0, 0, 0], [0, 11, 1], [0, 0, 0], [-1, 0, 0], [-1, 0, 0], [-2, 55, 51], [-2, 0, 52], [-3, 0, 0], [-3, 53, 65], [-3, 7, 64], [-4, 7, 0], [-4, 7, 65], [-4, 7, 0], [-4, 7, 0], [-4, 7, 0], [-3, 0, 54], [-3, 51, 50], [-3, 0, 0], [-3, 52, 63], [-3, 55, 59], [-3, 65, 0], [-2, 0, 64], [-2, 0, 0], [-2, 56, 52], [-1, 61, 65], [0, 60, 63], [0, 100, 1], [0, 100, 1], [0, 100, 1], [0, 100, 1], [0, 100, 1], [-3, 7, 60], [-5, 7, 61], [-7, 7, 63], [-4, 7, 51], [-1, 65, 52], [2, 64, 65], [5, 0, 7], [8, 0, 7], [10, 0, 7], [12, 65, 7], [13, 64, 7], [10, 59, 7], [7, 0, 7], [3, 61, 0], [1, 0, 62], [0, 64, 63], [0, 65, 59], [2, 63, 0], [4, 58, 58], [7, 57, 7], [8, 0, 7], [5, 51, 7], [2, 61, 64], [-1, 65, 52], [-4, 7, 56], [-7, 7, 55], [-8, 7, 0], [-9, 7, 62], [-7, 7, 59], [-4, 7, 58], [-1, 64, 0], [2, 60, 61], [5, 64, 7], [7, 65, 7], [8, 50, 7], [7, 0, 7], [7, 51, 7], [7, 0, 7], [7, 65, 7], [5, 64, 7], [3, 65, 65], [2, 63, 62], [1, 62, 61], [0, 65, 64], [0, 64, 65], [0, 54, 55], [0, 0, 64], [0, 51, 54], [0, 0, 65], [0, 0, 64], [0, 0, 0], [0, 0, 0], [0, 21, 22], [0, 0, 65], [0, 64, 58], [3, 61, 60], [6, 63, 7], [9, 60, 7], [12, 62, 7], [11, 63, 7], [10, 64, 7], [9, 60, 7], [7, 61, 7], [5, 62, 7], [3, 64, 60], [2, 65, 64], [1, 0, 65], [0, 0, 0], [0, 23, 24], [0, 56, 65], [0, 64, 57], [3, 62, 61], [6, 60, 7], [9, 62, 7], [12, 63, 7], [11, 62, 7], [10, 63, 7], [7, 62, 7], [4, 61, 7], [2, 63, 64], [0, 60, 65], [0, 0, 0], [-3, 61, 65], [-6, 7, 64], [-9, 7, 0], [-6, 7, 50], [-3, 54, 52], [-2, 0, 54], [1, 59, 64], [2, 65, 51], [2, 0, 64], [2, 64, 65], [2, 61, 62], [2, 62, 63], [3, 65, 63], [3, 60, 61], [3, 100, 1], [3, 100, 1], [3, 100, 1], [0, 100, 1], [0, 100, 1], [0, 100, 1], [0, 100, 1], [0, 100, 1], [0, 100, 1], [0, 61, 63], [0, 63, 64], [0, 62, 62], [0, 61, 63], [0, 100, 1], [0, 100, 1], [0, 100, 1], [0, 100, 1], [0, 61, 50], [1, 63, 62], [2, 64, 65], [2, 65, 54], [2, 0, 0], [2, 0, 0], [1, 0, 0], [0, 0, 0], [0, 11, 1], [0, 0, 0], [0, 0, 64], [0, 54, 65], [0, 0, 64], [2, 0, 7], [3, 0, 7], [6, 65, 7], [3, 0, 7], [2, 64, 65], [0, 65, 64], [0, 20, 20], [0, 64, 0], [2, 0, 65], [4, 0, 7], [7, 0, 7], [4, 0, 7], [2, 21, 22], [0, 0, 65], [2, 65, 7], [3, 61, 7], [7, 55, 7], [6, 54, 7], [5, 0, 7], [2, 62, 63], [-2, 64, 51], [-3, 7, 0], [-5, 7, 52], [-4, 7, 0], [-3, 7, 58], [-2, 7, 59], [-3, 7, 51], [-7, 7, 0], [-3, 7, 60], [0, 65, 64], [0, 62, 0], [0, 63, 52], [0, 57, 55], [0, 59, 62], [0, 0, 58], [-3, 7, 60], [-6, 7, 55], [-8, 7, 59], [-7, 7, 63], [-5, 7, 57], [-3, 7, 64], [-1, 60, 61], [0, 63, 56], [0, 53, 52], [0, 0, 64], [2, 51, 0], [3, 65, 7], [4, 0, 7], [4, 0, 7], [4, 54, 7], [4, 54, 7], [4, 0, 7], [3, 0, 7], [3, 0, 7], [3, 0, 7], [3, 0, 7], [3, 0, 0], [0, 2, 1], [-3, 7, 0], [-6, 7, 0], [-9, 7, 0], [-12, 7, 55], [-13, 7, 56], [-12, 7, 0], [-10, 7, 58], [-8, 7, 59], [-5, 7, 51], [-2, 64, 0], [-1, 56, 52], [2, 0, 65], [4, 0, 7], [5, 0, 7], [4, 0, 7], [2, 55, 54], [1, 0, 0], [0, 59, 0], [0, 0, 58], [0, 58, 57], [0, 0, 53], [0, 0, 0], [3, 52, 7], [7, 51, 7], [9, 0, 7], [6, 54, 54], [3, 55, 56], [2, 56, 57], [0, 1, 2], [3, 52, 7], [5, 53, 7], [4, 54, 7], [2, 55, 7], [1, 59, 7], [2, 58, 7], [5, 54, 7], [7, 52, 7], [10, 50, 7], [12, 51, 7], [13, 59, 7], [10, 57, 7], [7, 56, 7], [5, 55, 7], [3, 50, 52], [1, 51, 53], [0, 56, 54], [0, 57, 58], [0, 59, 56], [0, 58, 59], [-3, 7, 52], [-5, 7, 53], [-6, 7, 52], [-6, 7, 51], [-5, 7, 53], [-5, 7, 58], [-4, 7, 59], [-4, 7, 58], [-3, 55, 57], [-3, 52, 56], [-2, 58, 59], [-2, 59, 52], [-1, 57, 53], [0, 52, 0], [0, 57, 54], [0, 54, 0], [0, 58, 53], [3, 0, 52], [6, 53, 7], [7, 55, 7], [5, 56, 7], [3, 57, 7], [2, 59, 56], [1, 58, 52], [0, 59, 53], [0, 57, 54], [0, 56, 52], [2, 57, 53], [3, 56, 7], [5, 58, 7], [4, 59, 7], [2, 51, 52], [1, 50, 53], [0, 59, 54], [0, 60, 55], [0, 54, 50], [0, 53, 0], [0, 0, 0], [0, 56, 64], [0, 0, 54], [0, 55, 65], [0, 58, 0], [0, 0, 56], [0, 52, 53], [0, 0, 54], [0, 58, 59], [0, 54, 54], [0, 0, 0], [0, 11, 1], [0, 0, 0], [0, 54, 0], [0, 0, 0], [1, 0, 0], [1, 0, 0], [2, 0, 0], [2, 20, 0], [3, 0, 7], [3, 0, 7], [3, 0, 7], [3, 0, 7], [3, 0, 0], [2, 0, 22], [2, 0, 0], [2, 0, 0], [1, 0, 0], [1, 23, 0], [0, 0, 0], [-1, 0, 0], [-1, 0, 0], [-2, 3, 8], [-2, 0, 0], [-1, 0, 0], [0, 0, 0], [0, 0, 0], [0, 1, 2], [0, 0, 0], [1, 0, 0], [2, 0, 7], [3, 0, 7], [4, 51, 7], [5, 0, 7], [6, 54, 7], [7, 0, 7], [8, 57, 7], [9, 0, 7], [10, 0, 7], [9, 0, 7], [8, 0, 7], [7, 0, 7], [6, 0, 7], [5, 55, 7], [4, 0, 7], [4, 0, 7], [3, 0, 7], [3, 0, 7], [2, 0, 0], [2, 0, 0], [1, 0, 20], [1, 53, 0], [0, 0, 0], [0, 51, 0], [0, 0, 0], [0, 0, 20], [0, 0, 0], [-1, 0, 0], [-3, 7, 0], [-5, 7, 54], [-7, 7, 0], [-8, 7, 0], [-8, 7, 0], [-7, 7, 50], [-6, 7, 51], [-4, 0, 0], [-2, 57, 53], [-1, 0, 57], [0, 0, 0], [0, 0, 0], [0, 4, 9], [0, 0, 0], [0, 0, 51], [0, 0, 0], [0, 0, 0], [0, 23, 24], [0, 0, 0], [0, 51, 52], [0, 54, 0], [-2, 7, 54], [-4, 7, 55], [-6, 7, 0], [-8, 7, 0], [-6, 7, 54], [-4, 7, 0], [-2, 0, 57], [0, 58, 59], [2, 57, 54], [4, 56, 7], [6, 55, 7], [8, 0, 7], [6, 53, 7], [4, 51, 7], [2, 50, 0], [1, 52, 51], [0, 0, 0], [0, 0, 57], [0, 56, 0], [0, 58, 59], [1, 0, 57], [1, 55, 0], [2, 52, 53], [2, 0, 7], [3, 51, 7], [3, 0, 7], [5, 53, 7], [8, 56, 7], [10, 0, 7], [10, 52, 7], [10, 0, 7], [7, 57, 7], [4, 58, 7], [3, 0, 7], [2, 0, 7], [2, 56, 0], [2, 0, 0], [2, 0, 51], [2, 58, 0], [2, 59, 56], [2, 0, 0], [2, 52, 51], [1, 55, 0], [1, 0, 0], [0, 0, 0], [0, 3, 8], [0, 0, 0], [0, 0, 0], [-2, 7, 0], [-4, 7, 0], [-6, 7, 52], [-4, 7, 0], [-2, 55, 54], [0, 0, 56], [2, 57, 7], [4, 0, 7], [6, 59, 7], [8, 58, 7], [6, 0, 7], [4, 56, 7], [2, 0, 0], [0, 54, 55], [-2, 7, 0], [-4, 7, 52], [-6, 7, 0], [-8, 7, 51], [-10, 7, 0], [-8, 7, 0], [-6, 7, 50], [-4, 7, 0], [-2, 7, 0], [-2, 7, 52], [-2, 7, 53], [-3, 7, 0], [-4, 7, 54], [-5, 7, 0], [-7, 7, 0], [-9, 7, 56], [-10, 7, 55], [-10, 7, 0], [-10, 7, 0], [-9, 7, 0], [-9, 7, 0], [-7, 7, 0], [-5, 7, 0], [-2, 0, 0], [0, 51, 50], [0, 58, 59], [0, 57, 0], [0, 0, 0], [0, 0, 0], [0, 11, 1], [0, 0, 0], [0, 57, 54], [0, 56, 0], [0, 0, 0], [0, 0, 0], [0, 4, 9], [0, 0, 0], [0, 51, 52], [0, 54, 58], [0, 2, 1], [-1, 65, 57], [-3, 7, 64], [-6, 7, 0], [-8, 7, 65], [-10, 7, 0], [-11, 7, 0], [-11, 7, 53], [-11, 7, 52], [-10, 7, 0], [-9, 7, 0], [-7, 7, 51], [-6, 7, 58], [-5, 7, 0], [-8, 7, 59], [-11, 7, 0], [-13, 7, 0], [-10, 7, 52], [-7, 7, 0], [-3, 7, 53], [-2, 0, 57], [-1, 65, 64], [0, 0, 54], [0, 54, 0], [0, 0, 0], [0, 0, 64], [2, 65, 0], [5, 0, 0], [6, 0, 7], [6, 0, 7], [6, 0, 7], [5, 0, 7], [2, 0, 0], [1, 0, 0], [1, 23, 24], [1, 0, 0], [1, 0, 0], [2, 0, 0], [2, 0, 0], [2, 20, 20], [2, 64, 0], [2, 0, 0], [2, 0, 0], [2, 0, 0], [1, 23, 24], [0, 0, 0], [-1, 0, 65], [-2, 0, 0], [-2, 0, 0], [-2, 2, 1], [-2, 7, 0], [-3, 7, 0], [-3, 7, 0], [-3, 7, 0], [-6, 7, 0], [-9, 7, 0], [-11, 7, 0], [-12, 7, 0], [-12, 7, 0], [-12, 7, 0], [-10, 7, 0], [-8, 7, 0], [-6, 7, 0], [-4, 7, 0], [-2, 0, 0], [-1, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [2, 0, 0], [4, 0, 0], [6, 0, 7], [7, 0, 7], [7, 0, 7], [7, 0, 7], [7, 0, 7], [7, 0, 7], [7, 0, 7], [7, 0, 7], [5, 0, 7], [3, 0, 0], [2, 0, 0], [1, 0, 0], [0, 64, 0], [0, 61, 65], [0, 60, 62], [0, 100, 1], [1, 100, 1], [2, 100, 1], [3, 100, 1], [4, 100, 1], [5, 100, 1], [6, 100, 1], [7, 100, 1], [8, 100, 1], [9, 100, 1], [10, 100, 1], [8, 63, 7], [5, 62, 7], [2, 61, 7], [-1, 63, 65], [-4, 7, 64], [-7, 7, 0], [-9, 7, 54], [-11, 7, 0], [-8, 7, 0], [-5, 7, 64], [-3, 65, 0], [-1, 0, 63], [0, 64, 63], [0, 61, 60], [0, 63, 62], [0, 100, 1], [0, 100, 1], [0, 100, 1], [0, 100, 1], [0, 0, 54], [0, 50, 0], [0, 0, 0], [0, 0, 0], [0, 20, 20], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 23, 24], [0, 0, 0], [1, 0, 0], [2, 0, 7], [3, 0, 7], [4, 51, 7], [5, 0, 7], [6, 54, 7], [7, 0, 7], [8, 57, 7], [9, 0, 7], [10, 0, 7], [9, 0, 7], [8, 0, 7], [7, 0, 7], [6, 0, 7], [5, 55, 7], [4, 0, 7], [4, 0, 7], [3, 0, 7], [3, 0, 7], [2, 0, 0], [2, 0, 0], [1, 0, 20], [1, 53, 0], [0, 0, 0][0], [0, 0, 0], [0, 0, 0], [0, 12, 1], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 13, 14], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0]);
this.level = _root.level;
this.lvl = this.lvls[this.level];
this.tes = new Array();
this.bufferOffX = new Array();
this.bufferCurve = new Array();
this.coltrans = new Object();
this.bots = new Array();
this.botBases = new Array();
this.botBases[0] = {x:-1, z:0};
this.botBases[1] = {x:0, z:0};
this.botBases[2] = {x:1, z:0};
this.botBases[3] = {x:-1, z:1};
this.botBases[4] = {x:0, z:1};
this.botBases[5] = {x:1, z:1};
this.pl = new Object();
init();
if (_root.version eq "") {
levedAlter = function (element, d, value, offset) {
var _local1 = this;
offset = int(offset);
var _local3 = _local1.lvl[(_local1.lvlReadPointer - 4) % _local1.lvl.length][element];
trace(_local3 + " my lvl");
if (int(d) != 0) {
value = _local3 + d;
}
if (element > 0) {
if ((((((((value == 2) || (value == 15)) || (value == 16)) || (value == 17)) || (value == 10)) || (value == 11)) || (value == 12)) || (value == 100)) {
if (element == 1) {
_local1.levedAlter(2, 0, 1);
}
} else if ((((((((_local3 == 2) || (_local3 == 15)) || (_local3 == 16)) || (_local3 == 17)) || (_local3 == 10)) || (_local3 == 11)) || (_local3 == 12)) || (_local3 == 100)) {
if (element == 1) {
_local1.levedAlter(2, 0, 0);
}
}
}
_local1.lvl[((_local1.lvlReadPointer - 4) + offset) % _local1.lvl.length][element] = value;
_local1.levedPrint();
_local1.lvlReadPointer = _local1.lvlReadPointer - _local1.teAmount;
var _local2 = 0;
while (_local2 < _local1.teAmount) {
_local1.lvlRead((_local1.offTe + _local2) % _local1.teAmount);
_local2++;
}
};
levedRead = function (element, offset) {
var _local1 = this;
return(_local1.lvl[((_local1.lvlReadPointer - 4) + offset) % _local1.lvl.length][element]);
};
levedPrint = function () {
var _local2 = this;
var pos = (_local2.lvlReadPointer - 4);
var _local3 = 0;
var angle = 0;
var drawX = 125;
var drawY = 200;
var i = pos;
while (i < (pos + 12)) {
var _local1 = _root["block" + _local3];
if (i == pos) {
_local1.gotoAndStop(2);
} else {
_local1._alpha = 40;
}
var curve = _local2.lvl[i % _local2.lvl.length][0];
_local1._x = drawX;
_local1._y = drawY;
_local1._rotation = angle;
_local1.d0.gotoAndStop(_local2.lvl[i % _local2.lvl.length][1] + 1);
_local1.d1.gotoAndStop(_local2.lvl[i % _local2.lvl.length][2] + 1);
_local1.swapDepths(10000 - _local3);
angle = angle - curve;
drawY = drawY - (Math.cos((angle / 180) * 3.141593) * 15);
drawX = drawX + (Math.sin((angle / 180) * 3.141593) * 15);
_local3++;
i++;
}
var angle = 0;
var drawX = 125;
var drawY = 200;
var i = pos;
while (i > (pos - 12)) {
var _local1 = _root["block" + _local3];
if (i == pos) {
_local1.gotoAndStop(2);
} else {
_local1._alpha = 40;
}
var curve = _local2.lvl[i % _local2.lvl.length][0];
_local1._x = drawX;
_local1._y = drawY;
_local1._rotation = angle;
_local1.d0.gotoAndStop(_local2.lvl[i % _local2.lvl.length][1] + 1);
_local1.d1.gotoAndStop(_local2.lvl[i % _local2.lvl.length][2] + 1);
_local1.swapDepths(11000 + _local3);
angle = angle + curve;
drawY = drawY + (Math.cos((angle / 180) * 3.141593) * 15);
drawX = drawX - (Math.sin((angle / 180) * 3.141593) * 15);
_local3++;
i--;
}
};
Key.addListener(this);
this.onKeyDown = function () {
var _local1 = this;
var code = Key.getCode();
if ((code >= 48) && (code < 58)) {
_local1.levedInput = (_local1.levedInput + "") + (code - 48);
} else {
switch (code) {
case 220 :
_local1.levedInput = "";
return;
case 67 :
var _local2 = 0;
var polarity = 0;
polarity = int(_local1.levedRead(0, 0)) > 0;
while ((int(_local1.levedRead(0, _local2)) != 0) && (int(_local1.levedRead(0, _local2)) == polarity)) {
_local1.levedAlter(0, 0, 0, _local2);
_local2++;
}
_local2 = -1;
while ((int(_local1.levedRead(0, _local2)) != 0) && (int(_local1.levedRead(0, _local2)) == polarity)) {
_local1.levedAlter(0, 0, 0, _local2);
_local2--;
}
return;
case 68 :
_local1.levedDeko = int(_local1.levedInput);
return;
case 73 :
_local1.levedCurveIn = int(_local1.levedInput);
var curve = _local1.levedRead(0, 0);
_local2 = 0;
while (_local2 < _local1.levedCurveIn) {
var _local3 = Math.round(curve * ((_local1.levedCurveIn - _local2) / _local1.levedCurveIn));
_local1.levedAlter(0, 0, _local3, -1 * _local2);
_local2++;
}
return;
case 76 :
_local2 = 0;
while (_local2 < 24) {
_root.attachMovie("block", "block" + _local2, 100 + _local2);
_root["block" + _local2]._xscale = (_root["block" + _local2]._yscale = 200);
_local2++;
}
_local1.levedPrint();
return;
case 79 :
_local1.levedCurveOut = int(_local1.levedInput);
var curve = _local1.levedRead(0, 0);
_local2 = 0;
while (_local2 < _local1.levedCurveOut) {
var _local3 = Math.round(curve * ((_local1.levedCurveOut - _local2) / _local1.levedCurveOut));
_local1.levedAlter(0, 0, _local3, _local2);
_local2++;
}
return;
case 84 :
_local1.levedCurveThreshold = int(_local1.levedInput);
var curve = _local1.levedRead(0, 0);
_local2 = 0;
while (_local2 < _local1.levedCurveThreshold) {
_local1.levedAlter(0, 0, curve, _local2);
_local2++;
}
return;
case 88 :
var track = _local1.lvl;
_local2 = 0;
while (_local2 < track.length) {
var _loc2 = track[_local2];
_local2++;
}
return;
case 45 :
if (Key.isDown(16) && (Key.isDown(17))) {
_local1.levedDeko = _local1.levedRead(1, 0);
} else if (Key.isDown(16)) {
_local1.levedAlter(1, 1, 0);
_local1.levedDeko = _local1.levedRead(1, 0);
} else {
_local1.levedAlter(1, 0, int(_local1.levedDeko));
}
return;
case 33 :
if (Key.isDown(16) && (Key.isDown(17))) {
_local1.levedDeko = _local1.levedRead(2, 0);
} else if (Key.isDown(16)) {
_local1.levedAlter(2, 1, 0);
_local1.levedDeko = _local1.levedRead(2, 0);
} else {
_local1.levedAlter(2, 0, int(_local1.levedDeko));
}
return;
case 46 :
if (Key.isDown(16)) {
_local1.levedAlter(1, -1, 0);
_local1.levedDeko = _local1.levedRead(1, 0);
}
return;
case 34 :
if (Key.isDown(16)) {
_local1.levedAlter(2, -1, 0);
_local1.levedDeko = _local1.levedRead(2, 0);
}
return;
case 32 :
if (_local1.pl.vz == 0) {
_local1.pl.vz = 0.225;
} else {
_local1.pl.vz = 0;
}
return;
case 16 :
case 17 :
return;
}
}
};
}
Symbol 338 MovieClip Frame 2
draw();
Symbol 338 MovieClip Frame 3
gotoAndPlay (2);
Symbol 351 Button
on (release) {
_root.gotoAndPlay("startrr");
}
on (rollOver) {
_root.btn_sound.start(0, 1);
}
Symbol 352 Button
on (release) {
_root.submitScore();
}
on (rollOver) {
_root.btn_sound.start(0, 1);
}
Symbol 353 Button
on (release) {
_root.moregames();
}
on (rollOver) {
_root.btn_sound.start(0, 1);
}
Symbol 357 MovieClip Frame 1
_root.aaaa_txt._visible = false;
Instance of Symbol 228 MovieClip in Symbol 357 MovieClip Frame 6
on (release) {
getURL ("http://www.racinggames9.com", "_blank");
}
Symbol 357 MovieClip Frame 61
stop();
_root.aaaa_txt._visible = true;
Symbol 360 MovieClip Frame 1
gotoAndPlay (2);
Symbol 368 Button
on (release) {
trace("hello");
_root.submitScore1();
}
on (rollOver) {
_root.btn_sound.start(0, 1);
}
Symbol 369 MovieClip Frame 1
_root.aaaa_txt._visible = false;
Instance of Symbol 228 MovieClip in Symbol 369 MovieClip Frame 7
on (release) {
getURL ("http://www.racinggames9.com", "_blank");
}
Symbol 369 MovieClip Frame 61
stop();
_root.aaaa_txt._visible = true;
Symbol 385 Button
on (release) {
_root.gotoAndStop("startrr1");
}
Symbol 389 Button
on (release) {
_root.moregames();
}
Symbol 390 MovieClip Frame 60
stop();
Symbol 399 Button
on (release) {
_root.gotoAndStop("startrr1");
}
on (rollOver) {
_root.btn_sound.start(0, 1);
}
Symbol 400 MovieClip Frame 1
_root.abc_txt._visible = false;
Instance of Symbol 228 MovieClip in Symbol 400 MovieClip Frame 9
on (release) {
getURL ("http://www.racinggames9.com", "_blank");
}
Symbol 400 MovieClip Frame 61
stop();
_root.abc_txt._visible = true;
Symbol 414 Button
on (release) {
_root.gotoAndPlay("startrr");
}
on (rollOver) {
_root.btn_sound.start(0, 1);
}
Instance of Symbol 228 MovieClip in Symbol 415 MovieClip Frame 6
on (release) {
getURL ("http://www.racinggames9.com", "_blank");
}
Symbol 415 MovieClip Frame 61
stop();
Symbol 428 Button
on (release) {
_root.gotoAndStop("menu");
}
Symbol 429 Button
on (release) {
_root.moregames();
}
Symbol 430 MovieClip Frame 60
stop();