Frame 1
stop();
Instance of Symbol 14 MovieClip in Frame 1
onClipEvent (load) {
var numPercentage = 0;
this.mcStripe._visible = false;
var numMaxWidth = this.mcStripe._width;
}
onClipEvent (enterFrame) {
if ((_parent.getBytesLoaded() > 1) && (_parent.getBytesTotal() > 1)) {
numPercentage = Math.floor((100 * _parent.getBytesLoaded()) / _parent.getBytesTotal());
this.mcStripe._width = (numPercentage * numMaxWidth) / 100;
this.mcStripe._visible = true;
this.txtPercentage = String(numPercentage) + "%";
if (((((numPercentage == 15) || (numPercentage == 35)) || (numPercentage == 75)) || (numPercentage == 85)) || (numPercentage == 99)) {
this.mcPre.gotoAndStop(2);
}
if ((((numPercentage == 20) || (numPercentage == 40)) || (numPercentage == 80)) || (numPercentage == 90)) {
this.mcPre.gotoAndStop(1);
}
if (numPercentage >= 100) {
_parent.gotoAndStop(2);
}
}
}
Frame 2
stop();
Frame 28
stop();
Symbol 1 MovieClip [dmSoundService] Frame 1
#initclip 31
Object.registerClass("dmSoundService", CSoundService);
#endinitclip
Symbol 13 MovieClip Frame 1
stop();
Symbol 744 MovieClip [__Packages.CSoundService] Frame 0
class CSoundService extends MovieClip
{
var m_sounds, m_soundsState, m_soundsNames, createEmptyMovieClip, onEnterFrame;
function CSoundService () {
super();
}
function realPlaySound(id, repeatCount) {
if (m_soundOff) {
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] = this.ST_STOP;
};
m_sounds[_local2] = _local3;
_local2++;
}
onEnterFrame = processSounds;
}
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) {
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();
}
}
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 soundOff() {
var _local1 = 0;
while (_local1 < m_instance.m_sounds.length) {
stopSound(_local1);
_local1++;
}
m_instance.m_soundOff = true;
}
static function soundOn() {
m_instance.m_soundOff = false;
if (m_instance.m_loopSoundID >= 0) {
playCurLoopSound();
}
}
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_soundOff) {
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 soundIsOn() {
return(!m_instance.m_soundOff);
}
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_soundOff = false;
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;
}
Symbol 745 MovieClip [__Packages.CMan] Frame 0
class CMan extends MovieClip
{
var stopFlag, state, mc, KLeft, KRight, gotoAndStop;
function CMan () {
super();
stopFlag = false;
state = 0;
}
function stopAnim() {
stopFlag = true;
}
function stopMCAnim() {
mc.stop();
}
function startAnim() {
stopFlag = false;
}
function process(KL, KR) {
KLeft = KL;
KRight = KR;
if (stopFlag) {
return(undefined);
}
if (KL) {
toLeft();
} else if (KR) {
toRight();
} else if ((state == 1) || (state == 2)) {
fromLeft();
} else if ((state == 4) || (state == 5)) {
fromRight();
}
}
function toLeft() {
if (state == 0) {
gotoAndStop("toLeft");
state = 1;
} else if (state == 3) {
gotoAndStop("toLeft");
mc.gotoAndPlay((ANIM_FRAMES - mc._currentframe) + 1);
state = 1;
} else if ((state == 4) || (state == 5)) {
fromRight();
state = 6;
}
}
function toRight() {
if (state == 0) {
gotoAndStop("toRight");
state = 4;
} else if (state == 6) {
gotoAndStop("toRight");
mc.gotoAndPlay((ANIM_FRAMES - mc._currentframe) + 1);
state = 4;
} else if ((state == 1) || (state == 2)) {
fromLeft();
state = 3;
}
}
function fromLeft() {
if (state == 1) {
gotoAndStop("fromLeft");
mc.gotoAndPlay((ANIM_FRAMES - mc._currentframe) + 1);
state = 3;
} else if (state == 2) {
gotoAndStop("fromLeft");
state = 3;
}
}
function fromRight() {
if (state == 4) {
gotoAndStop("fromRight");
mc.gotoAndPlay((ANIM_FRAMES - mc._currentframe) + 1);
state = 6;
} else if (state == 5) {
gotoAndStop("fromRight");
state = 6;
}
}
function endMove() {
if (state == 1) {
gotoAndStop("left");
state = 2;
} else if (state == 3) {
gotoAndStop("stay");
state = 0;
} else if (state == 4) {
gotoAndStop("right");
state = 5;
} else if (state == 6) {
gotoAndStop("stay");
state = 0;
}
}
static var LEFT_BUTTON = 37;
static var RIGHT_BUTTON = 39;
static var ANIM_FRAMES = 7;
}
Symbol 746 MovieClip [__Packages.CLevel] Frame 0
class CLevel extends MovieClip
{
var m_levelPlace, attachMovie, m_hitPlace, m_back, m_BonusPlace, m_engine, m_camera, _x;
function CLevel () {
super();
}
function initLevel(levelNum) {
MyBonus.bonusListArr = [];
m_levelPlace = attachMovie(CConstants.levelNames[levelNum], "_levelName", DEPTH_LEVEL);
m_hitPlace = m_levelPlace.mcHit;
m_back = m_levelPlace.mcMiddle;
m_BonusPlace = m_levelPlace.BonusPlace;
m_engine = new CParticleEngine(m_hitPlace, CConstants.Gravity, 0.995);
m_camera = new CCamera();
}
function initCamera(movieCenteredAtScreen, windowWidth, windowHeight, lookAtX, lookAtY) {
m_camera.init(movieCenteredAtScreen, this, windowWidth, windowHeight);
m_camera.setLookPoint(lookAtX, lookAtY);
m_camera.setLevelSize(m_hitPlace._width, m_hitPlace._height);
m_camera.process();
}
function process() {
m_engine.process();
m_camera.process();
CRaceEngine.fonMC._x = Math.round(_x / 5) % int(CRaceEngine.fonMC._width / 2);
}
function checkFinish(targetObject) {
return(m_levelPlace.m_finishWall.hitTest(targetObject));
}
function getEngine() {
return(m_engine);
}
function getLevelPlace() {
return(m_levelPlace);
}
function getVehiclePlace() {
return(m_levelPlace.m_vehiclePlace);
}
function getHitPlace() {
return(m_hitPlace);
}
function getBonusPlace() {
return(m_BonusPlace);
}
function getBikePlace() {
var _local2 = new Object();
_local2.x = 0;
_local2.y = 0;
m_levelPlace.mcBikePlace.localToGlobal(_local2);
getVehiclePlace().globalToLocal(_local2);
return(_local2);
}
static var DEPTH_VECHICLE_PLACE = 150;
static var DEPTH_LEVEL = 110;
static var DEPTH_MIDDLE = 100;
static var DEPTH_HIT_LEVEL = 105;
}
Symbol 747 MovieClip [__Packages.CParticleEngine] Frame 0
class CParticleEngine
{
var prevTime, m_particles, m_constraints, m_hitMovie, m_gravity, m_koeffDamp;
function CParticleEngine (hitMovie, nGravity, koeffDamp) {
prevTime = getTimer();
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.99;
}
gravity = (nGravity);
m_koeffDamp = koeffDamp;
}
function addParticle(p) {
m_particles.push(p);
}
function process() {
var _local5 = D_TIME / REPEAT_COUNT;
var _local2;
var _local3 = m_particles.length;
_local2 = 0;
while (_local2 < _local3) {
m_particles[_local2].accelerate.plusXY(0, (m_gravity * m_particles[_local2].mass) / REPEAT_COUNT);
_local2++;
}
var _local4 = 0;
while (_local4 < REPEAT_COUNT) {
_local2 = 0;
while (_local2 < _local3) {
m_particles[_local2].accelerate.plusXY(0, m_gravity * m_particles[_local2].mass);
m_particles[_local2].verlet(_local5, m_koeffDamp);
_local2++;
}
_local2 = 0;
while (_local2 < m_constraints.length) {
m_constraints[_local2].resolve();
_local2++;
}
_local2 = 0;
while (_local2 < _local3) {
m_particles[_local2].checkCollision(m_hitMovie);
m_particles[_local2].synchronizeMovie();
_local2++;
}
_local4++;
}
_local2 = 0;
while (_local2 < _local3) {
m_particles[_local2].accelerate.init(0, 0);
_local2++;
}
}
function addConstraint(c) {
m_constraints.push(c);
}
function clear() {
m_particles = [];
clearConstraints();
}
function clearConstraints() {
m_constraints = [];
}
function resetTime() {
prevTime = getTimer();
}
function drawSpringConstraints() {
if (CGameService.__get__DEBUG_MODE()) {
var _local4 = new Object();
var _local3 = new Object();
var _local2 = 0;
while (_local2 < m_constraints.length) {
_local4.x = m_constraints[_local2].m_p1.pos.x;
_local4.y = m_constraints[_local2].m_p1.pos.y;
_local3.x = m_constraints[_local2].m_p2.pos.x;
_local3.y = m_constraints[_local2].m_p2.pos.y;
m_hitMovie.localToGlobal(_local4);
m_hitMovie.localToGlobal(_local3);
CGameService.drawLine(_local4.x, _local4.y, _local3.x, _local3.y, 0.5, 0, 100);
_local2++;
}
}
}
static var SEC_PER_FRAME = 0.0555555555555556;
static var REPEAT_COUNT = 2;
static var D_TIME = SEC_PER_FRAME / REPEAT_COUNT;
}
Symbol 748 MovieClip [__Packages.CParticle] Frame 0
class CParticle
{
var m_curPosition, m_prevPosition, m_accelerate, m_buckup, m_mass, m_mc;
function CParticle () {
m_curPosition = new CVector2D();
m_prevPosition = new CVector2D();
m_accelerate = new CVector2D();
m_buckup = new 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);
}
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);
}
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 749 MovieClip [__Packages.CVector2D] Frame 0
class 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 getUgol() {
return(Math.atan2(y, x));
}
function duplicate() {
return(new CVector2D(x, 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 = Math.sqrt((x * x) + (y * y));
x = x / _local2;
y = y / _local2;
}
function reverseNew() {
return(new CVector2D(-x, -y));
}
function scalar(v) {
return((x * v.x) + (y * v.y));
}
function modul() {
return(Math.sqrt((x * x) + (y * y)));
}
function reflectFromNormal(n) {
var _local2 = Math.atan2(n.y, n.x);
rotate(-_local2);
x = -x;
rotate(_local2);
}
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 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 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 _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(((("( " + x) + ", ") + y) + " )");
}
}
Symbol 750 MovieClip [__Packages.IConstraint] Frame 0
interface IConstraint
{
}
Symbol 751 MovieClip [__Packages.CGameService] Frame 0
class CGameService
{
static var m_instance;
var m_root, m_pauseOn, m_debugMode, m_pauseListeners, m_score;
function CGameService (rootPointer, soundsNames) {
m_instance = this;
m_root = rootPointer;
m_pauseOn = false;
m_debugMode = false;
trace("nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn");
m_pauseListeners = new CGroup();
m_score = 0;
CSoundService.createSoundService(soundsNames, m_root, 9999);
}
static function get instance() {
return(m_instance);
}
static function get _root() {
return(m_instance.m_root);
}
static function set pauseOn(pauseState) {
trace("dddddddf");
m_instance.m_pauseOn = pauseState;
if (pauseState) {
m_instance.m_pauseListeners.callFunction("enablePause");
} else {
m_instance.m_pauseListeners.callFunction("disablePause");
}
//return(pauseOn);
}
static function get pauseOn() {
return(m_instance.m_pauseOn);
}
static function addPauseListener(obj) {
trace(obj);
m_instance.m_pauseListeners.addElement(obj);
}
static function removePauseListener(obj) {
m_instance.m_pauseListeners.removeElement(obj);
}
static function getGlobalXY(pX, pY, movie) {
var _local1 = {x:pX, y:pY};
movie.localToGlobal(_local1);
return(_local1);
}
static function get DEBUG_MODE() {
return(m_instance.m_debugMode);
}
static function set DEBUG_MODE(debugMode) {
m_instance.m_debugMode = debugMode;
if (debugMode) {
m_instance.m_drawArea = m_instance.m_root.createEmptyMovieClip("__drawArea", DEPTH_DRAW_AREA);
} else {
m_instance.m_drawArea.removeMovieClip();
}
//return(DEBUG_MODE);
}
static function drawLine(x1, y1, x2, y2, thickness, rgb, alpha) {
if (m_instance.m_debugMode) {
m_instance.m_drawArea.lineStyle(thickness, rgb, alpha);
m_instance.m_drawArea.moveTo(x1, y1);
m_instance.m_drawArea.lineTo(x2, y2);
}
}
static function clearAll() {
if (m_instance.m_debugMode) {
m_instance.m_drawArea.clear();
}
}
static function numberToStringWith0(val) {
if (val < 10) {
return(String("0" + val.toString()));
}
return(val.toString());
}
static function setFilter(movie, filter) {
var _local1 = new Array();
_local1.push(filter);
movie.filters = _local1;
}
static var DEPTH_DRAW_AREA = 32001;
}
Symbol 752 MovieClip [__Packages.CGroup] Frame 0
class CGroup
{
var m_elements;
function CGroup () {
m_elements = new Array();
}
function addElement(element) {
var _local2 = 0;
while (_local2 < m_elements.length) {
if (m_elements[_local2] == null) {
m_elements[_local2] = element;
return(undefined);
}
_local2++;
}
m_elements.push(element);
}
function removeElement(element) {
var _local2 = m_elements.length - 1;
while (_local2 >= 0) {
if (m_elements[_local2] == element) {
m_elements[_local2] = null;
}
_local2--;
}
}
function getElementAt(elementNum) {
return(m_elements[elementNum]);
}
function removeAllElements() {
var _local2 = m_elements.length - 1;
while (_local2 >= 0) {
m_elements[_local2] = null;
_local2--;
}
}
function callFunction(funcName) {
var _local2 = m_elements.length - 1;
while (_local2 >= 0) {
if (m_elements[_local2] != null) {
m_elements[_local2][funcName]();
}
_local2--;
}
}
function callFunctionParam1(funcName, param1) {
var _local2 = m_elements.length - 1;
while (_local2 >= 0) {
if (m_elements[_local2] != null) {
m_elements[_local2][funcName](param1);
}
_local2--;
}
}
function callFunctionParam2(funcName, param1, param2) {
var _local2 = m_elements.length - 1;
while (_local2 >= 0) {
if (m_elements[_local2] != null) {
m_elements[_local2][funcName](param1, param2);
}
_local2--;
}
}
}
Symbol 753 MovieClip [__Packages.IPauseListener] Frame 0
interface IPauseListener
{
}
Symbol 754 MovieClip [__Packages.CCamera] Frame 0
class CCamera
{
var m_targetMoviePos, m_targetMovie, m_levelMovie, m_screenWidth, m_screenHeight, temp_dlevX, m_levelWidth, temp_dlevY, m_levelHeight, m_targetXAtScreen, m_targetYAtScreen;
function CCamera () {
m_targetMoviePos = new Object();
}
function init(targetMovie, levelMovie, screenWidth, screenHeight) {
m_targetMovie = targetMovie;
m_levelMovie = levelMovie;
m_screenWidth = screenWidth;
m_screenHeight = screenHeight;
setLevelSize(m_levelMovie._width, m_levelMovie._height);
setLookPoint(m_screenWidth / 2, m_screenHeight / 2);
temp_dlevX = Math.round(m_screenWidth - m_levelWidth);
temp_dlevY = Math.round(m_screenHeight + m_levelHeight);
tx = 0;
ty = 0;
}
function setLevelSize(levelWidth, levelHeight) {
m_levelWidth = levelWidth;
m_levelHeight = levelHeight;
}
function setLookPoint(px, py) {
m_targetXAtScreen = px;
m_targetYAtScreen = py;
process();
}
function pointOutsideLeft(pX) {
return(Math.abs(pX) < Math.abs(m_levelMovie._x));
}
function process() {
m_targetMoviePos.x = m_targetMovie._x;
m_targetMoviePos.y = m_targetMovie._y;
m_targetMovie._parent.localToGlobal(m_targetMoviePos);
m_levelMovie._parent.globalToLocal(m_targetMoviePos);
tx = m_levelMovie._x + Math.round(m_targetXAtScreen - m_targetMoviePos.x);
ty = m_levelMovie._y + (Math.round(m_targetYAtScreen - m_targetMoviePos.y) / 2);
if (tx > 0) {
tx = 0;
} else if (tx < temp_dlevX) {
tx = temp_dlevX;
}
if (ty < 0) {
ty = 0;
} else if (ty > temp_dlevY) {
ty = temp_dlevY;
}
m_levelMovie._x = tx;
m_levelMovie._y = ty;
}
function getTargetMovie() {
return(m_targetMovie);
}
var tx = 0;
var ty = 0;
}
Symbol 755 MovieClip [__Packages.MyBonus] Frame 0
class MyBonus extends MovieClip
{
var _width, _x, _visible;
function MyBonus () {
super();
if ((minXbonus == 0) || ((_x - (_width / 2)) < minXbonus)) {
minXbonus = _x - (_width / 2);
}
bonusListArr.push(this);
_visible = false;
}
static function testBonus(m) {
var _local1 = 0;
while (_local1 < bonusListArr.length) {
bonusListArr[_local1].myHitTest(m.m_forwardWheel, m.m_backWheel);
_local1++;
}
}
function myHitTest(fw, bw) {
}
function result() {
}
static var minXbonus = 0;
static var bonusListArr = [];
}
Symbol 756 MovieClip [__Packages.cSavedData] Frame 0
class cSavedData
{
var DataArray, lev, time, carType;
function cSavedData () {
DataArray = [];
lev = -1;
time = -1;
carType = 1;
}
}
Symbol 757 MovieClip [__Packages.CConstants] Frame 0
class CConstants
{
static var bikeBaseParam;
function CConstants () {
}
static function changeBikeParam() {
mySandTrap.coofPower = 11;
mySandTrap.speedTrap = 7;
CWheel.WaterEffect = 0.15;
switch (COLORCAR) {
case 1 :
bikeBaseParam = new CTrianglConstrainSkeleton();
ACCELERATE_BIKE = 60;
CWheel.DeffKoeffSlip = 0.05;
CWheel.m_maxSpeed = 1.5;
CWheel.coofIceNorm = 1.2;
CWheel.koeffConcatenation = 0.1;
CBike.coffStabil = 0;
CBike.accPercMult = 3.7;
CBike.koeffStability = -0.4;
bikeBaseParam.init(new CWheel().initWhile(0, 0, 4, 27, 12), new CParticle().initParticle(0, 0, 2), new CWheel().initWhile(0, 0, 4, 27, 12), new CParticle(), new CSpringConstraint().init(0.5, 0.6), new CSpringConstraint().init(1, 1), new CSpringConstraint().init(0.8, 0.9));
return;
case 2 :
mySandTrap.speedTrap = 10;
mySandTrap.coofPower = 9;
bikeBaseParam = new CTrianglConstrainSkeleton();
ACCELERATE_BIKE = 55;
CWheel.DeffKoeffSlip = 0.005;
CWheel.m_maxSpeed = 1;
CWheel.coofIceNorm = 1.1;
CWheel.koeffConcatenation = 0.1;
CWheel.WaterEffect = 0.07;
CBike.coffStabil = 0.4;
CBike.accPercMult = 1.3;
CBike.koeffStability = -0.1;
bikeBaseParam.init(new CWheel().initWhile(0, 0, 4, 24, 22), new CParticle().initParticle(0, 0, 2), new CWheel().initWhile(0, 0, 4, 24, 22), new CParticle(), new CSpringConstraint().init(0.6, 0.7), new CSpringConstraint().init(0.9, 0.9), new CSpringConstraint().init(0.6, 0.7));
return;
case 3 :
bikeBaseParam = new CTrianglConstrainSkeleton();
ACCELERATE_BIKE = 75;
CWheel.DeffKoeffSlip = 0.05;
CWheel.m_maxSpeed = 1.6;
CWheel.coofIceNorm = 1.3;
CWheel.koeffConcatenation = 0.1;
CBike.coffStabil = 0.04;
CBike.accPercMult = 2.7;
CBike.koeffStability = -2;
bikeBaseParam.init(new CWheel().initWhile(0, 0, 4, 27, 12), new CParticle().initParticle(0, 0, 2), new CWheel().initWhile(0, 0, 3, 27, 0.5), new CParticle(), new CSpringConstraint().init(0.4, 0.6), new CSpringConstraint().init(1, 1), new CSpringConstraint().init(0.8, 0.9));
return;
case 4 :
mySandTrap.speedTrap = 10;
mySandTrap.coofPower = 9;
bikeBaseParam = new CTrianglConstrainSkeleton();
ACCELERATE_BIKE = 60;
CWheel.DeffKoeffSlip = 0.005;
CWheel.m_maxSpeed = 1.1;
CWheel.coofIceNorm = 1.2;
CWheel.koeffConcatenation = 0.15;
CWheel.WaterEffect = 0.07;
CBike.coffStabil = 0.4;
CBike.accPercMult = 1.6;
CBike.koeffStability = -0.4;
bikeBaseParam.init(new CWheel().initWhile(0, 0, 5, 24, 22), new CParticle().initParticle(0, 0, 3), new CWheel().initWhile(0, 0, 5, 24, 22), new CParticle(), new CSpringConstraint().init(0.65, 0.75), new CSpringConstraint().init(0.9, 0.9), new CSpringConstraint().init(0.65, 0.75));
return;
case 5 :
mySandTrap.coofPower = 2;
mySandTrap.speedTrap = 50;
bikeBaseParam = new CTrianglConstrainSkeleton();
ACCELERATE_BIKE = 70;
CWheel.DeffKoeffSlip = 0.01;
CWheel.m_maxSpeed = 2.6;
CWheel.coofIceNorm = 1.8;
CWheel.koeffConcatenation = 0.1;
CWheel.WaterEffect = 0.07;
CBike.coffStabil = 0.5;
CBike.accPercMult = 2.5;
CBike.koeffStability = -0.5;
bikeBaseParam.init(new CWheel().initWhile(0, 0, 5, 70, 22), new CParticle().initParticle(0, 0, 2), new CWheel().initWhile(0, 0, 5, 70, 22), new CParticle(), new CSpringConstraint().init(0.7, 0.8), new CSpringConstraint().init(0.9, 0.9), new CSpringConstraint().init(0.9, 0.9));
}
}
static var SOUNDS_NAMES = new Array("sndIntro1", "BOOM", "IDEngine", "click", "IDEngine2");
static var SND_INTRO = 0;
static var SND_NEXT_LEVEL = 0;
static var SND_INGAME = 0;
static var SND_BOMB = 1;
static var SND_ENGINE3 = 2;
static var SND_BUTTON = 3;
static var SND_ACSEL = 4;
static var COLORCAR = 1;
static var countShowCar = 5;
static var SCREEN_WIDTH = 800;
static var SCREEN_HEIGHT = 600;
static var LEVEL_HORIZONT = 300;
static var Gravity = 2.94;
static var helpLev1 = true;
static var helpLev2 = true;
static var helpLev6 = true;
static var helpLev7 = true;
static var helpLev11 = true;
static var helpLev12 = true;
static var ACCELERATE_BIKE = 32;
static var levelNames = new Array("idLevel6", "idLevel7", "idLevel10", "idLevel9", "idLevel8", "idLevel2", "idLevel1", "idLevel3", "idLevel4", "idLevel5", "idLevel11", "idLevel12", "idLevel14", "idLevel13", "idLevel15");
static var levelFon = new Array(2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3);
static var savedData = new cSavedData();
}
Symbol 758 MovieClip [__Packages.CConstrainSkeleton] Frame 0
class CConstrainSkeleton
{
var m_A, m_B, m_C, m_D;
function CConstrainSkeleton () {
}
function init(a, b, c, d, ab, ac, ad, bc, bd, cd) {
}
function changeGeometry(pA, pB, pC, pD) {
}
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 addToEngine(engine) {
}
}
Symbol 759 MovieClip [__Packages.CPenetrationConstraint] Frame 0
class CPenetrationConstraint implements 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 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 760 MovieClip [__Packages.CSpringConstraint] Frame 0
class CSpringConstraint implements IConstraint
{
var m_p1, m_p2, m_koeffStiffPress, m_koeffStiffStretch, basicParticleWeight, metkaSpecSpring, m_relaxLen;
function CSpringConstraint () {
}
function init(koeffStiffPress, koeffStiffStretch, p1, p2, basicParticleWeight_) {
m_p1 = p1;
m_p2 = p2;
m_koeffStiffPress = koeffStiffPress;
m_koeffStiffStretch = koeffStiffStretch;
if (basicParticleWeight > 0) {
metkaSpecSpring = true;
basicParticleWeight = basicParticleWeight_;
} else {
metkaSpecSpring = false;
basicParticleWeight = 0;
}
fixDistance();
return(this);
}
function fixDistance() {
m_relaxLen = CVector2D.getDistanceBetween(m_p1.__get__pos(), m_p2.__get__pos());
}
function resolve() {
var _local4 = m_p1.__get__pos().x - m_p2.__get__pos().x;
var _local3 = m_p1.__get__pos().y - m_p2.__get__pos().y;
var _local8 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
var _local9 = (_local8 - m_relaxLen) / _local8;
var _local5;
if (_local8 > m_relaxLen) {
_local5 = m_koeffStiffStretch;
} else {
_local5 = m_koeffStiffPress;
}
var _local7 = m_p1.__get__mass();
var _local6 = m_p2.__get__mass();
var _local2 = (_local9 * _local5) / (_local7 + _local6);
if (metkaSpecSpring) {
_local2 = (_local9 * _local5) / (_local7 + _local6);
_local2 = _local9 * _local5;
m_p1.__get__pos().x = m_p1.__get__pos().x - ((_local4 * _local2) * (1 - basicParticleWeight));
m_p1.__get__pos().y = m_p1.__get__pos().y - ((_local3 * _local2) * (1 - basicParticleWeight));
m_p2.__get__pos().x = m_p2.__get__pos().x + ((_local4 * _local2) * basicParticleWeight);
m_p2.__get__pos().y = m_p2.__get__pos().y + ((_local3 * _local2) * basicParticleWeight);
} else {
m_p1.__get__pos().x = m_p1.__get__pos().x - ((_local4 * _local7) * _local2);
m_p1.__get__pos().y = m_p1.__get__pos().y - ((_local3 * _local7) * _local2);
m_p2.__get__pos().x = m_p2.__get__pos().x + ((_local4 * _local6) * _local2);
m_p2.__get__pos().y = m_p2.__get__pos().y + ((_local3 * _local6) * _local2);
}
}
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 761 MovieClip [__Packages.mySandTrap] Frame 0
class mySandTrap extends MyBonus
{
function mySandTrap () {
super();
}
function myHitTest(fw, bw) {
if (fw.getMovie().hitTest(this)) {
fw.startGravy();
if (Math.abs(fw.__get__pos().x - fw.__get__prevPos().x) > speedTrap) {
fw.__get__accelerate().y = fw.__get__accelerate().y + Math.min(120, (fw.__get__pos().x - fw.__get__prevPos().x) * coofPower);
bw.__get__accelerate().y = bw.__get__accelerate().y - Math.min(120, (fw.__get__pos().x - fw.__get__prevPos().x) * coofPower);
}
}
if (bw.getMovie().hitTest(this)) {
bw.startGravy();
if (Math.abs(bw.__get__pos().x - bw.__get__prevPos().x) > speedTrap) {
fw.__get__accelerate().y = fw.__get__accelerate().y + Math.min(100, (bw.__get__pos().x - bw.__get__prevPos().x) * coofPower);
bw.__get__accelerate().y = bw.__get__accelerate().y - Math.min(100, (bw.__get__pos().x - bw.__get__prevPos().x) * coofPower);
}
}
}
static var speedTrap = 7;
static var coofPower = 13;
}
Symbol 762 MovieClip [__Packages.CWheel] Frame 0
class CWheel extends CParticle
{
var m_rim, m_acceleration, initParticle, timerIce, m_koeffSpring, m_koeffSlip, m_radius, m_maxAccSpeed, m_speed, m_accSpeed, rot, intersectionFlag, lastIntersPoint, lastN, hitPointArray, normalArray, hitArray, intersArray, countEart, m_prevPosition, synchronizeMovie, m_mc, m_curPosition, __get__prevPos;
function CWheel () {
super();
}
function setRotationMovie(rotationMovie) {
if ((rotationMovie == undefined) || (rotationMovie == null)) {
rotateMovie = function () {
};
m_rim = null;
} else {
rotateMovie = function () {
this.rot.rotate(this.m_speed / this.m_radius);
this.m_rim._rotation = Math.atan2(this.rot.y, this.rot.x) * CWheel.ANGLE_180_DIV_PI;
};
m_rim = rotationMovie;
}
}
function setAccelerate(nAccelerate) {
m_acceleration = nAccelerate;
}
function getAccelerate() {
return(m_acceleration);
}
function initWhile(x, y, mass, rad, maxAccSpeed, mc, rotationMovie, koeffSpring, koeffSlip) {
initParticle(x, y, mass, mc);
coofIce = coofIceNorm;
timerIce = 0;
if (koeffSpring == undefined) {
koeffSpring = 0.01;
}
if (koeffSlip == undefined) {
koeffSlip = DeffKoeffSlip;
}
m_koeffSpring = koeffSpring;
m_koeffSlip = 1 - koeffSlip;
m_koeffFriction = 0.03;
setRotationMovie(rotationMovie);
m_radius = rad;
m_maxAccSpeed = maxAccSpeed;
m_speed = 0;
m_accSpeed = 0;
rot = new CVector2D(1, 0);
intersectionFlag = false;
lastIntersPoint = new CVector2D(0, 0);
lastN = new 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 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)));
if (Math.abs(m_accSpeed) < 0.01) {
m_accSpeed = 0;
} else if (!intersectionFlag) {
if (m_accSpeed > 0) {
m_accSpeed = m_maxAccSpeed * dTime;
} else {
m_accSpeed = (-m_maxAccSpeed) * dTime;
}
}
countEart--;
if (intersectionFlag) {
countEart = 3;
}
}
function rotateMovie() {
}
function checkCollision(hit_mc) {
var _local2;
var _local8;
var _local9 = new CVector2D(0, 0);
var _local13 = false;
var _local5;
var _local7;
var _local15;
var _local16 = new CVector2D(m_prevPosition.x, m_prevPosition.y);
var _local4 = new CVector2D(0, 0);
var _local3 = new CVector2D(0, 0);
var _local14;
synchronizeMovie();
_local14 = 0;
_local2 = 0;
while (_local2 < m_hitCount) {
hitPointArray[_local2].copyTo(_local9);
m_mc.localToGlobal(_local9);
if ((hitArray[_local2] = hit_mc.hitTest(_local9.x, _local9.y, true))) {
_local13 = true;
_local5 = _local2;
_local14++;
}
_local2++;
}
if (_local14 == 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 (_local13) {
while (true) {
_local2++;
if (_local2 == m_hitCount) {
_local2 = 0;
}
if (!hitArray[_local2]) {
_local5 = -1;
_local8 = 0;
while (_local8 < m_hitCount) {
_local2++;
if (_local2 == m_hitCount) {
_local2 = 0;
}
if (_local5 == -1) {
if (hitArray[_local2]) {
_local5 = _local2;
_local4.plus(normalArray[_local2]);
normalArray[_local2].copyTo(_local3);
}
} else if (!hitArray[_local2]) {
_local7 = _local2 - 1;
if (_local7 < 0) {
_local7 = m_hitCount - 1;
}
intersArray.push({k1:_local5, k2:_local7, n:new CVector2D(_local3.x, _local3.y)});
_local5 = -1;
} else {
_local4.plus(normalArray[_local2]);
_local3.plus(normalArray[_local2]);
}
_local8++;
}
break;
}
}
var _local6 = new CVector2D(0, 0);
if (intersArray.length > 0) {
_local4.normalize();
if (intersectionFlag) {
_local4.x = _local4.x + lastN.x;
_local4.y = _local4.y + lastN.y;
_local4.x = _local4.x / 2;
_local4.y = _local4.y / 2;
}
var _local10;
var _local11;
_local15 = intersArray.length;
_local2 = 0;
while (_local2 < _local15) {
_local10 = intersArray.pop();
_local5 = _local10.k1;
_local7 = _local10.k2;
_local10.n.copyTo(_local3);
m_curPosition.minusNew(m_prevPosition).copyTo(_local6);
if (_local4.scalar(_local6) < 0) {
_local11 = Math.atan2(_local4.y, _local4.x);
_local6.rotate(-_local11);
_local6.x = (-_local6.x) * m_koeffSpring;
_local6.rotate(_local11);
pushOut(_local5, _local7, _local3, hit_mc);
m_prevPosition.x = m_curPosition.x - _local6.x;
m_prevPosition.y = m_curPosition.y - _local6.y;
} else {
pushOut(_local5, _local7, _local3, hit_mc);
}
_local2++;
}
validateRotation(_local4, _local16);
intersectionFlag = true;
m_curPosition.copyTo(lastIntersPoint);
_local4.copyTo(lastN);
}
} else if (intersectionFlag) {
validateRotation(lastN, _local16);
intersectionFlag = false;
}
synchronizeMovie();
}
function pushOut(k1, k2, n, hit_mc) {
n.normalize();
if (k1 != k2) {
var _local7 = new 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 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;
}
}
}
n.mult(koeffConcatenation);
m_curPosition.minus(n);
m_prevPosition.minus(n);
}
function validateRotation(n, oldPos) {
var _local3 = new CVector2D(-n.y, n.x);
var _local6 = m_curPosition.minusNew(oldPos);
var _local5 = Math.atan2(_local3.y, _local3.x);
var _local2 = _local6.rotateNew(-_local5);
m_speed = _local2.x + (m_accSpeed * coofIce);
_local2.y = 0;
_local2.rotate(_local5);
var _local4 = Math.max(Math.min(m_maxSpeed, (m_accSpeed * m_koeffSlip) * 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 * (1 - m_koeffSlip);
}
function hasIntersection() {
return(intersectionFlag);
}
function startIce() {
if (timerIce < 2) {
rotateMovie = function () {
this.rot.rotate((this.m_accSpeed * 13700) / this.m_radius);
this.m_rim._rotation = Math.atan2(this.rot.y, this.rot.x) * CWheel.ANGLE_180_DIV_PI;
};
}
m_koeffFriction = 0;
coofIce = 0.35;
showSpray(3);
timerIce = 3;
}
function startGravy() {
if (timerIce < 2) {
rotateMovie = function () {
this.rot.rotate((this.m_accSpeed * 13700) / this.m_radius);
this.m_rim._rotation = Math.atan2(this.rot.y, this.rot.x) * CWheel.ANGLE_180_DIV_PI;
};
}
m_koeffFriction = WaterEffect;
coofIce = coofIceNorm;
m_acceleration = m_acceleration * 0.75;
showSpray(4);
timerIce = 3;
}
function startWater() {
m_koeffFriction = WaterEffect;
coofIce = coofIceNorm;
m_acceleration = m_acceleration * 0.7;
showSpray(2);
timerIce = 3;
}
function showSpray(n) {
var _local2 = Math.min(((__get__prevPos().x - m_curPosition.x) * (__get__prevPos().x - m_curPosition.x)) * 8, 100);
if (_local2 < 20) {
_local2 = 0;
}
m_rim._parent.mcVolna._yscale = _local2;
if ((m_prevPosition.x - m_curPosition.x) < 0) {
m_rim._parent.mcVolna._xscale = _local2;
} else {
m_rim._parent.mcVolna._xscale = -_local2;
}
if (timerIce < 2) {
m_rim._parent.mcVolna.gotoAndStop(n);
}
}
function WeelStateTimer() {
if (timerIce > 0) {
timerIce--;
if (timerIce == 0) {
trace("End ICE");
m_koeffFriction = 0.03;
coofIce = coofIceNorm;
timerIce--;
m_rim._parent.mcVolna.gotoAndStop(1);
rotateMovie = function () {
this.rot.rotate(this.m_speed / this.m_radius);
this.m_rim._rotation = Math.atan2(this.rot.y, this.rot.x) * CWheel.ANGLE_180_DIV_PI;
};
}
}
}
static var m_maxSpeed = 180;
static var m_hitCount = 16;
static var m_koeffFriction = 0.03;
var coofIce = 1;
static var coofIceNorm = 1;
static var WaterEffect = 0.15;
static var DeffKoeffSlip = 0.1;
static var koeffConcatenation = 0;
static var ANGLE_180_DIV_PI = 57.2957795130823;
}
Symbol 763 MovieClip [__Packages.CTrianglConstrainSkeleton] Frame 0
class CTrianglConstrainSkeleton extends CConstrainSkeleton
{
var m_A, m_B, m_C, m_AB, m_AC, m_BC, m_ABC;
function CTrianglConstrainSkeleton () {
super();
}
function init(a, b, c, d, ab, bc, ac) {
m_A = a;
m_B = b;
m_C = c;
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_BC = bc;
m_BC.__set__p1(b);
m_BC.__set__p2(c);
m_ABC = new CPenetrationConstraint(m_A, m_B, m_C);
return(this);
}
function changeGeometry(pA, pB, pC) {
m_A.moveTo(pA.x, pA.y);
m_B.moveTo(pB.x, pB.y);
m_C.moveTo(pC.x, pC.y);
m_AB.fixDistance();
m_AC.fixDistance();
m_BC.fixDistance();
m_ABC.fixDistance();
}
function addToEngine(engine) {
engine.addParticle(m_A);
engine.addParticle(m_B);
engine.addParticle(m_C);
engine.addConstraint(m_AB);
engine.addConstraint(m_AC);
engine.addConstraint(m_BC);
engine.addConstraint(m_ABC);
}
function get AB() {
return(m_AB);
}
function get AC() {
return(m_AC);
}
function get BC() {
return(m_BC);
}
}
Symbol 764 MovieClip [__Packages.CBike] Frame 0
class CBike
{
var m_bikeDir, m_bikeNormal, deepBW, deepFW, m_engine, m_bikeMovie, m_backWheel, p_B, m_forwardWheel, man, p_ld, p_rd;
function CBike () {
m_bikeDir = new CVector2D(0, 0);
m_bikeNormal = new CVector2D(0, 0);
CSoundService.playLoopSound(CConstants.SND_ENGINE3);
CSoundService.getSoundAt(CConstants.SND_ENGINE3).setVolume(70);
}
function initWehicle(level, posX, posY) {
deepBW = 150;
deepFW = 160;
CConstants.changeBikeParam();
var _local3 = "idMotoWhellBack_ATV";
var _local5 = "idMotoWhellBack_ATV";
if ((CConstants.COLORCAR == 1) || (CConstants.COLORCAR == 3)) {
deepBW = 120;
deepFW = 130;
_local3 = "idMotoWhellForward";
_local5 = "idMotoWhellBack";
}
if (CConstants.COLORCAR == 5) {
deepBW = 150;
deepFW = 160;
_local3 = "dmMotoWhell_Monster";
_local5 = "dmMotoWhell_Monster";
posY = posY - 50;
}
level.getVehiclePlace()._visible = false;
var _local7 = level.getEngine();
var _local4 = level.getVehiclePlace();
m_engine = _local7;
var _local2;
m_bikeMovie = _local4.attachMovie("idBike", "_Bike", 140);
m_bikeMovie._x = posX;
m_bikeMovie._y = posY;
m_bikeMovie.mc.gotoAndStop(CConstants.COLORCAR);
CConstants.bikeBaseParam.changeGeometry(getBikePoint(m_bikeMovie.mc.mc_p_wl), getBikePoint(m_bikeMovie.mc.mc_p_B), getBikePoint(m_bikeMovie.mc.mc_p_wr));
_local2 = _local4.attachMovie(_local5, "_MotoWhellBack", deepBW);
CConstants.bikeBaseParam.__get__A().setMovie(_local2);
m_backWheel = CWheel(CConstants.bikeBaseParam.__get__A());
m_backWheel.setRotationMovie(_local2.mc_rim);
p_B = CConstants.bikeBaseParam.B;
_local2 = _local4.attachMovie(_local3, "_MotoWhellForward", deepFW);
CConstants.bikeBaseParam.__get__C().setMovie(_local2);
m_forwardWheel = CWheel(CConstants.bikeBaseParam.__get__C());
m_forwardWheel.setRotationMovie(_local2.mc_rim);
CConstants.bikeBaseParam.addToEngine(_local7);
man = m_bikeMovie.mc.man;
level.getVehiclePlace()._visible = true;
}
function process() {
var _local2;
var _local3;
m_bikeDir.init(m_forwardWheel.__get__pos().x - m_backWheel.__get__pos().x, m_forwardWheel.__get__pos().y - m_backWheel.__get__pos().y);
m_bikeMovie._rotation = (Math.atan2(m_bikeDir.y, m_bikeDir.x) * 180) / Math.PI;
_local2 = new CVector2D(m_bikeMovie.mc.mc_p_B._x, m_bikeMovie.mc.mc_p_B._y);
m_bikeMovie.mc.localToGlobal(_local2);
m_bikeMovie._parent.globalToLocal(_local2);
m_bikeMovie._x = m_bikeMovie._x + (p_B.__get__pos().x - _local2.x);
m_bikeMovie._y = m_bikeMovie._y + (p_B.__get__pos().y - _local2.y);
moveMovieToMovieGlobal(m_backWheel.getMovie(), m_bikeMovie.mc.mc_back_spring);
m_forwardWheel.rotateMovie();
m_backWheel.rotateMovie();
m_forwardWheel.WeelStateTimer();
m_backWheel.WeelStateTimer();
if ((m_forwardWheel.hasIntersection() != m_backWheel.hasIntersection()) && (m_bikeDir.x > 0)) {
if (!m_forwardWheel.hasIntersection()) {
if (m_bikeDir.y < 0) {
rotateFW(coffStabil);
}
}
if (!m_backWheel.hasIntersection()) {
if (m_bikeDir.y > 0) {
rotateBW(coffStabil);
}
}
}
}
function rotateFW(n) {
var _local2 = m_bikeDir.rotateNew((Math.PI/2)).multNew(n);
m_forwardWheel.__get__accelerate().plus(_local2);
}
function rotateBW(n) {
var _local2 = m_bikeDir.rotateNew((Math.PI/2)).multNew(n);
m_backWheel.__get__accelerate().plus(_local2);
}
function resetPos() {
p_ld.__set__prevPos(p_ld.__get__pos().duplicate());
p_rd.__set__prevPos(p_rd.__get__pos().duplicate());
m_backWheel.__set__prevPos(m_backWheel.__get__pos().duplicate());
m_forwardWheel.__set__prevPos(m_forwardWheel.__get__pos().duplicate());
}
function getBikePoint(mc) {
var _local2 = new Object();
_local2.x = mc._x;
_local2.y = mc._y;
mc._parent.localToGlobal(_local2);
m_bikeMovie._parent.globalToLocal(_local2);
return(_local2);
}
function playAccelerateSound() {
CSoundService.stopSound(CConstants.SND_ACSEL);
CSoundService.playSound(CConstants.SND_ACSEL, true, 1);
}
function stopAccelerateSound() {
}
function accelerate() {
m_backWheel.setAccelerate(CConstants.ACCELERATE_BIKE);
m_forwardWheel.setAccelerate(CConstants.ACCELERATE_BIKE);
}
function brake() {
m_backWheel.setAccelerate((-CConstants.ACCELERATE_BIKE) * 0.6);
m_forwardWheel.setAccelerate((-CConstants.ACCELERATE_BIKE) * 0.6);
}
function stopAccelerate() {
m_backWheel.setAccelerate(0);
m_forwardWheel.setAccelerate(0);
}
function processKeys(keyState) {
if (keyState.checkMask(KM_ACCELERATE)) {
accelerate();
if (!keyState.checkPrevStateMask(KM_ACCELERATE)) {
playAccelerateSound();
keyState.addMask(KM_ACCELERATE);
}
} else if (keyState.checkMask(KM_BRAKE)) {
brake();
} else {
stopAccelerate();
stopAccelerateSound();
}
man.process(keyState.checkMask(KM_MOVE_BODY_BACK), keyState.checkMask(KM_MOVE_BODY_FORWARD));
if (keyState.checkMask(KM_MOVE_BODY_FORWARD)) {
turnTo(DIR_RIGHT);
} else if (keyState.checkMask(KM_MOVE_BODY_BACK)) {
turnTo(DIR_LEFT);
}
}
function turnTo(dir) {
m_bikeNormal = m_forwardWheel.__get__pos().minusNew(m_backWheel.__get__pos());
m_bikeNormal.normalize();
var _local7;
_local7 = m_bikeNormal.x;
m_bikeNormal.x = -m_bikeNormal.y;
m_bikeNormal.y = _local7;
var _local6 = 0.6;
var _local5 = (Math.abs(m_bikeNormal.y) * (1 - _local6)) + _local6;
_local5 = _local5 * (accPercMult * CConstants.Gravity);
var _local4 = m_bikeNormal.x * _local5;
var _local3 = m_bikeNormal.y * _local5;
if (m_bikeNormal.y > koeffStability) {
var _local2 = 0;
if (m_forwardWheel.hasIntersection() || (m_backWheel.hasIntersection())) {
_local2 = 0;
if (m_forwardWheel.hasIntersection() && (m_backWheel.hasIntersection())) {
_local2 = 4;
}
} else {
_local2 = 3.5;
}
if (dir == DIR_RIGHT) {
if (!m_forwardWheel.hasIntersection()) {
m_forwardWheel.__get__accelerate().plusXY(_local4 * 1.4, _local3 * 1.3);
}
m_backWheel.__get__accelerate().plusXY((-_local4) * (_local2 + 0.7), (-_local3) * (_local2 + 0.2));
} else {
m_forwardWheel.__get__accelerate().plusXY((-_local4) * (_local2 + 0.7), (-_local3) * (_local2 + 0.9));
if (!m_backWheel.hasIntersection()) {
m_backWheel.__get__accelerate().plusXY(0, _local3 * 1.3);
}
}
}
}
function Upp(dir) {
m_bikeNormal.init(m_bikeDir.x, m_bikeDir.y);
m_bikeNormal.normalize();
var _local6;
_local6 = m_bikeNormal.x;
m_bikeNormal.x = -m_bikeNormal.y;
m_bikeNormal.y = _local6;
var _local5 = 0.6;
var _local2 = (Math.abs(m_bikeNormal.y) * (1 - _local5)) + _local5;
_local2 = _local2 * (accPercMult * CConstants.Gravity);
var _local4 = (m_bikeNormal.x * _local2) * 10;
var _local3 = (m_bikeNormal.y * _local2) * 10;
if (m_bikeNormal.y > koeffStability) {
if (dir == DIR_LEFT) {
m_forwardWheel.__get__accelerate().plusXY(-_local4, -_local3);
} else {
m_backWheel.__get__accelerate().plusXY(-_local4, -_local3);
}
}
}
function onGround() {
return(m_backWheel.hasIntersection() || (m_forwardWheel.hasIntersection()));
}
function getState() {
var _local2 = new cObjectPos();
_local2.x = int(m_bikeMovie._x);
_local2.y = int(m_bikeMovie._y);
_local2.r = int(m_bikeMovie._rotation);
_local2.xfw = m_forwardWheel.__get__pos().x;
_local2.yfw = m_forwardWheel.__get__pos().y;
_local2.rfw = m_forwardWheel.getMovie().mc_rim._rotation;
_local2.xbw = m_backWheel.__get__pos().x;
_local2.ybw = m_backWheel.__get__pos().y;
_local2.rbw = m_backWheel.getMovie().mc_rim._rotation;
_local2.KL = man.KLeft;
_local2.KR = man.KRight;
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) * 180) / Math.PI;
}
function checkPointVsMovie(point, movie) {
var _local1 = {x:point._x, y:point._y};
point._parent.localToGlobal(_local1);
return(movie.hitTest(_local1.x, _local1.y, true));
}
function checkDeathPoint() {
var _local2 = m_engine.getHitMovie();
return((checkPointVsMovie(m_bikeMovie.mc.mcDeathPoint1, _local2) || (checkPointVsMovie(m_bikeMovie.mc.mcDeathPoint2, _local2))) || (checkPointVsMovie(m_bikeMovie.mc.mcDeathPoint3, _local2)));
}
function getBodyMovieClip() {
return(m_bikeMovie);
}
function show(visible) {
m_bikeMovie._visible = visible;
m_backWheel.getMovie()._visible = visible;
m_forwardWheel.getMovie()._visible = visible;
man._visible = visible;
}
function hideWeel() {
m_forwardWheel.getMovie()._visible = false;
m_backWheel.getMovie()._visible = false;
}
function stopManAnim() {
man.stopAnim();
}
function startManAnim() {
man.startAnim();
}
function stopManAnimFull() {
man.stopAnim();
man.stopMCAnim();
}
function deadBike() {
stopAccelerate();
stopAccelerateSound();
coffStabil = 0;
man._visible = false;
}
function Expl() {
m_bikeMovie.mc.mcExpl.gotoAndPlay(2);
stopAccelerate();
stopAccelerateSound();
coffStabil = 0;
hideWeel();
}
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;
static var KM_SPURT_FORWARD = 256;
static var KM_SPURT_BACK = 512;
static var DIR_RIGHT = 0;
static var DIR_LEFT = 1;
static var coffStabil = CConstants.Gravity / 8;
static var accPercMult = 3.3;
static var koeffStability = -0.4;
}
Symbol 765 MovieClip [__Packages.CMultiState] Frame 0
class CMultiState
{
var m_state, m_prevState;
function CMultiState () {
m_state = (m_prevState = 0);
}
function set curMask(nState) {
m_prevState = m_state;
m_state = nState;
//return(curMask);
}
function get curMask() {
return(m_state);
}
function checkMask(nState) {
return((m_state & nState) != 0);
}
function checkPrevStateMask(nState) {
return((m_prevState & nState) != 0);
}
function addMask(nState) {
curMask = curMask | nState;
}
function delMask(nState) {
curMask = curMask & (~nState);
}
}
Symbol 766 MovieClip [__Packages.cObjectPos] Frame 0
class cObjectPos
{
var x, y, r, xfw, yfw, rfw, xbw, ybw, rbw, KL, KR;
function cObjectPos () {
x = 0;
y = 0;
r = 0;
xfw = 0;
yfw = 0;
rfw = 0;
xbw = 0;
ybw = 0;
rbw = 0;
KL = false;
KR = false;
}
static function MidPos(a, b) {
var _local1 = new cObjectPos();
_local1.r = (a.r + b.r) / 2;
_local1.x = (a.x + b.x) / 2;
_local1.y = (a.y + b.y) / 2;
_local1.rfw = (a.rfw + b.rfw) / 2;
_local1.xfw = (a.xfw + b.xfw) / 2;
_local1.yfw = (a.yfw + b.yfw) / 2;
_local1.rbw = (a.rbw + b.rbw) / 2;
_local1.xbw = (a.xbw + b.xbw) / 2;
_local1.ybw = (a.ybw + b.ybw) / 2;
_local1.KL = b.KL;
_local1.KR = b.KR;
return(_local1);
}
}
Symbol 767 MovieClip [__Packages.CRaceEngine] Frame 0
class CRaceEngine extends MovieClip implements IPauseListener
{
static var inst, fonMC;
var m_panel, m_windowPause, mcBG, m_bike, processBuckUp, mcShadow, mcShadowBW, mcShadowFW, ShadEnable, data, m_curLevel, m_level, m_keyState, m_levelPlace, mcStartLevel, mcHelpPanel, numFrame, RB;
function CRaceEngine () {
super();
inst = this;
CGameService.addPauseListener(this);
m_panel.panelFloat._visible = false;
m_windowPause = m_panel.mcPausa;
fonMC = mcBG;
m_windowPause._visible = false;
}
function enablePause() {
trace("enabPausa");
stopAllSounds();
m_bike.stopManAnimFull();
processBuckUp = process;
process = function () {
};
m_windowPause._visible = true;
CSoundService.stopCurLoopSound();
}
function disablePause() {
m_bike.startManAnim();
process = processBuckUp;
enableBikeControll();
m_windowPause._visible = false;
CSoundService.playLoopSound(CConstants.SND_ENGINE3);
}
function processKeys() {
var _local1 = new CMultiState();
return(_local1);
}
static function StartTrap(n) {
inst.m_bike.rotateFW(n / 100);
inst.m_bike.rotateBW((-n) / 100);
}
function onUnload() {
CGameService.removePauseListener(this);
}
function setPos(m) {
mcShadow._x = m.x;
mcShadow._y = m.y;
mcShadow._rotation = m.r;
mcShadowBW._x = m.xbw;
mcShadowBW._y = m.ybw;
mcShadowBW.mc_rim._rotation = m.rbw;
mcShadowFW._x = m.xfw;
mcShadowFW._y = m.yfw;
mcShadowFW.mc_rim._rotation = m.rfw;
mcShadow.mc.man.process(m.KL, m.KR);
var _local3 = {x:mcShadowBW._x, y:mcShadowBW._y};
mcShadowBW._parent.localToGlobal(_local3);
mcShadow.mc.globalToLocal(_local3);
mcShadow.mc.mc_back_spring._x = _local3.x;
mcShadow.mc.mc_back_spring._y = _local3.y;
}
function addShadowBike() {
ShadEnable = false;
data = new cSavedData();
data.lev = m_curLevel;
data.carType = CConstants.COLORCAR;
data.time = 0;
if ((CConstants.savedData.time > 0) and (CConstants.savedData.lev == m_curLevel)) {
ShadEnable = true;
ShadowProcess = function () {
this.data.time++;
this.setPos(CConstants.savedData.DataArray[this.data.time]);
if (this.data.time >= (CConstants.savedData.DataArray.length - 2)) {
this.ShadEnable = false;
this.ShadowProcess = function () {
this.data.time++;
};
this.mcShadow._visible = false;
this.mcShadowBW._visible = false;
this.mcShadowFW._visible = false;
}
};
trace("addShadow");
var _local3 = m_level.getVehiclePlace();
mcShadow = _local3.attachMovie("_Shadow", "_Shad", 10);
mcShadow.mc.gotoAndStop(CConstants.savedData.carType);
var _local4 = "idMotoWhellBack_ATV";
var _local6 = "idMotoWhellBack_ATV";
var _local5 = 11;
var _local2 = 12;
if ((CConstants.savedData.carType == 1) || (CConstants.savedData.carType == 3)) {
_local5 = 8;
_local2 = 9;
_local4 = "idMotoWhellForward";
_local6 = "idMotoWhellBack";
}
if (CConstants.savedData.carType == 5) {
_local5 = 11;
_local2 = 12;
_local4 = "dmMotoWhell_Monster";
_local6 = "dmMotoWhell_Monster";
}
mcShadowBW = _local3.attachMovie(_local6, "_ShadWhellBack", _local5);
mcShadowFW = _local3.attachMovie(_local4, "_ShadWhellForward", _local2);
setPos(CConstants.savedData.DataArray[0]);
}
}
function ShadowProcess() {
data.time++;
}
function processTime() {
CGame.curTime = CGame.curTime + 0.04167;
}
function process() {
}
function processRace() {
processTime();
m_level.process();
var _local2 = processKeys();
if (_local2.__get__curMask() != m_keyState.__get__curMask()) {
m_keyState.__set__curMask(_local2.curMask);
}
m_bike.processKeys(m_keyState);
MyBonus.testBonus(m_bike);
m_bike.process();
if (m_bike.checkDeathPoint()) {
killBike();
}
if (m_level.checkFinish(m_bike.getBodyMovieClip())) {
CConstants.savedData = data;
CGame.levelComplete();
}
ShadowProcess();
processShowHelp();
data.DataArray.push(m_bike.getState());
}
function processShowHelp() {
}
function initRaceEngine(levelNum) {
onKeyDown = function () {
};
m_panel.panelFloat._visible = false;
m_curLevel = levelNum;
m_bike = new CBike();
m_level = CLevel(m_levelPlace.attachMovie("idCurLevel", "__idLevel", DEPTH_CURLEVEL));
m_level.initLevel(levelNum);
fonMC.gotoAndStop(CConstants.levelFon[levelNum]);
m_keyState = new CMultiState();
addShadowBike();
resetBike();
CGame.__set__curTime(0);
enableBikeControll();
m_panel.mcLoad._visible = false;
m_level.getEngine().resetTime();
process = processRace;
if (((levelNum == 0) || (levelNum == 5)) || (levelNum == 10)) {
mcStartLevel.play();
if (levelNum == 5) {
mcStartLevel.txt.gotoAndStop(2);
}
if (levelNum == 10) {
mcStartLevel.txt.gotoAndStop(3);
}
}
processShowHelp = function () {
};
if ((levelNum == 0) && (CConstants.helpLev1)) {
processShowHelp = myProcessHelp;
}
if ((levelNum == 1) && (CConstants.helpLev2)) {
processShowHelp = myProcessHelp;
}
if ((levelNum == 5) && (CConstants.helpLev6)) {
processShowHelp = myProcessHelp;
}
if ((levelNum == 6) && (CConstants.helpLev7)) {
processShowHelp = myProcessHelp;
}
if ((levelNum == 10) && (CConstants.helpLev11)) {
processShowHelp = myProcessHelp;
}
if ((levelNum == 11) && (CConstants.helpLev12)) {
processShowHelp = myProcessHelp;
}
}
function myProcessHelp() {
if (m_bike.m_forwardWheel.__get__pos().x > (MyBonus.minXbonus - 400)) {
trace((((m_bike.m_forwardWheel.__get__pos().x + " b ") + (MyBonus.minXbonus - 400)) + " ") + CConstants.helpLev11);
mcHelpPanel.play();
switch (m_curLevel) {
case 0 :
CConstants.helpLev1 = false;
break;
case 1 :
CConstants.helpLev2 = false;
break;
case 5 :
CConstants.helpLev6 = false;
mcHelpPanel.mcTextHelp.gotoAndStop(2);
break;
case 6 :
CConstants.helpLev7 = false;
mcHelpPanel.mcTextHelp.gotoAndStop(2);
break;
case 10 :
CConstants.helpLev11 = false;
mcHelpPanel.mcTextHelp.gotoAndStop(3);
break;
case 11 :
CConstants.helpLev12 = false;
mcHelpPanel.mcTextHelp.gotoAndStop(3);
}
processShowHelp = function () {
};
}
}
function resetBike() {
var _local2 = m_level.getBikePlace();
m_level.getEngine().clear();
m_bike.initWehicle(m_level, _local2.x, _local2.y);
m_level.initCamera(m_bike.getBodyMovieClip(), CConstants.SCREEN_WIDTH, CConstants.SCREEN_HEIGHT, CConstants.SCREEN_WIDTH / 4, CConstants.SCREEN_HEIGHT / 3);
}
function enableBikeControll() {
processKeys = function () {
var _local1 = new CMultiState();
if (Key.isDown(38)) {
_local1.addMask(CBike.KM_ACCELERATE);
}
if (Key.isDown(40)) {
_local1.addMask(CBike.KM_BRAKE);
}
if (Key.isDown(37)) {
_local1.addMask(CBike.KM_MOVE_BODY_BACK);
}
if (Key.isDown(39)) {
_local1.addMask(CBike.KM_MOVE_BODY_FORWARD);
}
if (Key.isDown(17)) {
_local1.addMask(CBike.KM_SPURT_FORWARD);
}
if (Key.isDown(18)) {
_local1.addMask(CBike.KM_SPURT_BACK);
}
return(_local1);
};
}
function disableKeyFunction() {
processKeys = function () {
var _local1 = new CMultiState();
return(_local1);
};
}
function onKeyDown() {
}
function spaceFunction() {
}
function killBike() {
MyBonus.minXbonus = 0;
cColorCh.ClickSelect = function () {
CRaceEngine.inst.processWaitRestart();
};
CSoundService.playSound(CConstants.SND_BOMB, false, 1);
m_panel.panelFloat.mcYesNo._visible = false;
CSoundService.stopSound(CConstants.SND_ENGINE3);
CConstants.savedData = data;
trace("Death!");
numFrame = 0;
if (CConstants.COLORCAR == 5) {
RB = null;
numFrame = 10;
m_bike.Expl();
} else {
m_bike.deadBike();
RB = new RagDoll(m_level.getEngine(), m_level.getVehiclePlace(), m_bike);
m_level.initCamera(RB.getMovieClip(), CConstants.SCREEN_WIDTH, CConstants.SCREEN_HEIGHT, CConstants.SCREEN_WIDTH / 4, CConstants.SCREEN_HEIGHT / 4);
}
m_keyState.__set__curMask(0);
m_keyState.__set__curMask(0);
process = function () {
this.numFrame++;
if (this.numFrame == 40) {
this.m_panel.panelFloat._visible = true;
CSoundService.stopCurLoopSound();
}
this.m_level.process();
this.m_bike.process();
this.RB.process();
this.ShadowProcess();
};
onKeyDown = function () {
if (Key.isDown(32)) {
this.initRaceEngine(this.m_curLevel);
}
};
}
function QuitRace() {
m_panel.panelFloat.mcYesNo._visible = true;
}
function processWaitRestart() {
CGameService.__set__pauseOn(false);
initRaceEngine(m_curLevel);
}
static var DEPTH_CURLEVEL = 10;
}
Symbol 768 MovieClip [__Packages.CGame] Frame 0
class CGame extends MovieClip
{
static var m_maxLevel, m_curLevel, all_time, m_time;
var m_raceEngine, onEnterFrame, screen;
function CGame () {
super();
m_maxLevel = 0;
m_curLevel = 0;
m_instance = this;
Key.addListener(this);
var _local4 = new CGameService(_root, CConstants.SOUNDS_NAMES);
CGameService.__set__DEBUG_MODE(false);
CSoundService.playLoopSound(CConstants.SND_INTRO);
}
static function showCont() {
var _local1 = SharedObject.getLocal("StDirtBike2");
if (_local1.data.maxLev != undefined) {
m_instance.m_logo.anim.mcShirmaCont._visible = false;
}
}
function initGame() {
CSoundService.stopAllSound();
m_raceEngine.initRaceEngine(curLevel);
onEnterFrame = processGame;
}
static function SaveData() {
var _local2 = SharedObject.getLocal("StDirtBike2");
_local2.data.maxLev = m_maxLevel;
_local2.data.score = score;
_local2.data.allTime = all_time;
_local2.data.colorCar = CConstants.COLORCAR;
_local2.data.countCar = CConstants.countShowCar;
_local2.data.helpLev1 = CConstants.helpLev1;
_local2.data.helpLev2 = CConstants.helpLev2;
_local2.data.helpLev6 = CConstants.helpLev6;
_local2.data.helpLev7 = CConstants.helpLev7;
_local2.data.helpLev11 = CConstants.helpLev11;
_local2.data.helpLev12 = CConstants.helpLev12;
var _local1 = 0;
while (_local1 < CConstants.levelNames.length) {
_local2.data["LevScor" + _local1] = scoreLevel[_local1];
_local2.data["LevTime" + _local1] = timeLevel[_local1];
_local1++;
}
_local2.flush();
}
static function LoadData() {
all_time = 0;
m_maxLevel = 0;
score = 0;
CConstants.countShowCar = 2;
CConstants.COLORCAR = 1;
var _local2 = SharedObject.getLocal("StDirtBike2");
if (_local2.data.maxLev != undefined) {
m_maxLevel = _local2.data.maxLev;
}
if (_local2.data.score != undefined) {
score = _local2.data.score;
}
if (_local2.data.allTime != undefined) {
all_time = _local2.data.allTime;
}
if (_local2.data.colorCar != undefined) {
CConstants.COLORCAR = _local2.data.colorCar;
}
if (_local2.data.countCar != undefined) {
CConstants.countShowCar = _local2.data.countCar;
}
if (_local2.data.helpLev1 != undefined) {
CConstants.helpLev1 = _local2.data.helpLev1;
}
if (_local2.data.helpLev2 != undefined) {
CConstants.helpLev1 = _local2.data.helpLev2;
}
if (_local2.data.helpLev6 != undefined) {
CConstants.helpLev1 = _local2.data.helpLev6;
}
if (_local2.data.helpLev7 != undefined) {
CConstants.helpLev1 = _local2.data.helpLev7;
}
if (_local2.data.helpLev11 != undefined) {
CConstants.helpLev1 = _local2.data.helpLev11;
}
if (_local2.data.helpLev12 != undefined) {
CConstants.helpLev1 = _local2.data.helpLev12;
}
var _local1 = 0;
while (_local1 < CConstants.levelNames.length) {
timeLevel[_local1] = 0;
scoreLevel[_local1] = 0;
if (_local2.data["LevScor" + _local1] != undefined) {
scoreLevel[_local1] = _local2.data["LevScor" + _local1];
}
if (_local2.data["LevTime" + _local1] != undefined) {
timeLevel[_local1] = _local2.data["LevTime" + _local1];
}
all_time = all_time + timeLevel[_local1];
_local1++;
}
}
static function NoButton() {
m_instance.m_logo.mcYesNo._visible = false;
}
static function buttonStartGame() {
score = 0;
scoreLevel = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
timeLevel = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
m_maxLevel = 0;
curLevel = (0);
all_time = 0;
LoadData();
gotoChoseLevel();
}
static function gotoChoseLevel() {
if (!CSoundService.soundIsPlay(CConstants.SND_INTRO)) {
CSoundService.playLoopSound(CConstants.SND_INTRO);
}
CSoundService.playSound(CConstants.SND_BUTTON, false, 1);
if (m_maxLevel > (CConstants.levelNames.length - 1)) {
m_maxLevel = CConstants.levelNames.length - 1;
}
m_curLevel = m_maxLevel;
m_instance.gotoAndStop("lbChuseLevel");
m_instance.onEnterFrame = function () {
this.mcChuseLevel.level_0.mcShirma.useHandCursor = false;
this.mcChuseLevel.level_0.mcShirma.score.text = (((CGame.scoreLevel[0] + CGame.scoreLevel[1]) + CGame.scoreLevel[2]) + CGame.scoreLevel[3]) + CGame.scoreLevel[4];
this.mcChuseLevel.level_0.mcShirma.timeEp.text = CGame.int2Time((((CGame.timeLevel[0] + CGame.timeLevel[1]) + CGame.timeLevel[2]) + CGame.timeLevel[3]) + CGame.timeLevel[4]);
this.mcChuseLevel.level_0.mcShirma.gotoAndStop(3);
this.mcChuseLevel.level_1.mcShirma.useHandCursor = false;
this.mcChuseLevel.level_1.mcShirma.score.text = "";
this.mcChuseLevel.level_1.mcShirma.timeEp.text = "";
this.mcChuseLevel.level_2.mcShirma.useHandCursor = false;
this.mcChuseLevel.level_2.mcShirma.score.text = "";
this.mcChuseLevel.level_2.mcShirma.timeEp.text = "";
if (CGame.m_maxLevel > 4) {
this.mcChuseLevel.level_1.mcShirma.gotoAndStop(3);
this.mcChuseLevel.level_1.mcShirma.score.text = (((CGame.scoreLevel[5] + CGame.scoreLevel[6]) + CGame.scoreLevel[7]) + CGame.scoreLevel[8]) + CGame.scoreLevel[9];
this.mcChuseLevel.level_1.mcShirma.timeEp.text = CGame.int2Time((((CGame.timeLevel[5] + CGame.timeLevel[6]) + CGame.timeLevel[7]) + CGame.timeLevel[8]) + CGame.timeLevel[9]);
} else {
this.mcChuseLevel.level_1.mcShirma.gotoAndStop(1);
}
if (CGame.m_maxLevel > 9) {
this.mcChuseLevel.level_2.mcShirma.gotoAndStop(3);
this.mcChuseLevel.level_2.mcShirma.score.text = (((CGame.scoreLevel[10] + CGame.scoreLevel[11]) + CGame.scoreLevel[12]) + CGame.scoreLevel[13]) + CGame.scoreLevel[14];
this.mcChuseLevel.level_2.mcShirma.timeEp.text = CGame.int2Time((((CGame.timeLevel[10] + CGame.timeLevel[11]) + CGame.timeLevel[12]) + CGame.timeLevel[13]) + CGame.timeLevel[14]);
} else {
this.mcChuseLevel.level_2.mcShirma.gotoAndStop(1);
}
this.mcChuseLevel.mcColor.cColorCh();
this.mcChuseLevel.totalScore.text = CGame.score;
CGame.all_time = 0;
var _local2 = 0;
while (_local2 < CGame.timeLevel.length) {
CGame.all_time = CGame.all_time + CGame.timeLevel[_local2];
_local2++;
}
this.mcChuseLevel.totalTime.text = CGame.int2Time(CGame.all_time);
this.onEnterFrame = function () {
};
};
}
static function selectEpisod(s) {
if (s == "level_0") {
curLevel = (0);
}
if (s == "level_1") {
curLevel = (5);
}
if (s == "level_2") {
curLevel = (10);
}
m_instance.gotoAndStop("lbChuseVehicle");
cColorCh.ClickSelect = function () {
CGame.m_instance.mcSelectVeh.mcLoad._visible = true;
CGame.m_instance.onEnterFrame = function () {
CGame.buttonStartRace();
};
};
m_instance.defaltFunction = function () {
CGame.m_instance.mcSelectVeh.mcLoad._visible = true;
CGame.m_instance.onEnterFrame = function () {
CGame.buttonStartRace();
};
};
m_instance.mcSelectVeh.mcLoad._visible = false;
}
static function buttonHowToPlay() {
CSoundService.playSound(CConstants.SND_BUTTON, false, 1);
m_instance.gotoAndStop("lbHowToPlay");
}
static function buttonAbout() {
CSoundService.playSound(CConstants.SND_BUTTON, false, 1);
m_instance.gotoAndStop("lbAbout");
}
function updateScoreAndLevel() {
screen.txtAllTime = int2Time(all_time);
screen.txtLevel = String(curLevel + 1);
screen.txtScore = String(score);
}
static function buttonNextLevel() {
m_instance.screen.mcLoad1._visible = true;
curLevel = ((curLevel+1));
if (m_curLevel > (CConstants.levelNames.length - 1)) {
m_curLevel = 0;
gotoChoseLevel();
} else {
m_instance.onEnterFrame = function () {
this.m_instance.onEnterFrame = function () {
};
CGame.buttonStartRace();
};
}
}
static function buttonStartRace() {
if (m_curLevel > (CConstants.levelNames.length - 1)) {
m_curLevel = CConstants.levelNames.length - 1;
}
CSoundService.playSound(CConstants.SND_BUTTON, false, 1);
m_instance.gotoAndStop("lbGame");
m_instance.defaltFunction = function () {
};
m_instance.m_raceEngine.m_panel.txtLevel = curLevel + 1;
m_instance.m_raceEngine.m_panel.txtScore = score;
SaveData();
CGameService.__set__pauseOn(false);
m_instance.onEnterFrame = m_instance.initGame;
}
static function buttonBack() {
CSoundService.playSound(CConstants.SND_BUTTON, false, 1);
m_instance.gotoAndStop("lbSplash");
}
static function buttonExitGame() {
CSoundService.playSound(CConstants.SND_BUTTON, false, 1);
m_instance.gotoAndStop("lbLose");
m_instance.updateScoreAndLevel();
}
static function levelComplete() {
MyBonus.minXbonus = 0;
all_time = all_time + m_time;
CSoundService.stopAllSound();
if ((curLevel >= (CConstants.levelNames.length - 1)) && (scoreLevel[curLevel] == 0)) {
m_instance.gotoAndStop("lbWin");
m_instance.defaltFunction = function () {
CGame.gotoChoseLevel();
};
} else {
m_instance.gotoAndStop("lbStatistic");
m_instance.defaltFunction = buttonNextLevel;
}
m_instance.screen.mcLoad1._visible = false;
if (curLevel == m_maxLevel) {
m_maxLevel++;
if (m_maxLevel == 5) {
m_instance.screen.ncDeBlock.gotoAndPlay(2);
CConstants.countShowCar = 3;
}
if ((m_maxLevel == 10) and (CConstants.countShowCar != 4)) {
m_instance.screen.ncDeBlock.gotoAndPlay(2);
CConstants.countShowCar = 4;
}
if ((m_maxLevel == 15) and (CConstants.countShowCar != 5)) {
m_instance.screen.ncDeBlock.gotoAndPlay(2);
CConstants.countShowCar = 5;
}
}
var _local2 = int2Time(Math.abs(m_time - timeLevel[curLevel]));
if (timeLevel[curLevel] == 0) {
_local2 = "";
timeLevel[curLevel] = m_time;
} else if (timeLevel[curLevel] > m_time) {
timeLevel[curLevel] = m_time;
_local2 = "-" + _local2;
} else {
_local2 = "+" + _local2;
}
var _local3 = int((300 + (347 * curLevel)) + int(Math.max(1000 - m_time, 0) * 23));
var _local4 = String(_local3 - scoreLevel[curLevel]);
if (scoreLevel[curLevel] < _local3) {
_local4 = "+" + _local4;
if (scoreLevel[curLevel] == 0) {
_local4 = "";
}
scoreLevel[curLevel] = _local3;
}
var _local5 = score;
score = 0;
all_time = 0;
var _local1 = 0;
while (_local1 < scoreLevel.length) {
score = score + scoreLevel[_local1];
all_time = all_time + timeLevel[_local1];
_local1++;
}
m_instance.screen.txtAllTime = int2Time(all_time);
m_instance.screen.txtLevel = String(curLevel + 1);
m_instance.screen.txtTimeScore = int2Time(m_time);
m_instance.screen.txtSpecialScore = String(int(_local3));
m_instance.screen.txtScore = String(score);
m_instance.screen.txtUpScore = _local4;
m_instance.screen.txtUpTime = _local2;
if (_local5 < score) {
m_instance.screen.txtUpAllScore = "+" + String(int(score - _local5));
}
SaveData();
}
function processGame() {
CGameService.clearAll();
m_raceEngine.process();
}
function onKeyDown() {
m_raceEngine.onKeyDown();
if (Key.getCode() == 32) {
defaltFunction();
}
}
function defaltFunction() {
}
static function set curLevel(curLevel) {
m_curLevel = curLevel;
//return(CGame.curLevel);
}
static function get curLevel() {
return(m_curLevel);
}
static function get curTime() {
return(m_time);
}
static function set curTime(newTime) {
m_time = newTime;
var _local3 = Math.floor(newTime / 60);
var _local2 = Math.floor(newTime % 60);
var _local4 = Math.floor((newTime - Math.floor(newTime)) * 100);
m_instance.m_raceEngine.m_panel.m_msec = CGameService.numberToStringWith0(_local4);
m_instance.m_raceEngine.m_panel.m_sec = CGameService.numberToStringWith0(_local2);
m_instance.m_raceEngine.m_panel.m_min = CGameService.numberToStringWith0(_local3);
m_instance.m_raceEngine.m_panel.txtScore = score;
//return(curTime);
}
static function int2Time(newTime) {
var _local3 = Math.floor(newTime / 60);
var _local2 = Math.floor(newTime % 60);
var _local4 = Math.floor((newTime - Math.floor(newTime)) * 100);
return((((CGameService.numberToStringWith0(_local3) + ":") + CGameService.numberToStringWith0(_local2)) + ":") + CGameService.numberToStringWith0(_local4));
}
static var m_instance = null;
static var score = 0;
static var scoreLevel = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
static var timeLevel = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
}
Symbol 769 MovieClip [__Packages.cColorCh] Frame 0
class cColorCh extends MovieClip
{
var mcHelpWind, mcSecret, mc5Podl, HitHide5;
function cColorCh () {
super();
onStart();
}
function onStart() {
hideHelpWind();
showColor(CConstants.COLORCAR);
setHiden();
}
function showHelpWind(n) {
mcHelpWind._visible = true;
mcHelpWind.gotoAndStop(n + 1);
mcHelpWind._x = this["HitHide" + n]._x;
mcHelpWind._y = this["HitHide" + n]._y;
}
function hideHelpWind() {
mcHelpWind._visible = false;
}
function setHiden() {
var _local2 = 1;
while (_local2 <= countCar) {
this["mcHide" + _local2]._visible = true;
this["mcHide" + _local2].useHandCursor = false;
_local2++;
}
_local2 = 1;
while (_local2 <= CConstants.countShowCar) {
this["mcHide" + _local2]._visible = false;
_local2++;
}
if (CConstants.countShowCar < 5) {
mcSecret._visible = false;
mc5Podl._visible = false;
HitHide5._visible = false;
} else {
trace("ShowHitSecret");
mcSecret._visible = true;
mc5Podl._visible = true;
HitHide5._visible = true;
}
}
static function ClickSelect() {
}
function setColor(n) {
showColor(n);
ClickSelect();
}
function showColor(n) {
CConstants.COLORCAR = n;
var _local2 = 1;
while (_local2 <= countCar) {
this["mcRam" + _local2]._visible = false;
_local2++;
}
this["mcRam" + CConstants.COLORCAR]._visible = true;
}
static var countCar = 5;
}
Symbol 770 MovieClip [__Packages.RagDoll] Frame 0
class RagDoll
{
var _wheelCount, _dollBody, B, LO, L, LE, A, AE;
function RagDoll (engine, bikePlace, bike) {
trace("addRD");
_wheelCount = 0;
_dollBody = bikePlace.attachMovie("RDollAll", "RDollAll", 21034);
var _local2 = getGlobalPoint(bike.getBodyMovieClip().RDPos, bikePlace);
_dollBody._x = _local2.x;
_dollBody._y = _local2.y;
_dollBody._rotation = bike.getBodyMovieClip()._rotation;
createSkeleton(engine, bikePlace);
var _local5 = bike.m_backWheel.__get__pos().minusNew(bike.m_backWheel.__get__prevPos());
startImpulse(_local5);
}
function createSkeleton(engine_, place_) {
makeNodes(engine_, namePoint, place_);
var _local2 = new CSpringConstraint();
engine_.addConstraint(_local2.init(1, 1, B, LO));
_local2 = new CSpringConstraint();
engine_.addConstraint(_local2.init(0.9, 0.9, LO, L));
_local2 = new CSpringConstraint();
engine_.addConstraint(_local2.init(0.9, 0.9, L, LE));
_local2 = new CSpringConstraint();
engine_.addConstraint(_local2.init(0.1, 0.1, LO, LE));
_local2 = new CSpringConstraint();
engine_.addConstraint(_local2.init(0.1, 0.1, B, L));
engine_.addConstraint(new CPenetrationConstraint(LO, L, LE));
_local2 = new CSpringConstraint();
engine_.addConstraint(_local2.init(0.9, 0.9, B, A));
_local2 = new CSpringConstraint();
engine_.addConstraint(_local2.init(0.9, 0.9, A, AE));
_local2 = new CSpringConstraint();
engine_.addConstraint(_local2.init(0.1, 0.1, B, AE));
process();
}
function process() {
var _local3 = getGlobalPoint(_dollBody.mcBody, _dollBody._parent);
_dollBody._x = _dollBody._x + (B.__get__pos().x - _local3.x);
_dollBody._y = _dollBody._y + (B.__get__pos().y - _local3.y);
_dollBody._rotation = ((Math.atan2(LO.__get__pos().y - B.__get__pos().y, LO.__get__pos().x - B.__get__pos().x) * 180) / Math.PI) - 90;
rotateBodyNode(_dollBody.mcLeg, L, LO);
rotateBodyNode(_dollBody.mcArm, A, B);
rotateBodyNode(_dollBody.mcLeg.mcStopa, LE, L);
rotateBodyNode(_dollBody.mcArm.mcHand, AE, A);
var _local2 = 0;
while (_local2 < namePoint.length) {
this[namePoint[_local2]].setAccelerate(this[namePoint[_local2]].getAccelerate() * 0.2);
_local2++;
}
}
function makeNodeWheel(p, place_) {
_wheelCount++;
var _local2 = place_.createEmptyMovieClip("_wh" + _wheelCount, 29050 + _wheelCount);
_local2._visible = false;
var _local3 = new CWheel();
_local3.initWhile(p.x, p.y, 3 + random(5), 8, 40, _local2);
return(_local3);
}
function makeNodes(engine_, nodeNames_, place_) {
var _local2 = 0;
while (_local2 < nodeNames_.length) {
this[nodeNames_[_local2]] = makeNodeWheel(getGlobalPoint(_dollBody[nodeNames_[_local2]], place_), place_);
engine_.addParticle(this[nodeNames_[_local2]]);
_local2++;
}
}
function getGlobalPoint(localMovie_, globalMovie_) {
var _local1 = new Object();
_local1.x = 0;
_local1.y = 0;
localMovie_.localToGlobal(_local1);
globalMovie_.globalToLocal(_local1);
return(_local1);
}
function _makeImpulseForNode(node_, imp_) {
node_.__get__pos().x = node_.__get__pos().x + imp_.x;
node_.__get__pos().y = node_.__get__pos().y + imp_.y;
}
function startImpulse(m) {
trace((m.x + " ") + m.y);
var _local2 = 0;
while (_local2 < namePoint.length) {
_makeImpulseForNode(this[namePoint[_local2]], m.multNew((random(100) + 100) / 100));
_local2++;
}
}
function rotateBodyNode(mc, p1, p2) {
mc._rotation = ((((Math.atan2(p1.__get__pos().y - p2.__get__pos().y, p1.__get__pos().x - p2.__get__pos().x) * 180) / Math.PI) - mc._parent._rotation) - 90) - mc._parent._parent._rotation;
}
function getMovieClip() {
return(_dollBody);
}
var namePoint = ["B", "LO", "L", "LE", "A", "AE"];
}
Symbol 771 MovieClip [__Packages.myWater] Frame 0
class myWater extends MyBonus
{
function myWater () {
super();
}
function myHitTest(fw, bw) {
if (fw.getMovie().hitTest(this)) {
fw.startWater();
}
if (bw.getMovie().hitTest(this)) {
bw.startWater();
}
}
}
Symbol 772 MovieClip [__Packages.CInvisibleMovie] Frame 0
class CInvisibleMovie extends MovieClip
{
var _visible;
function CInvisibleMovie () {
super();
_visible = false;
}
}
Symbol 773 MovieClip [__Packages.myIcePanel] Frame 0
class myIcePanel extends MyBonus
{
function myIcePanel () {
super();
}
function myHitTest(fw, bw) {
if (fw.getMovie().hitTest(this)) {
fw.startIce();
}
if (bw.getMovie().hitTest(this)) {
bw.startIce();
}
}
}
Symbol 49 MovieClip Frame 88
_parent.gotoAndPlay("boom");
Symbol 76 MovieClip Frame 1
stop();
Symbol 76 MovieClip Frame 91
_parent.gotoAndStop("lbStart");
Symbol 77 Button
on (press) {
getURL ("http://www.addictinggames.com/", "_blank");
}
Symbol 78 MovieClip [idCurLevel] Frame 1
#initclip 33
Object.registerClass("idCurLevel", CLevel);
#endinitclip
Symbol 106 MovieClip Frame 1
stop();
Symbol 106 MovieClip Frame 2
stop();
Symbol 106 MovieClip Frame 3
stop();
Symbol 107 MovieClip [idMotoWhellBack] Frame 1
stop();
Symbol 113 MovieClip [idMotoWhellForward] Frame 1
stop();
Symbol 119 MovieClip [idMotoWhellBack_ATV] Frame 1
stop();
Symbol 123 MovieClip Frame 1
stop();
Symbol 138 MovieClip Frame 7
this._parent.endMove();
Symbol 140 MovieClip Frame 7
this._parent.endMove();
Symbol 141 MovieClip Frame 7
this._parent.endMove();
Symbol 143 MovieClip Frame 7
this._parent.endMove();
Symbol 144 MovieClip [man] Frame 1
#initclip 32
Object.registerClass("man", CMan);
#endinitclip
this.stop();
Symbol 159 MovieClip Frame 1
stop();
Symbol 163 MovieClip Frame 1
stop();
Symbol 165 MovieClip Frame 1
stop();
Symbol 167 MovieClip Frame 1
stop();
Symbol 168 MovieClip Frame 1
stop();
Symbol 182 MovieClip [dmMotoWhell_Monster] Frame 1
stop();
Symbol 190 MovieClip Frame 1
stop();
Symbol 194 MovieClip [levelHit10] Frame 1
#initclip 40
Object.registerClass("levelHit10", CInvisibleMovie);
#endinitclip
Symbol 203 MovieClip [Water] Frame 1
#initclip 34
Object.registerClass("Water", myWater);
#endinitclip
Symbol 208 MovieClip [finishWall] Frame 1
#initclip 35
Object.registerClass("finishWall", CInvisibleMovie);
#endinitclip
Symbol 212 MovieClip [levelHit6] Frame 1
#initclip 36
Object.registerClass("levelHit6", CInvisibleMovie);
#endinitclip
Symbol 225 MovieClip [levelHit7] Frame 1
#initclip 37
Object.registerClass("levelHit7", CInvisibleMovie);
#endinitclip
Symbol 237 MovieClip [levelHit8] Frame 1
#initclip 38
Object.registerClass("levelHit8", CInvisibleMovie);
#endinitclip
Symbol 247 MovieClip [levelHit9] Frame 1
#initclip 39
Object.registerClass("levelHit9", CInvisibleMovie);
#endinitclip
Symbol 260 MovieClip [levelHit1] Frame 1
#initclip 46
Object.registerClass("levelHit1", CInvisibleMovie);
#endinitclip
Symbol 278 MovieClip [sandTrap] Frame 1
#initclip 41
Object.registerClass("sandTrap", mySandTrap);
#endinitclip
Symbol 282 MovieClip [levelHit2] Frame 1
#initclip 42
Object.registerClass("levelHit2", CInvisibleMovie);
#endinitclip
Symbol 302 MovieClip [levelHit3] Frame 1
#initclip 43
Object.registerClass("levelHit3", CInvisibleMovie);
#endinitclip
Symbol 323 MovieClip [levelHit4] Frame 1
#initclip 44
Object.registerClass("levelHit4", CInvisibleMovie);
#endinitclip
Symbol 340 MovieClip [levelHit5] Frame 1
#initclip 45
Object.registerClass("levelHit5", CInvisibleMovie);
#endinitclip
Symbol 358 MovieClip [levelHit11] Frame 1
#initclip 52
Object.registerClass("levelHit11", CInvisibleMovie);
#endinitclip
Symbol 365 MovieClip [IceBonus] Frame 1
#initclip 47
Object.registerClass("IceBonus", myIcePanel);
#endinitclip
Symbol 369 MovieClip [levelHit12] Frame 1
#initclip 48
Object.registerClass("levelHit12", CInvisibleMovie);
#endinitclip
Symbol 378 MovieClip [levelHit13] Frame 1
#initclip 49
Object.registerClass("levelHit13", CInvisibleMovie);
#endinitclip
Symbol 386 MovieClip [levelHit14] Frame 1
#initclip 50
Object.registerClass("levelHit14", CInvisibleMovie);
#endinitclip
Symbol 394 MovieClip [levelHit15] Frame 1
#initclip 51
Object.registerClass("levelHit15", CInvisibleMovie);
#endinitclip
Symbol 434 Button
on (press) {
CGame.buttonStartGame();
}
Symbol 435 Button
on (press) {
CGame.buttonHowToPlay();
}
Symbol 436 Button
on (press) {
CGame.buttonAbout();
}
Symbol 439 Button
on (press) {
trace(_quality);
if (_quality == "HIGH") {
_quality = "MEDIUM";
gotoAndStop (2);
} else {
_quality = "HIGH";
gotoAndStop (1);
}
}
Symbol 441 MovieClip Frame 1
stop();
Symbol 441 MovieClip Frame 2
stop();
Symbol 442 MovieClip Frame 20
stop();
Symbol 443 MovieClip Frame 1
this.mcYesNo._visible = false;
CGame.showCont();
stop();
Symbol 447 Button
on (press) {
if (_currentframe == 2) {
CSoundService.soundOn();
} else {
CSoundService.soundOff();
}
trace(CSoundService.soundIsOn());
play();
}
Symbol 449 MovieClip Frame 1
stop();
Symbol 449 MovieClip Frame 2
stop();
Symbol 452 MovieClip Frame 1
stop();
Symbol 454 Button
on (press) {
CGameService.__set__pauseOn(!CGameService.__get__pauseOn());
}
Symbol 474 Button
on (press) {
CGame.buttonBack();
}
Symbol 522 Button
on (press) {
CGame.selectEpisod(_parent._name);
}
Symbol 526 MovieClip Frame 1
stop();
Symbol 546 Button
on (press) {
CGame.gotoChoseLevel();
}
Symbol 553 MovieClip Frame 1
stop();
Symbol 554 Button
on (press) {
setColor(1);
}
on (rollOver) {
showHelpWind(1);
}
on (rollOut) {
hideHelpWind();
}
Symbol 555 Button
on (press) {
setColor(2);
}
on (rollOver) {
showHelpWind(2);
}
on (rollOut) {
hideHelpWind();
}
Symbol 556 Button
on (press) {
setColor(3);
}
on (rollOver) {
showHelpWind(3);
}
on (rollOut) {
hideHelpWind();
}
Symbol 557 Button
on (press) {
setColor(4);
}
on (rollOver) {
showHelpWind(4);
}
on (rollOut) {
hideHelpWind();
}
Symbol 558 Button
on (press) {
setColor(5);
}
on (rollOver) {
showHelpWind(5);
}
on (rollOut) {
hideHelpWind();
}
Symbol 587 MovieClip Frame 1
stop();
Symbol 587 MovieClip Frame 2
stop();
Symbol 588 MovieClip [CarColorChang] Frame 1
#initclip 55
Object.registerClass("CarColorChang", cColorCh);
#endinitclip
stop();
Symbol 610 Button
on (press) {
CGame.buttonNextLevel();
}
Symbol 615 MovieClip Frame 1
stop();
Symbol 615 MovieClip Frame 10
gotoAndPlay (2);
Symbol 646 Button
on (press) {
CGame.buttonBack();
}
Symbol 686 MovieClip Frame 1
stop();
Symbol 686 MovieClip Frame 2
stop();
Symbol 690 MovieClip Frame 1
stop();
Symbol 690 MovieClip Frame 2
stop();
Symbol 690 MovieClip Frame 3
stop();
Symbol 691 MovieClip Frame 1
stop();
Symbol 695 MovieClip Frame 1
stop();
Symbol 696 MovieClip Frame 1
stop();
Symbol 711 Button
on (press) {
_parent._parent.QuitRace();
}
Symbol 715 Button
on (press) {
_parent._parent.processWaitRestart();
}
Symbol 723 Button
on (press) {
CGame.gotoChoseLevel();
}
Symbol 727 Button
on (press) {
_visible = false;
}
Symbol 729 MovieClip Frame 1
stop();
Symbol 734 Button
on (press) {
CGameService.__set__pauseOn(false);
}
Symbol 735 Button
on (press) {
_parent._parent.processWaitRestart();
}
Symbol 738 MovieClip Frame 1
upHit.useHandCursor = false;
stop();
Symbol 741 Button
on (press) {
killBike();
}
Symbol 742 MovieClip [gameRace] Frame 1
#initclip 53
Object.registerClass("gameRace", CRaceEngine);
#endinitclip
Symbol 743 MovieClip [game] Frame 1
#initclip 54
Object.registerClass("game", CGame);
#endinitclip
stop();
Symbol 743 MovieClip [game] Frame 60
stop();
Symbol 743 MovieClip [game] Frame 75
stop();
Symbol 743 MovieClip [game] Frame 90
stop();