Frame 2
stot = this.getBytesTotal();
sloa = this.getBytesLoaded();
if (stot != 0) {
per = Math.floor((sloa / stot) * 100);
} else {
per = 0;
}
mc_bar.mc._x = mc_bar.mc._width * (-1 + (sloa / stot));
mc_bar.mc1._x = mc_bar.mc._width * (-1 + (sloa / stot));
txtPer = String(per) + "%";
if (((sloa >= 1) && (stot >= 1)) && (sloa == stot)) {
gotoAndPlay ("soundatta");
inMenuFirst();
} else {
gotoAndPlay (1);
}
Frame 11
var soundss = 1;
var ms = new Sound(_root.createEmptyMovieClip("ms1", 6010));
ms.attachSound("Menubg1");
ms.setVolume(75);
var pb = new Sound(_root.createEmptyMovieClip("play bg2", 7010));
pb.attachSound("play bg1");
var lcb = new Sound(_root.createEmptyMovieClip("level comp12", 8010));
lcb.attachSound("level comp1");
var cra = new Sound(_root.createEmptyMovieClip("crashbike1", 9010));
cra.attachSound("crashbike");
var eng = new Sound(_root.createEmptyMovieClip("engine11", 10010));
eng.attachSound("engine1");
var sou = new Sound();
sou.attachSound("button1");
var sou = new Sound();
sou.attachSound("points1");
var sou = new Sound();
sou.attachSound("title_s");
var sou = new Sound();
sou.attachSound("jeep_s");
var sou = new Sound();
sou.attachSound("splatter_s");
Frame 12
stop();
gc.gotoAndPlay(2);
var lvls = 1;
var scores = 0;
var lifee = 10;
var totascores = 0;
ms.setVolume(50);
ms.start(0, 2000);
sou.setVolume(50);
if (_root.soundss == 0) {
_root.mc_but.gotoAndStop(2);
} else {
_root.mc_but.gotoAndStop(1);
}
var playerDetails = SharedObject.getLocal("ride");
if (playerDetails.data.lev == undefined) {
playerDetails.data.lev = _root.lvls;
} else {
_root.lvls = playerDetails.data.lev;
}
Frame 13
stopAllSounds();
_root.ms.start(0, 1000);
ms.setVolume(100);
_root.bac.gotoAndPlay(2);
gc.gotoAndPlay(2);
Frame 14
stopAllSounds();
_root.ms.start(0, 1000);
_root.ms.setVolume(100);
_root.bac.gotoAndPlay(2);
Frame 15
this.stop();
stopAllSounds();
_root.pb.start(0, 1000);
_root.eng.setVolume(100);
_root.scoress = 0;
if (lifee == 0) {
_root.gotoAndStop("gameover");
}
if (lvls == 1) {
level = 1;
}
if (lvls == 2) {
level = 2;
}
if (lvls == 3) {
level = 3;
}
if (lvls == 3) {
level = 3;
}
if (lvls == 4) {
level = 4;
}
if (lvls == 5) {
level = 5;
}
if (lvls == 6) {
level = 6;
}
if (lvls == 7) {
level = 7;
}
if (lvls == 8) {
level = 8;
}
if (lvls == 9) {
level = 9;
}
if (lvls == 10) {
level = 10;
}
if (lvls == 11) {
level = 11;
}
if (lvls == 12) {
level = 12;
}
if (lvls == 13) {
level = 13;
}
if (lvls == 14) {
level = 14;
}
if (lvls == 15) {
level = 15;
}
Instance of Symbol 42 MovieClip "mc_control" in Frame 15
onClipEvent (load) {
this._parent.initLevel();
}
onClipEvent (keyDown) {
this._parent.keyPressed();
updateAfterEvent();
}
onClipEvent (enterFrame) {
this._parent.processGame();
}
Frame 17
stop();
_root.bac.gotoAndPlay(2);
stopAllSounds();
_root.lcb.start(0, 100);
_root.lcb.setVolume(100);
lvls++;
_root.playerDetails.data.lev = _root.lvls;
_root.scoress = _root.scores;
_root.totalscoress = _root.totascores + _root.scores;
_root.totascores = _root.totalscoress;
if (_root.lvls == 11) {
gotoAndStop ("gamewin");
}
Frame 18
stop();
stopAllSounds();
_root.bac.gotoAndPlay(2);
_root.lcb.start(0, 100);
_root.lcb.setVolume(100);
onEnterFrame = function () {
if (_root.lvls >= 1) {
_root.le1.gotoAndStop(2);
_root.le1.onRelease = function () {
_root.lvls = 1;
gotoAndStop ("carselection");
};
}
if (_root.lvls >= 2) {
_root.le2.gotoAndStop(2);
_root.le2.onRelease = function () {
_root.lvls = 2;
gotoAndStop ("carselection");
};
}
if (_root.lvls >= 3) {
_root.le3.gotoAndStop(2);
_root.le3.onRelease = function () {
_root.lvls = 3;
gotoAndStop ("carselection");
};
}
if (_root.lvls >= 4) {
_root.le4.gotoAndStop(2);
_root.le4.onRelease = function () {
_root.lvls = 4;
gotoAndStop ("carselection");
};
}
if (_root.lvls >= 5) {
_root.le5.gotoAndStop(2);
_root.le5.onRelease = function () {
_root.lvls = 5;
gotoAndStop ("carselection");
};
}
if (_root.lvls >= 6) {
_root.le6.gotoAndStop(2);
_root.le6.onRelease = function () {
_root.lvls = 6;
gotoAndStop ("carselection");
};
}
if (_root.lvls >= 7) {
_root.le7.gotoAndStop(2);
_root.le7.onRelease = function () {
_root.lvls = 7;
gotoAndStop ("carselection");
};
}
if (_root.lvls >= 8) {
_root.le8.gotoAndStop(2);
_root.le8.onRelease = function () {
_root.lvls = 8;
gotoAndStop ("carselection");
};
}
if (_root.lvls >= 9) {
_root.le9.gotoAndStop(2);
_root.le9.onRelease = function () {
_root.lvls = 9;
gotoAndStop ("carselection");
};
}
if (_root.lvls >= 10) {
_root.le10.gotoAndStop(2);
_root.le10.onRelease = function () {
_root.lvls = 10;
gotoAndStop ("carselection");
};
}
};
Frame 19
stop();
stopAllSounds();
_root.lcb.start(0, 100);
_root.lcb.setVolume(100);
_root.bac.gotoAndPlay(2);
Frame 20
stop();
stopAllSounds();
_root.lcb.start(0, 100);
_root.lcb.setVolume(100);
_root.bac.gotoAndPlay(2);
Symbol 23 Button
on (release) {
getURL ("http://www.gamescop.com", "_blank");
}
Symbol 41 MovieClip Frame 130
stop();
Symbol 381 MovieClip [__Packages.CWheel] Frame 0
class CWheel extends MovieClip
{
function CWheel () {
super();
}
function init(particle_, maxAccSpeed_, rad_) {
var _local2 = this;
_local2.particle = particle_;
_local2.rad = rad_;
_local2.maxAccSpeed = maxAccSpeed_ * 4;
_local2.speed = 0;
_local2.accSpeed = 0;
_local2.rot = new CVector2D(1, 0);
_local2.addedAcc = new CVector2D(0, 0);
_local2.intersectionFlag = false;
_local2.lastIntersPoint = new CVector2D(0, 0);
_local2.lastN = new CVector2D(0, 0);
var _local3;
var _local5;
var _local4 = 6.283185 / _local2.hitCount;
_local2.hitPointArray = new Array(_local2.hitCount);
_local2.normalArray = new Array(_local2.hitCount);
_local2.hitArray = new Array(_local2.hitCount);
_local2.intersArray = new Array();
_local3 = 0;
while (_local3 < _local2.hitCount) {
_local2.hitPointArray[_local3] = new CVector2D(Math.sin(_local4 * _local3) * _local2.rad, (-Math.cos(_local4 * _local3)) * _local2.rad);
_local2.normalArray[_local3] = _local2.hitPointArray[_local3].multNew(-1);
_local2.normalArray[_local3].normalize();
_local3++;
}
}
function process(dTime, acc, koeffDamp) {
var _local2 = this;
var _local3 = dTime;
_local2.accSpeed = Math.max(-_local2.maxAccSpeed, Math.min(_local2.maxAccSpeed, _local2.accSpeed + (acc * _local3)));
_local2.speed = Math.max((-_local2.maxSpeed) * _local3, Math.min((_local2.speed * koeffDamp) + _local2.accSpeed, _local2.maxSpeed * _local3));
_local2.rot.rotate(_local2.speed / _local2.rad);
_local2.mc.mc_rim._rotation = (Math.atan2(_local2.rot.y, _local2.rot.x) * 180) / 3.141593;
}
function checkCollision(hit_mc) {
var _local2 = this;
var _local10;
var _local7;
var _local8 = new CVector2D(0, 0);
var _local16 = false;
var _local3;
var _local4;
var _local17;
var _local18 = new CVector2D(_local2.particle.prevPos.x, _local2.particle.prevPos.y);
var _local5 = new CVector2D(0, 0);
var _local15;
_local2._x = _local2.particle.pos.x;
_local2._y = _local2.particle.pos.y;
_local15 = 0;
_local10 = 0;
while (_local10 < _local2.hitCount) {
_local2.hitPointArray[_local10].copyTo(_local8);
_local2.localToGlobal(_local8);
if ((_local2.hitArray[_local10] = hit_mc.hitTest(_local8.x, _local8.y, true))) {
_local16 = true;
_local3 = _local10;
_local15++;
}
_local10++;
}
if (_local15 == _local2.hitCount) {
_local2.particle.pos.x = _local2.particle.prevPos.x + ((_local2.particle.pos.x - _local2.particle.prevPos.x) * 0.3);
_local2.particle.pos.y = _local2.particle.prevPos.y + ((_local2.particle.pos.y - _local2.particle.prevPos.y) * 0.3);
_local2._x = _local2.particle.pos.x;
_local2._y = _local2.particle.pos.y;
return(undefined);
}
_local10 = 0;
if (_local16) {
while (true) {
_local10++;
if (_local10 == _local2.hitCount) {
_local10 = 0;
}
if (!_local2.hitArray[_local10]) {
_local3 = -1;
_local7 = 0;
while (_local7 < _local2.hitCount) {
_local10++;
if (_local10 == _local2.hitCount) {
_local10 = 0;
}
if (_local3 == -1) {
if (_local2.hitArray[_local10]) {
_local3 = _local10;
_local5.plus(_local2.normalArray[_local10]);
}
} else if (!_local2.hitArray[_local10]) {
_local4 = _local10 - 1;
if (_local4 < 0) {
_local4 = _local2.hitCount - 1;
}
_local2.intersArray.push({k1:_local3, k2:_local4});
_local3 = -1;
} else {
_local5.plus(_local2.normalArray[_local10]);
}
_local7++;
}
break;
}
}
var _local6 = new CVector2D(0, 0);
if (_local2.intersArray.length > 0) {
_local5.normalize();
if (_local2.intersectionFlag) {
_local5.x = _local5.x + _local2.lastN.x;
_local5.y = _local5.y + _local2.lastN.y;
_local5.x = _local5.x / 2;
_local5.y = _local5.y / 2;
}
var _local13;
var _local12;
_local17 = _local2.intersArray.length;
_local10 = 0;
while (_local10 < _local17) {
_local13 = _local2.intersArray.pop();
_local3 = _local13.k1;
_local4 = _local13.k2;
_local2.particle.pos.minusNew(_local2.particle.prevPos).copyTo(_local6);
if (_local5.scalar(_local6) < 0) {
_local12 = Math.atan2(_local5.y, _local5.x);
_local6.rotate(-_local12);
_local6.x = (-_local6.x) * _local2.koeffSpring;
_local6.rotate(_local12);
_local2.pushOut(_local3, _local4, hit_mc);
_local2.particle.prevPos.x = _local2.particle.pos.x - _local6.x;
_local2.particle.prevPos.y = _local2.particle.pos.y - _local6.y;
} else {
_local2.pushOut(_local3, _local4, hit_mc);
}
_local10++;
}
_local2.validateRotation(_local5, _local18);
_local2.intersectionFlag = true;
_local2.particle.pos.copyTo(_local2.lastIntersPoint);
_local5.copyTo(_local2.lastN);
}
} else if (_local2.intersectionFlag) {
_local2.validateRotation(_local2.lastN, _local18);
_local2.intersectionFlag = false;
}
_local2._x = _local2.particle.pos.x;
_local2._y = _local2.particle.pos.y;
}
function pushOut(k1, k2, hit_mc) {
var _local2 = this;
var _local3;
if (k1 != k2) {
_local3 = _local2.normalArray[k1].plusNew(_local2.normalArray[k2]);
_local3.normalize();
var _local8 = new CVector2D(0, 0).getDistanceTo(_local2.hitPointArray[k1], _local2.hitPointArray[k2]);
_local8 = _local2.rad - Math.abs(_local8);
_local2.particle.pos.plus(_local3.multNew(_local8));
_local2.particle.prevPos.plus(_local3.multNew(_local8));
return(undefined);
}
_local3 = _local2.normalArray[k1];
var _local7 = _local3.multNew(-_local2.rad);
var _local5 = new CVector2D(0, 0);
var _local6 = 0;
var _local4 = 0.03;
_local7.copyTo(_local5);
_local2.localToGlobal(_local5);
if (hit_mc.hitTest(_local5.x, _local5.y, true)) {
_local6++;
_local2._x = (_local2.particle.pos.x = _local2.particle.pos.x + (_local3.x * _local4));
_local2._y = (_local2.particle.pos.y = _local2.particle.pos.y + (_local3.y * _local4));
// unexpected jump
}
_local6--;
_local2.particle.pos.x = _local2.particle.pos.x - (_local3.x * _local4);
_local2.particle.pos.y = _local2.particle.pos.y - (_local3.y * _local4);
_local2.particle.prevPos.plus(_local3.multNew(_local4 * _local6));
return(undefined);
}
function validateRotation(n, oldPos) {
var _local2 = this;
if ((!_local2.intersectionFlag) && (Math.abs(_local2.accSpeed) > 0.01)) {
if (Math.abs(_local2.accSpeed) < ((_local2.maxAccSpeed * 0.02) / 2)) {
_local2.accSpeed = 0;
} else if (_local2.accSpeed > 0) {
_local2.accSpeed = _local2.maxAccSpeed * 0.02;
} else {
_local2.accSpeed = (-_local2.maxAccSpeed) * 0.02;
}
}
var _local4 = new CVector2D(-n.y, n.x);
var _local7 = _local2.particle.pos.minusNew(oldPos);
var _local6 = Math.atan2(_local4.y, _local4.x);
var _local3 = _local7.rotateNew(-_local6);
_local2.speed = _local3.x + _local2.accSpeed;
_local3.y = 0;
_local3.rotate(_local6);
var _local5 = 1 - _local2.koeffSlip;
_local2.particle.pos.x = (_local2.particle.pos.x + ((_local4.x * _local2.accSpeed) * _local5)) - ((1 - _local2.koeffFriction) * _local3.x);
_local2.particle.pos.y = (_local2.particle.pos.y + ((_local4.y * _local2.accSpeed) * _local5)) - ((1 - _local2.koeffFriction) * _local3.y);
_local2.accSpeed = _local2.accSpeed * _local2.koeffSlip;
}
function applyAddedAcc() {
var _local2 = this;
_local2.particle.acc.x = _local2.particle.acc.x + (_local2.addedAcc.x * _local2.particle.mass);
_local2.particle.acc.y = _local2.particle.acc.y + (_local2.addedAcc.y * _local2.particle.mass);
}
var maxSpeed = 180;
var koeffSpring = 0.05;
var koeffSlip = 0.15;
var koeffFriction = 0.97;
var hitCount = 32;
}
Symbol 382 MovieClip [__Packages.CVector2D] Frame 0
class CVector2D
{
var x, y;
function CVector2D (x_, y_) {
x = x_;
y = y_;
}
function reinit(x_, y_) {
x = x_;
y = y_;
}
function getUgol() {
return(Math.atan2(y, x));
}
function duplicate() {
return(new CVector2D(x, y));
}
function copyTo(v) {
v.x = x;
v.y = y;
}
function minus(v) {
x = x - v.x;
y = y - v.y;
}
function minusNew(v) {
return(new CVector2D(x - v.x, y - v.y));
}
function normalize() {
var _local2 = this;
var _local3 = Math.sqrt((_local2.x * _local2.x) + (_local2.y * _local2.y));
_local2.x = _local2.x / _local3;
_local2.y = _local2.y / _local3;
}
function reverseNew() {
return(new CVector2D(-x, -y));
}
function scalar(v) {
return((x * v.x) + (y * v.y));
}
function modul() {
var _local2 = this;
Math.sqrt((_local2.x * _local2.x) + (_local2.y * _local2.y));
return(Math.sqrt((_local2.x * _local2.x) + (_local2.y * _local2.y)));
}
function reflectFromNormal(n) {
var _local2 = this;
var _local3 = Math.atan2(n.y, n.x);
_local2.rotate(-_local3);
_local2.x = -_local2.x;
_local2.rotate(_local3);
}
function rotate(u) {
var _local3 = u;
var _local2 = this;
var _local5 = _local2.x;
var _local4 = _local2.y;
_local2.x = (_local5 * Math.cos(_local3)) - (_local4 * Math.sin(_local3));
_local2.y = (_local5 * Math.sin(_local3)) + (_local4 * Math.cos(_local3));
}
function rotateNew(u) {
var _local3 = u;
var _local2 = this;
new CVector2D((_local2.x * Math.cos(_local3)) - (_local2.y * Math.sin(_local3)), (_local2.x * Math.sin(_local3)) + (_local2.y * Math.cos(_local3)));
return(new CVector2D((_local2.x * Math.cos(_local3)) - (_local2.y * Math.sin(_local3)), (_local2.x * Math.sin(_local3)) + (_local2.y * Math.cos(_local3))));
}
function mult(k) {
x = x * k;
y = y * k;
}
function multNew(k) {
return(new CVector2D(x * k, y * k));
}
function plus(v) {
x = x + v.x;
y = y + v.y;
}
function plusNew(v) {
return(new CVector2D(x + v.x, y + v.y));
}
function getDistanceTo(p1, p2) {
var _local2 = p1;
var _local3 = _local2.y - p2.y;
var _local4 = p2.x - _local2.x;
var _local5 = (_local2.x * (p2.y - _local2.y)) - (_local2.y * (p2.x - _local2.x));
var _local6 = Math.sqrt((_local3 * _local3) + (_local4 * _local4));
_local3 = _local3 / _local6;
_local4 = _local4 / _local6;
_local5 = _local5 / _local6;
((_local3 * x) + (_local4 * y)) + _local5;
return(((_local3 * x) + (_local4 * y)) + _local5);
}
}
Symbol 383 MovieClip [__Packages.CMan] Frame 0
class CMan extends MovieClip
{
var stopFlag, state, mc;
function CMan () {
super();
stopFlag = false;
state = 0;
}
function stopAnim() {
stopFlag = true;
}
function stopMCAnim() {
mc.stop();
}
function startAnim() {
stopFlag = false;
}
function onEnterFrame() {
var _local2 = this;
if (_local2.stopFlag) {
return(undefined);
}
if (Key.isDown(LEFT_BUTTON)) {
_local2.toLeft();
return(undefined);
}
if (Key.isDown(RIGHT_BUTTON)) {
_local2.toRight();
return(undefined);
}
if ((_local2.state == 1) || (_local2.state == 2)) {
_local2.fromLeft();
return(undefined);
}
if ((_local2.state == 4) || (_local2.state == 5)) {
_local2.fromRight();
}
}
function toLeft() {
var _local2 = this;
var _local3;
if (_local2.state == 0) {
_local2.state = 1;
_local2.gotoAndStop("toLeft");
_local2.state = 1;
return(undefined);
}
if (_local2.state == 3) {
_local3 = _local2.mc._currentframe;
_local2.gotoAndStop("toLeft");
_local2.mc.gotoAndPlay((ANIM_FRAMES - _local3) + 1);
_local2.state = 1;
return(undefined);
}
if ((_local2.state == 4) || (_local2.state == 5)) {
_local2.fromRight();
_local2.state = 6;
}
}
function toRight() {
var _local2 = this;
var _local3;
if (_local2.state == 0) {
_local2.state = 1;
_local2.gotoAndStop("toRight");
_local2.state = 4;
return(undefined);
}
if (_local2.state == 6) {
_local3 = _local2.mc._currentframe;
_local2.gotoAndStop("toRight");
_local2.mc.gotoAndPlay((ANIM_FRAMES - _local3) + 1);
_local2.state = 4;
return(undefined);
}
if ((_local2.state == 1) || (_local2.state == 2)) {
_local2.fromLeft();
_local2.state = 3;
}
}
function fromLeft() {
var _local2 = this;
var _local3;
if (_local2.state == 1) {
_local3 = _local2.mc._currentframe;
_local2.gotoAndStop("fromLeft");
_local2.mc.gotoAndPlay((ANIM_FRAMES - _local3) + 1);
_local2.state = 3;
return(undefined);
}
if (_local2.state == 2) {
_local2.gotoAndStop("fromLeft");
_local2.state = 3;
}
}
function fromRight() {
var _local2 = this;
var _local3;
if (_local2.state == 4) {
_local3 = _local2.mc._currentframe;
_local2.gotoAndStop("fromRight");
_local2.mc.gotoAndPlay((ANIM_FRAMES - _local3) + 1);
_local2.state = 6;
return(undefined);
}
if (_local2.state == 5) {
_local2.gotoAndStop("fromRight");
_local2.state = 6;
}
}
function endMove() {
var _local2 = this;
if (_local2.state == 1) {
_local2.gotoAndStop("left");
_local2.state = 2;
return(undefined);
}
if (_local2.state == 3) {
_local2.state = 0;
_local2.gotoAndStop("stay");
return(undefined);
}
if (_local2.state == 4) {
_local2.state = 5;
_local2.gotoAndStop("right");
return(undefined);
}
if (_local2.state == 6) {
_local2.state = 0;
_local2.gotoAndStop("stay");
}
}
static var LEFT_BUTTON = 37;
static var RIGHT_BUTTON = 39;
static var ANIM_FRAMES = 7;
}
Symbol 384 MovieClip [__Packages.CParticleEngine] Frame 0
class CParticleEngine
{
var hit_mc, prevTime;
function CParticleEngine () {
}
function clear() {
var _local2 = this;
while (_local2.p_array.pop() != undefined) {
}
while (_local2.w_array.pop() != undefined) {
}
while (_local2.c_array.pop() != undefined) {
}
}
function setHitMovie(hit_mc_) {
hit_mc = hit_mc_;
}
function addParticle(p) {
p_array.push(p);
}
function addWheel(wheel, p, maxSpeed, radius) {
wheel.init(p, maxSpeed, radius);
w_array.push(wheel);
}
function addSpringConstraint(p1, p2, koeffStiff1, koeffStiff2) {
var _local2 = new CSpringConstraint(p1, p2, koeffStiff1, koeffStiff2);
c_array.push(_local2);
}
function start() {
prevTime = getTimer();
}
function computeForces() {
var _local3 = this;
var _local2;
var _local4 = _local3.p_array.length;
_local2 = 0;
while (_local2 < _local4) {
_local3.p_array[_local2].acc.x = 0;
_local3.p_array[_local2].acc.y = _local3.gravity * _local3.p_array[_local2].mass;
_local2++;
}
}
function clearForces() {
var _local4 = w_array.length;
var _local2;
var _local3;
_local2 = 0;
while (_local2 < _local4) {
_local3 = w_array[_local2];
_local3.addedAcc.x = (_local3.addedAcc.y = 0);
_local2++;
}
}
function applyManFrictions() {
var _local3 = this;
var _local4 = _local3.w_array.length;
var _local2;
_local2 = 0;
while (_local2 < _local4) {
_local3.w_array[_local2].applyAddedAcc();
_local2++;
}
}
function verlet(dTime) {
var _local3 = this;
var _local7 = 0.995;
var _local2;
var _local4 = _local3.p_array.length;
_local2 = 0;
while (_local2 < _local4) {
_local3.p_array[_local2].verlet(dTime, _local7);
_local2++;
}
_local4 = _local3.w_array.length;
var _local6 = 0;
if (Key.isDown(40)) {
_local6 = -0.6;
} else if (Key.isDown(38)) {
_local6 = 1;
}
_local2 = 0;
while (_local2 < _local4) {
_local3.w_array[_local2].process(dTime, (_local3.w_array[_local2].maxAccSpeed * _local6) / 3.2, 0.99);
_local2++;
}
}
function checkCollisions() {
var _local3 = this;
var _local2;
var _local4 = _local3.w_array.length;
_local2 = 0;
while (_local2 < _local4) {
_local3.w_array[_local2].checkCollision(_local3.hit_mc);
_local2++;
}
}
function checkConstraints(dTime) {
var _local3 = this;
var _local2;
var _local4 = _local3.c_array.length;
_local2 = 0;
while (_local2 < _local4) {
_local3.c_array[_local2].resolve(dTime);
_local2++;
}
}
function process() {
var _local2 = this;
var _local5 = getTimer();
var _local6 = (_local5 - _local2.prevTime) / 1000;
_local2.prevTime = _local5;
var _local3;
var _local4 = Math.min(Math.round(_local6 / _local2.t), _local2.maxSteps);
_local3 = 0;
while (_local3 < _local4) {
_local2.computeForces();
_local2.applyManFrictions();
_local2.verlet(_local2.t);
_local2.checkConstraints(_local2.t);
_local2.checkCollisions();
_local3++;
}
_local2.clearForces();
}
var p_array = new Array();
var w_array = new Array();
var c_array = new Array();
var t = 0.02;
var maxSteps = 2;
var gravity = 3.15;
}
Symbol 385 MovieClip [__Packages.CSpringConstraint] Frame 0
class CSpringConstraint
{
function CSpringConstraint (p1_, p2_, koeffStiffPress_, koeffStiffStretch_) {
var _local2 = this;
_local2.p1 = p1_;
_local2.p2 = p2_;
_local2.koeffStiffPress = koeffStiffPress_;
_local2.koeffStiffStretch = koeffStiffStretch_;
var _local3 = new CVector2D(_local2.p1.pos.x - _local2.p2.pos.x, _local2.p1.pos.y - _local2.p2.pos.y);
_local2.relaxLen = _local3.modul();
}
function resolve(dTime) {
var _local2 = this;
var _local3 = new CVector2D(_local2.p1.pos.x - _local2.p2.pos.x, _local2.p1.pos.y - _local2.p2.pos.y);
var _local5 = _local3.modul();
var _local6 = (_local2.relaxLen - _local5) / _local5;
_local3.mult(_local6);
var _local4;
if (_local5 > _local2.relaxLen) {
_local4 = _local2.koeffStiffStretch;
} else {
_local4 = _local2.koeffStiffPress;
}
_local2.p2.pos.x = _local2.p2.pos.x - (((_local3.x * ((_local2.p1.mass / (_local2.p1.mass + _local2.p2.mass)) + 1)) / 2) * _local4);
_local2.p2.pos.y = _local2.p2.pos.y - (((_local3.y * ((_local2.p1.mass / (_local2.p1.mass + _local2.p2.mass)) + 1)) / 6) * _local4);
_local2.p1.pos.x = _local2.p1.pos.x + (((_local3.x * ((_local2.p2.mass / (_local2.p1.mass + _local2.p2.mass)) + 1)) / 2) * _local4);
_local2.p1.pos.y = _local2.p1.pos.y + (((_local3.y * ((_local2.p2.mass / (_local2.p1.mass + _local2.p2.mass)) + 1)) / 6) * _local4);
}
}
Symbol 386 MovieClip [__Packages.CParticle] Frame 0
class CParticle
{
function CParticle (x_, y_, mass_) {
var _local2 = this;
_local2.pos = new CVector2D(x_, y_);
_local2.prevPos = _local2.pos.duplicate();
_local2.mass = mass_;
_local2.acc = new CVector2D(0, 0);
_local2.mc = null;
}
function verlet(dTime, koeffDamp) {
var _local2 = this;
var _local3 = _local2.pos.duplicate();
_local2.pos.x = _local2.pos.x + (((_local2.pos.x - _local2.prevPos.x) * koeffDamp) + (_local2.acc.x * dTime));
_local2.pos.y = _local2.pos.y + (((_local2.pos.y - _local2.prevPos.y) * koeffDamp) + (_local2.acc.y * dTime));
_local3.copyTo(_local2.prevPos);
if (_local2.mc != null) {
_local2.mc._x = _local2.pos.x;
_local2.mc._y = _local2.pos.y;
}
}
}
Symbol 387 MovieClip [__Packages.CCamera] Frame 0
class CCamera
{
function CCamera () {
}
function init(targetMovie_, levelMovie_) {
var _local2 = this;
_local2.targetMovie = targetMovie_;
_local2.levelMovie = levelMovie_;
_local2.process();
}
function process() {
var _local2 = this;
var _local3 = {x:_local2.targetMovie._x, y:_local2.targetMovie._y};
_local2.targetMovie._parent.localToGlobal(_local3);
_local2.levelMovie._parent.globalToLocal(_local3);
_local2.levelMovie._x = _local2.levelMovie._x + (SCREEN_WIDTH2 - _local3.x);
_local2.levelMovie._y = _local2.levelMovie._y + (SCREEN_HEIGHT2 - _local3.y);
_local2.levelMovie._x = Math.round(_local2.levelMovie._x);
_local2.levelMovie._y = Math.round(_local2.levelMovie._y);
if (_local2.levelMovie._x > 0) {
_local2.levelMovie._x = 0;
} else if ((_local2.levelMovie._x + _local2.levelMovie._width) < SCREEN_WIDTH) {
_local2.levelMovie._x = SCREEN_WIDTH - _local2.levelMovie._width;
}
if (_local2.levelMovie._y < 0) {
_local2.levelMovie._y = 0;
}
}
static var SCREEN_WIDTH = 500;
static var SCREEN_HEIGHT = 400;
static var SCREEN_WIDTH2 = SCREEN_WIDTH / 2;
static var SCREEN_HEIGHT2 = SCREEN_HEIGHT / 2;
}
Symbol 388 MovieClip [__Packages.CBack] Frame 0
class CBack
{
function CBack () {
}
function init(mc1_, mc2_, scaleFactor_) {
var _local2 = this;
_local2.mc1 = mc1_;
_local2.mc2 = mc2_;
_local2.scaleFactor = scaleFactor_;
}
function process(levelX) {
var _local2 = this;
var _local3 = levelX;
_local3 = Math.abs(Math.round(_local3) / _local2.scaleFactor) % _local2.mc1._width;
_local2.mc1._x = -_local3;
_local2.mc2._x = (_local2.mc1._x + _local2.mc1._width) - 1;
}
static var SCREEN_WIDTH = 500;
}
Symbol 389 MovieClip [__Packages.CBikeSynchronizer] Frame 0
class CBikeSynchronizer
{
function CBikeSynchronizer () {
var _local2 = this;
_local2.fdir = new CVector2D(0, 0);
_local2.fpos = new CVector2D(0, 0);
_local2.bdir = new CVector2D(0, 0);
_local2.bpos = new CVector2D(0, 0);
}
function init(mc_container, sX, sY) {
var _local2 = this;
var _local4 = mc_container;
var _local3 = {x:0, y:0};
_local2.mc_back_wheel = _local4.attachMovie("lib_back_wheel", "back_w", 2);
_local2.mc_forward_wheel = _local4.attachMovie("lib_forward_wheel", "forward_w", 1);
_local2.mc_bike = _local4.attachMovie("lib_bike_body", "body", 0);
_local2.mc_bike._x = sX;
_local2.mc_bike._y = sY;
_local3.x = _local2.mc_bike.mc.mc_s_wheel_back._x;
_local3.y = _local2.mc_bike.mc.mc_s_wheel_back._y;
_local2.mc_bike.mc.localToGlobal(_local3);
_local2.mc_bike._parent.globalToLocal(_local3);
_local2.mc_back_wheel._x = _local3.x;
_local2.mc_back_wheel._y = _local3.y;
_local3.x = _local2.mc_bike.mc.mc_s_wheel_forward._x;
_local3.y = _local2.mc_bike.mc.mc_s_wheel_forward._y;
_local2.mc_bike.mc.localToGlobal(_local3);
_local2.mc_bike._parent.globalToLocal(_local3);
_local2.mc_forward_wheel._x = _local3.x;
_local2.mc_forward_wheel._y = _local3.y;
}
function setParticles(pBody_, pBWheel_, pFWheel_) {
var _local2 = this;
_local2.pBody = pBody_;
_local2.pBWheel = pBWheel_;
_local2.pFWheel = pFWheel_;
_local2.fdir.reinit(_local2.mc_bike.mc.mc_f_point._x - _local2.mc_bike.mc.mc_s_wheel_forward._x, _local2.mc_bike.mc.mc_f_point._y - _local2.mc_bike.mc.mc_s_wheel_forward._y);
_local2.fdir.normalize();
_local2.fpos.x = _local2.mc_bike.mc.mc_f_spring._x + ((_local2.fdir.x * (-_local2.mc_bike.mc.mc_f_spring._y)) / _local2.fdir.y);
_local2.fpos.x = _local2.fpos.x - _local2.mc_bike.mc.mc_body_man._x;
_local2.bpos.reinit(_local2.mc_bike.mc.mc_b_spring.mc_top._x, _local2.mc_bike.mc.mc_b_spring.mc_top._y);
_local2.mc_bike.mc.mc_b_spring.localToGlobal(_local2.bpos);
_local2.bdir.reinit(_local2.bpos.x, _local2.bpos.y);
_local2.mc_bike.mc.mc_body_man.globalToLocal(_local2.bpos);
_local2.mc_bike.mc.globalToLocal(_local2.bdir);
_local2.bdir.x = _local2.bdir.x - _local2.mc_bike.mc.mc_b_spring._x;
_local2.bdir.y = _local2.bdir.y - _local2.mc_bike.mc.mc_b_spring._y;
}
function process() {
var _local2 = this;
var _local3 = {x:0, y:0};
var _local4;
_local2.mc_bike._x = _local2.pBody.pos.x;
_local2.mc_bike._y = _local2.pBody.pos.y;
_local4 = _local2.pFWheel.pos.minusNew(_local2.pBWheel.pos);
_local2.mc_bike._rotation = (Math.atan2(_local4.y, _local4.x) * 180) / 3.141593;
_local3.x = _local2.pFWheel.pos.x;
_local3.y = _local2.pFWheel.pos.y;
_local2.mc_bike._parent.localToGlobal(_local3);
_local2.mc_bike.mc.globalToLocal(_local3);
_local2.mc_bike.mc.mc_f_spring._x = _local3.x;
_local2.mc_bike.mc.mc_f_spring._y = _local3.y;
var _local5 = ((_local3.x + ((_local2.fdir.x * (-_local3.y)) / _local2.fdir.y)) - _local2.mc_bike.mc.mc_body_man._x) - _local2.fpos.x;
_local2.mc_bike.mc.mc_body_man._x = _local2.mc_bike.mc.mc_body_man._x + _local5;
_local3.x = _local2.mc_bike.mc.mc_f_spring.mc_spring._x;
_local3.y = _local2.mc_bike.mc.mc_f_spring.mc_spring._y;
_local2.mc_bike.mc.mc_f_spring.localToGlobal(_local3);
_local2.mc_bike.mc.globalToLocal(_local3);
_local3.x = _local2.pBWheel.pos.x;
_local3.y = _local2.pBWheel.pos.y;
_local2.mc_bike._parent.localToGlobal(_local3);
_local2.mc_bike.mc.globalToLocal(_local3);
_local2.mc_bike.mc.mc_b_spring._x = _local3.x;
_local2.mc_bike.mc.mc_b_spring._y = _local3.y;
_local4.reinit(_local2.bpos.x, _local2.bpos.y);
_local2.mc_bike.mc.mc_body_man.localToGlobal(_local4);
_local2.mc_bike.mc.globalToLocal(_local4);
_local4.x = _local4.x - _local2.mc_bike.mc.mc_b_spring._x;
_local4.y = _local4.y - _local2.mc_bike.mc.mc_b_spring._y;
_local2.mc_bike.mc.mc_b_spring._rotation = ((_local4.getUgol() - _local2.bdir.getUgol()) * 180) / 3.141593;
}
}
Symbol 77 MovieClip Frame 1
stop();
Symbol 80 MovieClip Frame 1
stop();
Symbol 83 MovieClip Frame 1
stop();
Symbol 86 MovieClip Frame 1
stop();
Symbol 87 MovieClip Frame 1
stop();
Symbol 87 MovieClip Frame 2
stop();
Symbol 87 MovieClip Frame 3
stop();
Symbol 87 MovieClip Frame 4
stop();
Symbol 95 MovieClip [lib_man] Frame 1
#initclip 12
Object.registerClass("lib_man", CMan);
#endinitclip
this.stop();
Symbol 97 MovieClip Frame 1
jeep.gotoAndStop(_root.jeepselection);
Symbol 104 MovieClip [lib_back_wheel] Frame 1
#initclip 10
Object.registerClass("lib_back_wheel", CWheel);
#endinitclip
gotoAndStop(_root.jeepselection);
stop();
Symbol 104 MovieClip [lib_back_wheel] Frame 2
stop();
Symbol 104 MovieClip [lib_back_wheel] Frame 3
stop();
Symbol 104 MovieClip [lib_back_wheel] Frame 4
stop();
Symbol 105 MovieClip [lib_forward_wheel] Frame 1
#initclip 11
Object.registerClass("lib_forward_wheel", CWheel);
#endinitclip
stop();
gotoAndStop(_root.jeepselection);
Symbol 105 MovieClip [lib_forward_wheel] Frame 2
stop();
Symbol 105 MovieClip [lib_forward_wheel] Frame 3
stop();
Symbol 105 MovieClip [lib_forward_wheel] Frame 4
stop();
Symbol 106 MovieClip Frame 1
#initclip 13
function updateSoundLoop() {
if (!stopSoundFlag) {
if (zastSoundFlag) {
mc_sloop.gotoAndStop(3);
mc_sloop_zast.gotoAndStop(2);
} else {
mc_sloop.gotoAndStop(2);
mc_sloop_zast.gotoAndStop(3);
}
}
}
function soundOff() {
if (zastSoundFlag) {
mc_sloop_zast.gotoAndStop(3);
} else {
mc_sloop.gotoAndStop(3);
}
stopSoundFlag = true;
}
function soundOn() {
if (zastSoundFlag) {
mc_sloop_zast.gotoAndStop(2);
} else {
mc_sloop.gotoAndStop(2);
}
stopSoundFlag = false;
}
function gameStart() {
scores = 0;
timeCounter = 0;
stargeted = 0;
life = 10;
zastSoundFlag = false;
updateSoundLoop();
level = 0;
nextLevel();
}
function nextLevel() {
stargeted = 0;
levelTimeCounter = 0;
if (level == 10) {
newGame();
return(undefined);
}
level++;
this.gotoAndStop("reset");
this.gotoAndStop("game");
}
function replay() {
stargeted = 0;
this.gotoAndStop("reset");
this.gotoAndStop("game");
}
function newGame() {
stargeted = 0;
zastSoundFlag = true;
updateSoundLoop();
this.gotoAndStop("main");
}
function playSnd(lib_snd) {
s = new Sound(this);
s.attachSound(lib_snd);
s.start();
}
function initLevel() {
lastTimer = getTimer();
mc_level.mc_minimap._visible = true;
mc_level.mc_minimap.mc_stage.gotoAndStop(level);
if (level > 1) {
var _local1 = 1;
while (_local1 < level) {
mc_level.mc_minimap["s" + _local1].gotoAndStop(2);
_local1++;
}
}
mc_level.mc_minimap["s" + level].gotoAndStop(3);
mc_level.gotoAndStop(level);
mc_level.mc.mc_hit._visible = false;
if (bikeSync == null) {
bikeSync = new CBikeSynchronizer();
engine = new CParticleEngine();
objCamera = new CCamera();
back1 = new CBack();
back2 = new CBack();
} else {
engine.clear();
}
back1.init(mc_level.mc.mc_fon.mc_grass.mc1, mc_level.mc.mc_fon.mc_grass.mc2, 1);
back2.init(mc_level.mc.mc_fon.mc_hill.mc1, mc_level.mc.mc_fon.mc_hill.mc2, 2);
bikeSync.init(mc_level.mc.mc_bike, 0, 0);
var _local4 = new CParticle(bikeSync.mc_back_wheel._x, bikeSync.mc_back_wheel._y, 3);
engine.addParticle(_local4);
engine.addWheel(bikeSync.mc_back_wheel, _local4, 18.5, 17.5);
var _local2 = new CParticle(bikeSync.mc_forward_wheel._x, bikeSync.mc_forward_wheel._y, 3);
engine.addParticle(_local2);
engine.addWheel(bikeSync.mc_forward_wheel, _local2, 5, 17.5);
var _local3 = new CParticle(bikeSync.mc_bike._x, bikeSync.mc_bike._y, 3);
_local3.mc = mc_level.mc.mc_bike.mc_test;
engine.addParticle(_local3);
engine.addSpringConstraint(_local4, _local2, 0.45, 0.5);
engine.addSpringConstraint(_local4, _local3, 0.45, 0.55);
engine.addSpringConstraint(_local3, _local2, 0.45, 0.7);
bikeSync.setParticles(_local3, _local4, _local2);
objCamera.init(bikeSync.mc_bike, mc_level.mc);
engine.setHitMovie(mc_level.mc.mc_hit);
engine.start();
accFlag = false;
accCounter = 50;
if (!stopSoundFlag) {
mc_sloop.gotoAndStop(2);
}
mc_messageF.gotoAndStop(1);
mc_messageF.mc_message.gotoAndStop("empty");
gameState = 0;
var _local1 = 1;
while (_local1 <= 10) {
mc_level.mc["s" + _local1].gotoAndStop(Math.floor((Math.random() * 3) + 1));
_local1++;
}
}
function processGame() {
var _local7;
var _local6;
_local7 = getTimer();
_local6 = _local7 - lastTimer;
txtFps = 1 / (_local6 / 1000);
lastTimer = _local7;
if (gameState == 0) {
timeCounter = timeCounter + _local6;
levelTimeCounter = levelTimeCounter + _local6;
showTime();
var _local9 = 0;
var _local8 = 0;
var _local3;
var _local5;
accCounter++;
if (!accFlag) {
accFlag = Key.isDown(38);
if (accFlag && (accCounter > 10)) {
accCounter = 0;
if (!stopSoundFlag) {
mc_gas.gotoAndPlay(2);
}
}
} else {
accFlag = Key.isDown(38);
}
if (Key.isDown(CMan.LEFT_BUTTON)) {
_local3 = calcBikeNVector();
if (_local3.y > 0) {
_local5 = (Math.abs(_local3.y) * 0.2) + 0.8;
bikeSync.mc_forward_wheel.addedAcc.x = bikeSync.mc_forward_wheel.addedAcc.x - (((_local3.x * engine.gravity) / 1.1) * _local5);
bikeSync.mc_forward_wheel.addedAcc.y = bikeSync.mc_forward_wheel.addedAcc.y - (((_local3.y * engine.gravity) * 1.3) * _local5);
bikeSync.mc_back_wheel.addedAcc.x = bikeSync.mc_back_wheel.addedAcc.x + (((_local3.x * engine.gravity) / 1.5) * _local5);
bikeSync.mc_back_wheel.addedAcc.y = bikeSync.mc_back_wheel.addedAcc.y + ((_local3.y * engine.gravity) * _local5);
}
} else if (Key.isDown(CMan.RIGHT_BUTTON)) {
_local3 = calcBikeNVector();
if (_local3.y > 0) {
_local5 = (Math.abs(_local3.y) * 0.2) + 0.8;
bikeSync.mc_forward_wheel.addedAcc.x = bikeSync.mc_forward_wheel.addedAcc.x + (((_local3.x * engine.gravity) / 1.5) * _local5);
bikeSync.mc_forward_wheel.addedAcc.y = bikeSync.mc_forward_wheel.addedAcc.y + ((_local3.y * engine.gravity) * _local5);
bikeSync.mc_back_wheel.addedAcc.x = bikeSync.mc_back_wheel.addedAcc.x - (((_local3.x * engine.gravity) / 1.1) * _local5);
bikeSync.mc_back_wheel.addedAcc.y = bikeSync.mc_back_wheel.addedAcc.y - (((_local3.y * engine.gravity) * 1.3) * _local5);
}
}
engine.process();
bikeSync.process();
objCamera.process();
back1.process(mc_level.mc._x);
back2.process(mc_level.mc._x);
mc_level.mc.mc_fon._x = -mc_level.mc._x;
var _local1 = 1;
while (_local1 <= 20) {
if (((mc_level.mc["s" + _local1]._visible == true) && (bikeSync.mc_bike.hitTest(mc_level.mc["s" + _local1]))) && (!mc_level.mc["s" + _local1].bikehit)) {
mc_level.mc["s" + _local1].bikehit = true;
mc_level.mc["s" + _local1].pio.gotoAndPlay(2);
}
_local1++;
}
if (((bikeSync.mc_bike._x + mc_level.mc.mc_bike._x) >= mc_level.mc.mc_finish._x) && (stargeted >= 3)) {
if (!stopSoundFlag) {
mc_sloop.gotoAndStop(3);
}
if (level <= 10) {
gotoAndStop ("comple");
gameState = 2;
} else {
mc_messageF.mc_message.gotoAndStop("gamewin");
gameState = 3;
}
addLevelScores();
mc_messageF.mc_message.levelTime = getTimeString(levelTimeCounter);
mc_messageF.mc_message.commonTime = getTimeString(timeCounter);
mc_messageF.mc_message.scores = scores;
bikeSync.mc_bike.mc.mc_body_man.mc.stopAnim();
bikeSync.mc_bike.mc.mc_body_man.mc.stopMCAnim();
return(undefined);
}
var _local2 = {x:0, y:0};
var _local4 = bikeSync.mc_bike.mc.mc_body_man.mc.mc.h;
_local2.x = _local4.p._x;
_local2.y = _local4.p._y;
_local4.localToGlobal(_local2);
if (mc_level.mc.mc_hit.hitTest(_local2.x, _local2.y, true)) {
loose();
return(undefined);
}
_local4 = bikeSync.mc_bike.mc.mc_body_man.mc.mc.b;
_local2.x = _local4.p._x;
_local2.y = _local4.p._y;
_local4.localToGlobal(_local2);
if (mc_level.mc.mc_hit.hitTest(_local2.x, _local2.y, true)) {
loose();
return(undefined);
}
_local4 = bikeSync.mc_bike.mc.mc_body_man.mc.mc.l;
_local2.x = _local4.p._x;
_local2.y = _local4.p._y;
_local4.localToGlobal(_local2);
if (mc_level.mc.mc_hit.hitTest(_local2.x, _local2.y, true)) {
loose();
}
}
}
function showTime() {
txtTime = getTimeString(timeCounter);
}
function getTimeString(time) {
var _local1 = Math.round(time / 1000);
var _local2 = Math.floor(_local1 / 60);
_local1 = _local1 - (_local2 * 60);
var _local3;
var _local4;
if (_local1 < 10) {
_local4 = "0" + _local1;
} else {
_local4 = "" + _local1;
}
if (_local2 < 10) {
_local3 = "0" + _local2;
} else {
_local3 = "" + _local2;
}
(_local3 + ":") + _local4;
return((_local3 + ":") + _local4);
}
function resume() {
if (!stopSoundFlag) {
mc_sloop.gotoAndStop(2);
}
mc_messageF.gotoAndStop(1);
mc_messageF.mc_message.gotoAndStop("empty");
bikeSync.mc_bike.mc.mc_body_man.mc.startAnim();
gameState = 0;
}
function pauseGame() {
if (!stopSoundFlag) {
mc_sloop.gotoAndStop(3);
}
mc_messageF.mc_message.gotoAndStop("pause");
bikeSync.mc_bike.mc.mc_body_man.mc.stopAnim();
gameState = 4;
}
function loose() {
if (!stopSoundFlag) {
mc_sloop.gotoAndStop(3);
}
if (!stopSoundFlag) {
playSnd("lib_snd_fail");
}
mc_messageF.gotoAndPlay(2);
_root.life--;
bikeSync.mc_back_wheel._x = bikeSync.mc_back_wheel._x + 1000;
bikeSync.mc_forward_wheel._x = bikeSync.mc_forward_wheel._x + 1000;
_root.bikeSync.mc_bike.mc.jeep.car1.gotoAndPlay(2);
_root.bikeSync.mc_bike.mc.jeep.car2.gotoAndPlay(2);
_root.bikeSync.mc_bike.mc.jeep.car3.gotoAndPlay(2);
_root.crash.gotoAndPlay(2);
_root.scores = 0;
mc_messageF.mc_message.levelTime = getTimeString(levelTimeCounter);
mc_messageF.mc_message.commonTime = getTimeString(timeCounter);
mc_messageF.mc_message.scores = scores;
bikeSync.mc_bike.mc.mc_body_man.mc.stopAnim();
bikeSync.mc_bike.mc.mc_body_man.mc.stopMCAnim();
gameState = 1;
}
function calcBikeNVector() {
var _local1;
_local1 = bikeSync.mc_forward_wheel.particle.pos.minusNew(bikeSync.mc_back_wheel.particle.pos);
_local1.normalize();
var _local2;
_local2 = _local1.x;
_local1.x = -_local1.y;
_local1.y = _local2;
return(_local1);
}
var lastTimer;
var level;
var stopSoundFlag = false;
var bikeSync = null;
var engine = null;
var objCamera = null;
var back1 = null;
var back2 = null;
var gameState;
var zastSoundFlag = true;
var accFlag;
var accCounter;
var timeCounter;
var levelTimeCounter;
var scores;
var highQuality = true;
var life = 10;
var stargeted;
#endinitclip
Symbol 130 Button
on (release) {
_root.gotoAndStop("help");
}
on (rollOver) {
sta.gotoAndPlay(2);
}
on (rollOut) {
sta.gotoAndPlay(7);
}
Symbol 131 Button
on (release) {
_root.gotoAndStop("level selection");
}
on (rollOver) {
con.gotoAndPlay(2);
}
on (rollOut) {
con.gotoAndPlay(7);
}
Symbol 132 Button
on (release) {
_root.gotoAndStop("help");
}
on (rollOver) {
hel.gotoAndPlay(2);
}
on (rollOut) {
hel.gotoAndPlay(11);
}
Symbol 133 Button
on (rollOver) {
hig.gotoAndPlay(2);
}
on (rollOut) {
hig.gotoAndPlay(7);
}
on (release) {
getURL ("http://www.gamescop.com/category/6/racing-games.html", "_blank");
}
Symbol 134 Button
on (release) {
getURL ("http://www.gamescop.com", "_blank");
}
on (rollOver) {
mor.gotoAndPlay(2);
}
on (rollOut) {
mor.gotoAndPlay(7);
}
Symbol 135 MovieClip Frame 1
stop();
Symbol 135 MovieClip Frame 6
stop();
Symbol 136 MovieClip Frame 51
stop();
Symbol 137 MovieClip Frame 1
stop();
Symbol 144 Button
on (release) {
_root.sou.setVolume(0);
_root.pb.setVolume(0);
_root.ms.setVolume(0);
_root.lcb.setVolume(0);
gotoAndStop (2);
_root.soundss = 0;
}
Symbol 160 MovieClip Frame 10
gotoAndPlay(random(95));
Symbol 160 MovieClip Frame 28
gotoAndPlay(random(95));
Symbol 160 MovieClip Frame 48
gotoAndPlay(random(95));
Symbol 160 MovieClip Frame 61
gotoAndPlay(random(95));
Symbol 160 MovieClip Frame 75
gotoAndPlay(random(95));
Symbol 160 MovieClip Frame 80
gotoAndPlay(random(95));
Symbol 160 MovieClip Frame 90
gotoAndPlay(random(95));
Symbol 163 Button
on (release) {
_root.sou.setVolume(100);
_root.pb.setVolume(50);
_root.ms.setVolume(50);
_root.lcb.setVolume(100);
gotoAndStop (1);
_root.soundss = 1;
}
Symbol 165 MovieClip Frame 1
stop();
onEnterFrame = function () {
_root.sou.setVolume(100);
_root.pb.setVolume(50);
_root.ms.setVolume(50);
_root.lcb.setVolume(100);
_root.eng.setVolume(100);
_root.soundss = 1;
};
Symbol 165 MovieClip Frame 2
stop();
onEnterFrame = function () {
_root.sou.setVolume(0);
_root.pb.setVolume(0);
_root.ms.setVolume(0);
_root.lcb.setVolume(0);
_root.eng.setVolume(0);
_root.soundss = 0;
};
Symbol 172 MovieClip Frame 22
stop();
Symbol 176 MovieClip Frame 1
stop();
Symbol 176 MovieClip Frame 13
stop();
Symbol 176 MovieClip Frame 24
gotoAndStop (2);
Symbol 178 Button
on (rollOver) {
je3.gotoAndPlay(2);
}
on (rollOut) {
je3.gotoAndPlay(14);
}
on (release) {
_root.jeepselection = 3;
_root.jee.gotoAndStop(3);
}
Symbol 179 MovieClip Frame 40
stop();
if (_root.lvls >= 4) {
gotoAndStop (41);
} else {
stop();
}
Symbol 179 MovieClip Frame 41
stop();
Symbol 180 MovieClip Frame 1
stop();
Symbol 180 MovieClip Frame 13
stop();
Symbol 181 Button
on (rollOver) {
je1.gotoAndPlay(2);
}
on (rollOut) {
je1.gotoAndPlay(14);
}
on (release) {
_root.jeepselection = 1;
_root.jee.gotoAndStop(1);
}
Symbol 182 MovieClip Frame 40
stop();
Symbol 185 MovieClip Frame 1
stop();
Symbol 185 MovieClip Frame 13
stop();
Symbol 186 Button
on (rollOver) {
je2.gotoAndPlay(2);
}
on (rollOut) {
je2.gotoAndPlay(14);
}
on (release) {
_root.jeepselection = 2;
_root.jee.gotoAndStop(2);
}
Symbol 187 MovieClip Frame 35
stop();
Symbol 189 MovieClip Frame 1
stop();
Symbol 189 MovieClip Frame 13
stop();
Symbol 190 Button
on (rollOver) {
je4.gotoAndPlay(2);
}
on (rollOut) {
je4.gotoAndPlay(14);
}
on (release) {
_root.jeepselection = 4;
_root.jee.gotoAndStop(4);
}
Symbol 191 MovieClip Frame 40
stop();
if (_root.lvls >= 7) {
gotoAndStop (41);
} else {
stop();
}
Symbol 191 MovieClip Frame 41
stop();
Symbol 193 MovieClip Frame 31
stop();
Symbol 194 Button
on (release) {
gameStart();
}
on (rollOver) {
con.gotoAndPlay(2);
}
on (rollOut) {
con.gotoAndPlay(7);
}
Symbol 195 MovieClip Frame 1
stop();
Symbol 195 MovieClip Frame 2
stop();
Symbol 195 MovieClip Frame 3
stop();
Symbol 195 MovieClip Frame 4
stop();
Symbol 202 MovieClip Frame 30
stop();
Symbol 203 MovieClip Frame 1
stop();
Symbol 203 MovieClip Frame 10
stop();
Symbol 211 MovieClip Frame 1
stop();
Symbol 211 MovieClip Frame 2
stop();
Symbol 211 MovieClip Frame 3
stop();
Symbol 212 MovieClip Frame 1
Symbol 236 MovieClip Frame 15
stop();
Symbol 237 MovieClip Frame 1
stop();
Symbol 237 MovieClip Frame 8
_root.stargeted = ++_root.stargeted;
_root.scores = _root.scores + 100;
_root.scoress = _root.scores;
Symbol 237 MovieClip Frame 9
stop();
Symbol 238 MovieClip Frame 1
stop();
Symbol 240 MovieClip Frame 1
var bgss = (1 + random(2));
bg.gotoAndStop(bgss);
Symbol 320 Button
on (release) {
getURL ("http://www.cargames9.co.uk", "_blank");
}
Symbol 335 MovieClip Frame 90
stop();
Symbol 344 MovieClip Frame 1
stop();
Symbol 344 MovieClip Frame 2
stopAllSounds();
_root.cra.start(0, 1);
Symbol 344 MovieClip Frame 60
_root.so.gotoAndStop(1);
_root.gc.gotoAndPlay("start1");
onEnterFrame = function () {
_root.lifee = _root.lifee - 1;
_root.replay();
};
Symbol 348 Button
on (release) {
if (_root.lvls == 4) {
gotoAndStop ("carselection");
} else if (_root.lvls == 7) {
gotoAndStop ("carselection");
} else {
gameStart();
}
}
on (rollOver) {
nex.gotoAndPlay(2);
}
on (rollOut) {
nex.gotoAndPlay(7);
}
Symbol 350 MovieClip Frame 32
stop();
Symbol 362 MovieClip Frame 1
stop();
Symbol 362 MovieClip Frame 2
stop();
Symbol 367 MovieClip Frame 29
stop();
Symbol 371 Button
on (release) {
_root.gotoAndStop("main");
}
on (rollOver) {
men.gotoAndPlay(2);
}
on (rollOut) {
men.gotoAndPlay(7);
}
Symbol 373 MovieClip Frame 30
stop();
Symbol 377 Button
on (release) {
getURL ("http://www.gamescop.com", "_blank");
}
Symbol 379 MovieClip Frame 31
stop();