Frame 2
b1 = _root.getBytesLoaded();
b2 = _root.getBytesTotal();
tgPrel = 1 + Math.round((b1 * 100) / b2);
prel.gotoAndStop(tgPrel);
if (b1 >= b2) {
gotoAndPlay ("intro");
}
Frame 5
Frame 6
_root.b1 = _root.getBytesLoaded();
_root.b2 = _root.getBytesTotal();
_root.tgPrel = 1 + Math.round((b1 * 100) / b2);
_root.tg = _root.tgPrel - 2;
trace("_root.tg: " + _root.tg);
if (_root.tg <= 9) {
_root.procent = "0" + _root.tg;
} else {
_root.procent = _root.tg;
}
_root.prel.gotoAndStop(_root.tgPrel);
Frame 10
if (Math.round(b1 / 1024) <= 100) {
gotoAndPlay ("loop2");
}
Frame 12
_root.b1 = _root.getBytesLoaded();
_root.b2 = _root.getBytesTotal();
_root.tgPrel = 1 + Math.round((b1 * 100) / b2);
_root.tg = _root.tgPrel - 2;
trace("_root.TG: " + tgPrel);
if (_root.tgPrel <= 9) {
_root.procent = "0" + tg;
trace(_root.procent);
} else {
_root.procent = tg;
}
_root.prel.gotoAndStop(_root.tgPrel);
Frame 15
if (b1 < b2) {
gotoAndPlay ("loop3");
}
Frame 16
_root.procent = "--";
prel.gotoAndPlay(1);
Frame 167
_root.locatie = _url;
if (_root.locatie.indexOf("freeonlinegames.com", 0) != -1) {
_root.play();
} else {
_root.gotoAndPlay("loop1");
}
Frame 170
function initVehicle() {
particles = [];
particles[0] = {x:0, y:0, r:22, w:{w:0}, c:true, g:grav * 1.5};
particles[1] = {x:80, y:0, r:22, w:{w:0}, c:true, g:grav * 1.5};
i = 0;
while (i < particles.length) {
p = particles[i];
if (p.r == undefined) {
p.r = 0;
p.w = false;
} else if (p.w != undefined) {
p.w.x = p.r;
p.w.y = 0;
p.w.ox = p.w.x;
p.w.oy = p.w.y;
p.w.rL = p.r;
p.w.s = 0;
}
p.x = p.x + initX;
p.y = p.y + initY;
p.ox = p.x;
p.oy = p.y;
i++;
}
springs = [];
springs[0] = {p0:particles[0], p1:particles[1], w0:spring1, w1:spring2};
i = 0;
while (i < springs.length) {
s = springs[i];
s.rL = getDistance(s.p0, s.p1);
if (s.c == undefined) {
s.c = 5;
}
i++;
}
aTerrain = [];
aTerrain[0] = {x0:-300, y0:280, x1:300, y1:320};
aTerrain[1] = {x0:300, y0:320, x1:400, y1:330};
aTerrain[2] = {x0:400, y0:330, x1:490, y1:350};
aTerrain[3] = {x0:490, y0:350, x1:600, y1:380};
aTerrain[4] = {x0:600, y0:380, x1:900, y1:560};
aTerrain[5] = {x0:900, y0:560, x1:1080, y1:680};
}
function rollWheel(p, nx, ny) {
jumpPossible = true;
if (nx < -1) {
nx = -1;
} else if (nx > 1) {
nx = 1;
}
if (ny < -1) {
ny = -1;
} else if (ny > 1) {
ny = 1;
}
w = p.w;
var _local8 = 1;
var _local6 = 1;
var _local2 = -w.y;
var _local1 = w.x;
var _local7 = Math.sqrt((_local2 * _local2) + (_local1 * _local1));
_local2 = _local2 / _local7;
_local1 = _local1 / _local7;
var _local15 = (_local2 * w.s) * _local6;
var _local13 = (_local1 * w.s) * _local8;
var _local14 = p.x - p.ox;
var _local12 = p.y - p.oy;
var _local11 = _local14 + _local15;
var _local10 = _local12 + _local13;
var _local9 = ((-ny) * _local11) + (nx * _local10);
w.ox = w.x - (_local9 * _local2);
w.oy = w.y - (_local9 * _local1);
w0 = 1 - w.w;
p.x = p.x + (((w0 * w.s) * _local6) * (-ny));
p.y = p.y + (((w0 * w.s) * _local8) * nx);
w.s = w.s * w.w;
}
function aF(p, pressure, factor) {
p.ox = p.ox + ((pressure * (f * factor)) * (p.x - p.ox));
p.oy = p.oy + ((pressure * (f * factor)) * (p.y - p.oy));
}
function lean(dir) {
d = getDistance(particles[0], particles[1]) / 2;
a = getAngle(particles[0], particles[1]) + (dir * riderPower);
mX = getMean([particles[0].x, particles[1].x]);
mY = getMean([particles[0].y, particles[1].y]);
particles[0].x = mX - (Math.cos((a * Math.PI) / 180) * d);
particles[0].y = mY - (Math.sin((a * Math.PI) / 180) * d);
particles[1].x = mX + (Math.cos((a * Math.PI) / 180) * d);
particles[1].y = mY + (Math.sin((a * Math.PI) / 180) * d);
}
function Verlet(car) {
var _local5;
if (car == 1) {
_local5 = particles;
} else {
_local5 = dudeParticles;
}
var _local1 = maxSpeed;
i = 0;
while (i < 2) {
p = _local5[i];
if (p.w != false) {
var p = p.w;
var _local12 = -p.y;
var _local11 = p.x;
var _local9 = Math.sqrt((_local12 * _local12) + (_local11 * _local11));
_local12 = _local12 / _local9;
_local11 = _local11 / _local9;
p.x = p.x + (p.s * _local12);
p.y = p.y + (p.s * _local11);
var _local16 = p.ox;
var _local15 = p.oy;
var _local14 = (p.ox = p.x);
var _local13 = (p.oy = p.y);
var _local8 = _local14 - _local16;
_local8 = Math.max(-_local1, Math.min(_local1, _local8));
var _local7 = _local13 - _local15;
_local7 = Math.max(-_local1, Math.min(_local1, _local7));
p.x = p.x + (drag * _local8);
p.y = p.y + (drag * _local7);
var _local10 = Math.sqrt((p.x * p.x) + (p.y * p.y));
var _local6 = (_local10 - p.rL) / _local10;
p.x = p.x - (p.x * _local6);
p.y = p.y - (p.y * _local6);
}
i++;
}
i = 0;
while (i < _local5.length) {
var p = _local5[i];
var _local16 = p.ox;
var _local15 = p.oy;
var _local14 = (p.ox = p.x);
var _local13 = (p.oy = p.y);
var _local8 = _local14 - _local16;
_local8 = Math.max(-_local1, Math.min(_local1, _local8));
var _local7 = _local13 - _local15;
_local7 = Math.max(-_local1, Math.min(_local1, _local7));
p.x = p.x + (drag * _local8);
p.y = p.y + ((drag * _local7) + p.g);
i++;
}
((car == 1) ? (_local5 = springs) : (_local5 = dudeSprings));
i = 0;
while (i < _local5.length) {
var _local2 = _local5[i];
var _local4 = _local2.p0;
var _local3 = _local2.p1;
var _local12 = _local4.x - _local3.x;
var _local11 = _local4.y - _local3.y;
var _local10 = getDistance(_local4, _local3);
var _local6 = (d1 = (_local10 - _local2.rL) / _local10);
_local6 = _local6 * _local2.w0;
d1 = d1 * _local2.w1;
_local4.x = _local4.x - (_local12 * _local6);
_local4.y = _local4.y - (_local11 * _local6);
_local3.x = _local3.x + (_local12 * d1);
_local3.y = _local3.y + (_local11 * d1);
i++;
}
}
function generateTerrain() {
var _local13 = main._x;
if (aTerrain[0].x1 < ((-_local13) - 600)) {
aTerrain.shift();
}
var _local3 = aTerrain.length - 1;
var _local26 = aTerrain[_local3].x0;
var _local1 = aTerrain[_local3].x1;
var _local25 = aTerrain[_local3].y0;
var _local2 = aTerrain[_local3].y1;
if (_local1 < (((-_local13) + sW) + 640)) {
travelDistance++;
if (travelDistance > (100 + checkPlus)) {
timeForCheckPoint = true;
travelDistance = 0;
}
if (terrainStep <= 0) {
if (timeForCheckPoint == true) {
tMode = "checkpoint";
} else if (tMode == 2) {
tMode = 3;
} else if (tMode == 4) {
tMode = 1;
} else {
var _local10 = Math.random();
if (_local10 < 0.082) {
tMode = 4;
} else if (_local10 < 0.12) {
tMode = 2;
} else if (_local10 < 0.14) {
tMode = 5;
} else {
tMode = 0;
}
}
if ((tMode != 0) && (tMode != "checkpoint")) {
if ((tMode == 2) || (tMode == 3)) {
var _local16 = 5;
} else if (tMode == 5) {
var _local16 = 4;
} else {
var _local16 = 0;
}
var _local17 = random(8 - _local16) + (8 - _local16);
tSteps = _local17;
terrainStep = _local17;
}
}
var _local5 = 1.7 - (Math.random() * 1.4);
var _local6 = 1.7 - (Math.random() * 1.4);
var _local18 = Math.random();
var _local23 = (_local5 + 1) / 2;
var _local20 = (_local6 + 1) / 2;
var _local4 = piste.surface / 100;
if (tMode == "finish") {
var _local15 = _local1;
var _local14 = _local15 + 300;
var _local11 = _local2;
var _local19 = _local11;
aTerrain.push({x0:_local15, y0:_local11, x1:_local14, y1:_local19});
}
if (tMode == 0) {
var _local24 = aTerrain[_local3 - 1].x1 - aTerrain[_local3 - 1].x0;
var _local21 = aTerrain[_local3 - 1].y1 - aTerrain[_local3 - 1].y0;
var _local8 = _local21 / _local24;
var _local15 = _local1;
var _local14 = (_local1 + 30) + random(60);
var _local11 = _local2;
var _local19 = (_local2 - 6) + random(28);
var _local12 = _local14 - _local15;
var _local22 = _local19 - _local11;
var _local7 = _local22 / _local12;
var _local9 = 0.6 * _local4;
if ((_local8 - _local7) > _local9) {
_local7 = _local8 - _local9;
} else if ((_local8 - _local7) < (-_local9)) {
_local7 = _local8 + _local9;
}
aTerrain.push({x0:_local15, y0:_local11, x1:_local14, y1:_local11 + (_local12 * _local7)});
if (Math.random() < 0.08) {
attachGem();
}
} else if (tMode == 1) {
aTerrain.push({x0:_local1, y0:_local2, x1:(_local1 + 35) + (40 * _local5), y1:_local2 + (terrainStep * ((6 * _local4) * _local6))});
if (_local18 < 0.1) {
attachGem();
}
terrainStep--;
} else if (tMode == 2) {
aTerrain.push({x0:_local1, y0:_local2, x1:(_local1 + 14) + (14 * _local5), y1:_local2 - ((tSteps - terrainStep) * ((5 * _local4) * _local6))});
terrainStep--;
} else if (tMode == 3) {
aTerrain.push({x0:_local1, y0:_local2, x1:(_local1 + 14) + (14 * _local5), y1:_local2 - (terrainStep * ((5 * _local4) * _local6))});
terrainStep--;
if (terrainStep == 0) {
attachGem(true);
}
} else if (tMode == 4) {
aTerrain.push({x0:_local1, y0:_local2, x1:(_local1 + 30) + (50 * _local5), y1:_local2 + ((tSteps - terrainStep) * ((6 * _local4) * _local6))});
if (_local18 < 0.1) {
attachGem();
}
terrainStep--;
} else if (tMode == 5) {
aTerrain.push({x0:_local1, y0:_local2, x1:(_local1 + 14) + (16 * _local23), y1:_local2 - ((tSteps - terrainStep) * ((6 * _local4) * _local20))});
terrainStep--;
if (terrainStep == 0) {
attachGem(true);
}
} else if (tMode == "checkpoint") {
timeForCheckPoint = false;
aTerrain.push({x0:_local1, y0:_local2, x1:_local1 + 100, y1:_local2, cp:true});
}
}
}
function collide(car) {
var _local20 = 1;
var _local27;
if (car == 1) {
_local27 = particles;
var _local34 = false;
var _local28 = 0;
} else if (car == 2) {
_local27 = aHitspots;
} else {
_local27 = dudeParticles;
_local20 = 20;
}
if (waitForPerfectLanding > 0) {
waitForPerfectLanding--;
}
i = 0;
while (i < _local27.length) {
p = _local27[i];
if (p.c) {
var _local10 = p.x;
var _local26 = p.y;
var _local14 = p.r;
j = 0;
while (j < aTerrain.length) {
var _local6 = aTerrain[j];
var _local5 = _local6.x0;
var _local7 = _local6.y0;
var _local13 = _local6.x1;
var _local22 = _local6.y1;
if ((_local10 <= _local13) && (_local10 >= _local5)) {
var _local4 = _local13 - _local5;
var _local3 = _local22 - _local7;
var _local2 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
var _local16 = _local4 / _local2;
var _local15 = _local3 / _local2;
var _local9 = -_local15;
var _local8 = _local16;
var _local24 = _local10 - _local5;
var _local23 = _local26 - _local7;
var _local11 = (_local24 * _local16) + (_local23 * _local15);
if (_local11 < 0) {
_local2 = Math.sqrt((_local24 * _local24) + (_local23 * _local23));
var _local1 = _local14 - _local2;
if (0 < _local1) {
_local24 = _local24 / _local2;
_local23 = _local23 / _local2;
px = _local24 * _local1;
py = _local23 * _local1;
p.x = p.x + px;
p.y = p.y + py;
aF(p, 1, _local20);
if (p.w != false) {
rollWheel(p, -_local9, -_local8);
}
}
} else if (_local2 < _local11) {
_local24 = _local24 - _local4;
_local23 = _local23 - _local3;
_local2 = Math.sqrt((_local24 * _local24) + (_local23 * _local23));
var _local1 = _local14 - _local2;
if (0 < _local1) {
_local24 = _local24 / _local2;
_local23 = _local23 / _local2;
var px = (_local24 * _local1);
var py = (_local23 * _local1);
p.x = p.x + px;
p.y = p.y + py;
aF(p, 1, _local20);
if (p.w != false) {
rollWheel(p, -_local9, -_local8);
}
}
} else {
_local9 = -_local3;
_local8 = _local4;
_local9 = _local9 / _local2;
_local8 = _local8 / _local2;
_local24 = _local10 - _local5;
_local23 = _local26 - _local7;
var _local25 = (_local24 * _local9) + (_local23 * _local8);
var _local1 = _local25 + _local14;
if (_local1 > 0) {
_local1 = _local1 * -1;
var px = (_local9 * _local1);
var py = (_local8 * _local1);
p.x = p.x + px;
p.y = p.y + py;
aF(p, 1, _local20);
if (NOHIT > 0) {
NOHIT--;
}
if (car == 2) {
if (dudeFall != true) {
if ((NOHIT < 1) || (NOHIT == null)) {
startDudeFall();
}
}
}
if (particles[0].x > particles[1].x) {
}
if (car == 1) {
_local28++;
var _local19 = getTimer() - airTime;
if (_local19 > 2000) {
memAirTime = Math.ceil(_local19 / 1000);
}
if ((Math.abs(jumpRotation) > 240) && (dudeFall != true)) {
memJumpRotation = jumpRotation;
waitForPerfectLanding = 6;
}
}
jumpRotation = 0;
airTime = getTimer();
setAnimDude("hitground", _local1);
if (Math.abs(_local1) > 0.4) {
var _local17 = true;
if (i == 1) {
if (Math.random() > 0.2) {
_local17 = false;
}
}
if (_local17 == true) {
if (Math.abs(particles[0].ox - particles[0].x) > 4) {
var _local12 = sC.getNextHighestDepth();
var _local18 = sC.attachMovie("mcSnow", "mcSnow" + _local12, _local12);
_local18._x = p.x;
_local18._y = p.y;
}
}
}
if (finish != true) {
if (car == 1) {
playHitGround(p, _local1);
}
}
if (p.w != false) {
rollWheel(p, -_local9, -_local8);
}
}
}
}
j++;
}
if (p.x < (aTerrain[0].x0 + p.r)) {
p.x = aTerrain[0].x0 + p.r;
aF(p, 1, _local20);
if (p.w != false) {
rollWheel(p, 1, 0);
}
}
}
i++;
}
if (waitForPerfectLanding != null) {
if (_local28 > 1) {
callPerfectLanding = true;
}
}
if (waitForPerfectLanding == 0) {
waitForPerfectLanding = null;
if (dudeFall != true) {
if (staticMcs.mcCheckPointMessage) {
staticMcs.mcCheckPointMessage.removeMovieClip();
}
var _local31 = staticMcs.attachMovie("mcDegreesMessage", "mcDegreesMessage", staticMcs.getNextHighestDepth());
_local31._x = sW / 2;
_local31._y = 70;
var _local32 = Math.round(Math.abs(memJumpRotation));
if (memAirTime > 2) {
var _local33 = memAirTime * 50;
} else {
var _local33 = 0;
}
var _local29 = _local32 + _local33;
if (callPerfectLanding == true) {
_local29 = _local29 * 2;
}
var _local30 = "";
if (_local29 < 500) {
_local30 = " !";
} else if (_local29 < 800) {
_local30 = " !!";
} else if (_local29 < 1200) {
_local30 = " !!!";
} else if (_local29 < 1600) {
_local30 = " !!!!";
} else {
_local30 = " !!!!!!";
}
totalPoints = totalPoints + _local29;
if (_local29 > 1000) {
smileCount = 30 + random(40);
}
_local31.deg.text = (_local29 + " points") + _local30;
if (callPerfectLanding == true) {
callPerfectLanding = false;
_local31 = staticMcs.attachMovie("mcPerfectLanding", "mcPerfectLanding", staticMcs.getNextHighestDepth());
_local31._x = sW / 2;
_local31._y = 100;
} else if (memAirTime > 2) {
_local31 = staticMcs.attachMovie("mcAirTime", "mcAirTime", staticMcs.getNextHighestDepth());
_local31.airtime.text = ("== Nice Airtime: " + memAirTime) + " secs !! ==";
_local31._x = sW / 2;
_local31._y = 100;
memAirTime = 0;
}
}
}
}
function render() {
var _local5 = particles[0].x;
var _local7 = particles[1].x;
var _local4 = particles[0].y;
var _local6 = particles[1].y;
var _local8 = getAngle(particles[0], particles[1]);
mcBoard._x = _local5;
mcBoard._y = _local4;
mcBoard._rotation = _local8;
vC.wheel0._x = _local5;
vC.wheel0._y = _local4;
vC.wheel0.tire._rotation = (Math.atan2(particles[0].w.y, particles[0].w.x) * 180) / Math.PI;
vC.wheel1._x = _local7;
vC.wheel1._y = _local6;
vC.wheel1.tire._rotation = (Math.atan2(particles[1].w.y, particles[1].w.x) * 180) / Math.PI;
if (dudeFall == true) {
fallingDude._x = getMean([dudeParticles[0].x, dudeParticles[1].x]);
fallingDude._y = getMean([dudeParticles[0].y, dudeParticles[1].y]);
}
if (crash != true) {
carX = getMean([_local5, _local7]);
carY = getMean([_local4, _local6]);
} else {
carX = getMean([_local5, _local7]);
carY = getMean([_local4, _local6]);
}
xPos = (sW / 3) - carX;
yPos = (sH / 2) - carY;
mC.mcBgMountains._x = -xPos;
mC.mcBgMountains._y = -yPos;
if (overStart != true) {
if ((-((sW / 3) - carX)) < 400) {
xPos = 0;
} else {
overStart = true;
}
}
xPosDiff = memXPos - xPos;
yPosDiff = memYPos - yPos;
if (Math.abs(xPosDiff) < 0.5) {
xPosDiff = 0;
}
if (Math.abs(yPosDiff) < 0.5) {
yPosDiff = 0;
}
memXPos = xPos;
memYPos = yPos;
if (stopScroll != true) {
main._x = xPos;
main._y = yPos;
}
vC.clear();
if (keyPressed == true) {
if ((crash != true) && (finish != true)) {
}
}
var _local1 = 2;
while (_local1 < particles.length) {
vC["particle" + _local1]._x = particles[_local1].x;
vC["particle" + _local1]._y = particles[_local1].y;
_local1++;
}
if (stopScroll != true) {
surface.clear();
_local1 = 0;
while (_local1 < aTerrain.length) {
l = aTerrain[_local1];
if (l.x1 >= (-main._x)) {
if (l.x0 < ((-main._x) + sW)) {
surface.beginFill(fillColor);
var _local2 = 5;
if (l.cp == true) {
surface.lineStyle(_local2 * 2, "0x9900FF");
if (carX > l.x0) {
attachCheckPointMessage();
attachFlits();
speelSimpelSFX("sfx_checkpoint");
checkPlus = checkPlus + 10;
timeLeft = timeLeft + 20;
l.cp = false;
}
} else {
surface.lineStyle(_local2 * 2, lineColor);
}
surface.moveTo(l.x0, l.y0 - (_local2 * 3));
surface.lineTo(l.x1, l.y1 - (_local2 * 3));
surface.lineStyle(none);
if (stopScroll == true) {
var _local3 = aTerrain[aTerrain.length - 1].y1 + (sH / 2);
surface.lineTo(l.x1, _local3);
surface.lineTo(l.x0, _local3);
} else {
surface.lineTo(l.x1, carY + (sH / 2));
surface.lineTo(l.x0, carY + (sH / 2));
}
surface.endFill();
}
}
_local1++;
}
}
}
function getDistance(ob0, ob1) {
if (_root.pause == false) {
return(Math.sqrt(Math.pow(ob0.x - ob1.x, 2) + Math.pow(ob0.y - ob1.y, 2)));
}
}
function getMean(values) {
if (_root.pause == false) {
mean = 0;
i = 0;
while (i < values.length) {
mean = mean + values[i];
i++;
}
return(mean / values.length);
}
}
function getAngle(ob0, ob1) {
if (_root.pause == false) {
return((Math.atan2(ob1.y - ob0.y, ob1.x - ob0.x) * 180) / Math.PI);
}
}
function getRadians(ob0, ob1) {
if (_root.pause == false) {
return(Math.atan2(ob1.y - ob0.y, ob1.x - ob0.x));
}
}
function randOrd(a, b) {
return(Math.round(Math.random()) - 0.5);
}
manageTime = function () {
if (_root.pause == false) {
countTime--;
if (countTime <= 0) {
timeLeft--;
countTime = 30;
if (finish != true) {
printTime();
}
}
}
};
mainLoop = function () {
if (_root.pause == false) {
if (keyPressed != false) {
manageTime();
if ((dudeFall != true) && (finish != true)) {
move();
}
if (finish != true) {
Verlet(1);
}
}
manageGems();
telrun++;
telLong++;
generateTerrain();
if (telLong > 4) {
telLong = 0;
}
if (telrun > 3) {
if (finish != true) {
calcPlanetPos();
} else {
fadeLoop();
}
telrun = 0;
}
jumpPossible = false;
hitSpot();
if (finish != true) {
collide(1);
}
if (dudeFall == true) {
Verlet(3);
collide(3);
}
makeJump();
soundCounters();
render();
renderBackground();
damageBar();
animateDude();
calcJumpRotation();
collide(2);
if ((dudeFall != true) && (finish != true)) {
setAirFriction();
} else {
f = 0.026;
if (finish != true) {
resurrectDude();
}
}
soundCounters();
}
};
initVehicleVars = function () {
damage = 0;
telrun = 0;
};
startGame = function () {
_global.currentPiste = 1;
initAllParts();
stopSound();
playLoop("race");
scoreGame = true;
scoreKeyHelpShowed = false;
main = this.createEmptyMovieClip("container", 0);
staticMcs = this.createEmptyMovieClip("static", 1);
vC = main.createEmptyMovieClip("vContainer", 3);
background = main.createEmptyMovieClip("background", 1);
sC = main.createEmptyMovieClip("snowContainer", 4);
gC = main.createEmptyMovieClip("gemContainer", 5);
surface = main.createEmptyMovieClip("surface", 2);
Display_Menu = main.createEmptyMovieClip("dp", 8);
surfaceTiles = main.createEmptyMovieClip("surfaceTileContainer", 6);
scenery = main.createEmptyMovieClip("sceneryContainer", 7);
initPiste();
init();
setupVehicle();
initVehicle();
initVehicleVars();
initDriver();
initHitspot();
attachHud();
attachBg();
main.onEnterFrame = function () {
mainLoop();
};
clearIntervals();
onceSixSecInt = setInterval(onceSixSec, 6000);
oncePerSecInt = setInterval(oncePerSec, 1000);
tenPerSecInt = setInterval(tenPerSec, 100);
longRandom = Math.random();
medRandom = Math.random();
carsVisible(false);
attachStartMessage();
initBoarder();
};
crashCar = function () {
particles[2].c = true;
particles[3].c = true;
springs[0] = null;
springs[3] = null;
springs[13] = null;
springs[12] = null;
springs[6] = null;
springs[1] = null;
springs[4] = null;
springs[14] = null;
springs[12] = null;
springs[7] = null;
speelSimpelSFX("crash");
crash = true;
hud.planet.car1.gotoAndStop("crashed");
i = 2;
while (i < 7) {
p = particles[i];
particles[i].g = grav;
f = 0.1;
i++;
}
};
setupVehicle = function () {
mcBoard = vC.attachMovie("mcBoard", "mcBoard", 5);
mcBoard._visible = false;
setWFront = 1;
setWRear = 1;
playerSpeed = 40;
topSpeed = 0.2;
};
resetGrav = function () {
var _local1 = 0;
while (_local1 < 2) {
if (particles[_local1].g < (grav * 3)) {
particles[_local1].g = particles[_local1].g + 0.5;
}
if (particles[_local1].g > (grav * 3)) {
particles[_local1].g = grav * 3;
}
_local1++;
}
};
startDudeFall = function () {
dudeFall = true;
dudeFallTime = getTimer();
mcBoard.boarder._visible = false;
fallingDude = vC.attachMovie("mcBoarder", "fallingDude", 100);
fallingDude.gotoAndStop(2);
fallingDude._xscale = 60;
fallingDude._yscale = 60;
dudeParticles = [];
dudeParticles[0] = {x:0, y:0, r:6, w:{w:0}, c:true, g:grav * 2};
dudeParticles[1] = {x:40, y:0, r:6, w:{w:0}, c:true, g:grav * 2};
i = 0;
while (i < dudeParticles.length) {
p = dudeParticles[i];
if (p.r == undefined) {
p.r = 0;
p.w = false;
} else if (p.w != undefined) {
p.w.x = p.r;
p.w.y = 0;
p.w.ox = p.w.x;
p.w.oy = p.w.y;
p.w.rL = p.r;
p.w.s = 0;
}
var _local1 = particles[0].x - particles[0].ox;
var _local2 = particles[0].y - particles[0].oy;
p.x = p.x + aHitspots[0].x;
p.y = p.y + aHitspots[0].y;
p.ox = p.x + (-_local1);
p.oy = p.y;
i++;
}
dudeSprings = [];
dudeSprings[0] = {p0:dudeParticles[0], p1:dudeParticles[1], w0:spring1, w1:spring2};
i = 0;
while (i < dudeSprings.length) {
s = dudeSprings[i];
s.rL = getDistance(s.p0, s.p1);
if (s.c == undefined) {
s.c = 5;
}
i++;
}
};
move = function () {
var _local1 = 0;
if (down(37)) {
lean(-1);
setAnimDude("leanleft");
} else if (down(39)) {
lean(1);
setAnimDude("leanright");
} else {
leanBack();
}
if (down(38)) {
_local1 = _local1 + topSpeed;
if (enginePlaying != true) {
sfxEngine("play");
}
setAnimDude("acc");
} else {
if (enginePlaying == true) {
sfxEngine("stop");
}
setAnimDude("release");
}
if (down(40)) {
_local1 = _local1 - topSpeed;
setAnimDude("brake");
}
i = 0;
while (i < 2) {
p = particles[i];
p.w.s = Math.max(-maxSpeed, Math.min(maxSpeed, p.w.s + _local1));
i++;
}
};
brake = function (wheel) {
var _local1 = wheel.w;
var _local2 = wheel;
_local1.ox = _local1.x;
_local1.oy = _local1.y;
_local2.ox = _local2.x;
_local2.oy = _local2.y;
_local1.s = 0;
};
makeJump = function () {
var _local1 = 0;
while (_local1 < 2) {
particles[_local1].g = particles[_local1].g + 0.2;
if (particles[_local1].g > (grav * 3)) {
particles[_local1].g = grav * 3;
}
_local1++;
}
if (down(32)) {
if (dudeFall != true) {
jumpStep = 7;
if (jumpPossible == true) {
_local1 = 0;
while (_local1 < 2) {
particles[_local1].g = -1.7;
_local1++;
}
}
}
} else {
resetGrav();
}
};
hitTestBounds = function (mc, doelMc) {
if (_root.pause == false) {
var _local2 = mc.getBounds(doelMc);
mc.yMin = _local2.yMin;
mc.yMax = _local2.yMax;
mc.xMax = _local2.xMax;
mc.xMin = _local2.xMin;
}
};
berekenAfstand = function (mc1, mc2) {
if (_root.pause == false) {
var _local3 = mc2._x - mc1._x;
var _local2 = mc2._y - mc1._y;
return(Math.round(Math.sqrt((_local3 * _local3) + (_local2 * _local2))));
}
};
checkTimeUp = function () {
if (_root.pause == false) {
if (timeLeft <= 0) {
finish = true;
attachFlits();
fallingDude._visible = false;
mcBoard._visible = false;
fallingDude._visible = false;
dudeParticles = null;
dudeSprings = null;
attachFinishMessage();
}
}
};
printScores = function () {
if (_root.pause == false) {
if ((finish != true) && (keyPressed == true)) {
var _local2 = totalPoints + " points";
if (_local2 >= 0) {
hud.points.text = _local2;
} else {
hud.points.text = 0;
}
}
}
};
printTime = function () {
if (_root.pause == false) {
hud.timeleft.text = timeLeft + " sec";
}
};
oncePerSec = function () {
if (_root.pause == false) {
medRandom = Math.random();
if (finish != true) {
checkTimeUp();
}
}
};
tenPerSec = function () {
if (_root.pause == false) {
if (finish != true) {
renderSurfaceTiles();
}
printScores();
}
};
onceTwoSec = function () {
};
onceSixSec = function () {
longRandom = Math.random();
};
moveElas = function (mc, doelx, doely, inertia, k) {
if (_root.pause == false) {
mc.move = true;
var _local4 = doelx;
var _local3 = doely;
_local4 = (-mc._x) + _local4;
_local3 = (-mc._y) + _local3;
mc.xElas = (mc.xElas * inertia) + (_local4 * k);
mc.yElas = (mc.yElas * inertia) + (_local3 * k);
mc._x = mc._x + mc.xElas;
mc._y = mc._y + mc.yElas;
if ((Math.abs(mc.xElas) < 0.1) && (Math.abs(mc.yElas) < 0.1)) {
mc.move = false;
}
}
};
attachFlits = function () {
staticMcs.attachMovie("mcFlits", "mcFlits", staticMcs.getNextHighestDepth());
};
returnAPos = function (input, arrayData) {
if (_root.pause == false) {
i = 0;
while (i < arrayData.length) {
if (arrayData[i] == input) {
return(i);
}
i++;
}
return(0);
}
};
resurrectDude = function () {
if (_root.pause == false) {
if (dudeFallTime < (getTimer() - 5000)) {
dudeFallTime = null;
dudeFall = false;
mcBoard.boarder._visible = true;
trace(fallingDude + "fell");
fallingDude.removeMovieClip();
dudeParticles = null;
dudeSprings = null;
NOHIT = 5;
particles[0].y = particles[0].y - 200;
particles[0].oy = particles[0].y;
particles[0].ox = particles[0].x;
particles[1].y = particles[0].y;
particles[1].x = particles[0].x + 80;
particles[1].oy = particles[1].y;
particles[1].ox = particles[1].x;
attachFlits();
render();
}
}
};
attachCheckPointMessage = function () {
if (_root.pause == false) {
if (staticMcs.mcDegreesMessage) {
staticMcs.mcDegreesMessage.removeMovieClip();
}
var _local2 = staticMcs.attachMovie("mcCheckPointMessage", "mcCheckPointMessage", staticMcs.getNextHighestDepth());
_local2._x = sW / 2;
_local2._y = 70;
}
};
attachGem = function (optionHill) {
if (_root.pause == false) {
if (optionHill == true) {
var _local5 = gC.getNextHighestDepth();
var _local2 = 0;
while (_local2 < random(8)) {
var _local6 = random(3) + 1;
var _local3 = _local5 + _local2;
var _local4 = gC.attachMovie("mcGem" + _local6, "gem" + _local3, _local3);
_local4.points = _local6 * 100;
var _local7 = aTerrain.length - 1;
var _local9 = aTerrain[_local7].x1;
var _local8 = aTerrain[_local7].y1;
_local4._xscale = 135;
_local4._yscale = 135;
_local4._x = (_local9 + (120 * (_local2 + 1))) + random(120 * (_local2 + 1));
_local4._y = (_local8 - (140 * (_local2 + 1))) - random(150 * (_local2 + 1));
_local2++;
}
} else {
var _local5 = gC.getNextHighestDepth();
var _local6 = random(3) + 1;
var _local4 = gC.attachMovie("mcGem" + _local6, "gem" + _local5, _local5);
_local4.points = _local6 * 100;
var _local7 = aTerrain.length - 1;
var _local9 = aTerrain[_local7].x1;
var _local8 = aTerrain[_local7].y1;
_local4._xscale = 135;
_local4._yscale = 135;
_local4._x = _local9 + random(60);
_local4._y = (_local8 - 90) - random(160);
}
}
};
attachGemPoints = function (gem) {
if (_root.pause == false) {
var _local3 = sC.getNextHighestDepth();
var _local2 = sC.attachMovie("mcGemPoints", "gemPoints" + _local3, _local3);
_local2._x = gem._x;
_local2._y = gem._y;
_local2.nr.text = gem.points;
}
};
manageGems = function () {
if (_root.pause == false) {
for (var _local3 in gC) {
var _local2 = gC[_local3];
if (dude.upperBody.hitTest(_local2)) {
totalPoints = totalPoints + _local2.points;
attachGemPoints(_local2);
speelSimpelSFX("gem");
_local2.removeMovieClip();
smileCount = 30 + random(40);
}
if (_local2._x < (-xPos)) {
_local2.removeMovieClip();
}
}
}
};
calcJumpRotation = function () {
if (_root.pause == false) {
var _local2 = getAngle(particles[0], particles[1]);
if (_local2 < 0) {
boardRotation = -_local2;
} else {
boardRotation = 360 - _local2;
}
var _local3 = boardRotation - memBoardRotation;
if (Math.abs(_local3) < 100) {
jumpRotation = jumpRotation + _local3;
}
memBoardRotation = boardRotation;
airTime++;
}
};
hitSpot = function () {
if (_root.pause == false) {
hitTestBounds(mcBoard.hitspot, main);
aHitspots[0].x = mcBoard.hitspot.xMin;
aHitspots[0].y = mcBoard.hitspot.yMin;
}
};
attachSnowflake = function () {
var _local4 = background.stars.getNextHighestDepth();
var _local2 = background.stars.attachMovie("mcSter", "mcSter" + _local4, _local4);
_local2._x = (-xPos) + random(sW);
_local2._y = -yPos;
var _local5;
_local2._xscale = 150;
_local2._yscale = 150;
_local2.snowfallspeed = 2 + random(8);
_local2.distance = (_local2.snowfallspeed / 20) + 0.5;
var _local3;
if (_local2.snowfallspeed < 5) {
_local3 = 1;
} else if (_local2.snowfallspeed < 8) {
_local3 = 2;
} else {
_local3 = 3;
}
_local2.gotoAndStop(_local3);
_local2.onEnterFrame = function () {
if (stopScroll != true) {
this._x = this._x + xPosDiff;
this._y = this._y + ((yPosDiff * this.distance) + this.snowfallspeed);
if ((this._x < ((-xPos) - starMargin)) || (this._x > (((-xPos) + sW) + starMargin))) {
this.removeMovieClip();
} else if ((this._y < (-yPos)) || (this._y > ((-yPos) + sH))) {
this.removeMovieClip();
}
}
};
};
setStarBackground = function () {
var _local1 = 0;
while (_local1 < 19) {
attachSnowflake();
_local1++;
}
};
renderBackground = function () {
var _local1 = 0;
for (var _local2 in background.stars) {
_local1++;
}
if (stopScroll != true) {
background.mcBg._x = -xPos;
background.mcBg._y = -yPos;
background.mcBgMountains._x = -xPos;
background.mcBgMountains._y = (-yPos) + sH;
if (_local1 < 18) {
if (_local1 < 14) {
var _local3 = 0.01;
} else {
var _local3 = 0.8;
}
if (Math.random() > _local3) {
attachSnowflake();
}
}
} else {
xPosDiff = 0;
}
};
renderSurfaceTiles = function () {
var _local2 = 0;
for (var _local3 in surfaceTiles) {
_local2++;
}
countTiles--;
if (_local2 < 2) {
var _local12 = aTerrain.length - 1;
var _local5 = aTerrain[_local12];
var _local6 = _local5.x0;
var _local13 = _local5.x1;
var _local9 = _local5.y0;
var _local8 = _local5.y1;
if (countTiles <= 0) {
var _local11 = (-yPos) + sH;
if (_local9 && (_local8 < (_local11 - 100))) {
if (_local6 > ((-xPos) + 270)) {
if ((_local13 - _local6) > 50) {
countTiles = 40 + random(20);
var _local7 = surfaceTiles.getNextHighestDepth();
var _local4 = surfaceTiles.attachMovie("mcSurfaceTile", "surfaceTile" + _local7, _local7);
var _local14 = piste.colors.lineColor;
C = new Color(_local4);
C.setRGB(_local14);
}
var _local10 = (_local9 + _local8) / 2;
_local4._x = _local6;
_local4._y = (_local10 + 140) + random(60);
_local4.onEnterFrame = function () {
if ((this._x + this._width) < (-xPos)) {
if (finish != true) {
this.removeMovieClip();
}
}
};
}
}
}
}
};
playHitGround = function (p, pe) {
if (_root.pause == false) {
var _local2 = Math.abs(pe);
if (_local2 > 50) {
_local2 = 50;
}
if (_local2 > 0) {
_local2 = Math.pow(_local2, 3) / 1000;
if (_local2 > 0.15) {
speelSimpelSFX("hitground", _local2);
}
}
}
};
quitToMainMenu = function () {
_global.inGame = false;
staticMcs.removeMovieClip();
main._parent.gotoAndStop("startmenu");
main.removeMovieClip();
};
renderStartFinish = function () {
var _local2 = planet.omtrek;
if (scenery.finish == undefined) {
if (((-xPos) > (_local2 - 400)) || ((-xPos) < (_local2 - 400))) {
var _local3 = scenery.attachMovie("mcStartFinish", "finish", 0);
_local3.onEnterFrame = function () {
this._x = planet.omtrek;
this._y = aTerrain[aTerrain.length - 1].y1;
};
}
}
};
displayHighscores = function () {
var _local1 = staticMcs.sb;
_local1.gotoAndPlay("submitscore");
};
submitScore = function (passVar) {
var panelMc = staticMcs.finishMessage;
panelMc.gotoAndStop("completed");
panelMc.btn1.gotoAndStop("menu");
panelMc.btn2.gotoAndStop("submit");
panelMc.score.text = "Total score: " + _global.totalScore;
panelMc.btn1.onRelease = function () {
stopSound();
playLoop("menuloop");
quitToMainMenu();
};
panelMc.btn2.onRelease = function () {
panelMc.gotoAndStop("submit");
panelMc.btn1.gotoAndStop("submit");
panelMc.btn1.onRelease = function () {
displayHighscores();
};
stopSound();
playLoop("menuloop");
};
};
listenToAnyKey = function (option) {
var _local1 = staticMcs.finishMessage;
if (Key.isDown(Key.getCode())) {
delete _local1.onEnterFrame;
if (option == "exit") {
stopSound();
playLoop("menuloop");
quitToMainMenu();
} else if (option == "keyhelp") {
staticMcs.startMessage.removeMovieClip();
scoreKeyHelpShowed = true;
attachStartMessage();
} else {
keyPressed = true;
if (scoreGame == true) {
scoreTimer = getTimer();
}
printTime();
hud.exit._visible = true;
staticMcs.startMessage.removeMovieClip();
mcBoard._visible = true;
attachFlits();
speelSimpelSFX("startrace");
}
}
};
attachScoreMessage = function () {
stopSFXLoops();
if (staticMcs.finishMessage == undefined) {
((raceWon == true) ? (speelSimpelSFX("finish")) : (speelSimpelSFX("lost")));
staticMcs.crashMessage.removeMovieClip();
var _local3 = staticMcs.attachMovie("finishMessage", "finishMessage", staticMcs.getNextHighestDepth());
_local3.pressanykey._visible = false;
if (raceWon == true) {
_local3.gotoAndStop("summary");
var _local8 = 1000 * _global.scoreGameProgress;
var finishTimer = getTimer();
var _local11 = finishTimer - scoreTimer;
var _local5 = Math.round((60000 - _local11) / 10);
if (_local5 < 0) {
_local5 = 0;
}
var _local10 = damage + (wheelDamage / 4);
var _local4 = Math.round((100 - _local10) * 10);
if (_local4 < 0) {
_local4 = 0;
}
var _local6 = (_local5 + _local4) + _local8;
var _local9 = _global.game.diffLevel;
var _local7 = Math.round(_local6 * _local9);
_local3.score.text = _local8;
_local3.damage.text = _local4;
_local3.time.text = _local5;
_local3.total.text = _local6;
_local3.difficulty.text = "* " + _local9;
_local3.addscore.text = _local7;
_global.totalScore = _global.totalScore + _local7;
_local3.totalscore.text = _global.totalScore;
_local3.onEnterFrame = function () {
this.finishTimer++;
if (this.finishTimer > 30) {
this.pressanykey._visible = true;
listenToAnyKey("scoregame", this);
}
moveElas(this, this._x, 100, 0.4, 0.2);
};
} else {
_local3.gotoAndStop("gameover");
_local3.onEnterFrame = function () {
this.finishTimer++;
if (this.finishTimer > 30) {
this.pressanykey._visible = true;
listenToAnyKey("exit", this);
}
moveElas(this, this._x, 100, 0.4, 0.2);
};
}
_local3._x = sW / 2;
_local3._y = -1000;
_local3.xElas = 0;
_local3.yElas = 0;
_local3.finishTimer = 0;
}
};
attachFinishMessage = function () {
if (_root.pause == false) {
if (staticMcs.finishMessage == undefined) {
var m = staticMcs.attachMovie("finishMessage", "finishMessage", staticMcs.getNextHighestDepth());
m.gotoAndStop("timeup");
m.score.text = ("total score: " + totalPoints) + " points";
m._x = sW / 2;
m._y = -1000;
m.xElas = 0;
m.yElas = 0;
m.onEnterFrame = function () {
moveElas(this, this._x, 90, 0.4, 0.2);
};
m.btn1.gotoAndStop("menu");
m.btn2.gotoAndStop("submit");
m.btn1.onRelease = function () {
quitToMainMenu();
};
m.btn2.onRelease = function () {
m.gotoAndStop("submit");
m.btn1.gotoAndStop("submit");
m.btn1.onRelease = function () {
displayHighscores();
};
};
}
}
};
attachStartMessage = function () {
if (staticMcs.startMessage == undefined) {
if (scoreGame == true) {
var m = staticMcs.attachMovie("startMessage", "startMessage", staticMcs.getNextHighestDepth());
if (scoreKeyHelpShowed != true) {
m.gotoAndStop("keyhelp");
m._x = sW / 2;
m._y = -1000;
m.xElas = 0;
m.yElas = 0;
m.finishTimer = 0;
m.onEnterFrame = function () {
this.finishTimer++;
moveElas(this, this._x, 90, 0.4, 0.2);
if (this.finishTimer > 10) {
listenToAnyKey("keyhelp", this);
}
};
} else {
m.gotoAndStop("tips");
m.pressanykey._visible = false;
m._x = sW / 2;
m._y = -1000;
m.xElas = 0;
m.yElas = 0;
m.finishTimer = 0;
m.onEnterFrame = function () {
this.finishTimer++;
moveElas(this, this._x, 90, 0.4, 0.2);
if (this.finishTimer > 30) {
listenToAnyKey(null, this);
m.pressanykey._visible = true;
}
};
}
}
}
};
stopSFXLoops = function () {
sfx_engine.stop();
sfx_afterburner.stop();
};
clearIntervals = function () {
clearInterval(opponentWaitInt);
clearInterval(oncePerSecInt);
clearInterval(onceSixSecInt);
clearInterval(tenPerSecInt);
};
initHitspot = function () {
aHitspots = [];
aHitspots[0] = {x:0, y:0, r:0, w:false, c:true};
};
init = function () {
_root.pause = false;
travelDistance = 0;
NOHIT = 0;
checkPlus = 0;
ticks = 0;
sW = 550;
sH = 400;
timeLeft = 30;
totalPoints = 0;
mute = false;
mH = 500;
mW = 2000;
initAllParts();
down = Key.isDown;
initX = 300;
initY = 230;
memXPos = 0;
memYPos = 0;
drag = 0.9999999;
setMaxSpeed = 21;
maxSpeed = setMaxSpeed;
setRiderPower = 0.6;
riderPower = setRiderPower;
spring1 = 0.155;
spring2 = 0.155;
starMargin = 100;
terrainStep = 0;
xPosDiff = 0;
yPosDiff = 0;
xPos = 0;
yPos = 0;
crash = false;
finish = false;
oppFinish = false;
oppXPos = 0;
flatTerrain = null;
stopScroll = null;
finish = null;
raceWon = null;
overStart = false;
oppOverStart = false;
telrun = 0;
telLong = 0;
oppSpeed = 0;
oppGear = 0;
countOS = 0;
stopScroll = false;
countTiles = 0;
raceWon = null;
keyPressed = false;
oSstap = null;
oSstap2Taken = null;
Key.removeListener(_global.LuisterToets);
delete _global.LuisterToets;
damageScale = 0;
damage = 0;
wheelDamage = 0;
afterburnerPlaying = null;
enginePlaying = null;
engineStep = 0;
oppBurner = false;
oppCrashed = false;
firstOppCalc = false;
hitGroundCounter = 0;
dispBuilding = null;
currentEngine = 1;
AISpeed = null;
playerSpeed = null;
cashPaid = false;
carLost = false;
fillColor = piste.colors.fillColor;
lineColor = piste.colors.lineColor;
jumpRotation = 0;
boardRotation = 0;
memBoardRotation = 0;
memAirTime = 0;
airTime = null;
dudeFall = false;
jumpStep = 0;
smileCount = 0;
countTime = 30;
};
attachHud = function () {
hud = staticMcs.attachMovie("mcHud", "mcHud", 0);
hud.damage.bar._xscale = 0;
if (scoreGame == true) {
hud.amount.text = " ";
} else {
var _local2;
if (_global.currentAmount == 2) {
_local2 = "car";
} else if (_global.currentAmount == 4) {
_local2 = "crown";
} else {
_local2 = "$ " + _global.currentAmount;
}
hud.amount.text = _local2;
}
hud.exit._visible = false;
hud.planet.car1.gotoAndStop("rechts");
hud.planet.car2.gotoAndStop("links");
hud.exit.onRelease = function () {
if ((keyPressed == true) && (finish != true)) {
stopSound();
playLoop("menuloop");
quitToMainMenu();
}
};
};
initPiste = function () {
initPistes();
setF = 0.006;
f = setF;
var _local2 = _global.currentPiste;
aColors = {fillColor:"0xFBFBFF", lineColor:"0xCECEFF"};
piste = {omtrek:aPistes[_local2].size, colors:aColors, diff:aPistes[_local2].diff, surface:aPistes[_local2].surface};
grav = 0.122;
};
initPistes = function () {
var _local5 = "Not many dare to race on this planet.";
var _local4 = "This is not for rookies.";
var _local3 = "Reputations are built on this planet.";
var _local2 = "Be carefull on those hills.";
var _local1 = "Become King to set a high score.";
aPistes = [];
aPistes[1] = {surface:98, gravity:0.21, size:188000, diff:0.66, description:_local5};
aPistes[2] = {surface:66, gravity:0.19, size:1114000, diff:0.8, description:_local4};
aPistes[3] = {surface:54, gravity:0.24, size:118000, diff:0.91, description:_local3};
aPistes[4] = {surface:76, gravity:0.28, size:1110000, diff:0.81, description:_local2};
aPistes[5] = {surface:82, gravity:0.24, size:1130000, diff:0.65, description:_local1};
};
attachBg = function () {
background.createEmptyMovieClip("stars", 2);
background.attachMovie("mcBgMountains", "mcBgMountains", 1);
var _local1 = background.attachMovie("mcBg", "mcBg", 0);
_local1._width = sW;
};
initControlCenter = function (action) {
if (action == "highscore_game") {
cC.gotoAndStop("highscore_game");
cC.btn1.gotoAndStop("race");
cC.btn2.gotoAndStop("back");
cC.btn1.onRelease = function () {
root.gotoAndStop("starthighscoregame");
};
cC.btn2.onRelease = function () {
initControlCenter("select_new_game");
};
} else if (action == "new_game") {
cC.gotoAndStop("new_game");
cC.btn1.gotoAndStop("back");
cC.btn2.gotoAndStop("proceed");
cC.btn2.onRelease = function () {
if (((cC.name.text != null) && (cC.name.text != "")) && (cC.name.text != " ")) {
newGameName = cC.name.text;
initControlCenter("difficulty");
}
};
cC.btn1.onRelease = function () {
initControlCenter("select_new_game");
};
} else if (action == "mainmenu") {
cC.gotoAndStop("mainmenu");
cC.button_3.onRelease = function () {
trace("START RACE");
initControlCenter("start_race");
};
} else if (action == "select_planet") {
initPlanets();
cC.gotoAndStop("select_planet");
if (cC.image.planet5._visible == true) {
var _local6 = cC.image.planet5;
_local6.onRelease = function () {
clickOkTravel(5, 1, 100000);
};
_local6.onRollOver = function () {
var _local3 = cC.attachMovie("mcPlanetText", "mcPlanetText", cC.getNextHighestDepth());
_local3.gotoAndStop("king");
var _local4 = 5;
_local3._y = _root._ymouse - (_local3._height / 2);
_local3._x = _root._xmouse;
_local3.onEnterFrame = function () {
this._y = _root._ymouse - (this._height / 2);
this._x = _root._xmouse;
};
};
_local6.onRollOut = function () {
cC.mcPlanetText.removeMovieClip();
};
_local6.onReleaseOutside = function () {
cC.mcPlanetText.removeMovieClip();
};
}
var _local7 = 1;
while (_local7 < 5) {
var _local6 = cC.image["planet" + _local7];
_local6.onRelease = function () {
var _local3 = int(this._name.split("planet")[1]);
var _local5 = _global.game.planetOpponents[_local3];
var _local4 = aPlanets[_local3].travel_cost;
clickOkTravel(_local3, _local5, _local4);
};
_local6.onRollOver = function () {
var _local4 = cC.attachMovie("mcPlanetText", "mcPlanetText", cC.getNextHighestDepth());
var _local5 = this._name.split("planet")[1];
_local4.size.text = planetDescriptions("size", aPlanets[_local5].size);
_local4.surface.text = planetDescriptions("surface", aPlanets[_local5].surface);
_local4.gravity.text = planetDescriptions("gravity", aPlanets[_local5].gravity);
_local4.travelcost.text = aPlanets[_local5].travel_cost;
_local4.opponents.text = _global.game.planetOpponents[_local5];
if (_local5 == 2) {
_local4._y = _root._ymouse;
_local4._x = _root._xmouse - _local4._width;
_local4.onEnterFrame = function () {
this._y = _root._ymouse;
this._x = _root._xmouse - this._width;
};
} else if (_local5 == 4) {
_local4._y = _root._ymouse - _local4._height;
_local4._x = _root._xmouse - _local4._width;
_local4.onEnterFrame = function () {
this._y = _root._ymouse - this._height;
this._x = _root._xmouse - this._width;
};
} else {
_local4._y = _root._ymouse - _local4._height;
_local4._x = _root._xmouse;
_local4.onEnterFrame = function () {
this._y = _root._ymouse - this._height;
this._x = _root._xmouse;
};
}
};
_local6.onRollOut = function () {
cC.mcPlanetText.removeMovieClip();
};
_local6.onReleaseOutside = function () {
cC.mcPlanetText.removeMovieClip();
};
_local7++;
}
cC.btn1.gotoAndStop("back");
cC.btn1.onRelease = function () {
var _local2 = 1;
while (_local2 < 6) {
var _local1 = cC.image["planet" + _local2];
delete _local1.onRelease;
delete _local1.onRollOver;
delete _local1.onReleaseOutside;
delete _local1.onRollOut;
_local2++;
}
initControlCenter("garage");
speelSimpelSFX("garage");
};
} else if (action == "start_race") {
root.gotoAndStop("starthighscoregame");
}
};
startControlCenter = function (mc, optieIngame, optieShopRefill) {
root = mc;
cC = mc.attachMovie("mcControlCenter", "mcControlCenter", 0);
if (optieIngame == "highScore") {
initControlCenter("highscore_game");
} else {
initControlCenter("mainmenu");
}
};
stuurMc = function (mc, doelX, doelY, acc, optie) {
delete mc.onEnterFrame;
mc.onEnterFrame = function () {
verschil = Math.abs(mc._x - doelX);
posX = mc._x;
posY = mc._y;
if (doelX > mc._x) {
mc._x = mc._x + (((doelX - posX) / acc) + 0.1);
}
if (doelX < mc._x) {
mc._x = mc._x + ((0.1 + ((doelX - posX) / acc)) - 0.1);
}
if (doelY > mc._y) {
mc._y = mc._y + (((doelY - posY) / acc) + 0.1);
}
if (doelY < mc._y) {
mc._y = mc._y + (((doelY - posY) / acc) - 0.1);
}
if ((Math.round(mc._x) == Math.round(doelX)) && (Math.round(mc._y) == Math.round(doelY))) {
delete mc.onEnterFrame;
if (optie == "mainmenu") {
initControlCenter("mainmenu");
} else {
initControlCenter("garage");
}
}
};
};
initSounds = function (mc) {
_global.sound = mc.createEmptyMovieClip("soundContainer", 2);
_global.sound.createEmptyMovieClip("sfx", 0);
_global.sound.createEmptyMovieClip("low", 1);
_global.sound.createEmptyMovieClip("engine_mc", 2);
_global.sound.createEmptyMovieClip("hitground", 3);
_global.sound.createEmptyMovieClip("gems", 4);
initSFX();
};
initSFX = function () {
sfx_checkpoint = new Sound(_global.sound.sfx);
sfx_checkpoint.attachSound("checkpoint");
sfx_startrace = new Sound(_global.sound.sfx);
sfx_startrace.attachSound("startrace");
sfx_hitground = new Sound(_global.sound.hitground);
sfx_hitground.attachSound("hitground");
sfx_gem = new Sound(_global.sound.gems);
sfx_gem.attachSound("powerup");
};
randomSFX = function () {
if (shortRandom > 0.8) {
omgeving_bird.start();
}
};
soundCounters = function () {
hitGroundCounter--;
};
speelSimpelSFX = function (naam, passVar) {
switch (naam) {
case "startrace" :
sfx_startrace.start();
break;
case "sfx_checkpoint" :
sfx_checkpoint.start();
break;
case "hitground" :
if (hitGroundCounter <= 0) {
hitGroundCounter = 6;
var _local1 = 70 * passVar;
if (_local1 > 100) {
_local1 = 100;
}
sfx_hitground.start();
}
break;
case "hitroof" :
if (hitGroundCounter <= 0) {
hitGroundCounter = 5;
var _local1 = 100 * (passVar * 4);
if (_local1 > 100) {
_local1 = 100;
}
sfx_hitroof.setVolume(_local1);
sfx_hitroof.start();
}
break;
case "gem" :
sfx_gem.start();
}
};
manageSoundFx = function (naam, difOptie) {
switch (naam) {
case "schild" :
schild_commander.start();
break;
case "mini_attack" :
if (mini_aanval.counter <= 0) {
mini_aanval.counter = 3;
var _local1 = random(aAanvalVoices.length - 1);
mini_aanval.attachSound(aAanvalVoices[_local1]);
mini_aanval.start();
}
break;
case "sfx_raathit" :
if (aCounters["raat" + difOptie] >= getTimer()) {
break;
}
aCounters["raat" + difOptie] = getTimer() + 2000;
sfx_raathit.start();
sfx_raathit2.start();
}
};
stopSound = function () {
music.stop();
delete music;
};
StopSaraySounds = function () {
sfx_checkpoint.setVolume(0);
sfx_startrace.setVolume(0);
sfx_hitground.setVolume(0);
sfx_gem.setVolume(0);
};
onSaraySounds = function () {
sfx_checkpoint.setVolume(40);
sfx_startrace.setVolume(40);
sfx_hitground.setVolume(100);
sfx_gem.setVolume(40);
};
setAirFriction = function () {
if (_root.pause == false) {
var _local2 = (bend - minBend) / bendReach;
bendFactor = 0.75 + (_local2 / 4);
maxSpeed = setMaxSpeed * bendFactor;
f = setF * (1 - (_local2 / 4));
riderPower = setRiderPower * bendFactor;
}
};
initBoarder = function () {
dude = mcBoard.boarder;
bend = 28;
minBend = 28;
maxBend = 73;
bendReach = maxBend - minBend;
avgBend = 48;
startRot = -90;
bodyKneeRot = 0;
leanRot = 0;
maxLeanRot = 37;
(knee_t = 0);
(knee_a = 1);
(knee_T = 1);
(knee_w = 2.0943951023932);
(boarder = []);
boarder.head = {x:dude.upperBody.head._x, y:dude.upperBody.head._y, t:0, a:1.8, T:1, w:2.0943951023932, bPosDiff:dude.upperBody.body._y - dude.upperBody.head._y};
boarder.body = {x:dude.upperBody.body._x, y:dude.upperBody.body._y, mc:dude.upperBody.body, t:0, a:3.2, T:4, w:2.0943951023932, bPos:dude.upperBody.body._y};
boarder.leftarm = {x:dude.upperBody.leftarm._x, y:dude.upperBody.leftarm._y};
boarder.rightarm = {x:dude.upperBody.rightarm._x, y:dude.upperBody.rightarm._y};
boarder.leftLegUpper = {x:dude.upperBody.body._x - 2, y:dude.upperBody.body._y + 4};
boarder.rightLegUpper = {x:dude.upperBody.body._x + 2, y:dude.upperBody.body._y + 4};
boarder.leftLegUpper = {x:dude.upperBody.body._x - 2, y:dude.upperBody.body._y + 4};
boarder.rightLegUpper = {x:dude.upperBody.body._x + 2, y:dude.upperBody.body._y + 4};
boarder.rightleg = {x:dude.rightleg._x, y:dude.rightleg._y};
};
animateLegs = function (upperLeg, lowerLeg) {
var _local2 = 20;
var _local1 = lowerLeg;
var _local3 = upperLeg;
var _local4 = _local1._rotation * (Math.PI/180);
var _local7 = (_local1._x + (Math.cos(_local4) * _local2)) - _local1._x;
var _local6 = (_local1._y + (Math.sin(_local4) * _local2)) - _local1._y;
var _local5 = Math.atan2(_local6, _local7);
_local3._x = _local1._x + (Math.cos(_local5) * _local2);
_local3._y = _local1._y + (Math.sin(_local5) * _local2);
_local3._rotation = -90 + (-90 - _local1._rotation);
};
calcBodyPos = function () {
var _local1 = 20;
var _local2 = dude.rightLegUpper;
var _local3 = dude.leftLegUpper;
var _local4 = _local2._rotation * (Math.PI/180);
var _local10 = (_local2._x + (Math.cos(_local4) * _local1)) - _local2._x;
var _local9 = (_local2._y + (Math.sin(_local4) * _local1)) - _local2._y;
var _local5 = Math.atan2(_local9, _local10);
var _local12 = _local2._x + (Math.cos(_local5) * _local1);
var _local11 = _local2._y + (Math.sin(_local5) * _local1);
_local4 = _local3._rotation * (Math.PI/180);
var _local15 = (_local3._x + (Math.cos(_local4) * _local1)) - _local3._x;
var _local13 = (_local3._y + (Math.sin(_local4) * _local1)) - _local3._y;
_local5 = Math.atan2(_local13, _local15);
var _local7 = _local3._x + (Math.cos(_local5) * _local1);
var _local6 = _local3._y + (Math.sin(_local5) * _local1);
var _local16 = (_local12 + _local7) / 2;
var _local14 = (_local11 + _local6) / 2;
var _local8 = {x:_local16, y:_local14};
return(_local8);
};
manageBendKnees = function () {
var _local2 = knee_a * Math.sin(knee_w * knee_t);
knee_t = knee_t + 0.0833333333333333;
var _local1 = bend + _local2;
dude.leftLegLower._rotation = startRot + _local1;
dude.rightLegLower._rotation = startRot + _local1;
bodyKneeRot = _local1 / 2;
};
leanBack = function () {
leanRot = leanRot + ((-leanRot) / 6);
};
setAnimDude = function (diff, passvar) {
if (diff == "acc") {
if (bend < avgBend) {
bend = bend + 4;
} else if (bend > avgBend) {
bend = bend - 1;
}
} else if (diff == "brake") {
bend = bend - 4;
} else if (diff == "release") {
bend = bend - 0.8;
} else if (diff == "hitground") {
var _local2 = Math.abs(passvar) * 7;
if (bend < _local2) {
bend = _local2;
}
} else if (diff == "leanleft") {
leanRot = leanRot + (((-maxLeanRot) - leanRot) / 8);
} else if (diff == "leanright") {
leanRot = leanRot + ((maxLeanRot - leanRot) / 8);
}
if (bend < minBend) {
bend = minBend;
} else if (bend > maxBend) {
bend = maxBend;
}
};
animateDude = function () {
if (smileCount > 0) {
smileCount--;
dude.upperBody.head.smile.gotoAndStop(2);
} else {
dude.upperBody.head.smile.gotoAndStop(1);
}
manageBendKnees();
if (jumpStep > 0) {
bend = maxBend - (jumpStep * 6);
jumpStep--;
}
dude.upperBody._rotation = leanRot + (bodyKneeRot * 1.3);
dude.upperBody.head._rotation = -bodyKneeRot;
var _local3 = calcBodyPos();
var _local2 = boarder.body;
_local2.y = (_local3.y - dude.upperBody._y) + (_local2.a * Math.sin(_local2.w * _local2.t));
_local2.t = _local2.t + 0.0588235294117647;
var _local1 = boarder.head;
_local1.y = (_local2.y - _local1.bPosDiff) + (_local1.a * Math.sin(_local1.w * _local1.t));
_local1.t = _local1.t + 0.0833333333333333;
leftShoePart._x = boarder.leftLeg.x;
rightShoePart._x = boarder.rightLeg.x;
animateLegs(dude.leftLegUpper, dude.leftLegLower);
animateLegs(dude.rightLegUpper, dude.rightLegLower);
dude.upperBody.head._x = boarder.head.x;
dude.upperBody.head._y = boarder.head.y;
dude.upperBody.body._x = boarder.body.x;
dude.upperBody.body._y = boarder.body.y;
dude.upperBody.leftarm._y = boarder.body.y - 23;
dude.upperBody.rightarm._y = boarder.body.y - 23;
};
Frame 171
initSounds(this);
Frame 172
stop();
this.staticMcs.removeMovieClip();
startControlCenter(this);
Frame 173
stop();
startGame();
Frame 174
stop();
var listener = new Object();
listener.onKeyUp = function () {
var _local1 = Key.getCode();
if (_local1 == 80) {
if (paused == false) {
paused = true;
} else {
paused = false;
}
}
};
Key.addListener(listener);
startGame();
Frame 175
_root.locatie = _url;
if (_root.locatie.indexOf("freeonlinegames.com", 0) != -1) {
_root.play();
} else {
_root.gotoAndPlay("loop1");
}
Frame 176
Frame 177
_root.menu.removeMovieClip();
_root.gameid = "Snow Board";
_root.best = _global.totalScore;
_global.totalScore = 0;
_root.updated = 0;
_root.done = 0;
done = 0;
i = 1;
while (i <= 100) {
_root["score" + i] = null;
_root["name" + i] = null;
_root["escore" + i] = null;
_root["ename" + i] = null;
i++;
}
Frame 179
cale = "http://www.freeonlinegames.com/scoreboard/score.php?game=" + _root.gameid;
loadVariablesNum (cale, 0, "POST");
Frame 187
if (done != 1) {
gotoAndPlay ("loopLoad");
} else {
gotoAndPlay ("scoreTable");
}
Frame 191
monthnume = new Array();
monthscor = new Array();
i = 1;
while (i <= 100) {
monthnume[i] = _root["name" + i];
monthscor[i] = Number(_root["score" + i].slice(0, _root["score" + i].length - 1));
i++;
}
evernume = new Array();
everscor = new Array();
i = 1;
while (i <= 100) {
evernume[i] = _root["ename" + i];
everscor[i] = Number(_root["escore" + i].slice(0, _root["escore" + i].length - 1));
i++;
}
Frame 192
stop();
if (_root.best > everscor[100]) {
scoreWind.gotoAndStop("submitScoreYes");
} else {
scoreWind.gotoAndStop("submitScoreNo");
}
if (_root.xdada == 1) {
scoreWind.gotoAndStop("topEver");
}
Symbol 10 MovieClip Frame 1
stop();
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onReleaseOutside = function () {
this.gotoAndStop(1);
};
Symbol 16 Button
on (press, keyPress "p") {
if (_root.pause == false) {
stopAllSounds();
_root.pause = true;
gotoAndStop (2);
_root.mute = true;
_root.StopSaraySounds();
paused = "Game Paused";
trace("Paused");
} else {
_root.pause = false;
_root.onSaraySounds();
gotoAndStop (1);
_root.mute = false;
paused = " ";
}
}
on (keyPress "s") {
if (_root.mute == false) {
_root.mute = true;
_root.StopSaraySounds();
paused = "Mute";
} else {
_root.onSaraySounds();
_root.mute = false;
paused = " ";
}
}
Symbol 24 Button
on (release) {
targetul3 = "http://www.freegamesforyourwebsite.com/?downhilljumps";
getURL (targetul3, "_blank");
}
Symbol 25 Button
on (release) {
getURL ("http://www.freeonlinegames.com/?downhilljumps", "_blank");
}
Symbol 26 Button
on (release) {
_root.gotoAndPlay(170);
}
Symbol 27 Button
on (press, keyPress "p") {
if (_root.pause == false) {
stopAllSounds();
_root.pause = true;
gotoAndStop (2);
_root.mute = true;
_root.StopSaraySounds();
paused = "Game Paused";
trace("Paused");
} else {
_root.pause = false;
_root.onSaraySounds();
gotoAndStop (1);
_root.mute = false;
paused = " ";
}
}
Symbol 28 Button
on (release) {
if (_root.mute == false) {
gotoAndStop (2);
_root.mute = true;
_root.StopSaraySounds();
} else {
_root.onSaraySounds();
gotoAndStop (1);
_root.mute = false;
paused = " ";
}
}
Symbol 29 Button
on (release) {
getURL ("http://www.freeonlinegames.com/downloads/downhilljumps.exe");
}
Symbol 37 MovieClip Frame 1
stop();
Symbol 38 MovieClip [mcHud] Frame 1
stop();
Symbol 38 MovieClip [mcHud] Frame 2
stop();
Symbol 280 MovieClip [mcFlits] Frame 1
this.onEnterFrame = function () {
this._alpha = this._alpha - 15;
if (this._alpha <= 0) {
this.removeMovieClip();
}
};
Symbol 289 MovieClip [mcSter] Frame 1
stop();
Symbol 295 MovieClip Frame 1
this.sW = 550;
this.sH = 400;
attachMenuFlake = function (mc, optionStart) {
var _local5 = mc.getNextHighestDepth();
var _local2 = mc.attachMovie("mcSter", "mcSter" + _local5, _local5);
_local2._x = random(mc.sW);
_local2._xscale = 150;
_local2._yscale = 150;
if (optionStart == true) {
_local2._y = random(mc.sH);
} else {
_local2._y = 0;
}
_local2.snowfallspeed = 2 + random(8);
_local2.distance = (_local2.snowfallspeed / 20) + 0.5;
var _local3;
if (_local2.snowfallspeed < 5) {
_local3 = 1;
} else if (_local2.snowfallspeed < 8) {
_local3 = 2;
} else {
_local3 = 3;
}
_local2.gotoAndStop(_local3);
_local2.onEnterFrame = function () {
this._x = this._x + 0;
this._y = this._y + this.snowfallspeed;
if ((this._x < 0) || (this._x > this._parent.sW)) {
this.removeMovieClip();
} else if ((this._y < 0) || (this._y > this._parent.sH)) {
this.removeMovieClip();
}
};
};
var i = 0;
while (i < 29) {
attachMenuFlake(this, true);
i++;
}
this.onEnterFrame = function () {
var _local2 = 0;
for (var _local3 in this) {
_local2++;
}
if (_local2 < 28) {
if (Math.random() > 0.7) {
attachMenuFlake(this);
}
}
};
Symbol 299 Button
on (release) {
targetul3 = "http://www.freegamesforyourwebsite.com/?downhilljumps";
getURL (targetul3, "_blank");
}
on (rollOver) {
slider.yMove = button_4._y;
}
Symbol 303 MovieClip Frame 1
Symbol 304 Button
on (release) {
targetul2 = "http://www.freeonlinegames.com/?downhilljumps";
getURL (targetul2, "_blank");
}
on (rollOver) {
slider.yMove = button_2._y;
}
Symbol 306 Button
on (rollOver) {
slider.yMove = button_1._y;
}
on (press) {
getURL ("http://www.freeonlinegames.com/downloads/downhilljumps.exe");
}
Symbol 309 MovieClip Frame 1
stop();
Symbol 312 Button
on (press) {
getURL ("http://www.freeonlinegames.com/?downhilljumps", "_blank");
}
Symbol 314 Button
on (press) {
initControlCenter("start_race");
}
on (rollOver) {
slider.yMove = button_3._y;
}
Symbol 315 MovieClip [mcControlCenter] Frame 1
easeSpeed = 5;
slider_mc.onEnterFrame = function () {
this._y = this._y + ((yMove1 - this._y) / easeSpeed);
};
button_1.onPress = function () {
yMove = button_1._y;
};
button_2.onPress = function () {
yMove = button_2._y;
};
button_3.onPress = function () {
yMove = button_3._y;
};
button_4.onPress = function () {
yMove = button_4._y;
};
Selection.setFocus("name");
Instance of Symbol 303 MovieClip "slider" in Symbol 315 MovieClip [mcControlCenter] Frame 1
onClipEvent (load) {
yMove = _y;
easeSpeed = 5;
}
onClipEvent (enterFrame) {
_y = (_y + ((yMove - _y) / easeSpeed));
}
Symbol 320 MovieClip [mcSurfaceTile] Frame 1
this.gotoAndStop(random(4) + 1);
Symbol 321 Button
on (release) {
getURL ("http://www.freegamesforyourwebsite.com/?downhilljumps", "_blank");
}
Symbol 322 Button
on (release) {
getURL ("http://www.freeonlinegames.com/?downhilljumps", "_blank");
}
Symbol 323 Button
on (press) {
getURL ("http://www.freeonlinegames.com/downloads/downhilljumps.exe");
}
Symbol 325 Button
on (press) {
_root.gotoAndPlay(170);
}
Symbol 330 MovieClip Frame 1
scroll1.setScrollProperties(130, 0, 220);
this.chHand1 = function () {
scoresScroll._y = -(scroll1.getScrollPosition() * 2);
};
scroll1.setChangeHandler("chHand1");
i = 1;
while (i <= 30) {
scoresScroll["n" + i].text = _root.monthnume[i];
scoresScroll["s" + i].text = _root.monthscor[i];
i++;
}
Symbol 338 Button
on (release) {
_root.gotoAndStop("coperta");
}
Symbol 645 MovieClip Frame 1
var component = _parent;
component.registerSkinElement(track_mc, "scrollTrack");
Symbol 646 MovieClip [FScrollBarSymbol] Frame 1
#initclip 2
FScrollBarClass = function () {
if (this._height == 4) {
return(undefined);
}
this.init();
this.minPos = (this.maxPos = (this.pageSize = (this.largeScroll = 0)));
this.smallScroll = 1;
this.width = (this.horizontal ? (this._width) : (this._height));
this._xscale = (this._yscale = 100);
this.setScrollPosition(0);
this.tabEnabled = false;
if (this._targetInstanceName.length > 0) {
this.setScrollTarget(this._parent[this._targetInstanceName]);
}
this.tabChildren = false;
this.setSize(this.width);
};
FScrollBarClass.prototype = new FUIComponentClass();
FScrollBarClass.prototype.setHorizontal = function (flag) {
if (this.horizontal && (!flag)) {
this._xscale = 100;
this._rotation = 0;
} else if (flag && (!this.horizontal)) {
this._xscale = -100;
this._rotation = -90;
}
this.horizontal = flag;
};
FScrollBarClass.prototype.setScrollProperties = function (pSize, mnPos, mxPos) {
if (!this.enable) {
return(undefined);
}
this.pageSize = pSize;
this.minPos = Math.max(mnPos, 0);
this.maxPos = Math.max(mxPos, 0);
this.scrollPosition = Math.max(this.minPos, this.scrollPosition);
this.scrollPosition = Math.min(this.maxPos, this.scrollPosition);
if ((this.maxPos - this.minPos) <= 0) {
this.scrollThumb_mc.removeMovieClip();
this.upArrow_mc.gotoAndStop(3);
this.downArrow_mc.gotoAndStop(3);
this.downArrow_mc.onPress = (this.downArrow_mc.onRelease = (this.downArrow_mc.onDragOut = null));
this.upArrow_mc.onPress = (this.upArrow_mc.onRelease = (this.upArrow_mc.onDragOut = null));
this.scrollTrack_mc.onPress = (this.scrollTrack_mc.onRelease = null);
this.scrollTrack_mc.onDragOut = (this.scrollTrack_mc.onRollOut = null);
this.scrollTrack_mc.useHandCursor = false;
} else {
var _local2 = this.getScrollPosition();
this.upArrow_mc.gotoAndStop(1);
this.downArrow_mc.gotoAndStop(1);
this.upArrow_mc.onPress = (this.upArrow_mc.onDragOver = this.startUpScroller);
this.upArrow_mc.onRelease = (this.upArrow_mc.onDragOut = this.stopScrolling);
this.downArrow_mc.onPress = (this.downArrow_mc.onDragOver = this.startDownScroller);
this.downArrow_mc.onRelease = (this.downArrow_mc.onDragOut = this.stopScrolling);
this.scrollTrack_mc.onPress = (this.scrollTrack_mc.onDragOver = this.startTrackScroller);
this.scrollTrack_mc.onRelease = this.stopScrolling;
this.scrollTrack_mc.onDragOut = this.stopScrolling;
this.scrollTrack_mc.onRollOut = this.stopScrolling;
this.scrollTrack_mc.useHandCursor = false;
this.attachMovie("ScrollThumb", "scrollThumb_mc", 3);
this.scrollThumb_mc._x = 0;
this.scrollThumb_mc._y = this.upArrow_mc._height;
this.scrollThumb_mc.onPress = this.startDragThumb;
this.scrollThumb_mc.controller = this;
this.scrollThumb_mc.onRelease = (this.scrollThumb_mc.onReleaseOutside = this.stopDragThumb);
this.scrollThumb_mc.useHandCursor = false;
this.thumbHeight = (this.pageSize / ((this.maxPos - this.minPos) + this.pageSize)) * this.trackSize;
this.thumbMid_mc = this.scrollThumb_mc.mc_sliderMid;
this.thumbTop_mc = this.scrollThumb_mc.mc_sliderTop;
this.thumbBot_mc = this.scrollThumb_mc.mc_sliderBot;
this.thumbHeight = Math.max(this.thumbHeight, 6);
this.midHeight = (this.thumbHeight - this.thumbTop_mc._height) - this.thumbBot_mc._height;
this.thumbMid_mc._yScale = (this.midHeight * 100) / this.thumbMid_mc._height;
this.thumbMid_mc._y = this.thumbTop_mc._height;
this.thumbBot_mc._y = this.thumbTop_mc._height + this.midHeight;
this.scrollTop = this.scrollThumb_mc._y;
this.trackHeight = this.trackSize - this.thumbHeight;
this.scrollBot = this.trackHeight + this.scrollTop;
_local2 = Math.min(_local2, this.maxPos);
this.setScrollPosition(Math.max(_local2, this.minPos));
}
};
FScrollBarClass.prototype.getScrollPosition = function () {
return(this.scrollPosition);
};
FScrollBarClass.prototype.setScrollPosition = function (pos) {
this.scrollPosition = pos;
if (this.scrollThumb_mc != undefined) {
pos = Math.min(pos, this.maxPos);
pos = Math.max(pos, this.minPos);
}
this.scrollThumb_mc._y = (((pos - this.minPos) * this.trackHeight) / (this.maxPos - this.minPos)) + this.scrollTop;
this.executeCallBack();
};
FScrollBarClass.prototype.setLargeScroll = function (lScroll) {
this.largeScroll = lScroll;
};
FScrollBarClass.prototype.setSmallScroll = function (sScroll) {
this.smallScroll = sScroll;
};
FScrollBarClass.prototype.setEnabled = function (enabledFlag) {
var _local3 = this.enable;
if (enabledFlag && (!_local3)) {
this.enable = enabledFlag;
if (this.textField != undefined) {
this.setScrollTarget(this.textField);
} else {
this.setScrollProperties(this.pageSize, this.cachedMinPos, this.cachedMaxPos);
this.setScrollPosition(this.cachedPos);
}
this.clickFilter = undefined;
} else if ((!enabledFlag) && (_local3)) {
this.textField.removeListener(this);
this.cachedPos = this.getScrollPosition();
this.cachedMinPos = this.minPos;
this.cachedMaxPos = this.maxPos;
if (this.clickFilter == undefined) {
this.setScrollProperties(this.pageSize, 0, 0);
} else {
this.clickFilter = true;
}
this.enable = enabledFlag;
}
};
FScrollBarClass.prototype.setSize = function (hgt) {
if (this._height == 1) {
return(undefined);
}
this.width = hgt;
this.scrollTrack_mc._yscale = 100;
this.scrollTrack_mc._yscale = (100 * this.width) / this.scrollTrack_mc._height;
if (this.upArrow_mc == undefined) {
this.attachMovie("UpArrow", "upArrow_mc", 1);
this.attachMovie("DownArrow", "downArrow_mc", 2);
this.downArrow_mc.controller = (this.upArrow_mc.controller = this);
this.upArrow_mc.useHandCursor = (this.downArrow_mc.useHandCursor = false);
this.upArrow_mc._x = (this.upArrow_mc._y = 0);
this.downArrow_mc._x = 0;
}
this.scrollTrack_mc.controller = this;
this.downArrow_mc._y = this.width - this.downArrow_mc._height;
this.trackSize = this.width - (2 * this.downArrow_mc._height);
if (this.textField != undefined) {
this.onTextChanged();
} else {
this.setScrollProperties(this.pageSize, this.minPos, this.maxPos);
}
};
FScrollBarClass.prototype.scrollIt = function (inc, mode) {
var _local3 = this.smallScroll;
if (inc != "one") {
_local3 = ((this.largeScroll == 0) ? (this.pageSize) : (this.largeScroll));
}
var _local2 = this.getScrollPosition() + (mode * _local3);
if (_local2 > this.maxPos) {
_local2 = this.maxPos;
} else if (_local2 < this.minPos) {
_local2 = this.minPos;
}
this.setScrollPosition(_local2);
};
FScrollBarClass.prototype.startDragThumb = function () {
this.lastY = this._ymouse;
this.onMouseMove = this.controller.dragThumb;
};
FScrollBarClass.prototype.dragThumb = function () {
this.scrollMove = this._ymouse - this.lastY;
this.scrollMove = this.scrollMove + this._y;
if (this.scrollMove < this.controller.scrollTop) {
this.scrollMove = this.controller.scrollTop;
} else if (this.scrollMove > this.controller.scrollBot) {
this.scrollMove = this.controller.scrollBot;
}
this._y = this.scrollMove;
var _local2 = this.controller;
_local2.scrollPosition = Math.round(((_local2.maxPos - _local2.minPos) * (this._y - _local2.scrollTop)) / _local2.trackHeight) + _local2.minPos;
this.controller.isScrolling = true;
updateAfterEvent();
this.controller.executeCallBack();
};
FScrollBarClass.prototype.stopDragThumb = function () {
this.controller.isScrolling = false;
this.onMouseMove = null;
};
FScrollBarClass.prototype.startTrackScroller = function () {
this.controller.trackScroller();
this.controller.scrolling = setInterval(this.controller, "scrollInterval", 500, "page", -1);
};
FScrollBarClass.prototype.scrollInterval = function (inc, mode) {
clearInterval(this.scrolling);
if (inc == "page") {
this.trackScroller();
} else {
this.scrollIt(inc, mode);
}
this.scrolling = setInterval(this, "scrollInterval", 35, inc, mode);
};
FScrollBarClass.prototype.trackScroller = function () {
if ((this.scrollThumb_mc._y + this.thumbHeight) < this._ymouse) {
this.scrollIt("page", 1);
} else if (this.scrollThumb_mc._y > this._ymouse) {
this.scrollIt("page", -1);
}
};
FScrollBarClass.prototype.stopScrolling = function () {
this.controller.downArrow_mc.gotoAndStop(1);
this.controller.upArrow_mc.gotoAndStop(1);
clearInterval(this.controller.scrolling);
};
FScrollBarClass.prototype.startUpScroller = function () {
this.controller.upArrow_mc.gotoAndStop(2);
this.controller.scrollIt("one", -1);
this.controller.scrolling = setInterval(this.controller, "scrollInterval", 500, "one", -1);
};
FScrollBarClass.prototype.startDownScroller = function () {
this.controller.downArrow_mc.gotoAndStop(2);
this.controller.scrollIt("one", 1);
this.controller.scrolling = setInterval(this.controller, "scrollInterval", 500, "one", 1);
};
FScrollBarClass.prototype.setScrollTarget = function (tF) {
if (tF == undefined) {
this.textField.removeListener(this);
delete this.textField[(this.horizontal ? "hScroller" : "vScroller")];
if ((this.textField.hScroller != undefined) && (this.textField.vScroller != undefined)) {
this.textField.unwatch("text");
this.textField.unwatch("htmltext");
}
}
this.textField = undefined;
if (!(tF instanceof TextField)) {
return(undefined);
}
this.textField = tF;
this.textField[(this.horizontal ? "hScroller" : "vScroller")] = this;
this.onTextChanged();
this.onChanged = function () {
this.onTextChanged();
};
this.onScroller = function () {
if (!this.isScrolling) {
if (!this.horizontal) {
this.setScrollPosition(this.textField.scroll);
} else {
this.setScrollPosition(this.textField.hscroll);
}
}
};
this.textField.addListener(this);
this.textField.watch("text", this.callback);
this.textField.watch("htmlText", this.callback);
};
FScrollBarClass.prototype.callback = function (prop, oldVal, newVal) {
clearInterval(this.hScroller.synchScroll);
clearInterval(this.vScroller.synchScroll);
this.hScroller.synchScroll = setInterval(this.hScroller, "onTextChanged", 50);
this.vScroller.synchScroll = setInterval(this.vScroller, "onTextChanged", 50);
return(newVal);
};
FScrollBarClass.prototype.onTextChanged = function () {
if ((!this.enable) || (this.textField == undefined)) {
return(undefined);
}
clearInterval(this.synchScroll);
if (this.horizontal) {
var _local3 = this.textField.hscroll;
this.setScrollProperties(this.textField._width, 0, this.textField.maxhscroll);
this.setScrollPosition(Math.min(_local3, this.textField.maxhscroll));
} else {
var _local3 = this.textField.scroll;
var _local2 = this.textField.bottomScroll - this.textField.scroll;
this.setScrollProperties(_local2, 1, this.textField.maxscroll);
this.setScrollPosition(Math.min(_local3, this.textField.maxscroll));
}
};
FScrollBarClass.prototype.executeCallBack = function () {
if (this.textField == undefined) {
super.executeCallBack();
} else if (this.horizontal) {
this.textField.hscroll = this.getScrollPosition();
} else {
this.textField.scroll = this.getScrollPosition();
}
};
Object.registerClass("FScrollBarSymbol", FScrollBarClass);
#endinitclip
Symbol 647 MovieClip Frame 1
scroll1.setScrollProperties(130, 0, 915);
this.chHand1 = function () {
scoresScroll._y = -(scroll1.getScrollPosition() * 2);
};
scroll1.setChangeHandler("chHand1");
_root.n1 = _root.ename1;
_root.n2 = _root.ename2;
_root.n3 = _root.ename3;
_root.n4 = _root.ename4;
_root.n5 = _root.ename5;
_root.n6 = _root.ename6;
_root.n7 = _root.ename7;
_root.n8 = _root.ename8;
_root.n9 = _root.ename9;
_root.n10 = _root.ename10;
_root.n11 = _root.ename11;
_root.n12 = _root.ename12;
_root.n13 = _root.ename13;
_root.n14 = _root.ename14;
_root.n15 = _root.ename15;
_root.n16 = _root.ename16;
_root.n17 = _root.ename17;
_root.n18 = _root.ename18;
_root.n19 = _root.ename19;
_root.n20 = _root.ename20;
_root.n21 = _root.ename21;
_root.n22 = _root.ename22;
_root.n23 = _root.ename23;
_root.n24 = _root.ename24;
_root.n25 = _root.ename25;
_root.n26 = _root.ename26;
_root.n27 = _root.ename27;
_root.n28 = _root.ename28;
_root.n29 = _root.ename29;
_root.n30 = _root.ename30;
_root.n31 = _root.ename31;
_root.n32 = _root.ename32;
_root.n33 = _root.ename33;
_root.n34 = _root.ename34;
_root.n35 = _root.ename35;
_root.n36 = _root.ename36;
_root.n37 = _root.ename37;
_root.n38 = _root.ename38;
_root.n39 = _root.ename39;
_root.n40 = _root.ename40;
_root.n41 = _root.ename41;
_root.n42 = _root.ename42;
_root.n43 = _root.ename43;
_root.n44 = _root.ename44;
_root.n45 = _root.ename45;
_root.n46 = _root.ename46;
_root.n47 = _root.ename47;
_root.n48 = _root.ename48;
_root.n49 = _root.ename49;
_root.n50 = _root.ename50;
_root.n51 = _root.ename51;
_root.n52 = _root.ename52;
_root.n53 = _root.ename53;
_root.n54 = _root.ename54;
_root.n55 = _root.ename55;
_root.n56 = _root.ename56;
_root.n57 = _root.ename57;
_root.n58 = _root.ename58;
_root.n59 = _root.ename59;
_root.n60 = _root.ename60;
_root.n61 = _root.ename61;
_root.n62 = _root.ename62;
_root.n63 = _root.ename63;
_root.n64 = _root.ename64;
_root.n65 = _root.ename65;
_root.n66 = _root.ename66;
_root.n67 = _root.ename67;
_root.n68 = _root.ename68;
_root.n69 = _root.ename69;
_root.n70 = _root.ename70;
_root.n71 = _root.ename71;
_root.n72 = _root.ename72;
_root.n73 = _root.ename73;
_root.n74 = _root.ename74;
_root.n75 = _root.ename75;
_root.n76 = _root.ename76;
_root.n77 = _root.ename77;
_root.n78 = _root.ename78;
_root.n79 = _root.ename79;
_root.n80 = _root.ename80;
_root.n81 = _root.ename81;
_root.n82 = _root.ename82;
_root.n83 = _root.ename83;
_root.n84 = _root.ename84;
_root.n85 = _root.ename85;
_root.n86 = _root.ename86;
_root.n87 = _root.ename87;
_root.n88 = _root.ename88;
_root.n89 = _root.ename89;
_root.n90 = _root.ename90;
_root.n90 = _root.ename90;
_root.n91 = _root.ename91;
_root.n92 = _root.ename92;
_root.n93 = _root.ename93;
_root.n94 = _root.ename94;
_root.n95 = _root.ename95;
_root.n96 = _root.ename96;
_root.n97 = _root.ename97;
_root.n98 = _root.ename98;
_root.n99 = _root.ename99;
_root.n100 = _root.ename100;
_root.s1 = _root.escore1;
_root.s2 = _root.escore2;
_root.s3 = _root.escore3;
_root.s4 = _root.escore4;
_root.s5 = _root.escore5;
_root.s6 = _root.escore6;
_root.s7 = _root.escore7;
_root.s8 = _root.escore8;
_root.s9 = _root.escore9;
_root.s10 = _root.escore10;
_root.s11 = _root.escore11;
_root.s12 = _root.escore12;
_root.s13 = _root.escore13;
_root.s14 = _root.escore14;
_root.s15 = _root.escore15;
_root.s16 = _root.escore16;
_root.s17 = _root.escore17;
_root.s18 = _root.escore18;
_root.s19 = _root.escore19;
_root.s20 = _root.escore20;
_root.s21 = _root.escore21;
_root.s22 = _root.escore22;
_root.s23 = _root.escore23;
_root.s24 = _root.escore24;
_root.s25 = _root.escore25;
_root.s26 = _root.escore26;
_root.s27 = _root.escore27;
_root.s28 = _root.escore28;
_root.s29 = _root.escore29;
_root.s30 = _root.escore30;
_root.s31 = _root.escore31;
_root.s32 = _root.escore32;
_root.s33 = _root.escore33;
_root.s34 = _root.escore34;
_root.s35 = _root.escore35;
_root.s36 = _root.escore36;
_root.s37 = _root.escore37;
_root.s38 = _root.escore38;
_root.s39 = _root.escore39;
_root.s40 = _root.escore40;
_root.s41 = _root.escore41;
_root.s42 = _root.escore42;
_root.s43 = _root.escore43;
_root.s44 = _root.escore44;
_root.s45 = _root.escore45;
_root.s46 = _root.escore46;
_root.s47 = _root.escore47;
_root.s48 = _root.escore48;
_root.s49 = _root.escore49;
_root.s50 = _root.escore50;
_root.s51 = _root.escore51;
_root.s52 = _root.escore52;
_root.s53 = _root.escore53;
_root.s54 = _root.escore54;
_root.s55 = _root.escore55;
_root.s56 = _root.escore56;
_root.s57 = _root.escore57;
_root.s58 = _root.escore58;
_root.s59 = _root.escore59;
_root.s60 = _root.escore60;
_root.s61 = _root.escore61;
_root.s62 = _root.escore62;
_root.s63 = _root.escore63;
_root.s64 = _root.escore64;
_root.s65 = _root.escore65;
_root.s66 = _root.escore66;
_root.s67 = _root.escore67;
_root.s68 = _root.escore68;
_root.s69 = _root.escore69;
_root.s70 = _root.escore70;
_root.s71 = _root.escore71;
_root.s72 = _root.escore72;
_root.s73 = _root.escore73;
_root.s74 = _root.escore74;
_root.s75 = _root.escore75;
_root.s76 = _root.escore76;
_root.s77 = _root.escore77;
_root.s78 = _root.escore78;
_root.s79 = _root.escore79;
_root.s80 = _root.escore80;
_root.s81 = _root.escore81;
_root.s82 = _root.escore82;
_root.s83 = _root.escore83;
_root.s84 = _root.escore84;
_root.s85 = _root.escore85;
_root.s86 = _root.escore86;
_root.s87 = _root.escore87;
_root.s88 = _root.escore88;
_root.s89 = _root.escore89;
_root.s90 = _root.escore90;
_root.s91 = _root.escore91;
_root.s92 = _root.escore92;
_root.s93 = _root.escore93;
_root.s94 = _root.escore94;
_root.s95 = _root.escore95;
_root.s96 = _root.escore96;
_root.s97 = _root.escore97;
_root.s98 = _root.escore98;
_root.s99 = _root.escore99;
_root.s100 = _root.escore100;
Instance of Symbol 646 MovieClip [FScrollBarSymbol] "scroll1" in Symbol 647 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
_targetInstanceName = "";
horizontal = false;
}
Symbol 653 Button
on (release) {
_root.gotoAndPlay(170);
}
Symbol 669 Button
on (release) {
_root.xdada = 0;
i = 1;
while (i <= 100) {
if (_root.best > _root.monthscor[i]) {
k = 100;
while (k >= (i + 1)) {
_root.monthscor[k] = _root.monthscor[k - 1];
_root.monthnume[k] = _root.monthnume[k - 1];
k--;
}
_root.monthscor[i] = _root.best;
_root.monthnume[i] = _root.nickname;
i = 31;
}
i++;
}
i = 1;
while (i <= 100) {
if (_root.best > _root.everscor[i]) {
k = 100;
while (k >= (i + 1)) {
_root.everscor[k] = _root.everscor[k - 1];
_root.evernume[k] = _root.evernume[k - 1];
k--;
}
_root.everscor[i] = _root.best;
_root.evernume[i] = _root.nickname;
i = 100;
}
i++;
}
_root.updated = 1;
_root.done = 1;
gotoAndPlay ("submit");
}
Symbol 673 Button
on (release) {
_root.gotoAndPlay(170);
}
Symbol 676 Button
on (release) {
_root.gotoAndPlay(170);
}
Symbol 680 Button
on (release) {
_root.gotoAndPlay(1);
}
Symbol 681 MovieClip Frame 1
stop();
Symbol 681 MovieClip Frame 9
stop();
Symbol 681 MovieClip Frame 22
stop();
Symbol 681 MovieClip Frame 34
var my_date = new Date();
trace(my_date.getSeconds());
codul = Math.round(my_date.getTime() / 1000) * _root.best;
cale = (((((("http://www.freeonlinegames.com/scoreboard/update.php?game=" + _root.gameid) + "&name=") + _root.nickname) + "&score=") + _root.best) + "&code=") + codul;
trace(cale);
loadVariablesNum (cale, 0, "GET");
gotoAndPlay ("loop");
Symbol 681 MovieClip Frame 45
if (_root.updated != 1) {
gotoAndPlay ("loop");
} else {
_root.best = 0;
_root.score = 0;
_root.xdada = 1;
updated = 1;
_parent.gotoAndPlay("submitScore");
}
Symbol 681 MovieClip Frame 46
Symbol 683 MovieClip [finishMessage] Frame 1
_root.removeMovieClip("mcHud");
_root.surface._visible = false;
_root.hud._visible = false;
Symbol 683 MovieClip [finishMessage] Frame 2
_root.gameid = "downhilljumps";
_root.best = _root.totalPoints;
_root.totalPoints = 0;
_root.updated = 0;
_root.done = 0;
i = 1;
while (i <= 100) {
_root["score" + i] = null;
_root["name" + i] = null;
_root["escore" + i] = null;
_root["ename" + i] = null;
i++;
}
_root.n100 = " ";
Symbol 683 MovieClip [finishMessage] Frame 4
cale = "http://www.freeonlinegames.com/scoreboard/score.php?game=" + _root.gameid;
loadVariablesNum (cale, 0, "POST");
Symbol 683 MovieClip [finishMessage] Frame 12
if (_root.done != 1) {
gotoAndPlay ("loopLoad");
} else {
gotoAndPlay ("scoreTable");
}
Symbol 683 MovieClip [finishMessage] Frame 16
monthnume = new Array();
monthscor = new Array();
i = 1;
while (i <= 100) {
monthnume[i] = _root["name" + i];
monthscor[i] = Number(_root["score" + i].slice(0, _root["score" + i].length - 1));
i++;
}
evernume = new Array();
everscor = new Array();
i = 1;
while (i <= 100) {
evernume[i] = _root["ename" + i];
everscor[i] = Number(_root["escore" + i].slice(0, _root["escore" + i].length - 1));
i++;
}
Symbol 683 MovieClip [finishMessage] Frame 17
_root.n100 = " ";
stop();
if (_root.best > everscor[100]) {
scoreWind.gotoAndStop("submitScoreYes");
} else {
scoreWind.gotoAndStop("submitScoreNo");
}
if (_root.xdada == 1) {
scoreWind.gotoAndStop("topEver");
}
Symbol 686 MovieClip [mcHighscores] Frame 1
stop();
this.bg.onRollOver = function () {
this.useHandCursor = false;
};
Symbol 721 MovieClip Frame 1
stop();
Symbol 733 MovieClip [mcBoarder] Frame 1
stop();
Symbol 736 MovieClip Frame 1
this._visible = false;
Symbol 747 MovieClip [mcSnow] Frame 1
this._xscale = 250;
this._yscale = 250;
gooiOp = function (mc, dx, dy) {
mc.speedx = dx;
mc.speedy = dy;
mc.onEnterFrame = function () {
this.speedy = this.speedy + 1.5;
this.speedx = this.speedx * 0.98;
this._y = this._y + this.speedy;
this._x = this._x + this.speedx;
if (this._y > this.bottom) {
delete mc.onEnterFrame;
this.removeMovieClip();
}
};
};
var rand = random(6);
this.gotoAndStop(rand + 1);
this.bottom = (this._y + rand) + 2;
this._x = this._x + ((rand * 6) - (rand * 12));
if (this.richting == "links") {
pmfactor = 1;
} else {
pmfactor = -1;
}
pmfactor = 1;
this.speed = Math.random() / 3;
gooiOp(this, Math.random() * (this.speed * 2), (Math.random() * (-(this.speed * 8))) - 4);
Symbol 749 MovieClip [mcAirTime] Frame 1
stop();
this.tel = 0;
this.onEnterFrame = function () {
this.tel++;
if (this.tel > 36) {
this._alpha = this._alpha - 10;
if (this._alpha <= 0) {
this.removeMovieClip();
}
}
};
Symbol 751 MovieClip [mcPerfectLanding] Frame 1
stop();
this.tel = 0;
this.onEnterFrame = function () {
this.tel++;
if (this.tel > 36) {
this._alpha = this._alpha - 10;
if (this._alpha <= 0) {
this.removeMovieClip();
}
}
};
Symbol 753 MovieClip [mcCheckPointMessage] Frame 1
this.tel = 0;
this.onEnterFrame = function () {
this.tel++;
if (this.tel > 36) {
this._alpha = this._alpha - 10;
if (this._alpha <= 0) {
this.removeMovieClip();
}
}
};
Symbol 755 MovieClip [mcDegreesMessage] Frame 1
this.tel = 0;
this.onEnterFrame = function () {
this.tel++;
if (this.tel > 36) {
this._alpha = this._alpha - 10;
if (this._alpha <= 0) {
this.removeMovieClip();
}
}
};
Symbol 757 MovieClip [mcGemPoints] Frame 1
stop();
this.tel = 0;
this.onEnterFrame = function () {
this.tel++;
this._y = this._y - 2;
if (this.tel > 10) {
this._alpha = this._alpha - 5;
if (this._alpha < 10) {
this.removeMovieClip();
}
}
};
Symbol 760 MovieClip [FUIComponentSymbol] Frame 1
#initclip 1
function FUIComponentClass() {
this.init();
}
FUIComponentClass.prototype = new MovieClip();
FUIComponentClass.prototype.init = function () {
this.enable = true;
this.focused = false;
this.useHandCursor = false;
this._accImpl = new Object();
this._accImpl.stub = true;
this.styleTable = new Array();
if (_global.globalStyleFormat == undefined) {
_global.globalStyleFormat = new FStyleFormat();
globalStyleFormat.isGlobal = true;
_global._focusControl = new Object();
_global._focusControl.onSetFocus = function (oldFocus, newFocus) {
oldFocus.myOnKillFocus();
newFocus.myOnSetFocus();
};
Selection.addListener(_global._focusControl);
}
if (this._name != undefined) {
this._focusrect = false;
this.tabEnabled = true;
this.focusEnabled = true;
this.tabChildren = false;
this.tabFocused = true;
if (this.hostStyle == undefined) {
globalStyleFormat.addListener(this);
} else {
this.styleTable = this.hostStyle;
}
this.deadPreview._visible = false;
this.deadPreview._width = (this.deadPreview._height = 1);
this.methodTable = new Object();
this.keyListener = new Object();
this.keyListener.controller = this;
this.keyListener.onKeyDown = function () {
this.controller.myOnKeyDown();
};
this.keyListener.onKeyUp = function () {
this.controller.myOnKeyUp();
};
for (var _local3 in this.styleFormat_prm) {
this.setStyleProperty(_local3, this.styleFormat_prm[_local3]);
}
}
};
FUIComponentClass.prototype.setEnabled = function (enabledFlag) {
this.enable = ((arguments.length > 0) ? (enabledFlag) : true);
this.tabEnabled = (this.focusEnabled = enabledFlag);
if ((!this.enable) && (this.focused)) {
Selection.setFocus(undefined);
}
};
FUIComponentClass.prototype.getEnabled = function () {
return(this.enable);
};
FUIComponentClass.prototype.setSize = function (w, h) {
this.width = w;
this.height = h;
this.focusRect.removeMovieClip();
};
FUIComponentClass.prototype.setChangeHandler = function (chng, obj) {
this.handlerObj = ((obj == undefined) ? (this._parent) : (obj));
this.changeHandler = chng;
};
FUIComponentClass.prototype.invalidate = function (methodName) {
this.methodTable[methodName] = true;
this.onEnterFrame = this.cleanUI;
};
FUIComponentClass.prototype.cleanUI = function () {
if (this.methodTable.setSize) {
this.setSize(this.width, this.height);
} else {
this.cleanUINotSize();
}
this.methodTable = new Object();
delete this.onEnterFrame;
};
FUIComponentClass.prototype.cleanUINotSize = function () {
for (var _local2 in this.methodTable) {
this[_local2]();
}
};
FUIComponentClass.prototype.drawRect = function (x, y, w, h) {
var _local4 = this.styleTable.focusRectInner.value;
var _local5 = this.styleTable.focusRectOuter.value;
if (_local4 == undefined) {
_local4 = 16777215 /* 0xFFFFFF */;
}
if (_local5 == undefined) {
_local5 = 0;
}
this.createEmptyMovieClip("focusRect", 1000);
this.focusRect.controller = this;
this.focusRect.lineStyle(1, _local5);
this.focusRect.moveTo(x, y);
this.focusRect.lineTo(x + w, y);
this.focusRect.lineTo(x + w, y + h);
this.focusRect.lineTo(x, y + h);
this.focusRect.lineTo(x, y);
this.focusRect.lineStyle(1, _local4);
this.focusRect.moveTo(x + 1, y + 1);
this.focusRect.lineTo((x + w) - 1, y + 1);
this.focusRect.lineTo((x + w) - 1, (y + h) - 1);
this.focusRect.lineTo(x + 1, (y + h) - 1);
this.focusRect.lineTo(x + 1, y + 1);
};
FUIComponentClass.prototype.pressFocus = function () {
this.tabFocused = false;
this.focusRect.removeMovieClip();
Selection.setFocus(this);
};
FUIComponentClass.prototype.drawFocusRect = function () {
this.drawRect(-2, -2, this.width + 4, this.height + 4);
};
FUIComponentClass.prototype.myOnSetFocus = function () {
this.focused = true;
Key.addListener(this.keyListener);
if (this.tabFocused) {
this.drawFocusRect();
}
};
FUIComponentClass.prototype.myOnKillFocus = function () {
this.tabFocused = true;
this.focused = false;
this.focusRect.removeMovieClip();
Key.removeListener(this.keyListener);
};
FUIComponentClass.prototype.executeCallBack = function () {
this.handlerObj[this.changeHandler](this);
};
FUIComponentClass.prototype.updateStyleProperty = function (styleFormat, propName) {
this.setStyleProperty(propName, styleFormat[propName], styleFormat.isGlobal);
};
FUIComponentClass.prototype.setStyleProperty = function (propName, value, isGlobal) {
if (value == "") {
return(undefined);
}
var _local17 = parseInt(value);
if (!isNaN(_local17)) {
value = _local17;
}
var _local16 = ((arguments.length > 2) ? (isGlobal) : false);
if (this.styleTable[propName] == undefined) {
this.styleTable[propName] = new Object();
this.styleTable[propName].useGlobal = true;
}
if (this.styleTable[propName].useGlobal || (!_local16)) {
this.styleTable[propName].value = value;
if (this.setCustomStyleProperty(propName, value)) {
} else if (propName == "embedFonts") {
this.invalidate("setSize");
} else if (propName.subString(0, 4) == "text") {
if (this.textStyle == undefined) {
this.textStyle = new TextFormat();
}
var _local18 = propName.subString(4, propName.length);
this.textStyle[_local18] = value;
this.invalidate("setSize");
} else {
for (var _local15 in this.styleTable[propName].coloredMCs) {
var _local4 = new Color(this.styleTable[propName].coloredMCs[_local15]);
if (this.styleTable[propName].value == undefined) {
var _local5 = {ra:"100", rb:"0", ga:"100", gb:"0", ba:"100", bb:"0", aa:"100", ab:"0"};
_local4.setTransform(_local5);
} else {
_local4.setRGB(value);
}
}
}
this.styleTable[propName].useGlobal = _local16;
}
};
FUIComponentClass.prototype.registerSkinElement = function (skinMCRef, propName) {
if (this.styleTable[propName] == undefined) {
this.styleTable[propName] = new Object();
this.styleTable[propName].useGlobal = true;
}
if (this.styleTable[propName].coloredMCs == undefined) {
this.styleTable[propName].coloredMCs = new Object();
}
this.styleTable[propName].coloredMCs[skinMCRef] = skinMCRef;
if (this.styleTable[propName].value != undefined) {
var _local4 = new Color(skinMCRef);
_local4.setRGB(this.styleTable[propName].value);
}
};
_global.FStyleFormat = function () {
this.nonStyles = {listeners:true, isGlobal:true, isAStyle:true, addListener:true, removeListener:true, nonStyles:true, applyChanges:true};
this.listeners = new Object();
this.isGlobal = false;
if (arguments.length > 0) {
for (var _local3 in arguments[0]) {
this[_local3] = arguments[0][_local3];
}
}
};
_global.FStyleFormat.prototype = new Object();
FStyleFormat.prototype.addListener = function () {
var _local3 = 0;
while (_local3 < arguments.length) {
var _local4 = arguments[_local3];
this.listeners[arguments[_local3]] = _local4;
for (var _local5 in this) {
if (this.isAStyle(_local5)) {
_local4.updateStyleProperty(this, _local5.toString());
}
}
_local3++;
}
};
FStyleFormat.prototype.removeListener = function (component) {
this.listeners[component] = undefined;
for (var _local4 in this) {
if (this.isAStyle(_local4)) {
if (component.styleTable[_local4].useGlobal == this.isGlobal) {
component.styleTable[_local4].useGlobal = true;
var _local3 = (this.isGlobal ? undefined : (globalStyleFormat[_local4]));
component.setStyleProperty(_local4, _local3, true);
}
}
}
};
FStyleFormat.prototype.applyChanges = function () {
var _local6 = 0;
for (var _local5 in this.listeners) {
var _local3 = this.listeners[_local5];
if (arguments.length > 0) {
var _local4 = 0;
while (_local4 < arguments.length) {
if (this.isAStyle(arguments[_local4])) {
_local3.updateStyleProperty(this, arguments[_local4]);
}
_local4++;
}
} else {
for (var _local4 in this) {
if (this.isAStyle(_local4)) {
_local3.updateStyleProperty(this, _local4.toString());
}
}
}
}
};
FStyleFormat.prototype.isAStyle = function (name) {
return((this.nonStyles[name] ? false : true));
};
#endinitclip
Symbol 772 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(arrow_mc, "arrow");
component.registerSkinElement(face_mc, "face");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 781 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(arrow_mc, "arrow");
component.registerSkinElement(face_mc, "face");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 790 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(arrow_mc, "foregroundDisabled");
component.registerSkinElement(face_mc, "face");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 791 MovieClip [UpArrow] Frame 1
stop();
Symbol 791 MovieClip [UpArrow] Frame 2
stop();
Symbol 791 MovieClip [UpArrow] Frame 3
stop();
Symbol 797 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 806 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(face_mc, "face");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 811 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(highlight3D_mc, "highlight3D");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
Symbol 812 MovieClip [ScrollThumb] Frame 1
stop();
Symbol 820 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(arrow_mc, "arrow");
component.registerSkinElement(face_mc, "face");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 828 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(arrow_mc, "arrow");
component.registerSkinElement(face_mc, "face");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 836 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(arrow_mc, "foregroundDisabled");
component.registerSkinElement(face_mc, "face");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 837 MovieClip [DownArrow] Frame 1
stop();
Symbol 837 MovieClip [DownArrow] Frame 2
stop();
Symbol 837 MovieClip [DownArrow] Frame 3
stop();
Symbol 842 Button
on (release) {
getURL ("http://www.freeonlinegames.com/?downhilljumps", "_blank");
}
Symbol 846 MovieClip Frame 1
stop();
Symbol 855 MovieClip Frame 1
Symbol 855 MovieClip Frame 100
stop();
Symbol 865 MovieClip Frame 50
stop();
_parent.play();
Symbol 888 MovieClip Frame 1
stop();
Symbol 888 MovieClip Frame 28
gotoAndPlay ("loop");
Symbol 910 MovieClip Frame 1
stop();
Instance of Symbol 760 MovieClip [FUIComponentSymbol] in Symbol 910 MovieClip Frame 94
//component parameters
onClipEvent (construct) {
}
Instance of Symbol 646 MovieClip [FScrollBarSymbol] in Symbol 910 MovieClip Frame 95
//component parameters
onClipEvent (construct) {
_targetInstanceName = "";
horizontal = false;
}