Frame 1
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
var pv;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
pv = ((fv == 5) ? (getVersion()) : (System.capabilities.version));
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=8&fv=") + fv) + "&v=") + escape(pv)) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
__com_mochibot__("670e95f9", this, 10301, true);
stop();
Instance of Symbol 121 MovieClip "m_loadingBar" in Frame 1
onClipEvent (load) {
var percent = 0;
var numPercentage = 0;
}
onClipEvent (enterFrame) {
if ((_parent.getBytesLoaded() > 1) && (_parent.getBytesTotal() > 1)) {
numPercentage = Math.floor((100 * _parent.getBytesLoaded()) / _parent.getBytesTotal());
if (percent >= 101) {
_parent.gotoAndStop("lbStart");
}
if (numPercentage > percent) {
percent++;
this.gotoAndStop(1 + Math.floor(1.45 * percent));
this.txtPercentage = String(percent) + "%";
if (percent >= 100) {
percent++;
}
}
}
}
Instance of Symbol 124 MovieClip in Frame 1
on (release) {
CGame.butPlayMoreGames();
}
Symbol 9 MovieClip [raceLoop] Frame 1
stop();
Symbol 10 MovieClip [dmSoundService] Frame 1
#initclip 41
Object.registerClass("dmSoundService", CSoundService);
#endinitclip
Symbol 16 MovieClip [loopPlace9] Frame 1
#initclip 24
Object.registerClass("loopPlace9", LoopBonus);
#endinitclip
Symbol 17 MovieClip [loopPlace10] Frame 1
#initclip 25
Object.registerClass("loopPlace10", LoopBonus);
#endinitclip
Symbol 18 MovieClip [loopPlace8] Frame 1
#initclip 26
Object.registerClass("loopPlace8", LoopBonus);
#endinitclip
Symbol 19 MovieClip [loopPlace7] Frame 1
#initclip 27
Object.registerClass("loopPlace7", LoopBonus);
#endinitclip
Symbol 20 MovieClip [loopPlace6] Frame 1
#initclip 28
Object.registerClass("loopPlace6", LoopBonus);
#endinitclip
Symbol 21 MovieClip [loopPlace 4] Frame 1
#initclip 29
Object.registerClass("loopPlace 4", LoopBonus);
#endinitclip
Symbol 22 MovieClip [loopPlace5] Frame 1
#initclip 30
Object.registerClass("loopPlace5", LoopBonus);
#endinitclip
Symbol 23 MovieClip [loopPlace3] Frame 1
#initclip 31
Object.registerClass("loopPlace3", LoopBonus);
#endinitclip
Symbol 24 MovieClip [loopPlace2] Frame 1
#initclip 32
Object.registerClass("loopPlace2", LoopBonus);
#endinitclip
Symbol 25 MovieClip [loopPlace] Frame 1
#initclip 33
Object.registerClass("loopPlace", LoopBonus);
#endinitclip
Symbol 26 MovieClip [loopPlace 1] Frame 1
#initclip 34
Object.registerClass("loopPlace 1", LoopBonus);
#endinitclip
Symbol 35 MovieClip [Symbol 9рпор] Frame 1
#initclip 35
Object.registerClass("Symbol 9\u0440\u043F\u043E\u0440", CarIcon);
#endinitclip
Symbol 41 MovieClip [Symbol 7орпо] Frame 1
#initclip 36
Object.registerClass("Symbol 7\u043E\u0440\u043F\u043E", CarIcon);
#endinitclip
Symbol 46 MovieClip [Symbol 8орпо] Frame 1
#initclip 37
Object.registerClass("Symbol 8\u043E\u0440\u043F\u043E", CarIcon);
#endinitclip
Symbol 52 MovieClip [Symbol 10опро] Frame 1
#initclip 38
Object.registerClass("Symbol 10\u043E\u043F\u0440\u043E", CarIcon);
#endinitclip
Symbol 62 Button
on (release) {
getURL (CConstant.URL_GAME, "_blank");
}
Symbol 65 MovieClip [Symbol 11опро] Frame 1
#initclip 39
Object.registerClass("Symbol 11\u043E\u043F\u0440\u043E", CarIcon);
#endinitclip
Instance of Symbol 64 MovieClip "info" in Symbol 65 MovieClip [Symbol 11опро] Frame 2
onClipEvent (load) {
if (CConstant.checkURL(_root._url)) {
_visible = false;
} else {
_visible = true;
}
}
Symbol 85 Button
on (press) {
CSoundService.playSound(CConstant.SND_CLICK);
}
Symbol 86 MovieClip [select_car] Frame 1
#initclip 40
Object.registerClass("select_car", SelectedCar);
#endinitclip
Instance of Symbol 65 MovieClip [Symbol 11опро] "koen" in Symbol 86 MovieClip [select_car] Frame 1
onClipEvent (load) {
this.type = CConstant.CAR_KOENIGSEGG;
}
Instance of Symbol 52 MovieClip [Symbol 10опро] "ford" in Symbol 86 MovieClip [select_car] Frame 1
onClipEvent (load) {
this.type = CConstant.CAR_FORD_GT;
}
Instance of Symbol 46 MovieClip [Symbol 8орпо] "porsche" in Symbol 86 MovieClip [select_car] Frame 1
onClipEvent (load) {
this.type = CConstant.CAR_PORSCHE_CARRERA;
}
Instance of Symbol 41 MovieClip [Symbol 7орпо] "aston" in Symbol 86 MovieClip [select_car] Frame 1
onClipEvent (load) {
this.type = CConstant.CAR_ASTON_MARTIN;
}
Instance of Symbol 35 MovieClip [Symbol 9рпор] "ferrari" in Symbol 86 MovieClip [select_car] Frame 1
onClipEvent (load) {
this.type = CConstant.CAR_FERRARI_458;
}
Instance of Symbol 101 MovieClip "mc_effect" in Symbol 102 MovieClip [idAstonMartinWheel] Frame 1
onClipEvent (load) {
this._visible = false;
}
Symbol 121 MovieClip Frame 146
stop();
Symbol 704 MovieClip [__Packages.iriysoft.pengine.constraint.CBoxConstrainSkeleton] Frame 0
class iriysoft.pengine.constraint.CBoxConstrainSkeleton
{
var m_A, m_B, m_C, m_D, m_AB, m_AC, m_AD, m_BC, m_BD, m_CD, m_ABC, m_DCB;
function CBoxConstrainSkeleton () {
}
function init(a, b, c, d, ab, ac, ad, bc, bd, cd) {
m_A = a;
m_B = b;
m_C = c;
m_D = d;
m_AB = ab;
m_AB.__set__p1(a);
m_AB.__set__p2(b);
m_AC = ac;
m_AC.__set__p1(a);
m_AC.__set__p2(c);
m_AD = ad;
m_AD.__set__p1(a);
m_AD.__set__p2(d);
m_BC = bc;
m_BC.__set__p1(b);
m_BC.__set__p2(c);
m_BD = bd;
m_BD.__set__p1(b);
m_BD.__set__p2(d);
m_CD = cd;
m_CD.__set__p1(c);
m_CD.__set__p2(d);
m_ABC = new iriysoft.pengine.constraint.CPenetrationConstraint(m_D, m_C, m_B);
m_DCB = new iriysoft.pengine.constraint.CPenetrationConstraint(m_A, m_B, m_C);
return(this);
}
function changeGeometry(pA, pB, pC, pD) {
m_A.moveTo(pA.x, pA.y);
m_B.moveTo(pB.x, pB.y);
m_C.moveTo(pC.x, pC.y);
m_D.moveTo(pD.x, pD.y);
m_AB.fixDistance();
m_AC.fixDistance();
m_AD.fixDistance();
m_BC.fixDistance();
m_BD.fixDistance();
m_CD.fixDistance();
m_ABC.fixDistance();
m_DCB.fixDistance();
}
function addToEngine(engine) {
engine.addParticle(m_A);
engine.addParticle(m_B);
engine.addParticle(m_C);
engine.addParticle(m_D);
engine.addConstraint(m_AB);
engine.addConstraint(m_AC);
engine.addConstraint(m_AD);
engine.addConstraint(m_BC);
engine.addConstraint(m_BD);
engine.addConstraint(m_CD);
engine.addConstraint(m_ABC);
engine.addConstraint(m_DCB);
}
function get A() {
return(m_A);
}
function get B() {
return(m_B);
}
function get C() {
return(m_C);
}
function get D() {
return(m_D);
}
function get AB() {
return(m_AB);
}
function get AC() {
return(m_AC);
}
function get AD() {
return(m_AD);
}
function get BC() {
return(m_BC);
}
function get BD() {
return(m_BD);
}
function get CD() {
return(m_CD);
}
}
Symbol 705 MovieClip [__Packages.iriysoft.pengine.particle.CParticle] Frame 0
class iriysoft.pengine.particle.CParticle
{
var m_curPosition, m_prevPosition, m_accelerate, m_buckup, m_mass, m_mc;
function CParticle () {
m_curPosition = new iriysoft.pengine.math.CVector2D();
m_prevPosition = new iriysoft.pengine.math.CVector2D();
m_accelerate = new iriysoft.pengine.math.CVector2D();
m_buckup = new iriysoft.pengine.math.CVector2D();
}
function initParticle(x, y, mass, mc) {
if (x == undefined) {
x = 0;
}
if (y == undefined) {
y = 0;
}
if (mass == undefined) {
mass = 1;
}
moveTo(x, y);
m_mass = mass;
m_accelerate.x = 0;
m_accelerate.y = 0;
setMovie(mc);
return(this);
}
function moveTo(nx, ny) {
m_curPosition.x = (m_prevPosition.x = nx);
m_curPosition.y = (m_prevPosition.y = ny);
synchronizeMovie();
}
function verlet(dTime, koeffDamp) {
m_buckup.copyFrom(m_curPosition);
m_curPosition.x = m_curPosition.x + (((m_curPosition.x - m_prevPosition.x) * koeffDamp) + (m_accelerate.x * dTime));
m_curPosition.y = m_curPosition.y + (((m_curPosition.y - m_prevPosition.y) * koeffDamp) + (m_accelerate.y * dTime));
m_buckup.copyTo(m_prevPosition);
synchronizeMovie();
}
function checkCollision(hitMovie) {
}
function synchronizeMovie() {
}
function moveMovieToCurentPosition() {
m_mc._x = m_curPosition.x;
m_mc._y = m_curPosition.y;
}
function get mass() {
return(m_mass);
}
function set mass(nMass) {
m_mass = nMass;
//return(mass);
}
function get accelerate() {
return(m_accelerate);
}
function set accelerate(acc) {
m_accelerate = acc;
//return(accelerate);
}
function get prevPos() {
return(m_prevPosition);
}
function set prevPos(pos) {
m_prevPosition = pos;
//return(prevPos);
}
function get pos() {
return(m_curPosition);
}
function set pos(pos) {
m_curPosition = pos;
//return(this.pos);
}
function setMovie(mc) {
if ((mc == null) || (mc == undefined)) {
synchronizeMovie = function () {
};
m_mc = null;
} else {
m_mc = mc;
synchronizeMovie = moveMovieToCurentPosition;
}
}
function getMovie() {
return(m_mc);
}
}
Symbol 706 MovieClip [__Packages.iriysoft.pengine.math.CVector2D] Frame 0
class iriysoft.pengine.math.CVector2D
{
var x, y;
function CVector2D (nx, ny) {
init(nx, ny);
}
function init(nx, ny) {
x = nx;
y = ny;
}
function copyFrom(v) {
x = v.x;
y = v.y;
}
function copyTo(v) {
v.x = x;
v.y = y;
}
function plusXY(nx, ny) {
x = x + nx;
y = y + ny;
}
static function getDistanceBetween(p1, p2) {
var _local2 = p1.x - p2.x;
var _local1 = p1.y - p2.y;
return(Math.sqrt((_local2 * _local2) + (_local1 * _local1)));
}
function duplicate() {
return(new iriysoft.pengine.math.CVector2D(x, y));
}
function minus(v) {
x = x - v.x;
y = y - v.y;
}
function minusNew(v) {
return(new iriysoft.pengine.math.CVector2D(x - v.x, y - v.y));
}
function normalize() {
var _local2 = Math.sqrt((x * x) + (y * y));
x = x / _local2;
y = y / _local2;
}
function reverseNew() {
return(new iriysoft.pengine.math.CVector2D(-x, -y));
}
function scalar(v) {
return((x * v.x) + (y * v.y));
}
function modul() {
return(Math.sqrt((x * x) + (y * y)));
}
function rotate(u) {
var _local4 = x;
var _local3 = y;
x = (_local4 * Math.cos(u)) - (_local3 * Math.sin(u));
y = (_local4 * Math.sin(u)) + (_local3 * Math.cos(u));
}
function rotateNew(u) {
return(new iriysoft.pengine.math.CVector2D((x * Math.cos(u)) - (y * Math.sin(u)), (x * Math.sin(u)) + (y * Math.cos(u))));
}
function mult(k) {
x = x * k;
y = y * k;
}
function multNew(k) {
return(new iriysoft.pengine.math.CVector2D(x * k, y * k));
}
function plus(v) {
x = x + v.x;
y = y + v.y;
}
function plusNew(v) {
return(new iriysoft.pengine.math.CVector2D(x + v.x, y + v.y));
}
function getDistanceTo(p1, p2) {
var _local3 = p1.y - p2.y;
var _local2 = p2.x - p1.x;
var _local6 = (p1.x * (p2.y - p1.y)) - (p1.y * (p2.x - p1.x));
var _local5 = Math.sqrt((_local3 * _local3) + (_local2 * _local2));
_local3 = _local3 / _local5;
_local2 = _local2 / _local5;
_local6 = _local6 / _local5;
return(((_local3 * x) + (_local2 * y)) + _local6);
}
function toString() {
return(new String((("x: " + x) + " y: ") + y));
}
}
Symbol 707 MovieClip [__Packages.iriysoft.pengine.constraint.IConstraint] Frame 0
interface iriysoft.pengine.constraint.IConstraint
{
}
Symbol 708 MovieClip [__Packages.iriysoft.pengine.constraint.CSpringConstraint] Frame 0
class iriysoft.pengine.constraint.CSpringConstraint implements iriysoft.pengine.constraint.IConstraint
{
var m_p1, m_p2, m_koeffStiffPress, m_koeffStiffStretch, m_relaxLen;
function CSpringConstraint () {
}
function init(koeffStiffPress, koeffStiffStretch, p1, p2) {
m_p1 = p1;
m_p2 = p2;
m_koeffStiffPress = koeffStiffPress;
m_koeffStiffStretch = koeffStiffStretch;
fixDistance();
return(this);
}
function fixDistance() {
m_relaxLen = iriysoft.pengine.math.CVector2D.getDistanceBetween(m_p1.__get__pos(), m_p2.__get__pos());
}
function resolve() {
var _local3 = m_p1.__get__pos().x - m_p2.__get__pos().x;
var _local2 = m_p1.__get__pos().y - m_p2.__get__pos().y;
var _local5 = Math.sqrt((_local3 * _local3) + (_local2 * _local2));
var _local9 = (_local5 - m_relaxLen) / _local5;
var _local8;
if (_local5 > m_relaxLen) {
_local8 = m_koeffStiffStretch;
} else {
_local8 = m_koeffStiffPress;
}
var _local7 = m_p1.__get__mass();
var _local6 = m_p2.__get__mass();
var _local4 = (_local9 * _local8) / (_local7 + _local6);
m_p1.__get__pos().x = m_p1.__get__pos().x - ((_local3 * _local7) * _local4);
m_p1.__get__pos().y = m_p1.__get__pos().y - ((_local2 * _local7) * _local4);
m_p2.__get__pos().x = m_p2.__get__pos().x + ((_local3 * _local6) * _local4);
m_p2.__get__pos().y = m_p2.__get__pos().y + ((_local2 * _local6) * _local4);
}
function set p1(nP1) {
m_p1 = nP1;
//return(p1);
}
function get p1() {
return(m_p1);
}
function set p2(nP2) {
m_p2 = nP2;
//return(p2);
}
function get p2() {
return(m_p2);
}
}
Symbol 709 MovieClip [__Packages.iriysoft.pengine.constraint.CPenetrationConstraint] Frame 0
class iriysoft.pengine.constraint.CPenetrationConstraint implements iriysoft.pengine.constraint.IConstraint
{
var p0, p1, p2, sign, n;
function CPenetrationConstraint (np0, np1, np2) {
p0 = np0;
p1 = np1;
p2 = np2;
fixDistance();
}
function fixDistance() {
sign = p0.__get__pos().getDistanceTo(p1.__get__pos(), p2.__get__pos());
if (sign < 0) {
sign = -1;
} else {
sign = 1;
}
n = new iriysoft.pengine.math.CVector2D();
}
function resolve() {
var _local2 = p0.__get__pos().getDistanceTo(p1.__get__pos(), p2.__get__pos());
if ((sign * _local2) <= 2) {
n.init(p2.__get__pos().x, p2.__get__pos().y);
n.minus(p1.__get__pos());
n.normalize();
n.rotate(PI2 * sign);
n.mult(Math.abs(_local2) + 1);
p1.__get__pos().minus(n);
}
}
static var PI2 = (Math.PI/2);
}
Symbol 710 MovieClip [__Packages.iriysoft.pengine.CParticleEngine] Frame 0
class iriysoft.pengine.CParticleEngine
{
var m_particles, m_constraints, m_hitMovie, m_gravity, m_koeffDamp;
function CParticleEngine (hitMovie, nGravity, koeffDamp) {
m_particles = new Array();
m_constraints = new Array();
setHitMovie(hitMovie);
init(nGravity, koeffDamp);
}
function setHitMovie(hitMovie) {
if (hitMovie == undefined) {
hitMovie = null;
}
m_hitMovie = hitMovie;
}
function getHitMovie() {
return(m_hitMovie);
}
function set gravity(nGravity) {
m_gravity = nGravity;
//return(gravity);
}
function get gravity() {
return(m_gravity);
}
function init(nGravity, koeffDamp) {
if (nGravity == undefined) {
nGravity = 9.8;
}
if (koeffDamp == undefined) {
koeffDamp = 0.995;
}
gravity = (nGravity);
m_koeffDamp = koeffDamp;
}
function addParticle(p) {
m_particles.push(p);
}
function process() {
var _local2 = 0;
while (_local2 < m_particles.length) {
m_particles[_local2].accelerate.plusXY(0, m_gravity * m_particles[_local2].mass);
m_particles[_local2].accelerate.mult(1 / REPEAT_COUNT);
_local2++;
}
var _local3 = 0;
while (_local3 < REPEAT_COUNT) {
_local2 = 0;
while (_local2 < m_particles.length) {
m_particles[_local2].verlet(D_TIME, m_koeffDamp);
_local2++;
}
_local2 = 0;
while (_local2 < m_constraints.length) {
m_constraints[_local2].resolve();
_local2++;
}
_local2 = 0;
while (_local2 < m_particles.length) {
m_particles[_local2].checkCollision(m_hitMovie);
_local2++;
}
_local3++;
}
_local2 = 0;
while (_local2 < m_particles.length) {
m_particles[_local2].accelerate.init(0, 0);
_local2++;
}
}
function addConstraint(c) {
m_constraints.push(c);
}
function clear() {
while (m_particles.pop() != undefined) {
}
clearConstraints();
}
function clearConstraints() {
while (m_constraints.pop() != undefined) {
}
}
static var SEC_PER_FRAME = 0.0416666666666667;
static var REPEAT_COUNT = 5;
static var D_TIME = SEC_PER_FRAME / REPEAT_COUNT;
}
Symbol 711 MovieClip [__Packages.iriysoft.pengine.particle.CWheel] Frame 0
class iriysoft.pengine.particle.CWheel extends iriysoft.pengine.particle.CParticle
{
var m_rim, rot, m_radius, m_speed, m_accSpeed, m_acceleration, initParticle, m_koeffSpring, m_koeffSlip, m_maxAccSpeed, intersectionFlag, lastIntersPoint, lastN, hitPointArray, normalArray, hitArray, intersArray, n_part, oldPos, _p, _n, p3, m_prevPosition, synchronizeMovie, m_mc, m_curPosition, obj;
function CWheel () {
super();
}
function setFriction(val) {
m_koeffFriction = val;
}
function setRotationMovie(rotationMovie) {
if ((rotationMovie == undefined) || (rotationMovie == null)) {
rotateMovie = function () {
};
m_rim = null;
} else {
rotateMovie = normalRotation;
m_rim = rotationMovie;
}
}
function normalRotation() {
rot.rotate(m_speed / m_radius);
m_rim._rotation = Math.atan2(rot.y, rot.x) * ANGLE_180_DIV_PI;
}
function iceRotation() {
rot.rotate((m_accSpeed * 13700) / m_radius);
m_rim._rotation = Math.atan2(rot.y, rot.x) * ANGLE_180_DIV_PI;
}
function setAccelerate(nAccelerate) {
m_acceleration = nAccelerate;
}
function getAccelerate() {
return(m_acceleration);
}
function initWheel(x, y, mass, rad, maxAccSpeed, mc, rotationMovie, koeffSpring, koeffSlip) {
_innerInit();
initParticle(x, y, mass, mc);
if (koeffSpring == undefined) {
koeffSpring = 0.1;
}
if (koeffSlip == undefined) {
koeffSlip = 0.1;
}
m_koeffSpring = koeffSpring;
m_koeffSlip = koeffSlip;
setRotationMovie(rotationMovie);
m_radius = rad;
m_maxAccSpeed = maxAccSpeed;
m_speed = 0;
m_accSpeed = 0;
rot = new iriysoft.pengine.math.CVector2D(1, 0);
intersectionFlag = false;
lastIntersPoint = new iriysoft.pengine.math.CVector2D(0, 0);
lastN = new iriysoft.pengine.math.CVector2D(0, 0);
var _local2;
var _local3 = (Math.PI*2) / m_hitCount;
hitPointArray = new Array(m_hitCount);
normalArray = new Array(m_hitCount);
hitArray = new Array(m_hitCount);
intersArray = new Array();
_local2 = 0;
while (_local2 < m_hitCount) {
hitPointArray[_local2] = new iriysoft.pengine.math.CVector2D(Math.sin(_local3 * _local2) * m_radius, (-Math.cos(_local3 * _local2)) * m_radius);
normalArray[_local2] = hitPointArray[_local2].multNew(-1);
normalArray[_local2].normalize();
_local2++;
}
m_acceleration = 0;
return(this);
}
function verlet(dTime, koeffDamp) {
super.verlet(dTime, koeffDamp);
m_accSpeed = Math.max(-m_maxAccSpeed, Math.min(m_maxAccSpeed, m_accSpeed + (m_acceleration * dTime)));
m_speed = Math.max((-m_maxSpeed) * dTime, Math.min((m_speed * koeffDamp) + m_accSpeed, m_maxSpeed * dTime));
rotateMovie();
}
function rotateMovie() {
}
function _innerInit() {
n_part = new iriysoft.pengine.math.CVector2D(0, 0);
oldPos = new iriysoft.pengine.math.CVector2D(0, 0);
_p = new iriysoft.pengine.math.CVector2D(0, 0);
_n = new iriysoft.pengine.math.CVector2D(0, 0);
p3 = new iriysoft.pengine.math.CVector2D(0, 0);
}
function checkCollision(hit_mc) {
var _local2;
var _local5;
_p.init(0, 0);
var _local9 = false;
var _local3;
var _local4;
var _local11;
oldPos.init(m_prevPosition.x, m_prevPosition.y);
_n.init(0, 0);
n_part.init(0, 0);
var _local10;
synchronizeMovie();
_local10 = 0;
_local2 = 0;
while (_local2 < m_hitCount) {
hitPointArray[_local2].copyTo(_p);
m_mc.localToGlobal(_p);
if ((hitArray[_local2] = hit_mc.hitTest(_p.x, _p.y, true))) {
_local9 = true;
_local3 = _local2;
_local10++;
}
_local2++;
}
if (_local10 == m_hitCount) {
m_curPosition.x = m_prevPosition.x + ((m_curPosition.x - m_prevPosition.x) * 0.3);
m_curPosition.y = m_prevPosition.y + ((m_curPosition.y - m_prevPosition.y) * 0.3);
synchronizeMovie();
return(undefined);
}
_local2 = 0;
if (_local9) {
while (true) {
_local2++;
if (_local2 == m_hitCount) {
_local2 = 0;
}
if (!hitArray[_local2]) {
_local3 = -1;
_local5 = 0;
while (_local5 < m_hitCount) {
_local2++;
if (_local2 == m_hitCount) {
_local2 = 0;
}
if (_local3 == -1) {
if (hitArray[_local2]) {
_local3 = _local2;
_n.plus(normalArray[_local2]);
normalArray[_local2].copyTo(n_part);
}
} else if (!hitArray[_local2]) {
_local4 = _local2 - 1;
if (_local4 < 0) {
_local4 = m_hitCount - 1;
}
intersArray.push({k1:_local3, k2:_local4, n:new iriysoft.pengine.math.CVector2D(n_part.x, n_part.y)});
_local3 = -1;
} else {
_n.plus(normalArray[_local2]);
n_part.plus(normalArray[_local2]);
}
_local5++;
}
break;
}
}
p3.init(0, 0);
if (intersArray.length > 0) {
_n.normalize();
if (intersectionFlag) {
_n.x = _n.x + lastN.x;
_n.y = _n.y + lastN.y;
_n.x = _n.x / 2;
_n.y = _n.y / 2;
}
var _local7;
_local11 = intersArray.length;
_local2 = 0;
while (_local2 < _local11) {
obj = intersArray.pop();
_local3 = obj.k1;
_local4 = obj.k2;
obj.n.copyTo(n_part);
m_curPosition.minusNew(m_prevPosition).copyTo(p3);
if (_n.scalar(p3) < 0) {
_local7 = Math.atan2(_n.y, _n.x);
p3.rotate(-_local7);
p3.x = (-p3.x) * m_koeffSpring;
p3.rotate(_local7);
pushOut(_local3, _local4, n_part, hit_mc);
m_prevPosition.x = m_curPosition.x - p3.x;
m_prevPosition.y = m_curPosition.y - p3.y;
} else {
pushOut(_local3, _local4, n_part, hit_mc);
}
_local2++;
}
validateRotation(_n, oldPos);
intersectionFlag = true;
m_curPosition.copyTo(lastIntersPoint);
_n.copyTo(lastN);
}
} else if (intersectionFlag) {
validateRotation(lastN, oldPos);
intersectionFlag = false;
}
synchronizeMovie();
}
function pushOut(k1, k2, n, hit_mc) {
n.normalize();
if (k1 != k2) {
var _local7 = (new iriysoft.pengine.math.CVector2D(0, 0)).getDistanceTo(hitPointArray[k1], hitPointArray[k2]);
_local7 = m_radius - Math.abs(_local7);
m_curPosition.plus(n.multNew(_local7));
m_prevPosition.plus(n.multNew(_local7));
} else {
var _local6 = n.multNew(-m_radius);
var _local4 = new iriysoft.pengine.math.CVector2D(0, 0);
var _local5 = 0;
var _local3 = 0.03;
while (true) {
_local6.copyTo(_local4);
m_mc.localToGlobal(_local4);
if (hit_mc.hitTest(_local4.x, _local4.y, true)) {
_local5++;
m_curPosition.x = m_curPosition.x + (n.x * _local3);
m_curPosition.y = m_curPosition.y + (n.y * _local3);
synchronizeMovie();
} else {
_local5--;
m_curPosition.x = m_curPosition.x - (n.x * _local3);
m_curPosition.y = m_curPosition.y - (n.y * _local3);
m_prevPosition.plus(n.multNew(_local3 * _local5));
break;
}
}
}
}
function validateRotation(n, oldPos) {
if ((!intersectionFlag) && (Math.abs(m_accSpeed) > 0.01)) {
if (Math.abs(m_accSpeed) < ((m_maxAccSpeed * 0.02) / 2)) {
m_accSpeed = 0;
} else if (m_accSpeed > 0) {
m_accSpeed = m_maxAccSpeed * 0.02;
} else {
m_accSpeed = (-m_maxAccSpeed) * 0.02;
}
}
var _local3 = new iriysoft.pengine.math.CVector2D(-n.y, n.x);
var _local7 = m_curPosition.minusNew(oldPos);
var _local5 = Math.atan2(_local3.y, _local3.x);
var _local2 = _local7.rotateNew(-_local5);
m_speed = _local2.x + (m_accSpeed * coofIce);
_local2.y = 0;
_local2.rotate(_local5);
var _local6 = 1 - m_koeffSlip;
var _local4 = Math.max(Math.min(m_maxSpeed, (m_accSpeed * _local6) * coofIce), -m_maxSpeed);
m_curPosition.x = (m_curPosition.x + (_local3.x * _local4)) - (m_koeffFriction * _local2.x);
m_curPosition.y = (m_curPosition.y + (_local3.y * _local4)) - (m_koeffFriction * _local2.y);
m_accSpeed = m_accSpeed * m_koeffSlip;
}
function hasIntersection() {
return(intersectionFlag);
}
var coofIce = 1;
static var m_maxSpeed = 180;
static var m_hitCount = 32;
static var m_koeffFriction = 0.03;
static var ANGLE_180_DIV_PI = 57.2957795130823;
}
Symbol 712 MovieClip [__Packages.CConstant] Frame 0
class CConstant
{
function CConstant () {
}
static function checkURL(nUrl) {
return((nUrl.indexOf(URL_FOR_CHECK1) >= 0) || (nUrl.indexOf(URL_FOR_CHECK2) >= 0));
}
static function getCarParam(num) {
var _local1 = iriysoft.pengine.CVehicle.getDefaultVehicleParam();
switch (num) {
case 1 :
_local1.accelerateForwardWheel = 30;
_local1.accelerateBackWheel = 30;
_local1.brakeForwardWheel = -30;
_local1.brakeBackWheel = -30;
_local1.accPercMult = 39.2;
_local1.normalYLimit = 0;
_local1.koeffPrimary = 1.7;
_local1.koeffSecondary = -1;
_local1.accPercBase = 0.6;
break;
case 2 :
_local1.accelerateForwardWheel = 14;
_local1.accelerateBackWheel = 42;
_local1.brakeForwardWheel = -26;
_local1.brakeBackWheel = -26;
_local1.accPercMult = 39.2;
_local1.normalYLimit = 0;
_local1.koeffPrimary = 1.7;
_local1.koeffSecondary = -1;
_local1.accPercBase = 0.6;
break;
case 3 :
_local1.accelerateForwardWheel = 24;
_local1.accelerateBackWheel = 42;
_local1.brakeForwardWheel = -26;
_local1.brakeBackWheel = -26;
_local1.accPercMult = 39.2;
_local1.normalYLimit = 0;
_local1.koeffPrimary = 1.7;
_local1.koeffSecondary = -1;
_local1.accPercBase = 0.6;
break;
case 4 :
_local1.accelerateForwardWheel = 34;
_local1.accelerateBackWheel = 43;
_local1.brakeForwardWheel = -26;
_local1.brakeBackWheel = -26;
_local1.accPercMult = 39.2;
_local1.normalYLimit = 0;
_local1.koeffPrimary = 1.7;
_local1.koeffSecondary = -1;
_local1.accPercBase = 0.6;
break;
case 5 :
_local1.accelerateForwardWheel = 44;
_local1.accelerateBackWheel = 44;
_local1.brakeForwardWheel = -26;
_local1.brakeBackWheel = -26;
_local1.accPercMult = 39.2;
_local1.normalYLimit = 0;
_local1.koeffPrimary = 1.7;
_local1.koeffSecondary = -1;
_local1.accPercBase = 0.6;
}
return(_local1);
}
static var LOOP_VOLUME = 35;
static var SOUNDS_NAMES = new Array("sndScreen", "sndGame", "sndClick", "sndExpl", "sndBonus", "sndError", "sndCheckPoint", "snd_idle", "snd_accelerate", "snd_aston", "snd_porsche", "snd_ford", "snd_koen");
static var SND_SCREEN = 0;
static var SND_GAME = 1;
static var SND_CLICK = 2;
static var SND_EXPL = 3;
static var SND_BONUS = 4;
static var SND_ERROR = 5;
static var SND_CHECKPOINT = 6;
static var SND_IDLE = 7;
static var SND_ACCEL = 8;
static var SND_ASTON = 9;
static var SND_PORSCHE = 10;
static var SND_FORD = 11;
static var SND_KOEN = 12;
static var URL_FOR_CHECK1 = "www.limegames.com";
static var URL_FOR_CHECK2 = "www.limegames.com";
static var URL_GAME = "http://www.limegames.com";
static var SCR_WIDTH = 640;
static var SCR_HEIGHT = 480;
static var CAR_FERRARI_458 = 1;
static var CAR_ASTON_MARTIN = 2;
static var CAR_PORSCHE_CARRERA = 3;
static var CAR_FORD_GT = 4;
static var CAR_KOENIGSEGG = 5;
static var selected_car = 1;
static var CAR_NUM_JEEP = 0;
static var CAR_NUM_ESCALADE = 1;
static var CAR_NUM_RANGE_ROVER = 2;
static var CAR_NUM_AUDI_Q7 = 3;
static var TIME_LEVEL_START = 40;
static var TIME_BONUS_ADD = 15;
static var WHEEL_ID = ["idHummerWheel", "idAstonMartinWheel", "idRangeRoverWheel", "idAudiWeel", "idEscaladeWheel"];
static var LEVEL_COUNT = 10;
static var skeletonJeep = (new iriysoft.pengine.constraint.CBoxConstrainSkeleton()).init((new iriysoft.pengine.particle.CWheel()).initWheel(0, 0, 4, 18, 180), (new iriysoft.pengine.particle.CParticle()).initParticle(0, 0, 3), (new iriysoft.pengine.particle.CParticle()).initParticle(0, 0, 3), (new iriysoft.pengine.particle.CWheel()).initWheel(0, 0, 4, 18, 180), (new iriysoft.pengine.constraint.CSpringConstraint()).init(0.4, 0.4), (new iriysoft.pengine.constraint.CSpringConstraint()).init(0.6, 0.6), (new iriysoft.pengine.constraint.CSpringConstraint()).init(0.8, 0.8), (new iriysoft.pengine.constraint.CSpringConstraint()).init(0.7, 0.7), (new iriysoft.pengine.constraint.CSpringConstraint()).init(0.6, 0.6), (new iriysoft.pengine.constraint.CSpringConstraint()).init(0.5, 0.5));
static var skeletonEscalade = (new iriysoft.pengine.constraint.CBoxConstrainSkeleton()).init((new iriysoft.pengine.particle.CWheel()).initWheel(0, 0, 4, 16, 180), (new iriysoft.pengine.particle.CParticle()).initParticle(0, 0, 3), (new iriysoft.pengine.particle.CParticle()).initParticle(0, 0, 3), (new iriysoft.pengine.particle.CWheel()).initWheel(0, 0, 4, 16, 180), (new iriysoft.pengine.constraint.CSpringConstraint()).init(0.4, 0.4), (new iriysoft.pengine.constraint.CSpringConstraint()).init(0.6, 0.6), (new iriysoft.pengine.constraint.CSpringConstraint()).init(0.8, 0.8), (new iriysoft.pengine.constraint.CSpringConstraint()).init(0.7, 0.7), (new iriysoft.pengine.constraint.CSpringConstraint()).init(0.6, 0.6), (new iriysoft.pengine.constraint.CSpringConstraint()).init(0.5, 0.5));
static var skeletonRangeRover = (new iriysoft.pengine.constraint.CBoxConstrainSkeleton()).init((new iriysoft.pengine.particle.CWheel()).initWheel(0, 0, 4, 16, 180), (new iriysoft.pengine.particle.CParticle()).initParticle(0, 0, 3), (new iriysoft.pengine.particle.CParticle()).initParticle(0, 0, 3), (new iriysoft.pengine.particle.CWheel()).initWheel(0, 0, 4, 16, 180), (new iriysoft.pengine.constraint.CSpringConstraint()).init(0.4, 0.4), (new iriysoft.pengine.constraint.CSpringConstraint()).init(0.6, 0.6), (new iriysoft.pengine.constraint.CSpringConstraint()).init(0.8, 0.8), (new iriysoft.pengine.constraint.CSpringConstraint()).init(0.7, 0.7), (new iriysoft.pengine.constraint.CSpringConstraint()).init(0.6, 0.6), (new iriysoft.pengine.constraint.CSpringConstraint()).init(0.5, 0.5));
static var skeletonAudiQ7 = (new iriysoft.pengine.constraint.CBoxConstrainSkeleton()).init((new iriysoft.pengine.particle.CWheel()).initWheel(0, 0, 4, 17, 180), (new iriysoft.pengine.particle.CParticle()).initParticle(0, 0, 3), (new iriysoft.pengine.particle.CParticle()).initParticle(0, 0, 3), (new iriysoft.pengine.particle.CWheel()).initWheel(0, 0, 4, 17, 180), (new iriysoft.pengine.constraint.CSpringConstraint()).init(0.4, 0.4), (new iriysoft.pengine.constraint.CSpringConstraint()).init(0.6, 0.6), (new iriysoft.pengine.constraint.CSpringConstraint()).init(0.8, 0.8), (new iriysoft.pengine.constraint.CSpringConstraint()).init(0.7, 0.7), (new iriysoft.pengine.constraint.CSpringConstraint()).init(0.6, 0.6), (new iriysoft.pengine.constraint.CSpringConstraint()).init(0.5, 0.5));
static var skeletonDeath = (new iriysoft.pengine.constraint.CBoxConstrainSkeleton()).init((new iriysoft.pengine.particle.CWheel()).initWheel(0, 0, 4, 13, 180), (new iriysoft.pengine.particle.CWheel()).initWheel(0, 0, 4, 13, 180), (new iriysoft.pengine.particle.CWheel()).initWheel(0, 0, 4, 13, 180), (new iriysoft.pengine.particle.CWheel()).initWheel(0, 0, 5, 13, 180), (new iriysoft.pengine.constraint.CSpringConstraint()).init(0.8, 0.8), (new iriysoft.pengine.constraint.CSpringConstraint()).init(0.8, 0.8), (new iriysoft.pengine.constraint.CSpringConstraint()).init(0.8, 0.8), (new iriysoft.pengine.constraint.CSpringConstraint()).init(0.8, 0.8), (new iriysoft.pengine.constraint.CSpringConstraint()).init(0.8, 0.8), (new iriysoft.pengine.constraint.CSpringConstraint()).init(0.8, 0.8));
static var skeletonKoenig = (new iriysoft.pengine.constraint.CBoxConstrainSkeleton()).init((new iriysoft.pengine.particle.CWheel()).initWheel(0, 0, 4, 17, 180), (new iriysoft.pengine.particle.CParticle()).initParticle(0, 0, 3), (new iriysoft.pengine.particle.CParticle()).initParticle(0, 0, 3), (new iriysoft.pengine.particle.CWheel()).initWheel(0, 0, 4, 17, 180), (new iriysoft.pengine.constraint.CSpringConstraint()).init(0.4, 0.4), (new iriysoft.pengine.constraint.CSpringConstraint()).init(0.6, 0.6), (new iriysoft.pengine.constraint.CSpringConstraint()).init(0.8, 0.8), (new iriysoft.pengine.constraint.CSpringConstraint()).init(0.7, 0.7), (new iriysoft.pengine.constraint.CSpringConstraint()).init(0.6, 0.6), (new iriysoft.pengine.constraint.CSpringConstraint()).init(0.5, 0.5));
static var CAR_SKELETONS = [skeletonJeep, skeletonEscalade, skeletonRangeRover, skeletonAudiQ7, skeletonKoenig];
static var paramJeep = {};
}
Symbol 713 MovieClip [__Packages.iriysoft.pengine.CVehicle] Frame 0
class iriysoft.pengine.CVehicle
{
var m_vehicleDir, m_vehicleNormal, t_point1, t_point2, m_vehicleMovie, m_vehicleParam, m_bodyMovie, m_backWheel, m_forwardWheel, m_accPercMultForTurn, m_normalYLimitForTurn, m_koeffPrimaryForTurn, m_koeffSecondaryForTurn, m_accPercBaseForTurn, m_accelerateForwardWheel, m_accelerateBackWheel, m_brakeForwardWheel, m_brakeBackWheel, t_buffNumber, m_vehicleAngle, t_turnToPerc, t_turnToDX, t_turnToDY;
function CVehicle () {
m_vehicleDir = new iriysoft.pengine.math.CVector2D(0, 0);
m_vehicleNormal = new iriysoft.pengine.math.CVector2D(0, 0);
t_point1 = new iriysoft.pengine.math.CVector2D();
t_point2 = new iriysoft.pengine.math.CVector2D();
}
function getVehiclePoint(mc) {
var _local2 = new Object();
_local2.x = mc._x;
_local2.y = mc._y;
mc._parent.localToGlobal(_local2);
m_vehicleMovie._parent.globalToLocal(_local2);
return(_local2);
}
function moveMovieToMovieGlobal(movie, moviePos) {
var _local1 = {x:movie._x, y:movie._y};
movie._parent.localToGlobal(_local1);
moviePos._parent.globalToLocal(_local1);
moviePos._x = _local1.x;
moviePos._y = _local1.y;
}
function rotateMovieToMovieLocal(movie, moviePos) {
movie._rotation = Math.atan2(moviePos._y - movie._y, moviePos._x - movie._x) * VAL_180_DIV_PI;
}
function construct(vehicleParam, bodyMovie, vehicleMovie, mcWBack, mcWForward) {
m_vehicleParam = vehicleParam;
m_bodyMovie = bodyMovie;
m_vehicleMovie = vehicleMovie;
m_vehicleParam.changeGeometry(getVehiclePoint(m_bodyMovie.mcA), getVehiclePoint(m_bodyMovie.mcB), getVehiclePoint(m_bodyMovie.mcC), getVehiclePoint(m_bodyMovie.mcD));
m_backWheel = iriysoft.pengine.particle.CWheel(m_vehicleParam.__get__A());
m_forwardWheel = iriysoft.pengine.particle.CWheel(m_vehicleParam.__get__D());
if (mcWBack != undefined) {
m_backWheel.setMovie(mcWBack);
m_backWheel.setRotationMovie(mcWBack.mcSpoke);
}
if (mcWForward != undefined) {
m_forwardWheel.setMovie(mcWForward);
m_forwardWheel.setRotationMovie(mcWForward.mcSpoke);
}
setVehicleParam(getDefaultVehicleParam());
}
static function getDefaultVehicleParam() {
var _local1 = new Object();
_local1.accPercMult = 39.2;
_local1.normalYLimit = 0.4;
_local1.koeffPrimary = 1.3;
_local1.koeffSecondary = 0.7;
_local1.accPercBase = 0.6;
_local1.accelerateForwardWheel = 0;
_local1.accelerateBackWheel = 50;
_local1.brakeForwardWheel = 0;
_local1.brakeBackWheel = 0;
return(_local1);
}
function setVehicleParam(param) {
m_accPercMultForTurn = param.accPercMult;
m_normalYLimitForTurn = param.normalYLimit;
m_koeffPrimaryForTurn = param.koeffPrimary;
m_koeffSecondaryForTurn = param.koeffSecondary;
m_accPercBaseForTurn = param.accPercBase;
m_accelerateForwardWheel = param.accelerateForwardWheel;
m_accelerateBackWheel = param.accelerateBackWheel;
m_brakeForwardWheel = param.brakeForwardWheel;
m_brakeBackWheel = param.brakeBackWheel;
}
function processKey(mask) {
if ((mask & KM_ACCELERATE) != 0) {
accelerate();
} else if ((mask & KM_BRAKE) != 0) {
brake();
} else {
stopAccelerate();
}
if ((mask & KM_MOVE_BODY_FORWARD) != 0) {
turnTo(DIR_RIGHT, m_accPercMultForTurn);
} else if ((mask & KM_MOVE_BODY_BACK) != 0) {
turnTo(DIR_LEFT, m_accPercMultForTurn);
}
}
function process() {
m_vehicleDir.init(m_forwardWheel.__get__pos().x - m_backWheel.__get__pos().x, m_forwardWheel.__get__pos().y - m_backWheel.__get__pos().y);
m_vehicleNormal.init(m_vehicleDir.x, m_vehicleDir.y);
m_vehicleNormal.normalize();
t_buffNumber = m_vehicleNormal.x;
m_vehicleNormal.x = -m_vehicleNormal.y;
m_vehicleNormal.y = t_buffNumber;
m_vehicleAngle = Math.atan2(m_vehicleDir.y, m_vehicleDir.x) * VAL_180_DIV_PI;
m_vehicleMovie._rotation = m_vehicleAngle;
t_point1.x = m_bodyMovie.mcB._x;
t_point1.y = m_bodyMovie.mcB._y;
m_bodyMovie.localToGlobal(t_point1);
m_vehicleMovie._parent.globalToLocal(t_point1);
t_point2.x = m_bodyMovie.mcC._x;
t_point2.y = m_bodyMovie.mcC._y;
m_bodyMovie.localToGlobal(t_point2);
m_vehicleMovie._parent.globalToLocal(t_point2);
m_vehicleMovie._x = m_vehicleMovie._x + ((((m_vehicleParam.__get__B().__get__pos().x - t_point1.x) + m_vehicleParam.__get__C().__get__pos().x) - t_point2.x) / 2);
m_vehicleMovie._y = m_vehicleMovie._y + ((((m_vehicleParam.__get__B().__get__pos().y - t_point1.y) + m_vehicleParam.__get__C().__get__pos().y) - t_point2.y) / 2);
}
function turnTo(dir, turnPower) {
t_turnToPerc = ((Math.abs(m_vehicleNormal.y) * (1 - m_accPercBaseForTurn)) + m_accPercBaseForTurn) * turnPower;
t_turnToDX = m_vehicleNormal.x * t_turnToPerc;
t_turnToDY = m_vehicleNormal.y * t_turnToPerc;
if (dir == DIR_RIGHT) {
m_forwardWheel.__get__accelerate().plusXY(t_turnToDX * m_koeffPrimaryForTurn, t_turnToDY * m_koeffPrimaryForTurn);
if (m_forwardWheel.hasIntersection()) {
m_backWheel.__get__accelerate().plusXY((-t_turnToDX) * m_koeffSecondaryForTurn, (-t_turnToDY) * m_koeffSecondaryForTurn);
}
} else {
if (m_backWheel.hasIntersection()) {
m_forwardWheel.__get__accelerate().plusXY((-t_turnToDX) * m_koeffSecondaryForTurn, (-t_turnToDY) * m_koeffSecondaryForTurn);
}
m_backWheel.__get__accelerate().plusXY(t_turnToDX * m_koeffPrimaryForTurn, t_turnToDY * m_koeffPrimaryForTurn);
}
}
function accelerate() {
m_backWheel.setAccelerate(m_accelerateBackWheel);
m_forwardWheel.setAccelerate(m_accelerateForwardWheel);
}
function brake() {
m_backWheel.setAccelerate(m_brakeBackWheel);
m_forwardWheel.setAccelerate(m_brakeForwardWheel);
}
function stopAccelerate() {
m_backWheel.setAccelerate(0);
m_forwardWheel.setAccelerate(0);
}
function get backWheel() {
return(m_backWheel);
}
function get forwardWheel() {
return(m_forwardWheel);
}
function onGround() {
return(m_backWheel.hasIntersection() || (m_forwardWheel.hasIntersection()));
}
function get vehicleParam() {
return(m_vehicleParam);
}
function set vehicleParam(nParam) {
m_vehicleParam = nParam;
//return(vehicleParam);
}
function get vehicleAngle() {
return(m_vehicleAngle);
}
function get vehicleDir() {
return(m_vehicleDir);
}
static var VAL_180_DIV_PI = 57.2957795130823;
static var DIR_RIGHT = 0;
static var DIR_LEFT = 1;
static var KM_NONE = 0;
static var KM_ACCELERATE = 1;
static var KM_BRAKE = 2;
static var KM_MOVE_BODY_FORWARD = 4;
static var KM_MOVE_BODY_BACK = 8;
}
Symbol 714 MovieClip [__Packages.CSoundService] Frame 0
class CSoundService extends MovieClip
{
var m_sounds, m_soundsState, m_soundsNames, createEmptyMovieClip, onEnterFrame;
function CSoundService () {
super();
mx.events.EventDispatcher.initialize(this);
}
function realPlaySound(id, repeatCount) {
if (!m_soundOn) {
return(undefined);
}
Sound(m_sounds[id]).start(0, repeatCount);
}
function processSounds() {
var _local2 = 0;
while (_local2 < m_sounds.length) {
if (m_soundsState[_local2] > 0) {
realPlaySound(_local2, m_soundsState[_local2]);
m_soundsState[_local2] = ST_PLAY;
break;
}
_local2++;
}
}
function init(soundNames) {
m_soundsNames = soundNames;
m_sounds = new Array(soundNames.length);
m_soundsState = new Array(soundNames.length);
var _local2 = 0;
while (_local2 < soundNames.length) {
var _local4 = createEmptyMovieClip("_contMovie" + _local2, 1000 + _local2);
var _local3 = new Sound(_local4);
_local3.attachSound(soundNames[_local2]);
m_soundsState[_local2] = ST_STOP;
_local3.sounID = _local2;
_local3.parent = m_instance;
_local3.onSoundComplete = function () {
this.parent.m_soundsState[this.sounID] = CSoundService.ST_STOP;
};
m_sounds[_local2] = _local3;
_local2++;
}
onEnterFrame = processSounds;
}
static function get instance() {
return(m_instance);
}
static function createSoundService(soundNames, soundsPlace, depthInSoundsPlace) {
m_instance = CSoundService(soundsPlace.attachMovie("dmSoundService", "__SoundServiceObject", depthInSoundsPlace));
m_instance.init(soundNames);
return(m_instance);
}
static function playLoopSound(soundID, volume) {
if (volume == undefined) {
volume = 100;
}
if ((m_instance.m_loopSoundID >= 0) && (m_instance.m_loopSoundID != soundID)) {
stopSound(m_instance.m_loopSoundID);
}
m_instance.m_loopSoundID = soundID;
if (!soundIsPlay(m_instance.m_loopSoundID)) {
playCurLoopSound();
getSoundAt(m_instance.m_loopSoundID).setVolume(volume);
}
}
static function playCurLoopSound() {
playSound(m_instance.m_loopSoundID, true, 9999);
}
static function stopCurLoopSound() {
stopSound(m_instance.m_loopSoundID);
m_instance.m_loopSoundID = -1;
}
static function get soundOn() {
return(m_instance.m_soundOn);
}
static function set soundOn(state) {
m_instance.m_soundOn = state;
if (state) {
if (m_instance.m_loopSoundID >= 0) {
playCurLoopSound();
}
} else {
var _local1 = 0;
while (_local1 < m_instance.m_sounds.length) {
stopSound(_local1);
_local1++;
}
}
var _local2 = new Object();
_local2.type = EVENT_CHANGE_SOUND_ON;
_local2.target = m_instance;
_local2[EVENT_VAR_NAME_SOUND_ON] = m_instance.m_soundOn;
m_instance.dispatchEvent(_local2);
//return(soundOn);
}
static function soundIsPlay(id) {
return(m_instance.m_soundsState[id] != ST_STOP);
}
static function playSound(id, ifSoundStop, repeatCount) {
if (repeatCount == undefined) {
repeatCount = 1;
}
if (ifSoundStop == undefined) {
ifSoundStop = false;
}
if (!m_instance.m_soundOn) {
return(undefined);
}
if (ifSoundStop && (soundIsPlay(id))) {
return(undefined);
}
m_instance.m_soundsState[id] = repeatCount;
}
static function stopSound(id) {
Sound(m_instance.m_sounds[id]).stop(m_instance.m_soundsNames[id]);
m_instance.m_soundsState[id] = ST_STOP;
}
static function getSoundAt(soundNum) {
return(m_instance.m_sounds[soundNum]);
}
static function stopAllSound() {
var _local1 = 0;
while (_local1 < m_instance.m_sounds.length) {
stopSound(_local1);
_local1++;
}
}
var m_loopSoundID = -1;
static var m_instance = null;
var m_soundOn = true;
static var ST_PLAY = -1;
static var ST_STOP = 0;
static var PLAY_OPT_ALWAYS = 0;
static var PLAY_OPT_IFSTOP = 1;
static var PLAY_OPT_STOPANDPLAY = 2;
static var EVENT_CHANGE_SOUND_ON = "change soundOn";
static var EVENT_VAR_NAME_SOUND_ON = "SoundOn";
}
Symbol 715 MovieClip [__Packages.mx.events.EventDispatcher] Frame 0
class mx.events.EventDispatcher
{
function EventDispatcher () {
}
static function _removeEventListener(queue, event, handler) {
if (queue != undefined) {
var _local4 = queue.length;
var _local1;
_local1 = 0;
while (_local1 < _local4) {
var _local2 = queue[_local1];
if (_local2 == handler) {
queue.splice(_local1, 1);
return(undefined);
}
_local1++;
}
}
}
static function initialize(object) {
if (_fEventDispatcher == undefined) {
_fEventDispatcher = new mx.events.EventDispatcher();
}
object.addEventListener = _fEventDispatcher.addEventListener;
object.removeEventListener = _fEventDispatcher.removeEventListener;
object.dispatchEvent = _fEventDispatcher.dispatchEvent;
object.dispatchQueue = _fEventDispatcher.dispatchQueue;
}
function dispatchQueue(queueObj, eventObj) {
var _local7 = "__q_" + eventObj.type;
var _local4 = queueObj[_local7];
if (_local4 != undefined) {
var _local5;
for (_local5 in _local4) {
var _local1 = _local4[_local5];
var _local3 = typeof(_local1);
if ((_local3 == "object") || (_local3 == "movieclip")) {
if (_local1.handleEvent != undefined) {
_local1.handleEvent(eventObj);
}
if (_local1[eventObj.type] != undefined) {
if (exceptions[eventObj.type] == undefined) {
_local1[eventObj.type](eventObj);
}
}
} else {
_local1.apply(queueObj, [eventObj]);
}
}
}
}
function dispatchEvent(eventObj) {
if (eventObj.target == undefined) {
eventObj.target = this;
}
this[eventObj.type + "Handler"](eventObj);
dispatchQueue(this, eventObj);
}
function addEventListener(event, handler) {
var _local3 = "__q_" + event;
if (this[_local3] == undefined) {
this[_local3] = new Array();
}
_global.ASSetPropFlags(this, _local3, 1);
_removeEventListener(this[_local3], event, handler);
this[_local3].push(handler);
}
function removeEventListener(event, handler) {
var _local2 = "__q_" + event;
_removeEventListener(this[_local2], event, handler);
}
static var _fEventDispatcher = undefined;
static var exceptions = {move:1, draw:1, load:1};
}
Symbol 716 MovieClip [__Packages.CGame] Frame 0
class CGame extends MovieClip
{
static var m_instance;
var m_carNum, m_curLocation, m_levelData, mcQuestion, gotoAndStop;
function CGame () {
super();
m_instance = this;
m_carNum = 0;
m_curLocation = 0;
CSoundService.createSoundService(CConstant.SOUNDS_NAMES, this, 9999);
m_levelData = new Array(CConstant.LEVEL_COUNT);
var _local3 = 0;
while (_local3 < m_levelData.length) {
m_levelData[_local3] = 0;
_local3++;
}
load();
}
static function butStart() {
m_instance.gotoAndStop("lbRace");
m_instance.txtLevel = curLocation + 1;
}
static function butPlayMoreGames() {
getURL (CConstant.URL_GAME, "_blank");
}
static function butSwitchPause() {
m_instance.m_race.__set__pauseOn(!m_instance.m_race.__get__pauseOn());
}
static function butEndRace() {
m_instance.m_race.breakRace();
m_instance.gotoAndStop("lbLose");
}
static function butWin() {
if (m_instance.m_levelData[curLocation] < getScoreByTime(curTime)) {
m_instance.m_levelData[curLocation] = getScoreByTime(curTime);
}
m_instance.save();
m_instance.m_race.breakRace();
m_instance.gotoAndStop("lbWin");
}
function isGameCoplete() {
var _local3 = false;
var _local2 = 0;
while (_local2 < m_levelData.length) {
if (!m_levelData[_local2]) {
return(false);
}
_local2++;
}
return(true);
}
static function butAbout() {
}
static function butRules() {
m_instance.gotoAndStop("lbRules");
}
static function butBackToSplash() {
m_instance.gotoAndStop("lbSplash");
}
static function butLevelMessageOk() {
m_instance.gotoAndStop("lbWorldMap");
updateLevelStatistics();
}
static function updateLevelStatistics() {
var _local2 = 0;
var _local1 = 0;
while (_local1 < m_instance.m_levelData.length) {
_local2 = _local2 + m_instance.m_levelData[_local1];
_local1++;
}
m_instance.screen.txtTotalScore = _local2;
score = (_local2);
}
static function get carNum() {
return(m_instance.m_carNum);
}
static function set carNum(nCarNum) {
m_instance.m_carNum = nCarNum;
//return(carNum);
}
static function numberToStringWith0(val) {
if (val < 10) {
return(String("0" + val.toString()));
}
return(val.toString());
}
static function get curTime() {
return(m_instance.m_time);
}
static function createTimeString(newTime) {
var _local3 = Math.floor(newTime / 60);
var _local2 = Math.floor(newTime % 60);
var _local4 = Math.floor((newTime - Math.floor(newTime)) * 100);
return(String((((numberToStringWith0(_local3) + ":") + numberToStringWith0(_local2)) + ":") + numberToStringWith0(_local4)));
}
static function set curTime(newTime) {
m_instance.m_time = newTime;
m_instance.txtTime = createTimeString(newTime);
//return(curTime);
}
static function getScoreByTime(time) {
return(Math.round(time * 10));
}
static function set score(nScore) {
if (nScore < 0) {
nScore = 0;
}
m_instance.m_score = nScore;
//return(score);
}
static function get score() {
return(m_instance.m_score);
}
static function get curLocation() {
return(m_instance.m_curLocation);
}
static function set curLocation(curLoc) {
m_instance.m_curLocation = Math.max(Math.min(curLoc, CConstant.LEVEL_COUNT - 1), 0);
//return(curLocation);
}
static function enableLockMessage(mesgNum) {
CSoundService.playSound(CConstant.SND_ERROR);
m_instance.screen.mcLockMessage.mcMessage.gotoAndStop(mesgNum);
m_instance.screen.mcLockMessage.play();
}
static function get instance() {
return(m_instance);
}
static function checkLevelVisible(levelNum) {
var _local2 = 0;
while (_local2 < m_instance.m_levelData.length) {
if (m_instance.m_levelData[_local2] <= 0) {
break;
}
_local2++;
}
if (_local2 < 3) {
_local2 = 3;
} else if (_local2 < 6) {
_local2 = 6;
} else if (_local2 < 9) {
_local2 = 9;
} else if (CConstant.checkURL(_root._url)) {
_local2 = 10;
}
return(levelNum < _local2);
}
static function checkLevelAvalible(levelNum) {
return(checkLevelVisible(levelNum));
}
static function getLevelScore(levelNum) {
return(m_instance.m_levelData[levelNum]);
}
function save() {
var _local3 = SharedObject.getLocal(DATA_NAME);
var _local2 = 0;
while (_local2 < m_levelData.length) {
_local3.data["" + _local2] = m_levelData[_local2];
_local2++;
}
_local3.flush();
_local3.close();
}
function load() {
var _local3 = SharedObject.getLocal(DATA_NAME);
if (_local3.getSize() > 0) {
var _local2 = 0;
while (_local2 < m_levelData.length) {
m_levelData[_local2] = _local3.data["" + _local2];
_local2++;
}
}
_local3.close();
if (checkLevelVisible(9)) {
enable_koen = true;
} else if (checkLevelVisible(7)) {
enable_ford = true;
} else if (checkLevelVisible(4)) {
enable_porsche = true;
}
}
static function enableSubmitQuestion() {
CSoundService.playSound(CConstant.SND_CLICK);
m_instance.mcQuestion = m_instance.attachMovie("submitScreen", "_submitScreen", 31789);
m_instance.mcQuestion.txtScore = score;
Selection.setFocus(m_instance.mcQuestion.txtEnterName);
}
function disableExitQuestion() {
mcQuestion.removeMovieClip();
}
static function buttYes() {
CSoundService.playSound(CConstant.SND_CLICK);
var _local1 = new LoadVars();
_local1.player_name = m_instance.mcQuestion.txtEnterName.text;
_local1.player_score = score;
_local1.send("http://www.limegames.com/high/offroad_madness_2.php", "_blank", "POST");
m_instance.disableExitQuestion();
}
static function buttNo() {
CSoundService.playSound(CConstant.SND_CLICK);
m_instance.disableExitQuestion();
}
function cheatOFF() {
var _local2 = 0;
while (_local2 < m_levelData.length) {
m_levelData[_local2] = 0;
_local2++;
}
var _local3 = SharedObject.getLocal(DATA_NAME);
_local3.clear();
_local3.flush();
_local3.close();
gotoAndStop("lbCheat");
}
function cheatON() {
var _local2 = 0;
while (_local2 < m_levelData.length) {
m_levelData[_local2] = 10;
_local2++;
}
save();
CConstant.checkURL = function () {
return(true);
};
gotoAndStop("lbCheat");
}
function cheat() {
m_instance.m_levelData[curLocation] = 99;
}
static function makeSoundControl(mov) {
makeMovieSwitcher(mov, CSoundService.__get__instance(), CSoundService.EVENT_CHANGE_SOUND_ON, CSoundService.EVENT_VAR_NAME_SOUND_ON);
mov.onPress = function () {
CSoundService.__set__soundOn(!CSoundService.__get__soundOn());
};
mov.updateState(CSoundService.__get__soundOn());
}
static function makeMovieSwitcher(mov, obj, eventName, paramName) {
mov.stop();
mov.updateState = function (state) {
if (state) {
if (this._currentframe != 1) {
this.gotoAndStop(1);
}
} else if (this._currentframe != 2) {
this.gotoAndStop(2);
}
};
obj.addEventListener(eventName, mx.utils.Delegate.create(mov, function (obj) {
this.updateState(obj[paramName]);
}));
}
static var level_complete = false;
static var enable_porsche = false;
static var enable_ford = false;
static var enable_koen = false;
var DATA_NAME = "OffroadMadness";
}
Symbol 717 MovieClip [__Packages.CRace] Frame 0
class CRace extends MovieClip
{
var m_camera, mcBackGround, m_checkPoints, m_curChPoint, m_level, buckUpprocess, m_car, deathCounter, onEnterFrame, m_pauseOn, attachMovie, _scrPause;
function CRace () {
super();
m_camera = new CCamera();
}
function onLoad() {
init();
mcBackGround.gotoAndStop(CGame.__get__curLocation() + 1);
}
function breakRace() {
enableProcess(false);
showPauseScreen(false);
}
function scanChecPoints(mcChPoints, carX) {
m_checkPoints = new Array();
for (var _local8 in mcChPoints) {
m_checkPoints.push(mcChPoints[_local8]);
}
var _local2;
var _local4;
do {
_local4 = false;
var _local3 = 0;
while (_local3 < m_checkPoints.length) {
var _local5 = _local3 + 1;
while (_local5 < m_checkPoints.length) {
if (m_checkPoints[_local5]._x < m_checkPoints[_local3]._x) {
_local4 = true;
_local2 = m_checkPoints[_local5];
m_checkPoints[_local5] = m_checkPoints[_local3];
m_checkPoints[_local3] = _local2;
}
_local5++;
}
_local3++;
}
} while (_local4);
m_curChPoint = -1;
var _local5 = 0;
_local3 = 0;
while (_local3 < m_checkPoints.length) {
if ((m_checkPoints[_local3]._x < carX) && (_local5 > m_curChPoint)) {
m_curChPoint = _local5;
m_checkPoints[_local3].gotoAndStop(2);
}
_local5++;
_local3++;
}
}
function init() {
CGame.__set__curTime(CConstant.TIME_LEVEL_START);
m_level.gotoAndStop(CGame.__get__curLocation() + 1);
m_level = m_level.level;
m_level.mcHit._visible = false;
m_level._xscale = 100;
m_level._yscale = 100;
m_level._x = 0;
m_level._y = CConstant.SCR_HEIGHT;
m_level._parent._visible = true;
m_pEngine = new iriysoft.pengine.CParticleEngine(m_level.mcHit, 7);
scanChecPoints(m_level.mcCheckPoints, m_level.mcVehiclePlace.mcCar._x);
newRace();
}
function startRace() {
buckUpprocess = processRace;
pauseOn = (false);
}
function newRace() {
for (var _local3 in m_level.loopPlace) {
var _local2 = m_level.mcHit.getNextHighestDepth();
if (!m_level.loopPlace[_local3].hit) {
m_level.loopPlace[_local3].hit = m_level.mcHit.attachMovie("raceLoop", "raceLoop" + _local2, _local2, {_x:m_level.loopPlace[_local3]._x, _y:m_level.loopPlace[_local3]._y});
m_level.mcHit["raceLoop" + _local2]._rotation = m_level.loopPlace[_local3]._rotation;
}
m_level.loopPlace[_local3].hit.gotoAndStop(1);
}
m_pEngine.clear();
m_car = new CCar();
initCar(m_level.mcVehiclePlace.mcCar);
m_car.init(m_level.mcVehiclePlace, m_pEngine);
m_camera.__set__window(new flash.geom.Rectangle(0, 0, CConstant.SCR_WIDTH, CConstant.SCR_HEIGHT));
m_camera.__set__limitScrollBorder(new flash.geom.Rectangle(0, -2000, m_checkPoints[m_checkPoints.length - 1]._x - (CConstant.SCR_WIDTH / 2), 4000 - CConstant.SCR_HEIGHT));
m_camera.createDefaultScroll(m_level.mcVehiclePlace.mcCar, new flash.geom.Rectangle(270, 150, 10, 140));
m_camera.createDefaultUpdateView(m_level);
m_camera.t_Biker = m_car;
m_camera.checkPosition = function (posAtWindow) {
this.t_moveCamera.x = 0;
this.t_moveCamera.y = 0;
if (posAtWindow.x < this.m_targetBorderOnScreen.left) {
this.t_moveCamera.x = posAtWindow.x - this.m_targetBorderOnScreen.left;
} else if (posAtWindow.x > this.m_targetBorderOnScreen.right) {
this.t_moveCamera.x = posAtWindow.x - this.m_targetBorderOnScreen.right;
}
if (posAtWindow.y > this.m_targetBorderOnScreen.bottom) {
this.t_moveCamera.y = posAtWindow.y - this.m_targetBorderOnScreen.bottom;
} else if (posAtWindow.y < this.m_targetBorderOnScreen.top) {
this.t_moveCamera.y = posAtWindow.y - this.m_targetBorderOnScreen.top;
} else if (this.t_Biker.t_onGround()) {
if ((posAtWindow.y - this.m_targetBorderOnScreen.bottom) < -5) {
this.t_moveCamera.y = (posAtWindow.y - this.m_targetBorderOnScreen.bottom) / 6;
}
}
return(this.t_moveCamera);
};
var _local3 = 0;
while (_local3 < 20) {
m_camera.process();
_local3++;
}
m_car.t_onGround = m_car.onGround;
startRace();
}
function initCar(mvCar) {
mvCar.gotoAndStop(CConstant.selected_car);
mvCar.car.gotoAndStop(1);
mvCar._rotation = 0;
mvCar._x = m_checkPoints[m_curChPoint]._x + 50;
mvCar._y = m_checkPoints[m_curChPoint]._y - 45;
}
function processTime() {
CGame.curTime = CGame.curTime - 0.04167;
if (CGame.__get__curTime() < 0) {
CGame.butEndRace();
}
}
function processRace() {
if (Key.isDown(32)) {
m_car.finishDeath();
newRace();
return(undefined);
}
processTime();
m_pEngine.process();
m_car.process();
m_car.getForwardWheelClip().mc_effect._visible = false;
m_car.getBackWheelClip().mc_effect._visible = false;
var _local6 = m_car.__get__forwardWheel().__get__pos().x - m_car.__get__forwardWheel().__get__prevPos().x;
var _local7 = m_car.__get__backWheel().__get__pos().x - m_car.__get__backWheel().__get__prevPos().x;
var _local2 = (_local6 + _local7) / 2;
if (_local2 > 4) {
_local2 = 1;
} else if (_local2 < -4) {
_local2 = -1;
} else {
_local2 = _local2 / 4;
}
_local2 = _local2 * 50;
m_car.getForwardWheelClip().mc_effect._xscale = (m_car.getForwardWheelClip().mc_effect._xscale = _local2);
m_car.getBackWheelClip().mc_effect._xscale = (m_car.getBackWheelClip().mc_effect._xscale = _local2);
m_car.getForwardWheelClip().mc_effect._rotation = -m_car.m_carPlace.mcCar._rotation;
m_car.getBackWheelClip().mc_effect._rotation = -m_car.m_carPlace.mcCar._rotation;
if (_local2 < 0) {
m_car.getForwardWheelClip().mc_effect._yscale = (m_car.getForwardWheelClip().mc_effect._yscale = -_local2);
m_car.getBackWheelClip().mc_effect._yscale = (m_car.getBackWheelClip().mc_effect._yscale = -_local2);
} else {
m_car.getForwardWheelClip().mc_effect._yscale = (m_car.getForwardWheelClip().mc_effect._yscale = _local2);
m_car.getBackWheelClip().mc_effect._yscale = (m_car.getBackWheelClip().mc_effect._yscale = _local2);
}
var _local9 = Math.cos(m_car.__get__vehicleAngle() * (Math.PI/180));
var _local8 = -Math.sin(m_car.__get__vehicleAngle() * (Math.PI/180));
var _local4 = (m_car.getForwardWheelClip().mcSpoke._width + 4) / 2;
m_car.getForwardWheelClip().mc_effect._y = m_car.getForwardWheelClip().mcSpoke._y + _local4;
m_car.getBackWheelClip().mc_effect._y = m_car.getBackWheelClip().mcSpoke._y + _local4;
if ((checkWater(m_car.m_bodyMovie.mcHit) || (checkWater(m_car.m_bodyMovie.mcHit1))) || (checkWater(m_car.m_bodyMovie.mcHit2))) {
var _local3 = m_car.__get__forwardWheel().hasIntersection();
if (_last_forward_wheel_inteseption || (_local3)) {
m_car.getForwardWheelClip().mc_effect._visible = true;
} else if (_local3) {
_last_forward_wheel_inteseption = true;
} else {
_last_forward_wheel_inteseption = false;
}
var _local5 = m_car.__get__backWheel().hasIntersection();
if (_last_back_wheel_inteseption || (_local5)) {
m_car.getBackWheelClip().mc_effect._visible = true;
} else if (_local5) {
_last_back_wheel_inteseption = true;
} else {
_last_back_wheel_inteseption = false;
}
m_car.__get__forwardWheel().setFriction(0.3);
m_car.__get__backWheel().setFriction(0.3);
} else {
m_car.__get__forwardWheel().setFriction(0.03);
m_car.__get__backWheel().setFriction(0.03);
}
if (m_checkPoints[m_curChPoint + 1]._x < m_car.getCarX()) {
CSoundService.playSound(CConstant.SND_CHECKPOINT);
m_checkPoints[m_curChPoint + 1].gotoAndStop(2);
m_curChPoint++;
if (m_curChPoint >= (m_checkPoints.length - 1)) {
CGame.butWin();
}
}
if ((checkBonus(m_car.m_bodyMovie.mcHit) || (checkBonus(m_car.m_bodyMovie.mcHit1))) || (checkBonus(m_car.m_bodyMovie.mcHit2))) {
CSoundService.playSound(CConstant.SND_BONUS);
CGame.curTime = CGame.curTime + CConstant.TIME_BONUS_ADD;
}
if (m_car.checkDeathPoints(m_level.mcHit)) {
m_pEngine.clearConstraints();
m_car.initDeath(m_level.mcVehiclePlace, m_pEngine);
deathCounter = 50;
onEnterFrame = processDeath;
}
m_camera.process();
}
function checkWater(hit) {
for (var _local3 in m_level.waterPlace) {
if (hit.hitTest(m_level.waterPlace[_local3])) {
return(true);
}
}
return(false);
}
function checkBonus(hit) {
var _local3 = false;
for (var _local4 in m_level.slidePlace) {
if (hit.hitTest(m_level.slidePlace[_local4])) {
m_car.__get__forwardWheel().setFriction(0);
m_car.__get__backWheel().setFriction(0);
m_car.__get__forwardWheel().coofIce = 0.35;
m_car.__get__backWheel().coofIce = 0.35;
m_car.__get__forwardWheel().rotateMovie = m_car.__get__forwardWheel().iceRotation;
m_car.__get__backWheel().rotateMovie = m_car.__get__forwardWheel().iceRotation;
_local3 = true;
}
}
if (!_local3) {
m_car.__get__forwardWheel().coofIce = 1;
m_car.__get__backWheel().coofIce = 1;
m_car.__get__forwardWheel().setFriction(0.03);
m_car.__get__backWheel().setFriction(0.03);
m_car.__get__forwardWheel().rotateMovie = m_car.__get__forwardWheel().normalRotation;
m_car.__get__backWheel().rotateMovie = m_car.__get__forwardWheel().normalRotation;
}
for (var _local4 in m_level.loopPlace) {
if (hit.hitTest(m_level.loopPlace[_local4].loopBonus)) {
m_level.loopPlace[_local4].hit.gotoAndStop(2);
}
}
for (var _local4 in m_level.mcBonusesVelocity) {
if (hit.hitTest(m_level.mcBonusesVelocity[_local4])) {
m_car.__get__forwardWheel().setAccelerate(m_car.__get__forwardWheel().getAccelerate() * 1.4);
m_car.__get__backWheel().setAccelerate(m_car.__get__backWheel().getAccelerate() * 1.4);
}
}
for (var _local4 in m_level.mcBonusesDownfall) {
if (hit.hitTest(m_level.mcBonusesDownfall[_local4])) {
m_pEngine.clearConstraints();
m_car.initDeath(m_level.mcVehiclePlace, m_pEngine);
deathCounter = 50;
onEnterFrame = processDeath;
}
}
for (var _local4 in m_level.mcBonusPlace) {
if (hit.hitTest(m_level.mcBonusPlace[_local4].mcHit)) {
m_level.mcBonusPlace[_local4].play();
return(true);
}
}
return(false);
}
function processDeath() {
if (Key.isDown(32)) {
m_car.finishDeath();
newRace();
return(undefined);
}
processTime();
m_pEngine.process();
m_car.process();
m_camera.process();
if ((--deathCounter) < 0) {
m_car.finishDeath();
newRace();
}
}
function makeTrickMassage(msg) {
}
function set pauseOn(pauseState) {
m_pauseOn = pauseState;
enableProcess(!m_pauseOn);
showPauseScreen(m_pauseOn);
//return(pauseOn);
}
function get pauseOn() {
return(m_pauseOn);
}
function emptyFunction() {
}
function enableProcess(enable) {
if (enable) {
onEnterFrame = buckUpprocess;
} else if (onEnterFrame != emptyFunction) {
buckUpprocess = onEnterFrame;
onEnterFrame = emptyFunction;
}
}
function showPauseScreen(enable) {
if (enable) {
attachMovie("dmPause", "_scrPause", 32001);
} else {
_scrPause.removeMovieClip();
}
}
var m_pEngine = null;
var _last_forward_wheel_inteseption = false;
var _last_back_wheel_inteseption = false;
}
Symbol 718 MovieClip [__Packages.CCar] Frame 0
class CCar extends iriysoft.pengine.CVehicle
{
var m_bodyMovie, m_carPlace, construct, m_backWheel, m_forwardWheel, setVehicleParam, m_point90, m_point270, m_prevCarAngle, m_carAngle, m_vehicleAngle, onGround, dispatchEvent, m_vehicleParam, m_vehicleMovie, getVehiclePoint, __get__backWheel;
function CCar () {
super();
}
function getForwardWheelClip() {
return(m_bodyMovie.mcD);
}
function getBackWheelClip() {
return(m_bodyMovie.mcA);
}
function init(carPlace, engine) {
m_carPlace = carPlace;
var _local2 = carPlace.mcCar;
var _local4 = carPlace.attachMovie("idWheelJeep", "_dmWheel1", 1010);
var _local6 = carPlace.attachMovie("idWheelJeep", "_dmWheel2", 1020);
_local4._visible = false;
_local6._visible = false;
var _local3 = CConstant.CAR_SKELETONS[CConstant.selected_car - 1];
_local2.car.stop();
construct(_local3, _local2.car, _local2, _local4, _local6);
m_backWheel.setRotationMovie(m_bodyMovie.mcA.mcSpoke);
m_forwardWheel.setRotationMovie(m_bodyMovie.mcD.mcSpoke);
_local3.addToEngine(engine);
setVehicleParam(CConstant.getCarParam(CConstant.selected_car));
resetFlipPoint();
mx.events.EventDispatcher.initialize(this);
}
function process() {
var _local3 = checkAndProcessKey();
super.process();
processKey(_local3);
processFlipPoint();
posWheels(m_backWheel.getMovie(), m_bodyMovie.mcA);
posWheels(m_forwardWheel.getMovie(), m_bodyMovie.mcD);
}
function processDie() {
super.process();
posWheels(m_backWheel.getMovie(), m_bodyMovie.mcA);
posWheels(m_forwardWheel.getMovie(), m_bodyMovie.mcD);
}
function checkAndProcessKey() {
var _local1 = 0;
if (Key.isDown(37)) {
_local1 = _local1 | iriysoft.pengine.CVehicle.KM_MOVE_BODY_BACK;
} else if (Key.isDown(39)) {
_local1 = _local1 | iriysoft.pengine.CVehicle.KM_MOVE_BODY_FORWARD;
}
if (Key.isDown(38)) {
_local1 = _local1 | iriysoft.pengine.CVehicle.KM_ACCELERATE;
} else if (Key.isDown(40)) {
_local1 = _local1 | iriysoft.pengine.CVehicle.KM_BRAKE;
}
return(_local1);
}
function posWheels(wheel, point) {
var _local2 = new Object();
_local2.x = wheel._x;
_local2.y = wheel._y;
wheel._parent.localToGlobal(_local2);
m_bodyMovie.globalToLocal(_local2);
point._y = point._y + ((_local2.y - point._y) / 2);
}
function resetFlipPoint() {
m_point90 = (m_point270 = 0);
m_prevCarAngle = (m_carAngle = 0);
}
function processKey(mask) {
super.processKey(mask);
if (((mask & iriysoft.pengine.CVehicle.KM_ACCELERATE) != 0) && ((prevMask & iriysoft.pengine.CVehicle.KM_ACCELERATE) == 0)) {
if (CConstant.selected_car == CConstant.CAR_FERRARI_458) {
CSoundService.playSound(CConstant.SND_ACCEL, true);
} else if (CConstant.selected_car == CConstant.CAR_ASTON_MARTIN) {
CSoundService.playSound(CConstant.SND_ASTON, true);
} else if (CConstant.selected_car == CConstant.CAR_PORSCHE_CARRERA) {
CSoundService.playSound(CConstant.SND_PORSCHE, true);
} else if (CConstant.selected_car == CConstant.CAR_FORD_GT) {
CSoundService.playSound(CConstant.SND_FORD, true);
} else if (CConstant.selected_car == CConstant.CAR_KOENIGSEGG) {
CSoundService.playSound(CConstant.SND_KOEN, true);
}
}
prevMask = mask;
}
function processFlipPoint() {
m_prevCarAngle = m_carAngle;
m_carAngle = m_vehicleAngle;
if (onGround()) {
resetFlipPoint();
return(undefined);
}
if ((m_carAngle * m_prevCarAngle) < 0) {
return(undefined);
}
if ((m_carAngle > TRICK_ANGLE) && (m_prevCarAngle < TRICK_ANGLE)) {
m_point90++;
} else if ((m_carAngle < TRICK_ANGLE) && (m_prevCarAngle > TRICK_ANGLE)) {
m_point90--;
} else if ((m_carAngle > (-TRICK_ANGLE)) && (m_prevCarAngle < (-TRICK_ANGLE))) {
m_point270++;
} else if ((m_carAngle < (-TRICK_ANGLE)) && (m_prevCarAngle > (-TRICK_ANGLE))) {
m_point270--;
}
if ((m_point90 > 0) && (m_point270 > 0)) {
makeTrick(TRICK_FRONT_FLIP);
resetFlipPoint();
} else if ((m_point90 < 0) && (m_point270 < 0)) {
makeTrick(TRICK_BACK_FLIP);
resetFlipPoint();
}
}
function makeTrick(tirckID) {
dispatchEvent({type:EVENT_TRICK, target:this, trickID:tirckID});
}
function checkDeathPoints(hitMov) {
var _local2 = new Object();
for (var _local4 in m_bodyMovie.mcDeathPoints) {
_local2.x = m_bodyMovie.mcDeathPoints[_local4]._x;
_local2.y = m_bodyMovie.mcDeathPoints[_local4]._y;
m_bodyMovie.mcDeathPoints.localToGlobal(_local2);
if (hitMov.hitTest(_local2.x, _local2.y, true)) {
return(true);
}
}
return(false);
}
function initDeath(carPlace, engine) {
m_carPlace = carPlace;
var _local16 = m_vehicleParam.__get__A().__get__pos().minusNew(m_vehicleParam.__get__A().__get__prevPos());
var _local15 = m_vehicleParam.__get__B().__get__pos().minusNew(m_vehicleParam.__get__B().__get__prevPos());
var _local14 = m_vehicleParam.__get__C().__get__pos().minusNew(m_vehicleParam.__get__C().__get__prevPos());
var _local17 = m_vehicleParam.__get__D().__get__pos().minusNew(m_vehicleParam.__get__D().__get__prevPos());
var _local5 = m_bodyMovie.mcA._xscale;
m_bodyMovie.gotoAndStop(2);
var _local3 = carPlace.attachMovie(CConstant.WHEEL_ID[CConstant.selected_car - 1], "_dmWheel01", 910);
_local3.wh = m_backWheel.getMovie();
m_backWheel.setRotationMovie(_local3.mcSpoke);
_local3.onEnterFrame = function () {
this._x = this.wh._x;
this._y = this.wh._y;
};
_local3._xscale = (_local3._yscale = (_local5 / 100) * m_vehicleMovie._xscale);
var _local4 = carPlace.attachMovie(CConstant.WHEEL_ID[CConstant.selected_car - 1], "_dmWheel02", 920);
_local4.wh = m_forwardWheel.getMovie();
m_forwardWheel.setRotationMovie(_local4.mcSpoke);
_local4.onEnterFrame = function () {
this._x = this.wh._x;
this._y = this.wh._y;
};
_local4._xscale = (_local4._yscale = (_local5 / 100) * m_vehicleMovie._xscale);
var _local13 = m_vehicleParam.__get__A().__get__pos().minusNew(m_vehicleParam.__get__B().__get__pos());
var _local11 = m_vehicleParam.__get__D().__get__pos().minusNew(m_vehicleParam.__get__C().__get__pos());
_local13.mult(20);
_local11.mult(20);
m_backWheel.__get__accelerate().plus(_local13);
m_forwardWheel.__get__accelerate().plus(_local11);
m_backWheel.setAccelerate(0);
m_forwardWheel.setAccelerate(0);
var _local12 = carPlace.attachMovie("idDeathWheel", "_dmWheel11", 1110);
var _local10 = carPlace.attachMovie("idDeathWheel", "_dmWheel12", 1120);
var _local9 = carPlace.attachMovie("idDeathWheel", "_dmWheel13", 1130);
var _local8 = carPlace.attachMovie("idDeathWheel", "_dmWheel14", 1140);
_local12._visible = false;
_local10._visible = false;
_local9._visible = false;
_local8._visible = false;
m_vehicleParam = CConstant.skeletonDeath;
m_vehicleParam.changeGeometry(getVehiclePoint(m_bodyMovie.mcA), getVehiclePoint(m_bodyMovie.mcB), getVehiclePoint(m_bodyMovie.mcC), getVehiclePoint(m_bodyMovie.mcD));
m_backWheel = iriysoft.pengine.particle.CWheel(m_vehicleParam.__get__A());
var _local7 = iriysoft.pengine.particle.CWheel(m_vehicleParam.__get__B());
var _local6 = iriysoft.pengine.particle.CWheel(m_vehicleParam.__get__C());
m_forwardWheel = iriysoft.pengine.particle.CWheel(m_vehicleParam.__get__D());
m_backWheel.setMovie(_local12);
_local7.setMovie(_local10);
_local6.setMovie(_local9);
m_forwardWheel.setMovie(_local8);
m_vehicleParam.addToEngine(engine);
var _local18 = -300;
var _local19 = -300;
m_backWheel.__get__prevPos().minus(_local16);
_local7.__get__prevPos().minus(_local15);
_local6.__get__prevPos().minus(_local14);
m_forwardWheel.__get__prevPos().minus(_local17);
setVehicleParam(CConstant.getCarParam(CConstant.selected_car));
CSoundService.playSound(CConstant.SND_EXPL);
process = processDie;
}
function finishDeath() {
m_carPlace._dmWheel02.removeMovieClip();
m_carPlace._dmWheel01.removeMovieClip();
}
function getCarX() {
return(__get__backWheel().__get__pos().x);
}
function t_onGround() {
return(true);
}
static var TRICK_ANGLE = 130;
static var EVENT_TRICK = "trick";
static var TRICK_FRONT_FLIP = 0;
static var TRICK_BACK_FLIP = 1;
var prevMask = 0;
}
Symbol 719 MovieClip [__Packages.CCamera] Frame 0
class CCamera
{
var t_curPos, t_deltaPos, t_deltaMin, t_deltaMax, m_window, m_limitScrollBorder, t_moveCamera, m_target, m_targetBorderOnScreen, m_movieForScroll;
function CCamera () {
t_curPos = new flash.geom.Point();
t_deltaPos = new flash.geom.Point();
t_deltaMin = new flash.geom.Point();
t_deltaMax = new flash.geom.Point();
}
function process() {
t_curPos.x = getTargetX();
t_curPos.y = getTargetY();
t_deltaMin.x = m_limitScrollBorder.x - m_window.x;
t_deltaMin.y = m_limitScrollBorder.y - m_window.y;
t_deltaMax.x = m_limitScrollBorder.bottomRight.x - m_window.x;
t_deltaMax.y = m_limitScrollBorder.bottomRight.y - m_window.y;
convertToWindowPos(t_curPos);
t_deltaPos = checkPosition(t_curPos);
t_deltaPos.x = Math.min(t_deltaPos.x, t_deltaMax.x);
t_deltaPos.y = Math.min(t_deltaPos.y, t_deltaMax.y);
t_deltaPos.x = Math.max(t_deltaPos.x, t_deltaMin.x);
t_deltaPos.y = Math.max(t_deltaPos.y, t_deltaMin.y);
m_window.offsetPoint(t_deltaPos);
updateView();
}
function convertToWindowPos(pos) {
pos.x = pos.x - m_window.x;
pos.y = pos.y - m_window.y;
}
function get window() {
return(m_window);
}
function set window(newWindow) {
m_window = newWindow;
//return(window);
}
function get limitScrollBorder() {
return(m_limitScrollBorder);
}
function set limitScrollBorder(newBorder) {
m_limitScrollBorder = newBorder;
//return(limitScrollBorder);
}
function getTargetX() {
return(0);
}
function getTargetY() {
return(0);
}
function checkPosition(curPos) {
return(curPos);
}
function updateView() {
}
function createDefaultScroll(target, targetBorderOnScreen) {
t_moveCamera = new flash.geom.Point();
m_target = target;
m_targetBorderOnScreen = targetBorderOnScreen;
getTargetX = function () {
return(this.m_target._x);
};
getTargetY = function () {
return(this.m_target._y);
};
checkPosition = function (posAtWindow) {
this.t_moveCamera.x = 0;
this.t_moveCamera.y = 0;
if (posAtWindow.x < this.m_targetBorderOnScreen.left) {
this.t_moveCamera.x = posAtWindow.x - this.m_targetBorderOnScreen.left;
} else if (posAtWindow.x > this.m_targetBorderOnScreen.right) {
this.t_moveCamera.x = posAtWindow.x - this.m_targetBorderOnScreen.right;
}
if (posAtWindow.y < this.m_targetBorderOnScreen.top) {
this.t_moveCamera.y = posAtWindow.y - this.m_targetBorderOnScreen.top;
} else if (posAtWindow.y > this.m_targetBorderOnScreen.bottom) {
this.t_moveCamera.y = posAtWindow.y - this.m_targetBorderOnScreen.bottom;
}
return(this.t_moveCamera);
};
}
function createDefaultUpdateView(movieForScroll) {
m_movieForScroll = movieForScroll;
updateView = function () {
this.m_movieForScroll._x = this.m_movieForScroll._x - ((this.m_movieForScroll._x + this.window.x) / 2);
this.m_movieForScroll._y = this.m_movieForScroll._y - ((this.m_movieForScroll._y + this.window.y) / 2);
};
}
}
Symbol 720 MovieClip [__Packages.mx.utils.Delegate] Frame 0
class mx.utils.Delegate extends Object
{
var func;
function Delegate (f) {
super();
func = f;
}
static function create(obj, func) {
var _local2 = function () {
var _local2 = arguments.callee.target;
var _local3 = arguments.callee.func;
return(_local3.apply(_local2, arguments));
};
_local2.target = obj;
_local2.func = func;
return(_local2);
}
function createDelegate(obj) {
return(create(obj, func));
}
}
Symbol 721 MovieClip [__Packages.LoopBonus] Frame 0
class LoopBonus extends MovieClip
{
function LoopBonus () {
super();
}
}
Symbol 722 MovieClip [__Packages.CarIcon] Frame 0
class CarIcon extends MovieClip
{
var gotoAndStop, _parent;
function CarIcon () {
super();
}
function set type(val) {
_type = val;
if ((_type == CConstant.CAR_PORSCHE_CARRERA) && (!CGame.checkLevelAvalible(3))) {
gotoAndStop(2);
_parent._parent.btn_go._visible = false;
} else if ((_type == CConstant.CAR_FORD_GT) && (!CGame.checkLevelAvalible(6))) {
gotoAndStop(2);
_parent._parent.btn_go._visible = false;
} else if ((_type == CConstant.CAR_KOENIGSEGG) && (!CGame.checkLevelAvalible(9))) {
gotoAndStop(2);
_parent._parent.btn_go._visible = false;
} else {
gotoAndStop(1);
_parent._parent.btn_go._visible = true;
}
//return(type);
}
function get type() {
return(_type);
}
var _type = 0;
}
Symbol 723 MovieClip [__Packages.SelectedCar] Frame 0
class SelectedCar extends MovieClip
{
var stop, gotoAndStop, m_carNameLabel, next_car, prev_car, onEnterFrame, _currentframe;
function SelectedCar () {
super();
stop();
if (CConstant.selected_car == CConstant.CAR_FERRARI_458) {
gotoAndStop(1);
m_carNameLabel.text = "Pherrari 469 Italia";
} else if (CConstant.selected_car == CConstant.CAR_ASTON_MARTIN) {
gotoAndStop(15);
m_carNameLabel.text = "Aspin Mountain One 77";
} else if (CConstant.selected_car == CConstant.CAR_PORSCHE_CARRERA) {
gotoAndStop(30);
m_carNameLabel.text = "Boosh Carrera GT";
} else if (CConstant.selected_car == CConstant.CAR_FORD_GT) {
gotoAndStop(45);
m_carNameLabel.text = "Phantom GT";
} else if (CConstant.selected_car == CConstant.CAR_KOENIGSEGG) {
gotoAndStop(60);
m_carNameLabel.text = "Zonigsegg CCX";
}
if (CConstant.selected_car == 5) {
path.next_car._visible = false;
} else if (CConstant.selected_car == 1) {
path.prev_car._visible = false;
} else {
path.prev_car._visible = true;
path.next_car._visible = true;
}
var path = this;
next_car.onRelease = function () {
CConstant.selected_car++;
if (CConstant.selected_car == 5) {
path.next_car._visible = false;
} else {
path.prev_car._visible = true;
path.next_car._visible = true;
}
if (CConstant.selected_car == CConstant.CAR_FERRARI_458) {
path.m_carNameLabel.text = "Pherrari 469 Italia";
if (path.ferrari._currentframe == 2) {
path._parent.btn_go._visible = false;
} else {
path._parent.btn_go._visible = true;
}
} else if (CConstant.selected_car == CConstant.CAR_ASTON_MARTIN) {
path.m_carNameLabel.text = "Aspin Mountain One 77";
if (path.aston._currentframe == 2) {
path._parent.btn_go._visible = false;
} else {
path._parent.btn_go._visible = true;
}
} else if (CConstant.selected_car == CConstant.CAR_PORSCHE_CARRERA) {
path.m_carNameLabel.text = "Boosh Carrera GT";
if (path.porsche._currentframe == 2) {
path._parent.btn_go._visible = false;
} else {
path._parent.btn_go._visible = true;
}
} else if (CConstant.selected_car == CConstant.CAR_FORD_GT) {
path.m_carNameLabel.text = "Phantom GT";
if (path.ford._currentframe == 2) {
path._parent.btn_go._visible = false;
} else {
path._parent.btn_go._visible = true;
}
} else if (CConstant.selected_car == CConstant.CAR_KOENIGSEGG) {
path.m_carNameLabel.text = "Zonigsegg CCX";
if (path.koen._currentframe == 2) {
path._parent.btn_go._visible = false;
} else {
path._parent.btn_go._visible = true;
}
}
path.n = 1;
path.gotoAndStop(path._currentframe + this.n);
};
prev_car.onRelease = function () {
CConstant.selected_car--;
if (CConstant.selected_car == 1) {
path.prev_car._visible = false;
} else {
path.prev_car._visible = true;
path.next_car._visible = true;
}
if (CConstant.selected_car == CConstant.CAR_FERRARI_458) {
path.m_carNameLabel.text = "Pherrari 469 Italia";
if (path.ferrari._currentframe == 2) {
path._parent.btn_go._visible = false;
} else {
path._parent.btn_go._visible = true;
}
} else if (CConstant.selected_car == CConstant.CAR_ASTON_MARTIN) {
path.m_carNameLabel.text = "Aspin Mountain One 77";
if (path.aston._currentframe == 2) {
path._parent.btn_go._visible = false;
} else {
path._parent.btn_go._visible = true;
}
} else if (CConstant.selected_car == CConstant.CAR_PORSCHE_CARRERA) {
path.m_carNameLabel.text = "Boosh Carrera GT";
if (path.porsche._currentframe == 2) {
path._parent.btn_go._visible = false;
} else {
path._parent.btn_go._visible = true;
}
} else if (CConstant.selected_car == CConstant.CAR_FORD_GT) {
path.m_carNameLabel.text = "Phantom GT";
if (path.ford._currentframe == 2) {
path._parent.btn_go._visible = false;
} else {
path._parent.btn_go._visible = true;
}
} else if (CConstant.selected_car == CConstant.CAR_KOENIGSEGG) {
path.m_carNameLabel.text = "Zonigsegg CCX";
if (path.koen._currentframe == 2) {
path._parent.btn_go._visible = false;
} else {
path._parent.btn_go._visible = true;
}
}
path.n = -1;
path.gotoAndStop(path._currentframe + this.n);
};
onEnterFrame = update;
}
function update() {
if ((CConstant.selected_car == CConstant.CAR_FERRARI_458) && (_currentframe == 1)) {
} else if ((CConstant.selected_car == CConstant.CAR_ASTON_MARTIN) && (_currentframe == 15)) {
} else if ((CConstant.selected_car == CConstant.CAR_PORSCHE_CARRERA) && (_currentframe == 30)) {
} else if ((CConstant.selected_car == CConstant.CAR_FORD_GT) && (_currentframe == 45)) {
} else if ((CConstant.selected_car == CConstant.CAR_KOENIGSEGG) && (_currentframe == 60)) {
} else {
gotoAndStop(_currentframe + n);
}
if (CConstant.selected_car == 1) {
prev_car._visible = false;
} else if (CConstant.selected_car == 5) {
next_car._visible = false;
} else {
prev_car._visible = true;
next_car._visible = true;
}
}
var n = 1;
}
Symbol 724 MovieClip [__Packages.iriysoft.CInvisibleMovie] Frame 0
class iriysoft.CInvisibleMovie extends MovieClip
{
var _visible;
function CInvisibleMovie () {
super();
_visible = false;
}
}
Symbol 725 MovieClip [__Packages.CAnimatedScreen] Frame 0
class CAnimatedScreen extends MovieClip
{
var m_func, play, _totalframes, _currentframe;
function CAnimatedScreen () {
super();
}
function callFunction(func) {
m_func = func;
CSoundService.playSound(CConstant.SND_CLICK);
play();
}
function onEnterFrame() {
if (_currentframe == _totalframes) {
m_func();
}
}
}
Symbol 726 MovieClip [__Packages.CMapIcon] Frame 0
class CMapIcon extends MovieClip
{
var m_levelNum, gotoAndStop, txtLevelScore, _currentframe;
function CMapIcon () {
super();
}
function onLoad() {
deselect();
}
function select() {
if (CGame.checkLevelAvalible(m_levelNum)) {
CGame.__set__curLocation(m_levelNum);
gotoAndStop(1);
CGame.updateLevelStatistics();
txtLevelScore = CGame.getLevelScore(m_levelNum);
return(true);
}
if (m_levelNum < 6) {
CGame.enableLockMessage(3);
} else if (m_levelNum < 9) {
CGame.enableLockMessage(4);
} else if (CConstant.checkURL(_root._url)) {
CGame.enableLockMessage(5);
} else {
CGame.enableLockMessage(2);
}
return(false);
}
function deselect() {
gotoAndStop(2);
txtLevelScore = CGame.getLevelScore(m_levelNum);
}
function lock() {
gotoAndStop(3);
}
function isLock() {
return(_currentframe == 3);
}
function isSelected() {
return(_currentframe == 1);
}
function onPress() {
if (select()) {
CSoundService.playSound(CConstant.SND_CLICK);
}
}
function onEnterFrame() {
if (CGame.checkLevelAvalible(m_levelNum)) {
if (isLock()) {
deselect();
}
} else if (!isLock()) {
lock();
}
if (isSelected()) {
if (m_levelNum != CGame.__get__curLocation()) {
deselect();
}
} else if (m_levelNum == CGame.__get__curLocation()) {
select();
}
}
}
Symbol 138 Button
on (release) {
CGame.butLevelMessageOk();
}
Symbol 142 Button
on (release) {
CGame.butSwitchPause();
}
Symbol 160 Button
on (press) {
CGame.buttNo();
}
Symbol 171 Button
on (press) {
CGame.buttYes();
}
Symbol 174 MovieClip [idDeathWheel] Frame 1
#initclip 42
Object.registerClass("idDeathWheel", iriysoft.CInvisibleMovie);
#endinitclip
Instance of Symbol 101 MovieClip "mc_effect" in Symbol 182 MovieClip [idHummerWheel] Frame 1
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 101 MovieClip "mc_effect" in Symbol 188 MovieClip [idEscaladeWheel] Frame 1
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 101 MovieClip "mc_effect" in Symbol 194 MovieClip [idAudiWeel] Frame 1
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 101 MovieClip "mc_effect" in Symbol 200 MovieClip [idRangeRoverWheel] Frame 1
onClipEvent (load) {
this._visible = false;
}
Symbol 213 MovieClip Frame 1
stop();
Symbol 237 Button
on (release) {
callFunction(mx.utils.Delegate.create(CGame.__get__instance(), CGame.butRules));
}
Symbol 241 Button
on (release) {
CGame.butPlayMoreGames();
}
Symbol 245 Button
on (release) {
callFunction(mx.utils.Delegate.create(CGame.__get__instance(), CGame.butLevelMessageOk));
}
Symbol 246 MovieClip [scrSplash] Frame 1
#initclip 56
Object.registerClass("scrSplash", CAnimatedScreen);
#endinitclip
Symbol 252 MovieClip Frame 1
stop();
Symbol 259 Button
on (release) {
getURL ("http://www.iriysoft.ru", "_blank");
}
Symbol 266 Button
on (release) {
callFunction(mx.utils.Delegate.create(CGame.__get__instance(), CGame.butBackToSplash));
}
Symbol 267 MovieClip [scrAbout] Frame 1
#initclip 43
Object.registerClass("scrAbout", CAnimatedScreen);
#endinitclip
Symbol 267 MovieClip [scrAbout] Frame 10
stop();
Symbol 273 MovieClip [scrRules] Frame 1
#initclip 44
Object.registerClass("scrRules", CAnimatedScreen);
#endinitclip
Symbol 273 MovieClip [scrRules] Frame 10
stop();
Symbol 291 MovieClip [Race__] Frame 1
#initclip 45
Object.registerClass("Race__", CMapIcon);
#endinitclip
Instance of Symbol 291 MovieClip [Race__] in Symbol 292 MovieClip Frame 1
onClipEvent (load) {
this.m_levelNum = 9;
}
Instance of Symbol 291 MovieClip [Race__] in Symbol 292 MovieClip Frame 1
onClipEvent (load) {
this.m_levelNum = 7;
}
Instance of Symbol 291 MovieClip [Race__] in Symbol 292 MovieClip Frame 1
onClipEvent (load) {
this.m_levelNum = 8;
}
Instance of Symbol 291 MovieClip [Race__] in Symbol 292 MovieClip Frame 1
onClipEvent (load) {
this.m_levelNum = 4;
}
Instance of Symbol 291 MovieClip [Race__] in Symbol 292 MovieClip Frame 1
onClipEvent (load) {
this.m_levelNum = 6;
}
Instance of Symbol 291 MovieClip [Race__] in Symbol 292 MovieClip Frame 1
onClipEvent (load) {
this.m_levelNum = 5;
}
Instance of Symbol 291 MovieClip [Race__] in Symbol 292 MovieClip Frame 1
onClipEvent (load) {
this.m_levelNum = 2;
}
Instance of Symbol 291 MovieClip [Race__] in Symbol 292 MovieClip Frame 1
onClipEvent (load) {
this.m_levelNum = 3;
}
Instance of Symbol 291 MovieClip [Race__] in Symbol 292 MovieClip Frame 1
onClipEvent (load) {
this.m_levelNum = 0;
}
Instance of Symbol 291 MovieClip [Race__] in Symbol 292 MovieClip Frame 1
onClipEvent (load) {
this.m_levelNum = 1;
}
Symbol 299 Button
on (release) {
callFunction(mx.utils.Delegate.create(CGame.__get__instance(), CGame.butStart));
}
Symbol 308 Button
on (release) {
CGame.enableSubmitQuestion();
}
Symbol 317 Button
on (release) {
callFunction(mx.utils.Delegate.create(CGame.__get__instance(), CGame.butBackToSplash));
}
Symbol 328 MovieClip Frame 1
stop();
Symbol 331 MovieClip Frame 1
stop();
Symbol 331 MovieClip Frame 69
this.gotoAndStop(1);
Symbol 332 MovieClip [scrWorldMap] Frame 1
#initclip 46
Object.registerClass("scrWorldMap", CAnimatedScreen);
#endinitclip
Instance of Symbol 86 MovieClip [select_car] in Symbol 332 MovieClip [scrWorldMap] Frame 1
/* no clip actions */
Instance of Symbol 331 MovieClip "mcUnlockCar" in Symbol 332 MovieClip [scrWorldMap] Frame 1
onClipEvent (load) {
if ((CGame.checkLevelVisible(9) && (!CGame.enable_koen)) && (CGame.level_complete)) {
CGame.enable_koen = true;
this.car.gotoAndStop(3);
this.gotoAndPlay(2);
CGame.level_complete = false;
} else if ((CGame.checkLevelVisible(7) && (!CGame.enable_ford)) && (CGame.level_complete)) {
CGame.enable_ford = true;
this.car.gotoAndStop(2);
this.gotoAndPlay(2);
CGame.level_complete = false;
} else if ((CGame.checkLevelVisible(4) && (!CGame.enable_porsche)) && (CGame.level_complete)) {
CGame.enable_porsche = true;
this.car.gotoAndStop(1);
this.gotoAndPlay(2);
CGame.level_complete = false;
}
this.onEnterFrame = function () {
if (this._currentframe != 1) {
this.gotoAndStop(this._currentframe + 1);
}
};
}
Symbol 346 MovieClip Frame 1
stop();
stop();
Symbol 374 MovieClip [emptyClip] Frame 1
#initclip 47
Object.registerClass("emptyClip", iriysoft.CInvisibleMovie);
#endinitclip
Symbol 376 MovieClip [mcJeepHit] Frame 1
#initclip 48
Object.registerClass("mcJeepHit", iriysoft.CInvisibleMovie);
#endinitclip
Symbol 377 MovieClip [mcJeepHit2] Frame 1
#initclip 49
Object.registerClass("mcJeepHit2", iriysoft.CInvisibleMovie);
#endinitclip
Symbol 380 MovieClip [emptyWheelClip] Frame 1
#initclip 50
Object.registerClass("emptyWheelClip", iriysoft.CInvisibleMovie);
#endinitclip
Symbol 453 MovieClip Frame 25
stop();
Symbol 454 MovieClip Frame 61
stop();
Symbol 482 MovieClip Frame 1
stop();
Symbol 493 MovieClip [bonusHit] Frame 1
#initclip 51
Object.registerClass("bonusHit", iriysoft.CInvisibleMovie);
#endinitclip
Symbol 494 MovieClip Frame 1
stop();
Symbol 494 MovieClip Frame 11
stop();
Instance of Symbol 497 MovieClip in Symbol 499 MovieClip Frame 1
onClipEvent (load) {
this._visible = false;
}
Symbol 666 MovieClip [scrRace] Frame 1
#initclip 52
Object.registerClass("scrRace", CRace);
#endinitclip
Instance of Symbol 665 MovieClip [idLevels] "m_level" in Symbol 666 MovieClip [scrRace] Frame 1
onClipEvent (load) {
this._visible = false;
}
Symbol 670 Button
on (press) {
CGame.butSwitchPause();
}
Instance of Symbol 685 MovieClip in Symbol 688 MovieClip Frame 1
onClipEvent (load) {
this.txtTime = CGame.createTimeString(CGame.__get__curTime());
_parent.curTime = CGame.curTime;
}
onClipEvent (enterFrame) {
if (_parent.curTime > 0) {
_parent.curTime = _parent.curTime - 2.5;
if (_parent.curTime < 0) {
_parent.curTime = 0;
}
this.txtTime = CGame.createTimeString(_parent.curTime);
}
}
Instance of Symbol 687 MovieClip in Symbol 688 MovieClip Frame 1
onClipEvent (load) {
this.txtScore = 0;
}
onClipEvent (enterFrame) {
this.txtScore = CGame.getScoreByTime(CGame.__get__curTime() - _parent.curTime);
}
Symbol 689 Button
on (release) {
callFunction(mx.utils.Delegate.create(CGame.__get__instance(), CGame.butLevelMessageOk));
CGame.level_complete = true;
}
Symbol 690 Button
on (release) {
CGame.butPlayMoreGames();
}
Symbol 691 MovieClip [scrWin] Frame 1
#initclip 53
Object.registerClass("scrWin", CAnimatedScreen);
#endinitclip
Symbol 691 MovieClip [scrWin] Frame 10
stop();
Symbol 695 Button
on (release) {
CGame.enableSubmitQuestion();
}
Symbol 701 Button
on (release) {
callFunction(mx.utils.Delegate.create(CGame.__get__instance(), CGame.butLevelMessageOk));
}
Symbol 702 MovieClip [scrLose] Frame 1
#initclip 54
Object.registerClass("scrLose", CAnimatedScreen);
#endinitclip
Symbol 702 MovieClip [scrLose] Frame 10
stop();
Symbol 703 MovieClip [gameMovie] Frame 1
#initclip 55
Object.registerClass("gameMovie", CGame);
#endinitclip
CSoundService.playLoopSound(CConstant.SND_SCREEN, CConstant.LOOP_VOLUME);
stop();
Instance of Symbol 252 MovieClip in Symbol 703 MovieClip [gameMovie] Frame 1
onClipEvent (load) {
CGame.makeSoundControl(this);
}
Instance of Symbol 255 MovieClip in Symbol 703 MovieClip [gameMovie] Frame 1
on (release) {
CGame.butPlayMoreGames();
}
Symbol 703 MovieClip [gameMovie] Frame 16
CSoundService.playLoopSound(CConstant.SND_SCREEN, CConstant.LOOP_VOLUME);
Symbol 703 MovieClip [gameMovie] Frame 31
CSoundService.playLoopSound(CConstant.SND_SCREEN, CConstant.LOOP_VOLUME);
Symbol 703 MovieClip [gameMovie] Frame 46
CSoundService.playLoopSound(CConstant.SND_SCREEN, CConstant.LOOP_VOLUME);
Symbol 703 MovieClip [gameMovie] Frame 61
CSoundService.playLoopSound(CConstant.SND_GAME, CConstant.LOOP_VOLUME);
Symbol 703 MovieClip [gameMovie] Frame 76
CSoundService.playLoopSound(CConstant.SND_SCREEN, CConstant.LOOP_VOLUME);
Instance of Symbol 697 MovieClip in Symbol 703 MovieClip [gameMovie] Frame 76
onClipEvent (load) {
if (this._parent.isGameCoplete()) {
_visible = true;
} else {
_visible = false;
}
}
Symbol 703 MovieClip [gameMovie] Frame 91
CSoundService.playLoopSound(CConstant.SND_SCREEN, CConstant.LOOP_VOLUME);
Symbol 703 MovieClip [gameMovie] Frame 105
gotoAndStop ("lbWorldMap");