Frame 1
function preloader() {
i = 1;
while (i < 17) {
_root["bb" + i].gotoAndStop(random(16) + 1);
i++;
}
if ((_root.getBytesLoaded() == _root.getBytesTotal()) && (root.getBytesLoaded() != 0)) {
clearInterval(pl);
gotoAndPlay ("intro");
}
}
pl = setInterval(preloader, 50);
System.security.allowDomain("www.fortum.fi");
System.security.allowDomain("www.fortum.se");
System.security.allowDomain("www.kotienergia.com");
System.security.allowDomain("tuotanto.heyday.fi");
System.security.allowDomain("mm2005.hdtuotanto.fi");
fscommand ("allowscale", "false");
fscommand ("showmenu", "false");
fscommand ("fullscreen", "true");
System.useCodepage = true;
Stage.scaleMode = "noscale";
Stage.showMenu = false;
nimi = "";
xcenter = 320;
_root.stadikkaLeveys = 760;
_root.urli = "http://mm2005.hdtuotanto.fi/";
if (kieli == null) {
kieli = 3;
}
user = (((((((((((((((random(10) + "") + random(10)) + "") + random(10)) + "") + random(10)) + "") + random(10)) + "") + random(10)) + "") + random(10)) + "") + random(10)) + "") + random(10);
var vastaus = new LoadVars();
var lahetys = new LoadVars();
lahetys.kieli = _root.kieli;
lahetys.sivu = "preloader";
lahetys.sendAndLoad(_root.urli + "stat.php", vastaus, "POST");
loadTime = getTimer();
stop();
Frame 6
_root.SFXintro = new Sound();
_root.SFXintro.attachSound("introcrowd");
_root.SFXstart1 = new Sound();
_root.SFXstart1.attachSound("start1");
_root.SFXstart2 = new Sound();
_root.SFXstart2.attachSound("start2");
_root.SFXstart = new Sound();
_root.SFXstart.attachSound("start3");
_root.SFXstart3 = new Sound();
_root.SFXstart3.attachSound("start33");
_root.SFXrun = new Sound();
_root.SFXrun.attachSound("juoksua");
_root.SFXluritus1 = new Sound();
_root.SFXluritus1.attachSound("luritus1");
_root.SFXcrowd = new Sound();
_root.SFXcrowd.attachSound("crowd");
_root.SFXfanfaari1 = new Sound();
_root.SFXfanfaari1.attachSound("fanfaari1");
_root.SFXfanfaari2 = new Sound();
_root.SFXfanfaari2.attachSound("fanfaari2");
_root.SFXklikki1 = new Sound();
_root.SFXklikki1.attachSound("klikki1");
_root.SFXklikki2 = new Sound();
_root.SFXklikki2.attachSound("klikki2");
_root.SFXaita = new Sound();
_root.SFXaita.attachSound("aita");
_root.SFXfinished = new Sound();
_root.SFXfinished.attachSound("finished");
_root.SFXkeihas = new Sound();
_root.SFXkeihas.attachSound("keihas");
_root.SFXheitto = new Sound();
_root.SFXheitto.attachSound("heitto");
_root.SFXminutestogo = new Sound();
_root.SFXminutestogo.attachSound("minutestogo");
_root.SFXresult = new Sound();
_root.SFXresult.attachSound("nr");
_root.SFXmeters = new Sound();
_root.SFXmeters.attachSound("nm");
_root.SFXpoint = new Sound();
_root.SFXpoint.attachSound("np");
_root.SFXseconds = new Sound();
_root.SFXseconds.attachSound("ns");
_root.blanksound = new Sound();
_root.blanksound.attachSound("blanksound");
_root.SFXfoul = new Sound();
_root.SFXfoul.attachSound("foul");
_root.SFX0 = new Sound();
_root.SFX0.attachSound("n0");
_root.SFX1 = new Sound();
_root.SFX1.attachSound("n1");
_root.SFX2 = new Sound();
_root.SFX2.attachSound("n2");
_root.SFX3 = new Sound();
_root.SFX3.attachSound("n3");
_root.SFX4 = new Sound();
_root.SFX4.attachSound("n4");
_root.SFX5 = new Sound();
_root.SFX5.attachSound("n5");
_root.SFX6 = new Sound();
_root.SFX6.attachSound("n6");
_root.SFX7 = new Sound();
_root.SFX7.attachSound("n7");
_root.SFX8 = new Sound();
_root.SFX8.attachSound("n8");
_root.SFX9 = new Sound();
_root.SFX9.attachSound("n9");
_root.SFX11 = new Sound();
_root.SFX11.attachSound("n11");
_root.SFX12 = new Sound();
_root.SFX12.attachSound("n12");
_root.SFX10 = new Sound();
_root.SFX10.attachSound("n10");
_root.SFX20 = new Sound();
_root.SFX20.attachSound("n20");
_root.SFX30 = new Sound();
_root.SFX30.attachSound("n30");
_root.SFX40 = new Sound();
_root.SFX40.attachSound("n40");
_root.SFX50 = new Sound();
_root.SFX50.attachSound("n50");
_root.SFX60 = new Sound();
_root.SFX60.attachSound("n60");
_root.SFX70 = new Sound();
_root.SFX70.attachSound("n70");
_root.SFX80 = new Sound();
_root.SFX80.attachSound("n80");
_root.SFX90 = new Sound();
_root.SFX90.attachSound("n90");
_root.SFX100 = new Sound();
_root.SFX100.attachSound("n100");
loadedTime = (getTimer() - loadTime) / 1000;
var vastaus = new LoadVars();
var lahetys = new LoadVars();
lahetys.kieli = _root.kieli;
lahetys.sivu = "etusivu";
lahetys.OS = System.capabilities.os;
lahetys.browserx = Stage.width;
lahetys.browsery = Stage.height;
lahetys.res = (System.capabilities.screenResolutionX + "x") + System.capabilities.screenResolutionY;
lahetys.latausaika = loadedTime;
vastaus.onLoad = function (success) {
};
lahetys.sendAndLoad(_root.urli + "stat.php", vastaus, "POST");
stop();
Frame 30
function jatka() {
Key.removeListener(keyListener);
_root.gotoAndPlay("ohjescreeniin");
}
var keyListener = new Object();
keyListener.onKeyDown = function () {
if (!(Key.getCode() === 32)) {
} else {
jatka();
}
};
Key.addListener(keyListener);
onFocus.useHandCursor = false;
if (nimi == "") {
nimiPrint = "";
nimiPrint1 = "";
nimiPrint2 = "";
nimiPrint3 = "";
nimiPrint4 = "";
nimiPrint5 = "";
}
if (nimi != "") {
nimiPrint = nimi;
nimiPrint1 = nimi.substring(0, 1);
nimiPrint1 = nimi.substring(1, 2);
nimiPrint2 = nimi.substring(2, 3);
nimiPrint3 = nimi.substring(3, 4);
nimiPrint4 = nimi.substring(4, 5);
}
gameOver = false;
score = 0;
stop();
Frame 55
function jatka() {
Key.removeListener(keyListener);
_root.gotoAndPlay("nimivalintaan");
}
var vastaus = new LoadVars();
var lahetys = new LoadVars();
lahetys.kieli = _root.kieli;
lahetys.sivu = "ohjeet";
lahetys.user = _root.user;
vastaus.onLoad = function (success) {
};
lahetys.sendAndLoad(_root.urli + "stat.php", vastaus, "POST");
var keyListener = new Object();
keyListener.onKeyDown = function () {
if (!(Key.getCode() === 32)) {
} else {
jatka();
}
};
Key.addListener(keyListener);
onFocus.useHandCursor = false;
stop();
Instance of Symbol 303 MovieClip "rulla" in Frame 69
onClipEvent (load) {
clips = [];
kirjaimet = new Array("A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "@", "!", "?", ".", "_", "<", ">", "&", "-", "/");
i = 0;
while (i < kirjaimet.length) {
duplicateMovieClip ("kirjaimet", "k" + i, i);
this["k" + i].kirjain = kirjaimet[i];
this["k" + i]._y = 0;
i++;
}
for (clip in this) {
if (typeof(this[clip]) == "movieclip") {
clips[clips.length] = this[clip];
this[clip]._y = 0;
}
}
count = clips.length;
step = (Math.PI*2) / count;
angle = 46 * step;
choice = 0;
angleNew = angle;
radius = 280;
}
onClipEvent (enterFrame) {
if (choice > (kirjaimet.length - 1)) {
choice = 0;
}
if (choice < 0) {
choice = kirjaimet.length - 1;
}
chosen = kirjaimet[choice];
if (_parent.nimi.length < 5) {
_parent.nimiPrint = _parent.nimi + chosen;
}
_parent.nimiPrint1 = _parent.nimiPrint.substring(0, 1);
_parent.nimiPrint2 = _parent.nimiPrint.substring(1, 2);
_parent.nimiPrint3 = _parent.nimiPrint.substring(2, 3);
_parent.nimiPrint4 = _parent.nimiPrint.substring(3, 4);
_parent.nimiPrint5 = _parent.nimiPrint.substring(4, 5);
angle = angle + ((angleNew - angle) / 2);
i = 0;
while (i < count) {
cos = Math.cos(angle + (step * i));
sin = Math.sin(angle + (step * i));
clips[i]._x = cos * radius;
clips[i]._xscale = sin * 100;
clips[i]._y = 80 + (sin * 20);
clips[i]._yscale = 80 + (sin * 20);
clips[i].swapDepths(clips[i]._yscale);
clips[i]._alpha = (Math.sin(angle + (step * i)) * 40) + 40;
var my_color = new Color(clips[i]);
my_color.setRGB(65535);
i++;
}
clips[(count - choice) - 1]._alpha = 100;
clips[(count - choice) - 1]._xscale = 150;
clips[(count - choice) - 1]._yscale = 150;
var my_color = new Color(clips[(count - choice) - 1]);
my_color.setRGB(16773645);
}
Frame 79
var vastaus = new LoadVars();
var lahetys = new LoadVars();
lahetys.kieli = _root.kieli;
lahetys.sivu = "nimivalinta";
vastaus.onLoad = function (success) {
};
lahetys.sendAndLoad(_root.urli + "stat.php", vastaus, "POST");
var keyListener = new Object();
keyListener.onKeyDown = function () {
switch (Key.getCode()) {
case 32 :
_root.SFXklikki2.start();
if (nimi.length < 5) {
nimi = nimi + rulla.chosen;
}
if (nimi.length >= 5) {
Key.removeListener(keyListener);
_root.gotoAndPlay("maavalintaan");
}
return;
case 37 :
_root.SFXklikki1.start();
with (rulla) {
angleNew = angleNew - step;
choice--;
}
return;
case 39 :
_root.SFXklikki1.start();
with (rulla) {
angleNew = angleNew + step;
choice++;
}
return;
case 8 :
_root.SFXklikki2.start();
nimi = nimi.substring(0, nimi.length - 1);
}
};
Key.addListener(keyListener);
stop();
Instance of Symbol 325 MovieClip "rulla" in Frame 94
onClipEvent (load) {
clips = [];
maat = new Array("FINLAND", "SWEDEN", "DENMARK", "NORWAY", "GERMANY", "GREAT BRITAIN", "THE NETHERLANDS", "THE UNITED STATES OF AMERICA", "JAPAN", "KENYA", "RANDOM");
i = 0;
while (i < maat.length) {
duplicateMovieClip ("liput", "l" + i, i);
this["l" + i].maa = maat[i];
this["l" + i]._y = 0;
this["l" + i].liput.gotoAndStop(i + 1);
i++;
}
for (clip in this) {
if (typeof(this[clip]) == "movieclip") {
clips[clips.length] = this[clip];
this[clip]._y = 0;
}
}
count = clips.length - 1;
step = (Math.PI*2) / count;
angle = 4 * step;
choice = 0;
angleNew = angle;
radius = 280;
}
onClipEvent (enterFrame) {
if (choice > (maat.length - 1)) {
choice = 0;
}
if (choice < 0) {
choice = maat.length - 1;
}
chosen = maat[choice];
_parent.maaPrint2 = chosen;
angle = angle + ((angleNew - angle) / 2);
i = 0;
while (i < count) {
cos = Math.cos(angle + (step * i));
sin = Math.sin(angle + (step * i));
clips[i]._x = cos * radius;
clips[i]._xscale = sin * 100;
clips[i]._y = 80 + (sin * 20);
clips[i]._yscale = 80 + (sin * 20);
clips[i].swapDepths(clips[i]._yscale);
clips[i]._alpha = (Math.sin(angle + (step * i)) * 40) + 40;
i++;
}
clips[(count - choice) - 1]._alpha = 100;
clips[(count - choice) - 1]._xscale = 150;
clips[(count - choice) - 1]._yscale = 150;
}
Frame 104
function maaCpu() {
cpuMaa = random(10) + 1;
if (cpuMaa == maaNumero) {
cpuMaa++;
if (cpuMaa > 10) {
cpuMaa = 1;
}
}
}
var vastaus = new LoadVars();
var lahetys = new LoadVars();
lahetys.kieli = _root.kieli;
lahetys.sivu = "maavalinta";
vastaus.onLoad = function (success) {
};
lahetys.sendAndLoad(_root.urli + "stat.php", vastaus, "POST");
var keyListener = new Object();
keyListener.onKeyDown = function () {
switch (Key.getCode()) {
case 32 :
_root.SFXklikki2.start();
maa = rulla.choice;
if (maa == 10) {
maa = random(10);
}
if (maa == 0) {
maaPrint = "FIN";
}
if (maa == 1) {
maaPrint = "SWE";
}
if (maa == 2) {
maaPrint = "DEN";
}
if (maa == 3) {
maaPrint = "NOR";
}
if (maa == 4) {
maaPrint = "GER";
}
if (maa == 5) {
maaPrint = "GB";
}
if (maa == 6) {
maaPrint = "NL";
}
if (maa == 7) {
maaPrint = "USA";
}
if (maa == 8) {
maaPrint = "JPN";
}
if (maa == 9) {
maaPrint = "KEN";
}
maaNimi = rulla.maat[maa];
_root.maaNumero = maa + 1;
maaCpu();
Key.removeListener(keyListener);
gotoAndPlay ("intro_100m");
return;
case 37 :
with (rulla) {
_root.SFXklikki1.start();
angleNew = angleNew - step;
choice--;
}
return;
case 39 :
with (rulla) {
_root.SFXklikki1.start();
angleNew = angleNew + step;
choice++;
}
}
};
Key.addListener(keyListener);
stop();
Frame 110
function soundout() {
if (faderStage == 1) {
fader = fader - 2;
if (fader <= 0) {
fader = 0;
_root.mySound.stop();
_root.mySound2 = new Sound();
_root.mySound2.loadSound("kohina.mp3", true);
_root.mySound2.onSoundComplete = function () {
_root.mySound2.loadSound("kohina.mp3", true);
};
faderStage = 2;
}
_root.mySound.setVolume(fader);
}
if (faderStage == 2) {
fader = fader + 4;
if (fader >= 100) {
fader = 100;
_root.mySound2.setVolume(100);
clearInterval(fo);
}
_root.mySound2.setVolume(fader);
}
}
function soundin() {
if (faderStage == 1) {
fader = fader - 2;
if (fader <= 0) {
fader = 0;
_root.mySound.loadSound("looppi.mp3", true);
_root.mySound.onSoundComplete = function () {
_root.mySound.loadSound("looppi.mp3", true);
};
_root.mySound.setVolume(0);
_root.mySound.start();
faderStage = 2;
}
_root.mySound2.setVolume(fader);
}
if (faderStage == 2) {
fader = fader + 4;
if (fader >= 100) {
fader = 100;
clearInterval(fi);
}
_root.mySound.setVolume(fader);
}
}
function speak(tulos) {
spiikki = tulos.toString();
l = spiikki.length;
i = 0;
while (i < 9) {
this["spiikki" + i] = spiikki.substring(i, i + 1);
if (i < l) {
this["tr" + i] = "n" + this["spiikki" + i];
}
if (i == l) {
this["tr" + i] = "ns";
}
if (i > l) {
this["tr" + i] = "blanksound";
}
i++;
}
_root.scoresoundp = new Sound();
_root.scoresoundp.attachSound("finished");
_root.scoresoundr = new Sound();
_root.scoresoundr.attachSound("nr");
_root.scoresound0 = new Sound();
_root.scoresound0.attachSound(tr0);
_root.scoresound1 = new Sound();
_root.scoresound1.attachSound(tr1);
_root.scoresound2 = new Sound();
_root.scoresound2.attachSound(tr2);
_root.scoresound3 = new Sound();
_root.scoresound3.attachSound(tr3);
_root.scoresound4 = new Sound();
_root.scoresound4.attachSound(tr4);
_root.scoresound5 = new Sound();
_root.scoresound5.attachSound(tr5);
_root.scoresound6 = new Sound();
_root.scoresound6.attachSound(tr6);
_root.scoresound7 = new Sound();
_root.scoresound7.attachSound(tr7);
_root.scoresound8 = new Sound();
_root.scoresound8.attachSound(tr8);
_root.scoresoundp.onSoundComplete = function () {
_root.scoresoundr.start();
};
_root.scoresoundr.onSoundComplete = function () {
_root.scoresound0.start();
};
_root.scoresound0.onSoundComplete = function () {
_root.scoresound1.start();
};
_root.scoresound1.onSoundComplete = function () {
_root.scoresound2.start();
};
_root.scoresound2.onSoundComplete = function () {
_root.scoresound3.start();
};
_root.scoresound3.onSoundComplete = function () {
_root.scoresound4.start();
};
_root.scoresound4.onSoundComplete = function () {
_root.scoresound5.start();
};
_root.scoresound5.onSoundComplete = function () {
_root.scoresound6.start();
};
_root.scoresound6.onSoundComplete = function () {
_root.scoresound7.start();
};
_root.scoresound7.onSoundComplete = function () {
_root.scoresound8.start();
};
_root.scoresound8.onSoundComplete = function () {
};
_root.scoresoundp.start();
}
function speakm(tulos) {
spiikki = tulos.toString();
l = spiikki.length;
i = 0;
while (i < 9) {
this["spiikki" + i] = spiikki.substring(i, i + 1);
if (i < l) {
this["tr" + i] = "n" + this["spiikki" + i];
}
if (i == l) {
this["tr" + i] = "nm";
}
if (i > l) {
this["tr" + i] = "blanksound";
}
i++;
}
_root.scoresoundr = new Sound();
_root.scoresoundr.attachSound("nr");
_root.scoresound0 = new Sound();
_root.scoresound0.attachSound(tr0);
_root.scoresound1 = new Sound();
_root.scoresound1.attachSound(tr1);
_root.scoresound2 = new Sound();
_root.scoresound2.attachSound(tr2);
_root.scoresound3 = new Sound();
_root.scoresound3.attachSound(tr3);
_root.scoresound4 = new Sound();
_root.scoresound4.attachSound(tr4);
_root.scoresound5 = new Sound();
_root.scoresound5.attachSound(tr5);
_root.scoresound6 = new Sound();
_root.scoresound6.attachSound(tr6);
_root.scoresound7 = new Sound();
_root.scoresound7.attachSound(tr7);
_root.scoresound8 = new Sound();
_root.scoresound8.attachSound(tr8);
_root.scoresoundr.onSoundComplete = function () {
_root.scoresound0.start();
};
_root.scoresound0.onSoundComplete = function () {
_root.scoresound1.start();
};
_root.scoresound1.onSoundComplete = function () {
_root.scoresound2.start();
};
_root.scoresound2.onSoundComplete = function () {
_root.scoresound3.start();
};
_root.scoresound3.onSoundComplete = function () {
_root.scoresound4.start();
};
_root.scoresound4.onSoundComplete = function () {
_root.scoresound5.start();
};
_root.scoresound5.onSoundComplete = function () {
_root.scoresound6.start();
};
_root.scoresound6.onSoundComplete = function () {
_root.scoresound7.start();
};
_root.scoresound7.onSoundComplete = function () {
_root.scoresound8.start();
};
_root.scoresound8.onSoundComplete = function () {
};
_root.scoresoundr.start();
}
fader = 100;
fo = setInterval(soundout, 50);
faderStage = 1;
Frame 120
function countryCpu() {
with (cpu.player) {
paa.g.gotoAndStop(_root.cpuMaa);
kroppa.g.gotoAndStop(_root.cpuMaa);
kasiv.g.gotoAndStop(_root.cpuMaa);
reisiv.g.gotoAndStop(_root.cpuMaa);
jalkav.g.gotoAndStop(_root.cpuMaa);
lenkkariv.g.gotoAndStop(_root.cpuMaa);
kasio.g.gotoAndStop(_root.cpuMaa);
reisio.g.gotoAndStop(_root.cpuMaa);
jalkao.g.gotoAndStop(_root.cpuMaa);
lenkkario.g.gotoAndStop(_root.cpuMaa);
}
}
function countryPlayer() {
with (player.player) {
paa.g.gotoAndStop(_root.maaNumero);
kroppa.g.gotoAndStop(_root.maaNumero);
kasiv.g.gotoAndStop(_root.maaNumero);
reisiv.g.gotoAndStop(_root.maaNumero);
jalkav.g.gotoAndStop(_root.maaNumero);
lenkkariv.g.gotoAndStop(_root.maaNumero);
kasio.g.gotoAndStop(_root.maaNumero);
reisio.g.gotoAndStop(_root.maaNumero);
jalkao.g.gotoAndStop(_root.maaNumero);
lenkkario.g.gotoAndStop(_root.maaNumero);
}
}
function loopGame() {
xbar._x = player._x;
if (vaihe == "waiting") {
if ((getTimer() - startTime) > (3000 + random(2000))) {
st = 0;
vaihe = "startti";
startTime = getTimer();
startter.gotoAndPlay("st1");
startteri.gotoAndPlay("st1");
cpu.gotoAndPlay("kavely");
cpu.player.gotoAndPlay(2);
varjo2.gotoAndPlay("kavely");
countryCpu();
}
}
if (vaihe == "startti") {
if (st == 0) {
if ((getTimer() - startTime) > 500) {
player.gotoAndPlay("kavely");
player.player.gotoAndPlay(2);
varjo1.gotoAndPlay("kavely");
countryPlayer();
st++;
}
}
if (st == 1) {
if (cpu.ready && (player.ready)) {
startTime = getTimer();
player.gotoAndPlay("telineet");
cpu.gotoAndPlay("telineet");
cpu.player.gotoAndPlay(1);
countryPlayer();
countryCpu();
st++;
}
}
if (st == 2) {
if ((getTimer() - startTime) > 2000) {
startTime = getTimer();
startter.gotoAndPlay("st2");
startteri.gotoAndPlay("st2");
player.player.gotoAndPlay(3);
cpu.player.gotoAndPlay(3);
st++;
}
}
if (st == 3) {
if ((getTimer() - startTime) > (3000 + random(1000))) {
startTime = getTimer();
player.gotoAndPlay("juoksu");
startter.gotoAndPlay("st3");
startteri.gotoAndPlay("st3");
player.gotoAndPlay("juoksu");
cpu.gotoAndPlay("juoksu");
countryPlayer();
countryCpu();
_root.SFXstart.start();
v2 = v2t;
v0 = 2;
t1 = getTimer();
vaihe = "juoksu";
}
}
}
if (vaihe == "falsestart") {
if ((getTimer() - startTime) > 2200) {
if (gameOver) {
endGame3();
return(undefined);
}
st = 1;
vaihe = "startti";
startter.gotoAndPlay("st1");
startteri.gotoAndPlay("st1");
startTime = getTimer();
}
}
if ((vaihe == "juoksu") || (vaihe == "maali")) {
t2 = getTimer();
t12 = (t2 / 1000) - (t1 / 1000);
fps = 1 / ((t2 - t1) / 1000);
t1 = getTimer();
x = x + (v0 * t12);
if (x >= 100) {
if (vaihe == "juoksu") {
endGame1();
}
}
asx = asx + (v0 * t12);
rata1._x = ((-x) * (dx / 10)) + dx1;
rata2._x = ((-x) * (dx / 10)) + dx2;
rata1._rotation = (-(rata1._x - 250)) / 5;
rata2._rotation = (-(rata2._x - 250)) / 5;
if (rata1._x < -100) {
dist = dist + 10;
rata3.dist = dist;
dx1 = dx1 + (2 * dx);
if (rata3.dist != 0) {
rata3._visible = true;
}
if (dist == 110) {
rata1._visible = false;
rata3._visible = false;
}
}
if (rata2._x < -100) {
dist = dist + 10;
rata4.dist = dist;
dx2 = dx2 + (2 * dx);
if (dist == 110) {
rata2._visible = false;
rata4._visible = false;
}
}
rata3._x = rata1._x;
rata4._x = rata2._x;
stadikka._x = ((-x) * 20) + px1;
if (stadikka._x < (-_root.stadikkaLeveys)) {
px1 = px1 + _root.stadikkaLeveys;
}
torni._x = ((-x) * 20) + px8;
if (torni._x < 0) {
px8 = px8 + _root.stadikkaLeveys;
}
ruoho1._x = ((-x) * 35) + px2;
if (ruoho1._x < -660) {
px2 = px2 + 660;
}
ruoho2._x = ((-x) * 40) + px3;
if (ruoho2._x < -650) {
px3 = px3 + 650;
}
ruoho3._x = ((-x) * 80) + px4;
if (ruoho3._x < -650) {
px4 = px4 + 650;
}
startteri._x = ((-x) * (dx / 10)) + px5;
if (startteri._x < -100) {
startteri.gotoAndStop("off");
}
teline1._x = ((-x) * 70) + px6;
if (teline1._x < -100) {
teline1.gotoAndStop("off");
}
teline2._x = ((-x) * 65) + px7;
if (teline2._x < -100) {
teline2.gotoAndStop("off");
}
tdPrint = Math.round(td) + "ms";
vPrint = (Math.round(v0 * 100) / 100) + "m/s";
fpsPrint = Math.round(fps) + "fps";
fpsPrint2 = Math.round(fps2) + "fps";
if (vaihe == "juoksu") {
xPrint = Math.round(x) + "m";
tp1a = (getTimer() - startTime) / 1000;
tp1b = Math.floor(tp1a);
tp2 = (getTimer() - startTime) - (1000 * tp1b);
timePrint = ((tp1b + ".") + tp2) + "s";
}
xbar.bar1._xscale = (v0 * 10) / 1.2;
xbar.bar2._xscale = (vt * 10) / 1.2;
v0 = v0 + ((vt - v0) / inertia);
if (v0 < 0.2) {
vPrint = "0.0m/s";
as = 10;
vt = 0;
v0 = 0;
}
if (vaihe == "maali") {
if (v0 < 0.2) {
v0 = 0;
as = 10;
endGame2();
}
}
if (asx > asp) {
asx = 0;
as++;
if (as > 5) {
as = 2;
_root.SFXrun.start();
}
}
player.player.gotoAndStop(as);
playerx = px0 + (v0 * kitka);
player._x = playerx;
varjo1._x = playerx;
}
if ((((vaihe == "juoksu") || (vaihe == "maali")) || (vaihe == "tuuletus")) || (vaihe == "timeout")) {
if (x2 >= 100) {
cpumaalissa = true;
}
x2 = x2 + (v2 * t12);
asxc = asxc + (v2 * t12);
if (!cpumaalissa) {
tweak = (v0 + v2t) / 2;
if (tweak < v2t) {
v2 = v2t;
}
if (tweak >= v2t) {
v2 = tweak;
}
if (asc == 1) {
_root.SFXrun.start();
}
}
if (cpumaalissa) {
v2 = v2 * 0.9;
if (v2 < 1) {
v2 = 0;
asc = 10;
}
}
if (asxc > aspc) {
asxc = 0;
asc++;
if (asc > 5) {
asc = 2;
}
}
cpu.player.gotoAndStop(asc);
cpux = ((x2 - x) * (dx / 10)) + cx0;
cpu._x = cpux;
varjo2._x = cpux;
}
if (vaihe == "tuuletus") {
if (st == 1) {
if ((getTimer() - startTime) > 500) {
player.gotoAndPlay("tuuletus");
player.player.gotoAndPlay("v" + (random(3) + 1));
countryPlayer();
startTime = getTimer();
st = 2;
}
}
if (st == 2) {
if ((getTimer() - startTime) > 8000) {
endGame3();
}
}
}
if (vaihe == "vitutus") {
if (st == 1) {
if ((getTimer() - startTime) > 500) {
player.gotoAndPlay("vitutus");
player.player.gotoAndPlay("v" + (random(2) + 1));
countryPlayer();
startTime = getTimer();
st = 2;
}
}
if (st == 2) {
if ((getTimer() - startTime) > 8000) {
endGame3();
}
}
}
maisema.pilvi1._x--;
maisema.pilvi2._x--;
maisema.pilvi3._x--;
maisema.pilvi4._x--;
if (maisema.pilvi1._x < -50) {
maisema.pilvi1._x = 690;
maisema.pilvi1._y = random(100) + 20;
maisema.pilvi1.gotoAndStop(random(5) + 1);
}
if (maisema.pilvi2._x < -50) {
maisema.pilvi2._x = 690;
maisema.pilvi2._y = random(100) + 20;
maisema.pilvi2.gotoAndStop(random(5) + 1);
}
if (maisema.pilvi3._x < -50) {
maisema.pilvi3._x = 690;
maisema.pilvi3._y = random(100) + 20;
maisema.pilvi3.gotoAndStop(random(5) + 1);
}
if (maisema.pilvi4._x < -50) {
maisema.pilvi4._x = 690;
maisema.pilvi4._y = random(100) + 20;
maisema.pilvi4.gotoAndStop(random(5) + 1);
}
updateAfterEvent();
}
function keyTest() {
t4 = getTimer();
fps2 = 1 / ((t4 - t3) / 1000);
t3 = getTimer();
vt = vmax * Math.pow(2, -(td / 650));
td = td * 1.15;
}
function startGame() {
lk1 = 101;
lk2 = 102;
lk3 = 103;
lki = 1;
lkx = 60;
t6 = 0;
t5 = 0;
countryPlayer();
countryCpu();
v0 = 0;
vt = 0;
vmax = 12.5;
inertia = 8;
kitka = 5;
dist = 10;
x = 0;
dx = 550;
dx1 = 250;
dx2 = dx1 + dx;
rata3.dist = 0;
rata4.dist = 10;
rata3._visible = false;
rata1._x = rx1;
rata2._x = rx2;
rata3._x = rx3;
rata4._x = rx4;
rata1._rotation = rr1;
rata2._rotation = rr2;
rata1._visible = true;
rata2._visible = true;
rata3._visible = false;
rata4._visible = true;
as = 1;
asx = 0;
asp = 0.1;
player._x = px0;
x2 = 0;
v2 = 0;
v2t = 100 / (10.8 + ((random(10) + 1) / 10));
milloin = 0;
qualifying = 13000;
asc = 1;
asxc = 0;
aspc = 0.11;
cpu._x = cx0;
cpumaalissa = false;
torni._x = 560;
stadikka._x = 0;
px1 = 0;
px2 = 0;
px3 = 0;
px4 = 0;
px5 = startteri._x;
px6 = teline1._x;
px7 = teline2._x;
px8 = 0;
maisema.pilvi1._x = random(640);
maisema.pilvi1._y = random(100) + 20;
maisema.pilvi1.gotoAndStop(random(5) + 1);
maisema.pilvi1._x = random(640);
maisema.pilvi2._y = random(100) + 20;
maisema.pilvi2.gotoAndStop(random(5) + 1);
maisema.pilvi1._x = random(640);
maisema.pilvi3._y = random(100) + 20;
maisema.pilvi3.gotoAndStop(random(5) + 1);
maisema.pilvi1._x = random(640);
maisema.pilvi4._y = random(100) + 20;
maisema.pilvi4.gotoAndStop(random(5) + 1);
ta = 0;
tb = 0;
td = 100000000 /* 0x5F5E100 */;
t1 = 0;
t2 = 0;
t12 = 0;
t3 = 0;
t4 = 0;
finalTime = 0;
kS = false;
xbar.bar1._xscale = 0;
xbar.bar2._xscale = 0;
scorePrint = score;
timePrint = "0.00s";
xPrint = "0m";
vPrint = "0m/s";
qPrint = "14:000 TO QUALIFY";
startTime = getTimer();
st = 100;
vaihe = "waiting";
gameon2 = setInterval(keyTest, 10);
gameon = setInterval(loopGame, 20);
}
function endGame1() {
_root.SFXcrowd.start();
vaihe = "maali";
xPrint = "100m";
timeToScore = getTimer() - startTime;
finalTime = timeToScore / 1000;
timePrint = (Math.floor(timeToScore) / 1000) + "s";
speak(finalTime);
if (finalTime <= 18) {
scorePlus = Math.round(100 * (25.437 * Math.pow(18 - finalTime, 1.81)));
} else {
scorePlus = 0;
}
if (finalTime <= 8) {
scorePlus = 0;
finalTime = 0;
gameOver = true;
timePrint = "Cheat?";
xPrintFinal = "Cheat?";
}
score = score + scorePlus;
scorePrint = score;
startter.gotoAndPlay("finished");
}
function endGame2() {
xbar.bar1._xscale = 0;
xbar.bar2._xscale = 0;
if (timeToScore < 14000) {
vaihe = "tuuletus";
} else {
vaihe = "vitutus";
gameOver = true;
}
st = 1;
startTime = getTimer();
}
function endGame3() {
clearInterval(gameon);
clearInterval(gameon2);
Key.removeListener(KL);
_root.gotoAndPlay("top10_100m");
}
function falseStart() {
doneIt = false;
_root.SFXstart3.start();
player.gotoAndPlay("falsestart");
countryPlayer();
startter.gotoAndPlay("falsed");
startteri.gotoAndPlay("falsed");
vaihe = "falsestart";
startTime = getTimer();
_root["try" + yritys].gotoAndPlay("foul");
yritys++;
if (yritys == 4) {
gameOver = true;
}
}
function scores() {
vastaus = new LoadVars();
vastaus.onLoad = function (success) {
wrPrint = (("WR " + vastaus.pisteet1) + "s ") + vastaus.nimi1;
};
var _local2 = new LoadVars();
_local2.laji = 1;
_local2.sendAndLoad(_root.urli + "ranking.php", vastaus, "POST");
}
var vastaus = new LoadVars();
var lahetys = new LoadVars();
lahetys.sivu = "100m";
lahetys.kieli = _root.kieli;
vastaus.onLoad = function (success) {
};
lahetys.sendAndLoad(_root.urli + "stat.php", vastaus, "POST");
KC = Key.getCode;
KSp = 32;
var KL = new Object();
KL.onKeyDown = function () {
if (!(KC() === KSp)) {
} else {
if ((!kS) && (vaihe == "juoksu")) {
kS = true;
tb = getTimer();
td = tb - ta;
ta = getTimer();
t6 = getTimer();
_root["lk" + lki] = t6 - t5;
lki++;
if (lki >= 4) {
lki = 1;
}
if ((((lk1 < lkx) && (lk2 < lkx)) && (lk3 < lkx)) || ((lk1 == lk2) == lk3)) {
v0 = 0;
}
t5 = getTimer();
return(undefined);
}
if ((vaihe == "startti") && (st >= 2)) {
falseStart();
}
if (vaihe == "waiting") {
startGame2();
}
if ((vaihe == "tuuletus") || (vaihe == "vitutus")) {
endGame3();
}
kS = true;
}
};
KL.onKeyUp = function () {
if (!(KC() === KSp)) {
} else {
kS = false;
}
};
Key.addListener(KL);
wrPrint = "";
scores();
scorePlus = 0;
yritys = 1;
px0 = player._x;
cx0 = cpu._x;
rx1 = rata1._x;
rr1 = rata1._rotation;
rx2 = rata2._x;
rr2 = rata2._rotation;
rx3 = rata3._x;
rx4 = rata4._x;
rata3._visible = false;
startGame();
_root.SFXluritus1.start();
Instance of Symbol 213 MovieClip "lippulinja" in Frame 120
onClipEvent (load) {
gotoAndStop(_root.maaNumero);
}
Instance of Symbol 372 MovieClip "cpu" in Frame 120
onClipEvent (load) {
this.cpu = true;
}
Frame 129
stop();
Frame 135
fader = 0;
fi = setInterval(soundin, 50);
faderStage = 1;
Frame 144
if (gameOver) {
screens.gotoAndPlay("gameover");
screens.laji = "100m";
_root.SFXfanfaari2.start();
}
if (!gameOver) {
screens.gotoAndPlay("100m");
_root.SFXfanfaari1.start();
}
stop();
Frame 150
fader = 100;
fo = setInterval(soundout, 50);
faderStage = 1;
function loopGame() {
xbar._x = player._x;
if (vaihe == "kulma") {
return(undefined);
}
if (vaihe == "waiting") {
if ((getTimer() - startTime) > 8000) {
startter.gotoAndPlay("timeout");
startTime = getTimer();
}
}
if (((vaihe == "juoksu") || (vaihe == "hyppy")) || (vaihe == "yliastuttu")) {
t2 = getTimer();
t12 = (t2 / 1000) - (t1 / 1000);
fps = 1 / ((t2 - t1) / 1000);
t1 = getTimer();
x = x + (v0 * t12);
hx = hx + (v0 * t12);
if ((vaihe == "juoksu") || (vaihe == "yliastuttu")) {
asx = asx + (v0 * t12);
v0 = v0 + ((vt - v0) / inertia);
if (vaihe == "juoksu") {
if (v0 < 0.2) {
vPrint = "0.0m/s";
as = 10;
vt = 0;
v0 = 0;
}
checkYli();
}
if (vaihe == "yliastuttu") {
if (v0 < 0.2) {
as = 10;
v0 = 0;
player.player.gotoAndStop(as);
hx2 = "0.00";
checkHyppy();
}
}
if (asx > asp) {
asx = 0;
as++;
if (as > 5) {
as = 2;
_root.SFXrun.start();
}
}
player.player.gotoAndStop(as);
playerx = px0 + (v0 * kitka);
player._x = playerx;
xbar._x = playerx;
hyppykulma._x = playerx;
varjo1._x = playerx;
}
if (vaihe == "hyppy") {
step++;
if (step > 4) {
step = 1;
step2++;
if (step2 < 11) {
player.player.gotoAndStop(step2);
}
}
vy = vy + (-9 * t12);
y = y + (vy * t12);
player._y = py0 - (y * (dx / 10));
if (player._y > py0) {
player._y = py0;
vaihe = "hypatty";
player.player.gotoAndPlay("ylos");
}
}
if (lauta) {
rata2._x = ((-x) * (dx / 10)) + dx2;
rota = (-(rata2._x - 250)) / 5;
if ((rota > -80) && (rota < 80)) {
rata2.lauta._rotation = rota;
rata2.hiekka._rotation = rota;
}
rata4._x = ((-x) * (dx / 10)) + dx2;
}
ratav = ((-x) * (dx / 10)) + dx2;
if ((ratav < -100) && (!lauta)) {
lauta = true;
dist = dist + 30;
dx2 = dx2 + (2 * dx);
rata2._visible = true;
}
stadikka._x = ((-x) * 20) + px1;
if (stadikka._x < (-_root.stadikkaLeveys)) {
px1 = px1 + _root.stadikkaLeveys;
}
torni._x = ((-x) * 20) + px8;
if (torni._x < 0) {
px8 = px8 + _root.stadikkaLeveys;
}
ruoho1._x = ((-x) * 35) + px2;
if (ruoho1._x < -660) {
px2 = px2 + 660;
}
ruoho2._x = ((-x) * 40) + px3;
if (ruoho2._x < -650) {
px3 = px3 + 650;
}
ruoho3._x = ((-x) * 80) + px4;
if (ruoho3._x < -650) {
px4 = px4 + 650;
}
tdPrint = Math.round(td) + "ms";
vPrint = (Math.round(v0 * 100) / 100) + "m/s";
fpsPrint = Math.round(fps) + "fps";
fpsPrint2 = Math.round(fps2) + "fps";
fpsPrint3 = Math.round(fps3) + "fps";
if (vaihe == "hyppy") {
hx1a = hx * 1000;
hx1b = Math.floor(hx1a);
hx2 = hx1b / 1000;
if (hx2 < 0) {
hx2 = 0;
}
_root["xPrint" + yritys] = hx2 + "m";
xbar.bar1._xscale = 0;
xbar.bar2._xscale = 0;
}
if (vaihe == "juoksu") {
xPrint = Math.round(xv - x) + "m";
xbar.bar1._xscale = (v0 * 10) / 1.2;
xbar.bar2._xscale = (vt * 10) / 1.2;
}
}
if (vaihe == "tuuletus") {
if (st == 1) {
if ((getTimer() - startTime) > 500) {
player.gotoAndPlay("tuuletus");
player.player.gotoAndPlay("v" + (random(3) + 1));
countryPlayer();
startTime = getTimer();
st = 2;
}
}
if (st == 2) {
if ((getTimer() - startTime) > 8000) {
uudestaanko();
}
}
}
if (vaihe == "vitutus") {
if (st == 1) {
if ((getTimer() - startTime) > 500) {
player.gotoAndPlay("vitutus");
player.player.gotoAndPlay("v" + (random(2) + 1));
countryPlayer();
startTime = getTimer();
st = 2;
}
}
if (st == 2) {
if ((getTimer() - startTime) > 8000) {
uudestaanko();
}
}
}
maisema.pilvi1._x--;
maisema.pilvi2._x--;
maisema.pilvi3._x--;
maisema.pilvi4._x--;
if (maisema.pilvi1._x < -50) {
maisema.pilvi1._x = 690;
maisema.pilvi1._y = random(100) + 20;
maisema.pilvi1.gotoAndStop(random(5) + 1);
}
if (maisema.pilvi2._x < -50) {
maisema.pilvi2._x = 690;
maisema.pilvi2._y = random(100) + 20;
maisema.pilvi2.gotoAndStop(random(5) + 1);
}
if (maisema.pilvi3._x < -50) {
maisema.pilvi3._x = 690;
maisema.pilvi3._y = random(100) + 20;
maisema.pilvi3.gotoAndStop(random(5) + 1);
}
if (maisema.pilvi4._x < -50) {
maisema.pilvi4._x = 690;
maisema.pilvi4._y = random(100) + 20;
maisema.pilvi4.gotoAndStop(random(5) + 1);
}
updateAfterEvent();
}
function jump1() {
checkYli();
jumped = true;
vaihe = "kulma";
hyppykulma._visible = true;
hyppykulma._x = playerx + 70;
player.gotoAndPlay("hyppy");
player.player.gotoAndStop(1);
countryPlayer();
gameon3 = setInterval(kulmaTest, 5);
}
function jump2() {
_root.SFXheitto.start();
clearInterval(gameon3);
jumpDone = true;
vaihe = "hyppy";
hyppykulma._visible = false;
valku = 0.9 * v0;
v0 = valku * Math.cos(aste * (Math.PI/180));
vy = valku * Math.sin(aste * (Math.PI/180));
y = 0;
hx = x - xv;
t1 = getTimer();
xbar._visible = false;
}
function checkYli() {
if (player.player.hit.hitTest(rata2.lauta.hit)) {
yliastuttu = true;
if (vaihe == "juoksu") {
vaihe = "yliastuttu";
}
}
}
function checkHyppy() {
_root.SFXcrowd.start();
_root["xPrint" + yritys] = hx2 + "m";
if (yliastuttu) {
_root.SFXfoul.start();
_root["try" + yritys].gotoAndPlay("foul");
vaihe = "vitutus";
st = 1;
startTime = getTimer();
}
if (!yliastuttu) {
if (hx2 > highestScore) {
highestScore = hx2;
}
speakm(hx2);
_root["try" + yritys].gotoAndPlay("done");
vaihe = "tuuletus";
st = 1;
startTime = getTimer();
}
yritys++;
}
function startGame() {
clearInterval(gameon);
clearInterval(gameon2);
initVars();
gameon2 = setInterval(keyTest, 10);
gameon = setInterval(loopGame, 20);
player.gotoAndPlay("keskittyminen");
player.player.gotoAndPlay(1);
varjo1.gotoAndPlay("juoksu");
countryPlayer();
}
function uudestaanko() {
vaihe = "";
if (yritys == 4) {
_root.xPrintFinal = highestScore + "m";
if (highestScore < 5.5) {
gameOver = true;
}
if (highestScore > 2.2) {
scorePlus = Math.round(100 * (0.14354 * Math.pow((highestScore * 100) - 220, 1.4)));
} else {
scorePlus = 0;
}
if (highestScore > 11) {
scorePlus = 0;
highestScore = 0;
gameOver = true;
timePrint = "Cheat?";
xPrintFinal = "Cheat?";
}
score = score + scorePlus;
scorePrint = score;
clearInterval(gameon);
clearInterval(gameon2);
clearInterval(gameon3);
Key.removeListener(KL);
_root.gotoAndPlay("top10_pituushyppy");
} else {
maski.gotoAndPlay(2);
}
}
function keyTest() {
t4 = getTimer();
fps2 = 1 / ((t4 - t3) / 1000);
t3 = getTimer();
if (vaihe == "juoksu") {
vt = vmax * Math.pow(2, -(td / 400));
td = td * 1.05;
return(undefined);
}
if (vaihe == "yliastuttu") {
vt = vmax * Math.pow(2, -(td / 400));
td = td * 1.1;
}
}
function kulmaTest() {
t6 = getTimer();
fps3 = 1 / ((t6 - t5) / 1000);
t5 = getTimer();
if (aste > 80) {
aste = 80;
hyppykulma.nuoli._rotation = -aste;
hyppykulma.aste = aste;
jump2();
}
aste++;
hyppykulma.nuoli._rotation = -aste;
hyppykulma.aste = aste;
updateAfterEvent();
}
function initVars() {
lk1 = 101;
lk2 = 102;
lk3 = 103;
lki = 1;
lkx = 60;
t6 = 0;
t5 = 0;
player._x = px0;
player._y = py0;
player.gotoAndPlay("keskittyminen");
player.player.gotoAndPlay(1);
varjo1.gotoAndPlay("juoksu");
varjo1._x = px0;
countryPlayer();
v0 = 0;
vt = 0;
vmax = 12;
inertia = 8;
kitka = 5;
as = 1;
asx = 0;
asp = 0.1;
dist = 10;
x = 0;
dx = 550;
dx1 = 250;
dx2 = dx1 + dx;
rata2._visible = false;
rata2._x = rx2;
rata2._rotation = 0;
rata2.lauta._rotation = 0;
rata2.hiekka._rotation = 0;
rata4._x = rx4;
stadikka._x = 0;
px1 = 0;
px2 = 0;
px3 = 0;
px4 = 0;
px8 = 560;
torni._x = 560;
maisema.pilvi1._x = random(640);
maisema.pilvi1._y = random(100) + 20;
maisema.pilvi1.gotoAndStop(random(5) + 1);
maisema.pilvi1._x = random(640);
maisema.pilvi2._y = random(100) + 20;
maisema.pilvi2.gotoAndStop(random(5) + 1);
maisema.pilvi1._x = random(640);
maisema.pilvi3._y = random(100) + 20;
maisema.pilvi3.gotoAndStop(random(5) + 1);
maisema.pilvi1._x = random(640);
maisema.pilvi4._y = random(100) + 20;
maisema.pilvi4.gotoAndStop(random(5) + 1);
ta = 0;
tb = 0;
td = 100000000 /* 0x5F5E100 */;
t1 = 0;
t2 = 0;
t12 = 0;
t3 = 0;
t4 = 0;
t5 = 0;
t6 = 0;
t56 = 0;
step = 1;
step2 = 1;
y = 0;
vy = 0;
aste = 10;
xv = 30;
hx = 0;
jumped = false;
jumpDone = false;
lauta = false;
yliastuttu = false;
hyppykulma._visible = false;
hyppykulma._x = ax0;
xPrint = "0m";
vPrint = "0m/s";
qPrint = "5.500 TO QUALIFY";
scores();
kS = false;
xbar.bar1._xscale = 0;
xbar.bar2._xscale = 0;
xbar._visible = true;
xbar._x = player._x;
vaihe = "waiting";
startter.gotoAndStop("ready");
startTime = getTimer();
}
function scores() {
vastaus = new LoadVars();
vastaus.onLoad = function (success) {
wrPrint = (("WR " + vastaus.pisteet1) + "m ") + vastaus.nimi1;
};
var _local2 = new LoadVars();
_local2.laji = 2;
_local2.sendAndLoad(_root.urli + "ranking.php", vastaus, "POST");
}
var vastaus = new LoadVars();
var lahetys = new LoadVars();
lahetys.sivu = "pituushyppy";
lahetys.kieli = _root.kieli;
vastaus.onLoad = function (success) {
};
lahetys.sendAndLoad(_root.urli + "stat.php", vastaus, "POST");
KC = Key.getCode;
KSp = 32;
var KL = new Object();
KL.onKeyDown = function () {
switch (KC()) {
case KSp :
if ((!kS) && (vaihe == "juoksu")) {
kS = true;
tb = getTimer();
td = tb - ta;
ta = getTimer();
t6 = getTimer();
_root["lk" + lki] = t6 - t5;
lki++;
if (lki >= 4) {
lki = 1;
}
if ((((lk1 < lkx) && (lk2 < lkx)) && (lk3 < lkx)) || ((lk1 == lk2) == lk3)) {
v0 = 0;
}
t5 = getTimer();
return(undefined);
}
if (vaihe == "waiting") {
vaihe = "juoksu";
player.gotoAndPlay("juoksu");
player.player.gotoAndPlay(2);
countryPlayer();
startTime = getTimer();
}
if ((vaihe == "tuuletus") || (vaihe == "vitutus")) {
uudestaanko();
}
break;
case 17 :
if (jumped) {
break;
}
jump1();
}
};
KL.onKeyUp = function () {
switch (KC()) {
case KSp :
kS = false;
return;
case 17 :
if (jumpDone) {
break;
}
jump2();
}
};
Key.addListener(KL);
wrPrint = "";
scores();
px0 = player._x;
py0 = player._y;
ax0 = hyppykulma._x;
rx2 = rata2._x;
rr2 = rata2._rotation;
rx4 = rata4._x;
score1 = 0;
score2 = 0;
score3 = 0;
highestScore = 0;
yritys = 1;
xPrint1 = "0.00m";
xPrint2 = "0.00m";
xPrint3 = "0.00m";
xPrintFinal = "0.00m";
scorePrint = score;
scorePlus = 0;
_root.SFXluritus1.start();
startGame();
Instance of Symbol 213 MovieClip "lippulinja" in Frame 150
onClipEvent (load) {
gotoAndStop(_root.maaNumero);
}
Frame 159
stop();
Frame 166
fader = 0;
fi = setInterval(soundin, 50);
faderStage = 1;
Frame 175
if (gameOver) {
screens.gotoAndPlay("gameover");
screens.laji = "pituushyppy";
_root.SFXfanfaari2.start();
}
if (!gameOver) {
screens.gotoAndPlay("pituushyppy");
_root.SFXfanfaari1.start();
}
stop();
Frame 181
fader = 100;
fo = setInterval(soundout, 50);
faderStage = 1;
function loopGame() {
xbar._x = player._x;
if (vaihe == "waiting") {
if ((getTimer() - startTime) > 8000) {
startter.gotoAndPlay("timeout");
startTime = getTimer();
}
}
if (((vaihe == "juoksu") || (vaihe == "yliastuttu")) || (vaihe == "heitto")) {
t2 = getTimer();
t12 = (t2 / 1000) - (t1 / 1000);
fps = 1 / ((t2 - t1) / 1000);
t1 = getTimer();
x = x + (v0 * t12);
hx = hx + (v0 * t12);
rata3._x = ((-x) * (dx / 10)) + dx1;
if (rata3._x < -100) {
dist = dist + distd;
rata3.dist = dist;
dx1 = dx1 + (2 * dx);
if (dist == 0) {
distd = 10;
}
}
rata4._x = ((-x) * (dx / 10)) + dx2;
if ((rata4._x < -100) && (!lauta)) {
dist = dist + distd;
rata4.dist = dist;
dx2 = dx2 + (2 * dx);
lauta = true;
if (dist == 0) {
distd = 10;
}
}
if (lauta) {
rata2._x = ((-x) * (dx / 10)) + dx2;
if (rata2._x < -50) {
hideTrack();
}
rota = (-(rata2._x - 250)) / 5;
if ((rota > -80) && (rota < 80)) {
rata2.lauta._rotation = rota;
} else {
rata2.lauta._rotation = 0;
}
}
stadikka._x = ((-x) * 20) + px1;
if (stadikka._x < (-_root.stadikkaLeveys)) {
px1 = px1 + _root.stadikkaLeveys;
}
torni._x = ((-x) * 20) + px8;
if (torni._x < 0) {
px8 = px8 + _root.stadikkaLeveys;
}
if (ruoho1._x < -660) {
px2 = px2 + 660;
}
ruoho1._x = ((-x) * 35) + px2;
if (ruoho2._x < -650) {
px3 = px3 + 650;
}
ruoho2._x = ((-x) * 40) + px3;
if (ruoho3._x < -650) {
px4 = px4 + 650;
}
ruoho3._x = ((-x) * 80) + px4;
tdPrint = Math.round(td) + "ms";
vPrint = (Math.round(v0 * 100) / 100) + "m/s";
fpsPrint = Math.round(fps) + "fps";
fpsPrint2 = Math.round(fps2) + "fps";
if (vaihe == "heitto") {
hx1a = (hx + 2) * 1000;
hx1b = Math.floor(hx1a);
hx2 = hx1b / 1000;
if (hx2 < 0) {
hx2 = 0;
}
_root["xPrint" + yritys] = hx2 + "m";
xbar.bar1._xscale = 0;
xbar.bar2._xscale = 0;
}
if (vaihe == "juoksu") {
xPrint = Math.round(xv - x) + "m";
xbar.bar1._xscale = (v0 * 10) / 1.2;
xbar.bar2._xscale = (vt * 10) / 1.2;
}
}
if ((vaihe == "juoksu") || (vaihe == "yliastuttu")) {
asx = asx + (v0 * t12);
v0 = v0 + ((vt - v0) / inertia);
if (asx > asp) {
asx = 0;
as++;
if (as > 4) {
as = 1;
_root.SFXrun.start();
}
}
player.player.gotoAndStop(as);
playerx = px0 + (v0 * kitka);
player._x = playerx;
varjo1._x = playerx;
keihas._x = playerx + kxero;
if (vaihe == "juoksu") {
if (v0 < 0.2) {
vPrint = "0.0m/s";
as = 10;
vt = 0;
v0 = 0;
}
}
if (vaihe == "yliastuttu") {
if (v0 < 0.2) {
as = 10;
v0 = 0;
player.player.gotoAndStop(as);
_root.SFXfoul.start();
_root["try" + yritys].gotoAndPlay("foul");
yritys++;
vaihe = "lopetus";
hx2 = "0.00";
st = 1;
startTime = getTimer();
}
}
if (vaihe == "juoksu") {
if (kulma) {
if (aste >= 45) {
aste = 45;
asted = asted * -1;
}
if (aste < 15) {
aste = 15;
asted = asted * -1;
}
aste = aste + asted;
keihas._rotation = -aste;
heittokulma.aste = aste;
heittokulma._x = playerx;
}
checkYli();
}
}
if (vaihe == "heitto") {
playerx = ((phx2 - x) * (dx / 10)) + phx1;
player._x = playerx;
varjo1._x = playerx;
vy = vy + (-9 * t12);
y = y + (vy * t12);
keihas._x = px0 + (v0 * kitka);
keihas._y = ky0 - (y * (dx / 10));
keihas._rotation = (-v0) * Math.tan(vy / v0);
if (keihas.karki.hitTest(ruoho)) {
checkHeitto();
}
}
if (vaihe == "lopetus") {
if ((getTimer() - startTime) > 8000) {
uudestaanko();
}
}
maisema.pilvi1._x--;
maisema.pilvi2._x--;
maisema.pilvi3._x--;
maisema.pilvi4._x--;
if (maisema.pilvi1._x < -50) {
maisema.pilvi1._x = 690;
maisema.pilvi1._y = random(100) + 20;
maisema.pilvi1.gotoAndStop(random(5) + 1);
}
if (maisema.pilvi2._x < -50) {
maisema.pilvi2._x = 690;
maisema.pilvi2._y = random(100) + 20;
maisema.pilvi2.gotoAndStop(random(5) + 1);
}
if (maisema.pilvi3._x < -50) {
maisema.pilvi3._x = 690;
maisema.pilvi3._y = random(100) + 20;
maisema.pilvi3.gotoAndStop(random(5) + 1);
}
if (maisema.pilvi4._x < -50) {
maisema.pilvi4._x = 690;
maisema.pilvi4._y = random(100) + 20;
maisema.pilvi4.gotoAndStop(random(5) + 1);
}
updateAfterEvent();
}
function heitto1() {
heitetty = true;
heittokulma._visible = true;
kulma = true;
}
function heitto2() {
_root.SFXheitto.start();
player.player.gotoAndPlay("heitto");
lahtenyt = true;
checkYli();
vaihe = "heitto";
heittokulma._visible = false;
kulma = false;
keihas.gotoAndStop("off");
valku = 2.7 * v0;
v0 = valku * Math.cos(aste * (Math.PI/180));
vy = valku * Math.sin(aste * (Math.PI/180));
y = 0;
phx1 = player._x;
phx2 = x;
hx = x - xv;
t1 = getTimer();
xbar._visible = false;
}
function checkYli() {
if (player.player.hit.hitTest(rata2.lauta.hit)) {
yliastuttu = true;
if (vaihe == "juoksu") {
vaihe = "yliastuttu";
}
}
}
function checkHeitto() {
if (ruoho1._x < -660) {
ruoho1._x = ruoho1._x + 660;
}
if (ruoho2._x < -650) {
ruoho2._x = ruoho2._x + 650;
}
if (ruoho3._x < -650) {
ruoho3._x = ruoho3._x + 650;
}
_root.SFXkeihas.start();
_root.SFXcrowd.start();
_root["xPrint" + yritys] = hx2 + "m";
if (yliastuttu) {
_root.SFXfoul.start();
_root["try" + yritys].gotoAndPlay("foul");
}
if (!yliastuttu) {
if (hx2 > highestScore) {
highestScore = hx2;
}
speakm(hx2);
_root["try" + yritys].gotoAndPlay("done");
}
vaihe = "lopetus";
st = 1;
startTime = getTimer();
yritys++;
}
function startGame() {
clearInterval(gameon);
clearInterval(gameon2);
initVars();
gameon2 = setInterval(keyTest, 10);
gameon = setInterval(loopGame, 20);
}
function uudestaanko() {
vaihe = "";
if (yritys == 4) {
_root.xPrintFinal = highestScore + "m";
if (highestScore < 65) {
gameOver = true;
}
if (highestScore > 7) {
scorePlus = Math.round(100 * (10.14 * Math.pow(highestScore - 7, 1.08)));
} else {
scorePlus = 0;
}
if (highestScore > 100) {
scorePlus = 0;
highestScore = 0;
gameOver = true;
timePrint = "Cheat?";
xPrintFinal = "Cheat?";
}
score = score + scorePlus;
scorePrint = score;
clearInterval(gameon);
clearInterval(gameon2);
Key.removeListener(KL);
_root.gotoAndPlay("top10_keihas");
} else {
maski.gotoAndPlay(2);
}
}
function hideTrack() {
rata5.gotoAndStop(2);
lauta = false;
trace("bugikorjaus");
}
function keyTest() {
t4 = getTimer();
fps2 = 1 / ((t4 - t3) / 1000);
t3 = getTimer();
if (vaihe == "juoksu") {
vt = vmax * Math.pow(2, -(td / 400));
td = td * 1.05;
return(undefined);
}
if (vaihe == "yliastuttu") {
vt = vmax * Math.pow(2, -(td / 400));
td = td * 1.1;
}
}
function initVars() {
lk1 = 101;
lk2 = 102;
lk3 = 103;
lki = 1;
lkx = 60;
t6 = 0;
t5 = 0;
player._x = px0;
player._y = py0;
player.gotoAndPlay("keihas");
player.player.gotoAndStop("seis");
varjo1.gotoAndPlay("juoksu");
varjo1._x = px0;
countryPlayer();
v0 = 0;
vt = 0;
vmax = 12;
inertia = 8;
kitka = 5;
as = 1;
asx = 0;
asp = 0.1;
dist = 20;
distd = -10;
x = 0;
dx = 550;
dx1 = 250;
dx2 = dx1 + dx;
dx5 = dx1;
dx6 = dx2;
rata3.dist = 30;
rata4.dist = 20;
rata2._x = rx2;
rata3._x = rx3;
rata4._x = rx4;
rata2._rotation = rr2;
rata3._visible = true;
rata4._visible = true;
rata2.lauta._rotation = 0;
rata5.gotoAndStop(1);
stadikka._x = 0;
px1 = 0;
px2 = 0;
px3 = 0;
px4 = 0;
px8 = 560;
torni._x = 560;
ruoho1._x = 0;
ruoho2._x = 0;
ruoho3._x = 0;
maisema.pilvi1._x = random(640);
maisema.pilvi1._y = random(100) + 20;
maisema.pilvi1.gotoAndStop(random(5) + 1);
maisema.pilvi1._x = random(640);
maisema.pilvi2._y = random(100) + 20;
maisema.pilvi2.gotoAndStop(random(5) + 1);
maisema.pilvi1._x = random(640);
maisema.pilvi3._y = random(100) + 20;
maisema.pilvi3.gotoAndStop(random(5) + 1);
maisema.pilvi1._x = random(640);
maisema.pilvi4._y = random(100) + 20;
maisema.pilvi4.gotoAndStop(random(5) + 1);
ta = 0;
tb = 0;
td = 100000000 /* 0x5F5E100 */;
t1 = 0;
t2 = 0;
t12 = 0;
t3 = 0;
t4 = 0;
t5 = 0;
t6 = 0;
t56 = 0;
y = 0;
vy = 0;
aste = 10;
asted = 1;
xv = 30;
hx = 0;
heitetty = false;
lahtenyt = false;
lauta = false;
yliastuttu = false;
heittokulma._visible = false;
keihas._x = kx0;
keihas._y = ky0;
keihas._rotation = 0;
keihas.gotoAndStop("on");
kS = false;
xbar.bar1._xscale = 0;
xbar.bar2._xscale = 0;
xbar._visible = true;
xbar._x = player._x;
xPrint = "0m";
vPrint = "0m/s";
qPrint = "65.000 TO QUALIFY";
scores();
vaihe = "waiting";
startter.gotoAndStop("ready");
startTime = getTimer();
}
function scores() {
vastaus = new LoadVars();
vastaus.onLoad = function (success) {
wrPrint = (("WR " + vastaus.pisteet1) + " ") + vastaus.nimi1;
};
var _local2 = new LoadVars();
_local2.laji = 3;
_local2.sendAndLoad(_root.urli + "ranking.php", vastaus, "POST");
}
var vastaus = new LoadVars();
var lahetys = new LoadVars();
lahetys.sivu = "keihas";
lahetys.kieli = _root.kieli;
vastaus.onLoad = function (success) {
};
lahetys.sendAndLoad(_root.urli + "stat.php", vastaus, "POST");
KC = Key.getCode;
KSp = 32;
var KL = new Object();
KL.onKeyDown = function () {
switch (KC()) {
case KSp :
if ((!kS) && (vaihe == "juoksu")) {
kS = true;
tb = getTimer();
td = tb - ta;
ta = getTimer();
t6 = getTimer();
_root["lk" + lki] = t6 - t5;
lki++;
if (lki >= 4) {
lki = 1;
}
if ((((lk1 < lkx) && (lk2 < lkx)) && (lk3 < lkx)) || ((lk1 == lk2) == lk3)) {
v0 = 0;
}
t5 = getTimer();
return(undefined);
}
if (vaihe == "waiting") {
vaihe = "juoksu";
startTime = getTimer();
}
if (vaihe == "lopetus") {
uudestaanko();
}
break;
case 17 :
if (!(((!heitetty) && (!yliastuttu)) && (vaihe == "juoksu"))) {
break;
}
heitto1();
}
};
KL.onKeyUp = function () {
switch (KC()) {
case KSp :
kS = false;
return;
case 17 :
if (lahtenyt) {
break;
}
heitto2();
}
};
Key.addListener(KL);
wrPrint = "";
scores();
px0 = player._x;
ax0 = hyppykulma._x;
ky0 = keihas._y;
kx0 = keihas._x;
ky1 = varjo1._y;
kxero = kx0 - px0;
rx2 = rata2._x;
rr2 = rata2._rotation;
rx3 = rata3._x;
rx4 = rata4._x;
rata1._visible = false;
rata3._visible = false;
yritys = 1;
score1 = 0;
score2 = 0;
score3 = 0;
highestScore = 0;
xPrint1 = "0.00m";
xPrint2 = "0.00m";
xPrint3 = "0.00m";
xPrintFinal = "0.00m";
scorePrint = score;
scorePlus = 0;
_root.SFXluritus1.start();
startGame();
Instance of Symbol 213 MovieClip "lippulinja" in Frame 181
onClipEvent (load) {
gotoAndStop(_root.maaNumero);
}
Frame 190
stop();
Frame 196
fader = 0;
fi = setInterval(soundin, 50);
faderStage = 1;
Frame 205
if (gameOver) {
screens.gotoAndPlay("gameover");
screens.laji = "keihas";
_root.SFXfanfaari2.start();
}
if (!gameOver) {
screens.gotoAndPlay("keihas");
_root.SFXfanfaari1.start();
}
stop();
Frame 211
fader = 100;
fo = setInterval(soundout, 50);
faderStage = 1;
function loopGame() {
xbar._x = player._x;
if (vaihe == "waiting") {
if ((getTimer() - startTime) > (2000 + random(2000))) {
st = 0;
vaihe = "startti";
startTime = getTimer();
startter.gotoAndPlay("st1");
startteri.gotoAndPlay("st1");
cpu.gotoAndPlay("kavely");
cpu.player.gotoAndPlay(2);
varjo2.gotoAndPlay("kavely");
countryCpu();
}
}
if (vaihe == "startti") {
if (st == 0) {
if ((getTimer() - startTime) > 500) {
player.gotoAndPlay("kavely");
player.player.gotoAndPlay(2);
varjo1.gotoAndPlay("kavely");
countryPlayer();
st++;
}
}
if (st == 1) {
if (cpu.ready && (player.ready)) {
startTime = getTimer();
player.gotoAndPlay("telineet");
cpu.gotoAndPlay("telineet");
cpu.player.gotoAndPlay(1);
countryPlayer();
countryCpu();
st++;
}
}
if (st == 2) {
if ((getTimer() - startTime) > 2000) {
startTime = getTimer();
startter.gotoAndPlay("st2");
startteri.gotoAndPlay("st2");
player.player.gotoAndPlay(3);
cpu.player.gotoAndPlay(3);
st++;
}
}
if (st == 3) {
if ((getTimer() - startTime) > (3000 + random(1000))) {
startTime = getTimer();
player.gotoAndPlay("juoksu");
startter.gotoAndPlay("st3");
startteri.gotoAndPlay("st3");
player.gotoAndPlay("juoksu");
cpu.gotoAndPlay("juoksu");
countryPlayer();
countryCpu();
_root.SFXstart.start();
v2 = v2t;
v0 = 2;
t1 = getTimer();
vaihe = "juoksu";
}
}
}
if (vaihe == "falsestart") {
if ((getTimer() - startTime) > 2200) {
if (gameOver) {
endGame3();
return(undefined);
}
st = 1;
vaihe = "startti";
countryPlayer();
startter.gotoAndPlay("st1");
startteri.gotoAndPlay("st1");
startTime = getTimer();
}
}
if ((((((vaihe == "juoksu") || (vaihe == "maali")) || (vaihe == "tuuletus")) || (vaihe == "vitutus")) || (vaihe == "kompastuminen")) || (vaihe == "loikka")) {
t2 = getTimer();
t12 = (t2 / 1000) - (t1 / 1000);
fps = 1 / ((t2 - t1) / 1000);
t1 = getTimer();
x = x + (v0 * t12);
x2 = x2 + (v2 * t12);
if (x >= 110) {
if (vaihe == "juoksu") {
endGame1();
}
}
if (x2 >= 110) {
cpumaalissa = true;
}
asx = asx + (v0 * t12);
asxc = asxc + (v2 * t12);
rata1._x = ((-x) * (dx / 10)) + dx1;
rata2._x = ((-x) * (dx / 10)) + dx2;
rata3._x = ((-x) * (dx / 10)) + dx3;
rata4._x = ((-x) * (dx / 10)) + dx4;
rata1._rotation = (-(rata1._x - 250)) / 5;
rata2._rotation = (-(rata2._x - 250)) / 5;
rata3._rotation = (-(rata3._x - 250)) / 5;
rata4._rotation = (-(rata4._x - 250)) / 5;
if (rata1._x < -100) {
dist = dist + 10;
rata3.dist = dist;
dx1 = dx1 + (2 * dx);
dx3 = dx3 + (2 * dx);
if (rata3.dist != 0) {
rata1._visible = false;
rata3._visible = true;
}
if (dist == 120) {
rata3._visible = false;
tolpat1 = false;
}
}
if (rata2._x < -100) {
dist = dist + 10;
rata4.dist = dist;
dx2 = dx2 + (2 * dx);
dx4 = dx4 + (2 * dx);
if (dist == 110) {
rata2._visible = true;
rata4._visible = false;
tolpat2 = false;
}
}
if ((((rata3._x > -100) && (rata3._x < 700)) && (dist > 10)) && (dist < 120)) {
tolpat1 = true;
} else {
tolpat1 = false;
}
if ((((rata4._x > -100) && (rata4._x < 700)) && (dist > 0)) && (dist < 110)) {
tolpat2 = true;
} else {
tolpat2 = false;
}
if (tolpat1) {
tolppa1._x = rata3._x + (10 * Math.tan((-rata3._rotation) * (Math.PI/180)));
tolppa2._x = rata3._x + (30 * Math.tan((-rata3._rotation) * (Math.PI/180)));
tolppa3._x = rata3._x + (40 * Math.tan((-rata3._rotation) * (Math.PI/180)));
tolppa4._x = rata3._x + (70 * Math.tan((-rata3._rotation) * (Math.PI/180)));
}
if (tolpat2) {
tolppa5._x = rata4._x + (10 * Math.tan((-rata4._rotation) * (Math.PI/180)));
tolppa6._x = rata4._x + (30 * Math.tan((-rata4._rotation) * (Math.PI/180)));
tolppa7._x = rata4._x + (40 * Math.tan((-rata4._rotation) * (Math.PI/180)));
tolppa8._x = rata4._x + (70 * Math.tan((-rata4._rotation) * (Math.PI/180)));
}
stadikka._x = ((-x) * 20) + px1;
if (stadikka._x < (-_root.stadikkaLeveys)) {
px1 = px1 + _root.stadikkaLeveys;
}
torni._x = ((-x) * 20) + px8;
if (torni._x < 0) {
px8 = px8 + _root.stadikkaLeveys;
}
ruoho1._x = ((-x) * 35) + px2;
if (ruoho1._x < -660) {
px2 = px2 + 660;
}
ruoho2._x = ((-x) * 40) + px3;
if (ruoho2._x < -650) {
px3 = px3 + 650;
}
ruoho3._x = ((-x) * 80) + px4;
if (ruoho3._x < -650) {
px4 = px4 + 650;
}
startteri._x = ((-x) * (dx / 10)) + px5;
if (startteri._x < -100) {
startteri.gotoAndStop("off");
}
teline1._x = ((-x) * 70) + px6;
if (teline1._x < -100) {
teline1.gotoAndStop("off");
}
teline2._x = ((-x) * 65) + px7;
if (teline2._x < -100) {
teline2.gotoAndStop("off");
}
tdPrint = Math.round(td) + "ms";
vPrint = (Math.round(v0 * 100) / 100) + "m/s";
fpsPrint = Math.round(fps) + "fps";
fpsPrint2 = Math.round(fps2) + "fps";
if (((vaihe == "juoksu") || (vaihe == "loikka")) || (vaihe == "kompastuminen")) {
xPrint = Math.round(x) + "m";
tp1a = (getTimer() - startTime) / 1000;
tp1b = Math.floor(tp1a);
tp2 = (getTimer() - startTime) - (1000 * tp1b);
timePrint = ((tp1b + ".") + tp2) + "s";
}
v0 = v0 + ((vt - v0) / inertia);
if (v0 < 0.2) {
vPrint = "0.0m/s";
as = 10;
vt = 0;
v0 = 0;
}
if (vaihe == "maali") {
if (v0 < 0.2) {
as = 10;
v0 = 0;
player.player.gotoAndStop(as);
endGame2();
}
}
if ((vaihe == "juoksu") || (vaihe == "maali")) {
if (asx > asp) {
asx = 0;
as++;
if (as > 5) {
as = 2;
_root.SFXrun.start();
}
}
}
if (vaihe == "loikka") {
if (asx > asp) {
asx = 0;
loikka++;
}
if ((loikka > loikkafr) || (v0 < 0.2)) {
hypatty = false;
vaihe = "juoksu";
trace("done");
as = 2;
player.gotoAndPlay("juoksu");
player.player.gotoAndStop(as);
countryPlayer();
}
}
if ((vaihe == "juoksu") || (vaihe == "maali")) {
player.player.gotoAndStop(as);
}
if (vaihe == "loikka") {
player.player.gotoAndStop(loikka);
}
playerx = px0 + (v0 * kitka);
player._x = playerx;
varjo1._x = playerx;
xbar.bar1._xscale = (v0 * 10) / 1.2;
xbar.bar2._xscale = (vt * 10) / 1.2;
if (player.player.hit.hitTest(rata1) || (player.player.hit.hitTest(rata2))) {
if ((x < 105) && (x > 5)) {
kompastuminen();
}
}
if (!cpumaalissa) {
tweak = (v0 + v2t) / 2;
if (tweak < v2t) {
v2 = v2t;
}
if (tweak >= v2t) {
v2 = tweak;
}
if (asc == 1) {
_root.SFXrun.start();
}
}
if (cpumaalissa) {
v2 = v2 * 0.9;
if (v2 < 1) {
asc = 10;
v2 = 0;
cpu.player.gotoAndStop(asc);
}
}
if (!cpuhyppaa) {
if (((((((((((x2 > 8) && (x2 < 10)) || ((x2 > 18) && (x2 < 20))) || ((x2 > 28) && (x2 < 30))) || ((x2 > 38) && (x2 < 40))) || ((x2 > 48) && (x2 < 50))) || ((x2 > 58) && (x2 < 60))) || ((x2 > 68) && (x2 < 70))) || ((x2 > 78) && (x2 < 80))) || ((x2 > 88) && (x2 < 90))) || ((x2 > 98) && (x2 < 100))) {
cpuhyppy();
} else if (asxc > aspc) {
asxc = 0;
asc++;
if (asc > 5) {
asc = 2;
}
}
}
if (cpuhyppaa) {
if (asxc > aspc) {
asxc = 0;
cloikka++;
if (cloikka > cloikkafr) {
asc = 2;
cpuhyppaa = false;
cpu.gotoAndPlay("juoksu");
cpu.player.gotoAndStop(asc);
countryCpu();
}
}
}
if (!cpuhyppaa) {
cpu.player.gotoAndStop(asc);
}
if (cpuhyppaa) {
cpu.player.gotoAndStop(cloikka);
}
cpux = ((x2 - x) * (dx / 10)) + cx0;
cpu._x = cpux;
varjo2._x = cpux;
}
if (vaihe == "tuuletus") {
if (st == 1) {
if ((getTimer() - startTime) > 500) {
player.gotoAndPlay("tuuletus");
player.player.gotoAndPlay("v" + (random(3) + 1));
countryPlayer();
startTime = getTimer();
st = 2;
}
}
if (st == 2) {
if ((getTimer() - startTime) > 8000) {
endGame3();
}
}
}
if (vaihe == "vitutus") {
if (st == 1) {
if ((getTimer() - startTime) > 500) {
player.gotoAndPlay("vitutus");
player.player.gotoAndPlay("v" + (random(2) + 1));
countryPlayer();
startTime = getTimer();
st = 2;
}
}
if (st == 2) {
if ((getTimer() - startTime) > 8000) {
endGame3();
}
}
}
maisema.pilvi1._x--;
maisema.pilvi2._x--;
maisema.pilvi3._x--;
maisema.pilvi4._x--;
if (maisema.pilvi1._x < -50) {
maisema.pilvi1._x = 690;
maisema.pilvi1._y = random(100) + 20;
maisema.pilvi1.gotoAndStop(random(5) + 1);
}
if (maisema.pilvi2._x < -50) {
maisema.pilvi2._x = 690;
maisema.pilvi2._y = random(100) + 20;
maisema.pilvi2.gotoAndStop(random(5) + 1);
}
if (maisema.pilvi3._x < -50) {
maisema.pilvi3._x = 690;
maisema.pilvi3._y = random(100) + 20;
maisema.pilvi3.gotoAndStop(random(5) + 1);
}
if (maisema.pilvi4._x < -50) {
maisema.pilvi4._x = 690;
maisema.pilvi4._y = random(100) + 20;
maisema.pilvi4.gotoAndStop(random(5) + 1);
}
updateAfterEvent();
}
function hyppy1() {
_root.SFXheitto.start();
hypatty = true;
vaihe = "loikka";
loikkafr = 12;
loikka = 0;
player.gotoAndPlay("loikka");
countryPlayer();
}
function cpuhyppy() {
cloikkafr = 12;
cloikka = 0;
cpuhyppaa = true;
cpu.gotoAndPlay("loikka");
countryCpu();
}
function kompastuminen() {
x = x + 0.5;
_root.SFXaita.start();
vaihe = "kompastuminen";
player.gotoAndPlay("kompastuminen");
countryPlayer();
}
function nousu() {
hypatty = false;
vaihe = "juoksu";
player.gotoAndPlay("juoksu");
as = 2;
player.player.gotoAndStop(2);
countryPlayer();
}
function keyTest() {
t4 = getTimer();
fps2 = 1 / ((t4 - t3) / 1000);
t3 = getTimer();
vt = vmax * Math.pow(2, -(td / 400));
if (vaihe == "juoksu") {
td = td * 1.05;
return(undefined);
}
if (vaihe == "loikka") {
td = td * 1.008;
} else {
td = td * 1.1;
}
}
function startGame() {
lk1 = 101;
lk2 = 102;
lk3 = 103;
lki = 1;
lkx = 60;
t6 = 0;
t5 = 0;
countryPlayer();
countryCpu();
v0 = 0;
vt = 0;
vmax = 12;
inertia = 8;
kitka = 5;
dist = 10;
x = 0;
dx = 550;
dx0 = 250;
dx1 = 250;
dx2 = dx1 + dx;
dx3 = dx1;
dx4 = dx2;
rata3.dist = 0;
rata4.dist = 10;
rata1._x = rx1;
rata2._x = rx2;
rata3._x = rx3;
rata4._x = rx4;
rata1._rotation = rr1;
rata2._rotation = rr2;
rata3._rotation = rr1;
rata4._rotation = rr2;
rata1._visible = true;
rata2._visible = false;
rata3._visible = false;
rata4._visible = true;
tolpat1 = false;
tolpat2 = false;
as = 1;
asx = 0;
asp = 0.1;
player._x = px0;
x2 = 0;
v2 = 0;
v2t = 7.14285714285714;
milloin = 0;
qualifying = 14000;
asc = 1;
asxc = 0;
aspc = 0.11;
cpu._x = cx0;
cpumaalissa = false;
cpuhyppaa = false;
cpujuoksee = true;
stadikka._x = 0;
px1 = 0;
px2 = 0;
px3 = 0;
px4 = 0;
px5 = startteri._x;
px6 = teline1._x;
px7 = teline2._x;
px8 = 560;
torni._x = 560;
maisema.pilvi1._x = random(640);
maisema.pilvi1._y = random(100) + 20;
maisema.pilvi1.gotoAndStop(random(5) + 1);
maisema.pilvi1._x = random(640);
maisema.pilvi2._y = random(100) + 20;
maisema.pilvi2.gotoAndStop(random(5) + 1);
maisema.pilvi1._x = random(640);
maisema.pilvi3._y = random(100) + 20;
maisema.pilvi3.gotoAndStop(random(5) + 1);
maisema.pilvi1._x = random(640);
maisema.pilvi4._y = random(100) + 20;
maisema.pilvi4.gotoAndStop(random(5) + 1);
ta = 0;
tb = 0;
td = 100000000 /* 0x5F5E100 */;
t1 = 0;
t2 = 0;
t12 = 0;
t3 = 0;
t4 = 0;
finalTime = 0;
kS = false;
xbar.bar1._xscale = 0;
xbar.bar2._xscale = 0;
timePrint = "0.00s";
xPrint = "0m";
vPrint = "0m/s";
qPrint = "14:000 TO QUALIFY";
startTime = getTimer();
st = 100;
vaihe = "waiting";
gameon2 = setInterval(keyTest, 10);
gameon = setInterval(loopGame, 20);
}
function endGame1() {
_root.SFXcrowd.start();
vaihe = "maali";
xPrint = "110m";
timeToScore = getTimer() - startTime;
finalTime = timeToScore / 1000;
timePrint = (Math.floor(timeToScore) / 1000) + "s";
speak(finalTime);
if (finalTime < 28.5) {
scorePlus = Math.round(100 * (5.74352 * Math.pow(28.5 - finalTime, 1.92)));
} else {
scorePlus = 0;
}
if (finalTime <= 9) {
scorePlus = 0;
finalTime = 0;
gameOver = true;
timePrint = "Cheat?";
xPrintFinal = "Cheat?";
}
score = score + scorePlus;
scorePrint = score;
startter.gotoAndPlay("finished");
}
function endGame2() {
xbar.bar1._xscale = 0;
xbar.bar2._xscale = 0;
if (timeToScore < 14000) {
vaihe = "tuuletus";
} else {
vaihe = "vitutus";
gameOver = true;
}
st = 1;
startTime = getTimer();
}
function endGame3() {
clearInterval(gameon);
clearInterval(gameon2);
Key.removeListener(KL);
_root.gotoAndPlay("top10_110m");
}
function falseStart() {
doneIt = false;
_root.SFXstart3.start();
player.gotoAndPlay("falsestart");
countryPlayer();
startter.gotoAndPlay("falsed");
startteri.gotoAndPlay("falsed");
vaihe = "falsestart";
startTime = getTimer();
_root["try" + yritys].gotoAndPlay("foul");
yritys++;
if (yritys == 4) {
gameOver = true;
}
}
function scores() {
vastaus = new LoadVars();
vastaus.onLoad = function (success) {
wrPrint = (("WR " + vastaus.pisteet1) + "s ") + vastaus.nimi1;
};
var _local2 = new LoadVars();
_local2.laji = 4;
_local2.sendAndLoad(_root.urli + "ranking.php", vastaus, "POST");
}
var vastaus = new LoadVars();
var lahetys = new LoadVars();
lahetys.sivu = "110m aidat";
lahetys.kieli = _root.kieli;
vastaus.onLoad = function (success) {
};
lahetys.sendAndLoad(_root.urli + "stat.php", vastaus, "POST");
KC = Key.getCode;
KSp = 32;
var KL = new Object();
KL.onKeyDown = function () {
switch (KC()) {
case KSp :
if ((!kS) && (vaihe == "juoksu")) {
kS = true;
tb = getTimer();
td = tb - ta;
ta = getTimer();
t6 = getTimer();
_root["lk" + lki] = t6 - t5;
lki++;
if (lki >= 4) {
lki = 1;
}
if ((((lk1 < lkx) && (lk2 < lkx)) && (lk3 < lkx)) || ((lk1 == lk2) == lk3)) {
v0 = 0;
}
t5 = getTimer();
return(undefined);
}
if ((vaihe == "startti") && (st >= 2)) {
falseStart();
}
if (vaihe == "waiting") {
startGame2();
}
if ((vaihe == "tuuletus") || (vaihe == "vitutus")) {
endGame3();
}
break;
case 17 :
if (!((!hypatty) && (vaihe == "juoksu"))) {
break;
}
hyppy1();
}
};
KL.onKeyUp = function () {
if (!(KC() === KSp)) {
} else {
kS = false;
}
};
Key.addListener(KL);
wrPrint = "";
scores();
yritys = 1;
px0 = player._x;
cx0 = cpu._x;
rx1 = rata1._x;
rr1 = rata1._rotation;
rx2 = rata2._x;
rr2 = rata2._rotation;
rx3 = rata3._x;
rr3 = rata3._rotation;
rx4 = rata4._x;
rr4 = rata4._rotation;
rata3._visible = false;
xbar.bar1._xscale = 0;
xbar.bar2._xscale = 0;
scorePrint = score;
scorePlus = 0;
startGame();
_root.SFXluritus1.start();
Instance of Symbol 213 MovieClip "lippulinja" in Frame 211
onClipEvent (load) {
gotoAndStop(_root.maaNumero);
}
Instance of Symbol 372 MovieClip "cpu" in Frame 211
onClipEvent (load) {
this.cpu = true;
}
Frame 220
stop();
Frame 226
fader = 0;
fi = setInterval(soundin, 50);
faderStage = 1;
Frame 235
if (gameOver) {
screens.gotoAndPlay("gameover");
screens.laji = "110m";
_root.SFXfanfaari2.start();
}
if (!gameOver) {
screens.gotoAndPlay("110m");
_root.SFXfanfaari1.start();
}
stop();
Frame 242
function speakmin(tulos) {
spiikki = "n" + tulos;
_root.scoresound1 = new Sound();
_root.scoresound1.attachSound(spiikki);
_root.scoresound2 = new Sound();
_root.scoresound2.attachSound("minutestogo");
_root.scoresound1.onSoundComplete = function () {
_root.scoresound2.start();
};
_root.scoresound2.onSoundComplete = function () {
};
_root.scoresound1.start();
}
fader = 100;
fo = setInterval(soundout, 50);
faderStage = 1;
function loopGame() {
if (vaihe == "waiting") {
if ((getTimer() - startTime) > 8000) {
startter.gotoAndPlay("timeout");
startTime = getTimer();
}
}
if (vaihe == "startti") {
if (st == 0) {
if ((getTimer() - startTime) > 2000) {
st = 2;
startTime = getTimer();
startter.gotoAndPlay("st2");
}
}
if (st == 1) {
if ((getTimer() - startTime) > 2000) {
st = 2;
startTime = getTimer();
startter.gotoAndPlay("st2");
}
}
if (st == 2) {
if ((getTimer() - startTime) > (3000 + random(1000))) {
startTime = getTimer();
startter.gotoAndPlay("st3");
_root.SFXstart.start();
v2 = v2t;
t1 = getTimer();
vaihe = "juoksu";
nullTime = getTimer();
nullTime2 = getTimer();
ms = 0;
ss = 0;
mm = 0;
ms2 = 1000;
ss2 = 59;
mm2 = 11;
kello.nappiv.play();
}
}
}
if ((vaihe == "juoksu") || (vaihe == "maali")) {
t2 = getTimer();
t12 = (t2 / 1000) - (t1 / 1000);
fps = 1 / ((t2 - t1) / 1000);
t1 = getTimer();
x = x + (v0 * t12);
tcooper = getTimer() - startTime;
if (tcooper >= 720000) {
if (vaihe == "juoksu") {
endGame1();
}
}
asx = asx + (v0 * t12);
asxc = asxc + (v2 * t12);
rata1._x = ((-x) * (dx / 10)) + dx1;
rata2._x = ((-x) * (dx / 10)) + dx2;
rata1._rotation = (-(rata1._x - 250)) / 5;
rata2._rotation = (-(rata2._x - 250)) / 5;
if (rata1._x < -100) {
dist = dist + 10;
rata3.dist = dist;
dx1 = dx1 + (2 * dx);
if (rata3.dist != 0) {
rata3._visible = true;
}
}
if (rata2._x < -100) {
dist = dist + 10;
rata4.dist = dist;
dx2 = dx2 + (2 * dx);
}
rata3._x = rata1._x;
rata4._x = rata2._x;
stadikka._x = ((-x) * 20) + px1;
if (stadikka._x < (-_root.stadikkaLeveys)) {
px1 = px1 + _root.stadikkaLeveys;
}
torni._x = ((-x) * 20) + px8;
if (torni._x < 0) {
px8 = px8 + _root.stadikkaLeveys;
}
ruoho1._x = ((-x) * 35) + px2;
if (ruoho1._x < -660) {
px2 = px2 + 660;
}
ruoho2._x = ((-x) * 40) + px3;
if (ruoho2._x < -650) {
px3 = px3 + 650;
}
ruoho3._x = ((-x) * 80) + px4;
if (ruoho3._x < -650) {
px4 = px4 + 650;
}
tdPrint = Math.round(td) + "ms";
vPrint = (Math.round(v0 * 100) / 100) + "m/s";
fpsPrint = Math.round(fps) + "fps";
fpsPrint2 = Math.round(fps2) + "fps";
if (vaihe == "juoksu") {
xPrint = Math.round(x) + "m";
tp1a = (getTimer() - startTime) / 1000;
tp1b = Math.floor(tp1a);
tp2 = (getTimer() - startTime) - (1000 * tp1b);
timePrint = ((tp1b + ".") + tp2) + "s";
cooperTime = getTimer() - startTime;
ms = getTimer() - nullTime;
ms2 = 1000 - (getTimer() - nullTime);
if (ms > 1000) {
nullTime = nullTime + 1000;
ss++;
ss2--;
}
if (ss >= 60) {
ss = ss - 60;
mm++;
}
if (ss2 < 0) {
ss2 = ss2 + 60;
if (mm2 >= 1) {
speakmin(mm2);
}
mm2--;
}
msp = ms;
ssp = ss;
mmp = mm;
if ((ms < 1000) && (ms >= 100)) {
msp = ms;
}
if ((ms < 100) && (ms >= 10)) {
msp = "0" + ms;
}
if (ms < 10) {
msp = "00" + ms;
}
if ((ms <= 0) || (ms >= 1000)) {
msp = "000";
}
if (ss < 10) {
ssp = "0" + ss;
}
if (mm < 10) {
mmp = "0" + mm;
}
timePrint1 = (((mmp + ":") + ssp) + ":") + msp;
ms2p = ms2;
ss2p = ss2;
mm2p = mm2;
if ((ms2 < 1000) && (ms2 >= 100)) {
ms2p = ms2;
}
if ((ms2 < 100) && (ms2 >= 10)) {
ms2p = "0" + ms2;
}
if (ms2 < 10) {
ms2p = "00" + ms2;
}
if ((ms2 <= 0) || (ms2 >= 1000)) {
ms2p = "000";
}
if (ss2 < 10) {
ss2p = "0" + ss2;
}
if (mm2 < 10) {
mm2p = "0" + mm2;
}
timePrint2 = (((mm2p + ":") + ss2p) + ":") + ms2p;
kello.viisarim._rotation = mm * 30;
kello.viisaris._rotation = ss * 6;
}
xbar.bar1._xscale = ((v0 * 10) / 1.2) * 1.2;
xbar.bar2._xscale = ((vt * 10) / 1.2) * 1.2;
if (xbar.bar1._xscale >= 100) {
xbar.bar1._xscale = 100;
}
if (xbar.bar2._xscale >= 100) {
xbar.bar2._xscale = 100;
}
v0 = v0 + ((vt - v0) / inertia);
if (v0 < 0.2) {
vPrint = "0.0m/s";
as = 10;
vt = 0;
v0 = 0;
}
if (vaihe == "maali") {
if (v0 < 0.2) {
as = 10;
v0 = 0;
player.player.gotoAndStop(as);
endGame2();
}
}
if (asx > asp) {
asx = 0;
as++;
if (as > 5) {
as = 2;
_root.SFXrun.start();
}
}
player.player.gotoAndStop(as);
playerx = px0 + (v0 * kitka);
player._x = playerx;
varjo1._x = playerx;
xbar._x = playerx;
}
if (vaihe == "tuuletus") {
if (st == 1) {
if ((getTimer() - startTime) > 500) {
player.gotoAndPlay("tuuletus");
player.player.gotoAndPlay("v" + (random(3) + 1));
countryPlayer();
startTime = getTimer();
st = 2;
}
}
if (st == 2) {
if ((getTimer() - startTime) > 8000) {
endGame3();
}
}
}
maisema.pilvi1._x--;
maisema.pilvi2._x--;
maisema.pilvi3._x--;
maisema.pilvi4._x--;
if (maisema.pilvi1._x < -50) {
maisema.pilvi1._x = 690;
maisema.pilvi1._y = random(100) + 20;
maisema.pilvi1.gotoAndStop(random(5) + 1);
}
if (maisema.pilvi2._x < -50) {
maisema.pilvi2._x = 690;
maisema.pilvi2._y = random(100) + 20;
maisema.pilvi2.gotoAndStop(random(5) + 1);
}
if (maisema.pilvi3._x < -50) {
maisema.pilvi3._x = 690;
maisema.pilvi3._y = random(100) + 20;
maisema.pilvi3.gotoAndStop(random(5) + 1);
}
if (maisema.pilvi4._x < -50) {
maisema.pilvi4._x = 690;
maisema.pilvi4._y = random(100) + 20;
maisema.pilvi4.gotoAndStop(random(5) + 1);
}
updateAfterEvent();
}
function keyTest() {
t4 = getTimer();
fps2 = 1 / ((t4 - t3) / 1000);
t3 = getTimer();
vt = vmax * Math.pow(2, -(td / 150));
if ((vaihe == "juoksu") || (vaihe == "maali")) {
td = td * 1.1;
}
}
function startGame() {
lk1 = 101;
lk2 = 102;
lk3 = 103;
lki = 1;
lkx = 60;
t6 = 0;
t5 = 0;
countryPlayer();
v0 = 0;
vt = 0;
vmax = 12;
inertia = 8;
kitka = 5;
dist = 10;
x = 0;
dx = 550;
dx1 = 250;
dx2 = dx1 + dx;
finalx = 0;
rata3.dist = 0;
rata4.dist = 10;
rata1._x = rx1;
rata2._x = rx2;
rata3._x = rx3;
rata4._x = rx4;
rata1._rotation = rr1;
rata2._rotation = rr2;
rata1._visible = true;
rata2._visible = true;
rata3._visible = false;
rata4._visible = true;
as = 1;
asx = 0;
asp = 0.1;
player._x = px0;
stadikka._x = 0;
px1 = 0;
px2 = 0;
px3 = 0;
px4 = 0;
px8 = 560;
torni._x = 560;
maisema.pilvi1._x = random(640);
maisema.pilvi1._y = random(100) + 20;
maisema.pilvi1.gotoAndStop(random(5) + 1);
maisema.pilvi1._x = random(640);
maisema.pilvi2._y = random(100) + 20;
maisema.pilvi2.gotoAndStop(random(5) + 1);
maisema.pilvi1._x = random(640);
maisema.pilvi3._y = random(100) + 20;
maisema.pilvi3.gotoAndStop(random(5) + 1);
maisema.pilvi1._x = random(640);
maisema.pilvi4._y = random(100) + 20;
maisema.pilvi4.gotoAndStop(random(5) + 1);
ta = 0;
tb = 0;
td = 100000000 /* 0x5F5E100 */;
t1 = 0;
t2 = 0;
t12 = 0;
t3 = 0;
t4 = 0;
finalTime = 0;
kS = false;
xbar.bar1._xscale = 0;
xbar.bar2._xscale = 0;
xPrint = "0m";
vPrint = "0m/s";
qPrint = "";
timePrint1 = "00:00:00";
timePrint2 = "12:00:00";
xbar.bar1._xscale = 0;
xbar.bar2._xscale = 0;
startTime = getTimer();
st = 100;
vaihe = "waiting";
gameon2 = setInterval(keyTest, 10);
gameon = setInterval(loopGame, 20);
}
function endGame1() {
_root.SFXcrowd.start();
vaihe = "maali";
timePrint1 = "12:00:00";
timePrint2 = "00:00:00";
xPrint = Math.ceil(x) + "m";
finalx = Math.ceil(x);
speakm(finalx);
startter.gotoAndPlay("finished");
kello.viisarim._rotation = 0;
kello.viisaris._rotation = 0;
kello.nappip.play();
}
function endGame2() {
xbar.bar1._xscale = 0;
xbar.bar2._xscale = 0;
vaihe = "tuuletus";
st = 1;
startTime = getTimer();
}
function endGame3() {
_root.SFXluritus1.stop();
clearInterval(gameon);
clearInterval(gameon2);
Key.removeListener(KL);
_root.gotoAndPlay("top10_cooper");
}
function scores() {
vastaus = new LoadVars();
vastaus.onLoad = function (success) {
wrPrint = (("WR " + vastaus.pisteet1) + "m ") + vastaus.nimi1;
};
var _local2 = new LoadVars();
_local2.laji = 5;
_local2.sendAndLoad(_root.urli + "ranking.php", vastaus, "POST");
}
var vastaus = new LoadVars();
var lahetys = new LoadVars();
lahetys.sivu = "cooper";
lahetys.kieli = _root.kieli;
vastaus.onLoad = function (success) {
};
lahetys.sendAndLoad(_root.urli + "stat.php", vastaus, "POST");
KC = Key.getCode;
KSp = 32;
var KL = new Object();
KL.onKeyDown = function () {
if (!(KC() === KSp)) {
} else {
if ((!kS) && (vaihe == "juoksu")) {
kS = true;
tb = getTimer();
td = tb - ta;
ta = getTimer();
t6 = getTimer();
_root["lk" + lki] = t6 - t5;
lki++;
if (lki >= 4) {
lki = 1;
}
if ((((lk1 < lkx) && (lk2 < lkx)) && (lk3 < lkx)) || ((lk1 == lk2) == lk3)) {
v0 = 0;
}
t5 = getTimer();
return(undefined);
}
if (vaihe == "startti") {
}
if (vaihe == "waiting") {
st = 0;
vaihe = "startti";
startTime = getTimer();
startter.gotoAndPlay("st1");
}
if (vaihe == "tuuletus") {
endGame3();
}
}
};
KL.onKeyUp = function () {
if (!(KC() === KSp)) {
} else {
kS = false;
}
};
Key.addListener(KL);
wrPrint = "";
scores();
px0 = player._x;
rx1 = rata1._x;
rr1 = rata1._rotation;
rx2 = rata2._x;
rr2 = rata2._rotation;
rx3 = rata3._x;
rx4 = rata4._x;
rata3._visible = false;
player.gotoAndPlay("juoksu");
player.player.gotoAndStop(2);
varjo1.gotoAndPlay("juoksu");
scorePrint = "BONUS";
_root.SFXluritus1.start();
startGame();
Instance of Symbol 213 MovieClip "lippulinja" in Frame 242
onClipEvent (load) {
gotoAndStop(_root.maaNumero);
}
Frame 251
stop();
Frame 257
fader = 0;
fi = setInterval(soundin, 50);
faderStage = 1;
Frame 266
screens.gotoAndPlay("cooper");
_root.SFXfanfaari1.start();
stop();
Symbol 73 MovieClip Frame 1
stop();
Symbol 73 MovieClip Frame 2
stop();
Symbol 73 MovieClip Frame 3
stop();
Instance of Symbol 73 MovieClip in Symbol 74 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndStop(_root.kieli);
}
Symbol 78 MovieClip Frame 30
_root.SFXintro.start();
Symbol 78 MovieClip Frame 105
_root.gotoAndPlay("looppiin");
stop();
Symbol 91 MovieClip Frame 1
stop();
Symbol 91 MovieClip Frame 2
stop();
Symbol 91 MovieClip Frame 3
stop();
Symbol 91 MovieClip Frame 4
stop();
Symbol 91 MovieClip Frame 5
stop();
Symbol 91 MovieClip Frame 6
stop();
Symbol 91 MovieClip Frame 7
stop();
Symbol 91 MovieClip Frame 8
stop();
Symbol 91 MovieClip Frame 9
stop();
Symbol 91 MovieClip Frame 10
stop();
Instance of Symbol 91 MovieClip "g" in Symbol 92 MovieClip Frame 1
onClipEvent (load) {
if (this._parent._parent._parent.cpu) {
this.gotoAndStop(_root.cpuMaa);
} else {
this.gotoAndStop(_root.maaNumero);
}
}
Symbol 95 MovieClip Frame 1
gotoAndPlay(random(30) + 1);
Symbol 112 MovieClip Frame 1
stop();
Symbol 112 MovieClip Frame 2
stop();
Symbol 112 MovieClip Frame 3
stop();
Symbol 112 MovieClip Frame 4
stop();
Symbol 112 MovieClip Frame 5
stop();
Symbol 112 MovieClip Frame 6
stop();
Symbol 112 MovieClip Frame 7
stop();
Symbol 112 MovieClip Frame 8
stop();
Symbol 112 MovieClip Frame 9
stop();
Symbol 112 MovieClip Frame 10
stop();
Instance of Symbol 112 MovieClip "g" in Symbol 113 MovieClip Frame 1
onClipEvent (load) {
if (this._parent._parent._parent.cpu) {
this.gotoAndStop(_root.cpuMaa);
} else {
this.gotoAndStop(_root.maaNumero);
}
}
Symbol 130 MovieClip Frame 1
stop();
Symbol 130 MovieClip Frame 2
stop();
Symbol 130 MovieClip Frame 3
stop();
Symbol 130 MovieClip Frame 4
stop();
Symbol 130 MovieClip Frame 5
stop();
Symbol 130 MovieClip Frame 6
stop();
Symbol 130 MovieClip Frame 7
stop();
Symbol 130 MovieClip Frame 8
stop();
Symbol 130 MovieClip Frame 9
stop();
Symbol 130 MovieClip Frame 10
stop();
Instance of Symbol 130 MovieClip "g" in Symbol 131 MovieClip Frame 1
onClipEvent (load) {
if (this._parent._parent._parent.cpu) {
this.gotoAndStop(_root.cpuMaa);
} else {
this.gotoAndStop(_root.maaNumero);
}
}
Symbol 140 MovieClip Frame 1
stop();
Symbol 140 MovieClip Frame 2
stop();
Symbol 140 MovieClip Frame 3
stop();
Symbol 140 MovieClip Frame 4
stop();
Symbol 140 MovieClip Frame 5
stop();
Symbol 140 MovieClip Frame 6
stop();
Symbol 140 MovieClip Frame 7
stop();
Symbol 140 MovieClip Frame 8
stop();
Symbol 140 MovieClip Frame 9
stop();
Symbol 140 MovieClip Frame 10
stop();
Instance of Symbol 140 MovieClip "g" in Symbol 141 MovieClip Frame 1
onClipEvent (load) {
if (this._parent._parent._parent.cpu) {
this.gotoAndStop(_root.cpuMaa);
} else {
this.gotoAndStop(_root.maaNumero);
}
}
Symbol 151 MovieClip Frame 1
stop();
Symbol 151 MovieClip Frame 2
stop();
Symbol 151 MovieClip Frame 3
stop();
Symbol 151 MovieClip Frame 4
stop();
Symbol 151 MovieClip Frame 5
stop();
Symbol 151 MovieClip Frame 6
stop();
Symbol 151 MovieClip Frame 7
stop();
Symbol 151 MovieClip Frame 8
stop();
Symbol 151 MovieClip Frame 9
stop();
Symbol 151 MovieClip Frame 10
stop();
Instance of Symbol 151 MovieClip "g" in Symbol 152 MovieClip Frame 1
onClipEvent (load) {
if (this._parent._parent._parent.cpu) {
this.gotoAndStop(_root.cpuMaa);
} else {
this.gotoAndStop(_root.maaNumero);
}
}
Symbol 163 MovieClip Frame 1
stop();
Symbol 163 MovieClip Frame 2
stop();
Symbol 163 MovieClip Frame 3
stop();
Symbol 163 MovieClip Frame 4
stop();
Symbol 163 MovieClip Frame 5
stop();
Symbol 163 MovieClip Frame 6
stop();
Symbol 163 MovieClip Frame 7
stop();
Symbol 163 MovieClip Frame 8
stop();
Symbol 163 MovieClip Frame 9
stop();
Symbol 163 MovieClip Frame 10
stop();
Instance of Symbol 163 MovieClip "g" in Symbol 164 MovieClip Frame 1
onClipEvent (load) {
if (this._parent._parent._parent.cpu) {
this.gotoAndStop(_root.cpuMaa);
} else {
this.gotoAndStop(_root.maaNumero);
}
}
Symbol 175 MovieClip Frame 1
stop();
Symbol 175 MovieClip Frame 2
stop();
Symbol 175 MovieClip Frame 3
stop();
Symbol 175 MovieClip Frame 4
stop();
Symbol 175 MovieClip Frame 5
stop();
Symbol 175 MovieClip Frame 6
stop();
Symbol 175 MovieClip Frame 7
stop();
Symbol 175 MovieClip Frame 8
stop();
Symbol 175 MovieClip Frame 9
stop();
Symbol 175 MovieClip Frame 10
stop();
Instance of Symbol 175 MovieClip "g" in Symbol 176 MovieClip Frame 1
onClipEvent (load) {
if (this._parent._parent._parent.cpu) {
this.gotoAndStop(_root.cpuMaa);
} else {
this.gotoAndStop(_root.maaNumero);
}
}
Symbol 178 MovieClip Frame 1
stop();
Instance of Symbol 185 MovieClip in Symbol 187 MovieClip Frame 1
onClipEvent (load) {
c = 1;
y0 = this._y;
yh = 0;
}
onClipEvent (enterFrame) {
c++;
if (c > 16) {
c = 1;
this._y = this._y - 20;
yh = yh - 20;
if (yh < -140) {
c = 1;
this._y = this._y + 140;
yh = yh + 140;
}
}
}
Symbol 213 MovieClip Frame 1
stop();
Symbol 213 MovieClip Frame 2
stop();
Symbol 213 MovieClip Frame 3
stop();
Symbol 213 MovieClip Frame 4
stop();
Symbol 213 MovieClip Frame 5
stop();
Symbol 213 MovieClip Frame 6
stop();
Symbol 213 MovieClip Frame 7
stop();
Symbol 213 MovieClip Frame 8
stop();
Symbol 213 MovieClip Frame 9
stop();
Symbol 213 MovieClip Frame 10
stop();
Symbol 266 MovieClip Frame 1
stop();
Symbol 266 MovieClip Frame 2
stop();
Symbol 266 MovieClip Frame 3
function scores() {
vastaus = new LoadVars();
vastaus.onLoad = function (success) {
lajittele();
};
var _local2 = new LoadVars();
_local2.laji = 10;
_local2.sendAndLoad(_root.urli + "ranking.php", vastaus, "POST");
}
function lajittele() {
i = 1;
while (i < 11) {
this["n" + i] = eval ("vastaus.nimi" + i);
this["m" + i] = eval ("vastaus.maa" + i);
this["l" + i].gotoAndStop(eval ("vastaus.maa" + i));
this["p" + i] = eval ("vastaus.pisteet" + i);
i++;
}
}
scores();
stop();
Symbol 266 MovieClip Frame 4
function scores() {
vastaus = new LoadVars();
vastaus.onLoad = function (success) {
lajittele();
};
var _local2 = new LoadVars();
_local2.laji = 1;
_local2.sendAndLoad(_root.urli + "ranking.php", vastaus, "POST");
}
function lajittele() {
i = 1;
while (i < 4) {
this["n" + i] = eval ("vastaus.nimi" + i);
this["m" + i] = eval ("vastaus.maa" + i);
this["l" + i].gotoAndStop(eval ("vastaus.maa" + i));
this["p" + i] = eval ("vastaus.pisteet" + i) + "s";
i++;
}
}
scores();
stop();
Symbol 266 MovieClip Frame 5
function scores() {
vastaus = new LoadVars();
vastaus.onLoad = function (success) {
lajittele();
};
var _local2 = new LoadVars();
_local2.laji = 2;
_local2.sendAndLoad(_root.urli + "ranking.php", vastaus, "POST");
}
function lajittele() {
i = 1;
while (i < 4) {
this["n" + i] = eval ("vastaus.nimi" + i);
this["m" + i] = eval ("vastaus.maa" + i);
this["l" + i].gotoAndStop(eval ("vastaus.maa" + i));
this["p" + i] = eval ("vastaus.pisteet" + i) + "m";
i++;
}
}
scores();
stop();
Symbol 266 MovieClip Frame 6
function scores() {
vastaus = new LoadVars();
vastaus.onLoad = function (success) {
lajittele();
};
var _local2 = new LoadVars();
_local2.laji = 3;
_local2.sendAndLoad(_root.urli + "ranking.php", vastaus, "POST");
}
function lajittele() {
i = 1;
while (i < 4) {
this["n" + i] = eval ("vastaus.nimi" + i);
this["m" + i] = eval ("vastaus.maa" + i);
this["l" + i].gotoAndStop(eval ("vastaus.maa" + i));
this["p" + i] = eval ("vastaus.pisteet" + i) + "m";
i++;
}
}
scores();
stop();
Symbol 266 MovieClip Frame 7
function scores() {
vastaus = new LoadVars();
vastaus.onLoad = function (success) {
lajittele();
};
var _local2 = new LoadVars();
_local2.laji = 4;
_local2.sendAndLoad(_root.urli + "ranking.php", vastaus, "POST");
}
function lajittele() {
i = 1;
while (i < 4) {
this["n" + i] = eval ("vastaus.nimi" + i);
this["m" + i] = eval ("vastaus.maa" + i);
this["l" + i].gotoAndStop(eval ("vastaus.maa" + i));
this["p" + i] = eval ("vastaus.pisteet" + i) + "s";
i++;
}
}
scores();
stop();
Symbol 266 MovieClip Frame 8
function scores() {
vastaus = new LoadVars();
vastaus.onLoad = function (success) {
lajittele();
};
var _local2 = new LoadVars();
_local2.laji = 5;
_local2.sendAndLoad(_root.urli + "ranking.php", vastaus, "POST");
}
function lajittele() {
i = 1;
while (i < 4) {
this["n" + i] = eval ("vastaus.nimi" + i);
this["m" + i] = eval ("vastaus.maa" + i);
this["l" + i].gotoAndStop(eval ("vastaus.maa" + i));
this["p" + i] = eval ("vastaus.pisteet" + i) + "m";
i++;
}
}
scores();
stop();
Symbol 267 MovieClip Frame 1
if (!_root.aloitettu) {
_root.mySound = new Sound();
_root.mySound.loadSound("looppi.mp3", true);
_root.mySound.onSoundComplete = function () {
_root.mySound.loadSound("looppi.mp3", true);
};
_root.SFXfanfaari1.start();
}
if (!_root.aloitettu) {
i = 1;
} else {
i = 3;
}
_root.SFXintro.start();
_root.aloitettu = true;
eka = true;
Symbol 267 MovieClip Frame 16
if (eka) {
_root.maaNumero = 1;
eka = false;
} else {
_root.maaNumero = random(10) + 1;
}
Symbol 267 MovieClip Frame 25
startTime = getTimer();
this.onEnterFrame = function () {
if ((getTimer() - startTime) > 3000) {
delete this.onEnterFrame;
play();
}
};
stop();
Symbol 267 MovieClip Frame 41
introt.gotoAndPlay(i);
i++;
if (i > 8) {
i = 3;
}
Symbol 267 MovieClip Frame 50
startTime = getTimer();
this.onEnterFrame = function () {
if ((getTimer() - startTime) > 3500) {
delete this.onEnterFrame;
play();
}
};
stop();
Symbol 267 MovieClip Frame 65
gotoAndPlay ("loop");
Symbol 268 Button
on (press) {
_root.jatka();
}
Symbol 293 MovieClip Frame 1
stop();
Symbol 323 MovieClip Frame 1
stop();
Symbol 323 MovieClip Frame 2
stop();
Symbol 323 MovieClip Frame 3
stop();
Symbol 323 MovieClip Frame 4
stop();
Symbol 323 MovieClip Frame 5
stop();
Symbol 323 MovieClip Frame 6
stop();
Symbol 323 MovieClip Frame 7
stop();
Symbol 323 MovieClip Frame 8
stop();
Symbol 323 MovieClip Frame 9
stop();
Symbol 323 MovieClip Frame 10
stop();
Symbol 323 MovieClip Frame 11
stop();
Symbol 331 MovieClip Frame 1
stop();
Symbol 331 MovieClip Frame 11
stop();
Instance of Symbol 185 MovieClip in Symbol 331 MovieClip Frame 11
onClipEvent (load) {
c = 1;
y0 = this._y;
yh = 0;
}
onClipEvent (enterFrame) {
c++;
if (c > 16) {
c = 1;
this._y = this._y - 20;
yh = yh - 20;
if (yh < -140) {
c = 1;
this._y = this._y + 140;
yh = yh + 140;
}
}
}
Symbol 332 MovieClip Frame 1
stop();
Symbol 332 MovieClip Frame 11
if ((_root.kieli == 1) || (_root.kieli == 2)) {
_parent.gotoAndPlay("formi");
}
if (_root.kieli == 3) {
_parent.gotoAndPlay("top10");
}
Symbol 333 MovieClip Frame 1
stop();
Symbol 333 MovieClip Frame 11
_root.gotoAndPlay(minne);
_parent.gotoAndStop("off");
Symbol 337 MovieClip Frame 1
stop();
Symbol 337 MovieClip Frame 9
gotoAndPlay (2);
Symbol 346 MovieClip Frame 1
stop();
Symbol 346 MovieClip Frame 2
stop();
Symbol 346 MovieClip Frame 3
stop();
Symbol 346 MovieClip Frame 4
stop();
Symbol 346 MovieClip Frame 5
stop();
Symbol 346 MovieClip Frame 6
stop();
Symbol 346 MovieClip Frame 7
stop();
Symbol 346 MovieClip Frame 8
stop();
Symbol 346 MovieClip Frame 9
stop();
Symbol 346 MovieClip Frame 10
stop();
Instance of Symbol 346 MovieClip "g" in Symbol 347 MovieClip Frame 1
onClipEvent (load) {
if (this._parent._parent._parent.cpu) {
this.gotoAndStop(_root.cpuMaa);
} else {
this.gotoAndStop(_root.maaNumero);
}
}
Symbol 355 MovieClip Frame 1
stop();
Symbol 355 MovieClip Frame 2
stop();
Symbol 355 MovieClip Frame 3
stop();
Symbol 355 MovieClip Frame 4
stop();
Symbol 355 MovieClip Frame 5
stop();
Symbol 355 MovieClip Frame 6
stop();
Symbol 355 MovieClip Frame 7
stop();
Symbol 355 MovieClip Frame 8
stop();
Symbol 355 MovieClip Frame 9
stop();
Symbol 355 MovieClip Frame 10
stop();
Instance of Symbol 355 MovieClip "g" in Symbol 356 MovieClip Frame 1
onClipEvent (load) {
if (this._parent._parent._parent.cpu) {
this.gotoAndStop(_root.cpuMaa);
} else {
this.gotoAndStop(_root.maaNumero);
}
}
Symbol 357 MovieClip Frame 2
stop();
Symbol 357 MovieClip Frame 3
stop();
Symbol 357 MovieClip Frame 4
stop();
Symbol 361 MovieClip Frame 10
stop();
Symbol 363 MovieClip Frame 29
_root.checkHyppy();
stop();
Symbol 364 MovieClip Frame 10
gotoAndPlay ("v1");
Symbol 364 MovieClip Frame 20
gotoAndPlay ("v2");
Symbol 364 MovieClip Frame 30
gotoAndPlay ("v3");
Symbol 367 MovieClip Frame 10
gotoAndPlay ("v1");
Symbol 367 MovieClip Frame 20
gotoAndPlay ("v2");
Symbol 367 MovieClip Frame 30
gotoAndPlay ("v3");
Symbol 368 MovieClip Frame 1
stop();
Symbol 368 MovieClip Frame 5
stop();
Symbol 368 MovieClip Frame 10
stop();
Symbol 369 MovieClip Frame 1
stop();
Symbol 370 MovieClip Frame 22
_root.nousu();
Symbol 372 MovieClip Frame 1
stop();
Symbol 372 MovieClip Frame 2
ready = false;
Symbol 372 MovieClip Frame 20
player.gotoAndStop(1);
Symbol 372 MovieClip Frame 24
ready = true;
stop();
Symbol 372 MovieClip Frame 34
stop();
Symbol 372 MovieClip Frame 45
stop();
Symbol 372 MovieClip Frame 55
stop();
Symbol 372 MovieClip Frame 65
stop();
Symbol 372 MovieClip Frame 75
stop();
Symbol 372 MovieClip Frame 85
stop();
Symbol 372 MovieClip Frame 95
stop();
Symbol 372 MovieClip Frame 105
stop();
Symbol 372 MovieClip Frame 115
stop();
Symbol 372 MovieClip Frame 125
stop();
Symbol 373 MovieClip Frame 1
stop();
Instance of Symbol 185 MovieClip in Symbol 373 MovieClip Frame 11
onClipEvent (load) {
c = 1;
y0 = this._y;
yh = 0;
}
onClipEvent (enterFrame) {
c++;
if (c > 16) {
c = 1;
this._y = this._y - 20;
yh = yh - 20;
if (yh < -140) {
c = 1;
this._y = this._y + 140;
yh = yh + 140;
}
}
}
Instance of Symbol 372 MovieClip in Symbol 373 MovieClip Frame 11
onClipEvent (load) {
gotoAndPlay ("tuuletus");
player.gotoAndPlay("v" + (random(3) + 1));
}
Symbol 373 MovieClip Frame 20
stop();
Symbol 373 MovieClip Frame 30
_parent.record = false;
gotoAndStop ("off");
Symbol 374 MovieClip Frame 1
stop();
Symbol 374 MovieClip Frame 11
stop();
Symbol 375 Button
on (press) {
eteenpain();
}
Symbol 413 MovieClip Frame 1
stop();
Symbol 413 MovieClip Frame 11
if (!_root.gameOver) {
_parent.gotoAndPlay("cooperiin");
} else {
_parent.gotoAndPlay("top10");
}
Instance of Symbol 185 MovieClip in Symbol 436 MovieClip Frame 1
onClipEvent (load) {
c = 1;
y0 = this._y;
yh = 0;
}
onClipEvent (enterFrame) {
c++;
if (c > 16) {
c = 1;
this._y = this._y - 20;
yh = yh - 20;
if (yh < -140) {
c = 1;
this._y = this._y + 140;
yh = yh + 140;
}
}
}
Symbol 441 Button
on (press) {
_parent.ei();
}
on (rollOver) {
gotoAndStop (1);
_parent.yes.gotoAndStop(2);
_parent.choice = 0;
}
Symbol 445 Button
on (press) {
_parent.kylla();
}
on (rollOver) {
gotoAndStop (1);
_parent.no.gotoAndStop(2);
_parent.choice = 1;
}
Symbol 452 Button
on (release) {
gotoAndStop (1);
}
Symbol 453 MovieClip Frame 1
stop();
Symbol 453 MovieClip Frame 2
var vastaus = new LoadVars();
var lahetys = new LoadVars();
lahetys.sivu = "saannot";
lahetys.kieli = _root.kieli;
vastaus.onLoad = function (success) {
};
lahetys.sendAndLoad(_root.urli + "stat.php", vastaus, "POST");
stop();
Symbol 456 MovieClip Frame 1
go = false;
stop();
Symbol 456 MovieClip Frame 30
if (go) {
_parent._parent.gotoAndPlay("formiout");
}
Symbol 459 Button
on (release) {
gotoAndStop (3);
}
Symbol 460 Button
on (release) {
gotoAndStop (2);
}
Symbol 463 Button
on (release) {
gotoAndStop (1);
}
Symbol 464 MovieClip Frame 1
_root.asiakas = "ei";
_root.lupa = "ei";
stop();
Symbol 464 MovieClip Frame 2
_root.asiakas = "kylla";
_root.lupa = "ei";
stop();
Symbol 464 MovieClip Frame 3
_root.asiakas = "ei";
_root.lupa = "lupa";
stop();
Symbol 469 Button
on (release) {
_parent.pois();
}
Symbol 470 MovieClip Frame 1
stop();
Symbol 473 Button
on (release) {
_parent.laheta();
}
Symbol 474 MovieClip Frame 1
stop();
Symbol 491 Button
on (release) {
saannot.gotoAndStop(2);
}
Symbol 515 MovieClip Frame 1
Symbol 515 MovieClip Frame 170
gotoAndPlay ("loop");
Symbol 520 Button
on (release) {
gotoAndStop (1);
}
Symbol 521 MovieClip Frame 1
stop();
Symbol 521 MovieClip Frame 2
var vastaus = new LoadVars();
var lahetys = new LoadVars();
lahetys.sivu = "saannot";
lahetys.kieli = _root.kieli;
vastaus.onLoad = function (success) {
};
lahetys.sendAndLoad(_root.urli + "stat.php", vastaus, "POST");
stop();
Symbol 522 Button
on (release) {
gotoAndStop (3);
}
Symbol 523 Button
on (release) {
gotoAndStop (2);
}
Symbol 524 Button
on (release) {
gotoAndStop (1);
}
Symbol 525 MovieClip Frame 1
_root.asiakas = "nej";
_root.lupa = "nej";
stop();
Symbol 525 MovieClip Frame 2
_root.asiakas = "ja";
_root.lupa = "nej";
stop();
Symbol 525 MovieClip Frame 3
_root.asiakas = "nej";
_root.lupa = "ja";
stop();
Symbol 528 MovieClip Frame 1
stop();
Symbol 531 MovieClip Frame 1
stop();
Symbol 540 Button
on (release) {
saannot.gotoAndStop(2);
}
Symbol 558 MovieClip Frame 1
Symbol 558 MovieClip Frame 41
stop();
Symbol 558 MovieClip Frame 170
gotoAndPlay ("loop");
Symbol 559 MovieClip Frame 1
function laheta() {
palaute = "";
if (ETUNIMI.text.length == 0) {
palaute = "Kirjoita nimesi.";
error.gotoAndPlay("pop");
Selection.setFocus(ETUNIMI);
return(undefined);
}
if (SUKUNIMI.text.length == 0) {
palaute = "Kirjoita nimesi.";
Selection.setFocus(SUKUNIMI);
error.gotoAndPlay("pop");
return(undefined);
}
if (OSOITE.text.length == 0) {
palaute = "Kirjoita osoitteesi.";
Selection.setFocus(OSOITE);
error.gotoAndPlay("pop");
return(undefined);
}
if (POSTINRO.text.length == 0) {
palaute = "Kirjoita postinumerosi.";
Selection.setFocus(POSTINRO);
error.gotoAndPlay("pop");
return(undefined);
}
if (POSTITMP.text.length == 0) {
palaute = "Kirjoita kaupunki.";
Selection.setFocus(POSTITMP);
error.gotoAndPlay("pop");
return(undefined);
}
if ((_root.lupa == "kylla") && (EMAIL.text.length == 0)) {
palaute = "Kirjoita s\u00E4hk\u00F6postiosoitteesi.";
Selection.setFocus(EMAIL);
error.gotoAndPlay("pop");
return(undefined);
}
startTime = getTimer();
timeri = true;
lahetaButton._visible = false;
var vastaus = new LoadVars();
vastaus.onLoad = function (success) {
trace(vastaus);
if (success) {
delete this.onEnterFrame;
timeri = false;
palaute = "Kiitos.";
error.gotoAndPlay("pop");
error.go = true;
return(undefined);
}
palaute = "Yhteys palvelimeen ei onnistunut.";
error.gotoAndPlay("pop");
timeri = false;
lahetaButton._visible = true;
return(undefined);
};
var _local3 = new LoadVars();
_local3.id = 1;
_local3.kieli = _root.kieli;
_local3.nimimerkki = _root.nimi;
_local3.pisteet = _root.score;
_local3.etunimi = ETUNIMI.text;
_local3.sukunimi = SUKUNIMI.text;
_local3.osoite = OSOITE.text;
_local3.pnumero = "P" + POSTINRO.text;
_local3.paikka = POSTITMP.text;
_local3.puhelin = "P" + PUHELIN.text;
_local3.email = EMAIL.text;
_local3.asiakas = _root.asiakas;
_local3.tarjous = _root.lupa;
_local3.user = _root.user;
if (KAVERI1.text.length != 0) {
_local3.kaveri1 = KAVERI1.text;
}
if (KAVERI2.text.length != 0) {
_local3.kaveri2 = KAVERI2.text;
}
_local3.sendAndLoad(_root.urli + "formi.php", vastaus, "POST");
trace(_local3);
}
function pois() {
var _local5 = new LoadVars();
var _local4 = new LoadVars();
_local4.sivu = "uusi peli";
_local4.kieli = _root.kieli;
_local5.onLoad = function (success) {
};
_local4.sendAndLoad(_root.urli + "stat.php", _local5, "POST");
_parent.gotoAndPlay("formiout");
delete this.onEnterFrame;
}
tick.b.tabEnabled = false;
radios.b1.button.tabEnabled = false;
radios.b2.button.tabEnabled = false;
lahetaButton.b.tabEnabled = false;
ETUNIMI.tabIndex = 1;
SUKUNIMI.tabIndex = 2;
OSOITE.tabIndex = 3;
POSTINRO.tabIndex = 4;
POSTITMP.tabIndex = 5;
PUHELIN.tabIndex = 6;
EMAIL.tabIndex = 7;
KAVERI1.tabIndex = 8;
KAVERI2.tabIndex = 9;
Selection.setFocus(ETUNIMI);
this.onEnterFrame = function () {
if (timeri) {
nowTime = getTimer();
if ((nowTime - startTime) > 5000) {
palaute = "Timeout. Yrit\u00E4 uudelleen.";
error.gotoAndPlay("pop");
timeri = false;
lahetaButton._visible = true;
}
}
};
stop();
Instance of Symbol 470 MovieClip "peliinButton" in Symbol 559 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
nextFrame();
} else {
prevFrame();
}
}
Instance of Symbol 474 MovieClip "lahetaButton" in Symbol 559 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
nextFrame();
} else {
prevFrame();
}
}
Symbol 559 MovieClip Frame 11
function laheta() {
palaute = "";
if (ETUNIMI.text.length == 0) {
palaute = "Fyll i ditt f\u00F6rnamn, tack.";
error.gotoAndPlay("pop");
Selection.setFocus(ETUNIMI);
return(undefined);
}
if (SUKUNIMI.text.length == 0) {
palaute = "Fyll i ditt efternamn, tack.";
Selection.setFocus(SUKUNIMI);
error.gotoAndPlay("pop");
return(undefined);
}
if (OSOITE.text.length == 0) {
palaute = "Fyll i din adress, tack.";
Selection.setFocus(OSOITE);
error.gotoAndPlay("pop");
return(undefined);
}
if (POSTINRO.text.length == 0) {
palaute = "Fyll i ditt postnummer, tack.";
Selection.setFocus(POSTINRO);
error.gotoAndPlay("pop");
return(undefined);
}
if (POSTITMP.text.length == 0) {
palaute = "Fyll i ort, tack.";
Selection.setFocus(POSTITMP);
error.gotoAndPlay("pop");
return(undefined);
}
if (SLOGAN.text.length == 0) {
palaute = "Fyll i slogan, tack.";
Selection.setFocus(SLOGAN);
error.gotoAndPlay("pop");
return(undefined);
}
if ((_root.lupa == "kylla") && (EMAIL.text.length == 0)) {
palaute = "Fyll i e-postadress, tack.";
Selection.setFocus(EMAIL);
error.gotoAndPlay("pop");
return(undefined);
}
startTime = getTimer();
timeri = true;
lahetaButton._visible = false;
var vastaus = new LoadVars();
vastaus.onLoad = function (success) {
trace(vastaus);
if (success) {
delete this.onEnterFrame;
timeri = false;
palaute = "Tack!";
error.gotoAndPlay("pop");
error.go = true;
return(undefined);
}
palaute = "Det uppstod ett fel i kommunikationen med servern. Var sn\u00E4ll och f\u00F6rs\u00F6k igen.";
error.gotoAndPlay("pop");
timeri = false;
lahetaButton._visible = true;
return(undefined);
};
var _local3 = new LoadVars();
_local3.id = 1;
_local3.kieli = _root.kieli;
_local3.nimimerkki = _root.nimi;
_local3.pisteet = _root.score;
_local3.etunimi = ETUNIMI.text;
_local3.sukunimi = SUKUNIMI.text;
_local3.osoite = OSOITE.text;
_local3.pnumero = "P" + POSTINRO.text;
_local3.paikka = POSTITMP.text;
_local3.puhelin = "P" + PUHELIN.text;
_local3.email = EMAIL.text;
_local3.slogan = SLOGAN.text;
_local3.asiakas = _root.asiakas;
_local3.tarjous = _root.lupa;
_local3.user = _root.user;
if (KAVERI1.text.length != 0) {
_local3.kaveri1 = KAVERI1.text;
}
if (KAVERI2.text.length != 0) {
_local3.kaveri2 = KAVERI2.text;
}
_local3.sendAndLoad(_root.urli + "formi.php", vastaus, "POST");
}
function pois() {
var _local5 = new LoadVars();
var _local4 = new LoadVars();
_local4.sivu = "uusi peli";
_local4.kieli = _root.kieli;
_local5.onLoad = function (success) {
};
_local4.sendAndLoad(_root.urli + "stat.php", _local5, "POST");
_parent.gotoAndPlay("formiout");
delete this.onEnterFrame;
}
tick.b.tabEnabled = false;
radios.b1.button.tabEnabled = false;
radios.b2.button.tabEnabled = false;
lahetaButton.b.tabEnabled = false;
ETUNIMI.tabIndex = 1;
SUKUNIMI.tabIndex = 2;
OSOITE.tabIndex = 3;
POSTINRO.tabIndex = 4;
POSTITMP.tabIndex = 5;
PUHELIN.tabIndex = 6;
EMAIL.tabIndex = 7;
SLOGAN.tabIndex = 8;
KAVERI1.tabIndex = 9;
KAVERI2.tabIndex = 10;
Selection.setFocus(ETUNIMI);
this.onEnterFrame = function () {
if (timeri) {
nowTime = getTimer();
if ((nowTime - startTime) > 5000) {
palaute = "Det uppstod ett fel i kommunikationen med servern. Var sn\u00E4ll och f\u00F6rs\u00F6k igen.";
error.gotoAndPlay("pop");
timeri = false;
lahetaButton._visible = true;
}
}
};
stop();
Instance of Symbol 528 MovieClip "peliinButton" in Symbol 559 MovieClip Frame 11
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
nextFrame();
} else {
prevFrame();
}
}
Instance of Symbol 531 MovieClip "lahetaButton" in Symbol 559 MovieClip Frame 11
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
nextFrame();
} else {
prevFrame();
}
}
Symbol 560 Button
on (press) {
peliin();
}
Symbol 585 MovieClip Frame 2
stop();
Symbol 585 MovieClip Frame 11
function eteenpain() {
delete this.onEnterFrame;
Key.removeListener(keyListener);
go.play();
gotoAndPlay(laji);
}
var keyListener = new Object();
keyListener.onKeyDown = function () {
if (!(Key.getCode() === 32)) {
} else {
eteenpain();
}
};
Key.addListener(keyListener);
startTime = getTimer();
this.onEnterFrame = function () {
if ((getTimer() - startTime) > 3500) {
eteenpain();
}
};
go.gotoAndPlay("on");
stop();
Symbol 585 MovieClip Frame 21
function scores() {
vastaus = new LoadVars();
vastaus.onLoad = function (success) {
lajittele();
};
var _local2 = new LoadVars();
_local2.laji = 1;
if (_root.finalTime != 0) {
_local2.nimi = escape(_root.nimi);
_local2.maa = _root.maaNumero;
_local2.pisteet = _root.finalTime;
}
_local2.user = _root.user;
_local2.sendAndLoad(_root.urli + "ranking.php", vastaus, "POST");
}
function lajittele() {
i = 1;
while (i < 4) {
this["n" + i] = eval ("vastaus.nimi" + i);
this["m" + i] = eval ("vastaus.maa" + i);
this["l" + i].gotoAndStop(eval ("vastaus.maa" + i));
this["p" + i] = eval ("vastaus.pisteet" + i) + "s";
i++;
}
if ((vastaus.sijoitus == 1) && (!_root.gameOver)) {
wr.gotoAndPlay("wr");
record = true;
}
maski3.play();
}
function eteenpain() {
if (record) {
wr.gotoAndPlay("pois");
return(undefined);
}
if (!record) {
Key.removeListener(keyListener);
if (_root.gameOver) {
maski2.gotoAndPlay(2);
} else {
maski.gotoAndPlay(2);
maski.minne = "intro_pituushyppy";
}
}
}
i = 1;
while (i < 4) {
this["n" + i] = "";
this["m" + i] = "";
this["l" + i].gotoAndStop(1);
this["p" + i] = "";
i++;
}
var keyListener = new Object();
keyListener.onKeyDown = function () {
if (!(Key.getCode() === 32)) {
} else {
eteenpain();
}
};
scores();
Key.addListener(keyListener);
scorePrint1 = "+" + _root.scorePlus;
scorePrint2 = "=" + _root.score;
onFocus.useHandCursor = false;
stop();
Symbol 585 MovieClip Frame 31
function scores() {
vastaus = new LoadVars();
vastaus.onLoad = function (success) {
lajittele();
};
var _local2 = new LoadVars();
_local2.laji = 2;
if (_root.highestScore != 0) {
_local2.nimi = escape(_root.nimi);
_local2.maa = _root.maaNumero;
_local2.pisteet = _root.highestScore;
}
_local2.user = _root.user;
_local2.sendAndLoad(_root.urli + "ranking.php", vastaus, "POST");
}
function lajittele() {
i = 1;
while (i < 4) {
this["n" + i] = eval ("vastaus.nimi" + i);
this["m" + i] = eval ("vastaus.maa" + i);
this["l" + i].gotoAndStop(eval ("vastaus.maa" + i));
this["p" + i] = eval ("vastaus.pisteet" + i) + "m";
i++;
}
if (vastaus.sijoitus == 1) {
wr.gotoAndPlay("wr");
record = true;
}
maski3.play();
}
function eteenpain() {
if (record) {
wr.gotoAndPlay("pois");
return(undefined);
}
if (!record) {
Key.removeListener(keyListener);
if (_root.gameOver) {
maski2.gotoAndPlay(2);
} else {
maski.gotoAndPlay(2);
maski.minne = "intro_keihas";
}
}
}
i = 1;
while (i < 4) {
this["n" + i] = "";
this["m" + i] = "";
this["l" + i].gotoAndStop(1);
this["p" + i] = "";
i++;
}
var keyListener = new Object();
keyListener.onKeyDown = function () {
if (!(Key.getCode() === 32)) {
} else {
eteenpain();
}
};
scores();
Key.addListener(keyListener);
scorePrint1 = "+" + _root.scorePlus;
scorePrint2 = "=" + _root.score;
onFocus.useHandCursor = false;
stop();
Symbol 585 MovieClip Frame 41
function scores() {
vastaus = new LoadVars();
vastaus.onLoad = function (success) {
lajittele();
};
var _local2 = new LoadVars();
_local2.laji = 3;
if (_root.highestScore != 0) {
_local2.nimi = escape(_root.nimi);
_local2.maa = _root.maaNumero;
_local2.pisteet = _root.highestScore;
}
_local2.user = _root.user;
_local2.sendAndLoad(_root.urli + "ranking.php", vastaus, "POST");
}
function lajittele() {
i = 1;
while (i < 4) {
this["n" + i] = eval ("vastaus.nimi" + i);
this["m" + i] = eval ("vastaus.maa" + i);
this["l" + i].gotoAndStop(eval ("vastaus.maa" + i));
this["p" + i] = eval ("vastaus.pisteet" + i) + "m";
i++;
}
if (vastaus.sijoitus == 1) {
wr.gotoAndPlay("wr");
record = true;
}
maski3.play();
}
function eteenpain() {
if (record) {
wr.gotoAndPlay("pois");
return(undefined);
}
if (!record) {
Key.removeListener(keyListener);
if (_root.gameOver) {
maski2.gotoAndPlay(2);
} else {
maski.gotoAndPlay(2);
maski.minne = "intro_110m";
}
}
}
i = 1;
while (i < 4) {
this["n" + i] = "";
this["m" + i] = "";
this["l" + i].gotoAndStop(1);
this["p" + i] = "";
i++;
}
var keyListener = new Object();
keyListener.onKeyDown = function () {
if (!(Key.getCode() === 32)) {
} else {
eteenpain();
}
};
scores();
Key.addListener(keyListener);
scorePrint1 = "+" + _root.scorePlus;
scorePrint2 = "=" + _root.score;
onFocus.useHandCursor = false;
stop();
Symbol 585 MovieClip Frame 51
function scores() {
vastaus = new LoadVars();
vastaus.onLoad = function (success) {
lajittele();
};
var _local2 = new LoadVars();
_local2.laji = 4;
if (_root.finalTime != 0) {
_local2.nimi = escape(_root.nimi);
_local2.maa = _root.maaNumero;
_local2.pisteet = _root.finalTime;
}
_local2.user = _root.user;
_local2.sendAndLoad(_root.urli + "ranking.php", vastaus, "POST");
}
function lajittele() {
i = 1;
while (i < 4) {
this["n" + i] = eval ("vastaus.nimi" + i);
this["m" + i] = eval ("vastaus.maa" + i);
this["l" + i].gotoAndStop(eval ("vastaus.maa" + i));
this["p" + i] = eval ("vastaus.pisteet" + i) + "s";
i++;
}
if ((vastaus.sijoitus == 1) && (!_root.gameOver)) {
wr.gotoAndPlay("wr");
record = true;
}
maski3.play();
}
function eteenpain() {
if (record) {
wr.gotoAndPlay("pois");
return(undefined);
}
if (!record) {
Key.removeListener(keyListener);
if ((_root.kieli == 1) || (_root.kieli == 2)) {
maski2.gotoAndPlay(2);
}
if (_root.kieli == 3) {
maski4.gotoAndPlay(2);
}
}
}
i = 1;
while (i < 4) {
this["n" + i] = "";
this["m" + i] = "";
this["l" + i].gotoAndStop(1);
this["p" + i] = "";
i++;
}
var keyListener = new Object();
keyListener.onKeyDown = function () {
if (!(Key.getCode() === 32)) {
} else {
eteenpain();
}
};
scores();
Key.addListener(keyListener);
scorePrint1 = "+" + _root.scorePlus;
scorePrint2 = "=" + _root.score;
onFocus.useHandCursor = false;
stop();
Symbol 585 MovieClip Frame 61
function scores() {
vastaus = new LoadVars();
vastaus.onLoad = function (success) {
lajittele();
};
var _local2 = new LoadVars();
_local2.laji = 5;
_local2.nimi = escape(_root.nimi);
_local2.maa = _root.maaNumero;
_local2.pisteet = _root.finalx;
_local2.user = _root.user;
_local2.sendAndLoad(_root.urli + "ranking.php", vastaus, "POST");
}
function lajittele() {
i = 1;
while (i < 4) {
this["n" + i] = eval ("vastaus.nimi" + i);
this["m" + i] = eval ("vastaus.maa" + i);
this["l" + i].gotoAndStop(eval ("vastaus.maa" + i));
this["p" + i] = eval ("vastaus.pisteet" + i) + "m";
i++;
}
if (vastaus.sijoitus == 1) {
wr.gotoAndPlay("wr");
record = true;
}
maski3.play();
}
function eteenpain() {
if (record) {
wr.gotoAndPlay("pois");
return(undefined);
}
if (!record) {
Key.removeListener(keyListener);
gotoAndPlay ("cooperout");
}
}
i = 1;
while (i < 4) {
this["n" + i] = "";
this["m" + i] = "";
this["l" + i].gotoAndStop(1);
this["p" + i] = "";
i++;
}
var keyListener = new Object();
keyListener.onKeyDown = function () {
if (!(Key.getCode() === 32)) {
} else {
eteenpain();
}
};
scores();
Key.addListener(keyListener);
scorePrint1 = "+" + _root.scorePlus;
scorePrint2 = "=" + _root.score;
onFocus.useHandCursor = false;
stop();
Instance of Symbol 372 MovieClip in Symbol 585 MovieClip Frame 61
onClipEvent (load) {
gotoAndPlay ("tuuletus");
player.gotoAndPlay("v" + (random(3) + 1));
}
Symbol 585 MovieClip Frame 71
var vastaus = new LoadVars();
var lahetys = new LoadVars();
lahetys.kieli = _root.kieli;
lahetys.sivu = "cooper ohi";
vastaus.onLoad = function (success) {
};
lahetys.sendAndLoad(_root.urli + "stat.php", vastaus, "POST");
Symbol 585 MovieClip Frame 91
function eteenpain() {
Key.removeListener(keyListener);
play();
}
var keyListener = new Object();
keyListener.onKeyDown = function () {
if (!(Key.getCode() === 32)) {
} else {
eteenpain();
}
};
Key.addListener(keyListener);
stop();
Symbol 585 MovieClip Frame 100
_root.gotoAndPlay("looppiin2");
stop();
Symbol 585 MovieClip Frame 111
yes.gotoAndStop(1);
no.gotoAndStop(2);
choice = 1;
Symbol 585 MovieClip Frame 120
function kylla() {
trace("kylla");
Key.removeListener(keyListener);
maski.gotoAndPlay(2);
maski.minne = "intro_cooper";
}
function ei() {
trace("ei");
Key.removeListener(keyListener);
play();
}
var keyListener = new Object();
keyListener.onKeyDown = function () {
switch (Key.getCode()) {
case 32 :
if (choice == 1) {
kylla();
} else {
ei();
}
break;
case 37 :
_root.SFXklikki1.start();
choice = 1;
yes.gotoAndStop(1);
no.gotoAndStop(2);
break;
case 39 :
_root.SFXklikki1.start();
choice = 0;
yes.gotoAndStop(2);
no.gotoAndStop(1);
}
};
Key.addListener(keyListener);
stop();
Symbol 585 MovieClip Frame 130
gotoAndPlay ("top10");
stop();
Symbol 585 MovieClip Frame 141
var vastaus = new LoadVars();
var lahetys = new LoadVars();
lahetys.sivu = "formi";
lahetys.kieli = _root.kieli;
vastaus.onLoad = function (success) {
};
lahetys.sendAndLoad(_root.urli + "stat.php", vastaus, "POST");
if (_root.kieli == 1) {
formit.gotoAndStop("suomi");
}
if (_root.kieli == 2) {
formit.gotoAndStop("ruotsi");
}
stop();
Symbol 585 MovieClip Frame 160
if (!_root.gameOver) {
gotoAndPlay ("cooperiin");
}
Symbol 585 MovieClip Frame 161
function scores() {
vastaus = new LoadVars();
vastaus.onLoad = function (success) {
lajittele();
};
var _local2 = new LoadVars();
_local2.laji = 10;
if (_root.score != 0) {
_local2.nimi = escape(_root.nimi);
_local2.maa = _root.maaNumero;
_local2.pisteet = _root.score;
}
_local2.user = _root.user;
_local2.sendAndLoad(_root.urli + "ranking.php", vastaus, "POST");
}
function lajittele() {
trace(vastaus);
i = 1;
while (i < 11) {
this["n" + i] = eval ("vastaus.nimi" + i);
this["m" + i] = eval ("vastaus.maa" + i);
this["l" + i].gotoAndStop(eval ("vastaus.maa" + i));
this["p" + i] = eval ("vastaus.pisteet" + i);
i++;
}
if (_root.score != 0) {
pistePrint = "YOUR SCORE IS " + _root.score;
sijoitusPrint = ("YOUR RANKING IS " + vastaus.sijoitus) + ".";
} else {
pistePrint = "YOU DIDN'T RANK";
sijoitusPrint = "";
}
maski3.play();
}
function peliin() {
Key.removeListener(keyListener);
gotoAndPlay ("alkuun");
}
var keyListener = new Object();
keyListener.onKeyDown = function () {
if (!(Key.getCode() === 32)) {
} else {
peliin();
}
};
Key.addListener(keyListener);
pistePrint = "";
sijoitusPrint = "";
onFocus.useHandCursor = false;
scores();
stop();
Symbol 585 MovieClip Frame 180
_root.gotoAndPlay("looppiin2");
Symbol 594 MovieClip Frame 1
stop();
Symbol 594 MovieClip Frame 11
_root.SFXstart1.start();
stop();
Symbol 594 MovieClip Frame 41
_root.SFXstart2.start();
stop();
Symbol 594 MovieClip Frame 101
gotoAndStop (1);
Symbol 594 MovieClip Frame 120
stop();
Symbol 594 MovieClip Frame 130
stop();
Symbol 594 MovieClip Frame 161
gotoAndStop (1);
Symbol 598 MovieClip Frame 1
stop();
Symbol 598 MovieClip Frame 11
stop();
Symbol 598 MovieClip Frame 21
stop();
Symbol 616 MovieClip Frame 1
stop();
Symbol 616 MovieClip Frame 21
stop();
Symbol 616 MovieClip Frame 29
stop();
Symbol 619 MovieClip Frame 1
stop();
Symbol 619 MovieClip Frame 11
stop();
Symbol 639 MovieClip Frame 10
stop();
Symbol 639 MovieClip Frame 35
stop();
Symbol 639 MovieClip Frame 58
stop();
Symbol 639 MovieClip Frame 75
stop();
Symbol 639 MovieClip Frame 95
stop();
Symbol 639 MovieClip Frame 108
stop();
Symbol 676 MovieClip Frame 1
stop();
Symbol 676 MovieClip Frame 2
stop();
Symbol 676 MovieClip Frame 3
stop();
Symbol 676 MovieClip Frame 4
stop();
Symbol 676 MovieClip Frame 5
stop();
Symbol 727 MovieClip Frame 1
stop();
Symbol 727 MovieClip Frame 11
_root.initVars();
Symbol 732 MovieClip Frame 1
stop();
Symbol 732 MovieClip Frame 2
stop();
Symbol 749 MovieClip Frame 1
stop();
Symbol 749 MovieClip Frame 2
stop();
Symbol 774 MovieClip Frame 1
stop();
Symbol 777 MovieClip Frame 1
stop();