Frame 1
function initPreloading() {
onEnterFrame = function () {
loaded = Math.round((this.getBytesLoaded() / this.getBytesTotal()) * 100);
if ((loadingStatus + 1) <= loaded) {
loadingStatus = loadingStatus + 1;
}
};
}
var addScore_script = "http://www.gamesfreak.net/htj2/php/addscore.php";
var getTable_script = "http://www.gamesfreak.net/htj2/php/gettable.php";
var notify_PLAYED_script = "http://www.gamesfreak.net/htj2/stats/played.php";
var notify_CLICKED_script = "http://www.gamesfreak.net/htj2/stats/clicked.php";
if (this._url.substr(0, 16) == "http://localhost") {
addScore_script = "php/addscore.php";
getTable_script = "php/gettable.php";
notify_PLAYED_script = "php/addscore.php";
notify_CLICKED_script = "php/addscore.php";
notify_PLAYED_script = "stats/played.php";
notify_CLICKED_script = "stats/clicked.php";
}
fscommand ("showmenu", "false");
Stage.showMenu = false;
var loaded = 0;
var loadingStatus = 0;
stop();
var TEST_MODE = false;
var NL = new LoadVars();
NL.load(notify_PLAYED_script);
Frame 2
var countriesARR = ["argentina", "australia", "austria", "belgium", "bolivia", "brasil", "bulgaria", "cameroon", "canada", "chile", "china", "colombia", "costarica", "cuba", "czechrepublic", "denmark", "ecuador", "egypt", "finland", "france", "germany", "ghana", "greece", "hungary", "iceland", "indonesia", "india", "iran", "iraq", "ireland", "israel", "italy", "jamaica", "japan", "kenya", "liechtenstein", "lithuania", "luxembourg", "malaysia", "marocco", "netherlands", "newzealand", "nigeria", "northkorea", "norway", "pakistan", "peru", "poland", "republicofmacedonia", "republicofmali", "republicofsouthafrica", "romania", "russia", "slovakia", "southkorea", "sweden", "switzerland", "thebahamas", "tunesia", "turkey", "uae", "ukraine", "unitedkingdom", "uruguay", "usa", "venezuela", "spain", "portugal"];
var namesARR = ["Argentina", "Australia", "Austria", "Belgium", "Bolivia", "Brasil", "Bulgaria", "Cameroon", "Canada", "Chile", "China", "Colombia", "Costa Rica", "Cuba", "Czech Republic", "Denmark", "Ecuador", "Egypt", "Finland", "France", "Germany", "Ghana", "Greece", "Hungary", "Iceland", "Indonesia", "India", "Iran", "Iraq", "Ireland", "Israel", "Italy", "Jamaica", "Japan", "Kenya", "Liechtenstein", "Lithuania", "Luxembourg", "Malaysia", "Marocco", "Netherlands", "New Zealand", "Nigeria", "North Korea", "Norway", "Pakistan", "Peru", "Poland", "Republic of Macedonia", "Republic of Mali", "Republic of South Africa", "Romania", "Russia", "Slovakia", "South Korea", "Sweden", "Switzerland", "The Bahamas", "Tunesia", "Turkey", "UAE", "Ukraine", "United Kingdom", "Uruguay", "USA", "Venezuela", "Spain", "Portugal"];
var orderARR = ["argentina", "australia", "austria", "belgium", "bolivia", "brasil", "bulgaria", "cameroon", "canada", "chile", "china", "colombia", "costarica", "cuba", "czechrepublic", "denmark", "ecuador", "egypt", "finland", "france", "germany", "ghana", "greece", "hungary", "iceland", "indonesia", "india", "iran", "iraq", "ireland", "israel", "italy", "jamaica", "japan", "kenya", "liechtenstein", "lithuania", "luxembourg", "malaysia", "marocco", "netherlands", "newzealand", "nigeria", "northkorea", "norway", "pakistan", "peru", "poland", "portugal", "republicofmacedonia", "republicofmali", "republicofsouthafrica", "romania", "russia", "slovakia", "southkorea", "spain", "sweden", "switzerland", "thebahamas", "tunesia", "turkey", "uae", "ukraine", "unitedkingdom", "uruguay", "usa", "venezuela"];
var norderARR = ["Argentina", "Australia", "Austria", "Belgium", "Bolivia", "Brasil", "Bulgaria", "Cameroon", "Canada", "Chile", "China", "Colombia", "Costa Rica", "Cuba", "Czech Republic", "Denmark", "Ecuador", "Egypt", "Finland", "France", "Germany", "Ghana", "Greece", "Hungary", "Iceland", "Indonesia", "India", "Iran", "Iraq", "Ireland", "Israel", "Italy", "Jamaica", "Japan", "Kenya", "Liechtenstein", "Lithuania", "Luxembourg", "Malaysia", "Marocco", "Netherlands", "New Zealand", "Nigeria", "North Korea", "Norway", "Pakistan", "Peru", "Poland", "Portugal", "Republic of Macedonia", "Republic of Mali", "Republic of South Africa", "Romania", "Russia", "Slovakia", "South Korea", "Spain", "Sweden", "Switzerland", "The Bahamas", "Tunesia", "Turkey", "UAE", "Ukraine", "United Kingdom", "Uruguay", "USA", "Venezuela", "Spain", "Portugal"];
function countryI(c) {
var _local1 = 0;
while (_local1 < countriesARR.length) {
if (countriesARR[_local1] == c) {
return(_local1);
}
_local1++;
}
return(0);
}
function findCountryID(ct) {
var _local1 = 0;
while (_local1 < countriesARR.length) {
if (ct == countriesARR[_local1]) {
return(_local1);
}
_local1++;
}
}
function valid(n, dbg) {
if (n == "Your nickname...") {
dbg.text = "ENTER YOUR NICK!";
return(false);
}
if (n.length < 3) {
dbg.text = "TOO SHORT!";
return(false);
}
if (n.length > 20) {
dbg.text = "TOO LONG!";
return(false);
}
var _local2 = [" ", "~", "`", "!", "$", "#", "%", "^", "&", "*", "(", ")", "{", "}", "[", "]", "+", "=", ".", ",", "/", "\\", "?", ":", ";", ">", "<", "'"];
var _local1 = 0;
while (_local1 < _local2.length) {
if (n.split(_local2[_local1]).length > 1) {
dbg.text = "FORBIDDEN CHARS!";
return(false);
}
_local1++;
}
return(true);
}
var qualifyLimit = 15;
var conditionFnX = 0;
var debuger = new Debug(this);
new Button_luk(ok);
var playerName;
var playerCountry = countryI("poland");
if (TEST_MODE) {
playerName = "MACIEK";
playerCountry = countryI("poland");
gotoAndPlay(_currentframe + 1);
}
imie.text = "test";
ustawienia.mc.ok.onRelease = function () {
if (valid(ustawienia.mc.imie.text, ustawienia.mc.dbg)) {
playerName = ustawienia.mc.imie.text.toUpperCase();
playerCountry = findCountryID(orderARR[ustawienia.mc.wybierz_kraj.def]);
gotoAndPlay(_currentframe + 1);
}
};
stop();
Frame 3
function loadTable(f) {
XML.prototype.ignoreWhite = true;
var _local6 = new XML();
_local6.load((f + "?") + getTimer());
_local6.onLoad = function (success) {
if (success) {
table_loader._visible = false;
var _local2 = this.firstChild.firstChild;
tempData = new Array();
while (_local2) {
tempData.push({name:_local2.attributes.name, country:_local2.attributes.country, score:_local2.attributes.score});
_local2 = _local2.nextSibling;
}
showStats();
}
};
}
function showStats() {
stats.bpl = tempData[0].name;
stats.bc = tempData[0].country - 1;
stats.bestplayerpoints = tempData[0].score;
initCountriesTable(tempData);
stats.cn = countrytable[0].name;
stats.cf = countriesARR[countrytable[0].country];
stats.bestcountrypoints = countrytable[0].score;
var _local4 = new Array();
stats.pllist = "";
var _local2 = 0;
while (_local2 < tempData.length) {
if (tempData[_local2].country == (countrytable[0].country + 1)) {
var _local3 = false;
var _local1 = 0;
while ((_local1 < _local4.length) && (!_local3)) {
if (_local4[_local1] == tempData[_local2].name) {
_local3 = true;
}
_local1++;
}
if (!_local3) {
_local4.push(tempData[_local2].name);
}
}
_local2++;
}
stats.pllist = _local4.join(", ");
stats.gotoAndPlay(2);
}
function initCountriesTable(plArr) {
countrytable = new Array();
var _local1 = 0;
while (_local1 < countriesARR.length) {
countrytable.push({country:_local1, name:namesARR[_local1], score:countryPoints(_local1 + 1, plArr)});
_local1++;
}
countrytable.sortOn("score", Array.NUMERIC | Array.DESCENDING);
}
function countryPoints(c, plArr) {
var _local3 = 0;
var _local1 = 0;
while (_local1 < plArr.length) {
if (plArr[_local1].country == c) {
_local3 = _local3 + Number(plArr[_local1].score);
}
_local1++;
}
return(_local3);
}
var tempData;
var countrytable;
loadTable(getTable_script);
stop();
Frame 4
tabela_krajow._accProps = new Object();
tabela_krajow._accProps.forceSimple = true;
var tournaments = [[{id:2, liczba_serii:3, dystans_start:1, dystans_koniec:2}, {id:5, liczba_serii:3, dystans_start:2, dystans_koniec:2}, {id:7, liczba_serii:3, dystans_start:2, dystans_koniec:3}, {id:6, liczba_serii:2, dystans_start:1, dystans_koniec:3}], [{id:11, liczba_serii:3, dystans_start:1, dystans_koniec:2}, {id:10, liczba_serii:3, dystans_start:2, dystans_koniec:2}, {id:8, liczba_serii:3, dystans_start:2, dystans_koniec:3}, {id:9, liczba_serii:2, dystans_start:1, dystans_koniec:3}], [], [{id:0, liczba_serii:4, dystans_start:3, dystans_koniec:3}, {id:1, liczba_serii:3, dystans_start:1, dystans_koniec:2}, {id:4, liczba_serii:3, dystans_start:2, dystans_koniec:3}, {id:6, liczba_serii:4, dystans_start:2, dystans_koniec:2}, {id:8, liczba_serii:4, dystans_start:3, dystans_koniec:3}, {id:9, liczba_serii:4, dystans_start:1, dystans_koniec:1}, {id:11, liczba_serii:3, dystans_start:1, dystans_koniec:3}]];
function randomPlayers(dataArr, am) {
function deleteAll(ob) {
var _local1 = 0;
while (_local1 < temp.length) {
if (((temp[_local1].n == ob.n) && (temp[_local1].a == ob.a)) && (temp[_local1].c == ob.c)) {
temp.splice(_local1, 1);
_local1--;
}
_local1++;
}
}
var temp = new Array();
var _local1 = 0;
while (_local1 < dataArr.length) {
var _local3 = dataArr[_local1];
var _local2 = 0;
while (_local2 < (_local3.a * 10)) {
temp.push(_local3);
_local2++;
}
_local1++;
}
var _local5 = new Array();
var _local6 = 1;
while (_local5.length < am) {
var _local4 = Math.round(Math.random() * (temp.length - 1));
temp[_local4].id = _local6;
_local5.push(temp[_local4]);
deleteAll(temp[_local4]);
_local6++;
}
return(_local5);
}
var gracze = [{n:"ARIEL B.", a:0.8, c:0}, {n:"ROBERTO V.", a:0.6, c:0}, {n:"RAY C.", a:0.9, c:1}, {n:"PETER F.", a:0.7, c:1}, {n:"MILAN N.", a:0.5, c:1}, {n:"LUKAS V.", a:0.5, c:2}, {n:"DAVID T.", a:0.7, c:2}, {n:"SIMON Z.", a:0.5, c:2}, {n:"NOAH H.", a:0.7, c:3}, {n:"NATHAN P.", a:0.8, c:3}, {n:"EMIL G..", a:0.5, c:3}, {n:"JULIO S.", a:0.3, c:4}, {n:"JUAN E.", a:0.4, c:4}, {n:"LUIS H.", a:0.9, c:5}, {n:"MARQUES P.", a:0.9, c:5}, {n:"ROBERTO G..", a:0.8, c:5}, {n:"CHRISTO S.", a:0.3, c:6}, {n:"DIMITYR S.", a:0.4, c:6}, {n:"MICHAEL F.", a:0.7, c:7}, {n:"PATRIC E.", a:0.7, c:7}, {n:"ALEX S.", a:0.9, c:8}, {n:"DALE W.", a:0.7, c:8}, {n:"MARCELO L.", a:0.7, c:9}, {n:"IVAN S.", a:0.7, c:9}, {n:"YANG L.", a:0.9, c:10}, {n:"XIE S.", a:0.9, c:10}, {n:"SUN W.", a:0.9, c:10}, {n:"FREDDY S.", a:0.7, c:11}, {n:"MIGUEL S.", a:0.9, c:11}, {n:"PAULO D.", a:0.4, c:12}, {n:"PAULO F.", a:0.4, c:13}, {n:"LUKAS A.", a:0.6, c:14}, {n:"MATEJ S.", a:0.8, c:14}, {n:"OLIVER R.", a:0.9, c:15}, {n:"MIKKEL G.", a:0.8, c:15}, {n:"EMIL Z.", a:0.7, c:15}, {n:"NEY RAUL K.", a:0.9, c:16}, {n:"AMR L.", a:0.6, c:17}, {n:"MIKAEL L.", a:0.9, c:18}, {n:"MATIAS S.", a:0.7, c:18}, {n:"OLAVI H.", a:0.8, c:18}, {n:"ENZO L.", a:0.9, c:19}, {n:"HUGO S.", a:0.6, c:19}, {n:"THEO S.", a:0.8, c:19}, {n:"MATTEO D.", a:0.7, c:19}, {n:"PAUL R.", a:0.9, c:20}, {n:"TIM P.", a:0.8, c:20}, {n:"OLIVER N.", a:0.8, c:20}, {n:"LUCA B.", a:0.8, c:20}, {n:"KEVIN K.", a:0.9, c:20}, {n:"ISSAH T.", a:0.7, c:21}, {n:"ANGELOS L.", a:0.8, c:22}, {n:"STEILOS P.", a:0.6, c:22}, {n:"NIKOS M.", a:0.7, c:22}, {n:"BALAZS W.", a:0.7, c:23}, {n:"LEVENTE O.", a:0.8, c:23}, {n:"GUNNAR Z.", a:0.5, c:24}, {n:"EINAR K.", a:0.5, c:24}, {n:"BJARNI L.", a:0.6, c:24}, {n:"RISHI K.", a:0.9, c:26}, {n:"KAMAL R.", a:0.8, c:26}, {n:"SEAN M.", a:0.7, c:29}, {n:"CIAN K.", a:0.6, c:29}, {n:"LUKE U.", a:0.8, c:29}, {n:"MARCO B.", a:0.7, c:31}, {n:"FRANCO J.", a:0.7, c:31}, {n:"LUIGI A.", a:0.6, c:31}, {n:"HIROMI K.", a:0.9, c:33}, {n:"JACOB K.", a:0.5, c:34}, {n:"TWAHIR L.", a:0.6, c:34}, {n:"JONAS Z.", a:0.4, c:36}, {n:"PETRAS N.", a:0.5, c:36}, {n:"ANTANAS B.", a:0.4, c:36}, {n:"SAYED Z.", a:0.9, c:38}, {n:"DAAN T.", a:0.6, c:40}, {n:"SEM J.", a:0.6, c:40}, {n:"LARS O.", a:0.6, c:40}, {n:"BIRAN K.", a:0.8, c:41}, {n:"STEVE A.", a:0.9, c:41}, {n:"CHRIS E.", a:0.9, c:41}, {n:"DANNY B.", a:0.9, c:41}, {n:"KRISTIAN Z.", a:0.7, c:44}, {n:"ADRIAN R.", a:0.6, c:44}, {n:"HENRIK M.", a:0.8, c:44}, {n:"FAISAL K.", a:0.9, c:45}, {n:"DAREK W.", a:0.9, c:47}, {n:"KAMIL K.", a:0.9, c:47}, {n:"\u0141UKASZ K.", a:0.8, c:47}, {n:"JERRY K.", a:0.7, c:50}, {n:"QUINTON L.", a:0.8, c:50}, {n:"DAN Z.", a:0.5, c:51}, {n:"ADRIAN B.", a:0.6, c:51}, {n:"DIMITRIJ Z.", a:0.7, c:52}, {n:"JEGOR S.", a:0.6, c:52}, {n:"SIERGIEJ B.", a:0.8, c:52}, {n:"MIROSLAV Z.", a:0.5, c:53}, {n:"IGOR D.", a:0.5, c:53}, {n:"MAREK M.", a:0.4, c:53}, {n:"OSCAR U.", a:0.7, c:55}, {n:"ISAK V.", a:0.8, c:55}, {n:"WILIAM B.", a:0.8, c:55}, {n:"NICO S.", a:0.7, c:56}, {n:"JAN W.", a:0.6, c:56}, {n:"NOAH B.", a:0.5, c:56}, {n:"EMRE B.", a:0.9, c:59}, {n:"MEHMET O.", a:0.8, c:59}, {n:"ANDRIJ B.", a:0.4, c:61}, {n:"HARRY B.", a:0.9, c:62}, {n:"JAMES N.", a:0.9, c:62}, {n:"JACK O.", a:0.8, c:62}, {n:"COLIN O.", a:0.8, c:64}, {n:"COLIN R.", a:0.9, c:64}, {n:"EINAR K.", a:0.8, c:64}, {n:"BRIAN A.", a:0.7, c:64}, {n:"COBI K.", a:0.9, c:64}, {n:"DANIEL F.", a:0.9, c:66}, {n:"ALEX Z.", a:0.9, c:66}, {n:"JAVIER Z.", a:0.5, c:66}, {n:"ALVARO Z.", a:0.6, c:66}, {n:"DIEGO E.", a:0.7, c:66}, {n:"CARLOS D.", a:0.7, c:67}, {n:"JOAO R.", a:0.8, c:67}, {n:"MARCO I.", a:0.9, c:67}, {n:"FILIPE X.", a:0.7, c:67}];
var playersArr = randomPlayers(gracze, 59);
function ustawTurniej(t) {
turniej = t;
turniej_arr = tournaments[t];
zawody_turnieju = 1;
}
var awans = false;
var firstRun = true;
var turniej;
var total_score = 0;
var pointsMemory = 0;
var qualified = false;
var turniej_arr;
var zawody_turnieju;
tabela_mistrzow.onEnterFrame = function () {
if (tabela_mistrzow.loadTable) {
tabela_mistrzow.loadTable(getTable_script);
delete this.onEnterFrame;
}
};
stop();
Frame 5
function showMenuScreen() {
player_card._visible = true;
menu._visible = true;
new mx.transitions.Tween(player_card, "_alpha", mx.transitions.easing.Strong.easeOut, 0, 100, 1, true);
new mx.transitions.Tween(menu, "_alpha", mx.transitions.easing.Strong.easeOut, 0, 100, 1, true);
menu.showStats();
}
function competitionPreview(c) {
graj_menu.zawody.gotoAndStop(c);
}
var id_zawodow = (turniej_arr[zawody_turnieju - 1].id + 1);
if ((firstRun == true) || (awans == true)) {
var statystyki = new Stats();
var mapa = new Menu_map(map.map);
var playersRank = new ScoreTable(rankingmistrzostw.tabela_kontener.tabela.numer, rankingmistrzostw.tabela_kontener.tabela.gracz, 23);
var id = setInterval(function () {
rankingmistrzostw.fillTable(playersRank);
showMenuScreen();
clearInterval(id);
}, 1300);
var playerObj = new Object({c:playerCountry, n:playerName, punkty:0});
firstRun = (awans = false);
} else {
rankingmistrzostw.tabela_kontener.tabela.numer._visible = (rankingmistrzostw.tabela_kontener.tabela.gracz._visible = false);
playersRank.plus(competionRank);
playersRank.sortTable();
var id = setInterval(function () {
playersRank.drawTable(undefined, countriesARR);
rankingmistrzostw.initInterface();
showMenuScreen();
clearInterval(id);
}, 1600);
}
competitionPreview(id_zawodow);
var id2 = setInterval(function () {
mapa.showLocalization(id_zawodow - 1);
clearInterval(id2);
}, 400);
var liczba_serii = turniej_arr[zawody_turnieju - 1].liczba_serii;
var dystans_start = turniej_arr[zawody_turnieju - 1].dystans_start;
var dystans_koniec = turniej_arr[zawody_turnieju - 1].dystans_koniec;
if (qualified) {
bg.gotoAndStop(2);
}
menu.graj.onRelease = function () {
gotoAndPlay(_currentframe + 1);
};
stop();
Frame 6
var rounds = [[{frame:1, shake_radius:3, shake_speed:0.35, shake_borders:0.5, maxwind:0.25, target_radius:14}, {frame:2, shake_radius:2.12, shake_speed:0.17, shake_borders:0.6, maxwind:0.1, target_radius:7.5}, {frame:3, shake_radius:1.4, shake_speed:0.1, shake_borders:0.7, maxwind:0.05, target_radius:4.5}], [{frame:1, shake_radius:3.12, shake_speed:0.44, shake_borders:0.5, maxwind:0.25, target_radius:14}, {frame:2, shake_radius:2.52, shake_speed:0.34, shake_borders:0.5, maxwind:0.1, target_radius:7.5}, {frame:3, shake_radius:2.12, shake_speed:0.24, shake_borders:0.5, maxwind:0.07, target_radius:4.5}], [{frame:1, shake_radius:2.12, shake_speed:0.34, shake_borders:0.5, maxwind:0.25, target_radius:14}, {frame:2, shake_radius:2.32, shake_speed:0.34, shake_borders:0.5, maxwind:0.1, target_radius:7.5}, {frame:3, shake_radius:2.12, shake_speed:0.14, shake_borders:0.5, maxwind:0.07, target_radius:4.5}], [{frame:1, shake_radius:3.12, shake_speed:0.44, shake_borders:0.5, maxwind:0.25, target_radius:14}, {frame:2, shake_radius:2.52, shake_speed:0.34, shake_borders:0.5, maxwind:0.1, target_radius:7.5}, {frame:3, shake_radius:2.12, shake_speed:0.24, shake_borders:0.5, maxwind:0.07, target_radius:4.5}], [{frame:1, shake_radius:3.12, shake_speed:0.34, shake_borders:0.5, maxwind:0.25, target_radius:14}, {frame:2, shake_radius:2.52, shake_speed:0.24, shake_borders:0.5, maxwind:0.1, target_radius:7.5}, {frame:3, shake_radius:2.12, shake_speed:0.24, shake_borders:0.5, maxwind:0.07, target_radius:4.5}], [{frame:1, shake_radius:3.12, shake_speed:0.44, shake_borders:0.5, maxwind:0.25, target_radius:14}, {frame:2, shake_radius:2.52, shake_speed:0.34, shake_borders:0.5, maxwind:0.1, target_radius:7.5}, {frame:3, shake_radius:2.12, shake_speed:0.24, shake_borders:0.5, maxwind:0.07, target_radius:4.5}], [{frame:1, shake_radius:2.12, shake_speed:0.14, shake_borders:0.5, maxwind:0.25, target_radius:14}, {frame:2, shake_radius:2.12, shake_speed:0.14, shake_borders:0.5, maxwind:0.1, target_radius:7.5}, {frame:3, shake_radius:2.12, shake_speed:0.14, shake_borders:0.5, maxwind:0.07, target_radius:4.5}], [{frame:1, shake_radius:3.12, shake_speed:0.44, shake_borders:0.5, maxwind:0.25, target_radius:14}, {frame:2, shake_radius:2.52, shake_speed:0.34, shake_borders:0.5, maxwind:0.1, target_radius:7.5}, {frame:3, shake_radius:2.12, shake_speed:0.24, shake_borders:0.5, maxwind:0.07, target_radius:4.5}], [{frame:1, shake_radius:3.12, shake_speed:0.44, shake_borders:0.5, maxwind:0.25, target_radius:14}, {frame:2, shake_radius:2.52, shake_speed:0.34, shake_borders:0.5, maxwind:0.1, target_radius:7.5}, {frame:3, shake_radius:2.12, shake_speed:0.24, shake_borders:0.5, maxwind:0.07, target_radius:4.5}], [{frame:1, shake_radius:2.12, shake_speed:0.14, shake_borders:0.5, maxwind:0.25, target_radius:14}, {frame:2, shake_radius:2.12, shake_speed:0.14, shake_borders:0.5, maxwind:0.1, target_radius:7.5}, {frame:3, shake_radius:2.12, shake_speed:0.14, shake_borders:0.5, maxwind:0.07, target_radius:4.5}], [{frame:1, shake_radius:3.12, shake_speed:0.44, shake_borders:0.5, maxwind:0.25, target_radius:14}, {frame:2, shake_radius:2.52, shake_speed:0.34, shake_borders:0.5, maxwind:0.1, target_radius:7.5}, {frame:3, shake_radius:2.12, shake_speed:0.24, shake_borders:0.5, maxwind:0.07, target_radius:4.5}], [{frame:1, shake_radius:2.12, shake_speed:0.34, shake_borders:0.5, maxwind:0.25, target_radius:14}, {frame:2, shake_radius:2.22, shake_speed:0.24, shake_borders:0.5, maxwind:0.1, target_radius:7.5}, {frame:3, shake_radius:2.12, shake_speed:0.14, shake_borders:0.5, maxwind:0.07, target_radius:4.5}]];
function init_trial(round) {
function grow_difficulty() {
var _local1 = shaking.__get__radius() * 1.1;
var _local2 = shaking.__get__speed() * 1.1;
var _local3 = 0.6;
shaking.change_prop(_local1, _local2, _local3);
queue++;
if (queue >= 6) {
clearInterval(growing_dif);
}
}
function shoot() {
active_control = false;
var target_radius = round.target_radius;
var max_shot_point = 10;
bow_ready = false;
var _local6 = (container._x - 105) + container.bow._x;
var _local8 = (container._y + 257) + container.bow._y;
view.animation._x = -(view._x - _local6);
view.animation._y = -(view._y - _local8);
container.bow.gotoAndPlay(2);
view.animation.anim.gotoAndPlay(2);
var oldX = view.animation._x;
var windmove = 0;
view.animation.anim.onEnterFrame = function () {
var _local4 = 1 - (this._currentframe / this._totalframes);
windmove = windmove + (_local4 * windstat.wind);
this._parent._x = oldX + windmove;
if (this._currentframe == this._totalframes) {
var _local6 = (oldX + windmove) - view.target._x;
var _local5 = this._parent._y - view.target._y;
var _local2;
var _local3 = distance(oldX + windmove, view.animation._y, view.target._x, view.target._y);
if (_local3 > target_radius) {
_local2 = 0;
} else {
_local2 = 1 + Math.floor(max_shot_point - ((_local3 / target_radius) * max_shot_point));
}
if (_local2 > 0) {
preview.mark_shot(_local6, _local5, target_radius, _local2);
}
count_points(_local2);
summaryScreen();
delete this.onEnterFrame;
}
};
var _local9 = new mx.transitions.Tween(view, "_rotation", mx.transitions.easing.Elastic.easeOut, 3, 0, 1, true);
displ.timeStop();
}
var weight = 10;
var _local4 = round.maxwind;
var _local3 = 1 - condition();
var shaking = new Shake(container.bow, round.shake_radius * _local3, round.shake_speed * _local3, true, round.shake_borders * _local3);
shaking.start(container.bow._x, container.bow._y);
view.animation.gotoAndStop(round.frame);
view.wall.gotoAndStop(round.frame);
view.target.gotoAndStop(round.frame);
windstat.newWind(_local4, _local4 / 30);
var bow_ready = true;
var active_control = true;
container._visible = true;
reset_bow();
displ.dystans.gotoAndStop(round.frame);
displ.timeStart();
var _local8 = ((serieNo * (targetDistance - 1)) + serie) / (targetDistanceNo * serieNo);
view.sceneria.niebo.gotoAndStop(Math.round(view.sceneria.niebo._totalframes * _local8));
var active = false;
var dif_x = (dot._x - ster._x);
var dif_y = (dot._y - ster._y);
var dif2_x = (ster._x - container._x);
var dif2_y = (ster._y - container._y);
container._x = container._x + ((Math.random() * 140) - 70);
container._y = container._y + ((Math.random() * 20) + 20);
contr.onEnterFrame = function () {
if (active_control == true) {
if (distance(_xmouse, _ymouse, this._x, this._y) < ((this._width / 2) - 3)) {
dot._x = _xmouse;
dot._y = _ymouse;
ster._x = dot._x - dif_x;
ster._y = dot._y - dif_y;
container._x = container._x + (((ster._x - dif2_x) - container._x) / weight);
container._y = container._y + (((ster._y - dif2_y) - container._y) / weight);
if (active == false) {
Mouse.hide();
active = true;
this.gotoAndPlay("in");
}
} else if (active == true) {
Mouse.show();
this.gotoAndPlay("out");
active = false;
}
} else {
Mouse.show();
delete this.onEnterFrame;
}
};
var _local16 = getTimer();
var queue = 1;
clearInterval(growing_dif);
var growing_dif = setInterval(grow_difficulty, 2000, queue);
var _local5 = new Object();
_local5.onMouseDown = function () {
if (distance(_xmouse, _ymouse, contr._x, contr._y) < ((contr._width / 2) - 3)) {
if (bow_ready == true) {
shoot();
}
}
};
Mouse.addListener(_local5);
}
function reset_bow() {
container.bow._x = 0;
container.bow._y = 0;
container._x = 574.9;
container._y = -20.05;
dot._x = contr._x;
dot._y = contr._y;
ster._x = 470;
ster._y = 237;
}
function count_points(pt) {
changeCondition(pt);
statystyki.addShot(pt);
lastShotScore = pt;
displ.add_points(pt, serie);
score_panel.add_points(pt, displ.timeleft);
}
var blurOn = (new flash.filters.BlurFilter(4, 4, 1));
var blurOff = (new flash.filters.BlurFilter(0, 0, 1));
function distance(x1, y1, x2, y2) {
return(Math.sqrt(((x2 - x1) * (x2 - x1)) + ((y2 - y1) * (y2 - y1))));
}
function condition() {
return(1 - (1 / ((0.19 * conditionFnX) + 1)));
}
function changeCondition(p) {
if (p > 6) {
conditionFnX = conditionFnX + (((p / 10) - 0.7) / (4 - targetDistance));
} else {
conditionFnX = conditionFnX - (0.7 - (p / 10));
if (conditionFnX < 0) {
conditionFnX = 0;
}
}
exp.updateDiag();
}
function summaryScreen() {
allow_click = true;
view.filters = [blurOn];
new mx.transitions.Tween(contr, "_x", mx.transitions.easing.Regular.easeOut, 650, 750, 0.3, true);
new mx.transitions.Tween(windstat, "_x", mx.transitions.easing.Regular.easeOut, windstat_showX, windstat_hideX, 0.3, true);
dot._visible = false;
container._visible = false;
ranking.refreshScore(competitionPoints, lastShotScore);
serie++;
if (serie <= serieNo) {
new mx.transitions.Tween(menu, "_x", mx.transitions.easing.Regular.easeOut, 860, 650, 0.3, true);
menu.graj.onRelease = function () {
if (allow_click) {
allow_click = false;
menu.taknie._visible = false;
new mx.transitions.Tween(menu, "_x", mx.transitions.easing.Regular.easeOut, 650, 860, 0.5, true);
new mx.transitions.Tween(windstat, "_x", mx.transitions.easing.Regular.easeOut, windstat_hideX, windstat_showX, 0.5, true);
var _local1 = new mx.transitions.Tween(contr, "_x", mx.transitions.easing.Regular.easeOut, 750, 650, 0.5, true);
_local1.onMotionFinished = function () {
dot._visible = true;
view.filters = [blurOff];
init_trial(rounds[competition - 1][targetDistance - 1]);
};
}
};
} else {
roundFinished();
}
}
function roundFinished() {
allow_click = true;
serie = 1;
targetDistance++;
if (targetDistance <= targetDistanceNo) {
menu2.dystans.gotoAndStop(targetDistance);
new mx.transitions.Tween(menu2, "_x", mx.transitions.easing.Regular.easeOut, 860, 650, 0.3, true);
menu2.graj.onRelease = function () {
if (allow_click) {
allow_click = false;
new mx.transitions.Tween(menu2, "_x", mx.transitions.easing.Regular.easeOut, 650, 860, 0.5, true);
new mx.transitions.Tween(windstat, "_x", mx.transitions.easing.Regular.easeOut, windstat_hideX, windstat_showX, 0.5, true);
var _local1 = new mx.transitions.Tween(contr, "_x", mx.transitions.easing.Regular.easeOut, 750, 650, 0.5, true);
_local1.onMotionFinished = function () {
dot._visible = true;
view.filters = [blurOff];
displ.reset_boxes();
init_trial(rounds[competition - 1][targetDistance - 1]);
};
}
};
} else {
zawody_turnieju++;
competitionFinished();
}
}
function competitionFinished() {
allow_click = true;
statystyki.add2positionHistory(competionRank.getPlayerPosition(0));
new mx.transitions.Tween(menu3, "_x", mx.transitions.easing.Regular.easeOut, 860, 650, 0.5, true);
menu3.kolejne.onRelease = function () {
if (allow_click) {
allow_click = false;
competitionScores = ranking.stable;
if (zawody_turnieju <= turniej_arr.length) {
gotoAndPlay(_currentframe - 1);
} else if (qualified == false) {
gotoAndPlay(_currentframe + 1);
} else {
gotoAndPlay(_currentframe + 2);
}
}
};
}
var windstat_hideX = 850;
var windstat_showX = 380;
var zdobyles;
var competition = id_zawodow;
view.sceneria.gotoAndStop(competition);
displ.zawody.gotoAndStop(competition);
var serie = 0;
var serieNo = liczba_serii;
var targetDistance = dystans_start;
var targetDistanceNo = dystans_koniec;
view.wall.gotoAndStop(targetDistance);
view.target.gotoAndStop(targetDistance);
displ.dystans.gotoAndStop(targetDistance);
var curRound = 0;
var competitionPoints = 0;
var lastShotScore = 0;
var allow_click = true;
var competionRank = new ScoreTable(ranking.tabela_kontener.tabela.numer, ranking.tabela_kontener.tabela.gracz, 23);
ster._visible = false;
preview.init_previews();
summaryScreen();
stop();
Frame 7
pds.dalej_nap._visible = false;
pds.dalej._visible = false;
playersRank.plus(competionRank);
playersRank.sortTable();
var id = setInterval(function () {
playersRank.drawTable(undefined, countriesARR);
rankingmistrzostw.initInterface();
pds.dalej_nap._visible = true;
pds.dalej._visible = true;
clearInterval(id);
}, 1600);
stop();
Frame 8
tabela_krajow._accProps = new Object();
tabela_krajow._accProps.forceSimple = true;
function writeScore(s) {
komunikat.contentMC.scr.text = s;
komunikat.contentMC.scr.autoSize = true;
komunikat.contentMC.bg._width = komunikat.contentMC.scr._width + (Math.abs(komunikat.contentMC.bg._x - komunikat.contentMC.scr._x) * 2);
}
var comm;
komunikat.imie.text = playerObj.n;
var flag = komunikat.kraj.attachMovie(countriesARR[playerObj.c], "flag", 0);
flag._xscale = (flag._yscale = 15);
if (qualified) {
komunikat.contentMC.gotoAndStop(1);
playersRank.sortTable();
comm = ("Congratulations! <b>" + playersRank.getPlayerRecord(0).playername) + "</b>. You have finished World Cup!";
var position = playersRank.getPlayerPosition(0);
if (position == 1) {
comm = comm + "<br><br><b>You've won a gold medal</b>!! Your country is pround of You.";
} else if (position == 2) {
comm = comm + "<br><br><b>You've won a silver medal</b>! Your country is pround of You.";
} else if (position == 3) {
comm = comm + "<br><br><b>You've won a bronze medal</b>! Your country is pround of You.";
} else {
comm = comm + (("<br><br>Your position is <b>" + position) + "</b>!");
}
writeScore(total_score);
} else {
comm = ("Congratulations <b>" + playersRank.getPlayerRecord(0).playername) + "</b>. You have finished Qualifying Tournament. Unfortunatelly Your score doesn't allow You to start in The World Cup.";
writeScore(total_score);
}
komunikat.contentMC.komentarz.htmlText = comm;
tabela_mistrzow.onEnterFrame = function () {
if (tabela_mistrzow.submitScore) {
tabela_mistrzow.submitScore(addScore_script, getTable_script, playerName, total_score, playersRank.getPlayerRecord(0).country + 1);
delete this.onEnterFrame;
}
};
stop();
Frame 9
stop();
Symbol 14 MovieClip Frame 1
stop();
Symbol 14 MovieClip Frame 2
stop();
Symbol 153 MovieClip Frame 1
this._visible = false;
Symbol 160 MovieClip Frame 1
this.onEnterFrame = function () {
mask._xscale = _parent._parent.loadingStatus;
if (_parent._parent.loadingStatus >= 100) {
_parent.gotoAndPlay(_parent._currentframe + 1);
delete this.onEnterFrame;
}
};
Symbol 165 MovieClip Frame 1
this.onRelease = function () {
var _local2 = new LoadVars();
_local2.load(_parent._parent.notify_CLICKED_script);
getURL ("http://www.gamesfreak.net/", "Top");
};
Symbol 177 MovieClip Frame 1
if (_parent.TEST_MODE) {
gotoAndPlay (170);
}
Symbol 177 MovieClip Frame 24
_parent.initPreloading();
Symbol 177 MovieClip Frame 40
stop();
Symbol 177 MovieClip Frame 216
_parent.gotoAndPlay(_parent._currentframe + 1);
stop();
Symbol 632 MovieClip [__Packages.Debug] Frame 0
class Debug
{
var _stage;
function Debug (stage) {
_stage = stage;
}
function showError(com) {
_stage.debuger.removeMovieClip();
var _local2 = _stage.attachMovie("debuger", "debuger", _stage.getNextHighestDepth(), {_x:40, _y:40});
_local2.message.autoSize = true;
_local2.message.htmlText = ("<b>" + com) + "</b>";
_local2.bg._width = _local2.message._width + 30;
_local2.bg._height = _local2.message._height + 8;
_local2.onRollOver = function () {
this.removeMovieClip();
};
}
}
Symbol 633 MovieClip [__Packages.Button_luk] Frame 0
class Button_luk
{
var maxSc, minSc;
function Button_luk (mc) {
maxSc = mc._xscale;
minSc = maxSc - 20;
mc._xscale = (mc._yscale = minSc);
var x_up = (new mx.transitions.Tween(mc, "_xscale", mx.transitions.easing.Elastic.easeOut, minSc, maxSc, 0.6, true));
var y_up = (new mx.transitions.Tween(mc, "_yscale", mx.transitions.easing.Elastic.easeOut, minSc, maxSc, 0.8, true));
var x_down = (new mx.transitions.Tween(mc, "_xscale", mx.transitions.easing.Elastic.easeOut, maxSc, minSc, 0.6, true));
var y_down = (new mx.transitions.Tween(mc, "_yscale", mx.transitions.easing.Elastic.easeOut, maxSc, minSc, 0.8, true));
mc.onRollOver = function () {
x_down.stop();
y_down.stop();
x_up.start();
y_up.start();
this.gotoAndPlay(2);
};
mc.onRollOut = (mc.onReleaseOutside = function () {
x_up.stop();
y_up.stop();
x_down.start();
y_down.start();
this.gotoAndPlay("out");
});
}
}
Symbol 634 MovieClip [__Packages.mx.transitions.OnEnterFrameBeacon] Frame 0
class mx.transitions.OnEnterFrameBeacon
{
function OnEnterFrameBeacon () {
}
static function init() {
var _local4 = _global.MovieClip;
if (!_root.__OnEnterFrameBeacon) {
mx.transitions.BroadcasterMX.initialize(_local4);
var _local3 = _root.createEmptyMovieClip("__OnEnterFrameBeacon", 9876);
_local3.onEnterFrame = function () {
_global.MovieClip.broadcastMessage("onEnterFrame");
};
}
}
static var version = "1.1.0.52";
}
Symbol 635 MovieClip [__Packages.mx.transitions.BroadcasterMX] Frame 0
class mx.transitions.BroadcasterMX
{
var _listeners;
function BroadcasterMX () {
}
static function initialize(o, dontCreateArray) {
if (o.broadcastMessage != undefined) {
delete o.broadcastMessage;
}
o.addListener = mx.transitions.BroadcasterMX.prototype.addListener;
o.removeListener = mx.transitions.BroadcasterMX.prototype.removeListener;
if (!dontCreateArray) {
o._listeners = new Array();
}
}
function addListener(o) {
removeListener(o);
if (broadcastMessage == undefined) {
broadcastMessage = mx.transitions.BroadcasterMX.prototype.broadcastMessage;
}
return(_listeners.push(o));
}
function removeListener(o) {
var _local2 = _listeners;
var _local3 = _local2.length;
while (_local3--) {
if (_local2[_local3] == o) {
_local2.splice(_local3, 1);
if (!_local2.length) {
broadcastMessage = undefined;
}
return(true);
}
}
return(false);
}
function broadcastMessage() {
var _local5 = String(arguments.shift());
var _local4 = _listeners.concat();
var _local6 = _local4.length;
var _local3 = 0;
while (_local3 < _local6) {
_local4[_local3][_local5].apply(_local4[_local3], arguments);
_local3++;
}
}
static var version = "1.1.0.52";
}
Symbol 636 MovieClip [__Packages.mx.transitions.Tween] Frame 0
class mx.transitions.Tween
{
var obj, prop, begin, useSeconds, _listeners, addListener, prevTime, _time, looping, _duration, broadcastMessage, isPlaying, _fps, prevPos, _pos, change, _intervalID, _startTime;
function Tween (obj, prop, func, begin, finish, duration, useSeconds) {
mx.transitions.OnEnterFrameBeacon.init();
if (!arguments.length) {
return;
}
this.obj = obj;
this.prop = prop;
this.begin = begin;
position = (begin);
this.duration = (duration);
this.useSeconds = useSeconds;
if (func) {
this.func = func;
}
this.finish = (finish);
_listeners = [];
addListener(this);
start();
}
function set time(t) {
prevTime = _time;
if (t > duration) {
if (looping) {
rewind(t - _duration);
update();
broadcastMessage("onMotionLooped", this);
} else {
if (useSeconds) {
_time = _duration;
update();
}
stop();
broadcastMessage("onMotionFinished", this);
}
} else if (t < 0) {
rewind();
update();
} else {
_time = t;
update();
}
//return(time);
}
function get time() {
return(_time);
}
function set duration(d) {
_duration = (((d == null) || (d <= 0)) ? (_global.Infinity) : (d));
//return(duration);
}
function get duration() {
return(_duration);
}
function set FPS(fps) {
var _local2 = isPlaying;
stopEnterFrame();
_fps = fps;
if (_local2) {
startEnterFrame();
}
//return(FPS);
}
function get FPS() {
return(_fps);
}
function set position(p) {
setPosition(p);
//return(position);
}
function setPosition(p) {
prevPos = _pos;
obj[prop] = (_pos = p);
broadcastMessage("onMotionChanged", this, _pos);
updateAfterEvent();
}
function get position() {
return(getPosition());
}
function getPosition(t) {
if (t == undefined) {
t = _time;
}
return(func(t, begin, change, _duration));
}
function set finish(f) {
change = f - begin;
//return(finish);
}
function get finish() {
return(begin + change);
}
function continueTo(finish, duration) {
begin = position;
this.finish = (finish);
if (duration != undefined) {
this.duration = (duration);
}
start();
}
function yoyo() {
continueTo(begin, time);
}
function startEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.addListener(this);
} else {
_intervalID = setInterval(this, "onEnterFrame", 1000 / _fps);
}
isPlaying = true;
}
function stopEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.removeListener(this);
} else {
clearInterval(_intervalID);
}
isPlaying = false;
}
function start() {
rewind();
startEnterFrame();
broadcastMessage("onMotionStarted", this);
}
function stop() {
stopEnterFrame();
broadcastMessage("onMotionStopped", this);
}
function resume() {
fixTime();
startEnterFrame();
broadcastMessage("onMotionResumed", this);
}
function rewind(t) {
_time = ((t == undefined) ? 0 : (t));
fixTime();
update();
}
function fforward() {
time = (_duration);
fixTime();
}
function nextFrame() {
if (useSeconds) {
time = ((getTimer() - _startTime) / 1000);
} else {
time = (_time + 1);
}
}
function onEnterFrame() {
nextFrame();
}
function prevFrame() {
if (!useSeconds) {
time = (_time - 1);
}
}
function toString() {
return("[Tween]");
}
function fixTime() {
if (useSeconds) {
_startTime = getTimer() - (_time * 1000);
}
}
function update() {
position = (getPosition(_time));
}
static var version = "1.1.0.52";
static var __initBeacon = mx.transitions.OnEnterFrameBeacon.init();
static var __initBroadcaster = mx.transitions.BroadcasterMX.initialize(mx.transitions.Tween.prototype, true);
function func(t, b, c, d) {
return(((c * t) / d) + b);
}
}
Symbol 637 MovieClip [__Packages.mx.transitions.easing.Elastic] Frame 0
class mx.transitions.easing.Elastic
{
function Elastic () {
}
static function easeIn(t, b, c, d, a, p) {
if (t == 0) {
return(b);
}
t = t / d;
if (t == 1) {
return(b + c);
}
if (!p) {
p = d * 0.3;
}
if ((!a) || (a < Math.abs(c))) {
a = c;
var _local7 = p / 4;
} else {
var _local7 = (p / (Math.PI*2)) * Math.asin(c / a);
}
t = t - 1;
return((-((a * Math.pow(2, 10 * t)) * Math.sin((((t * d) - _local7) * (Math.PI*2)) / p))) + b);
}
static function easeOut(t, b, c, d, a, p) {
if (t == 0) {
return(b);
}
t = t / d;
if (t == 1) {
return(b + c);
}
if (!p) {
p = d * 0.3;
}
if ((!a) || (a < Math.abs(c))) {
a = c;
var _local7 = p / 4;
} else {
var _local7 = (p / (Math.PI*2)) * Math.asin(c / a);
}
return((((a * Math.pow(2, -10 * t)) * Math.sin((((t * d) - _local7) * (Math.PI*2)) / p)) + c) + b);
}
static function easeInOut(t, b, c, d, a, p) {
if (t == 0) {
return(b);
}
t = t / (d / 2);
if (t == 2) {
return(b + c);
}
if (!p) {
p = d * 0.45;
}
if ((!a) || (a < Math.abs(c))) {
a = c;
var _local7 = p / 4;
} else {
var _local7 = (p / (Math.PI*2)) * Math.asin(c / a);
}
if (t < 1) {
t = t - 1;
return((-0.5 * ((a * Math.pow(2, 10 * t)) * Math.sin((((t * d) - _local7) * (Math.PI*2)) / p))) + b);
}
t = t - 1;
return(((((a * Math.pow(2, -10 * t)) * Math.sin((((t * d) - _local7) * (Math.PI*2)) / p)) * 0.5) + c) + b);
}
static var version = "1.1.0.52";
}
Symbol 638 MovieClip [__Packages.ScrollMC_OY] Frame 0
class ScrollMC_OY
{
var _scroller, _scrollingMC, _visibleH, _scrollH, _slowdown, _pct, _minY, _maxY, _minMCy, _maxMCy;
function ScrollMC_OY (scroller, scrollingMC, visibleH, scrollH, slowdown) {
_scroller = scroller;
_scrollingMC = scrollingMC;
_visibleH = visibleH;
_scrollH = scrollH;
_slowdown = slowdown;
_pct = 0;
initScroll();
}
function initScroll() {
if (_scrollingMC._height > _visibleH) {
_scroller._visible = true;
setScroll();
initInterface();
} else {
_scroller._visible = false;
}
}
function setScroll() {
_scrollingMC._y = 0;
_scroller.s_down._y = _scrollH;
_scroller.s_base._height = _scrollH;
_minY = Math.round((_scroller.s_bar._y = (_scroller.s_up._height + _margin) + (_scroller.s_bar._height / 2)));
_maxY = Math.round(((_scrollH - _scroller.s_down._height) - _margin) - (_scroller.s_bar._height / 2));
_minMCy = Math.round(_scrollingMC._y);
_maxMCy = Math.round(_scrollingMC._y - (_scrollingMC._height - _visibleH));
_scroller.s_bar._y = _minY;
}
function initInterface() {
var root = this;
_scroller.s_bar.onPress = function () {
this.startDrag(false, this._x, root._minY, this._x, root._maxY);
this.onEnterFrame = function () {
root.setPCT();
};
};
_scroller.s_bar.onRelease = (_scroller.s_bar.onReleaseOutside = function () {
this.stopDrag();
delete this.onEnterFrame;
});
_scroller.s_down.onPress = function () {
this.onEnterFrame = function () {
root._scroller.s_bar._y = root._scroller.s_bar._y + root._speed;
if (root._scroller.s_bar._y > root._maxY) {
root._scroller.s_bar._y = root._maxY;
root.setPCT();
delete this.onEnterFrame;
}
root.setPCT();
};
};
_scroller.s_up.onPress = function () {
this.onEnterFrame = function () {
root._scroller.s_bar._y = root._scroller.s_bar._y - root._speed;
if (root._scroller.s_bar._y < root._minY) {
root._scroller.s_bar._y = root._minY;
root.setPCT();
delete this.onEnterFrame;
}
root.setPCT();
};
};
_scroller.s_down.onRelease = (_scroller.s_down.onReleaseOutside = (_scroller.s_up.onRelease = (_scroller.s_up.onReleaseOutside = function () {
delete this.onEnterFrame;
})));
setMCposition();
}
function setPCT() {
_pct = Math.round(((_scroller.s_bar._y - _minY) / (_maxY - _minY)) * 100) / 100;
}
function setMCposition() {
var root = this;
var docY;
_scroller.onEnterFrame = function () {
if (root._slowdown > 0) {
docY = Math.round(root._pct * (root._maxMCy - root._minMCy));
root._scrollingMC._y = root._scrollingMC._y + ((docY - root._scrollingMC._y) / root._slowdown);
} else {
root._scrollingMC._y = root._pct * (root._maxMCy - root._minMCy);
}
if (Math.abs(root._scrollingMC._y - docY) < 0.5) {
root._scrollingMC._y = docY;
}
};
}
function setMCPosition(nY) {
var _local2 = nY / (_maxMCy - _minMCy);
if (_local2 > 1) {
_local2 = 1;
}
_pct = _local2;
_scroller.s_bar._y = _minY + (_local2 * (_maxY - _minY));
}
var _margin = 5;
var _speed = 10;
}
Symbol 639 MovieClip [__Packages.md5] Frame 0
class md5
{
function md5 (b64pad, chrsz) {
if (b64pad != undefined) {
this.b64pad = b64pad;
}
if (((chrsz != undefined) && (chrsz == 8)) || (chrsz == 16)) {
this.chrsz = chrsz;
}
}
function hash(s) {
return(hex_md5(s));
}
function hex_md5(s) {
return(binl2hex(core_md5(str2binl(s), s.length * chrsz)));
}
function b64_md5(s) {
return(binl2b64(core_md5(str2binl(s), s.length * chrsz)));
}
function str_md5(s) {
return(binl2str(core_md5(str2binl(s), s.length * chrsz)));
}
function hex_hmac_md5(key, data) {
return(binl2hex(core_hmac_md5(key, data)));
}
function b64_hmac_md5(key, data) {
return(binl2b64(core_hmac_md5(key, data)));
}
function str_hmac_md5(key, data) {
return(binl2str(core_hmac_md5(key, data)));
}
function md5_cmn(q, a, b, x, s, t) {
return(safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s), b));
}
function md5_ff(a, b, c, d, x, s, t) {
return(md5_cmn((b & c) | ((~b) & d), a, b, x, s, t));
}
function md5_gg(a, b, c, d, x, s, t) {
return(md5_cmn((b & d) | (c & (~d)), a, b, x, s, t));
}
function md5_hh(a, b, c, d, x, s, t) {
return(md5_cmn((b ^ c) ^ d, a, b, x, s, t));
}
function md5_ii(a, b, c, d, x, s, t) {
return(md5_cmn(c ^ (b | (~d)), a, b, x, s, t));
}
function core_md5(x, len) {
x[len >> 5] = x[len >> 5] | (128 << (len % 32));
x[(((len + 64) >>> 9) << 4) + 14] = len;
var _local5 = 1732584193 /* 0x67452301 */;
var _local4 = -271733879;
var _local3 = -1732584194;
var _local2 = 271733878 /* 0x10325476 */;
var _local6 = 0;
while (_local6 < x.length) {
var _local11 = _local5;
var _local10 = _local4;
var _local9 = _local3;
var _local8 = _local2;
_local5 = md5_ff(_local5, _local4, _local3, _local2, x[_local6 + 0], 7, -680876936);
_local2 = md5_ff(_local2, _local5, _local4, _local3, x[_local6 + 1], 12, -389564586);
_local3 = md5_ff(_local3, _local2, _local5, _local4, x[_local6 + 2], 17, 606105819);
_local4 = md5_ff(_local4, _local3, _local2, _local5, x[_local6 + 3], 22, -1044525330);
_local5 = md5_ff(_local5, _local4, _local3, _local2, x[_local6 + 4], 7, -176418897);
_local2 = md5_ff(_local2, _local5, _local4, _local3, x[_local6 + 5], 12, 1200080426);
_local3 = md5_ff(_local3, _local2, _local5, _local4, x[_local6 + 6], 17, -1473231341);
_local4 = md5_ff(_local4, _local3, _local2, _local5, x[_local6 + 7], 22, -45705983);
_local5 = md5_ff(_local5, _local4, _local3, _local2, x[_local6 + 8], 7, 1770035416);
_local2 = md5_ff(_local2, _local5, _local4, _local3, x[_local6 + 9], 12, -1958414417);
_local3 = md5_ff(_local3, _local2, _local5, _local4, x[_local6 + 10], 17, -42063);
_local4 = md5_ff(_local4, _local3, _local2, _local5, x[_local6 + 11], 22, -1990404162);
_local5 = md5_ff(_local5, _local4, _local3, _local2, x[_local6 + 12], 7, 1804603682);
_local2 = md5_ff(_local2, _local5, _local4, _local3, x[_local6 + 13], 12, -40341101);
_local3 = md5_ff(_local3, _local2, _local5, _local4, x[_local6 + 14], 17, -1502002290);
_local4 = md5_ff(_local4, _local3, _local2, _local5, x[_local6 + 15], 22, 1236535329);
_local5 = md5_gg(_local5, _local4, _local3, _local2, x[_local6 + 1], 5, -165796510);
_local2 = md5_gg(_local2, _local5, _local4, _local3, x[_local6 + 6], 9, -1069501632);
_local3 = md5_gg(_local3, _local2, _local5, _local4, x[_local6 + 11], 14, 643717713);
_local4 = md5_gg(_local4, _local3, _local2, _local5, x[_local6 + 0], 20, -373897302);
_local5 = md5_gg(_local5, _local4, _local3, _local2, x[_local6 + 5], 5, -701558691);
_local2 = md5_gg(_local2, _local5, _local4, _local3, x[_local6 + 10], 9, 38016083);
_local3 = md5_gg(_local3, _local2, _local5, _local4, x[_local6 + 15], 14, -660478335);
_local4 = md5_gg(_local4, _local3, _local2, _local5, x[_local6 + 4], 20, -405537848);
_local5 = md5_gg(_local5, _local4, _local3, _local2, x[_local6 + 9], 5, 568446438);
_local2 = md5_gg(_local2, _local5, _local4, _local3, x[_local6 + 14], 9, -1019803690);
_local3 = md5_gg(_local3, _local2, _local5, _local4, x[_local6 + 3], 14, -187363961);
_local4 = md5_gg(_local4, _local3, _local2, _local5, x[_local6 + 8], 20, 1163531501);
_local5 = md5_gg(_local5, _local4, _local3, _local2, x[_local6 + 13], 5, -1444681467);
_local2 = md5_gg(_local2, _local5, _local4, _local3, x[_local6 + 2], 9, -51403784);
_local3 = md5_gg(_local3, _local2, _local5, _local4, x[_local6 + 7], 14, 1735328473);
_local4 = md5_gg(_local4, _local3, _local2, _local5, x[_local6 + 12], 20, -1926607734);
_local5 = md5_hh(_local5, _local4, _local3, _local2, x[_local6 + 5], 4, -378558);
_local2 = md5_hh(_local2, _local5, _local4, _local3, x[_local6 + 8], 11, -2022574463);
_local3 = md5_hh(_local3, _local2, _local5, _local4, x[_local6 + 11], 16, 1839030562);
_local4 = md5_hh(_local4, _local3, _local2, _local5, x[_local6 + 14], 23, -35309556);
_local5 = md5_hh(_local5, _local4, _local3, _local2, x[_local6 + 1], 4, -1530992060);
_local2 = md5_hh(_local2, _local5, _local4, _local3, x[_local6 + 4], 11, 1272893353);
_local3 = md5_hh(_local3, _local2, _local5, _local4, x[_local6 + 7], 16, -155497632);
_local4 = md5_hh(_local4, _local3, _local2, _local5, x[_local6 + 10], 23, -1094730640);
_local5 = md5_hh(_local5, _local4, _local3, _local2, x[_local6 + 13], 4, 681279174);
_local2 = md5_hh(_local2, _local5, _local4, _local3, x[_local6 + 0], 11, -358537222);
_local3 = md5_hh(_local3, _local2, _local5, _local4, x[_local6 + 3], 16, -722521979);
_local4 = md5_hh(_local4, _local3, _local2, _local5, x[_local6 + 6], 23, 76029189);
_local5 = md5_hh(_local5, _local4, _local3, _local2, x[_local6 + 9], 4, -640364487);
_local2 = md5_hh(_local2, _local5, _local4, _local3, x[_local6 + 12], 11, -421815835);
_local3 = md5_hh(_local3, _local2, _local5, _local4, x[_local6 + 15], 16, 530742520);
_local4 = md5_hh(_local4, _local3, _local2, _local5, x[_local6 + 2], 23, -995338651);
_local5 = md5_ii(_local5, _local4, _local3, _local2, x[_local6 + 0], 6, -198630844);
_local2 = md5_ii(_local2, _local5, _local4, _local3, x[_local6 + 7], 10, 1126891415);
_local3 = md5_ii(_local3, _local2, _local5, _local4, x[_local6 + 14], 15, -1416354905);
_local4 = md5_ii(_local4, _local3, _local2, _local5, x[_local6 + 5], 21, -57434055);
_local5 = md5_ii(_local5, _local4, _local3, _local2, x[_local6 + 12], 6, 1700485571);
_local2 = md5_ii(_local2, _local5, _local4, _local3, x[_local6 + 3], 10, -1894986606);
_local3 = md5_ii(_local3, _local2, _local5, _local4, x[_local6 + 10], 15, -1051523);
_local4 = md5_ii(_local4, _local3, _local2, _local5, x[_local6 + 1], 21, -2054922799);
_local5 = md5_ii(_local5, _local4, _local3, _local2, x[_local6 + 8], 6, 1873313359);
_local2 = md5_ii(_local2, _local5, _local4, _local3, x[_local6 + 15], 10, -30611744);
_local3 = md5_ii(_local3, _local2, _local5, _local4, x[_local6 + 6], 15, -1560198380);
_local4 = md5_ii(_local4, _local3, _local2, _local5, x[_local6 + 13], 21, 1309151649);
_local5 = md5_ii(_local5, _local4, _local3, _local2, x[_local6 + 4], 6, -145523070);
_local2 = md5_ii(_local2, _local5, _local4, _local3, x[_local6 + 11], 10, -1120210379);
_local3 = md5_ii(_local3, _local2, _local5, _local4, x[_local6 + 2], 15, 718787259);
_local4 = md5_ii(_local4, _local3, _local2, _local5, x[_local6 + 9], 21, -343485551);
_local5 = safe_add(_local5, _local11);
_local4 = safe_add(_local4, _local10);
_local3 = safe_add(_local3, _local9);
_local2 = safe_add(_local2, _local8);
_local6 = _local6 + 16;
}
return(Array(_local5, _local4, _local3, _local2));
}
function core_hmac_md5(key, data) {
var _local3 = new Array(str2binl(key));
if (_local3.length > 16) {
_local3 = core_md5(_local3, key.length * chrsz);
}
var _local4 = new Array(16);
var _local5 = new Array(16);
var _local2 = 0;
while (_local2 < 16) {
_local4[_local2] = _local3[_local2] ^ 909522486;
_local5[_local2] = _local3[_local2] ^ 1549556828;
_local2++;
}
var _local6 = new Array(core_md5(_local4.concat(str2binl(data)), 512 + (data.length * chrsz)));
return(core_md5(_local5.concat(_local6), 640));
}
function safe_add(x, y) {
var _local1 = new Number((x & 65535) + (y & 65535));
var _local2 = new Number(((x >> 16) + (y >> 16)) + (_local1 >> 16));
return((_local2 << 16) | (_local1 & 65535));
}
function bit_rol(num, cnt) {
return((num << cnt) | (num >>> (32 - cnt)));
}
function str2binl(str) {
var _local4 = new Array();
var _local5 = (1 << chrsz) - 1;
var _local2 = 0;
while (_local2 < (str.length * chrsz)) {
_local4[_local2 >> 5] = _local4[_local2 >> 5] | ((str.charCodeAt(_local2 / chrsz) & _local5) << (_local2 % 32));
_local2 = _local2 + chrsz;
}
return(_local4);
}
function binl2str(bin) {
var _local4 = new String("");
var _local5 = (1 << chrsz) - 1;
var _local2 = 0;
while (_local2 < (bin.length * 32)) {
_local4 = _local4 + String.fromCharCode((bin[_local2 >> 5] >>> (_local2 % 32)) & _local5);
_local2 = _local2 + chrsz;
}
return(_local4);
}
function binl2hex(binarray) {
var _local3 = "0123456789abcdef";
var _local4 = new String("");
var _local1 = 0;
while (_local1 < (binarray.length * 4)) {
_local4 = _local4 + (_local3.charAt((binarray[_local1 >> 2] >> (((_local1 % 4) * 8) + 4)) & 15) + _local3.charAt((binarray[_local1 >> 2] >> ((_local1 % 4) * 8)) & 15));
_local1++;
}
return(_local4);
}
function binl2b64(binarray) {
var _local7 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
var _local5 = new String("");
var _local3 = 0;
while (_local3 < (binarray.length * 4)) {
var _local6 = ((((binarray[_local3 >> 2] >> (8 * (_local3 % 4))) & 255) << 16) | (((binarray[(_local3 + 1) >> 2] >> (8 * ((_local3 + 1) % 4))) & 255) << 8)) | ((binarray[(_local3 + 2) >> 2] >> (8 * ((_local3 + 2) % 4))) & 255);
var _local2 = 0;
while (_local2 < 4) {
if (((_local3 * 8) + (_local2 * 6)) > (binarray.length * 32)) {
_local5 = _local5 + b64pad;
} else {
_local5 = _local5 + _local7.charAt((_local6 >> (6 * (3 - _local2))) & 63);
}
_local2++;
}
_local3 = _local3 + 3;
}
return(_local5);
}
var b64pad = new String("");
var chrsz = new Number(8);
}
Symbol 640 MovieClip [__Packages.mx.transitions.easing.Strong] Frame 0
class mx.transitions.easing.Strong
{
function Strong () {
}
static function easeIn(t, b, c, d) {
t = t / d;
return((((((c * t) * t) * t) * t) * t) + b);
}
static function easeOut(t, b, c, d) {
t = (t / d) - 1;
return((c * (((((t * t) * t) * t) * t) + 1)) + b);
}
static function easeInOut(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return(((((((c / 2) * t) * t) * t) * t) * t) + b);
}
t = t - 2;
return(((c / 2) * (((((t * t) * t) * t) * t) + 2)) + b);
}
static var version = "1.1.0.52";
}
Symbol 641 MovieClip [__Packages.Menu_map] Frame 0
class Menu_map
{
var map, map_x, map_y, glowOn, glowOff, localizations, motionY, motionX, zoomX, zoomY;
function Menu_map (m) {
map = m;
map_x = map._x;
map_y = map._y;
map._xscale = (map._yscale = 100);
glowOn = new flash.filters.GlowFilter(26265, 0.8, 5, 5, 2, 2, false, false);
glowOff = new flash.filters.GlowFilter(26265, 0, 0, 0, 0, 0, false, false);
addLocalizations();
}
function addLocalizations() {
localizations = new Array();
var _local2 = 0;
while (map["l" + _local2]) {
localizations.push({x:map["l" + _local2]._x, y:map["l" + _local2]._y});
_local2++;
}
}
function showLocalization(no) {
delete motionY.onMotionFinished;
motionX.stop();
motionY.stop();
motionX = new mx.transitions.Tween(map, "_x", mx.transitions.easing.Regular.easeInOut, map_x, (maxScale / 100) * (-localizations[no].x), 1, true);
motionY = new mx.transitions.Tween(map, "_y", mx.transitions.easing.Regular.easeInOut, map_y, (maxScale / 100) * (-localizations[no].y), 1, true);
zoomX = new mx.transitions.Tween(map, "_xscale", mx.transitions.easing.Regular.easeInOut, map._xscale, maxScale, 1, true);
zoomY = new mx.transitions.Tween(map, "_yscale", mx.transitions.easing.Regular.easeInOut, map._yscale, maxScale, 1, true);
var m = map;
var f = glowOn;
var id = setInterval(function () {
clearInterval(id);
m.filters = [f];
}, 1100);
}
function reset() {
map._x = map_x;
map._y = map_y;
map._xscale = (map._yscale = 100);
}
var maxScale = 250;
}
Symbol 642 MovieClip [__Packages.mx.transitions.easing.Regular] Frame 0
class mx.transitions.easing.Regular
{
function Regular () {
}
static function easeIn(t, b, c, d) {
t = t / d;
return(((c * t) * t) + b);
}
static function easeOut(t, b, c, d) {
t = t / d;
return((((-c) * t) * (t - 2)) + b);
}
static function easeInOut(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return((((c / 2) * t) * t) + b);
}
t--;
return((((-c) / 2) * ((t * (t - 2)) - 1)) + b);
}
static var version = "1.1.0.52";
}
Symbol 643 MovieClip [__Packages.Stats] Frame 0
class Stats
{
var shots, positionHistory;
function Stats () {
shots = new Array();
positionHistory = new Array();
}
function isNotEmpty() {
return(shots.length > 0);
}
function addShot(sh) {
shots.push(sh);
}
function shotsAverage() {
var _local3 = 0;
var _local2 = 0;
while (_local2 < shots.length) {
_local3 = _local3 + shots[_local2];
_local2++;
}
return(Math.round(100 * (_local3 / shots.length)) / 100);
}
function hitAmount(hit) {
var _local3 = 0;
var _local2 = 0;
while (_local2 < shots.length) {
if (shots[_local2] == hit) {
_local3++;
}
_local2++;
}
return(_local3);
}
function hitFrequency(hit) {
return(Math.round(100 * (hitAmount(hit) / shots.length)) / 100);
}
function add2positionHistory(p) {
positionHistory.push(p);
}
function getPositionHistory() {
return(positionHistory);
}
}
Symbol 644 MovieClip [__Packages.ScoreTable] Frame 0
class ScoreTable
{
var mcArr, scoresArr, _no_mc, _player_mc, _vert_space;
function ScoreTable (no_mc, player_mc, vert_space) {
mcArr = new Array();
scoresArr = new Array();
_no_mc = no_mc;
_player_mc = player_mc;
_vert_space = vert_space;
no_mc._visible = (player_mc._visible = false);
}
function addPlayer(plr) {
scoresArr.push({id:plr.id, country:plr.kraj, playername:plr.imie, points:plr.punkty, mc:undefined, abl:plr.umiejetnosci});
}
function getTableLength() {
return(scoresArr.length);
}
function drawTable(records, countriesARR) {
eraseTable();
if (!records) {
records = scoresArr.length;
}
var _local2 = 0;
while (_local2 < records) {
var _local4 = scoresArr[_local2];
var _local5 = duplicateMC(_no_mc, "no" + (_local2 + 1), _no_mc._y + (_local2 * _vert_space));
var _local3 = duplicateMC(_player_mc, "pl" + (_local2 + 1), _player_mc._y + (_local2 * _vert_space));
scoresArr[_local2].mc = _local3;
_local5.numer.text = _local2 + 1;
_local3.imie.text = _local4.playername;
_local3.punkty.text = _local4.points;
var _local6 = _local3.kraj.attachMovie(countriesARR[_local4.country], "flag", 0);
_local6._xscale = (_local6._yscale = 15);
_local3.id = _local4.id;
_local3.prof.text = _local4.abl;
_local3.pl_stat = true;
_local5.pl_stat = false;
mcArr.push(_local5, _local3);
_local2++;
}
}
function changePlayerPoints(id, points) {
var _local2 = 0;
while (_local2 < scoresArr.length) {
if (scoresArr[_local2].id == id) {
scoresArr[_local2].points = points;
_local2 = scoresArr.length;
}
_local2++;
}
}
function sortTable() {
scoresArr.sortOn(["points", "playername"], [Array.NUMERIC, Array.CASEINSENSITIVE]);
scoresArr.reverse();
}
function getPlayerRecord(id) {
var _local2 = 0;
while (_local2 < scoresArr.length) {
if (scoresArr[_local2].id == id) {
return(scoresArr[_local2]);
}
_local2++;
}
}
function getPlayerPoints(id) {
var _local2 = 0;
while (_local2 < scoresArr.length) {
if (scoresArr[_local2].id == id) {
return(scoresArr[_local2].points);
}
_local2++;
}
}
function getPlayerPosition(id) {
var _local3 = getPlayerRecord(id).points;
var _local2 = 0;
while (_local2 < scoresArr.length) {
if (scoresArr[_local2].points == _local3) {
return(_local2 + 1);
}
_local2++;
}
}
function eraseTable() {
var _local2 = 0;
while (_local2 < mcArr.length) {
mcArr[_local2].removeMovieClip();
_local2++;
}
mcArr = new Array();
}
function plus(stable) {
var _local2 = 0;
while (_local2 < stable.getTableLength()) {
changePlayerPoints(_local2, getPlayerPoints(_local2) + stable.getPlayerPoints(_local2));
_local2++;
}
}
function duplicateMC(mc, nw_name, y) {
var _local1 = mc.duplicateMovieClip(nw_name, mc._parent.getNextHighestDepth());
_local1._y = y;
return(_local1);
}
}
Symbol 645 MovieClip [__Packages.mx.transitions.easing.Back] Frame 0
class mx.transitions.easing.Back
{
function Back () {
}
static function easeIn(t, b, c, d, s) {
if (s == undefined) {
s = 1.70158;
}
t = t / d;
return((((c * t) * t) * (((s + 1) * t) - s)) + b);
}
static function easeOut(t, b, c, d, s) {
if (s == undefined) {
s = 1.70158;
}
t = (t / d) - 1;
return((c * (((t * t) * (((s + 1) * t) + s)) + 1)) + b);
}
static function easeInOut(t, b, c, d, s) {
if (s == undefined) {
s = 1.70158;
}
t = t / (d / 2);
if (t < 1) {
s = s * 1.525;
return(((c / 2) * ((t * t) * (((s + 1) * t) - s))) + b);
}
t = t - 2;
s = s * 1.525;
return(((c / 2) * (((t * t) * (((s + 1) * t) + s)) + 2)) + b);
}
static var version = "1.1.0.52";
}
Symbol 646 MovieClip [__Packages.Shake] Frame 0
class Shake
{
var _mc, _radius, _speed, _softBorders, _center_x, _center_y;
function Shake (mc, radius, speed, softBorders, bt) {
_mc = mc;
_mc.root = this;
_radius = radius;
_speed = speed;
_softBorders = softBorders;
if (bt) {
_border_thickness = bt;
}
}
function start(xc, yc) {
_center_x = xc;
_center_y = yc;
newVector();
_mc.onEnterFrame = function () {
if (this.root._softBorders) {
this.root.scaleVector();
}
var _local3 = this.root._pos_x + (this.root._vector_x * this.root._vector_scale);
var _local2 = this.root._pos_y + (this.root._vector_y * this.root._vector_scale);
if (this.root.distanceToCenter(_local3, _local2) > this.root._radius) {
this.root.newVector();
} else {
this._x = this.root._center_x + _local3;
this._y = this.root._center_y + _local2;
this.root._pos_x = _local3;
this.root._pos_y = _local2;
}
};
}
function upload_center(xc, yc) {
_center_x = xc;
_center_y = yc;
_mc._x = _center_x + _pos_x;
_mc._y = _center_y + _pos_y;
}
function newVector() {
var _local6 = Math.round(Math.random() * 360);
var _local3 = degToRad(_local6);
var _local5 = _radius * Math.cos(_local3);
var _local4 = _radius * Math.sin(_local3);
if ((_vector_x == 0) && (_vector_y == 0)) {
_vector_x = _local5;
_vector_y = _local4;
} else {
_vector_x = _local5 - _vector_x;
_vector_y = _local4 - _vector_y;
}
var _local2 = Math.sqrt((_vector_x * _vector_x) + (_vector_y * _vector_y));
_vector_x = _vector_x * (_speed / _local2);
_vector_y = _vector_y * (_speed / _local2);
}
function scaleVector() {
_vector_scale = (1 + _border_thickness) - (distanceToCenter(_pos_x, _pos_y) / _radius);
}
function degToRad(d) {
return(d * (Math.PI/180));
}
function distanceToCenter(x, y) {
return(Math.sqrt((x * x) + (y * y)));
}
function get radius() {
return(_radius);
}
function get speed() {
return(_speed);
}
function change_prop(r, s, b) {
_radius = r;
_speed = s;
if (_softBorders == true) {
_border_thickness = b;
}
newVector();
}
var _vector_x = 0;
var _vector_y = 0;
var _pos_x = 0;
var _pos_y = 0;
var _vector_scale = 1;
var _border_thickness = 0.1;
}
Symbol 180 MovieClip Frame 1
function showFlag(country, top) {
var _local3 = attachMovie("flag_container", "flag_" + _parent._parent._parent.orderARR[country], country);
var flag = _local3.attachMovie(_parent._parent._parent.orderARR[country], "flag", 0);
flag._y = (flag._x = 0);
_local3.cname.text = _parent._parent._parent.norderARR[country].toUpperCase();
_local3.cname.autoSize = true;
_local3.cname._x = (-_local3.cname._width) / 2;
if ((_local3.cname._x + _local3.cname._width) > 60) {
_local3.cname._x = 60 - _local3.cname._width;
}
flag._xscale = (flag._yscale = 70);
if (top) {
_local3._y = (-distFromC) - flag._height;
} else {
_local3._y = distFromC + flag._height;
}
_local3._stY = _local3._y;
_local3._alpha = 0;
_local3.blurF = new flash.filters.BlurFilter(0, 0, 3);
chosenMC = _local3;
cname.text = _parent._parent._parent.orderARR[country];
_local3.onEnterFrame = function () {
if (this != chosenMC) {
if (chosenMC._y > this._y) {
this._y = this._y + ((((-distFromC) - this.flag._height) - this._y) / ease);
this._alpha = 100 - (Math.abs(this._y / (distFromC + this.flag._height)) * 100);
if (this._alpha < 50) {
this.removeMovieClip();
}
} else {
this._y = this._y + (((distFromC + this.flag._height) - this._y) / ease);
this._alpha = 100 - (Math.abs(this._y / ((-distFromC) - this.flag._height)) * 100);
if (this._alpha < 50) {
this.removeMovieClip();
}
}
} else {
this._y = this._y + ((-this._y) / ease);
this._alpha = 100 - (Math.abs(this._y / this._stY) * 100);
}
this.blurF.blurY = (100 - this._alpha) / 2;
this.filters = [this.blurF, dropShadow];
};
}
var dropShadow = (new flash.filters.DropShadowFilter(0, 0, 0, 0.5, 6, 6, 1.5, 3, false, false, false));
var def = _parent._parent._parent.playerCountry;
var ease = 3.3;
var distFromC = 10;
var chosenMC;
showFlag(def, false);
down.onRelease = function () {
def++;
if (def > (_parent._parent._parent.orderARR.length - 1)) {
def = 0;
}
showFlag(def, false);
};
up.onRelease = function () {
def--;
if (def < 0) {
def = (def = _parent._parent._parent.orderARR.length - 1);
}
showFlag(def, true);
};
Symbol 189 MovieClip Frame 1
this.onRollOver = function () {
this.gotoAndPlay("over");
};
this.onRollOut = (this.onReleaseOutside = function () {
this.gotoAndPlay("out");
});
stop();
Symbol 189 MovieClip Frame 11
stop();
Symbol 193 MovieClip Frame 1
up.onRelease = function () {
if ((kraj._currentframe - 1) >= 1) {
kraj.gotoAndStop(kraj._currentframe - 1);
} else {
kraj.gotoAndStop(kraj._totalframes);
}
kraj_stat.text = (kraj._currentframe + "/") + kraj._totalframes;
};
down.onRelease = function () {
if ((kraj._currentframe + 1) <= kraj._totalframes) {
kraj.gotoAndStop(kraj._currentframe + 1);
} else {
kraj.gotoAndStop(1);
}
kraj_stat.text = (kraj._currentframe + "/") + kraj._totalframes;
};
imie.onSetFocus = function (oldFocus) {
this.text = "";
};
imie.onKillFocus = function () {
if (this.text == "") {
this.text = "Your nickname...";
}
};
Symbol 194 MovieClip Frame 1
if (_parent.TEST_MODE) {
gotoAndPlay (70);
}
Symbol 194 MovieClip Frame 84
stop();
Symbol 206 MovieClip Frame 1
if (_parent.TEST_MODE) {
gotoAndPlay (70);
}
Symbol 206 MovieClip Frame 85
stop();
Symbol 240 MovieClip Frame 1
stop();
Symbol 240 MovieClip Frame 2
bestplayer.txt.text = this.bpl;
var flag = bestplayer.kraj.attachMovie(_parent.countriesARR[this.bc], "flag", 0);
flag._xscale = (flag._yscale = 50);
bp.pt.text = ("(" + this.bestplayerpoints) + " points)";
Symbol 240 MovieClip Frame 25
bestcountry.txt.text = this.cn.toUpperCase();
var flag2 = bestcountry.kraj.attachMovie(this.cf, "flag", 10);
flag2._xscale = (flag2._yscale = 50);
bct.pt.text = ("(" + this.bestcountrypoints) + " points)";
Symbol 240 MovieClip Frame 40
ls.pt.htmlText = (("<font color='#0066CC'>THEY HAVE SCORED FOR " + this.cn.toUpperCase()) + ": </font> ") + this.pllist;
Symbol 240 MovieClip Frame 151
_parent.gotoAndPlay(_parent._currentframe + 1);
stop();
Symbol 244 MovieClip Frame 1
this.onRollOver = function () {
this.gotoAndPlay("over");
};
this.onRollOut = (this.onReleaseOutside = function () {
this.gotoAndPlay("out");
});
stop();
Symbol 244 MovieClip Frame 11
stop();
Symbol 247 MovieClip Frame 9
stop();
Symbol 253 MovieClip Frame 1
this.onRelease = function () {
getURL ("http://www.maciekgrzybowski.com/", "Top");
};
Symbol 256 MovieClip Frame 1
this.onRelease = function () {
var _local2 = new LoadVars();
_local2.load(_parent._parent.notify_CLICKED_script);
getURL ("http://www.gamesfreak.net/", "Top");
};
Symbol 257 MovieClip Frame 1
crd.onRelease = function () {
gotoAndPlay (2);
};
stop();
Symbol 257 MovieClip Frame 2
bg.onRelease = function () {
gotoAndPlay ("out");
};
bg.useHandCursor = false;
bg2.onRelease = function () {
gotoAndPlay ("out");
};
bg2.useHandCursor = false;
Symbol 257 MovieClip Frame 19
stop();
Symbol 264 MovieClip Frame 1
record._visible = false;
Symbol 272 MovieClip Frame 1
function initCountriesTable(plArr) {
scoretable = new Array();
var _local2 = 0;
while (_local2 < _parent.countriesARR.length) {
scoretable.push({country:_local2 + 1, name:_parent.namesARR[_local2], score:countryPoints(_local2 + 1, plArr)});
_local2++;
}
scoretable.sortOn("score", Array.NUMERIC | Array.DESCENDING);
makeTable(0, 4);
_parent.player_card.countryPosCom(getCountryPosition(_parent.playerCountry + 1));
}
function countryPoints(c, plArr) {
var _local3 = 0;
var _local1 = 0;
while (_local1 < plArr.length) {
if (plArr[_local1].country == c) {
_local3 = _local3 + Number(plArr[_local1].score);
}
_local1++;
}
return(_local3);
}
function getCountryPosition(c) {
var _local1 = 0;
while (_local1 < scoretable.length) {
if (scoretable[_local1].country == c) {
return(_local1 + 1);
}
_local1++;
}
return(0);
}
function makeTable(startC, stopC) {
record._visible = false;
fromto.text = (((startC / (stopC - startC)) + 1) + "/") + Math.floor(scoretable.length / (stopC - startC));
var _local4 = 0;
while (_local4 < (stopC - startC)) {
var _local3 = record.duplicateMovieClip("row" + _local4, ctr++);
_local3._y = record._height * _local4;
if (scoretable[startC + _local4].name != undefined) {
var _local5 = _local3.kraj.attachMovie(_parent.countriesARR[scoretable[startC + _local4].country - 1], "flag", 0);
_local5._xscale = (_local5._yscale = 15);
_local3.nazwa.text = scoretable[startC + _local4].name.toUpperCase();
_local3.punkty.text = scoretable[startC + _local4].score;
_local3.no.text = (startC + _local4) + 1;
} else {
_local3.nazwa.text = "";
_local3.punkty.text = "";
_local3.no.text = "";
}
_local3._yscale = 0;
_local3.wait = _local4;
_local3.blurF = new flash.filters.BlurFilter(0, 0, 2);
_local3.onEnterFrame = function () {
if ((this.wait--) < 0) {
this.blurF.blurY = (100 - this._yscale) / 5;
this._yscale = this._yscale + ((100 - this._yscale) / 3);
if (this._yscale >= 99) {
this._yscale = 100;
delete this.onEnterFrame;
}
this.filters = [this.blurF];
}
};
if (startC > 0) {
pre.enabled = (pre.useHandCursor = true);
pre.onRelease = function () {
if (!blockInterface) {
makeTable(startC - (stopC - startC), startC);
}
};
} else {
pre.enabled = (pre.useHandCursor = false);
}
if (stopC < (scoretable.length - 1)) {
nex.enabled = (nex.useHandCursor = true);
nex.onRelease = function () {
if (!blockInterface) {
makeTable(stopC, stopC + (stopC - startC));
}
};
} else {
nex.enabled = (nex.useHandCursor = false);
}
_local4++;
}
pole.autoSize = true;
var _local6 = new ScrollMC_OY(scrollbar, tabela_kontener.tabela, scrollbar._height - 20, scrollbar._height, 4);
tabela_kontener.tabela.table_loader._visible = false;
}
function clearAll() {
scoretable = new Array();
for (i in record._parent) {
if (typeof(record._parent[i]) == "movieclip") {
if (record._parent[i]._name.substr(0, 3) == "row") {
record._parent[i].removeMovieClip();
}
}
}
}
var record = tabela_kontener.tabela.record;
var mc = tabela_kontener.tabela;
var scoretable = new Array();
var dropShadow = (new flash.filters.DropShadowFilter(0, 0, 0, 0.5, 6, 6, 1.5, 3, false, false, false));
var blockInterface = false;
var ctr = 0;
Symbol 281 MovieClip Frame 76
t1.onRelease = function () {
_parent.ustawTurniej(0);
_parent.gotoAndPlay(_parent._currentframe + 1);
};
t2.onRelease = function () {
_parent.ustawTurniej(1);
_parent.gotoAndPlay(_parent._currentframe + 1);
};
z1.id = 1;
z2.id = 2;
stop();
Symbol 287 MovieClip Frame 1
function countryPosCom(pos) {
komentarzkraj.htmlText = (("<font color='#0066CC'>" + _parent.namesARR[_parent.playerCountry].toUpperCase()) + "'S</font> POSITION: ") + pos;
}
imie.text = _parent.playerName;
var flag = kraj.attachMovie(_parent.countriesARR[_parent.playerCountry], "flag", 0);
flag._xscale = (flag._yscale = 15);
Symbol 292 MovieClip Frame 1
record._visible = false;
Symbol 297 MovieClip Frame 1
function submitScore(php, xml, name, score, country) {
clearAll();
var _local4 = new LoadVars();
_local4.onLoad = function (success) {
if (success) {
if (this.stat == "1") {
_parent.komm.showComm(true);
} else {
_parent.komm.showComm(false);
}
loadTable(xml);
_parent.komunikat.activate();
} else {
dbg.text = "Blad polaczenia z serwerem...";
}
};
var _local3 = new LoadVars();
_local3.country = country;
_local3.name = name;
_local3.score = score;
_local3.sum = MDHASH.hash(((((("gfhash" + name) + "") + score) + "8875233") + country) + "dontcheat");
_local3.sendAndLoad(php, _local4, "GET");
}
function loadTable(f) {
XML.prototype.ignoreWhite = true;
var _local7 = new XML();
_local7.load((f + "?") + getTimer());
_local7.onLoad = function (success) {
if (success) {
dbg.text = this;
dbg.autoSize = true;
var _local3 = this.firstChild.firstChild;
while (_local3) {
scoretable.push({name:_local3.attributes.name, country:_local3.attributes.country, score:_local3.attributes.score});
_local3 = _local3.nextSibling;
}
makeTable(0, 10);
_parent.tabela_krajow.initCountriesTable(scoretable);
}
};
}
function makeTable(startC, stopC) {
record._visible = false;
fromto.text = (((startC / (stopC - startC)) + 1) + "/") + (scoretable.length / (stopC - startC));
var _local4 = 0;
while (_local4 < (stopC - startC)) {
var _local3 = record.duplicateMovieClip("row" + _local4, ctr++);
_local3._y = record._height * _local4;
var _local5 = _local3.kraj.attachMovie(_parent.countriesARR[scoretable[startC + _local4].country - 1], "flag", 0);
_local5._xscale = (_local5._yscale = 15);
_local3.imie.text = scoretable[startC + _local4].name.toUpperCase();
_local3.punkty.text = scoretable[startC + _local4].score;
_local3.no.text = (startC + _local4) + 1;
_local3._yscale = 0;
_local3.wait = _local4;
_local3.blurF = new flash.filters.BlurFilter(0, 0, 2);
_local3.onEnterFrame = function () {
if ((this.wait--) < 0) {
this.blurF.blurY = (100 - this._yscale) / 5;
this._yscale = this._yscale + ((100 - this._yscale) / 3);
if (this._yscale >= 99) {
this._yscale = 100;
delete this.onEnterFrame;
}
this.filters = [this.blurF];
}
};
if (startC > 0) {
pre.enabled = (pre.useHandCursor = true);
pre.onRelease = function () {
if (!blockInterface) {
makeTable(startC - (stopC - startC), startC);
}
};
} else {
pre.enabled = (pre.useHandCursor = false);
}
if (stopC < (scoretable.length - 1)) {
nex.enabled = (nex.useHandCursor = true);
nex.onRelease = function () {
if (!blockInterface) {
makeTable(stopC, stopC + (stopC - startC));
}
};
} else {
nex.enabled = (nex.useHandCursor = false);
}
_local4++;
}
pole.autoSize = true;
var _local6 = new ScrollMC_OY(scrollbar, tabela_kontener.tabela, scrollbar._height - 20, scrollbar._height, 4);
tabela_kontener.tabela.table_loader._visible = false;
}
function clearAll() {
scoretable = new Array();
for (i in record._parent) {
if (typeof(record._parent[i]) == "movieclip") {
if (record._parent[i]._name.substr(0, 3) == "row") {
record._parent[i].removeMovieClip();
}
}
}
}
var record = tabela_kontener.tabela.record;
var mc = tabela_kontener.tabela;
var MDHASH = new md5();
var scoretable = new Array();
var dropShadow = (new flash.filters.DropShadowFilter(0, 0, 0, 0.5, 6, 6, 1.5, 3, false, false, false));
var blockInterface = false;
var ctr = 0;
Symbol 303 MovieClip Frame 24
stop();
Symbol 304 MovieClip Frame 1
function showCityName() {
var _local4 = _parent._parent.turniej_arr[_parent._parent.zawody_turnieju - 1].id;
cn.cn.cn.autoSize = true;
cn.cn.cn.text = namesARR[_local4];
cn._x = this["c" + (_local4 + 1)]._x - (cn.cn.cn._width / 2);
cn._y = this["c" + (_local4 + 1)]._y + 15;
var _local3 = 0;
while (_local3 < namesARR.length) {
this["c" + (_local3 + 1)]._visible = false;
_local3++;
}
_local3 = 0;
while (_local3 < _parent._parent.turniej_arr.length) {
this["c" + (_parent._parent.turniej_arr[_local3].id + 1)]._visible = true;
_local3++;
}
}
var namesARR = ["WARSAW", "MOSCOW", "AMSTERDAM", "PARIS", "EDINBURGH", "ZAMBROW", "GIZA", "DELHI", "RIO DE JANEIRO", "SYDNEY", "NEW YORK", "TORONTO"];
turniej_arr[zawody_turnieju - 1].id + 1;
showCityName();
stop();
Symbol 305 MovieClip Frame 30
icons.gotoAndPlay(_parent.turniej + 1);
Symbol 305 MovieClip Frame 35
stop();
Symbol 319 MovieClip Frame 1
var dataArr = [{m:"Warsaw", g:"8:00", w:"weak"}, {m:"Moscow", g:"13:10", w:"weak"}, {m:"Amsterdam", g:"12:00", w:"strong"}, {m:"Paris", g:"7:20", w:"medium"}, {m:"Edinburgh", g:"18:00", w:"medium"}, {m:"Zambrow", g:"12:10", w:"medium"}, {m:"Giza", g:"13:30", w:"weak"}, {m:"Delhi", g:"7:30", w:"medium"}, {m:"Rio De Janeiro", g:"7:30", w:"strong"}, {m:"Sydney", g:"14:00", w:"weak"}, {m:"New York", g:"18:00", w:"strong"}, {m:"Toronto", g:"8:15", w:"weak"}];
var zaw = dataArr[_parent._parent.id_zawodow - 1];
l1.htmlText = ("next competition: <b>" + zaw.m) + "</b>";
l2.htmlText = ("time: <b>" + zaw.g) + "</b>";
l3.styleSheet = style;
l3.htmlText = ("wind: <b>" + zaw.w) + "</b>";
var i = 1;
while (i <= 3) {
if (!((i >= _parent._parent.dystans_start) && (i <= _parent._parent.dystans_koniec))) {
this["d" + i]._alpha = 30;
} else {
this["d" + i]._alpha = 100;
}
i++;
}
var nzw = "";
switch (_parent._parent.turniej + 1) {
case 1 :
nzw = "Europe - Asia - Africa Tour";
break;
case 2 :
nzw = "America - Australia Tour";
break;
case 3 :
nzw = "Baltic's Sea Tournament";
break;
case 4 :
nzw = "WORLD CUP";
}
l0.htmlText = ((((("<b>" + nzw) + " (") + _parent._parent.zawody_turnieju) + "/") + _parent._parent.turniej_arr.length) + ")</b>";
stop();
Symbol 328 MovieClip Frame 1
function showStats() {
var _local4 = _parent.statystyki;
if (_local4.getPositionHistory().length > 0) {
var _local5;
if (_parent.qualified == false) {
if (_parent.playersRank.getPlayerPosition(0) <= _parent.qualifyLimit) {
_local5 = " - <b>allow you to start in European Cup!</b> Keep on trucking!";
} else {
_local5 = (" - <b>don't allow you to start in European Cup</b>. You have to be at least " + _parent.qualifyLimit) + "!";
}
} else if (_parent.playersRank.getPlayerPosition(0) == 1) {
_local5 = " - you are the leader in The European Cup! Keep on trucking!";
} else if (_parent.playersRank.getPlayerPosition(0) <= 3) {
_local5 = " - you've got chances for a medal in European Cup! Try to win gold!";
} else {
_local5 = " - try to be first! It's The European Cup!";
}
stats.htmlText = ((("Your position: <font color='#FF0000' size='12'><b>" + _parent.playersRank.getPlayerPosition(0)) + "</b></font><font color='#8C8C8C'>") + _local5) + "</font><br>";
} else {
stats.htmlText = "Your position: ...";
}
if (_local4.isNotEmpty()) {
stats.htmlText = stats.htmlText + ("Your places: " + _local4.getPositionHistory().join(", "));
} else {
stats.htmlText = stats.htmlText + "Your places: ...";
}
stats.htmlText = stats.htmlText + "";
if (_local4.isNotEmpty()) {
diagram.srednia.srednia.htmlText = ("average: <b>" + _local4.shotsAverage()) + "</b>";
diagram.srednia._x = 145 * (_local4.shotsAverage() / 10);
diagram.dymek._visible = false;
var _local3 = 0;
while (_local3 <= 10) {
diagram["w" + _local3]._height = _local4.hitFrequency(_local3) * 50;
diagram["w" + _local3].amount = _local4.hitAmount(_local3);
diagram["p" + _local3].gotoAndStop(_local3 + 1);
diagram["w" + _local3].onRollOver = function () {
diagram.dymek._visible = true;
diagram.dymek.no.text = this.amount;
diagram.dymek._x = this._x;
diagram.dymek._y = 0;
};
diagram["w" + _local3].onReleaseOutside = (diagram["w" + _local3].onRollOut = function () {
diagram.dymek._visible = false;
});
_local3++;
}
} else {
diagram.srednia.srednia.htmlText = "average: ...";
diagram.srednia._x = -2;
diagram.dymek._visible = false;
var _local3 = 0;
while (_local3 <= 10) {
diagram["w" + _local3]._height = 1;
diagram["p" + _local3].gotoAndStop(_local3 + 1);
_local3++;
}
}
}
imie.text = _parent.playerObj.n;
kraj.gotoAndPlay(_parent.playerObj.c);
this._visible = false;
taknie._visible = false;
shadow._visible = false;
koniec.onRelease = function () {
if (taknie._visible == false) {
taknie._visible = (shadow._visible = true);
} else {
taknie._visible = (shadow._visible = false);
}
};
taknie.tak.onRelease = function () {
_parent.gotoAndPlay(_parent._currentframe - 1);
};
taknie.nie.onRelease = function () {
taknie._visible = (shadow._visible = false);
};
jakgrac.onRelease = function () {
_parent.jakgrac.gotoAndPlay(2);
};
moregames.onRelease = function () {
getURL ("http://www.gamesfreak.net/", "Top");
};
Symbol 347 MovieClip Frame 1
stop();
Symbol 347 MovieClip Frame 2
stop();
Symbol 347 MovieClip Frame 3
stop();
Symbol 347 MovieClip Frame 4
stop();
Symbol 347 MovieClip Frame 5
stop();
Symbol 347 MovieClip Frame 6
stop();
Symbol 347 MovieClip Frame 7
stop();
Symbol 347 MovieClip Frame 8
stop();
Symbol 347 MovieClip Frame 9
stop();
Symbol 347 MovieClip Frame 10
stop();
Symbol 347 MovieClip Frame 11
stop();
Symbol 353 MovieClip Frame 1
function showStats() {
var _local4 = _parent.statystyki;
if (_local4.getPositionHistory().length > 0) {
var _local5;
if (_parent.qualified == false) {
if (_parent.playersRank.getPlayerPosition(0) <= _parent.qualifyLimit) {
_local5 = " - <b>allow you to start in World Cup!</b> Keep on trucking!";
} else {
_local5 = (" - <b>don't allow you to start in Worl Cup</b>. You have to be at least " + _parent.qualifyLimit) + "!";
}
} else if (_parent.playersRank.getPlayerPosition(0) == 1) {
_local5 = " - you are the leader in The World Cup! Keep on trucking!";
} else if (_parent.playersRank.getPlayerPosition(0) <= 3) {
_local5 = " - you've got chances for a medal in World Cup! Try to win gold!";
} else {
_local5 = " - try to be first! It's The World Cup!";
}
stats.htmlText = ((("Your position: <font color='#FF0000' size='12'><b>" + _parent.playersRank.getPlayerPosition(0)) + "</b></font><font color='#8C8C8C'>") + _local5) + "</font></br>";
} else {
stats.htmlText = "Your position: ...</br>";
}
if (_local4.isNotEmpty()) {
stats.htmlText = stats.htmlText + ("Your places: " + _local4.getPositionHistory().join(", "));
} else {
stats.htmlText = stats.htmlText + "Your places: ...";
}
stats.htmlText = stats.htmlText + "";
if (_local4.isNotEmpty()) {
diagram.srednia.srednia.htmlText = ("<b>" + _local4.shotsAverage()) + "</b>";
diagram.srednia._x = 145 * (_local4.shotsAverage() / 10);
diagram.dymek._visible = false;
var _local3 = 0;
while (_local3 <= 10) {
diagram["w" + _local3]._height = _local4.hitFrequency(_local3) * 50;
diagram["w" + _local3].amount = _local4.hitAmount(_local3);
diagram["p" + _local3].gotoAndStop(_local3 + 1);
diagram["w" + _local3].onRollOver = function () {
diagram.dymek._visible = true;
diagram.dymek.no.text = this.amount;
diagram.dymek._x = this._x;
diagram.dymek._y = 0;
};
diagram["w" + _local3].onReleaseOutside = (diagram["w" + _local3].onRollOut = function () {
diagram.dymek._visible = false;
});
_local3++;
}
} else {
diagram.srednia.srednia.htmlText = "0";
diagram.srednia._x = -2;
diagram.dymek._visible = false;
var _local3 = 0;
while (_local3 <= 10) {
diagram["w" + _local3]._height = 1;
diagram["p" + _local3].gotoAndStop(_local3 + 1);
_local3++;
}
}
}
imie.text = _parent.playerObj.n;
var flag = kraj.attachMovie(_parent.countriesARR[_parent.playerObj.c], "flag", 0);
flag._xscale = (flag._yscale = 15);
showStats();
this._visible = false;
taknie._visible = false;
shadow._visible = false;
koniec.onRelease = function () {
if (taknie._visible == false) {
taknie._visible = (shadow._visible = true);
} else {
taknie._visible = (shadow._visible = false);
}
};
taknie.tak.onRelease = function () {
_parent.gotoAndPlay(_parent._currentframe - 1);
};
taknie.nie.onRelease = function () {
taknie._visible = (shadow._visible = false);
};
jakgrac.onRelease = function () {
_parent.jakgrac.gotoAndPlay(2);
};
Symbol 370 MovieClip Frame 1
this.onRollOver = function () {
this.useHandCursor = false;
this.gotoAndPlay("over");
};
this.onRollOut = (this.onReleaseOutside = function () {
this.gotoAndPlay("out");
});
stop();
Symbol 370 MovieClip Frame 5
stop();
Symbol 371 MovieClip Frame 2
if (this.id != 0) {
oznaczenie._visible = false;
}
Symbol 371 MovieClip Frame 8
stop();
Symbol 371 MovieClip Frame 15
stop();
Symbol 383 MovieClip Frame 1
function fillTable(stable) {
loader._visible = false;
stable.addPlayer({id:0, kraj:_parent.playerObj.c, imie:formatName(_parent.playerObj.n), punkty:0});
var _local3 = 0;
while (_local3 < _parent.playersArr.length) {
var _local2 = _parent.playersArr[_local3];
stable.addPlayer({id:_local2.id, kraj:_local2.c, imie:_local2.n, punkty:0, umiejetnosci:_local2.a});
_local3++;
}
stable.sortTable();
stable.drawTable(undefined, _parent.countriesARR);
pozatabela._visible = false;
var inId = setInterval(function () {
initInterface();
clearInterval(inId);
}, 500);
}
function formatName(n) {
if (n.length > 10) {
return(n.substr(0, 8) + "...");
}
return(n);
}
function initInterface() {
loader._visible = false;
var _local2 = new ScrollMC_OY(scrollbar, tabela_kontener.tabela, scrollbar._height - 5, scrollbar._height, 2);
var mc = this;
motion = new mx.transitions.Tween(mc, "_x", mx.transitions.easing.Regular.easeOut, mc._x, 90, 1, true);
motion.onMotionFinished = function () {
this=new mx.transitions.Tween(mc, "_x", mx.transitions.easing.Regular.easeInOut, mc._x, -75, 0.5, true);//parameter overwritten
new mx.transitions.Tween(mc, "_x", mx.transitions.easing.Regular.easeInOut, mc._x, -75, 0.5, true);
};
bg.onRollOver = function () {
motion.stop();
motion = new mx.transitions.Tween(this._parent, "_x", mx.transitions.easing.Regular.easeOut, this._parent._x, 90, 0.3, true);
};
bg.onRollOut = (bg.onReleaseOutside = function () {
if (_xmouse > 90) {
motion.stop();
motion = new mx.transitions.Tween(this._parent, "_x", mx.transitions.easing.Back.easeOut, this._parent._x, -75, 0.5, true);
}
});
}
var motion;
this._x = -120;
function refreshScore(score, lastshot) {
var _local5 = new Array();
stable.changePlayerPoints(0, score);
stable.getPlayerRecord(0).mc.trafienie.gotoAndStop(lastshot + 1);
_local5.push(lastshot);
var _local2 = 1;
while (stable.getPlayerRecord(_local2)) {
var _local3 = stable.getPlayerRecord(_local2);
var _local4 = randomShot(_local3.abl);
stable.changePlayerPoints(_local2, _local3.points + _local4);
_local5.push(_local4);
_local2++;
}
stable.sortTable();
stable.drawTable(undefined, _parent.countriesARR);
_local2 = 0;
while (_local2 < _local5.length) {
stable.getPlayerRecord(_local2).mc.trafienie.gotoAndStop(_local5[_local2] + 1);
_local2++;
}
ifFarPosition(stable, lastshot + 1);
}
function randomShot(abl) {
var _local9 = [[9, 7, 2, 2, 1, 1, 1, 1, 1, 1, 1], [5, 9, 7, 2, 2, 1, 1, 1, 1, 1, 1], [2, 5, 9, 7, 2, 2, 1, 1, 1, 1, 1], [1, 2, 5, 190, 7, 2, 2, 1, 1, 1, 1], [1, 1, 2, 5, 9, 7, 4, 3, 2, 1, 1], [0, 1, 1, 2, 5, 9, 7, 4, 3, 2, 1], [0, 0, 1, 1, 2, 5, 9, 7, 4, 3, 2], [0, 0, 0, 1, 1, 2, 5, 9, 7, 7, 3], [0, 0, 0, 0, 1, 1, 2, 5, 9, 8, 5], [0, 0, 0, 0, 0, 1, 1, 2, 4, 8, 5]];
var _local8 = _parent.targetDistance;
var _local4 = 0;
var _local6 = new Array();
var _local7 = _local9[abl * 10];
var _local3 = 0;
while (_local3 < _local7.length) {
_local4 = Math.round((Math.random() * (_local8 - 1)) + 1);
if (_local4 < 1) {
_local4 = 1;
}
var _local5 = _local7[_local3] * _local4;
var _local2 = 0;
while (_local2 < _local5) {
_local6.push(_local3);
_local2++;
}
_local3++;
}
return(_local6[Math.round(Math.random() * (_local6.length - 1))]);
}
Symbol 395 MovieClip Frame 4
stop();
Symbol 395 MovieClip Frame 7
stop();
Symbol 401 MovieClip Frame 1
this._visible = false;
delete this.onRelease;
stop();
Symbol 401 MovieClip Frame 2
this._visible = true;
xx.onRelease = function () {
gotoAndStop (1);
};
var scroller = new ScrollMC_OY(scrollbar, containerMC.contentMC, bg._height, bg._height - 5, 2);
stop();
Symbol 404 MovieClip Frame 1
stop();
Symbol 408 MovieClip Frame 1
stop();
Symbol 411 MovieClip Frame 1
stop();
Symbol 421 MovieClip Frame 1
stop();
Symbol 421 MovieClip Frame 2
stop();
Symbol 421 MovieClip Frame 3
stop();
Symbol 421 MovieClip Frame 4
stop();
Symbol 421 MovieClip Frame 5
stop();
Symbol 421 MovieClip Frame 6
stop();
Symbol 421 MovieClip Frame 7
stop();
Symbol 421 MovieClip Frame 8
stop();
Symbol 421 MovieClip Frame 9
stop();
Symbol 421 MovieClip Frame 10
stop();
Symbol 421 MovieClip Frame 11
stop();
Symbol 421 MovieClip Frame 12
stop();
Symbol 425 MovieClip Frame 1
stop();
Symbol 425 MovieClip Frame 2
stop();
Symbol 425 MovieClip Frame 3
stop();
Symbol 428 MovieClip Frame 1
stop();
Symbol 428 MovieClip Frame 2
stop();
Symbol 428 MovieClip Frame 3
stop();
Symbol 432 MovieClip Frame 1
stop();
Symbol 434 MovieClip Frame 1
stop();
Symbol 436 MovieClip Frame 1
stop();
Symbol 437 MovieClip Frame 1
stop();
Symbol 437 MovieClip Frame 2
stop();
Symbol 437 MovieClip Frame 3
stop();
Symbol 445 MovieClip Frame 1
stop();
Symbol 445 MovieClip Frame 2
stop();
Symbol 463 MovieClip Frame 1
stop();
Symbol 478 MovieClip Frame 1
function newWind(_max, strength) {
clearDiag();
posX = 0;
xSpeed = 1;
wykres._x = defX;
max = _max;
wind = max - ((2 * max) * Math.random());
var step;
var dir;
bar._visible = (grot._visible = true);
var counter = 0;
onEnterFrame = function () {
counter++;
if (counter > interval) {
counter = 0;
step = Math.round((Math.random() * 2) - 1);
wind = wind + (step * strength);
dbg.text = wind;
if (wind < (-max)) {
wind = -max;
}
if (wind > max) {
wind = max;
}
bar._xscale = -100 * (wind / maxPossibleWind);
dir = bar._xscale / Math.abs(bar._xscale);
grot._xscale = (-dir) * 100;
grot._x = (-dir) * bar._width;
proc.text = Math.abs(Math.round(bar._xscale)) + "%";
markPoint((wind / maxPossibleWind) * amplitude);
}
};
}
function markPoint(y) {
if (posX == 0) {
wykres.lineStyle(1, 13238786, 100);
wykres.moveTo(0, 0);
} else {
wykres.lineTo(posX, y);
}
posX = posX + xSpeed;
wykres._x = wykres._x - xSpeed;
}
function clearDiag() {
wykres.clear();
delete onEnterFrame;
}
var maxPossibleWind = 0.25;
var max;
var amplitude = 10;
var wind;
var interval = 2;
var posX;
var xSpeed;
var defX = wykres._x;
bar._visible = (grot._visible = false);
Symbol 485 MovieClip Frame 1
function init_previews() {
marks = new Array();
}
function mark_shot(shot_x, shot_y, target_radius, points) {
var _local3 = 75;
var _local1 = mark_.duplicateMovieClip("mark" + marks.length, getNextHighestDepth());
var _local2 = _local3 / target_radius;
_local1._x = _local2 * shot_x;
_local1._y = _local2 * shot_y;
_local1.points.text = points;
var _local4 = new mx.transitions.Tween(_local1, "_xscale", mx.transitions.easing.Strong.easeOut, 300, 100, 0.5, true);
_local4 = new mx.transitions.Tween(_local1, "_yscale", mx.transitions.easing.Strong.easeOut, 300, 100, 0.5, true);
hide_all_others();
marks.push(_local1);
}
function hide_all_others() {
var _local2 = 30;
var _local1 = 0;
while (_local1 < marks.length) {
if (marks[_local1]._alpha != _local2) {
marks[_local1]._alpha = _local2;
}
_local1++;
}
}
mark_._visible = false;
var marks = new Array();
Symbol 493 MovieClip Frame 1
stop();
Symbol 493 MovieClip Frame 2
stop();
Symbol 493 MovieClip Frame 3
stop();
Symbol 508 MovieClip Frame 1
stop();
Symbol 508 MovieClip Frame 2
stop();
Symbol 508 MovieClip Frame 3
stop();
Symbol 508 MovieClip Frame 4
stop();
Symbol 508 MovieClip Frame 5
stop();
Symbol 508 MovieClip Frame 6
stop();
Symbol 508 MovieClip Frame 7
stop();
Symbol 508 MovieClip Frame 8
stop();
Symbol 508 MovieClip Frame 9
stop();
Symbol 508 MovieClip Frame 10
stop();
Symbol 508 MovieClip Frame 11
stop();
Symbol 508 MovieClip Frame 12
stop();
Symbol 532 MovieClip Frame 1
stop();
Symbol 532 MovieClip Frame 2
stop();
Symbol 532 MovieClip Frame 3
stop();
Symbol 532 MovieClip Frame 4
stop();
Symbol 532 MovieClip Frame 5
stop();
Symbol 532 MovieClip Frame 6
stop();
Symbol 532 MovieClip Frame 7
stop();
Symbol 532 MovieClip Frame 8
stop();
Symbol 532 MovieClip Frame 9
stop();
Symbol 532 MovieClip Frame 10
stop();
Symbol 532 MovieClip Frame 11
stop();
Symbol 532 MovieClip Frame 12
stop();
Symbol 545 MovieClip Frame 1
stop();
Symbol 545 MovieClip Frame 2
stop();
Symbol 545 MovieClip Frame 3
stop();
Symbol 545 MovieClip Frame 4
stop();
Symbol 545 MovieClip Frame 5
stop();
Symbol 545 MovieClip Frame 6
stop();
Symbol 545 MovieClip Frame 7
stop();
Symbol 545 MovieClip Frame 8
stop();
Symbol 545 MovieClip Frame 9
stop();
Symbol 545 MovieClip Frame 10
stop();
Symbol 545 MovieClip Frame 11
stop();
Symbol 546 MovieClip Frame 1
stop();
Symbol 546 MovieClip Frame 2
pts.gotoAndStop(this.points + 1);
Symbol 547 MovieClip Frame 1
function timeStart() {
var st = getTimer();
timeleft = 0;
onEnterFrame = function () {
timeleft = (time_ * 1000) - (getTimer() - st);
czas.text = Math.round((timeleft / 1000) * 100) / 100;
if (timeleft <= 0) {
_parent.count_points(0);
_parent.summaryScreen();
czas.text = "0.00";
delete onEnterFrame;
}
};
}
function timeStop() {
delete onEnterFrame;
}
function add_points(points, ser) {
displ_pts.points = points;
displ_pts.gotoAndPlay(2);
_parent.competitionPoints = _parent.competitionPoints + points;
punkty.text = _parent.competitionPoints;
series["s" + ser].gotoAndStop(points + 2);
}
function reset_boxes() {
var _local2 = 1;
while (_local2 <= 10) {
if (_local2 <= _parent.serieNo) {
series["s" + _local2].gotoAndStop(1);
series["s" + _local2].unact._visible = false;
} else {
series["s" + _local2].gotoAndStop(1);
series["s" + _local2].unact._visible = true;
}
_local2++;
}
}
function reset_points() {
var _local1 = 1;
while (_local1 <= 10) {
series["s" + _local1].gotoAndStop(1);
_local1++;
}
punkty.text = "0";
}
var round_points = 0;
var time_ = 40;
var timeleft;
reset_boxes();
reset_points();
Symbol 559 MovieClip Frame 2
if (this.id != 0) {
oznaczenie._visible = false;
}
Symbol 559 MovieClip Frame 8
stop();
Symbol 559 MovieClip Frame 15
stop();
Symbol 560 MovieClip Frame 1
this.numer._visible = (this.gracz._visible = false);
Symbol 569 MovieClip Frame 1
function fillTable(stable) {
stable.addPlayer({id:0, kraj:_parent.playerObj.c, imie:formatName(_parent.playerObj.n), punkty:0});
var _local3 = 0;
while (_local3 < _parent.playersArr.length) {
var _local2 = _parent.playersArr[_local3];
stable.addPlayer({id:_local2.id, kraj:_local2.c, imie:_local2.n, punkty:0, umiejetnosci:_local2.a});
_local3++;
}
stable.sortTable();
stable.drawTable(undefined, _parent.countriesARR);
ifFarPosition(stable);
var inId = setInterval(function () {
pozatabela.gracz._visible = (pozatabela.numer._visible = true);
var _local1 = new ScrollMC_OY(scrollbar, tabela_kontener.tabela, scrollbar._height - 5, scrollbar._height, 4);
suwak.podepnijMC(tabela, 250);
clearInterval(inId);
}, 500);
}
function formatName(n) {
if (n.length > 10) {
return(n.substr(0, 8) + "...");
}
return(n);
}
function ifFarPosition(stable, trg) {
pozatabela._visible = false;
pozatabela.numer.numer.text = stable.getPlayerPosition(0);
pozatabela.gracz.imie.text = stable.getPlayerRecord(0).playername;
pozatabela.gracz.punkty.text = stable.getPlayerRecord(0).points;
var _local2 = pozatabela.gracz.kraj.attachMovie(_parent.countriesARR[stable.getPlayerRecord(0).country], "flag", 0);
_local2._xscale = (_local2._yscale = 15);
pozatabela._visible = true;
pozatabela.gracz.id = 0;
pozatabela.gracz.gotoAndPlay(1);
if (trg) {
pozatabela.gracz.trafienie.gotoAndStop(trg);
}
}
var stable = _parent.competionRank;
fillTable(stable);
function refreshScore(score, lastshot) {
var _local5 = new Array();
stable.changePlayerPoints(0, score);
stable.getPlayerRecord(0).mc.trafienie.gotoAndStop(lastshot + 1);
_local5.push(lastshot);
var _local2 = 1;
while (stable.getPlayerRecord(_local2)) {
var _local3 = stable.getPlayerRecord(_local2);
var _local4 = randomShot(_local3.abl);
stable.changePlayerPoints(_local2, _local3.points + _local4);
_local5.push(_local4);
_local2++;
}
stable.sortTable();
stable.drawTable(undefined, _parent.countriesARR);
_local2 = 0;
while (_local2 < _local5.length) {
stable.getPlayerRecord(_local2).mc.trafienie.gotoAndStop(_local5[_local2] + 1);
_local2++;
}
ifFarPosition(stable, lastshot + 1);
}
function randomShot(abl) {
var _local9 = [[9, 7, 2, 2, 1, 1, 1, 1, 1, 1, 1], [5, 9, 7, 2, 2, 1, 1, 1, 1, 1, 1], [2, 5, 9, 7, 2, 2, 1, 1, 1, 1, 1], [1, 2, 5, 190, 7, 2, 2, 1, 1, 1, 1], [1, 1, 2, 5, 9, 7, 4, 3, 2, 1, 1], [0, 1, 1, 2, 5, 9, 7, 4, 3, 2, 1], [0, 0, 1, 1, 2, 5, 9, 7, 4, 3, 2], [0, 0, 0, 1, 1, 2, 5, 9, 7, 7, 3], [0, 0, 0, 0, 1, 1, 2, 5, 9, 8, 5], [0, 0, 0, 0, 0, 1, 1, 2, 4, 8, 5]];
var _local8 = _parent.targetDistance;
var _local4 = 0;
var _local6 = new Array();
var _local7 = _local9[abl * 10];
var _local3 = 0;
while (_local3 < _local7.length) {
_local4 = Math.round((Math.random() * (_local8 - 1)) + 1);
if (_local4 < 1) {
_local4 = 1;
}
var _local5 = _local7[_local3] * _local4;
var _local2 = 0;
while (_local2 < _local5) {
_local6.push(_local3);
_local2++;
}
_local3++;
}
return(_local6[Math.round(Math.random() * (_local6.length - 1))]);
}
Symbol 576 MovieClip Frame 1
taknie._visible = false;
koniec.onRelease = function () {
if (taknie._visible == false) {
taknie._visible = true;
} else {
taknie._visible = false;
}
};
taknie.tak.onRelease = function () {
_parent.gotoAndPlay(_parent._currentframe - 2);
};
taknie.nie.onRelease = function () {
taknie._visible = false;
};
Symbol 585 MovieClip Frame 1
stop();
Symbol 585 MovieClip Frame 2
stop();
Symbol 588 MovieClip Frame 1
function updateDiag() {
var _local4 = Math.floor(_parent.condition() * 10);
exp.autoSize = true;
exp.text = (Math.round(_parent.condition() * 1000) / 10) + "%";
exp._x = (g10._x + g10._width) - exp._width;
var _local3 = 1;
while (_local3 <= _local4) {
this["g" + _local3].gotoAndStop(2);
_local3++;
}
}
updateDiag();
Symbol 596 MovieClip Frame 1
this._visible = false;
stop();
Symbol 596 MovieClip Frame 2
this._visible = true;
Symbol 597 MovieClip Frame 1
function add_points(pt, t) {
var _local2 = Math.round(t / 100) / 100;
var _local3 = pt * _local2;
_parent.total_score = _parent.total_score + _local3;
pts.text = _parent.total_score;
bonusPanel.trafienie.gotoAndStop(pt + 1);
bonusPanel.bonus.text = _local2;
bonusPanel.gotoAndPlay(2);
}
pts.text = _parent.total_score;
Symbol 607 MovieClip Frame 1
function showStats() {
var _local4 = _parent.statystyki;
stats.htmlText = ("Your place: <b>" + _parent.playersRank.getPlayerPosition(0)) + "</b><br><br>";
if (_parent.awans) {
stats.htmlText = stats.htmlText + "This score <b>allows you to start in World Cup<b>! <b><font color='#009900'>:)</font></b>";
} else {
stats.htmlText = stats.htmlText + "Your place doesn't allow you to start in World Cup</b>. <b><font color='#FF0000'>:(</font></b>";
}
if (_local4.isNotEmpty()) {
diagram.srednia.srednia.htmlText = ("average: <b>" + _local4.shotsAverage()) + "</b>";
diagram.srednia._x = 145 * (_local4.shotsAverage() / 10);
diagram.dymek._visible = false;
var _local3 = 0;
while (_local3 <= 10) {
diagram["w" + _local3]._height = _local4.hitFrequency(_local3) * 50;
diagram["w" + _local3].amount = _local4.hitAmount(_local3);
diagram["p" + _local3].gotoAndStop(_local3 + 1);
diagram["w" + _local3].onRollOver = function () {
diagram.dymek._visible = true;
diagram.dymek.no.text = this.amount;
diagram.dymek._x = this._x;
diagram.dymek._y = 0;
};
diagram["w" + _local3].onReleaseOutside = (diagram["w" + _local3].onRollOut = function () {
diagram.dymek._visible = false;
});
_local3++;
}
} else {
diagram.srednia.srednia.htmlText = "average: ...";
diagram.srednia._x = -2;
diagram.dymek._visible = false;
var _local3 = 0;
while (_local3 <= 10) {
diagram["w" + _local3]._height = 1;
diagram["p" + _local3].gotoAndStop(_local3 + 1);
_local3++;
}
}
}
function writeButton() {
dalej.onRelease = function () {
if (_parent.awans) {
_parent.ustawTurniej(3);
_parent.gotoAndPlay(_parent._currentframe + 2);
} else {
_parent.gotoAndPlay(_parent._currentframe + 1);
}
};
}
var flag = kraj.attachMovie(_parent.countriesARR[_parent.playerObj.c], "flag", 0);
flag._xscale = (flag._yscale = 15);
if (_parent.playersRank.getPlayerPosition(0) <= _parent.qualifyLimit) {
_parent.qualified = true;
_parent.awans = true;
} else {
_parent.awans = false;
}
imie.text = _parent.playerObj.n;
kraj.gotoAndStop(_parent.playerObj.c);
showStats();
writeButton();
Symbol 616 MovieClip Frame 1
stop();
Symbol 616 MovieClip Frame 2
stop();
Symbol 619 MovieClip Frame 1
function activate() {
dalej_nap._visible = true;
dalej._visible = true;
dalej.onRelease = function () {
_parent.gotoAndPlay(_parent._currentframe - 4);
};
}
dalej_nap._visible = false;
dalej._visible = false;
Symbol 622 MovieClip Frame 1
function showComm(is) {
this._visible = true;
komm.htmlText = "<b>INFORMATION:</b>";
if (is) {
komm.htmlText = komm.htmlText + "<li> <b>Congratulations!</b> You are in the Master's Table!</li>";
} else {
komm.htmlText = komm.htmlText + "<li> <b>Unfortunatelly,</b> To less points for place in Master's Table.</li>";
}
this.onPress = function () {
this._visible = false;
};
komm.htmlText = komm.htmlText + (("<li> Your <b>EXP</b> is <b>" + (Math.round(_parent.condition() * 1000) / 10)) + "%</b>! Use it! <b>Playing again you'll have more chances to win.</b>.</li>");
}
this._visible = false;
Symbol 625 MovieClip Frame 45
bt.onRelease = function () {
var _local2 = new LoadVars();
_local2.load(_parent.notify_CLICKED_script);
getURL ("http://www.gamesfreak.net", "Top");
};
stop();
Symbol 631 MovieClip Frame 85
_parent.gotoAndPlay(_parent._currentframe - 4);
stop();