Frame 1
i = -16734;
createEmptyMovieClip("kv_mc", i);
kv_mc.kv_v = {c:265, td:"265.memecounter.com"};
System.security.allowDomain(kv_mc.kv_v.td);
kv_mc.kv_v.c_so = SharedObject.getLocal(kv_mc.kv_v.c, "/");
kv_mc.kv_v.d = (_root.ori_dom ? (_root.ori_dom) : (((_root._url.split("/")[0].indexOf("http") == -1) ? "Local" : (_root._url.split("/")[2].split("?")[0]))));
kv_mc.kv_v.fpv = getVersion().split(" ")[1].split(",")[0];
kv_mc.kv_v.lurl = ((((((((((("http://" + kv_mc.kv_v.td) + "/tracker.php") + "?c=") + kv_mc.kv_v.c) + "&r=") + Math.floor(Math.random() * 10000000000)) + "&d=") + kv_mc.kv_v.d) + "&u=") + (kv_mc.kv_v.c_so.data.u ? "1" : "")) + "&p=") + kv_mc.kv_v.fpv;
kv_mc.kv_v.c_so.data.u = true;
kv_mc.kv_v.c_so.flush();
kv_mc.kv_v.t_mc = kv_mc.createEmptyMovieClip("kv_tracker", i - 1);
kv_mc.kv_v.l_mcl = new MovieClipLoader();
if (kv_mc.kv_v.l_mcl.loadClip) {
kv_mc.kv_v.l_mcl.loadClip(kv_mc.kv_v.lurl, kv_mc.kv_v.t_mc);
} else {
loadMovie (kv_mc.kv_v.lurl, kv_mc.kv_v.t_mc);
}
function submitScore() {
_level0.swHighScoreObject.player1Score = CGameService.score;
trace(_level0.swHighScoreObject.player1Score);
}
function playAgain() {
_root.gotoAndStop("lbStart1");
}
System.security.allowDomain("shockwave.com", "intranet.shockwave.com", "gameblast.shockwave.com", "www.shockwave.com", "dev.shockwave.com", "stage.shockwave.com");
_level0.swHighScoreObject = new Object();
_level0.swHighScoreObject.showTab = "view";
_level0.swHighScoreObject.gameId = "motocrossfmx";
_level0.swHighScoreObject.gameTitle = "Motocross FMX";
_level0.swHighScoreObject.screenWidth = CConstants.SCREEN_WIDTH;
_level0.swHighScoreObject.screenHeight = CConstants.SCREEN_HEIGHT;
_level0.swHighScoreObject.scoreDescriptor = "points";
_level0.swHighScoreObject.numPlayers = 1;
_level0.swHighScoreObject.player1Score = 123456789 /* 0x75BCD15 */;
_level0.swHighScoreObject.player2Score = 0;
_level0.swHighScoreObject.player3Score = 0;
_level0.swHighScoreObject.player4Score = 0;
_level0.HSHubURL = "http://www.shockwave.com/content/highscores/scorez-2002.swf";
stop();
Instance of Symbol 10 MovieClip in Frame 1
onClipEvent (load) {
var numPercentage = 0;
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.txtPercentage = String(numPercentage) + "%";
if (numPercentage >= 100) {
_parent.gotoAndStop("lbStart");
}
}
}
Frame 15
Frame 46
new CGameService(_root, CConstants.SOUNDS_NAMES);
stop();
Symbol 2 MovieClip [dmSoundService] Frame 1
#initclip 40
Object.registerClass("dmSoundService", CSoundService);
#endinitclip
Symbol 704 MovieClip [__Packages.CBikeParams] Frame 0
class CBikeParams
{
var controlAccPercBase, controlAccPercMult, koeffStability, bodyLibName, bodyDepth, backWheelLibName, backWheelDepth, backWheelKoeffSlip, backWheelKoeffConcatenation, backWheelKoeffSpring, backWheelPMass, backWheelPMaxSpeed, backWheelPRadius, backWheelPAcc, forwardWheelLibName, forwardWheelDepth, forwardWheelKoeffSlip, forwardWheelKoeffConcatenation, forwardWheelKoeffSpring, forwardWheelPMass, forwardWheelPMaxSpeed, forwardWheelPRadius, forwardWheelPAcc, pLD_mass, pRD_mass, pC_mass, triangleSprings, downSpringParams, upSpringParams, diagonalSpringParams, rightSpringParams, leftSpringParams;
function CBikeParams (controlAccPercBase_, controlAccPercMult_, koeffStability_, bodyLibName_, bodyDepth_, backWheelLibName_, backWheelDepth_, backWheelKoeffSlip_, backWheelKoeffConcatenation_, backWheelKoeffSpring_, backWheelPMass_, backWheelPMaxSpeed_, backWheelPRadius_, backWheelPAcc_, forwardWheelLibName_, forwardWheelDepth_, forwardWheelKoeffSlip_, forwardWheelKoeffConcatenation_, forwardWheelKoeffSpring_, forwardWheelPMass_, forwardWheelPMaxSpeed_, forwardWheelPRadius_, forwardWheelPAcc_, pLD_mass_, pRD_mass_, pC_mass_, triangleSprings_, downSpringParams_, upSpringParams_, diagonalSpringParams_, rightSpringParams_, leftSpringParams_) {
controlAccPercBase = controlAccPercBase_;
controlAccPercMult = controlAccPercMult_;
koeffStability = koeffStability_;
bodyLibName = bodyLibName_;
bodyDepth = bodyDepth_;
backWheelLibName = backWheelLibName_;
backWheelDepth = backWheelDepth_;
backWheelKoeffSlip = backWheelKoeffSlip_;
backWheelKoeffConcatenation = backWheelKoeffConcatenation_;
backWheelKoeffSpring = backWheelKoeffSpring_;
backWheelPMass = backWheelPMass_;
backWheelPMaxSpeed = backWheelPMaxSpeed_;
backWheelPRadius = backWheelPRadius_;
backWheelPAcc = backWheelPAcc_;
forwardWheelLibName = forwardWheelLibName_;
forwardWheelDepth = forwardWheelDepth_;
forwardWheelKoeffSlip = forwardWheelKoeffSlip_;
forwardWheelKoeffConcatenation = forwardWheelKoeffConcatenation_;
forwardWheelKoeffSpring = forwardWheelKoeffSpring_;
forwardWheelPMass = forwardWheelPMass_;
forwardWheelPMaxSpeed = forwardWheelPMaxSpeed_;
forwardWheelPRadius = forwardWheelPRadius_;
forwardWheelPAcc = forwardWheelPAcc_;
pLD_mass = pLD_mass_;
pRD_mass = pRD_mass_;
pC_mass = pC_mass_;
triangleSprings = triangleSprings_;
downSpringParams = downSpringParams_;
upSpringParams = upSpringParams_;
diagonalSpringParams = diagonalSpringParams_;
rightSpringParams = rightSpringParams_;
leftSpringParams = leftSpringParams_;
}
}
Symbol 705 MovieClip [__Packages.CSpringParams] Frame 0
class CSpringParams
{
var koeffStretch, koeffPress, basicParticleNum, basicParticleWeight;
function CSpringParams (koeffStretch_, koeffPress_, basicParticleNum_, basicParticleWeight_) {
koeffStretch = koeffStretch_;
koeffPress = koeffPress_;
basicParticleNum = basicParticleNum_;
basicParticleWeight = basicParticleWeight_;
}
}
Symbol 706 MovieClip [__Packages.CSpringConstraint] Frame 0
class CSpringConstraint
{
var p1, p2, koeffStiffPress, koeffStiffStretch, relaxLen, basicParticleNum, basicParticleWeight;
function CSpringConstraint (p1_, p2_, koeffStiffPress_, koeffStiffStretch_) {
p1 = p1_;
p2 = p2_;
koeffStiffPress = koeffStiffPress_;
koeffStiffStretch = koeffStiffStretch_;
var _local2 = new CVector2D(p1.pos.x - p2.pos.x, p1.pos.y - p2.pos.y);
relaxLen = _local2.modul();
basicParticleNum = BASIC_PARTICLE_NONE;
basicParticleWeight = 1;
}
function setBasicParticleNum(basicParticleNum_) {
basicParticleNum = basicParticleNum_;
}
function setBasicParticleWeight(basicParticleWeight_) {
basicParticleWeight = basicParticleWeight_;
}
function resolve() {
var _local3 = new CVector2D(p1.pos.x - p2.pos.x, p1.pos.y - p2.pos.y);
var _local6 = _local3.modul();
var _local5 = (_local6 - relaxLen) / _local6;
var _local4;
if (_local6 > relaxLen) {
_local4 = koeffStiffStretch;
} else {
_local4 = koeffStiffPress;
}
var _local2;
if (basicParticleNum == BASIC_PARTICLE_NONE) {
_local2 = (_local5 * _local4) / (p1.mass + p2.mass);
p1.pos.x = p1.pos.x - ((_local3.x * p1.mass) * _local2);
p1.pos.y = p1.pos.y - ((_local3.y * p1.mass) * _local2);
p2.pos.x = p2.pos.x + ((_local3.x * p2.mass) * _local2);
p2.pos.y = p2.pos.y + ((_local3.y * p2.mass) * _local2);
} else if (basicParticleNum == 1) {
_local2 = (_local5 * _local4) / (p1.mass + p2.mass);
_local2 = _local5 * _local4;
p1.pos.x = p1.pos.x - ((_local3.x * _local2) * (1 - basicParticleWeight));
p1.pos.y = p1.pos.y - ((_local3.y * _local2) * (1 - basicParticleWeight));
p2.pos.x = p2.pos.x + ((_local3.x * _local2) * basicParticleWeight);
p2.pos.y = p2.pos.y + ((_local3.y * _local2) * basicParticleWeight);
} else {
_local2 = (_local5 * _local4) / (p1.mass + p2.mass);
_local2 = _local5 * _local4;
p1.pos.x = p1.pos.x + ((_local3.x * _local2) * basicParticleWeight);
p1.pos.y = p1.pos.y + ((_local3.y * _local2) * basicParticleWeight);
p2.pos.x = p2.pos.x + ((_local3.x * _local2) * (1 - basicParticleWeight));
p2.pos.y = p2.pos.y + ((_local3.y * _local2) * (1 - basicParticleWeight));
}
}
static var BASIC_PARTICLE_NONE = 0;
}
Symbol 707 MovieClip [__Packages.CParticle] Frame 0
class CParticle
{
var pos, prevPos, mass, acc, mc;
function CParticle (x_, y_, mass_) {
pos = new CVector2D(x_, y_);
prevPos = pos.duplicate();
mass = mass_;
acc = new CVector2D(0, 0);
mc = null;
}
function verlet(dTime, koeffDamp) {
var _local2 = pos.duplicate();
pos.x = pos.x + (((pos.x - prevPos.x) * koeffDamp) + (acc.x * dTime));
pos.y = pos.y + (((pos.y - prevPos.y) * koeffDamp) + (acc.y * dTime));
_local2.copyTo(prevPos);
if (mc != null) {
mc._x = pos.x;
mc._y = pos.y;
}
}
function getVelocityVector() {
return(new CVector2D(pos.x - prevPos.x, pos.y - prevPos.y));
}
}
Symbol 708 MovieClip [__Packages.CVector2D] Frame 0
class CVector2D
{
var x, y;
function CVector2D (x_, y_) {
x = x_;
y = y_;
}
function reinit(x_, y_) {
x = x_;
y = y_;
}
function getUgol() {
return(Math.atan2(y, x));
}
function duplicate() {
return(new CVector2D(x, y));
}
function copyTo(v) {
v.x = x;
v.y = y;
}
function minus(v) {
x = x - v.x;
y = y - v.y;
}
function minusNew(v) {
return(new CVector2D(x - v.x, y - v.y));
}
function normalize() {
var _local2 = 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 709 MovieClip [__Packages.CConstants] Frame 0
class CConstants
{
function CConstants () {
}
static var SOUNDS_NAMES = new Array("sndLoop", "sndFinish", "sndButton", "sndError", "sndOh0", "sndOh1", "sndOh2", "sndAaa0", "sndAaa1", "sndAaa2", "sndBikerDie", "sndEngine2", "sndEngine3");
static var SND_INTRO = 0;
static var SND_FINISH = 1;
static var SND_BUTTON = 2;
static var SND_ERROR = 3;
static var SND_OH0 = 4;
static var SND_OH1 = 5;
static var SND_OH2 = 6;
static var SND_AAA0 = 7;
static var SND_AAA1 = 8;
static var SND_AAA2 = 8;
static var SND_DIE = 10;
static var SND_ENGINE2 = 11;
static var SND_ENGINE3 = 12;
static var SCREEN_WIDTH = 600;
static var SCREEN_HEIGHT = 440;
static var SCREEN_WIDTH2 = SCREEN_WIDTH / 2;
static var SCREEN_HEIGHT2 = SCREEN_HEIGHT / 2;
static var KEY_TRICK1 = 49;
static var KEY_TRICK2 = 50;
static var KEY_TRICK3 = 51;
static var KEY_TRICK4 = 52;
static var KEY_TRICK5 = 53;
static var KEY_TRICK6 = 54;
static var KEY_TRICK7 = 55;
static var LAP_COUNT = 6;
static var sharedObjectName = "ISMFMX/savedGame";
static var LEVEL_HORIZONT = 280;
static var levelNames = new Array(new Array("idLPart3_0", "idLPart3_1"), new Array("idLPart1_0", "idLPart1_1", "idLPart1_2", "idLPart1_3"), new Array("idLPart4_0", "idLPart4_1"), new Array("idLPart5_0", "idLPart5_1"), new Array("idLPart6_0", "idLPart6_1", "idLPart6_2"), new Array("idLPart2_0", "idLPart2_1", "idLPart2_2", "idLPart2_3"), new Array("idLPart7_0", "idLPart7_1", "idLPart7_2", "idLPart7_3"), new Array("idLPart8_0", "idLPart8_1", "idLPart8_2", "idLPart8_3"), new Array("idLPart9_0", "idLPart9_1", "idLPart9_2", "idLPart9_3"));
static var hitLevelNames = new Array(new Array("idPart3_0", "idPart3_1"), new Array("idLevelPart1_0", "idLevelPart1_1", "idLevelPart1_2", "idLevelPart1_3"), new Array("idPart4_0", "idPart4_1"), new Array("idPart5_0", "idPart5_1"), new Array("idPart6_0", "idPart6_1", "idPart6_2"), new Array("idPart2_0", "idPart2_1", "idPart2_2", "idPart2_3"), new Array("idPart7_0", "idPart7_1", "idPart7_2", "idPart7_3"), new Array("idPart8_0", "idPart8_1", "idPart8_2", "idPart8_3"), new Array("idPart9_0", "idPart9_1", "idPart9_2", "idPart9_3"));
static var moto1Params = new CBikeParams(0.6, 3.3, -0.4, "lib_bike_body1", 13, "idMotoWhellBack", 12, 0.4, 0, 0.03, 4, 45, 17, 0, "idMotoWhellForward", 11, 0.4, 0, 0.03, 4, 28.5, 17, 0, 3, 3, 0, false, new CSpringParams(0.8, 0.8, CSpringConstraint.BASIC_PARTICLE_NONE, 0), new CSpringParams(1, 1, CSpringConstraint.BASIC_PARTICLE_NONE, 0), new CSpringParams(1, 1, CSpringConstraint.BASIC_PARTICLE_NONE, 0), new CSpringParams(0.5, 0.8, CSpringConstraint.BASIC_PARTICLE_NONE, 0), new CSpringParams(0.5, 0.8, CSpringConstraint.BASIC_PARTICLE_NONE, 0));
}
Symbol 710 MovieClip [__Packages.CGameService] Frame 0
class CGameService
{
static var m_instance;
var m_root, m_score, m_pauseListeners;
function CGameService (rootPointer, soundsNames) {
m_instance = this;
m_root = rootPointer;
m_score = 0;
m_pauseListeners = new CGroup();
CSoundService.createSoundService(soundsNames, m_root, 9999);
}
static function get instance() {
return(m_instance);
}
static function get _root() {
return(m_instance.m_root);
}
static function get score() {
return(m_instance.m_score);
}
static function set score(score) {
m_instance.m_score = score;
//return(CGameService.score);
}
static function set pauseOn(pauseState) {
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) {
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 roundRandom(maxVal) {
return(Math.floor(Math.random() * maxVal));
}
}
Symbol 711 MovieClip [__Packages.CGroup] Frame 0
class CGroup
{
var m_elements;
function CGroup () {
m_elements = 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 712 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] = CSoundService.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, 9999, true);
}
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, repeatCount, ifSoundStop) {
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 713 MovieClip [__Packages.IPauseListener] Frame 0
interface IPauseListener
{
}
Symbol 714 MovieClip [__Packages.CPeople] Frame 0
class CPeople extends MovieClip
{
var m_photoCount, attachMovie, m_people;
function CPeople () {
super();
m_photoCount = 0;
}
function makePhotoFlash() {
var _local2 = attachMovie("idPhotographing", "__idPhotographing" + m_photoCount, 10 + m_photoCount);
_local2._x = (30 + m_people._x) + (Math.random() * (m_people._width - 60));
_local2._y = (30 + m_people._y) + (Math.random() * (m_people._height - 60));
m_photoCount++;
if (m_photoCount > 32000) {
m_photoCount = 0;
}
}
}
Symbol 715 MovieClip [__Packages.CLevel] Frame 0
class CLevel extends MovieClip
{
var mvAudience1, mvAudience2, m_audienceWidth, mvAudience3, m_camera, m_hitLevelNames, m_curLevelPartNum, m_nextLevelCounter, m_prevLevelPart, m_curLevelPart, m_hitPlace, m_levelPlace, m_levelNames, m_flag, createEmptyMovieClip, m_vehiclePlace, m_engine, _x;
function CLevel () {
super();
}
function get audience1() {
return(mvAudience1);
}
function get audience2() {
return(mvAudience2);
}
function setAudienceX(nX) {
mvAudience1._x = Math.round(nX);
mvAudience2._x = Math.round(nX) + m_audienceWidth;
mvAudience3._x = Math.round(nX) - m_audienceWidth;
}
function setAudienceY(nY) {
mvAudience1._y = nY;
mvAudience2._y = nY;
mvAudience3._y = nY;
}
function peopleNotVisible() {
return(m_camera.pointOutsideLeft(mvAudience2._x));
}
function loadNextLevelPart() {
if ((++m_curLevelPartNum) >= m_hitLevelNames.length) {
m_curLevelPartNum = 0;
}
m_nextLevelCounter++;
m_prevLevelPart = m_curLevelPart;
m_curLevelPart = m_hitPlace.attachMovie(m_hitLevelNames[m_curLevelPartNum], "_" + m_hitLevelNames[m_curLevelPartNum], 120 + (m_nextLevelCounter % 3));
var _local2 = m_levelPlace.attachMovie(m_levelNames[m_curLevelPartNum], "_" + m_levelNames[m_curLevelPartNum], 120 + (m_nextLevelCounter % 3));
m_curLevelPart._y = CConstants.LEVEL_HORIZONT;
if (m_prevLevelPart != null) {
m_curLevelPart._x = (m_prevLevelPart._x + m_prevLevelPart._width) - 1;
} else {
m_curLevelPart._x = 0;
}
_local2._x = m_curLevelPart._x;
_local2._y = m_curLevelPart._y;
if (m_curLevelPartNum == 0) {
createFlag(_local2._x, _local2._y);
}
}
function createFlag(px, py) {
m_flag = m_levelPlace.attachMovie("idFlag", "__idFlag", 400);
m_flag._x = px;
m_flag._y = py;
m_flag.active = false;
}
function prevLevelPartNotVisible() {
return(m_camera.pointOutsideLeft(m_curLevelPart._x));
}
function initLevel(levelNames, hitLevelNames) {
m_nextLevelCounter = 0;
m_hitLevelNames = hitLevelNames;
m_levelNames = levelNames;
m_curLevelPartNum = -1;
m_curLevelPart = null;
m_hitPlace = createEmptyMovieClip("hitPlace", 100);
m_levelPlace = createEmptyMovieClip("levelPlace", 101);
loadNextLevelPart();
loadNextLevelPart();
m_vehiclePlace = createEmptyMovieClip("vehiclePlace", 150);
m_engine = new CParticleEngine();
m_engine.setHitMovie(m_hitPlace);
m_camera = new CCamera();
setAudienceX(0);
setAudienceY(CConstants.SCREEN_HEIGHT);
m_audienceWidth = mvAudience1._width - 1;
}
function initCamera(movieCenteredAtScreen, windowWidth, windowHeight, lookAtX, lookAtY) {
m_camera.init(movieCenteredAtScreen, this, windowWidth, windowHeight);
m_camera.setLookPoint(lookAtX, lookAtY);
m_camera.setLevelSize(300000, m_hitPlace._height);
m_camera.process();
}
function process() {
if (prevLevelPartNotVisible()) {
loadNextLevelPart();
}
if (peopleNotVisible()) {
m_addPeopleX = m_addPeopleX + m_audienceWidth;
}
setAudienceX((((-_x) * 2) / 3) + m_addPeopleX);
m_engine.process();
m_camera.process();
}
function getEngine() {
return(m_engine);
}
function getVehiclePlace() {
return(m_vehiclePlace);
}
function getHitPlace() {
return(m_hitPlace);
}
function get finishFlag() {
return(m_flag);
}
var m_addPeopleX = 0;
}
Symbol 716 MovieClip [__Packages.CParticleEngine] Frame 0
class CParticleEngine
{
var hit_mc, prevTime;
function CParticleEngine () {
p_array = new Array();
w_array = new Array();
c_array = new Array();
}
function clear() {
while (p_array.pop() != undefined) {
}
while (w_array.pop() != undefined) {
}
while (c_array.pop() != undefined) {
}
}
function clearConstraints() {
while (c_array.pop() != undefined) {
}
}
function setHitMovie(hit_mc_) {
hit_mc = hit_mc_;
}
function addParticle(p) {
p_array.push(p);
}
function addWheel(wheel, p, maxSpeed, radius) {
wheel.init(p, maxSpeed, radius);
w_array.push(wheel);
}
function addSpringConstraint(p1, p2, koeffStiff1, koeffStiff2) {
var _local2 = new CSpringConstraint(p1, p2, koeffStiff1, koeffStiff2);
c_array.push(_local2);
return(_local2);
}
function addPenetrationConstraint(p0, p1, p2) {
var _local2 = new CPenetrationConstraint(p0, p1, p2);
c_array.push(_local2);
return(_local2);
}
function addPenetrationConstraint2(p0, p1, p2) {
var _local2 = new CPenetrationConstraint2(p0, p1, p2);
c_array.push(_local2);
return(_local2);
}
function start() {
prevTime = getTimer();
}
function computeForces() {
var _local2;
var _local3 = p_array.length;
_local2 = 0;
while (_local2 < _local3) {
p_array[_local2].acc.x = 0;
p_array[_local2].acc.y = gravity * p_array[_local2].mass;
_local2++;
}
}
function clearForces() {
var _local3 = w_array.length;
var _local2;
_local2 = 0;
while (_local2 < _local3) {
w_array[_local2].clearForces();
_local2++;
}
}
function applyManFrictions() {
var _local3 = w_array.length;
var _local2;
_local2 = 0;
while (_local2 < _local3) {
w_array[_local2].applyAddedAcc();
_local2++;
}
}
function verlet(dTime) {
var _local5 = 0.995;
var _local2;
var _local3 = p_array.length;
_local2 = 0;
while (_local2 < _local3) {
p_array[_local2].verlet(dTime, _local5);
_local2++;
}
_local3 = w_array.length;
var _local6 = 0;
_local2 = 0;
while (_local2 < _local3) {
w_array[_local2].processWheel(dTime, (w_array[_local2].maxAccSpeed * w_array[_local2].getAccelerate()) / 3.2, 0.99);
_local2++;
}
}
function checkCollisions() {
var _local2;
var _local3 = w_array.length;
_local2 = 0;
while (_local2 < _local3) {
w_array[_local2].checkCollision(hit_mc);
_local2++;
}
}
function checkConstraints(dTime) {
var _local2;
var _local3 = c_array.length;
_local2 = 0;
while (_local2 < _local3) {
c_array[_local2].resolve();
_local2++;
}
}
function process() {
var _local4 = getTimer();
var _local5 = (_local4 - prevTime) / 1000;
prevTime = _local4;
var _local2;
var _local3 = Math.min(Math.round(_local5 / t), maxSteps);
var _local6;
_local2 = 0;
while (_local2 < _local3) {
computeForces();
applyManFrictions();
verlet(t);
checkConstraints(t);
checkCollisions();
clearForces();
_local2++;
}
}
var p_array = new Array();
var w_array = new Array();
var c_array = new Array();
var t = 0.02;
var maxSteps = 2;
static var gravity = 3.15;
}
Symbol 717 MovieClip [__Packages.CGameMovie] Frame 0
class CGameMovie extends MovieClip
{
var m_managers, _x, _y, _rotation;
function CGameMovie () {
super();
m_managers = new Array();
}
function notifyManagers(funName) {
var _local2 = m_managers.length - 1;
while (_local2 >= 0) {
if (m_managers[_local2] != null) {
m_managers[_local2][funName]();
}
_local2--;
}
}
function addManager(gManager) {
var _local2 = m_managers.length - 1;
while (_local2 >= 0) {
if (m_managers[_local2] == null) {
m_managers[_local2] = gManager;
return(undefined);
}
_local2--;
}
m_managers.push(gManager);
}
function removeManager(gManager) {
var _local2 = m_managers.length - 1;
while (_local2 >= 0) {
if (m_managers[_local2] == gManager) {
m_managers[_local2] = null;
}
_local2--;
}
}
function removeAllManagers() {
var _local2 = m_managers.length - 1;
while (_local2 >= 0) {
m_managers[_local2] = null;
_local2--;
}
}
function setPosition(nx, ny) {
_x = nx;
_y = ny;
}
function setRotation(nRotation) {
_rotation = nRotation;
}
function getHitArea() {
return(this);
}
function checkHitTest(objHitArea) {
return(getHitArea().hitTest(objHitArea));
}
function process() {
notifyManagers("process");
}
}
Symbol 718 MovieClip [__Packages.CGameMovieManager] Frame 0
class CGameMovieManager
{
var m_managedMovie;
function CGameMovieManager () {
}
function getManagedMovie() {
return(m_managedMovie);
}
function setManagedMovie(managedMovie) {
m_managedMovie = managedMovie;
managedMovie.addManager(this);
}
function deleteManager() {
m_managedMovie.removeManager(this);
}
function process() {
}
}
Symbol 719 MovieClip [__Packages.CWheel] Frame 0
class CWheel extends CGameMovie
{
var m_rim, particle, rad, maxAccSpeed, speed, accSpeed, rot, addedAcc, intersectionFlag, lastIntersPoint, lastN, hitPointArray, normalArray, hitArray, intersArray, lastYSpeed, accelerate, _x, _y, localToGlobal;
function CWheel () {
super();
}
function setRotationMovie(rotationMovie) {
m_rim = rotationMovie;
}
function init(particle_, maxAccSpeed_, rad_) {
particle = particle_;
rad = rad_;
maxAccSpeed = maxAccSpeed_ * 4;
speed = 0;
accSpeed = 0;
rot = new CVector2D(1, 0);
addedAcc = new CVector2D(0, 0);
intersectionFlag = false;
lastIntersPoint = new CVector2D(0, 0);
lastN = new CVector2D(0, 0);
var _local2;
var _local3 = (Math.PI*2) / hitCount;
hitPointArray = new Array(hitCount);
normalArray = new Array(hitCount);
hitArray = new Array(hitCount);
intersArray = new Array();
_local2 = 0;
while (_local2 < hitCount) {
hitPointArray[_local2] = new CVector2D(Math.sin(_local3 * _local2) * rad, (-Math.cos(_local3 * _local2)) * rad);
normalArray[_local2] = hitPointArray[_local2].multNew(-1);
normalArray[_local2].normalize();
_local2++;
}
lastYSpeed = 0;
accelerate = 0;
}
function setKoeffSpring(koeffSpring_) {
koeffSpring = koeffSpring_;
}
function setKoeffSlip(koeffSlip_) {
koeffSlip = koeffSlip_;
}
function setKoeffConcatenation(koeffConcatenation_) {
koeffConcatenation = koeffConcatenation_;
}
function hasIntersection() {
return(intersectionFlag);
}
function setAccelerate(nAccelerate) {
accelerate = nAccelerate;
}
function setAccelerateDirForward() {
accelerate = 1;
}
function setAccelerateDirBack() {
accelerate = -0.6;
}
function resetAccelerate() {
accelerate = 0;
}
function getAccelerate() {
return(accelerate);
}
function clearForces() {
addedAcc.x = (addedAcc.y = 0);
}
function processWheel(dTime, acc, koeffDamp) {
accSpeed = Math.max(-maxAccSpeed, Math.min(maxAccSpeed, accSpeed + (acc * dTime)));
speed = Math.max((-maxSpeed) * dTime, Math.min((speed * koeffDamp) + accSpeed, maxSpeed * dTime));
rot.rotate(speed / rad);
m_rim._rotation = (Math.atan2(rot.y, rot.x) * 180) / Math.PI;
lastYSpeed = particle.pos.y - particle.prevPos.y;
}
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(particle.prevPos.x, particle.prevPos.y);
var _local4 = new CVector2D(0, 0);
var _local3 = new CVector2D(0, 0);
var _local14;
_x = particle.pos.x;
_y = particle.pos.y;
_local14 = 0;
_local2 = 0;
while (_local2 < hitCount) {
hitPointArray[_local2].copyTo(_local9);
localToGlobal(_local9);
if ((hitArray[_local2] = hit_mc.hitTest(_local9.x, _local9.y, true))) {
_local13 = true;
_local5 = _local2;
_local14++;
}
_local2++;
}
if (_local14 == hitCount) {
particle.pos.x = particle.prevPos.x + ((particle.pos.x - particle.prevPos.x) * 0.3);
particle.pos.y = particle.prevPos.y + ((particle.pos.y - particle.prevPos.y) * 0.3);
_x = particle.pos.x;
_y = particle.pos.y;
return(undefined);
}
_local2 = 0;
if (_local13) {
while (true) {
_local2++;
if (_local2 == hitCount) {
_local2 = 0;
}
if (!hitArray[_local2]) {
_local5 = -1;
_local8 = 0;
while (_local8 < hitCount) {
_local2++;
if (_local2 == 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 = 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);
particle.pos.minusNew(particle.prevPos).copyTo(_local6);
if (_local4.scalar(_local6) < 0) {
_local11 = Math.atan2(_local4.y, _local4.x);
_local6.rotate(-_local11);
_local6.x = (-_local6.x) * koeffSpring;
_local6.rotate(_local11);
pushOut(_local5, _local7, _local3, hit_mc);
particle.prevPos.x = particle.pos.x - _local6.x;
particle.prevPos.y = particle.pos.y - _local6.y;
} else {
pushOut(_local5, _local7, _local3, hit_mc);
}
_local2++;
}
validateRotation(_local4, _local16);
intersectionFlag = true;
particle.pos.copyTo(lastIntersPoint);
_local4.copyTo(lastN);
}
} else if (intersectionFlag) {
validateRotation(lastN, _local16);
intersectionFlag = false;
}
_x = particle.pos.x;
_y = particle.pos.y;
}
function pushOut(k1, k2, n, hit_mc) {
n.normalize();
if (k1 != k2) {
var _local7 = new CVector2D(0, 0).getDistanceTo(hitPointArray[k1], hitPointArray[k2]);
_local7 = rad - Math.abs(_local7);
particle.pos.plus(n.multNew(_local7));
particle.prevPos.plus(n.multNew(_local7));
} else {
var _local6 = n.multNew(-rad);
var _local4 = new CVector2D(0, 0);
var _local5 = 0;
var _local3 = 0.03;
while (true) {
_local6.copyTo(_local4);
localToGlobal(_local4);
if (hit_mc.hitTest(_local4.x, _local4.y, true)) {
_local5++;
_x = (particle.pos.x = particle.pos.x + (n.x * _local3));
_y = (particle.pos.y = particle.pos.y + (n.y * _local3));
} else {
_local5--;
particle.pos.x = particle.pos.x - (n.x * _local3);
particle.pos.y = particle.pos.y - (n.y * _local3);
particle.prevPos.plus(n.multNew(_local3 * _local5));
break;
}
}
}
particle.pos.minus(n.multNew(koeffConcatenation));
particle.prevPos.minus(n.multNew(koeffConcatenation));
}
function validateRotation(n, oldPos) {
if ((!intersectionFlag) && (Math.abs(accSpeed) > 0.01)) {
if (Math.abs(accSpeed) < ((maxAccSpeed * 0.02) / 2)) {
accSpeed = 0;
} else if (accSpeed > 0) {
accSpeed = maxAccSpeed * 0.02;
} else {
accSpeed = (-maxAccSpeed) * 0.02;
}
}
var _local3 = new CVector2D(-n.y, n.x);
var _local6 = particle.pos.minusNew(oldPos);
var _local5 = Math.atan2(_local3.y, _local3.x);
var _local2 = _local6.rotateNew(-_local5);
speed = _local2.x + accSpeed;
_local2.y = 0;
_local2.rotate(_local5);
var _local4 = 1 - koeffSlip;
particle.pos.x = (particle.pos.x + ((_local3.x * accSpeed) * _local4)) - ((1 - koeffFriction) * _local2.x);
particle.pos.y = (particle.pos.y + ((_local3.y * accSpeed) * _local4)) - ((1 - koeffFriction) * _local2.y);
accSpeed = accSpeed * koeffSlip;
}
function applyAddedAcc() {
particle.acc.x = particle.acc.x + (addedAcc.x * particle.mass);
particle.acc.y = particle.acc.y + (addedAcc.y * particle.mass);
}
function turnTo(turnDir, force) {
particle.prevPos.x = particle.pos.x - (turnDir.x * force);
particle.prevPos.x = particle.pos.x - (turnDir.x * force);
koeffSpring = 0.9;
}
function getSpeed() {
return(speed);
}
function setSpeed(nSpeed) {
speed = nSpeed;
}
function isOnGround() {
return(intersectionFlag);
}
var maxSpeed = 180;
var koeffSpring = 0.03;
var koeffSlip = 0.15;
var koeffFriction = 0.97;
var koeffConcatenation = 0;
var hitCount = 16;
}
Symbol 720 MovieClip [__Packages.CPenetrationConstraint] Frame 0
class CPenetrationConstraint
{
var p0, p1, p2, sign;
function CPenetrationConstraint (p0_, p1_, p2_) {
p0 = p0_;
p1 = p1_;
p2 = p2_;
sign = p0.pos.getDistanceTo(p1.pos, p2.pos);
if (sign < 0) {
sign = -1;
} else {
sign = 1;
}
}
function resolve() {
var _local3;
var _local2;
_local3 = p0.pos.getDistanceTo(p1.pos, p2.pos);
if ((sign * _local3) <= 2) {
_local2 = new CVector2D(p2.pos.x, p2.pos.y);
_local2.minus(p1.pos);
_local2.normalize();
_local2.rotate((Math.PI/2) * sign);
_local2.mult(Math.abs(_local3) + 1);
p1.pos.minus(_local2);
}
}
}
Symbol 721 MovieClip [__Packages.CPenetrationConstraint2] Frame 0
class CPenetrationConstraint2
{
var p0, p1, p2, sign;
function CPenetrationConstraint2 (p0_, p1_, p2_) {
p0 = p0_;
p1 = p1_;
p2 = p2_;
sign = p0.pos.getDistanceTo(p1.pos, p2.pos);
if (sign < 0) {
sign = -1;
} else {
sign = 1;
}
}
function resolve() {
var _local3;
var _local2;
_local3 = p0.pos.getDistanceTo(p1.pos, p2.pos);
if ((sign * _local3) <= 2) {
_local2 = new CVector2D(p2.pos.x, p2.pos.y);
_local2.minus(p1.pos);
_local2.normalize();
_local2.rotate((Math.PI/2) * sign);
_local2.mult(Math.abs(_local3) + 1);
p0.pos.plus(_local2);
}
}
}
Symbol 722 MovieClip [__Packages.CCamera] Frame 0
class CCamera
{
var m_targetMoviePos, m_targetMovie, m_levelMovie, m_screenWidth, m_screenHeight, m_levelWidth, m_levelHeight, m_targetXAtScreen, m_targetYAtScreen, m_positionState;
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);
}
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);
m_levelMovie._x = m_levelMovie._x + Math.round(m_targetXAtScreen - m_targetMoviePos.x);
m_levelMovie._y = m_levelMovie._y + Math.round(m_targetYAtScreen - m_targetMoviePos.y);
m_positionState = BORDER_NONE;
if (m_levelMovie._x > 0) {
m_levelMovie._x = 0;
m_positionState = BORDER_LEFT;
} else if (m_levelMovie._x < (m_screenWidth - m_levelWidth)) {
m_levelMovie._x = m_screenWidth - m_levelWidth;
m_positionState = BORDER_RIGHT;
}
if (m_levelMovie._y < 0) {
m_levelMovie._y = 0;
} else if (m_levelMovie._y > (m_screenHeight + m_levelHeight)) {
m_levelMovie._y = m_screenHeight + m_levelHeight;
}
}
function isRightBorder() {
return(m_positionState == BORDER_RIGHT);
}
function getTargetMovie() {
return(m_targetMovie);
}
static var BORDER_NONE = 0;
static var BORDER_LEFT = 1;
static var BORDER_RIGHT = 2;
}
Symbol 723 MovieClip [__Packages.CBikeColor] Frame 0
class CBikeColor extends MovieClip
{
var gotoAndStop;
function CBikeColor () {
super();
refreshColor();
}
static function set colorNum(nColorNum) {
m_colorNum = nColorNum;
//return(colorNum);
}
static function get colorNum() {
return(m_colorNum);
}
function refreshColor() {
gotoAndStop(m_colorNum);
}
static var m_colorNum = 1;
}
Symbol 724 MovieClip [__Packages.CManColor] Frame 0
class CManColor extends MovieClip
{
var gotoAndStop;
function CManColor () {
super();
gotoAndStop(m_colorNum);
}
static function set colorNum(nColorNum) {
m_colorNum = nColorNum;
//return(colorNum);
}
static function get colorNum() {
return(m_colorNum);
}
static var m_colorNum = 1;
}
Symbol 725 MovieClip [__Packages.CMan] Frame 0
class CMan extends MovieClip
{
var m_state, mc, gotoAndStop;
function CMan () {
super();
m_state = ST_STAY;
}
function stopMCAnim() {
mc.stop();
}
function processKeys(keyState) {
if (keyState.checkMask(CBike.KM_MOVE_BODY_FORWARD)) {
toRight();
} else if (keyState.checkMask(CBike.KM_MOVE_BODY_BACK)) {
toLeft();
} else if ((m_state == ST_TOLEFT) || (m_state == ST_INLEFT)) {
fromLeft();
} else if ((m_state == ST_TORIGHT) || (m_state == ST_INRIGHT)) {
fromRight();
}
}
function toLeft() {
var _local2;
if (m_state == ST_STAY) {
m_state = ST_TOLEFT;
gotoAndStop("toLeft");
} else if (m_state == ST_FROMLEFT) {
_local2 = mc._currentframe;
gotoAndStop("toLeft");
mc.gotoAndPlay((ANIM_FRAMES - _local2) + 1);
m_state = ST_TOLEFT;
} else if ((m_state == ST_TORIGHT) || (m_state == ST_INRIGHT)) {
fromRight();
m_state = ST_FROMRIGHT;
}
}
function toRight() {
var _local2;
if (m_state == ST_STAY) {
gotoAndStop("toRight");
m_state = ST_TORIGHT;
} else if (m_state == ST_FROMRIGHT) {
_local2 = mc._currentframe;
gotoAndStop("toRight");
mc.gotoAndPlay((ANIM_FRAMES - _local2) + 1);
m_state = ST_TORIGHT;
} else if ((m_state == ST_TOLEFT) || (m_state == ST_INLEFT)) {
fromLeft();
m_state = ST_FROMLEFT;
}
}
function fromLeft() {
var _local2;
if (m_state == ST_TOLEFT) {
_local2 = mc._currentframe;
gotoAndStop("fromLeft");
mc.gotoAndPlay((ANIM_FRAMES - _local2) + 1);
m_state = ST_FROMLEFT;
} else if (m_state == ST_INLEFT) {
gotoAndStop("fromLeft");
m_state = ST_FROMLEFT;
}
}
function fromRight() {
var _local2;
if (m_state == ST_TORIGHT) {
_local2 = mc._currentframe;
gotoAndStop("fromRight");
mc.gotoAndPlay((ANIM_FRAMES - _local2) + 1);
m_state = ST_FROMRIGHT;
} else if (m_state == ST_INRIGHT) {
gotoAndStop("fromRight");
m_state = ST_FROMRIGHT;
}
}
function endMove() {
if (m_state == ST_TOLEFT) {
gotoAndStop("left");
m_state = ST_INLEFT;
} else if (m_state == ST_FROMLEFT) {
m_state = ST_STAY;
gotoAndStop("stay");
} else if (m_state == ST_TORIGHT) {
m_state = ST_INRIGHT;
gotoAndStop("right");
} else if (m_state == ST_FROMRIGHT) {
m_state = ST_STAY;
gotoAndStop("stay");
}
}
static var ST_STAY = 0;
static var ST_TOLEFT = 1;
static var ST_INLEFT = 2;
static var ST_FROMLEFT = 3;
static var ST_TORIGHT = 4;
static var ST_INRIGHT = 5;
static var ST_FROMRIGHT = 6;
static var ANIM_FRAMES = 7;
}
Symbol 726 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 727 MovieClip [__Packages.CBike] Frame 0
class CBike
{
var bikeParams, mc_back_wheel, mc_forward_wheel, mc_car, p_wl, p_wr, p_ld, p_rd;
function CBike () {
}
function setBikeParams(nBikeParam) {
bikeParams = nBikeParam;
}
function initWehicle(level, posX, posY) {
var _local5 = level.getEngine();
var _local6 = level.getVehiclePlace();
var _local3 = {x:0, y:0};
var _local2;
var _local4;
mc_back_wheel = CWheel(_local6.attachMovie(bikeParams.backWheelLibName, "back_w", 100));
mc_back_wheel.setRotationMovie(mc_back_wheel.mcSpoke);
mc_forward_wheel = CWheel(_local6.attachMovie(bikeParams.forwardWheelLibName, "forward_w", 110));
mc_forward_wheel.setRotationMovie(mc_forward_wheel.mcSpoke);
mc_car = _local6.attachMovie("lib_bike_body1", "bike", 120);
mc_car._x = posX;
mc_car._y = posY;
_local3.x = mc_car.mc.mc_p_wl._x;
_local3.y = mc_car.mc.mc_p_wl._y;
mc_car.mc.localToGlobal(_local3);
mc_car._parent.globalToLocal(_local3);
mc_back_wheel._x = _local3.x;
mc_back_wheel._y = _local3.y;
mc_back_wheel.setKoeffSlip(bikeParams.backWheelKoeffSlip);
mc_back_wheel.setKoeffConcatenation(bikeParams.backWheelKoeffConcatenation);
mc_back_wheel.setKoeffSpring(bikeParams.backWheelKoeffSpring);
p_wl = new CParticle(_local3.x, _local3.y, bikeParams.backWheelPMass);
_local5.addParticle(p_wl);
_local5.addWheel(mc_back_wheel, p_wl, bikeParams.backWheelPMaxSpeed, bikeParams.backWheelPRadius);
_local3.x = mc_car.mc.mc_p_wr._x;
_local3.y = mc_car.mc.mc_p_wr._y;
mc_car.mc.localToGlobal(_local3);
mc_car._parent.globalToLocal(_local3);
mc_forward_wheel._x = _local3.x;
mc_forward_wheel._y = _local3.y;
mc_forward_wheel.setKoeffSlip(bikeParams.forwardWheelKoeffSlip);
mc_forward_wheel.setKoeffConcatenation(bikeParams.forwardWheelKoeffConcatenation);
mc_forward_wheel.setKoeffSpring(bikeParams.forwardWheelKoeffSpring);
p_wr = new CParticle(_local3.x, _local3.y, bikeParams.forwardWheelPMass);
_local5.addParticle(p_wr);
_local5.addWheel(mc_forward_wheel, p_wr, bikeParams.forwardWheelPMaxSpeed, bikeParams.forwardWheelPRadius);
_local3.x = mc_car.mc.mc_p_ld._x;
_local3.y = mc_car.mc.mc_p_ld._y;
mc_car.mc.localToGlobal(_local3);
mc_car._parent.globalToLocal(_local3);
p_ld = new CParticle(_local3.x, _local3.y, bikeParams.pLD_mass);
_local5.addParticle(p_ld);
_local3.x = mc_car.mc.mc_p_rd._x;
_local3.y = mc_car.mc.mc_p_rd._y;
mc_car.mc.localToGlobal(_local3);
mc_car._parent.globalToLocal(_local3);
p_rd = new CParticle(_local3.x, _local3.y, bikeParams.pRD_mass);
_local5.addParticle(p_rd);
_local2 = bikeParams.downSpringParams;
_local4 = _local5.addSpringConstraint(p_wr, p_wl, _local2.koeffPress, _local2.koeffStretch);
_local4.setBasicParticleNum(_local2.basicParticleNum);
_local4.setBasicParticleWeight(_local2.basicParticleWeight);
_local2 = bikeParams.upSpringParams;
_local4 = _local5.addSpringConstraint(p_ld, p_rd, _local2.koeffPress, _local2.koeffStretch);
_local4.setBasicParticleNum(_local2.basicParticleNum);
_local4.setBasicParticleWeight(_local2.basicParticleWeight);
_local2 = bikeParams.diagonalSpringParams;
_local4 = _local5.addSpringConstraint(p_wr, p_ld, _local2.koeffPress, _local2.koeffStretch);
_local4.setBasicParticleNum(_local2.basicParticleNum);
_local4.setBasicParticleWeight(_local2.basicParticleWeight);
_local4 = _local5.addSpringConstraint(p_wl, p_rd, _local2.koeffPress, _local2.koeffStretch);
_local4.setBasicParticleNum(_local2.basicParticleNum);
_local4.setBasicParticleWeight(_local2.basicParticleWeight);
_local2 = bikeParams.rightSpringParams;
_local4 = _local5.addSpringConstraint(p_wr, p_rd, _local2.koeffPress, _local2.koeffStretch);
_local4.setBasicParticleNum(_local2.basicParticleNum);
_local4.setBasicParticleWeight(_local2.basicParticleWeight);
_local2 = bikeParams.leftSpringParams;
_local4 = _local5.addSpringConstraint(p_wl, p_ld, _local2.koeffPress, _local2.koeffStretch);
_local4.setBasicParticleNum(_local2.basicParticleNum);
_local4.setBasicParticleWeight(_local2.basicParticleWeight);
_local5.addPenetrationConstraint(p_wr, p_rd, p_ld);
_local5.addPenetrationConstraint(p_wl, p_ld, p_rd);
}
function playAccelerateSound() {
}
function stopAccelerateSound() {
}
function processKeys(keyState) {
if (keyState.checkMask(KM_ACCELERATE)) {
mc_back_wheel.setAccelerate(1.15);
if (!keyState.checkPrevStateMask(KM_ACCELERATE)) {
playAccelerateSound();
keyState.addMask(KM_ACCELERATE);
}
} else if (keyState.checkMask(KM_BRAKE)) {
} else {
mc_back_wheel.resetAccelerate();
stopAccelerateSound();
}
mc_car.mc.mc_man.processKeys(keyState);
if (keyState.checkMask(KM_MOVE_BODY_FORWARD)) {
toRight();
} else if (keyState.checkMask(KM_MOVE_BODY_BACK)) {
toLeft();
}
}
function process() {
var _local4;
var _local3;
var _local2;
_local4 = new CVector2D(p_rd.pos.x - p_ld.pos.x, p_rd.pos.y - p_ld.pos.y);
mc_car._rotation = (Math.atan2(_local4.y, _local4.x) * 180) / Math.PI;
_local3 = new CVector2D(mc_car.mc.mc_p_ld._x, mc_car.mc.mc_p_ld._y);
_local2 = new CVector2D(mc_car.mc.mc_p_rd._x, mc_car.mc.mc_p_rd._y);
mc_car.mc.localToGlobal(_local3);
mc_car._parent.globalToLocal(_local3);
mc_car.mc.localToGlobal(_local2);
mc_car._parent.globalToLocal(_local2);
mc_car._x = mc_car._x + ((((p_ld.pos.x - _local3.x) + p_rd.pos.x) - _local2.x) / 2);
mc_car._y = mc_car._y + ((((p_ld.pos.y - _local3.y) + p_rd.pos.y) - _local2.y) / 2);
_local3.x = mc_back_wheel._x;
_local3.y = mc_back_wheel._y;
mc_back_wheel._parent.localToGlobal(_local3);
mc_car.mc.globalToLocal(_local3);
_local2.x = mc_forward_wheel._x;
_local2.y = mc_forward_wheel._y;
mc_forward_wheel._parent.localToGlobal(_local2);
mc_car.mc.globalToLocal(_local2);
mc_car.mc.mc_s_ld._rotation = (mc_car.mc.mc_s_lu._rotation = (Math.atan2((_local3.y + 1.2) - mc_car.mc.mc_s_lu._y, _local3.x - mc_car.mc.mc_s_lu._x) * 180) / Math.PI);
mc_car.mc.mc_s_rd._rotation = (mc_car.mc.mc_s_ru._rotation = (Math.atan2((_local2.y + 1.2) - mc_car.mc.mc_s_ru._y, _local2.x - mc_car.mc.mc_s_ru._x) * 180) / Math.PI);
updateBikeSprings();
}
function updateBikeSprings() {
var _local3;
var _local2;
var _local4;
_local2 = new CVector2D(mc_car.mc.mc_back_spring._x, mc_car.mc.mc_back_spring._y);
mc_car.mc.localToGlobal(_local2);
mc_car._parent.globalToLocal(_local2);
_local3 = new CVector2D(mc_car.mc.mc_back_spring.mc_dir._x, mc_car.mc.mc_back_spring.mc_dir._y);
mc_car.mc.mc_back_spring.localToGlobal(_local3);
mc_car._parent.globalToLocal(_local3);
_local4 = new CVector2D(mc_back_wheel._x - _local2.x, mc_back_wheel._y - _local2.y);
_local3.minus(_local2);
mc_car.mc.mc_back_spring._rotation = mc_car.mc.mc_back_spring._rotation + (((Math.atan2(_local4.y, _local4.x) - Math.atan2(_local3.y, _local3.x)) * 180) / Math.PI);
}
function toLeft() {
var _local3;
var _local2 = calcCarNVector();
var _local4;
var _local5;
_local4 = bikeParams.controlAccPercBase;
_local5 = bikeParams.controlAccPercMult;
_local3 = (Math.abs(_local2.y) * (1 - _local4)) + _local4;
_local3 = _local3 * _local5;
if (_local2.y > bikeParams.koeffStability) {
mc_forward_wheel.addedAcc.x = mc_forward_wheel.addedAcc.x - (((_local2.x * CParticleEngine.gravity) * _local3) * 0.7);
mc_forward_wheel.addedAcc.y = mc_forward_wheel.addedAcc.y - (((_local2.y * CParticleEngine.gravity) * _local3) * 0.7);
if (!mc_back_wheel.hasIntersection()) {
mc_back_wheel.addedAcc.x = mc_back_wheel.addedAcc.x + (((_local2.x * CParticleEngine.gravity) * _local3) * 1.3);
mc_back_wheel.addedAcc.y = mc_back_wheel.addedAcc.y + (((_local2.y * CParticleEngine.gravity) * _local3) * 1.3);
}
}
}
function toRight() {
var _local3;
var _local2 = calcCarNVector();
var _local4;
var _local5;
_local4 = bikeParams.controlAccPercBase;
_local5 = bikeParams.controlAccPercMult;
_local3 = (Math.abs(_local2.y) * (1 - _local4)) + _local4;
_local3 = _local3 * _local5;
if (_local2.y > bikeParams.koeffStability) {
if (!mc_forward_wheel.hasIntersection()) {
mc_forward_wheel.addedAcc.x = mc_forward_wheel.addedAcc.x + (((_local2.x * CParticleEngine.gravity) * _local3) * 1.3);
mc_forward_wheel.addedAcc.y = mc_forward_wheel.addedAcc.y + (((_local2.y * CParticleEngine.gravity) * _local3) * 1.3);
}
mc_back_wheel.addedAcc.x = mc_back_wheel.addedAcc.x - (((_local2.x * CParticleEngine.gravity) * _local3) * 0.7);
mc_back_wheel.addedAcc.y = mc_back_wheel.addedAcc.y - (((_local2.y * CParticleEngine.gravity) * _local3) * 0.7);
}
}
function calcCarNVector() {
var _local2;
_local2 = mc_forward_wheel.particle.pos.minusNew(mc_back_wheel.particle.pos);
_local2.normalize();
var _local3;
_local3 = _local2.x;
_local2.x = -_local2.y;
_local2.y = _local3;
return(_local2);
}
function getBodyMovieClip() {
return(mc_car);
}
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 728 MovieClip [__Packages.CAnimation] Frame 0
class CAnimation extends MovieClip
{
var m_speed, m_state, m_curAnimation, m_animationFirstFrames, m_animationFramesCount, _totalframes, m_curFrame, gotoAndStop, onEnterFrame;
function CAnimation () {
super();
defaultSetting();
}
function checkSpeedVsDir() {
return(((m_speed < 0) && (m_state.checkMask(ST_BACK))) || ((m_speed > 0) && (!m_state.checkMask(ST_BACK))));
}
function getCorrectFrameNum(nFrame) {
if (nFrame > getLastFrame(m_curAnimation)) {
if (m_state.checkMask(ST_ONE)) {
if (m_state.checkMask(ST_REVERSE) && (checkSpeedVsDir())) {
m_speed = -m_speed;
} else {
m_state.addMask(ST_STOP);
}
} else if (m_state.checkMask(ST_REVERSE)) {
m_speed = -m_speed;
} else {
return(getStartFrame(m_curAnimation));
}
nFrame = getLastFrame(m_curAnimation);
} else if (nFrame < getStartFrame(m_curAnimation)) {
if (m_state.checkMask(ST_ONE)) {
if (m_state.checkMask(ST_REVERSE) && (checkSpeedVsDir())) {
m_speed = -m_speed;
} else {
m_state.addMask(ST_STOP);
}
} else if (m_state.checkMask(ST_REVERSE)) {
m_speed = -m_speed;
} else {
return(getLastFrame(m_curAnimation));
}
nFrame = getStartFrame(m_curAnimation);
}
return(nFrame);
}
function getCorrectFrameForwardLoop(nFrame) {
if (nFrame > getLastFrame(m_curAnimation)) {
nFrame = getStartFrame(m_curAnimation);
}
return(nFrame);
}
function getCorrectFrameBackLoop(nFrame) {
if (nFrame < getStartFrame(m_curAnimation)) {
nFrame = getLastFrame(m_curAnimation);
}
return(nFrame);
}
function getStartFrame(nAnimationNum) {
return(m_animationFirstFrames[nAnimationNum]);
}
function getLastFrame(nAnimationNum) {
return(m_animationFirstFrames[nAnimationNum] + m_animationFramesCount[nAnimationNum]);
}
function defaultSetting() {
m_animationFirstFrames = new Array(1);
m_animationFirstFrames[0] = 1;
m_animationFramesCount = new Array(1);
m_animationFramesCount[0] = _totalframes - 1;
m_speed = 1;
m_curFrame = 1;
m_curAnimation = 0;
gotoAndStop(m_curFrame);
m_state = new CMultiState();
setState(ST_DEFAULT);
}
function setSpeed(nSpeed) {
m_speed = nSpeed;
}
function process() {
if (m_state.checkMask(ST_STOP)) {
return(undefined);
}
m_curFrame = getCorrectFrameNum(m_curFrame + m_speed);
gotoAndStop(Math.round(m_curFrame));
}
function setState(stateMask) {
m_state.__set__curMask(stateMask);
if (m_state.checkMask(ST_MANUAL_PROCESS)) {
onEnterFrame = function () {
};
} else {
onEnterFrame = process;
}
if (!checkSpeedVsDir()) {
m_speed = -m_speed;
}
}
static var ST_DEFAULT = 0;
static var ST_STOP = 1;
static var ST_BACK = 2;
static var ST_REVERSE = 4;
static var ST_ONE = 8;
static var ST_MANUAL_PROCESS = 16;
}
Symbol 729 MovieClip [__Packages.CInvisibleMovie] Frame 0
class CInvisibleMovie extends MovieClip
{
var _visible;
function CInvisibleMovie () {
super();
_visible = false;
}
}
Symbol 730 MovieClip [__Packages.CSoundControl] Frame 0
class CSoundControl extends MovieClip
{
var _currentframe, gotoAndStop;
function CSoundControl () {
super();
}
function onEnterFrame() {
if ((!CSoundService.soundIsOn()) && (_currentframe != 2)) {
gotoAndStop(2);
}
if (CSoundService.soundIsOn() && (_currentframe != 1)) {
gotoAndStop(1);
}
}
function onPress() {
if (CSoundService.soundIsOn()) {
CSoundService.soundOff();
} else {
CSoundService.soundOn();
}
}
}
Symbol 731 MovieClip [__Packages.CGameControl] Frame 0
class CGameControl extends MovieClip
{
var _currentframe, gotoAndStop;
function CGameControl () {
super();
}
function onEnterFrame() {
if ((!CGameService.__get__pauseOn()) && (_currentframe != 2)) {
gotoAndStop(2);
}
if (CGameService.__get__pauseOn() && (_currentframe != 1)) {
gotoAndStop(1);
}
}
function onPress() {
if (CGameService.__get__pauseOn()) {
CGameService.__set__pauseOn(false);
} else {
CGameService.__set__pauseOn(true);
}
}
}
Symbol 732 MovieClip [__Packages.mx.transitions.OnEnterFrameBeacon] Frame 0
class mx.transitions.OnEnterFrameBeacon
{
function OnEnterFrameBeacon () {
}
static function init() {
var _local4 = _global.MovieClip;
if (!_root.__OnEnterFrameBeacon) {
mx.transitions.BroadcasterMX.initialize(_local4);
var _local3 = _root.createEmptyMovieClip("__OnEnterFrameBeacon", 9876);
_local3.onEnterFrame = function () {
_global.MovieClip.broadcastMessage("onEnterFrame");
};
}
}
static var version = "1.1.0.52";
}
Symbol 733 MovieClip [__Packages.mx.transitions.BroadcasterMX] Frame 0
class mx.transitions.BroadcasterMX
{
var _listeners;
function BroadcasterMX () {
}
static function initialize(o, dontCreateArray) {
if (o.broadcastMessage != undefined) {
delete o.broadcastMessage;
}
o.addListener = mx.transitions.BroadcasterMX.prototype.addListener;
o.removeListener = mx.transitions.BroadcasterMX.prototype.removeListener;
if (!dontCreateArray) {
o._listeners = new Array();
}
}
function addListener(o) {
removeListener(o);
if (broadcastMessage == undefined) {
broadcastMessage = mx.transitions.BroadcasterMX.prototype.broadcastMessage;
}
return(_listeners.push(o));
}
function removeListener(o) {
var _local2 = _listeners;
var _local3 = _local2.length;
while (_local3--) {
if (_local2[_local3] == o) {
_local2.splice(_local3, 1);
if (!_local2.length) {
broadcastMessage = undefined;
}
return(true);
}
}
return(false);
}
function broadcastMessage() {
var _local5 = String(arguments.shift());
var _local4 = _listeners.concat();
var _local6 = _local4.length;
var _local3 = 0;
while (_local3 < _local6) {
_local4[_local3][_local5].apply(_local4[_local3], arguments);
_local3++;
}
}
static var version = "1.1.0.52";
}
Symbol 734 MovieClip [__Packages.mx.transitions.Tween] Frame 0
class mx.transitions.Tween
{
var obj, prop, begin, useSeconds, _listeners, addListener, prevTime, _time, looping, _duration, broadcastMessage, isPlaying, _fps, prevPos, _pos, change, _intervalID, _startTime;
function Tween (obj, prop, func, begin, finish, duration, useSeconds) {
mx.transitions.OnEnterFrameBeacon.init();
if (!arguments.length) {
return;
}
this.obj = obj;
this.prop = prop;
this.begin = begin;
position = (begin);
this.duration = (duration);
this.useSeconds = useSeconds;
if (func) {
this.func = func;
}
this.finish = (finish);
_listeners = [];
addListener(this);
start();
}
function set time(t) {
prevTime = _time;
if (t > duration) {
if (looping) {
rewind(t - _duration);
update();
broadcastMessage("onMotionLooped", this);
} else {
if (useSeconds) {
_time = _duration;
update();
}
stop();
broadcastMessage("onMotionFinished", this);
}
} else if (t < 0) {
rewind();
update();
} else {
_time = t;
update();
}
//return(time);
}
function get time() {
return(_time);
}
function set duration(d) {
_duration = (((d == null) || (d <= 0)) ? (_global.Infinity) : (d));
//return(duration);
}
function get duration() {
return(_duration);
}
function set FPS(fps) {
var _local2 = isPlaying;
stopEnterFrame();
_fps = fps;
if (_local2) {
startEnterFrame();
}
//return(FPS);
}
function get FPS() {
return(_fps);
}
function set position(p) {
setPosition(p);
//return(position);
}
function setPosition(p) {
prevPos = _pos;
obj[prop] = (_pos = p);
broadcastMessage("onMotionChanged", this, _pos);
updateAfterEvent();
}
function get position() {
return(getPosition());
}
function getPosition(t) {
if (t == undefined) {
t = _time;
}
return(func(t, begin, change, _duration));
}
function set finish(f) {
change = f - begin;
//return(finish);
}
function get finish() {
return(begin + change);
}
function continueTo(finish, duration) {
begin = position;
this.finish = (finish);
if (duration != undefined) {
this.duration = (duration);
}
start();
}
function yoyo() {
continueTo(begin, time);
}
function startEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.addListener(this);
} else {
_intervalID = setInterval(this, "onEnterFrame", 1000 / _fps);
}
isPlaying = true;
}
function stopEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.removeListener(this);
} else {
clearInterval(_intervalID);
}
isPlaying = false;
}
function start() {
rewind();
startEnterFrame();
broadcastMessage("onMotionStarted", this);
}
function stop() {
stopEnterFrame();
broadcastMessage("onMotionStopped", this);
}
function resume() {
fixTime();
startEnterFrame();
broadcastMessage("onMotionResumed", this);
}
function rewind(t) {
_time = ((t == undefined) ? 0 : (t));
fixTime();
update();
}
function fforward() {
time = (_duration);
fixTime();
}
function nextFrame() {
if (useSeconds) {
time = ((getTimer() - _startTime) / 1000);
} else {
time = (_time + 1);
}
}
function onEnterFrame() {
nextFrame();
}
function prevFrame() {
if (!useSeconds) {
time = (_time - 1);
}
}
function toString() {
return("[Tween]");
}
function fixTime() {
if (useSeconds) {
_startTime = getTimer() - (_time * 1000);
}
}
function update() {
position = (getPosition(_time));
}
static var version = "1.1.0.52";
static var __initBeacon = mx.transitions.OnEnterFrameBeacon.init();
static var __initBroadcaster = mx.transitions.BroadcasterMX.initialize(mx.transitions.Tween.prototype, true);
function func(t, b, c, d) {
return(((c * t) / d) + b);
}
}
Symbol 735 MovieClip [__Packages.mx.transitions.easing.Strong] Frame 0
class mx.transitions.easing.Strong
{
function Strong () {
}
static function easeIn(t, b, c, d) {
t = t / d;
return((((((c * t) * t) * t) * t) * t) + b);
}
static function easeOut(t, b, c, d) {
t = (t / d) - 1;
return((c * (((((t * t) * t) * t) * t) + 1)) + b);
}
static function easeInOut(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return(((((((c / 2) * t) * t) * t) * t) * t) + b);
}
t = t - 2;
return(((c / 2) * (((((t * t) * t) * t) * t) + 2)) + b);
}
static var version = "1.1.0.52";
}
Symbol 736 MovieClip [__Packages.mx.transitions.easing.Bounce] Frame 0
class mx.transitions.easing.Bounce
{
function Bounce () {
}
static function easeOut(t, b, c, d) {
t = t / d;
if (t < 0.363636363636364) {
return((c * ((7.5625 * t) * t)) + b);
}
if (t < 0.727272727272727) {
t = t - 0.545454545454545;
return((c * (((7.5625 * t) * t) + 0.75)) + b);
}
if (t < 0.909090909090909) {
t = t - 0.818181818181818;
return((c * (((7.5625 * t) * t) + 0.9375)) + b);
}
t = t - 0.954545454545455;
return((c * (((7.5625 * t) * t) + 0.984375)) + b);
}
static function easeIn(t, b, c, d) {
return((c - easeOut(d - t, 0, c, d)) + b);
}
static function easeInOut(t, b, c, d) {
if (t < (d / 2)) {
return((easeIn(t * 2, 0, c, d) * 0.5) + b);
}
return(((easeOut((t * 2) - d, 0, c, d) * 0.5) + (c * 0.5)) + b);
}
static var version = "1.1.0.52";
}
Symbol 737 MovieClip [__Packages.CGame] Frame 0
class CGame extends MovieClip
{
var m_curLevelNum, m_raceEngine, onEnterFrame, gotoAndStop, m_lastUnlockedLevel, butStart, m_tuningRoom, m_levelPreview, txtScore, txtLevelResult, m_time, m_trickScore, m_bonusScore, pigMessage, txtTrickBonus, txtSpecialBonus, txtTimeBonus;
function CGame () {
super();
m_instance = this;
Key.addListener(this);
loadSettingth();
CLevelIcon.setScores(m_levelStats);
}
function loadSettingth() {
var _local3 = SharedObject.getLocal(CConstants.sharedObjectName);
if (_local3.data.level0 == undefined) {
defaultSettingth();
} else {
m_curLevelNum = _local3.data.curLevelNum;
CBikeColor.__set__colorNum(_local3.data.bikeColor);
CManColor.__set__colorNum(_local3.data.manColor);
var _local2 = 0;
while (_local2 < CConstants.hitLevelNames.length) {
m_levelStats[_local2] = new Object();
m_levelStats[_local2].score = _local3.data["level" + _local2];
_local2++;
}
}
updateCurLevelScore();
}
function saveSettingth() {
var _local3 = SharedObject.getLocal(CConstants.sharedObjectName);
_local3.data.curLevelNum = m_curLevelNum;
_local3.data.bikeColor = CBikeColor.colorNum;
_local3.data.manColor = CManColor.colorNum;
var _local2 = 0;
while (_local2 < CConstants.hitLevelNames.length) {
_local3.data["level" + _local2] = m_levelStats[_local2].score;
_local2++;
}
_local3.flush();
}
function defaultSettingth() {
m_curLevelNum = 0;
CBikeColor.__set__colorNum(1);
CManColor.__set__colorNum(1);
var _local2 = 0;
while (_local2 < CConstants.hitLevelNames.length) {
m_levelStats[_local2] = new Object();
m_levelStats[_local2].score = 0;
_local2++;
}
}
static function get instance() {
return(m_instance);
}
function initGame() {
m_raceEngine.initRaceEngine(CLevelIcon.__get__curLevelNum());
curLap = (0);
curTime = (0);
trickScore = (0);
bonusScore = (0);
saveSettingth();
onEnterFrame = processGame;
}
function buttonStartGame() {
goChoiceScreen();
CSoundService.playSound(CConstants.SND_BUTTON, 1, true);
}
function goChoiceScreen() {
gotoAndStop("lbChoice");
updateUnlockLevelNum();
CLevelIcon.__set__lastEnabledLevel(m_lastUnlockedLevel);
CLevelIcon.__set__curLevelNum(m_curLevelNum);
m_tuningRoom.m_bikeIcon.but = butStart;
m_tuningRoom.m_bikeIcon.onPress = function () {
var _local2;
if (this._xmouse < 0) {
_local2 = this._currentframe - 1;
if (_local2 < 1) {
_local2 = this._totalframes;
}
} else {
_local2 = this._currentframe + 1;
if (_local2 > this._totalframes) {
_local2 = 1;
}
}
CBikeColor.__set__colorNum(_local2);
this.gotoAndStop(_local2);
this.updateSecret();
};
if (checkAllLevelComplete()) {
m_tuningRoom.m_bikeIcon.updateSecret = function () {
if (this._currentframe == this._totalframes) {
this.secret._visible = false;
}
};
} else {
m_tuningRoom.m_bikeIcon.updateSecret = function () {
if (this._currentframe == this._totalframes) {
this.but._visible = false;
} else {
this.but._visible = true;
}
};
}
m_tuningRoom.m_bikeIcon.gotoAndStop(CBikeColor.__get__colorNum());
m_tuningRoom.m_bikeIcon.updateSecret();
m_tuningRoom.m_manIcon.onPress = function () {
var _local2;
if (this._xmouse < 0) {
_local2 = this._currentframe - 1;
if (_local2 < 1) {
_local2 = this._totalframes;
}
} else {
_local2 = this._currentframe + 1;
if (_local2 > this._totalframes) {
_local2 = 1;
}
}
CManColor.__set__colorNum(_local2);
this.gotoAndStop(_local2);
};
m_tuningRoom.m_manIcon.gotoAndStop(CManColor.__get__colorNum());
m_levelPreview.onEnterFrame = function () {
if (this._currentframe != (CLevelIcon.__get__curLevelNum() + 1)) {
this.gotoAndStop(CLevelIcon.__get__curLevelNum() + 1);
CGame.getInstance().updateCurLevelScore();
}
};
updateScore();
txtScore = String(CGameService.__get__score());
}
function buttonNextLevel() {
CSoundService.playSound(CConstants.SND_BUTTON, 1, true);
goChoiceScreen();
}
function buttonStartRace() {
CSoundService.playSound(CConstants.SND_BUTTON, 1, true);
gotoAndStop("lbGame");
onEnterFrame = initGame;
}
function buttonHowToPlay() {
CSoundService.playSound(CConstants.SND_BUTTON, 1, true);
gotoAndStop("lbHowToPlay");
}
function buttonBack() {
CSoundService.playSound(CConstants.SND_BUTTON, 1, true);
gotoAndStop("lbSplash");
}
function updateScore() {
CGameService.__set__score(0);
var _local2 = 0;
while (_local2 < CConstants.hitLevelNames.length) {
CGameService.score = CGameService.score + m_levelStats[_local2].score;
_local2++;
}
}
static function get curLap() {
return(m_instance.m_curLap);
}
static function set curLap(lap) {
m_instance.m_curLap = lap;
m_instance.m_raceEngine.__set__txtLap((String(lap) + "/") + String(CConstants.LAP_COUNT));
//return(curLap);
}
static function getInstance() {
return(m_instance);
}
static function set curTime(newTime) {
m_instance.m_time = newTime;
var _local4 = Math.floor(newTime / 60);
var _local2 = Math.floor(newTime % 60);
var _local3 = Math.floor((newTime - Math.floor(newTime)) * 100);
m_instance.m_raceEngine.__set__txtTime((((((String(_local4) + ":") + ((_local2 < 10) ? "0" : "")) + String(_local2)) + ":") + ((_local3 < 10) ? "0" : "")) + String(_local3));
//return(curTime);
}
static function get curTime() {
return(m_instance.m_time);
}
static function get trickScore() {
return(m_instance.m_trickScore);
}
static function set trickScore(nTrickScore) {
m_instance.m_trickScore = nTrickScore;
//return(trickScore);
}
static function get bonusScore() {
return(m_instance.m_bonusScore);
}
static function set bonusScore(nBonusScore) {
m_instance.m_bonusScore = nBonusScore;
//return(bonusScore);
}
function updateCurLevelScore() {
m_curLevelNum = CLevelIcon.curLevelNum;
txtLevelResult = m_levelStats[m_curLevelNum].score.toString();
}
function processGame() {
m_raceEngine.process();
}
function checkAllLevelComplete() {
var _local2 = 0;
while (_local2 < CConstants.hitLevelNames.length) {
if (m_levelStats[_local2].score <= 0) {
return(false);
}
_local2++;
}
return(true);
}
function levelComplete() {
gotoAndStop("lbStatistics");
var _local2 = Math.max(1000 - Math.round(m_time), 0);
var _local3 = (_local2 + m_bonusScore) + m_trickScore;
var _local4 = checkAllLevelComplete();
if (m_levelStats[m_curLevelNum].score < _local3) {
m_levelStats[m_curLevelNum].score = _local3;
}
if ((!_local4) && (checkAllLevelComplete())) {
pigMessage._visible = true;
CBikeColor.__set__colorNum(6);
} else {
pigMessage._visible = false;
}
CGameService.score = CGameService.score + _local2;
updateScore();
txtScore = String(CGameService.__get__score());
txtLevelResult = String(_local3);
txtTrickBonus = String(m_trickScore);
txtSpecialBonus = String(m_bonusScore);
txtTimeBonus = String(_local2);
saveSettingth();
}
function updateUnlockLevelNum() {
var _local2 = 0;
while (_local2 < CConstants.hitLevelNames.length) {
if (m_levelStats[_local2].score <= 0) {
break;
}
_local2++;
}
m_lastUnlockedLevel = (Math.floor(_local2 / 3) * 3) + 3;
if (m_lastUnlockedLevel > 9) {
m_lastUnlockedLevel = 9;
}
}
function onKeyDown() {
if (Key.getCode() == 32) {
CGameService.__set__pauseOn(!CGameService.__get__pauseOn());
}
}
function onKeyUp() {
}
static var m_instance = null;
var m_levelStats = new Array(CConstants.hitLevelNames.length);
}
Symbol 738 MovieClip [__Packages.CRaceEngine] Frame 0
class CRaceEngine extends MovieClip implements IPauseListener
{
var m_messagePlace, m_curMessage, m_bike, m_trickCounter, m_txtScore, __get__txtScore, m_txtLap, __get__txtLap, m_txtTime, __get__txtTime, m_levelResult, txtLevelResult, attachMovie, m_curLevel, __idLevelMessage, m_nonDeath, m_nonLapDeath, m_windowPause, finishCounter, m_light1, mvForCamera, m_light2, m_level, m_keyState, m_levelPlace;
function CRaceEngine () {
super();
Key.addListener(this);
}
function processKeys() {
var _local1 = new CMultiState();
return(_local1);
}
function makeTrickMessage(trickID, score) {
var _local2 = m_messagePlace.attachMovie("idTricksMessage", "__tricksMessage" + m_curMessage, 500 + m_curMessage);
_local2.mcMessage.gotoAndStop(m_bike.__get__trickLabel());
_local2.mcMessage.txtScore = String(score);
_local2._x = CConstants.SCREEN_WIDTH / 2;
_local2._y = CConstants.SCREEN_HEIGHT / 2;
levelResult = levelResult + score;
CGame.trickScore = CGame.trickScore + score;
m_curMessage = (m_curMessage + 1) % 4;
m_trickCounter++;
if ((m_trickCounter % 5) == 0) {
makeSpecialTrick(1, ((m_trickCounter * m_trickCounter) * 10) / 2);
}
}
function makeSpecialTrick(rickID, nScore) {
var _local2 = m_messagePlace.attachMovie("dmSpecialMessage", "__tricksMessage2" + m_curMessage, 500 + m_curMessage);
_local2.mcMessage.gotoAndStop(rickID);
if (rickID == 1) {
_local2.mcMessage.txtScore = nScore + ((" (x" + String(m_trickCounter)) + ")");
} else {
_local2.mcMessage.txtScore = nScore;
}
levelResult = levelResult + nScore;
CGame.bonusScore = CGame.bonusScore + nScore;
_local2._x = (CConstants.SCREEN_WIDTH / 2) - 40;
_local2._y = (CConstants.SCREEN_HEIGHT * 2) / 3;
m_curMessage = (m_curMessage + 1) % 4;
}
function set txtScore(score) {
m_txtScore = score;
//return(__get__txtScore());
}
function set txtLap(lap) {
m_txtLap = lap;
//return(__get__txtLap());
}
function set txtTime(time) {
m_txtTime = time;
//return(__get__txtTime());
}
function set levelResult(lRsult) {
m_levelResult = lRsult;
txtLevelResult = String(lRsult);
//return(levelResult);
}
function get levelResult() {
return(m_levelResult);
}
function startRace() {
m_curMessage = 0;
CGame.__set__curTime(0);
attachMovie("idLevelMessage", "__idLevelMessage", 30000);
__idLevelMessage.mcMessage.txtLevelNum = String(m_curLevel + 1);
__idLevelMessage._x = CConstants.SCREEN_WIDTH2;
__idLevelMessage._y = CConstants.SCREEN_HEIGHT2;
txtScore = (String(CGameService.__get__score()));
disablePause();
CGameService.addPauseListener(this);
levelResult = (0);
m_trickCounter = 0;
m_nonDeath = true;
m_nonLapDeath = false;
}
function stopRace() {
disableRace();
CGameService.removePauseListener(this);
}
function disableRace() {
process = function () {
};
disableKeyFunction();
CSoundService.stopAllSound();
}
function enablePause() {
disableRace();
m_windowPause = attachMovie("pauseWindow", "__pauseWindow", 32001);
m_windowPause.m_butExit.racePointer = this;
m_windowPause.m_butExit.onPress = function () {
CSoundService.playSound(CConstants.SND_BUTTON, 1, true);
this.racePointer.stopRace();
CGame.__get__instance().goChoiceScreen();
};
CSoundService.stopAllSound();
}
function disablePause() {
process = processRace;
enableBikeControll();
m_windowPause.removeMovieClip();
}
function process() {
}
function endRace() {
CSoundService.stopAllSound();
CGame.__get__instance().levelComplete();
}
function checkEnableFinish() {
if (CGame.__get__curLap() >= CConstants.LAP_COUNT) {
if (m_nonDeath) {
makeSpecialTrick(3, CConstants.LAP_COUNT * 1000);
}
stopRace();
finishCounter = 100;
process = function () {
this.m_level.process();
this.m_bike.process();
this.m_bike.processKeys(this.m_keyState);
this.m_keyState.curMask = 0;
this.processTrickExecut();
if ((--this.finishCounter) <= 0) {
this.play();
this.process = function () {
};
}
};
CSoundService.playSound(CConstants.SND_FINISH, 1, true);
} else {
if (m_nonLapDeath) {
makeSpecialTrick(2, 400);
}
m_nonLapDeath = true;
}
}
function processLight() {
var _local2 = CGameService.getGlobalXY(0, 0, m_bike.getBodyMovieClip());
var _local5 = (Math.atan2(_local2.y - m_light1._y, _local2.x - m_light1._x) * 180) / Math.PI;
m_light1._rotation = m_light1._rotation + ((_local5 - m_light1._rotation) / ((Math.random() * 4) + 3));
var _local3 = CGameService.getGlobalXY(0, 0, mvForCamera);
var _local4 = (Math.atan2(_local3.y - m_light2._y, _local3.x - m_light2._x) * 180) / Math.PI;
m_light2._rotation = m_light2._rotation + ((_local4 - m_light2._rotation) / ((Math.random() * 5) + 4));
}
function disableLights() {
m_light1._visible = false;
m_light2._visible = false;
processLight = function () {
};
}
function processTrickExecut() {
if (m_bike.__get__trickState() == CFMXBike.TS_TRICK_COMPLETE) {
makeTrickMessage(m_bike.__get__trickID(), m_bike.__get__trickScore());
m_bike.__set__trickState(CFMXBike.TS_NONE);
} else if (m_bike.__get__flipState() == CFMXBike.ST_FLIP_COMPLETE) {
makeTrickMessage(m_bike.__get__trickID(), m_bike.__get__trickScore());
m_bike.__set__flipState(CFMXBike.ST_FLIP_NONE);
}
if (m_bike.__get__trickState() == CFMXBike.TS_EXECUTION) {
m_photoProbability = 0.55;
if (m_bike.__get__trickExecutStart()) {
if (((!CSoundService.soundIsPlay(CConstants.SND_AAA0)) && (!CSoundService.soundIsPlay(CConstants.SND_AAA1))) && (!CSoundService.soundIsPlay(CConstants.SND_AAA2))) {
CSoundService.playSound(CConstants.SND_AAA0 + CGameService.roundRandom(3), 1, true);
}
}
} else if (!m_bike.wheelOnGround()) {
m_photoProbability = 0.9;
} else {
m_photoProbability = 0.991;
}
if (Math.random() > m_photoProbability) {
m_level.__get__audience1().makePhotoFlash();
}
}
function processRace() {
CGame.curTime = CGame.curTime + 0.04167;
processLight();
if (m_bike.wheelOnGround()) {
CBikerPower.curPower = CBikerPower.curPower + 0.3;
}
m_level.process();
processTrickExecut();
if (Math.random() > m_photoProbability) {
m_level.__get__audience2().makePhotoFlash();
}
var _local4 = processKeys();
if (_local4.__get__curMask() != m_keyState.__get__curMask()) {
m_keyState.__set__curMask(_local4.curMask);
}
m_bike.processKeys(m_keyState);
m_bike.process();
var _local3;
_local3 = m_bike.processFreeFly();
if (_local3 != 0) {
makeSpecialTrick(4, _local3);
}
if (m_bike.__get__bikeState() == CFMXBike.BS_END) {
resetBike();
} else if (m_bike.__get__bikeState() == CFMXBike.BS_MASTDIE) {
killBike();
} else if (m_bike.__get__bikeState() == CFMXBike.BS_RACE) {
if (m_bike.checkDeathPoint(m_level.getHitPlace())) {
killBike();
} else {
var _local2 = m_level.__get__finishFlag();
if ((!_local2.active) && (m_bike.getBodyMovieClip()._x > _local2._x)) {
CGame.__set__curLap((CGame.__get__curLap()+1));
_local2.active = true;
checkEnableFinish();
}
}
}
}
function initRaceEngine(levelNum) {
m_curLevel = levelNum;
m_bike = new CFMXBike();
m_bike.setBikeParams(CConstants.moto1Params);
m_level = CLevel(m_levelPlace.attachMovie("idCurLevel", "__idLevel", 10));
m_level.initLevel(CConstants.levelNames[levelNum], CConstants.hitLevelNames[levelNum]);
if ((((levelNum == 0) || (levelNum == 2)) || (levelNum == 4)) || (levelNum == 7)) {
disableLights();
}
m_keyState = new CMultiState();
resetBike();
process = function () {
this.m_level.process();
this.m_bike.process();
};
}
function resetBike() {
m_level.getEngine().clear();
if (m_bike.getBodyMovieClip() == undefined) {
m_bike.initWehicle(m_level, 100, CConstants.LEVEL_HORIZONT - 30);
} else {
m_bike.initWehicle(m_level, m_bike.__get__dieWheel()._x, m_bike.__get__dieWheel()._y - 100);
}
mvForCamera = m_bike.getBodyMovieClip();
m_level.initCamera(mvForCamera, CConstants.SCREEN_WIDTH, CConstants.SCREEN_HEIGHT, CConstants.SCREEN_WIDTH / 5, 150);
}
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(CConstants.KEY_TRICK1)) {
_local1.addMask(CFMXBike.KM_TRICK1);
CTrickIcon.processSelectedTrick(0);
}
if (Key.isDown(CConstants.KEY_TRICK2)) {
_local1.addMask(CFMXBike.KM_TRICK2);
CTrickIcon.processSelectedTrick(1);
}
if (Key.isDown(CConstants.KEY_TRICK3)) {
_local1.addMask(CFMXBike.KM_TRICK3);
CTrickIcon.processSelectedTrick(2);
}
if (Key.isDown(CConstants.KEY_TRICK4)) {
_local1.addMask(CFMXBike.KM_TRICK4);
CTrickIcon.processSelectedTrick(3);
}
if (Key.isDown(CConstants.KEY_TRICK5)) {
_local1.addMask(CFMXBike.KM_TRICK5);
CTrickIcon.processSelectedTrick(4);
}
if (Key.isDown(CConstants.KEY_TRICK6)) {
_local1.addMask(CFMXBike.KM_TRICK6);
CTrickIcon.processSelectedTrick(5);
}
if (Key.isDown(CConstants.KEY_TRICK7)) {
_local1.addMask(CFMXBike.KM_TRICK7);
CTrickIcon.processSelectedTrick(6);
}
return(_local1);
};
}
function disableKeyFunction() {
processKeys = function () {
var _local1 = new CMultiState();
return(_local1);
};
}
function killBike() {
m_trickCounter = 0;
m_nonDeath = false;
m_nonLapDeath = false;
if (((!CSoundService.soundIsPlay(CConstants.SND_OH0)) && (!CSoundService.soundIsPlay(CConstants.SND_OH1))) && (!CSoundService.soundIsPlay(CConstants.SND_OH2))) {
CSoundService.playSound(CConstants.SND_OH0 + CGameService.roundRandom(3), 1, true);
}
mvForCamera = m_bike.initDie(m_level);
m_level.initCamera(mvForCamera, CConstants.SCREEN_WIDTH, CConstants.SCREEN_HEIGHT, CConstants.SCREEN_WIDTH / 4, CConstants.SCREEN_HEIGHT / 4);
}
var m_photoProbability = 0;
}
Symbol 739 MovieClip [__Packages.CFMXBike] Frame 0
class CFMXBike extends CBike
{
var m_trickState, m_bikeState, m_trickID, mc_car, m_freeFly, m_freeFlyTime, m_trickExecutCounter, m_flipState, m_prevBodyRotation, getBodyMovieClip, m_dieWheel, mc_back_wheel, mc_forward_wheel;
function CFMXBike () {
super();
m_trickState = TS_NONE;
m_bikeState = BS_NA;
}
function processKeys(keyState) {
if (m_bikeState == BS_DEAD) {
super.processKeys(new CMultiState());
return(undefined);
}
var _local3 = 0;
while (_local3 < m_trickKeyMasks.length) {
if (keyState.checkMask(m_trickKeyMasks[_local3])) {
if (!keyState.checkPrevStateMask(m_trickKeyMasks[_local3])) {
m_trickID = _local3;
startTrick(_local3);
keyState.__set__curMask(m_trickKeyMasks[_local3]);
}
return(undefined);
}
_local3++;
}
if (keyState.checkPrevStateMask((((((KM_TRICK1 | KM_TRICK2) | KM_TRICK3) | KM_TRICK4) | KM_TRICK5) | KM_TRICK6) | KM_TRICK7)) {
stopTrick();
keyState.delMask((((((KM_TRICK1 | KM_TRICK2) | KM_TRICK3) | KM_TRICK4) | KM_TRICK5) | KM_TRICK6) | KM_TRICK7);
}
super.processKeys(keyState);
}
function startTrick(trickNum) {
if (CTrickIcon.canUseTrickNum(trickNum)) {
if ((!wheelOnGround()) && (m_trickState == TS_NONE)) {
mc_car.mc.gotoAndStop(m_trickLabels[trickNum]);
m_trickState = TS_START_TRICK;
}
} else {
CSoundService.playSound(CConstants.SND_ERROR, 1, true);
}
}
function stopTrick() {
if ((m_trickState != TS_NONE) && (m_trickState != TS_END_TRICK)) {
CTrickIcon.useTrickNum(m_trickID);
m_trick.setState(CAnimation.ST_ONE | (CAnimation.ST_BACK & (~CAnimation.ST_STOP)));
m_trickState = TS_END_TRICK;
}
}
function process() {
}
function playAccelerateSound() {
CSoundService.stopSound(CConstants.SND_ENGINE2);
CSoundService.playSound(CConstants.SND_ENGINE2, 1, false);
CSoundService.getSoundAt(CConstants.SND_ENGINE3).setVolume(100);
}
function stopAccelerateSound() {
CSoundService.getSoundAt(CConstants.SND_ENGINE3).setVolume(40);
}
function processFreeFly() {
if (!m_freeFly) {
if ((!wheelOnGround()) && (m_trickState == TS_NONE)) {
m_freeFly = true;
m_freeFlyTime = 0;
}
} else if ((!wheelOnGround()) && (m_trickState == TS_NONE)) {
m_freeFlyTime++;
} else {
var _local2 = 0;
if (m_freeFlyTime > 30) {
_local2 = Math.round(m_freeFlyTime / 5) * 10;
}
m_freeFly = false;
m_freeFlyTime = 0;
return(_local2);
}
return(0);
}
function processRace() {
super.process();
CSoundService.playSound(CConstants.SND_ENGINE3, 999, true);
processFlip();
switch (m_trickState) {
case TS_START_TRICK :
m_trickState = TS_INIT_TRICK;
break;
case TS_INIT_TRICK :
m_trick = CAnimation(mc_car.mc.mcTrick);
m_trick.setState(CAnimation.ST_ONE | CAnimation.ST_MANUAL_PROCESS);
m_trickState = TS_EXECUTION;
m_trickExecutCounter = 0;
break;
case TS_EXECUTION :
if (m_trick._currentframe == m_trick._totalframes) {
m_trickExecutCounter++;
}
break;
case TS_END_TRICK :
if (m_trick._currentframe != 1) {
break;
}
if (m_trickExecutCounter > 0) {
m_trickState = TS_TRICK_COMPLETE;
} else {
m_trickState = TS_NONE;
}
mc_car.mc.gotoAndStop(1);
m_trick = null;
}
if (((m_trickState == TS_EXECUTION) || (m_trickState == TS_END_TRICK)) && (wheelOnGround())) {
m_bikeState = BS_MASTDIE;
return(undefined);
}
if (m_trick != null) {
m_trick.process();
}
}
function resetFlip() {
m_flipState = ST_FLIP_NONE;
m_prevBodyRotation = getBodyMovieClip()._rotation;
}
function processFlip() {
var _local2 = getBodyMovieClip()._rotation;
if (m_flipState == ST_FLIP_NONE) {
if ((_local2 > 0) && (m_prevBodyRotation > 0)) {
if ((_local2 >= 160) && (m_prevBodyRotation < 160)) {
m_flipState = ST_FLIP_FRONT;
}
} else if ((_local2 < 0) && (m_prevBodyRotation < 0)) {
if ((_local2 <= -160) && (m_prevBodyRotation > -160)) {
m_flipState = ST_FLIP_BACK;
}
}
} else if ((m_flipState == ST_FLIP_BACK) && ((_local2 > -20) && (_local2 < 180))) {
if (wheelOnGround()) {
m_trickID = TRK_FLIP_BACK;
m_flipState = ST_FLIP_COMPLETE;
}
} else if ((m_flipState == ST_FLIP_FRONT) && ((_local2 > -20) && (_local2 < 180))) {
if (wheelOnGround()) {
m_trickID = TRK_FLIP_FRONT;
m_flipState = ST_FLIP_COMPLETE;
}
}
m_prevBodyRotation = _local2;
}
function initDie(level) {
var _local5 = level.getEngine();
var _local4 = level.getVehiclePlace();
m_dieWheel = CWheel(_local4.attachMovie("idManDie", "___idManDie", 200));
m_dieWheel.setRotationMovie(m_dieWheel.mcMan);
var _local2 = {x:mc_car.mc._x, y:mc_car.mc._y};
mc_car.mc.localToGlobal(_local2);
_local4.globalToLocal(_local2);
m_dieWheel._x = _local2.x;
m_dieWheel._y = _local2.y;
var _local3 = new CParticle(m_dieWheel._x, m_dieWheel._y, 8);
_local3.pos = mc_back_wheel.particle.pos.duplicate();
_local3.prevPos = mc_back_wheel.particle.prevPos.duplicate();
_local5.addParticle(_local3);
_local5.addWheel(m_dieWheel, _local3, 100, 12);
m_dieWheel.setSpeed(1);
mc_car.mc.gotoAndStop("lbRace");
mc_car.mc.mc_man._visible = false;
process = processDie;
m_bikeState = BS_DEAD;
m_trickState = TS_NONE;
m_flipState = ST_FLIP_NONE;
m_freeFly = false;
m_freeFlyTime = 0;
CSoundService.stopSound(CConstants.SND_ENGINE3);
CSoundService.playSound(CConstants.SND_DIE, 1, false);
return(m_dieWheel);
}
function processDie() {
super.process();
if (Math.abs(m_dieWheel.getSpeed()) < 0.15) {
m_dieWheel._rotation = 0;
m_dieWheel.gotoAndPlay("lbDie");
process = processAfterDie;
}
}
function processAfterDie() {
super.process();
if (m_dieWheel._currentframe == m_dieWheel._totalframes) {
m_bikeState = BS_END;
}
}
function initWehicle(level, posX, posY) {
super.initWehicle(level, posX, posY);
m_freeFly = false;
process = processRace;
m_bikeState = BS_RACE;
resetFlip();
m_dieWheel.removeMovieClip();
stopAccelerateSound();
}
function get bikeState() {
return(m_bikeState);
}
function get trickState() {
return(m_trickState);
}
function set trickState(newTrickState) {
m_trickState = newTrickState;
//return(trickState);
}
function checkDeathPoint(hitPlace) {
return((checkPointVsMovie(mc_car.mcDeathPoint1, hitPlace) || (checkPointVsMovie(mc_car.mcDeathPoint2, hitPlace))) || (checkPointVsMovie(mc_car.mcDeathPoint3, hitPlace)));
}
function checkPointVsMovie(point, movie) {
var _local1 = {x:point._x, y:point._y};
point.localToGlobal(_local1);
return(movie.hitTest(_local1.x, _local1.y, true));
}
function wheelOnGround() {
return(mc_back_wheel.isOnGround() || (mc_forward_wheel.isOnGround()));
}
function get dieWheel() {
return(m_dieWheel);
}
function set trickID(newTrickID) {
m_trickID = newTrickID;
//return(trickID);
}
function get trickID() {
return(m_trickID);
}
function get trickScore() {
if (m_trickID < TRK_FLIP_BACK) {
return(Math.round(((m_trickExecutCounter * 5) * (m_trickID + 1)) * 0.8));
}
if (m_trickID == TRK_FLIP_BACK) {
return(50);
}
return(80);
}
function get trickLabel() {
return(m_messageLabels[m_trickID]);
}
function get flipState() {
return(m_flipState);
}
function set flipState(nFlipState) {
m_flipState = nFlipState;
//return(flipState);
}
function get trickExecutStart() {
return((m_trick._currentframe == m_trick._totalframes) && (m_trickExecutCounter < 2));
}
static var KM_TRICK1 = 16;
static var KM_TRICK2 = 32;
static var KM_TRICK3 = 64;
static var KM_TRICK4 = 128;
static var KM_TRICK5 = 256;
static var KM_TRICK6 = 512;
static var KM_TRICK7 = 1024;
static var m_trickKeyMasks = new Array(KM_TRICK1, KM_TRICK2, KM_TRICK3, KM_TRICK4, KM_TRICK5, KM_TRICK6, KM_TRICK7);
static var m_trickLabels = new Array("lbTrick1", "lbTrick2", "lbTrick3", "lbTrick4", "lbTrick5", "lbTrick6", "lbTrick7");
static var m_messageLabels = new Array("lbSuperman", "lbLazyBoy", "lbCliffhanger", "lbMcMetz", "lbRockSolid", "lbStripper", "lbTsunami", "lbBackFlip", "lbFrontFlip");
static var TRK_1 = 0;
static var TRK_2 = 1;
static var TRK_3 = 2;
static var TRK_4 = 3;
static var TRK_5 = 4;
static var TRK_6 = 5;
static var TRK_7 = 6;
static var TRK_FLIP_BACK = 7;
static var TRK_FLIP_FRONT = 8;
var m_trick = null;
static var TS_NONE = 0;
static var TS_START_TRICK = 1;
static var TS_INIT_TRICK = 2;
static var TS_EXECUTION = 3;
static var TS_END_TRICK = 4;
static var TS_TRICK_COMPLETE = 5;
static var BS_NA = 0;
static var BS_RACE = 1;
static var BS_MASTDIE = 2;
static var BS_DEAD = 3;
static var BS_END = 4;
static var ST_FLIP_NONE = 0;
static var ST_FLIP_BACK = 1;
static var ST_FLIP_FRONT = 2;
static var ST_FLIP_COMPLETE = 3;
}
Symbol 740 MovieClip [__Packages.CTrickIcon] Frame 0
class CTrickIcon extends MovieClip
{
var m_state, m_iconNum, gotoAndStop, m_selFrame, onEnterFrame, m_disable;
function CTrickIcon () {
super();
m_state = new CMultiState();
m_state.__set__curMask(0);
m_allElements.addElement(this);
m_curentIconNum++;
m_iconNum = m_curentIconNum;
gotoAndStop(m_iconNum + 1);
m_selFrame._visible = false;
onEnterFrame = process;
}
function onUnload() {
m_curentIconNum = -1;
m_allElements.removeAllElements();
}
function process() {
if (m_disable._visible) {
if (CBikerPower.__get__curPower() >= getTrickPower()) {
m_disable._visible = false;
}
} else if (CBikerPower.__get__curPower() < getTrickPower()) {
m_disable._visible = true;
}
m_selFrame._visible = false;
}
static function processSelectedTrick(trickNum) {
m_allElements.getElementAt(trickNum).m_selFrame._visible = true;
}
function getTrickPower() {
return((m_iconNum + 1) * 12);
}
static function canUseTrickNum(tirckNum) {
return(m_allElements.getElementAt(tirckNum).getTrickPower() < CBikerPower.__get__curPower());
}
static function useTrickNum(tirckNum) {
CBikerPower.curPower = CBikerPower.curPower - (m_allElements.getElementAt(tirckNum).getTrickPower() / 2);
}
static var m_allElements = new CGroup();
static var m_curentIconNum = -1;
}
Symbol 741 MovieClip [__Packages.CBikerPower] Frame 0
class CBikerPower extends MovieClip
{
var onEnterFrame, gotoAndStop, _totalframes;
function CBikerPower () {
super();
onEnterFrame = process;
}
function process() {
updatePosition();
}
function onUnload() {
m_curPower = 100;
}
function updatePosition() {
gotoAndStop(Math.round((_totalframes / 100) * curPower));
}
static function get curPower() {
return(m_curPower);
}
static function set curPower(nPower) {
m_curPower = nPower;
if (m_curPower > 100) {
m_curPower = 100;
} else if (m_curPower < 1) {
m_curPower = 1;
}
//return(curPower);
}
static var m_curPower = 100;
}
Symbol 742 MovieClip [__Packages.CLevelIcon] Frame 0
class CLevelIcon extends MovieClip
{
static var m_selectedItem, m_scores;
var stop, m_complete, onEnterFrame, m_levelNum, _currentframe, gotoAndStop;
function CLevelIcon () {
super();
stop();
m_complete._visible = false;
onEnterFrame = process;
}
function select() {
m_selectedItem = this;
m_curLevelNum = m_levelNum;
}
function onPress() {
if (isEnable()) {
select();
}
}
function process() {
if ((m_curLevelNum == m_levelNum) && (m_selectedItem != this)) {
select();
}
if (isEnable()) {
if (m_selectedItem != this) {
if (_currentframe != 1) {
gotoAndStop(1);
}
} else if (_currentframe != 2) {
gotoAndStop(2);
}
}
if ((m_scores[m_levelNum].score > 0) && (!m_complete._visible)) {
m_complete._visible = true;
}
}
function set levelNum(nLevelNum) {
m_levelNum = nLevelNum;
if (m_levelNum >= m_lastEnabledLevel) {
disable();
}
//return(levelNum);
}
function get levelNum() {
return(m_levelNum);
}
static function get curLevelNum() {
return(m_curLevelNum);
}
static function set curLevelNum(levNum) {
m_curLevelNum = levNum;
//return(curLevelNum);
}
function isEnable() {
return(_currentframe <= 2);
}
function disable() {
gotoAndStop(3);
}
static function get lastEnabledLevel() {
return(m_lastEnabledLevel);
}
static function set lastEnabledLevel(levelNum) {
m_lastEnabledLevel = levelNum;
//return(lastEnabledLevel);
}
static function setScores(scores) {
m_scores = scores;
}
static var m_curLevelNum = 0;
static var m_lastEnabledLevel = 0;
}
Symbol 15 MovieClip [peopleHit] Frame 1
#initclip 96
Object.registerClass("peopleHit", CInvisibleMovie);
#endinitclip
Symbol 16 MovieClip [audience] Frame 1
#initclip 41
Object.registerClass("audience", CPeople);
#endinitclip
Symbol 17 MovieClip [idCurLevel] Frame 1
#initclip 42
Object.registerClass("idCurLevel", CLevel);
#endinitclip
Symbol 23 MovieClip [wheel_back_rim] Frame 1
#initclip 43
Object.registerClass("wheel_back_rim", CBikeColor);
#endinitclip
Symbol 29 MovieClip [koleso1] Frame 1
#initclip 44
Object.registerClass("koleso1", CBikeColor);
#endinitclip
stop();
Symbol 30 MovieClip [idMotoWhellForward] Frame 1
#initclip 45
Object.registerClass("idMotoWhellForward", CWheel);
#endinitclip
Symbol 36 MovieClip [koleso2] Frame 1
#initclip 46
Object.registerClass("koleso2", CBikeColor);
#endinitclip
Symbol 37 MovieClip [idMotoWhellBack] Frame 1
#initclip 47
Object.registerClass("idMotoWhellBack", CWheel);
#endinitclip
stop();
Symbol 43 MovieClip [moto1_spring_b] Frame 1
#initclip 48
Object.registerClass("moto1_spring_b", CBikeColor);
#endinitclip
Symbol 59 MovieClip [bikeBodyStatic] Frame 1
#initclip 49
Object.registerClass("bikeBodyStatic", CBikeColor);
#endinitclip
stop();
Symbol 64 MovieClip [leg_down] Frame 1
#initclip 50
Object.registerClass("leg_down", CManColor);
#endinitclip
Symbol 68 MovieClip [hand_up copy] Frame 1
#initclip 51
Object.registerClass("hand_up copy", CManColor);
#endinitclip
Symbol 72 MovieClip [hand_down copy] Frame 1
#initclip 52
Object.registerClass("hand_down copy", CManColor);
#endinitclip
Symbol 77 MovieClip Frame 1
stop();
Symbol 81 MovieClip [head] Frame 1
#initclip 53
Object.registerClass("head", CManColor);
#endinitclip
stop();
Symbol 87 MovieClip [body] Frame 1
#initclip 54
Object.registerClass("body", CManColor);
#endinitclip
stop();
Symbol 91 MovieClip [leg] Frame 1
#initclip 55
Object.registerClass("leg", CManColor);
#endinitclip
stop();
Symbol 93 MovieClip Frame 7
this._parent.endMove();
Symbol 94 MovieClip Frame 7
this._parent.endMove();
Symbol 95 MovieClip Frame 7
this._parent.endMove();
Symbol 96 MovieClip Frame 7
this._parent.endMove();
Symbol 99 MovieClip [lib_man] Frame 1
#initclip 56
Object.registerClass("lib_man", CMan);
#endinitclip
this.stop();
Symbol 105 MovieClip [idTrick1] Frame 1
#initclip 57
Object.registerClass("idTrick1", CAnimation);
#endinitclip
Symbol 110 MovieClip [idTrick2] Frame 1
#initclip 58
Object.registerClass("idTrick2", CAnimation);
#endinitclip
Symbol 111 MovieClip [idTrick3] Frame 1
#initclip 59
Object.registerClass("idTrick3", CAnimation);
#endinitclip
Symbol 112 MovieClip [idTrick4] Frame 1
#initclip 60
Object.registerClass("idTrick4", CAnimation);
#endinitclip
Symbol 113 MovieClip [idTrick5] Frame 1
#initclip 61
Object.registerClass("idTrick5", CAnimation);
#endinitclip
Symbol 116 MovieClip [idTrick6] Frame 1
#initclip 62
Object.registerClass("idTrick6", CAnimation);
#endinitclip
Symbol 117 MovieClip [idTrick7] Frame 1
#initclip 63
Object.registerClass("idTrick7", CAnimation);
#endinitclip
Symbol 118 MovieClip Frame 1
this.stop();
Symbol 120 MovieClip [lib_bike_body1] Frame 1
this.stop();
Symbol 122 MovieClip [idManDie] Frame 1
#initclip 64
Object.registerClass("idManDie", CWheel);
#endinitclip
stop();
Symbol 122 MovieClip [idManDie] Frame 45
stop();
Symbol 176 MovieClip [idTricksMessage] Frame 56
stop();
Symbol 179 MovieClip [idPhotographing] Frame 10
this.removeMovieClip();
Symbol 181 MovieClip [idLevelPart1_0] Frame 1
#initclip 65
Object.registerClass("idLevelPart1_0", CInvisibleMovie);
#endinitclip
Symbol 183 MovieClip [idLevelPart1_2] Frame 1
#initclip 66
Object.registerClass("idLevelPart1_2", CInvisibleMovie);
#endinitclip
Symbol 186 MovieClip [idLevelPart1_1] Frame 1
#initclip 67
Object.registerClass("idLevelPart1_1", CInvisibleMovie);
#endinitclip
Symbol 197 MovieClip [idLevelPart1_3] Frame 1
#initclip 68
Object.registerClass("idLevelPart1_3", CInvisibleMovie);
#endinitclip
Symbol 202 MovieClip [idPart2_0] Frame 1
#initclip 69
Object.registerClass("idPart2_0", CInvisibleMovie);
#endinitclip
Symbol 204 MovieClip [idPart2_1] Frame 1
#initclip 70
Object.registerClass("idPart2_1", CInvisibleMovie);
#endinitclip
Symbol 206 MovieClip [idPart2_2] Frame 1
#initclip 71
Object.registerClass("idPart2_2", CInvisibleMovie);
#endinitclip
Symbol 217 MovieClip [idPart2_3] Frame 1
#initclip 72
Object.registerClass("idPart2_3", CInvisibleMovie);
#endinitclip
Symbol 222 MovieClip [idPart3_0] Frame 1
#initclip 73
Object.registerClass("idPart3_0", CInvisibleMovie);
#endinitclip
Symbol 224 MovieClip [idPart3_1] Frame 1
#initclip 74
Object.registerClass("idPart3_1", CInvisibleMovie);
#endinitclip
Symbol 232 MovieClip [idPart4_0] Frame 1
#initclip 75
Object.registerClass("idPart4_0", CInvisibleMovie);
#endinitclip
Symbol 234 MovieClip [idPart4_1] Frame 1
#initclip 76
Object.registerClass("idPart4_1", CInvisibleMovie);
#endinitclip
Symbol 242 MovieClip [idPart5_0] Frame 1
#initclip 77
Object.registerClass("idPart5_0", CInvisibleMovie);
#endinitclip
Symbol 244 MovieClip [idPart5_1] Frame 1
#initclip 78
Object.registerClass("idPart5_1", CInvisibleMovie);
#endinitclip
Symbol 254 Button
on (press) {
getURL ("http://www.addictinggames.com", "_blank");
}
Symbol 265 MovieClip [Dinamik] Frame 1
#initclip 79
Object.registerClass("Dinamik", CSoundControl);
#endinitclip
Symbol 268 MovieClip [Pause] Frame 1
#initclip 80
Object.registerClass("Pause", CGameControl);
#endinitclip
Symbol 277 MovieClip [idPart6_0] Frame 1
#initclip 81
Object.registerClass("idPart6_0", CInvisibleMovie);
#endinitclip
Symbol 279 MovieClip [idPart6_1] Frame 1
#initclip 82
Object.registerClass("idPart6_1", CInvisibleMovie);
#endinitclip
Symbol 281 MovieClip [idPart6_2] Frame 1
#initclip 83
Object.registerClass("idPart6_2", CInvisibleMovie);
#endinitclip
Symbol 308 MovieClip [dmSpecialMessage] Frame 8
if (counter == undefined) {
counter = 0;
} else if ((++counter) > 5) {
this.removeMovieClip();
}
gotoAndPlay (1);
Symbol 310 MovieClip [idPart7_0] Frame 1
#initclip 84
Object.registerClass("idPart7_0", CInvisibleMovie);
#endinitclip
Symbol 312 MovieClip [idPart7_1] Frame 1
#initclip 85
Object.registerClass("idPart7_1", CInvisibleMovie);
#endinitclip
Symbol 314 MovieClip [idPart7_2] Frame 1
#initclip 86
Object.registerClass("idPart7_2", CInvisibleMovie);
#endinitclip
Symbol 316 MovieClip [idPart7_3] Frame 1
#initclip 87
Object.registerClass("idPart7_3", CInvisibleMovie);
#endinitclip
Symbol 332 MovieClip [idPart8_0] Frame 1
#initclip 88
Object.registerClass("idPart8_0", CInvisibleMovie);
#endinitclip
Symbol 335 MovieClip [idPart8_1] Frame 1
#initclip 89
Object.registerClass("idPart8_1", CInvisibleMovie);
#endinitclip
Symbol 337 MovieClip [idPart8_2] Frame 1
#initclip 90
Object.registerClass("idPart8_2", CInvisibleMovie);
#endinitclip
Symbol 340 MovieClip [idPart8_3] Frame 1
#initclip 91
Object.registerClass("idPart8_3", CInvisibleMovie);
#endinitclip
Symbol 342 MovieClip [idPart9_0] Frame 1
#initclip 92
Object.registerClass("idPart9_0", CInvisibleMovie);
#endinitclip
Symbol 344 MovieClip [idPart9_1] Frame 1
#initclip 93
Object.registerClass("idPart9_1", CInvisibleMovie);
#endinitclip
Symbol 346 MovieClip [idPart9_2] Frame 1
#initclip 94
Object.registerClass("idPart9_2", CInvisibleMovie);
#endinitclip
Symbol 348 MovieClip [idPart9_3] Frame 1
#initclip 95
Object.registerClass("idPart9_3", CInvisibleMovie);
#endinitclip
Symbol 380 MovieClip [idLevelMessage] Frame 25
this.removeMovieClip();
Symbol 418 MovieClip Frame 1
stop();
Symbol 432 MovieClip Frame 1
function LOGO_IN() {
var _local1 = new mx.transitions.Tween(AGlogo_mc, "_y", mx.transitions.easing.Strong.easeIn, -75, 85, 12, false);
_local1.onMotionFinished = function () {
LOGO_SMASH();
var _local3 = new mx.transitions.Tween(AGlogo_mc, "_y", mx.transitions.easing.Bounce.easeOut, 60, 85, 6, false);
var _local4 = new mx.transitions.Tween(AGlogo_mc, "_x", mx.transitions.easing.Bounce.easeOut, 30, 50, 6, false);
var _local2 = new mx.transitions.Tween(AGpresented_mc, "_y", mx.transitions.easing.Bounce.easeOut, 15, 25, 6, false);
var _local1 = new mx.transitions.Tween(AGpresented_mc, "_x", mx.transitions.easing.Bounce.easeOut, 110, 100, 6, false);
};
}
function LOGO_SMASH() {
AG_SMASH.start();
AGclick_btn._visible = true;
}
function AG_HOLD_COUNTER() {
if (AG_COUNT == AG_TIME) {
clearInterval(AG_HOLD_ID);
_level0.START_ping.broadcastMessage("presented");
_parent.gotoAndStop("lbStart1");
this.unloadMovie();
} else {
AG_COUNT++;
}
}
_parent.stop();
var AG_SMASH = new Sound();
AG_SMASH.attachSound("Smash");
var AG_COUNT = 0;
var AG_TIME = 4;
var AG_HOLD_ID;
AG_HOLD_ID = setInterval(this, "AG_HOLD_COUNTER", 1000);
AGpresented_mc._alpha = 0;
AGclick_btn._visible = false;
AGlogo_mc._y = -70;
var AGpresented_IN = (new mx.transitions.Tween(AGpresented_mc, "_alpha", mx.transitions.easing.Strong.easeIn, 0, 100, 12, false));
AGpresented_IN.onMotionFinished = function () {
LOGO_IN();
};
AGskip_btn.onRelease = function () {
AG_COUNT = AG_TIME;
AG_HOLD_COUNTER();
};
AGclick_btn.onRelease = function () {
getURL ("http://www.addictinggames.com", "_blank");
_root.kvEvent(423);
};
Symbol 440 Button
on (press) {
buttonStartGame();
}
Symbol 446 Button
on (press) {
buttonHowToPlay();
}
Symbol 451 Button
on (press) {
CSoundService.playSound(CConstants.SND_BUTTON, 1, true);
gotoAndStop ("lbAbout");
}
Symbol 452 Button
on (press) {
getURL ("http://www.addictinggames.com", "_blank");
_root.kvEvent(424);
}
Symbol 456 Button
on (press) {
var i = 0;
while (i < (CConstants.hitLevelNames.length - 1)) {
CGame.getInstance().m_levelStats[i].score = 1;
i++;
}
CGame.getInstance().saveSettingth();
CGame.getInstance().loadSettingth();
}
Symbol 458 Button
on (press) {
CGame.getInstance().defaultSettingth();
CGame.getInstance().saveSettingth();
CGame.getInstance().loadSettingth();
}
Symbol 465 Button
on (press) {
buttonBack();
}
Symbol 493 MovieClip [iconLevel1] Frame 1
#initclip 109
Object.registerClass("iconLevel1", CLevelIcon);
#endinitclip
Symbol 497 MovieClip [iconLevel2] Frame 1
#initclip 97
Object.registerClass("iconLevel2", CLevelIcon);
#endinitclip
Symbol 501 MovieClip [iconLevel3] Frame 1
#initclip 98
Object.registerClass("iconLevel3", CLevelIcon);
#endinitclip
Symbol 505 MovieClip [iconLevel4] Frame 1
#initclip 99
Object.registerClass("iconLevel4", CLevelIcon);
#endinitclip
Symbol 509 MovieClip [iconLevel5] Frame 1
#initclip 100
Object.registerClass("iconLevel5", CLevelIcon);
#endinitclip
Symbol 513 MovieClip [iconLevel6] Frame 1
#initclip 101
Object.registerClass("iconLevel6", CLevelIcon);
#endinitclip
Symbol 517 MovieClip [iconLevel7] Frame 1
#initclip 102
Object.registerClass("iconLevel7", CLevelIcon);
#endinitclip
Symbol 521 MovieClip [iconLevel8] Frame 1
#initclip 103
Object.registerClass("iconLevel8", CLevelIcon);
#endinitclip
Symbol 525 MovieClip [iconLevel9] Frame 1
#initclip 104
Object.registerClass("iconLevel9", CLevelIcon);
#endinitclip
Symbol 571 MovieClip [symIconLevel] Frame 1
stop();
Symbol 571 MovieClip [symIconLevel] Frame 2
stop();
Symbol 571 MovieClip [symIconLevel] Frame 3
stop();
Symbol 571 MovieClip [symIconLevel] Frame 4
stop();
Symbol 571 MovieClip [symIconLevel] Frame 5
stop();
Symbol 571 MovieClip [symIconLevel] Frame 6
stop();
Symbol 571 MovieClip [symIconLevel] Frame 7
stop();
Symbol 571 MovieClip [symIconLevel] Frame 8
stop();
Symbol 571 MovieClip [symIconLevel] Frame 9
stop();
Instance of Symbol 579 MovieClip in Symbol 583 MovieClip Frame 1
onClipEvent (load) {
this._alpha = 0;
}
Symbol 592 MovieClip Frame 1
stop();
Symbol 593 MovieClip Frame 1
stop();
Symbol 610 Button
on (press) {
buttonStartRace();
}
Symbol 614 Button
on (press) {
CSoundService.playSound(CConstants.SND_BUTTON, 1, true);
_root.submitScore();
_root.swHighScoreObject.showTab = "submit";
docount = true;
loadMovieNum (_root.HSHubURL, 2);
}
Symbol 657 MovieClip [trickIcon] Frame 1
#initclip 105
Object.registerClass("trickIcon", CTrickIcon);
#endinitclip
Symbol 662 MovieClip [bikerPowerBar] Frame 1
#initclip 106
Object.registerClass("bikerPowerBar", CBikerPower);
#endinitclip
Symbol 673 MovieClip Frame 28
stop();
Symbol 679 MovieClip Frame 26
stop();
Symbol 680 MovieClip [idRaceEngine] Frame 1
#initclip 107
Object.registerClass("idRaceEngine", CRaceEngine);
#endinitclip
Symbol 680 MovieClip [idRaceEngine] Frame 30
startRace();
stop();
Symbol 680 MovieClip [idRaceEngine] Frame 64
endRace();
stop();
Symbol 702 Button
on (press) {
buttonNextLevel();
}
Symbol 703 MovieClip [dmGame] Frame 1
#initclip 108
Object.registerClass("dmGame", CGame);
#endinitclip
CSoundService.playLoopSound(CConstants.SND_INTRO);
stop();
Symbol 703 MovieClip [dmGame] Frame 46
CSoundService.playLoopSound(CConstants.SND_INTRO);
Instance of Symbol 493 MovieClip [iconLevel1] in Symbol 703 MovieClip [dmGame] Frame 46
onClipEvent (load) {
levelNum = 0;
}
Instance of Symbol 497 MovieClip [iconLevel2] in Symbol 703 MovieClip [dmGame] Frame 46
onClipEvent (load) {
levelNum = 2;
}
Instance of Symbol 501 MovieClip [iconLevel3] in Symbol 703 MovieClip [dmGame] Frame 46
onClipEvent (load) {
levelNum = 4;
}
Instance of Symbol 505 MovieClip [iconLevel4] in Symbol 703 MovieClip [dmGame] Frame 46
onClipEvent (load) {
levelNum = 6;
}
Instance of Symbol 509 MovieClip [iconLevel5] in Symbol 703 MovieClip [dmGame] Frame 46
onClipEvent (load) {
levelNum = 1;
}
Instance of Symbol 513 MovieClip [iconLevel6] in Symbol 703 MovieClip [dmGame] Frame 46
onClipEvent (load) {
levelNum = 3;
}
Instance of Symbol 517 MovieClip [iconLevel7] in Symbol 703 MovieClip [dmGame] Frame 46
onClipEvent (load) {
levelNum = 5;
}
Instance of Symbol 521 MovieClip [iconLevel8] in Symbol 703 MovieClip [dmGame] Frame 46
onClipEvent (load) {
levelNum = 7;
}
Instance of Symbol 525 MovieClip [iconLevel9] in Symbol 703 MovieClip [dmGame] Frame 46
onClipEvent (load) {
levelNum = 8;
}
Instance of Symbol 615 MovieClip in Symbol 703 MovieClip [dmGame] Frame 46
onClipEvent (load) {
docount = false;
}
onClipEvent (enterFrame) {
if (docount) {
trycount++;
if ((_level2.getBytesTotal() == -1) && (trycount > 60)) {
docount = false;
trycount = 0;
}
}
}
Symbol 703 MovieClip [dmGame] Frame 61
CSoundService.stopCurLoopSound();
stop();
Symbol 703 MovieClip [dmGame] Frame 76
CSoundService.playLoopSound(CConstants.SND_INTRO);