Frame 1
stop();
Instance of Symbol 64 MovieClip in Frame 1
onClipEvent (load) {
b = _root.getBytesTotal();
}
onClipEvent (enterFrame) {
trace("enterFrame");
l = _root.getBytesLoaded();
p = (l / b) * 100;
text = Math.floor(p);
text = text + "%";
trace((l add " ") add b);
if (l >= b) {
_root.gotoAndStop("main");
} else {
_root.progressBar.gotoAndStop(Math.floor(p));
}
}
Frame 2
function saveSettings() {
var _local1 = _root;
settings.data.konteiner = _local1.konteiner;
settings.data.layOut = _local1.layOut;
settings.data.layOutBack = _local1.layOutBack;
}
function loadSettings() {
var _local1 = _root;
_local1.konteiner = settings.data.konteiner;
_local1.layOut = settings.data.layOut;
_local1.layOutBack = settings.data.layOutBack;
}
function loadHiScores(gameType, skill) {
var _local1 = gameType;
var _local2 = skill;
if (typeof(settings.data[(("hiScores_" add _local1) add "_") add _local2]) != "undefined") {
_root.hiScores = settings.data[(("hiScores_" add _local1) add "_") add _local2];
} else {
redefDefHiScores(_local1, _local2);
}
}
function saveHiScores(gameType, skill) {
settings.data[(("hiScores_" add gameType) add "_") add skill] = _root.hiScores;
}
function clearHiScores(gameType, skill) {
var _local3 = _root;
_local3.hiScores = new Array();
var _local2 = 0;
while (_local2 < 10) {
var _local1 = new Object();
_local1.name = "";
_local1.score = 0;
_local1.skill = 0;
_local3.hiScores[_local2] = _local1;
_local2++;
}
saveHiScores(gameType, skill);
}
function addHiScores(iname, iskill, iscore, gameType, gameSkill) {
var _local2 = _root;
loadHiScores(gameType, gameSkill);
var _local1 = 0;
var _local3 = new Object();
_local3.name = iname;
_local3.score = iscore;
_local3.skill = iskill;
_local1 = 0;
while (_local1 < 10) {
if (iscore > _local2.hiScores[_local1].score) {
_local2.hiScores.splice(_local1, 0, _local3);
break;
}
_local1++;
}
_local2.hiScores.splice(10);
saveHiScores(gameType, GameSkill);
return(_local1);
}
function saveLevelBeg() {
settings.data.levelBeg = _root.levelNow;
}
function loadLevelBeg() {
if (typeof(settings.data.levelBeg) != "undefined") {
_root.levelNow = settings.data.levelBeg;
}
}
function saveLevelPassed(lev) {
if (typeof(settings.data.levelsPassed) == "undefined") {
settings.data.levelsPassed = new Array();
var _local1 = 0;
while (_local1 < 100) {
settings.data.levelsPassed[_local1] = 0;
_local1++;
}
}
settings.data.levelsPassed[lev]++;
}
function clearPassedInThisSession() {
var _local2 = _root;
_local2.passedITS = new Array();
var _local1 = 0;
while (_local1 < _local2.levelCount) {
_local2.passedITS[n] = 0;
_local1++;
}
}
function passedInThisSession(n) {
_root.passedITS[n]++;
}
function getPassedInThisSession(n) {
if (_root.passedITS[n] > 0) {
return(_root.passedITS[n]);
}
return(0);
}
function redefDefHiScores(gmt, ko) {
var _local3 = ko;
defJiScMass = [[["Adrian Carmack", "Jonh Carmack", "Kevin Cloud", "Todd Hollenshead", "Tim Willits", "Gabe Newell", "Victor Antonov", "Victor Vostrukhin", "Dmitry Grytsovets", "Nikita Berezin"], ["markus kehren", "Oliver Plohnke", "Boris Schreiner", "Wayne Morris", "Murphy Shearer", "Frank Elsenbach", "Clarence Jay", "Ralf Peifer", "Rodolfo Eugenio", "Gustavo Dur\u040En"], ["Dale Hathaway", "Hans Nurnberger", "Todd Angler", "Stephan Wendt", "Ralf Eppinger", "Vladimir Zakharov", "Benjamin Henriksen", "Russell Patton", "Alex Revin", "Emile Naber"], ["Nigel Sleigh", "Cameron Whitlock", "Sashko Ukradyga", "Johan Gronloh", "Horst Josten", "John Bales", "Valera Wolkova", "larry schryver", "Neil Raskatovich", "Jesus Celaa"]], [["Serg Chekir", "William LaGrange", "Rimas Campe", "Thorsten Schelian", "Markus Ingelmann", "Sergey Novinsky", "Eugene Gusev", "Yaroslav Snizhko", "Pietro Rocca", "Lisan Al-Gaib"], ["Mel Hadden", "Matthias Mroch", "Svetlana Kopilova", "Manol Georgiev", "Mark Paikin", "Mario Boley", "Panza Anggel", "Wolfgang Klein", "Mikle Stepanenko", "Nick Osipyuk"], ["Alejandro Olivera", "Pol Schennikov", "Derek Grainger", "Dirk Mansfeld", "Christian G. Becker", "Fran Villarreal", "Jeremy Lucas", "Lorenzo Pertici", "Lorenzo Pertici", "Paul Blau"], ["Leo Glaz", "Rancelor Allard", "Pablo del Rio", "Jens Koopmann", "Benjamin Henriksen", "Daniel Reckfort", "Joakim Englund", "Markus Rektor", "John Agre", "Falko Ramann"]]];
defJiScMassP = [[[28006, 26946, 25691, 23991, 23664, 18428, 12938, 7648, 4675, 3948], [34399, 29015, 24101, 19377, 17577, 15842, 13835, 9395, 8995, 4283], [19500, 16357, 11191, 10974, 10094, 9437, 8445, 5458, 4670, 4235], [30181, 26178, 22776, 20407, 17452, 16346, 12166, 6508, 6336, 1254]], [[29265, 25591, 25434, 23130, 17847, 14892, 12923, 8642, 4054, 403], [25933, 20528, 18573, 17704, 14676, 14161, 9495, 7945, 4020, 2236], [28496, 28488, 25391, 22087, 18489, 13986, 11456, 10700, 6488, 3538], [25107, 21735, 16841, 15310, 13838, 10693, 8575, 4895, 3474, 2865]]];
_root.hiScores = new Array();
var _local1 = 0;
while (_local1 < 10) {
var _local2 = new Object();
_local2.name = defJiScMass[gmt][_local3][_local1];
_local2.score = defJiScMassP[gmt][_local3][_local1];
_local2.skill = 3;
_root.hiScores[_local1] = _local2;
_local1++;
}
}
function fullscr() {
var _local1 = _root;
if (typeof(_local1.fullScreenMode) == "undefined") {
_local1.fullScreenMode = true;
} else {
_local1.fullScreenMode = !_local1.fullScreenMode;
}
if (_local1.fullScreenMode) {
_local1.clip_btn_fullScreen.gotoAndStop(2);
} else {
_local1.clip_btn_fullScreen.gotoAndStop(1);
}
_local1.getURL("FSCommand:fullscreen", _local1.fullScreenMode);
}
function initKey() {
globalListener = new Object();
globalListener.onKeyUp = function () {
if ((Key.getCode() == 18) && (Key.isDown(13))) {
_root.fullscr();
}
};
Key.removeListener(globalListener);
Key.addListener(globalListener);
}
function playMusic() {
stopMusic();
var _local1 = random(4);
while (_local1 == lastNMusic) {
_local1 = random(4);
}
mus.attachSound("music" add _local1);
mus.start(0, 1);
lastNmusic = _local1;
startMusicTime = getTimer();
}
function stopMusic() {
mus.stop();
}
function playSound(snd) {
if (_root.soundon) {
so = new Sound();
so.attachSound(snd);
so.start(0, 1);
}
}
function showGameBtns() {
var _local1 = _root;
_local1.btn_little._visible = true;
_local1.btn_backoff._visible = true;
_local1.btn_nax._visible = true;
clip_btn_music._x = 631.6;
sound_clip._x = 673.4;
clip_btn_fullScreen._x = 741.7;
}
function hideGameBtns() {
var _local1 = _root;
_local1.btn_little._visible = false;
_local1.btn_backoff._visible = false;
_local1.btn_nax._visible = false;
clip_btn_music._x = 676.6;
sound_clip._x = 718.4;
clip_btn_fullScreen._x = 760.2;
}
function pressB() {
var _local1 = _root;
_local1.newback._visible = !_local1.newback._visible;
if (_local1.newback._visible) {
_local1.btn_backOff.gotoAndStop(1);
_local1.btn_little.ok(_local1.layOutBack, _local1.layOutBack);
} else {
_local1.btn_backOff.gotoAndStop(2);
_local1.btn_little.ok(1, _local1.layOutBack);
}
}
function devRazr(p) {
var _local1 = String(p);
if (length(_local1) > 9) {
_local1 = insSpace(_local1, 9);
}
if (length(_local1) > 6) {
_local1 = insSpace(_local1, 6);
}
if (length(_local1) > 3) {
_local1 = insSpace(_local1, 3);
}
return(_local1);
}
function insSpace(s, i) {
var _local1 = s;
return((_local1.substring(0, length(_local1) - i) add " ") add _local1.substring(length(_local1) - i, length(_local1)));
}
var selected = new Array();
var field = new Array();
var explosion = new Array();
var _IGNOREUSER = false;
var adstack = new Array();
var tile = new Array();
var sk = 0;
var lastRemove = -10000;
var points = 0;
var tilesremain = 144;
var startTime = 0;
var startSpin = 0;
var spinpoints = 0;
var prizepoints = 0;
var lastReshufle = 0;
var buy_url = "http://www.doublegames.com/order.html?fr=elitemahjongon";
var download_url = "http://www.doublegames.com/downloads.html?fr=elitemahjongon";
var moregames_url = "http://www.doublegames.com/?fr=elitemahjongon";
var doubl_url = "http://www.doublegames.com/?fr=elitemahjongon";
settings = SharedObject.getLocal("elite_mahjong_settings_v0.93onl");
_root.firstStart = false;
if (settings.data.notFirstStart == true) {
_root.firstStart = false;
} else {
_root.firstStart = true;
settings.data.showHelpNextTime = false;
}
settings.data.notFirstStart = true;
if (typeof(settings.data.musicOn) == "undefined") {
settings.data.musicOn = true;
}
_root.getURL("FSCommand:showmenu", false);
_root.btn_little_copy.removeMovieClip();
_root.loadSettings();
t_backgroundOLD._visible = false;
if (typeof(layOut) == "undefined") {
layOut = 4;
}
if (typeof(layOutBack) == "undefined") {
layOutBack = 4;
}
if (typeof(konteiner) == "undefined") {
konteiner = 0;
}
initKey();
_root.trackLen = [2840, 3230, 3527, 2832];
mus = new Sound();
if (_root.settings.data.musicOn) {
_root.clip_btn_music.gotoAndStop(1);
_root.playMusic();
} else {
_root.clip_btn_music.gotoAndStop(2);
}
_root.soundon = true;
hideGameBtns();
stop();
Instance of Symbol 290 MovieClip in Frame 2
onClipEvent (enterFrame) {
if (_root.settings.data.musicOn) {
_root.pasteTrackTime = getTimer() - _root.startMusicTime;
if (_root.pasteTrackTime > (_root.trackLen[_root.lastNMusic] * 100)) {
_root.stopMusic();
_root.playMusic();
}
}
}
Frame 3
stop();
Frame 4
stop();
Frame 5
stop();
wnd_choose_level.init();
Frame 6
function mainProcess() {
if (_root.cheat) {
bot();
}
if (ST_QUESTION) {
return(false);
}
if (ST_PAUSE) {
return(false);
}
if (ST_COUNTDOWN) {
countd();
return(false);
}
if (ST_SPIN) {
spin();
return(false);
}
if (ST_GAMEOVER) {
return(false);
}
if (ST_BANNER) {
psbanner();
return(false);
}
var _local1 = 0;
while (_local1 < PROCESS.length) {
switch (PROCESS[_local1]) {
case PS_TIMER :
timer();
break;
case PS_LSP :
levelStartPush();
break;
case PS_EXPLOSION :
processExplosion();
break;
case PS_EXPLOSION2 :
processExplosion2();
break;
case PS_EXPLOSION3 :
processExplosion3();
break;
case PS_BLINK :
blink();
}
_local1++;
}
return(undefined);
}
function startProcess(ps) {
PROCESS.push(ps);
}
function killProcess(ps) {
var _local2 = ps;
var _local1 = 0;
while (_local1 < PROCESS.length) {
if (PROCESS[_local1] == _local2) {
PROCESS.splice(_local1, 1);
}
_local1++;
}
}
function killAllProcess() {
PROCESS = new Array();
}
function isProcess(ps) {
var _local2 = ps;
var _local1 = 0;
while (_local1 < PROCESS.length) {
if (PROCESS[_local1] == _local2) {
return(true);
}
_local1++;
}
return(false);
}
function bitOR(a, b) {
var _local1 = (a & 1) | (b & 1);
var _local2 = (a >>> 1) | (b >>> 1);
return((_local2 << 1) | _local1);
}
function bitXOR(a, b) {
var _local1 = (a & 1) ^ (b & 1);
var _local2 = (a >>> 1) ^ (b >>> 1);
return((_local2 << 1) | _local1);
}
function bitAND(a, b) {
var _local1 = (a & 1) & (b & 1);
var _local2 = (a >>> 1) & (b >>> 1);
return((_local2 << 1) | _local1);
}
function addme(x, y) {
var _local1 = (x & 65535) + (y & 65535);
var _local2 = ((x >> 16) + (y >> 16)) + (_local1 >> 16);
return((_local2 << 16) | (_local1 & 65535));
}
function rhex(num) {
var _local1 = num;
str = "";
j = 0;
while (j <= 3) {
str = str + (hex_chr.charAt((_local1 >> ((j * 8) + 4)) & 15) + hex_chr.charAt((_local1 >> (j * 8)) & 15));
j++;
}
return(str);
}
function str2blks_MD5(str) {
var _local1 = str;
nblk = ((_local1.length + 8) >> 6) + 1;
blks = new Array(nblk * 16);
i = 0;
while (i < (nblk * 16)) {
blks[i] = 0;
i++;
}
i = 0;
while (i < _local1.length) {
blks[i >> 2] = blks[i >> 2] | (_local1.charCodeAt(i) << ((((_local1.length * 8) + i) % 4) * 8));
i++;
}
blks[i >> 2] = blks[i >> 2] | (128 << ((((_local1.length * 8) + i) % 4) * 8));
var _local2 = _local1.length * 8;
blks[(nblk * 16) - 2] = _local2 & 255;
blks[(nblk * 16) - 2] = blks[(nblk * 16) - 2] | (((_local2 >>> 8) & 255) << 8);
blks[(nblk * 16) - 2] = blks[(nblk * 16) - 2] | (((_local2 >>> 16) & 255) << 16);
blks[(nblk * 16) - 2] = blks[(nblk * 16) - 2] | (((_local2 >>> 24) & 255) << 24);
return(blks);
}
function rol(num, cnt) {
return((num << cnt) | (num >>> (32 - cnt)));
}
function cmn(q, a, b, x, s, t) {
return(addme(rol(addme(addme(a, q), addme(x, t)), s), b));
}
function ff(a, b, c, d, x, s, t) {
var _local1 = b;
return(cmn(bitOR(bitAND(_local1, c), bitAND(~_local1, d)), a, _local1, x, s, t));
}
function gg(a, b, c, d, x, s, t) {
return(cmn(bitOR(bitAND(b, d), bitAND(c, ~d)), a, b, x, s, t));
}
function hh(a, b, c, d, x, s, t) {
return(cmn(bitXOR(bitXOR(b, c), d), a, b, x, s, t));
}
function ii(a, b, c, d, x, s, t) {
return(cmn(bitXOR(c, bitOR(b, ~d)), a, b, x, s, t));
}
function calcMD5(str) {
x = str2blks_MD5(str);
a = 1732584193 /* 0x67452301 */;
b = -271733879;
c = -1732584194;
d = 271733878 /* 0x10325476 */;
var _local1;
i = 0;
while (i < x.length) {
olda = a;
oldb = b;
oldc = c;
oldd = d;
_local1 = 0;
a = ff(a, b, c, d, x[i + 0], 7, -680876936);
d = ff(d, a, b, c, x[i + 1], 12, -389564586);
c = ff(c, d, a, b, x[i + 2], 17, 606105819);
b = ff(b, c, d, a, x[i + 3], 22, -1044525330);
a = ff(a, b, c, d, x[i + 4], 7, -176418897);
d = ff(d, a, b, c, x[i + 5], 12, 1200080426);
c = ff(c, d, a, b, x[i + 6], 17, -1473231341);
b = ff(b, c, d, a, x[i + 7], 22, -45705983);
a = ff(a, b, c, d, x[i + 8], 7, 1770035416);
d = ff(d, a, b, c, x[i + 9], 12, -1958414417);
c = ff(c, d, a, b, x[i + 10], 17, -42063);
b = ff(b, c, d, a, x[i + 11], 22, -1990404162);
a = ff(a, b, c, d, x[i + 12], 7, 1804603682);
d = ff(d, a, b, c, x[i + 13], 12, -40341101);
c = ff(c, d, a, b, x[i + 14], 17, -1502002290);
b = ff(b, c, d, a, x[i + 15], 22, 1236535329);
a = gg(a, b, c, d, x[i + 1], 5, -165796510);
d = gg(d, a, b, c, x[i + 6], 9, -1069501632);
c = gg(c, d, a, b, x[i + 11], 14, 643717713);
b = gg(b, c, d, a, x[i + 0], 20, -373897302);
a = gg(a, b, c, d, x[i + 5], 5, -701558691);
d = gg(d, a, b, c, x[i + 10], 9, 38016083);
c = gg(c, d, a, b, x[i + 15], 14, -660478335);
b = gg(b, c, d, a, x[i + 4], 20, -405537848);
a = gg(a, b, c, d, x[i + 9], 5, 568446438);
d = gg(d, a, b, c, x[i + 14], 9, -1019803690);
c = gg(c, d, a, b, x[i + 3], 14, -187363961);
b = gg(b, c, d, a, x[i + 8], 20, 1163531501);
a = gg(a, b, c, d, x[i + 13], 5, -1444681467);
d = gg(d, a, b, c, x[i + 2], 9, -51403784);
c = gg(c, d, a, b, x[i + 7], 14, 1735328473);
b = gg(b, c, d, a, x[i + 12], 20, -1926607734);
a = hh(a, b, c, d, x[i + 5], 4, -378558);
d = hh(d, a, b, c, x[i + 8], 11, -2022574463);
c = hh(c, d, a, b, x[i + 11], 16, 1839030562);
b = hh(b, c, d, a, x[i + 14], 23, -35309556);
a = hh(a, b, c, d, x[i + 1], 4, -1530992060);
d = hh(d, a, b, c, x[i + 4], 11, 1272893353);
c = hh(c, d, a, b, x[i + 7], 16, -155497632);
b = hh(b, c, d, a, x[i + 10], 23, -1094730640);
a = hh(a, b, c, d, x[i + 13], 4, 681279174);
d = hh(d, a, b, c, x[i + 0], 11, -358537222);
c = hh(c, d, a, b, x[i + 3], 16, -722521979);
b = hh(b, c, d, a, x[i + 6], 23, 76029189);
a = hh(a, b, c, d, x[i + 9], 4, -640364487);
d = hh(d, a, b, c, x[i + 12], 11, -421815835);
c = hh(c, d, a, b, x[i + 15], 16, 530742520);
b = hh(b, c, d, a, x[i + 2], 23, -995338651);
a = ii(a, b, c, d, x[i + 0], 6, -198630844);
d = ii(d, a, b, c, x[i + 7], 10, 1126891415);
c = ii(c, d, a, b, x[i + 14], 15, -1416354905);
b = ii(b, c, d, a, x[i + 5], 21, -57434055);
a = ii(a, b, c, d, x[i + 12], 6, 1700485571);
d = ii(d, a, b, c, x[i + 3], 10, -1894986606);
c = ii(c, d, a, b, x[i + 10], 15, -1051523);
b = ii(b, c, d, a, x[i + 1], 21, -2054922799);
a = ii(a, b, c, d, x[i + 8], 6, 1873313359);
d = ii(d, a, b, c, x[i + 15], 10, -30611744);
c = ii(c, d, a, b, x[i + 6], 15, -1560198380);
b = ii(b, c, d, a, x[i + 13], 21, 1309151649);
a = ii(a, b, c, d, x[i + 4], 6, -145523070);
d = ii(d, a, b, c, x[i + 11], 10, -1120210379);
c = ii(c, d, a, b, x[i + 2], 15, 718787259);
b = ii(b, c, d, a, x[i + 9], 21, -343485551);
a = addme(a, olda);
b = addme(b, oldb);
c = addme(c, oldc);
d = addme(d, oldd);
i = i + 16;
}
return(((rhex(a) + rhex(b)) + rhex(c)) + rhex(d));
}
function getXYCooCent(xxx, yyy) {
level._fieldx = Math.floor((430 - (((xxx + 1) * 38) / 2)) + 20);
level._fieldy = Math.floor((280 - (((yyy + 1) * 46) / 2)) - 5);
}
function createField() {
var _local3 = _root;
_local3.levelScore = 0;
_local3.info.levelScore = "0";
_local3._IGNOREUSER = false;
_local3.asdf = -1;
_local3.levelName = "level " add (_local3.levelNow + 1);
_local3.kont_gr.gotoAndStop((_local3.konteiner + ((_local3.layOutBack - 1) * 4)) + 1);
shuffle();
adstack = new Array();
field = new Array();
_local3.box = new Array();
var _local1 = 0;
while (_local1 < level._field.length) {
field[_local1] = new Array();
var _local2 = 0;
while (_local2 < level._field[_local1].length) {
if (level._field[_local1][_local2] != 0) {
stk = duplicateBStack((("bstack" + _local1) + "_") + _local2, level._fieldx + (_local2 * smX), level._fieldy + (_local1 * smY), (3000 + (_local1 * 100)) + _local2);
stk._length = level._field[_local1][_local2];
field[_local1][_local2] = stk;
stk._i = _local1;
stk._j = _local2;
}
_local2++;
}
_local1++;
}
_local1 = 0;
while (_local1 < level.adstack.length) {
if ((level.adstack[_local1]._left.length != 0) || (level.adstack[_local1]._down.length != 0)) {
depth = 4000 + _local1;
} else {
depth = 2700 - _local1;
}
stk = duplicateBStack("adstack" + _local1, level.adstack[_local1]._x, level.adstack[_local1]._y, depth);
stk._type = "additional";
adstack.push(stk);
stk._length = level.adstack[_local1]._len;
var k = 0;
while (k < level.adstack[_local1]._down.length) {
_local3[level.adstack[_local1]._down[k]]._up = stk;
k++;
}
var k = 0;
while (k < level.adstack[_local1]._left.length) {
_local3[level.adstack[_local1]._left[k]]._right = stk;
if (_local3[level.adstack[_local1]._left[k]]._type == "additional") {
stk._left = _local3[level.adstack[_local1]._left[k]];
}
k++;
}
var k = 0;
while (k < level.adstack[_local1]._right.length) {
_local3[level.adstack[_local1]._right[k]]._left = stk;
if (_local3[level.adstack[_local1]._right[k]]._type == "additional") {
stk._right = _local3[level.adstack[_local1]._right[k]];
}
k++;
}
_local1++;
}
_local3.lastRemove = getTimer();
_local3.combo = 0;
startProcess(PS_LSP);
}
function shuffle() {
tile = new Array();
sk = 0;
var _local2 = 1;
while (_local2 < 43) {
if ((_local2 < 5) || ((_local2 > 8) && (_local2 < 13))) {
tile.push(_local2);
} else {
var _local1 = 0;
while (_local1 < 4) {
tile.push(_local2);
_local1++;
}
}
_local2++;
}
var _local3;
var a;
_local2 = 143;
while (_local2 >= 0) {
_local3 = Math.floor(random(_local2));
a = tile[_local2];
tile[_local2] = tile[_local3];
tile[_local3] = a;
_local2--;
}
_root.check4pointAbility();
}
function removeField() {
var _local2 = 0;
while (_local2 < level._field.length) {
var _local1 = 0;
while (_local1 < level._field[_local2].length) {
if (level._field[_local2][_local1] != 0) {
removeMovieClip(field[_local2][_local1]);
}
_local1++;
}
_local2++;
}
var _local3 = 0;
while (_local3 < adstack.length) {
removeMovieClip(adstack[_local3]);
_local3++;
}
adstack = new Array();
field = new Array();
}
function reshuffle() {
if ((getTimer() - lastReshufle) < RESHUFFLELIMIT) {
return(false);
}
lastReshufle = getTimer();
playSound("snd_reshuffle");
_IGNOREUSER = true;
getAliveTiles();
var rvalue;
var a;
var i = (tile.length - 1);
while (i >= 0) {
rvalue = Math.floor(random(i));
a = tile[i];
tile[i] = tile[rvalue];
tile[rvalue] = a;
i--;
}
var _local2 = 0;
var i = 0;
while (i < level._field.length) {
var _local1 = 0;
while (_local1 < level._field[i].length) {
if (level._field[i][_local1] != 0) {
var _local3 = 0;
while (_local3 < field[i][_local1]._blocks.length) {
field[i][_local1]._blocks[_local3].gotoAndStop(tile[_local2]);
_local2++;
_local3++;
}
}
_local1++;
}
i++;
}
var i = 0;
while (i < adstack.length) {
var _local3 = 0;
while (_local3 < adstack[i]._blocks.length) {
adstack[i]._blocks[_local3].gotoAndStop(tile[_local2]);
_local2++;
_local3++;
}
i++;
}
_IGNOREUSER = false;
_root.addScore(ptsreshuffle);
return(undefined);
}
function getAliveTiles() {
tile = new Array();
var _local3 = 0;
while (_local3 < level._field.length) {
var _local1 = 0;
while (_local1 < level._field[_local3].length) {
if (level._field[_local3][_local1] != 0) {
var _local2 = 0;
while (_local2 < field[_local3][_local1]._blocks.length) {
tile.push(field[_local3][_local1]._blocks[_local2]._currentframe);
_local2++;
}
}
_local1++;
}
_local3++;
}
_local3 = 0;
while (_local3 < adstack.length) {
var _local2 = 0;
while (_local2 < adstack[_local3]._blocks.length) {
tile.push(adstack[_local3]._blocks[_local2]._currentframe);
_local2++;
}
_local3++;
}
}
function createExplosion(x, y, frame) {
var _local2 = _root;
var _local1 = 0;
while (_local2["explosion" + _local1] != undefined) {
_local1++;
}
clip = t_explosion.duplicateMovieClip("explosion" + _local1, 22222 + _local1);
clip._x = x;
clip._y = y;
clip.gotoAndStop(frame);
explosion.unshift(clip);
if (!isProcess(PS_EXPLOSION)) {
_IGNOREUSER = true;
startProcess(PS_EXPLOSION);
}
}
function createExplosion2(x, y) {
var _local2 = _root;
var _local1 = 0;
while (_local2["explosion" + _local1] != undefined) {
_local1++;
}
clip = t_explosion2.duplicateMovieClip("explosion" + _local1, 22222 + _local1);
clip._x = x;
clip._y = y;
explosion.unshift(clip);
if (!isProcess(PS_EXPLOSION2)) {
_IGNOREUSER = true;
startProcess(PS_EXPLOSION2);
}
}
function createExplosion3(x, y) {
var _local2 = _root;
var _local1 = 0;
while (_local2["explosion" + _local1] != undefined) {
_local1++;
}
clip = t_explosion3.duplicateMovieClip("explosion" + _local1, 22222 + _local1);
clip._x = x;
clip._y = y;
explosion.unshift(clip);
if (!isProcess(PS_EXPLOSION3)) {
_IGNOREUSER = true;
startProcess(PS_EXPLOSION3);
}
}
function hideTemplates() {
t_background.gotoAndStop(1);
newBack.gotoAndStop(layOutBack);
t_bstack1._visible = false;
t_bstack1.stop();
t_bstack2._visible = false;
t_bstack2.stop();
t_bstack3._visible = false;
t_bstack3.stop();
t_bstack4._visible = false;
t_bstack4.stop();
t_block._visible = false;
t_block.stop();
t_explosion._visible = false;
t_explosion2._visible = false;
t_explosion3._visible = false;
t_spinbar._visible = false;
t_spinbar.baraban.gotoAndStop(1);
t_ti._visible = false;
t_gameover._visible = false;
t_pause._visible = false;
t_infoscreen._visible = false;
t_congratulations._visible = false;
}
function duplicateBStack(name, x, y, depth) {
clip = _root[themeStackName].duplicateMovieClip(name, depth);
clip._x = x;
clip._y = y;
clip.t_block._visible = false;
return(clip);
}
function nextLevel() {
var _local1 = _root;
removeField();
level = levels[levelnow];
TIMELIMIT = getLevelTime();
if (_local1.settings.data.musicOn) {
_local1.clip_btn_music.gotoAndStop(1);
_local1.playMusic();
} else {
_local1.clip_btn_music.gotoAndStop(2);
}
if (levelnow > levels.length) {
showGameOver();
} else {
if (levelnow > 1) {
showBanner("Loading next LeveL..", levelUrl, levelClickUrl, INTERMIDATELEVEL);
}
t_background.gotoAndStop(levelnow);
createField();
tilesremain = 144;
startTime = getTimer();
startProcess(PS_TIMER);
}
}
function getMinutes(time) {
return(Math.floor(time / 60000));
}
function getSeconds(time) {
return(Math.floor((time % 60000) / 1000));
}
function timer() {
tm = TIMELIMIT - (getTimer() - startTime);
minutes = getMinutes(tm);
seconds = getSeconds(tm);
if (((((lastSeconds != seconds) && (minutes == 0)) && (seconds <= 15)) || (((lastSeconds != seconds) && (minutes == 0)) && (seconds == 30))) || (((lastSeconds != seconds) && (minutes == 1)) && (seconds == 0))) {
_root.playSound("pik");
}
lastSeconds = seconds;
if (seconds < 10) {
seconds = "0" + seconds;
}
if (tm <= 0) {
_root.wnd_timeIsUp.init();
return(undefined);
}
info.timer = (minutes + ":") + seconds;
}
function levelStartPush() {
var _local3 = 0;
var _local2 = 0;
while (_local2 < level._field.length) {
var _local1 = 0;
while (_local1 < level._field[_local2].length) {
if (level._field[_local2][_local1] != 0) {
stk = _root[(("bstack" + _local2) + "_") + _local1];
if (stk._blocks.length < stk._length) {
stk.push();
_local3++;
}
}
_local1++;
}
_local2++;
}
_local2 = 0;
while (_local2 < level.adstack.length) {
stk = _root["adstack" + _local2];
if (stk._blocks.length < stk._length) {
stk.push();
_local3++;
}
_local2++;
}
if (_local3 == 0) {
killProcess(PS_LSP);
}
}
function isSelected(val) {
var _local2 = val;
var _local1 = 0;
while (_local1 < selected.length) {
if (selected[_local1] == _local2) {
return(true);
}
_local1++;
}
return(false);
}
function checkSelected() {
if (((selected[0].lastBlock()._currentframe == selected[1].lastBlock()._currentframe) || ((selected[0].lastBlock()._currentframe < 5) && (selected[1].lastBlock()._currentframe < 5))) || (((selected[0].lastBlock()._currentframe > 8) && (selected[0].lastBlock()._currentframe < 13)) && ((selected[1].lastBlock()._currentframe > 8) && (selected[1].lastBlock()._currentframe < 13)))) {
removeSelected();
} else {
unFocusSelected();
}
selected = new Array();
}
function unFocusSelected() {
var _local1 = 0;
while (_local1 < selected.length) {
selected[_local1].unFocus();
_local1++;
}
}
function removeSelected() {
_root.blockPoints();
_root.removeFase = 0;
var _local1 = 0;
while (_local1 < selected.length) {
selected[_local1].lastBlock().killing = 1;
_IGNOREUSER = true;
if ((selected[_local1].lastBlock()._currentframe > 8) && (selected[_local1].lastBlock()._currentframe < 13)) {
var _local2 = true;
} else {
var _local2 = false;
}
_local1++;
}
playSound("snd_remove");
}
function levelEnd() {
killProcess(PS_TIMER);
_root.wnd_lvlComplite.init();
}
function processExplosion() {
var _local1 = 0;
while (_local1 < explosion.length) {
explosion[_local1]._alpha = explosion[_local1]._alpha - 10;
if (explosion[_local1]._alpha < 20) {
removeMovieClip(explosion.pop());
}
_local1++;
}
if (explosion.length == 0) {
_IGNOREUSER = false;
killProcess(PS_EXPLOSION);
if (tilesremain == 0) {
levelEnd();
}
}
}
function processExplosion2() {
var _local1 = 0;
while (_local1 < explosion.length) {
if (explosion[_local1]._currentframe > 12) {
removeMovieClip(explosion.pop());
}
_local1++;
}
if (explosion.length == 0) {
_IGNOREUSER = false;
killProcess(PS_EXPLOSION);
if (tilesremain == 0) {
levelEnd();
}
}
}
function processExplosion3() {
var _local1 = 0;
while (_local1 < explosion.length) {
if (explosion[_local1]._currentframe > 12) {
removeMovieClip(explosion.pop());
}
_local1++;
}
if (explosion.length == 0) {
_IGNOREUSER = false;
killProcess(PS_EXPLOSION);
if (tilesremain == 0) {
levelEnd();
}
}
}
function timeBonus() {
tm = getTimer() - startTime;
minutes = getMinutes(tm);
seconds = getSeconds(tm);
if (seconds < 10) {
seconds = "0" + seconds;
}
if (tm <= 0) {
nextLevel();
}
var _local3 = (minutes + ":") + seconds;
var _local2 = Math.floor((TIMELIMIT - tm) / 1000);
var _local1 = _local2 * (3 * Math.pow(2, levelnow - 1));
_root.addScore(_local1);
return(new Array(_local3, _local1));
}
function sendScores() {
}
function killIt(clip, inBox) {
var _local1 = _root;
tilesremain--;
if (inBox) {
clip.RemoveMovieClip();
} else {
clip._parent.pop();
}
if (_local1.tilesremain == 0) {
_local1.levelEnd();
}
_local1.removeFase++;
if (_local1.removeFase == 2) {
if (_local1.konteiner == 0) {
checkForNoMovesClassic();
}
_local1.removeFase = 0;
}
}
function addScore(p) {
var _local1 = p;
var _local2 = _root;
points = points + _local1;
levelScore = levelScore + _local1;
info.points = devRazr(points);
info.levelScore = devRazr(levelScore);
clip_points.create(_local1, "", "", _local2._xmouse, _local2._ymouse);
_local2.check4pointAbility();
}
function addScoreXY(p, x, y) {
var _local1 = p;
var _local2 = _root;
if (_local2.combo > 0) {
_local2.playSound("combo");
points = points + (_local1 * (combo + 1));
levelScore = levelScore + (_local1 * (combo + 1));
info.points = devRazr(points);
info.levelScore = devRazr(levelScore);
clip_points.create(_local1, "x", String(combo + 1), x, y);
} else {
_local2.playSound("points2");
points = points + _local1;
levelScore = levelScore + _local1;
info.points = devRazr(points);
info.levelScore = devRazr(levelScore);
clip_points.create(_local1, "", "", x, y);
}
_local2.check4pointAbility();
}
function blockPoints() {
var _local1 = _root;
_local1.secondlyPoints = _local1.countPoints(getTimer() - _local1.lastRemove);
_local1.lastRemove = getTimer();
}
function countPoints(time) {
var _local1 = time;
if (_local1 < bonusPointsTime) {
var _local2 = Math.floor(((maxPoints - minPoints) / bonusPointsTime) * (bonusPointsTime - _local1)) + minPoints;
} else {
var _local2 = minPoints;
}
if (_local1 < comboTime) {
combo++;
} else {
combo = 0;
}
return(_local2);
}
function startLevelN(n) {
var _local1 = _root;
levelNow = n;
if (_local1.settings.data.musicOn) {
_local1.clip_btn_music.gotoAndStop(1);
_local1.playMusic();
} else {
_local1.clip_btn_music.gotoAndStop(2);
}
removeField();
level = levels[n];
TIMELIMIT = getLevelTime();
createField();
tilesremain = 144;
startTime = getTimer();
startProcess(PS_TIMER);
}
function bot() {
if ((!_IGNOREUSER) && (_root.tilesremain > 0)) {
if ((typeof(asdf) == "undefined") || (asdf < 0)) {
asdf = 10;
} else {
asdf--;
}
if (asdf == 0) {
asdf = random(3) + 2;
botStep();
}
}
}
function botStep() {
_root.getFreeStacks();
var _local1 = findMatch();
if (!_local1) {
playSound("snd_errorfindmatch");
return(false);
}
_local1[0].press();
_local1[1].press();
return(undefined);
}
function conformity(a, b) {
var _local1 = b;
var _local2 = a;
if ((typeof(_local2) == "undefined") || (typeof(_local1) == "undefined")) {
return(false);
}
return(((_local2 == _local1) || ((_local2 < 5) && (_local1 < 5))) || ((((_local2 > 8) && (_local1 > 8)) && (_local2 < 13)) && (_local1 < 13)));
}
function check4pointAbility() {
var _local1 = _root;
if (_local1.levelScore < (-_local1.ptsreshuffle)) {
_local1.back1.reshuffle._alpha = 40;
} else {
_local1.back1.reshuffle._alpha = 100;
}
if (_local1.levelScore < (-_local1.ptshint)) {
_local1.back1.hint._alpha = 40;
} else {
_local1.back1.hint._alpha = 100;
}
if (_local1.konteiner == 0) {
if ((_local1.selected.length == 1) && (_local1.levelScore >= (-_local1.ptshint2))) {
_local1.clip_hint2.gotoAndStop(1);
} else {
_local1.clip_hint2.gotoAndStop(2);
}
}
if ((_local1.box.length == _local1.konteiner) && (_local1.levelScore >= (-_local1.ptsundo))) {
_local1.clip_btn_undo.gotoAndStop(1);
} else {
_local1.clip_btn_undo.gotoAndStop(2);
}
}
function getLevelTime() {
var _local1 = ((8 - _root.konteiner) * 60) * 1000;
return(_local1);
}
function checkForNoMovesClassic(again) {
var _local1 = _root;
_local1.getFreeStacks();
var _local2 = _local1.findMatch();
if ((_local1.tilesremain > 0) && (!_local2)) {
_local1.wnd_noMoves.init(again);
}
}
function checkForNoMoves(again) {
var _local2 = _root;
if (_local2.konteiner == _local2.box.length) {
_local2.getFreeStacks();
var flag = false;
var _local3 = 0;
while (_local3 < _local2.box.length) {
var _local1 = 0;
while (_local1 < _local2.freeStacks.length) {
if (_local2.conformity(_local2.freeStacks[_local1].lastBlock()._currentframe, _local2.box[_local3]._currentframe)) {
flag = true;
break;
}
_local1++;
}
if (flag) {
break;
}
_local3++;
}
if (!flag) {
_local2.wnd_noMoves.init(again);
}
}
}
function getFreeStacks() {
freeStacks = new Array();
var _local2 = 0;
while (_local2 < field.length) {
var _local1 = 0;
while (_local1 < field[_local2].length) {
if (field[_local2][_local1].isFree()) {
freeStacks.push(field[_local2][_local1]);
}
_local1++;
}
_local2++;
}
_local2 = 0;
while (_local2 < adstack.length) {
if (adstack[_local2].isFree()) {
freeStacks.push(adstack[_local2]);
}
_local2++;
}
return(freeStacks.length);
}
function myCmp(a, b) {
if (a.lastBlock()._currentframe < b.lastBlock()._currentframe) {
return(-1);
}
if (a.lastBlock()._currentframe > b.lastBlock()._currentframe) {
return(1);
}
return(0);
}
function findMatch() {
var _local3 = _root;
freeStacks.sort(myCmp);
var _local1 = 0;
while (_local1 < (freeStacks.length - 1)) {
if (_local3.conformity(freeStacks[_local1].lastBlock()._currentframe, freeStacks[_local1 + 1].lastBlock()._currentframe)) {
var _local2 = new Array();
_local2.push(freeStacks[_local1]);
_local2.push(freeStacks[_local1 + 1]);
return(_local2);
}
_local1++;
}
return(false);
}
function findMatchToBox() {
var _local3 = 0;
while (_local3 < _root.box.length) {
var _local1 = 0;
while (_local1 < freeStacks.length) {
if (_root.conformity(_root.box[_local3]._currentframe, freeStacks[_local1].lastBlock()._currentframe)) {
var _local2 = new Array();
_local2.push(freeStacks[_local1]);
return(_local2);
}
_local1++;
}
_local3++;
}
return(false);
}
function findMatch2() {
var _local2 = _root;
var _local3 = new Array();
if (_local2.selected.length == 1) {
freeStacks.sort(myCmp);
var _local1 = 0;
while (_local1 < (freeStacks.length - 1)) {
if (((freeStacks[_local1].lastBlock()._currentframe == _local2.selected[0].lastBlock()._currentframe) or ((freeStacks[_local1].lastBlock()._currentframe < 5) && (_local2.selected[0].lastBlock()._currentframe < 5))) or (((freeStacks[_local1].lastBlock()._currentframe < 13) && (freeStacks[_local1].lastBlock()._currentframe > 8)) && ((_local2.selected[0].lastBlock()._currentFrame < 13) && (_local2.selected[0].lastBlock()._currentFrame > 8)))) {
_local3.push(freeStacks[_local1]);
}
_local1++;
}
return(_local3);
}
return(false);
}
function hint() {
var _local2 = _root;
var a = (getTimer() - lastHint);
if ((getTimer() - lastHint) < HINTTIMELIMIT) {
return(false);
}
lastHint = getTimer();
getFreeStacks();
if ((_local2.konteiner > 0) && (_local2.konteiner == _local2.box.length)) {
var _local1 = findMatchToBox();
} else {
var _local1 = findMatch();
}
if (!_local1) {
playSound("snd_errorfindmatch");
return(false);
}
startBlink(_local1);
return(undefined);
}
function hint2() {
var a = (getTimer() - lastHint);
if ((getTimer() - lastHint) < HINTTIMELIMIT) {
return(false);
}
lastHint = getTimer();
getFreeStacks();
var _local1 = findMatch2();
if (!_local1) {
playSound("snd_errorfindmatch");
return(false);
}
startBlink2(_local1);
return(undefined);
}
function startBlink(matched) {
_root.addScore(ptshint);
blinked = new Array();
blinked = matched;
var _local1 = 0;
while (_local1 < blinked.length) {
blinked[_local1]._blinkstep = -BLINKSTEP;
_local1++;
}
startProcess(PS_BLINK);
}
function startBlink2(matched) {
_root.addScore(ptshint2);
blinked = new Array();
blinked = matched;
var _local1 = 0;
while (_local1 < blinked.length) {
blinked[_local1]._blinkstep = -BLINKSTEP;
_local1++;
}
startProcess(PS_BLINK);
}
function blink() {
var _local1 = 0;
while (_local1 < blinked.length) {
blinked[_local1].lastBlock()._alpha = blinked[_local1].lastBlock()._alpha + blinked[_local1]._blinkstep;
if ((blinked[_local1].lastBlock()._alpha < BLINKDLIMIT) || (blinked[_local1].lastBlock()._alpha > BLINKULIMIT)) {
blinked[_local1]._blinkstep = -blinked[_local1]._blinkstep;
}
_local1++;
}
}
function stopBlink() {
var _local1 = 0;
while (_local1 < blinked.length) {
blinked[_local1].lastBlock()._alpha = 100;
blinked[_local1]._blinkstep = undefined;
_local1++;
}
killProcess(PS_BLINK);
}
function showCountDown() {
ar = timeBonus();
var _local1 = ((("You Clear the Map in " + ar[0]) + " . Your time bonus is ") + ar[1]) + " scores. ";
t_ti.duplicateMovieClip("countdown", 99998);
_IGNOREUSER = true;
ST_COUNTDOWN = true;
countdown._text = _local1;
cStartTime = getTimer();
}
function hideCountDown() {
removeMovieClip(countdown);
_IGNOREUSER = false;
ST_COUNTDOWN = false;
showSpinBar();
}
function countd() {
tm = COUNTDOWNTIME - (getTimer() - cStartTime);
minutes = getMinutes(tm);
seconds = getSeconds(tm);
if (seconds < 10) {
seconds = "0" + seconds;
}
if (tm <= 0) {
hideCountDown();
}
countdown._timer = (minutes + ":") + seconds;
}
function showSpinBar() {
t_spinbar.duplicateMovieClip("spinbar", 99999);
ST_SPIN = true;
_IGNOREUSER = true;
}
function hideSpinBar() {
prizepoints = prizepoints + spinpoints;
jppoints.jppts = prizepoints;
removeMovieClip(spinbar);
spinpoints = 0;
startSpin = 0;
ST_SPIN = false;
_IGNOREUSER = false;
showQuestion();
if (levelnow == levels.length) {
qGameEnd();
}
}
function spin() {
if (StartSpin == 0) {
StartSpin = getTimer();
} else if ((getTimer() - StartSpin) > SPINTIME) {
_root.spinpoints = spinbar.baraban.scores0;
spinbar.baraban.gotoAndStop(1);
spinbar.spin_ok_clip._visible = true;
return(undefined);
}
spinbar.baraban.scores0 = scoresTable[random(scoresTable.length)];
spinbar.baraban.scores1 = scoresTable[random(scoresTable.length)];
spinbar.spin_ok_clip._visible = false;
_root.playSound("snd_baraban");
}
function showGameOver() {
sendScores();
_root.playSound("snd_gameover");
_root.stopMusic();
if (levelnow > levels.length) {
t_congratulations.duplicateMovieClip("gameover", 99997);
} else {
t_gameover.duplicateMovieClip("gameover", 99997);
}
ST_GAMEOVER = true;
_IGNOREUSER = true;
gameover._text = ("You win " + points) + " scores";
killProcess(PS_TIMER);
}
function hideGameOver() {
removeMovieClip(gameover);
points = 0;
info.points = points;
info.spoints = Math.floor(points / P2S);
levelnow = 0;
jppoints.jppts = 0;
prizepoints = 0;
ST_GAMEOVER = false;
_IGNOREUSER = false;
showBanner("Loading Next Game..", intermidateUrl, intermidateClickUrl, INTERMIDATEGAME);
nextLevel();
}
function showPause() {
bannernow = pauseClickUrl;
_IGNOREUSER = true;
ST_PAUSE = true;
t_pause.duplicateMovieClip("pause", 111111);
pause.banner.loadMovie(_root.pauseUrl);
pause.toptext = "Press 'P' to Resume the Game";
pauseStart = getTimer();
}
function hidePause() {
_IGNOREUSER = false;
ST_PAUSE = false;
removeMovieClip(pause);
startTime = startTime + (getTimer() - pauseStart);
}
function showInfoScreen() {
nextLevel();
return(undefined);
}
function hideInfoScreen() {
}
function showBanner(txt, bnr, click, time) {
bannernow = click;
_IGNOREUSER = true;
ST_BANNER = true;
bannerStartTime = getTimer();
bannerTimeout = time;
t_pause.duplicateMovieClip("pause", 111111);
pause.banner.loadMovie(bnr);
pause.toptext = txt;
pauseStart = getTimer();
}
function psbanner() {
if ((getTimer() - bannerStartTime) > bannerTimeout) {
hideBanner();
} else {
tm = bannerTimeout - (getTimer() - bannerStartTime);
minutes = getMinutes(tm);
seconds = getSeconds(tm);
if (seconds < 10) {
seconds = "0" + seconds;
}
pause.timer = (minutes + ":") + seconds;
}
}
function hideBanner() {
_IGNOREUSER = false;
ST_BANNER = false;
removeMovieClip(pause);
startTime = startTime + bannerTimeout;
}
function bannerClick() {
getURL (bannernow);
}
function qContinue() {
_IGNOREUSER = false;
ST_QUESTION = false;
removeMovieClip(gameover2);
nextLevel();
}
showGameBtns();
var selected = new Array();
var field = new Array();
var explosion = new Array();
var _IGNOREUSER = false;
var adstack = new Array();
var tile = new Array();
var sk = 0;
var lastRemove = -10000;
var points = 0;
var tilesremain = 144;
var startTime = 0;
var startSpin = 0;
var spinpoints = 0;
var prizepoints = 0;
var lastReshufle = 0;
var buy_url = "http://www.doublegames.com/order.html?fr=elitemahjongon";
var download_url = "http://www.doublegames.com/downloads.html?fr=elitemahjongon";
var moregames_url = "http://www.doublegames.com/?fr=elitemahjongon";
var doubl_url = "http://www.doublegames.com/?fr=elitemahjongon";
_root.batton_clip._visible = false;
_root.batton_clip.duplicateMovieClip("batttt", 1000000);
_root.clip_wnd_quitYN.duplicateMovieClip("wnd_quitYN", 1000001);
_root.clip_wnd_noMoves.duplicateMovieClip("wnd_noMoves", 1000002);
_root.clip_wnd_timeIsUp.duplicateMovieClip("wnd_timeIsUp", 1000003);
_root.themeStackName = "t_bstack" add layOut;
_root.newBack.gotoAndStop(layOutBack);
_root.Back1.gotoAndStop(layOutBack);
_root.pointsColorTransform = new Object();
_root.podlColorTransform = new Object();
if (layOutBack == 1) {
_root.pointsColorTransform.ra = 100;
_root.pointsColorTransform.ga = 100;
_root.pointsColorTransform.ba = 40;
_root.pointsColorTransform.aa = 100;
_root.podlColorTransform.ra = 0;
_root.podlColorTransform.ga = 50;
_root.podlColorTransform.ba = 85;
_root.podlColorTransform.aa = 100;
} else if (layOutBack == 2) {
_root.pointsColorTransform.ra = 75;
_root.pointsColorTransform.ga = 75;
_root.pointsColorTransform.ba = 0;
_root.pointsColorTransform.aa = 100;
_root.podlColorTransform.ra = 50;
_root.podlColorTransform.ga = 50;
_root.podlColorTransform.ba = 0;
_root.podlColorTransform.aa = 100;
} else if (layOutBack == 3) {
_root.pointsColorTransform.ra = 100;
_root.pointsColorTransform.ga = 100;
_root.pointsColorTransform.ba = 40;
_root.pointsColorTransform.aa = 100;
_root.podlColorTransform.ra = 12;
_root.podlColorTransform.ga = 50;
_root.podlColorTransform.ba = 0;
_root.podlColorTransform.aa = 100;
} else if (layOutBack == 4) {
_root.pointsColorTransform.ra = 61;
_root.pointsColorTransform.ga = 0;
_root.pointsColorTransform.ba = 0;
_root.pointsColorTransform.aa = 100;
_root.podlColorTransform.ra = 61;
_root.podlColorTransform.ga = 0;
_root.podlColorTransform.ba = 0;
_root.podlColorTransform.aa = 100;
}
_root.hintColorTransform = new Object();
_root.hintColorTransform.ra = 100;
_root.hintColorTransform.ga = 100;
_root.hintColorTransform.ba = 40;
_root.hintColorTransform.aa = 100;
_root.lvlName.Color = new Color(_root.lvlName);
_root.lvlName.color.setTransform(_root.pointsColorTransform);
_root.btns_podl.Color = new Color(_root.btns_podl);
_root.btns_podl.color.setTransform(_root.podlColorTransform);
if (konteiner == 0) {
clip_hint2.gotoAndStop(2);
} else {
clip_hint2.gotoAndStop(3);
}
_root.clip_btn_undo._visible = _root.konteiner > 0;
_root.clip_btn_undo.gotoAndStop(2);
greyTransform = new Object();
greyTransform.ra = 70;
greyTransform.ga = 70;
greyTransform.ba = 70;
greyTransform.aa = 100;
orangeTransform = new Object();
orangeTransform.ra = 200;
orangeTransform.ga = 70;
orangeTransform.ba = 0;
orangeTransform.aa = 100;
blueTransform = new Object();
blueTransform.ra = 90;
blueTransform.ga = 90;
blueTransform.ba = 110;
blueTransform.aa = 100;
normalTransform = new Object();
normalTransform.ra = 100;
normalTransform.ga = 100;
normalTransform.ba = 100;
normalTransform.aa = 100;
var bonus = new Array(25, 100, 75, 50, 25);
var ptsreshuffle = -1000;
var ptshint = -300;
var ptshint2 = -500;
var ptsundo = -100;
var comboTime = 2000;
var bonusPointsTime = 10000;
var minPoints = 30;
var maxPoints = 100;
var TIMELIMIT;
var COUNTDOWNTIME = 5000;
var SPINTIME = 3000;
var P2S = 25;
var HINTTIMELIMIT = 1500;
var BLINKULIMIT = 99;
var BLINKDLIMIT = 40;
var BLINKSTEP = 21;
var scoresTable = [25, 25, 25, 25, 30, 30, 30, 35, 35, 35, 50, 50, 75, 100, 150, 250, 500];
if (bannerUrl == undefined) {
bannerUrl = "banner_casino.swf";
}
if (pauseUrl == undefined) {
pauseUrl = "banner_casino.swf";
}
if (levelUrl == undefined) {
levelUrl = "banner_casino.swf";
}
if (intermidateUrl == undefined) {
intermidateUrl = "banner_casino.swf";
}
if (scoresUrl == undefined) {
scoresUrl = "http://itpremium.com/";
}
if (serverUrl == undefined) {
serverUrl = "http://192.168.1.34/vadim/jezball/server.php?a=1";
}
if (bannerClickUrl == undefined) {
bannerClickUrl = "http://www.splashspot.com/search/results_banner.php?aff_id=EZ12&searchterm=casino";
}
if (pauseClickUrl == undefined) {
pauseClickUrl = "http://www.splashspot.com/search/results_banner.php?aff_id=EZ12&searchterm=casino";
}
if (levelClickUrl == undefined) {
levelClickUrl = "http://www.splashspot.com/search/results_banner.php?aff_id=EZ12&searchterm=casino";
}
if (intermidateClickUrl == undefined) {
intermidateClickUrl = "http://www.splashspot.com/search/results_banner.php?aff_id=EZ12&searchterm=casino";
}
if (internalKeyword == undefined) {
internalKeyword = "keyword";
}
if (externalKeyword == undefined) {
externalKeyword = "keyword";
}
if (mute != undefined) {
_root.soundon = !mute;
}
var INTERMIDATELEVEL = 0;
var INTERMIDATEGAME = 0;
var RESHUFFLELIMIT = 500;
conteinersCount = 3;
var PS_LSP = 1;
var PS_EXPLOSION = 2;
var PS_TIMER = 3;
var PS_EXPLOSION2 = 4;
var PS_EXPLOSION3 = 5;
var PS_BLINK = 6;
var ST_SPIN = false;
var ST_COUNTDOWN = false;
var ST_GAMEOVER = false;
var ST_PAUSE = false;
var ST_BANNER = false;
var PROCESS = new Array();
var selected = new Array();
var field = new Array();
var explosion = new Array();
var _IGNOREUSER = false;
var adstack = new Array();
var tile = new Array();
var sk = 0;
var lastRemove = -10000;
var points = 0;
var tilesremain = 144;
var startTime = 0;
var startSpin = 0;
var spinpoints = 0;
var prizepoints = 0;
var lastReshufle = 0;
var buy_url = "http://www.doublegames.com/order.html?fr=elitemahjongon";
var download_url = "http://www.doublegames.com/downloads.html?fr=elitemahjongon";
var moregames_url = "http://www.doublegames.com/?fr=elitemahjongon";
var doubl_url = "http://www.doublegames.com/?fr=elitemahjongon";
var hex_chr = "0123456789abcdef";
var levels = new Array();
var level = new Object();
level._field = new Array();
level._field[0] = new Array(1, 1, 1, 1, 1, 1, 1, 1, 1);
level._field[1] = new Array(1, 2, 2, 2, 2, 2, 2, 2, 1);
level._field[2] = new Array(1, 2, 3, 3, 4, 3, 3, 2, 1);
level._field[3] = new Array(1, 2, 3, 4, 5, 4, 3, 2, 1);
level._field[4] = new Array(1, 2, 3, 4, 5, 4, 3, 2, 1);
level._field[5] = new Array(1, 2, 3, 3, 4, 3, 3, 2, 1);
level._field[6] = new Array(1, 2, 2, 2, 2, 2, 2, 2, 1);
level._field[7] = new Array(1, 1, 1, 1, 1, 1, 1, 1, 1);
getXYCooCent(level._field[0].length, level._field.length);
level.name = "first";
level.adstack = new Array();
level._timelimit = 600000 /* 0x0927C0 */;
levels.push(level);
var level = new Object();
level._field = new Array();
level._field[0] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 0, 0);
level._field[1] = new Array(0, 0, 0, 4, 3, 2, 1, 1, 2, 3, 3, 2, 1, 1, 2);
level._field[2] = new Array(0, 0, 0, 3, 2, 1, 1, 2, 3, 3, 2, 1, 1, 2, 0);
level._field[3] = new Array(0, 0, 0, 2, 1, 1, 2, 3, 3, 2, 1, 1, 2, 0, 0);
level._field[4] = new Array(0, 0, 2, 1, 1, 2, 3, 3, 2, 1, 1, 2, 0, 0, 0);
level._field[5] = new Array(0, 2, 1, 1, 2, 3, 3, 2, 1, 1, 2, 3, 0, 0, 0);
level._field[6] = new Array(2, 1, 1, 2, 3, 3, 2, 1, 1, 2, 3, 4, 0, 0, 0);
level._field[7] = new Array(0, 0, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0);
getXYCooCent(level._field[0].length, level._field.length);
level.name = "second";
level.adstack = new Array();
level._timelimit = 600000 /* 0x0927C0 */;
levels.push(level);
var level = new Object();
level._field = new Array();
level._field[0] = new Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);
level._field[1] = new Array(0, 0, 1, 2, 2, 2, 2, 2, 2, 1, 0, 0);
level._field[2] = new Array(0, 1, 1, 2, 3, 3, 3, 3, 2, 1, 1, 0);
level._field[3] = new Array(1, 1, 1, 2, 3, 4, 4, 3, 2, 1, 1, 1);
level._field[4] = new Array(1, 1, 1, 2, 3, 4, 4, 3, 2, 1, 1, 1);
level._field[5] = new Array(0, 1, 1, 2, 3, 3, 3, 3, 2, 1, 1, 0);
level._field[6] = new Array(0, 0, 1, 2, 2, 2, 2, 2, 2, 1, 0, 0);
level._field[7] = new Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);
getXYCooCent(level._field[0].length, level._field.length);
level.name = "third";
level._timelimit = 600000 /* 0x0927C0 */;
level.adstack = new Array();
var stk = new Object();
stk._right = new Array("bstack3_0", "bstack4_0");
stk._down = new Array();
stk._left = new Array();
stk._len = 1;
stk._x = level._fieldx + -42;
stk._y = level._fieldy + 175;
level.adstack.push(stk);
var stk = new Object();
stk._right = new Array();
stk._down = new Array("bstack3_5", "bstack4_5", "bstack3_6", "bstack4_6");
stk._left = new Array();
stk._len = 1;
stk._x = (level._fieldx + 231) - 28;
stk._y = (level._fieldy + 175) - 36;
level.adstack.push(stk);
var stk = new Object();
stk._right = new Array();
stk._down = new Array();
stk._left = new Array("bstack3_11", "bstack4_11");
stk._len = 1;
stk._x = level._fieldx + 504;
stk._y = level._fieldy + 175;
level.adstack.push(stk);
var stk = new Object();
stk._right = new Array();
stk._down = new Array();
stk._left = new Array("adstack2");
stk._len = 1;
stk._x = level._fieldx + 546;
stk._y = level._fieldy + 175;
level.adstack.push(stk);
levels.push(level);
smX = 42;
smY = 51;
var freeStacks = new Array();
var blinked = new Array();
hideTemplates();
showInfoScreen();
Instance of Symbol 563 MovieClip "t_bstack4" in Frame 6
on (press) {
if (_root._IGNOREUSER) {
return(false);
}
_root.stopBlink();
press();
}
on (keyPress "r") {
_root.stopBlink();
_root.reshuffle();
}
on (keyPress "n") {
_root.stopBlink();
_root.nextLevel();
}
on (keyPress "p") {
_root.stopBlink();
if (_root.ST_PAUSE) {
_root.hidePause();
} else if (!_root._IGNOREUSER) {
_root.showPause();
}
}
on (keyPress "h") {
_root.stopBlink();
if (_root._IGNOREUSER) {
return(false);
}
_root.hint();
}
on (rollOver) {
if (_root.konteiner > 0) {
rOver();
}
}
on (rollOut) {
if (_root.konteiner > 0) {
rOut();
}
}
Frame 7
mainProcess();
play();
Frame 8
prevFrame();
Symbol 24 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 27 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(background_mc, "background");
Symbol 30 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(background_mc, "backgroundDisabled");
Symbol 32 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(background_mc, "backgroundDisabled");
Symbol 35 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(check_mc, "foregroundDisabled");
Symbol 38 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(check_mc, "check");
Symbol 39 MovieClip [fcb_states] Frame 1
stop();
Symbol 39 MovieClip [fcb_states] Frame 2
stop();
Symbol 39 MovieClip [fcb_states] Frame 3
stop();
Symbol 39 MovieClip [fcb_states] Frame 4
stop();
Symbol 39 MovieClip [fcb_states] Frame 5
stop();
Symbol 39 MovieClip [fcb_states] Frame 6
stop();
Symbol 42 MovieClip [FLabelSymbol] Frame 1
#initclip 2
_global.FLabelClass = function () {
var _local1 = this;
if (_local1.hostComponent == undefined) {
_local1.hostComponent = ((_local1._parent.controller == undefined) ? (_local1._parent) : (_local1._parent.controller));
}
if (_local1.customTextStyle == undefined) {
if (_local1.hostComponent.textStyle == undefined) {
_local1.hostComponent.textStyle = new TextFormat();
}
_local1.textStyle = _local1.hostComponent.textStyle;
_local1.enable = true;
}
};
FLabelClass.prototype = new MovieClip();
Object.registerClass("FLabelSymbol", FLabelClass);
FLabelClass.prototype.setLabel = function (label) {
var _local1 = this;
var _local2 = _local1.hostComponent.styleTable.embedFonts.value;
if (_local2 != undefined) {
_local1.labelField.embedFonts = _local2;
}
_local1.labelField.setNewTextFormat(_local1.textStyle);
_local1.labelField.text = label;
_local1.labelField._height = _local1.labelField.textHeight + 2;
};
FLabelClass.prototype.setSize = function (width) {
this.labelField._width = width;
};
FLabelClass.prototype.setEnabled = function (enable) {
var _local2 = this;
var _local3 = enable;
_local2.enable = _local3;
var _local1 = _local2.hostComponent.styleTable[(_local3 ? "textColor" : "textDisabled")].value;
if (_local1 == undefined) {
_local1 = (_local3 ? 0 : 8947848);
}
_local2.setColor(_local1);
};
FLabelClass.prototype.getLabel = function () {
return(this.labelField.text);
};
FLabelClass.prototype.setColor = function (col) {
this.labelField.textColor = col;
};
#endinitclip
Symbol 43 MovieClip [FUIComponentSymbol] Frame 1
#initclip 1
function FUIComponentClass() {
this.init();
}
FUIComponentClass.prototype = new MovieClip();
FUIComponentClass.prototype.init = function () {
var _local1 = this;
var _local3 = _global;
_local1.enable = true;
_local1.focused = false;
_local1.useHandCursor = false;
_local1._accImpl = new Object();
_local1._accImpl.stub = true;
_local1.styleTable = new Array();
if (_local3.globalStyleFormat == undefined) {
_local3.globalStyleFormat = new FStyleFormat();
globalStyleFormat.isGlobal = true;
_local3._focusControl = new Object();
_local3._focusControl.onSetFocus = function (oldFocus, newFocus) {
oldFocus.myOnKillFocus();
newFocus.myOnSetFocus();
};
Selection.addListener(_local3._focusControl);
}
if (_local1._name != undefined) {
_local1._focusrect = false;
_local1.tabEnabled = true;
_local1.focusEnabled = true;
_local1.tabChildren = false;
_local1.tabFocused = true;
if (_local1.hostStyle == undefined) {
globalStyleFormat.addListener(_local1);
} else {
_local1.styleTable = _local1.hostStyle;
}
_local1.deadPreview._visible = false;
_local1.deadPreview._width = (_local1.deadPreview._height = 1);
_local1.methodTable = new Object();
_local1.keyListener = new Object();
_local1.keyListener.controller = _local1;
_local1.keyListener.onKeyDown = function () {
this.controller.myOnKeyDown();
};
_local1.keyListener.onKeyUp = function () {
this.controller.myOnKeyUp();
};
for (var _local2 in _local1.styleFormat_prm) {
_local1.setStyleProperty(_local2, _local1.styleFormat_prm[_local2]);
}
}
};
FUIComponentClass.prototype.setEnabled = function (enabledFlag) {
var _local1 = this;
_local1.enable = ((arguments.length > 0) ? (enabledFlag) : true);
_local1.tabEnabled = (_local1.focusEnabled = enabledFlag);
if ((!_local1.enable) && (_local1.focused)) {
Selection.setFocus(undefined);
}
};
FUIComponentClass.prototype.getEnabled = function () {
return(this.enable);
};
FUIComponentClass.prototype.setSize = function (w, h) {
var _local1 = this;
_local1.width = w;
_local1.height = h;
_local1.focusRect.removeMovieClip();
};
FUIComponentClass.prototype.setChangeHandler = function (chng, obj) {
var _local1 = this;
_local1.handlerObj = ((obj == undefined) ? (_local1._parent) : (obj));
_local1.changeHandler = chng;
};
FUIComponentClass.prototype.invalidate = function (methodName) {
var _local1 = this;
_local1.methodTable[methodName] = true;
_local1.onEnterFrame = _local1.cleanUI;
};
FUIComponentClass.prototype.cleanUI = function () {
var _local1 = this;
if (_local1.methodTable.setSize) {
_local1.setSize(_local1.width, _local1.height);
} else {
_local1.cleanUINotSize();
}
_local1.methodTable = new Object();
delete _local1.onEnterFrame;
};
FUIComponentClass.prototype.cleanUINotSize = function () {
var _local1 = this;
for (var _local2 in _local1.methodTable) {
_local1[_local2]();
}
};
FUIComponentClass.prototype.drawRect = function (x, y, w, h) {
var _local1 = this;
var _local2 = y;
var _local3 = x;
var inner = _local1.styleTable.focusRectInner.value;
var outer = _local1.styleTable.focusRectOuter.value;
if (inner == undefined) {
inner = 16777215 /* 0xFFFFFF */;
}
if (outer == undefined) {
outer = 0;
}
_local1.createEmptyMovieClip("focusRect", 1000);
_local1.focusRect.controller = _local1;
_local1.focusRect.lineStyle(1, outer);
_local1.focusRect.moveTo(_local3, _local2);
_local1.focusRect.lineTo(_local3 + w, _local2);
_local1.focusRect.lineTo(_local3 + w, _local2 + h);
_local1.focusRect.lineTo(_local3, _local2 + h);
_local1.focusRect.lineTo(_local3, _local2);
_local1.focusRect.lineStyle(1, inner);
_local1.focusRect.moveTo(_local3 + 1, _local2 + 1);
_local1.focusRect.lineTo((_local3 + w) - 1, _local2 + 1);
_local1.focusRect.lineTo((_local3 + w) - 1, (_local2 + h) - 1);
_local1.focusRect.lineTo(_local3 + 1, (_local2 + h) - 1);
_local1.focusRect.lineTo(_local3 + 1, _local2 + 1);
};
FUIComponentClass.prototype.pressFocus = function () {
var _local1 = this;
_local1.tabFocused = false;
_local1.focusRect.removeMovieClip();
Selection.setFocus(_local1);
};
FUIComponentClass.prototype.drawFocusRect = function () {
var _local1 = this;
_local1.drawRect(-2, -2, _local1.width + 4, _local1.height + 4);
};
FUIComponentClass.prototype.myOnSetFocus = function () {
var _local1 = this;
_local1.focused = true;
Key.addListener(_local1.keyListener);
if (_local1.tabFocused) {
_local1.drawFocusRect();
}
};
FUIComponentClass.prototype.myOnKillFocus = function () {
var _local1 = this;
_local1.tabFocused = true;
_local1.focused = false;
_local1.focusRect.removeMovieClip();
Key.removeListener(_local1.keyListener);
};
FUIComponentClass.prototype.executeCallBack = function () {
var _local1 = this;
_local1.handlerObj[_local1.changeHandler](_local1);
};
FUIComponentClass.prototype.updateStyleProperty = function (styleFormat, propName) {
this.setStyleProperty(propName, styleFormat[propName], styleFormat.isGlobal);
};
FUIComponentClass.prototype.setStyleProperty = function (propName, value, isGlobal) {
var _local1 = this;
var _local2 = propName;
if (value == "") {
} else {
var tmpValue = parseInt(value);
if (!isNaN(tmpValue)) {
value = tmpValue;
}
var global = ((arguments.length > 2) ? (isGlobal) : false);
if (_local1.styleTable[_local2] == undefined) {
_local1.styleTable[_local2] = new Object();
_local1.styleTable[_local2].useGlobal = true;
}
if (_local1.styleTable[_local2].useGlobal || (!global)) {
_local1.styleTable[_local2].value = value;
if (_local1.setCustomStyleProperty(_local2, value)) {
} else if (_local2 == "embedFonts") {
_local1.invalidate("setSize");
} else if (_local2.subString(0, 4) == "text") {
if (_local1.textStyle == undefined) {
_local1.textStyle = new TextFormat();
}
var textProp = _local2.subString(4, _local2.length);
_local1.textStyle[textProp] = value;
_local1.invalidate("setSize");
} else {
for (var j in _local1.styleTable[_local2].coloredMCs) {
var _local3 = new Color(_local1.styleTable[_local2].coloredMCs[j]);
if (_local1.styleTable[_local2].value == undefined) {
var myTObj = {ra:"100", rb:"0", ga:"100", gb:"0", ba:"100", bb:"0", aa:"100", ab:"0"};
_local3.setTransform(myTObj);
} else {
_local3.setRGB(value);
}
}
}
_local1.styleTable[_local2].useGlobal = global;
}
}
};
FUIComponentClass.prototype.registerSkinElement = function (skinMCRef, propName) {
var _local1 = this;
var _local2 = propName;
if (_local1.styleTable[_local2] == undefined) {
_local1.styleTable[_local2] = new Object();
_local1.styleTable[_local2].useGlobal = true;
}
if (_local1.styleTable[_local2].coloredMCs == undefined) {
_local1.styleTable[_local2].coloredMCs = new Object();
}
_local1.styleTable[_local2].coloredMCs[skinMCRef] = skinMCRef;
if (_local1.styleTable[_local2].value != undefined) {
var _local3 = new Color(skinMCRef);
_local3.setRGB(_local1.styleTable[_local2].value);
}
};
_global.FStyleFormat = function () {
var _local1 = arguments;
var _local2 = this;
_local2.nonStyles = {listeners:true, isGlobal:true, isAStyle:true, addListener:true, removeListener:true, nonStyles:true, applyChanges:true};
_local2.listeners = new Object();
_local2.isGlobal = false;
if (_local1.length > 0) {
for (var _local3 in _local1[0]) {
_local2[_local3] = _local1[0][_local3];
}
}
};
_global.FStyleFormat.prototype = new Object();
FStyleFormat.prototype.addListener = function () {
var _local1 = this;
var _local2 = 0;
while (_local2 < arguments.length) {
var _local3 = arguments[_local2];
_local1.listeners[arguments[_local2]] = _local3;
for (var i in _local1) {
if (_local1.isAStyle(i)) {
_local3.updateStyleProperty(_local1, i.toString());
}
}
_local2++;
}
};
FStyleFormat.prototype.removeListener = function (component) {
var _local1 = this;
var _local2 = component;
_local1.listeners[_local2] = undefined;
for (var prop in _local1) {
if (_local1.isAStyle(prop)) {
if (_local2.styleTable[prop].useGlobal == _local1.isGlobal) {
_local2.styleTable[prop].useGlobal = true;
var _local3 = (_local1.isGlobal ? undefined : (globalStyleFormat[prop]));
_local2.setStyleProperty(prop, _local3, true);
}
}
}
};
FStyleFormat.prototype.applyChanges = function () {
var _local1 = this;
var _local2 = arguments;
var count = 0;
for (var i in _local1.listeners) {
var _local3 = _local1.listeners[i];
if (_local2.length > 0) {
var j = 0;
while (j < _local2.length) {
if (_local1.isAStyle(_local2[j])) {
_local3.updateStyleProperty(_local1, _local2[j]);
}
j++;
}
} else {
for (var j in _local1) {
if (_local1.isAStyle(j)) {
_local3.updateStyleProperty(_local1, j.toString());
}
}
}
}
};
FStyleFormat.prototype.isAStyle = function (name) {
return((this.nonStyles[name] ? false : true));
};
#endinitclip
Symbol 46 MovieClip [FBoundingBoxSymbol] Frame 1
var component = _parent;
component.registerSkinElement(boundingBox, "background");
stop();
Symbol 46 MovieClip [FBoundingBoxSymbol] Frame 2
component.registerSkinElement(boundingBox2, "backgroundDisabled");
stop();
Symbol 49 MovieClip [FCheckBoxSymbol] Frame 1
#initclip 3
function FCheckBoxClass() {
this.init();
}
FCheckBoxClass.prototype = new FUIComponentClass();
Object.registerClass("FCheckBoxSymbol", FCheckBoxClass);
FCheckBoxClass.prototype.init = function () {
var _local1 = this;
super.setSize(_local1._width, _local1._height);
_local1.boundingBox_mc.unloadMovie();
_local1.attachMovie("fcb_hitArea", "fcb_hitArea_mc", 1);
_local1.attachMovie("fcb_states", "fcb_states_mc", 2);
_local1.attachMovie("FLabelSymbol", "fLabel_mc", 3);
super.init();
_local1.setChangeHandler(_local1.changeHandler);
_local1._xscale = 100;
_local1._yscale = 100;
_local1.setSize(_local1.width, _local1.height);
if (_local1.initialValue == undefined) {
_local1.setCheckState(false);
} else {
_local1.setCheckState(_local1.initialValue);
}
if (_local1.label != undefined) {
_local1.setLabel(_local1.label);
}
_local1.ROLE_SYSTEM_CHECKBUTTON = 44;
_local1.STATE_SYSTEM_CHECKED = 16;
_local1.EVENT_OBJECT_STATECHANGE = 32778;
_local1.EVENT_OBJECT_NAMECHANGE = 32780;
_local1._accImpl.master = _local1;
_local1._accImpl.stub = false;
_local1._accImpl.get_accRole = _local1.get_accRole;
_local1._accImpl.get_accName = _local1.get_accName;
_local1._accImpl.get_accState = _local1.get_accState;
_local1._accImpl.get_accDefaultAction = _local1.get_accDefaultAction;
_local1._accImpl.accDoDefaultAction = _local1.accDoDefaultAction;
};
FCheckBoxClass.prototype.setLabelPlacement = function (pos) {
var _local1 = this;
var _local3 = pos;
_local1.setLabel(_local1.getLabel());
_local1.txtFormat(_local3);
var halfLabelH = (_local1.fLabel_mc._height / 2);
var halfFrameH = (_local1.fcb_states_mc._height / 2);
var vertCenter = (halfFrameH - halfLabelH);
var checkWidth = _local1.fcb_states_mc._width;
var frame = _local1.fcb_states_mc;
var label = _local1.fLabel_mc;
var _local2 = 0;
if (frame._width > _local1.width) {
_local2 = 0;
} else {
_local2 = _local1.width - frame._width;
}
_local1.fLabel_mc.setSize(_local2);
if ((_local3 == "right") || (_local3 == undefined)) {
_local1.labelPlacement = "right";
_local1.fcb_states_mc._x = 0;
_local1.fLabel_mc._x = checkWidth;
_local1.txtFormat("left");
} else if (_local3 == "left") {
_local1.labelPlacement = "left";
_local1.fLabel_mc._x = 0;
_local1.fcb_states_mc._x = _local1.width - checkWidth;
_local1.txtFormat("right");
}
_local1.fLabel_mc._y = vertCenter;
_local1.fcb_hitArea_mc._y = vertCenter;
};
FCheckBoxClass.prototype.txtFormat = function (pos) {
var _local1 = this;
var _local2 = _local1.textStyle;
var _local3 = _local1.styleTable;
_local2.align = ((_local3.textAlign.value == undefined) ? ((_local2.align = pos)) : undefined);
_local2.leftMargin = ((_local3.textLeftMargin.value == undefined) ? ((_local2.leftMargin = 0)) : undefined);
_local2.rightMargin = ((_local3.textRightMargin.value == undefined) ? ((_local2.rightMargin = 0)) : undefined);
if (_local1.flabel_mc._height > _local1.height) {
super.setSize(_local1.width, _local1.flabel_mc._height);
} else {
super.setSize(_local1.width, _local1.height);
}
_local1.fLabel_mc.labelField.setTextFormat(_local1.textStyle);
_local1.setEnabled(_local1.enable);
};
FCheckBoxClass.prototype.setHitArea = function (w, h) {
var _local2 = this;
var _local1 = _local2.fcb_hitArea_mc;
_local2.hitArea = _local1;
if (_local2.fcb_states_mc._width > w) {
_local1._width = _local2.fcb_states_mc._width;
} else {
_local1._width = w;
}
_local1._visible = false;
if (arguments.length > 1) {
_local1._height = h;
}
};
FCheckBoxClass.prototype.setSize = function (w) {
var _local1 = this;
_local1.setLabel(_local1.getLabel());
_local1.setLabelPlacement(_local1.labelPlacement);
if (_local1.fcb_states_mc._height < _local1.flabel_mc.labelField._height) {
super.setSize(w, _local1.flabel_mc.labelField._height);
}
_local1.setHitArea(_local1.width, _local1.height);
_local1.setLabelPlacement(_local1.labelPlacement);
};
FCheckBoxClass.prototype.drawFocusRect = function () {
var _local1 = this;
_local1.drawRect(-2, -2, _local1._width + 6, _local1._height - 1);
};
FCheckBoxClass.prototype.onPress = function () {
var _local2 = this;
_local2.pressFocus();
_root.focusRect.removeMovieClip();
var _local1 = _local2.fcb_states_mc;
if (_local2.getValue()) {
_local1.gotoAndStop("checkedPress");
} else {
_local1.gotoAndStop("press");
}
};
FCheckBoxClass.prototype.onRelease = function () {
var _local1 = this;
_local1.fcb_states_mc.gotoAndStop("up");
_local1.setValue(!_local1.checked);
};
FCheckBoxClass.prototype.onReleaseOutside = function () {
var _local1 = this.fcb_states_mc;
if (this.getValue()) {
_local1.gotoAndStop("checkedEnabled");
} else {
_local1.gotoAndStop("up");
}
};
FCheckBoxClass.prototype.onDragOut = function () {
var _local1 = this.fcb_states_mc;
if (this.getValue()) {
_local1.gotoAndStop("checkedEnabled");
} else {
_local1.gotoAndStop("up");
}
};
FCheckBoxClass.prototype.onDragOver = function () {
var _local1 = this.fcb_states_mc;
if (this.getValue()) {
_local1.gotoAndStop("checkedPress");
} else {
_local1.gotoAndStop("press");
}
};
FCheckBoxClass.prototype.setValue = function (checkedValue) {
var _local1 = this;
var _local2 = checkedValue;
if (_local2 || (_local2 == undefined)) {
_local1.setCheckState(_local2);
} else if (_local2 == false) {
_local1.setCheckState(_local2);
}
_local1.executeCallBack();
if (Accessibility.isActive()) {
Accessibility.sendEvent(_local1, 0, _local1.EVENT_OBJECT_STATECHANGE, true);
}
};
FCheckBoxClass.prototype.setCheckState = function (checkedValue) {
var _local1 = this;
var _local3 = checkedValue;
var _local2 = _local1.fcb_states_mc;
if (_local1.enable) {
_local1.flabel_mc.setEnabled(true);
if (_local3 || (_local3 == undefined)) {
_local2.gotoAndStop("checkedEnabled");
_local1.enabled = true;
_local1.checked = true;
} else {
_local2.gotoAndStop("up");
_local1.enabled = true;
_local1.checked = false;
}
} else {
_local1.flabel_mc.setEnabled(false);
if (_local3 || (_local3 == undefined)) {
_local2.gotoAndStop("checkedDisabled");
_local1.enabled = false;
_local1.checked = true;
} else {
_local2.gotoAndStop("uncheckedDisabled");
_local1.enabled = false;
_local1.checked = false;
_local1.focusRect.removeMovieClip();
}
}
};
FCheckBoxClass.prototype.getValue = function () {
return(this.checked);
};
FCheckBoxClass.prototype.setEnabled = function (enable) {
var _local1 = this;
if ((enable == true) || (enable == undefined)) {
_local1.enable = true;
Super.setEnabled(true);
} else {
_local1.enable = false;
Super.setEnabled(false);
}
_local1.setCheckState(_local1.checked);
};
FCheckBoxClass.prototype.getEnabled = function () {
return(this.enable);
};
FCheckBoxClass.prototype.setLabel = function (label) {
var _local1 = this;
_local1.fLabel_mc.setLabel(label);
_local1.txtFormat();
if (Accessibility.isActive()) {
Accessibility.sendEvent(_local1, 0, _local1.EVENT_OBJECT_NAMECHANGE);
}
};
FCheckBoxClass.prototype.getLabel = function () {
return(this.fLabel_mc.labelField.text);
};
FCheckBoxClass.prototype.setTextColor = function (color) {
this.fLabel_mc.labelField.textColor = color;
};
FCheckBoxClass.prototype.myOnKeyDown = function () {
var _local1 = this;
if (((Key.getCode() == 32) && (_local1.pressOnce == undefined)) && (_local1.enabled == true)) {
_local1.setValue(!_local1.getValue());
_local1.pressOnce = true;
}
};
FCheckBoxClass.prototype.myOnKeyUp = function () {
if (Key.getCode() == 32) {
this.pressOnce = undefined;
}
};
FCheckBoxClass.prototype.get_accRole = function (childId) {
return(this.master.ROLE_SYSTEM_CHECKBUTTON);
};
FCheckBoxClass.prototype.get_accName = function (childId) {
return(this.master.getLabel());
};
FCheckBoxClass.prototype.get_accState = function (childId) {
if (this.master.getValue()) {
return(this.master.STATE_SYSTEM_CHECKED);
}
return(0);
};
FCheckBoxClass.prototype.get_accDefaultAction = function (childId) {
if (this.master.getValue()) {
return("UnCheck");
}
return("Check");
};
FCheckBoxClass.prototype.accDoDefaultAction = function (childId) {
this.master.setValue(!this.master.getValue());
};
#endinitclip
boundingBox_mc._visible = false;
deadPreview._visible = false;
Symbol 60 Button
on (press) {
getURL (_root.doubl_url, "_blank");
}
Symbol 78 Button
on (press) {
_root.playSound("any_btn");
if (_root.settings.data.showHelpNextTime) {
_root.wnd_instructions.initNextTime();
} else {
_parent._parent.play();
}
}
Symbol 80 Button
on (press) {
_root.playSound("any_btn");
_root.gotoAndStop(_root._currentFrame + 1);
}
Symbol 82 Button
on (rollOver) {
hnt = _root.hintt.create("this feature is available in offline version only");
}
on (rollOut, press, releaseOutside) {
hnt.hideIt();
}
Symbol 86 Button
on (press) {
_root.playSound("any_btn");
_root.wnd_instructions.init();
}
Symbol 88 Button
on (press) {
getURL (_root.moregames_url, "_blank");
}
Symbol 93 MovieClip Frame 1
stop();
Symbol 93 MovieClip Frame 7
_root.gotoAndStop("gameType");
Symbol 98 Button
on (press) {
getURL (_root.download_url, "_blank");
}
Symbol 101 Button
on (press) {
getURL (_root.buy_url, "_blank");
}
Symbol 104 Button
on (press) {
getURL (_root.doubl_url, "_blank");
}
Symbol 115 MovieClip Frame 1
stop();
Symbol 115 MovieClip Frame 2
stop();
Symbol 115 MovieClip Frame 3
stop();
Symbol 115 MovieClip Frame 4
stop();
Symbol 115 MovieClip Frame 5
stop();
Symbol 115 MovieClip Frame 6
stop();
Symbol 115 MovieClip Frame 7
stop();
Symbol 115 MovieClip Frame 8
stop();
Symbol 116 Button
on (press) {
_parent.chooze(0, -1);
}
Symbol 117 Button
on (press) {
_parent.chooze(1, -1);
}
Symbol 118 Button
on (press) {
_parent.chooze(-1, 3);
}
Symbol 119 Button
on (press) {
_parent.chooze(-1, 2);
}
Symbol 120 Button
on (press) {
_parent.chooze(-1, 1);
}
Symbol 121 Button
on (press) {
_parent.chooze(-1, 0);
}
Symbol 125 Button
on (press) {
ok();
}
Symbol 131 MovieClip Frame 1
stop();
Symbol 131 MovieClip Frame 2
inName = "";
Selection.setFocus("intext");
Symbol 132 MovieClip Frame 1
function init(blink) {
if (blink) {
play();
} else {
gotoAndStop (1);
}
}
Symbol 132 MovieClip Frame 20
gotoAndPlay (2);
Symbol 137 Button
on (press) {
clear();
}
Symbol 142 Button
on (press) {
enter();
}
Symbol 145 MovieClip Frame 1
function init(wins) {
var _local1 = _root;
_local1.playSound("any_btn");
if (wins > -2) {
konteiner = _local1.konteiner;
gameType = _local1.gameType;
}
chooze_score.cursor.gotoAndStop(((gameType * 4) + konteiner) + 1);
_local1._IGNOREUSER = true;
redefDefHiScores();
_local1.loadHiScores(gameType, konteiner);
_local1.pre.up._visible = false;
_visible = true;
if (wins > -1) {
n = _local1.addHiScores("", 3 - konteiner, _local1.points, gameType, konteiner);
fillScoreTable();
_local1.wnd_hiScores["s" add n].hiScores_string_clip.inText._visible = true;
_local1.wnd_hiScores["s" add n].hiScores_string_clip.name = "";
_local1.wnd_hiScores["s" add n].hiScores_string_clip.play();
_local1.wnd_hiScores["s" add n].hiScores_string_clip.inName = "enter your name";
butt1._visible = false;
butt2._visible = false;
chooze_score._visible = false;
butt3._visible = true;
} else {
fillScoreTable();
butt1._visible = true;
butt2._visible = true;
chooze_score._visible = true;
butt3._visible = false;
}
}
function ok() {
_root.playSound("any_btn");
_visible = false;
_root.pre.up._visible = true;
}
function clear() {
_root.playSound("any_btn");
_root.wnd_clearHiScoresYN.init();
}
function enter() {
var _local1 = _root;
_local1.playSound("any_btn");
_local1.hiScores[n].name = _local1.wnd_hiScores["s" add n].hiScores_string_clip.inName;
init(-1);
}
function itshiScore(score) {
if (_root.hiScores[9].score > 0) {
var _local1 = _root.hiScores[9].score;
} else {
var _local1 = 0;
}
return(score > _local1);
}
function redefDefHiScores() {
var _local3 = _root;
_local3.hiScores = new Array();
var _local1 = 0;
while (_local1 < 10) {
var _local2 = new Object();
_local2.name = defJiScMass[gameType][konteiner][_local1];
_local2.score = defJiScMassP[gameType][konteiner][_local1];
_local2.skill = 3;
_local3.hiScores[_local1] = _local2;
_local1++;
}
}
function fillScoreTable() {
var _local2 = _root;
var _local1 = 0;
while (_local1 < 10) {
_local2.wnd_hiScores["s" add _local1].hiScores_string_clip.num = _local1 + 1;
_local2.wnd_hiScores["s" add _local1].hiScores_string_clip.inText._visible = false;
_local2.wnd_hiScores["s" add _local1].line._visible = false;
if (typeof(_local2.hiScores[_local1]) == "undefined") {
_local2.wnd_hiScores["s" add _local1].hiScores_string_clip.name = "unknown";
_local2.wnd_hiScores["s" add _local1].hiScores_string_clip.skill = "------";
_local2.wnd_hiScores["s" add _local1].hiScores_string_clip.score = "---";
} else {
if (_local2.hiScores[_local1].name == "") {
_local2.wnd_hiScores["s" add _local1].hiScores_string_clip.name = "unknown";
} else {
_local2.wnd_hiScores["s" add _local1].hiScores_string_clip.name = _local2.hiScores[_local1].name;
}
_local2.wnd_hiScores["s" add _local1].hiScores_string_clip.skill = skillMass[_local2.hiScores[_local1].skill];
_local2.wnd_hiScores["s" add _local1].hiScores_string_clip.score = _local2.devRazr(_local2.hiScores[_local1].score);
}
_local2.wnd_hiScores["s" add _local1].init(_local1 == wins);
_local1++;
}
}
function chooze(gmt, kont) {
if (gmt < 0) {
konteiner = kont;
}
if (kont < 0) {
gameType = gmt;
}
chooze_score.cursor.gotoAndStop(((gameType * 4) + konteiner) + 1);
_root.loadHiScores(gameType, konteiner);
fillScoreTable();
}
stop();
_visible = false;
skillMass = ["easy", "medium", "hard", "classic"];
defJiScMass = [[["Adrian Carmack", "Jonh Carmack", "Kevin Cloud", "Todd Hollenshead", "Tim Willits", "Gabe Newell", "Victor Antonov", "Victor Vostrukhin", "Dmitry Grytsovets", "Nikita Berezin"], ["markus kehren", "Oliver Plohnke", "Boris Schreiner", "Wayne Morris", "Murphy Shearer", "Frank Elsenbach", "Clarence Jay", "Ralf Peifer", "Rodolfo Eugenio", "Gustavo Dur\u040En"], ["Dale Hathaway", "Hans Nurnberger", "Todd Angler", "Stephan Wendt", "Ralf Eppinger", "Vladimir Zakharov", "Benjamin Henriksen", "Russell Patton", "Alex Revin", "Emile Naber"], ["Nigel Sleigh", "Cameron Whitlock", "Sashko Ukradyga", "Johan Gronloh", "Horst Josten", "John Bales", "Valera Wolkova", "larry schryver", "Neil Raskatovich", "Jesus Celaa"]], [["Serg Chekir", "William LaGrange", "Rimas Campe", "Thorsten Schelian", "Markus Ingelmann", "Sergey Novinsky", "Eugene Gusev", "Yaroslav Snizhko", "Pietro Rocca", "Lisan Al-Gaib"], ["Mel Hadden", "Matthias Mroch", "Svetlana Kopilova", "Manol Georgiev", "Mark Paikin", "Mario Boley", "Panza Anggel", "Wolfgang Klein", "Mikle Stepanenko", "Nick Osipyuk"], ["Alejandro Olivera", "Pol Schennikov", "Derek Grainger", "Dirk Mansfeld", "Christian G. Becker", "Fran Villarreal", "Jeremy Lucas", "Lorenzo Pertici", "Lorenzo Pertici", "Paul Blau"], ["Leo Glaz", "Rancelor Allard", "Pablo del Rio", "Jens Koopmann", "Benjamin Henriksen", "Daniel Reckfort", "Joakim Englund", "Markus Rektor", "John Agre", "Falko Ramann"]]];
defJiScMassP = [[[28006, 26946, 25691, 23991, 23664, 18428, 12938, 7648, 4675, 3948], [34399, 29015, 24101, 19377, 17577, 15842, 13835, 9395, 8995, 4283], [19500, 16357, 11191, 10974, 10094, 9437, 8445, 5458, 4670, 4235], [30181, 26178, 22776, 20407, 17452, 16346, 12166, 6508, 6336, 1254]], [[29265, 25591, 25434, 23130, 17847, 14892, 12923, 8642, 4054, 403], [25933, 20528, 18573, 17704, 14676, 14161, 9495, 7945, 4020, 2236], [28496, 28488, 25391, 22087, 18489, 13986, 11456, 10700, 6488, 3538], [25107, 21735, 16841, 15310, 13838, 10693, 8575, 4895, 3474, 2865]]];
if (typeof(_root.gameType) == "undefined") {
_root.gameType = 0;
}
Instance of Symbol 144 MovieClip in Symbol 145 MovieClip Frame 1
onClipEvent (enterFrame) {
if ((Key.isDown(13) && (_parent.butt3._visible)) && (_root.wnd_hiScores._visible)) {
_parent.enter();
}
}
Symbol 152 Button
on (press) {
no();
}
Symbol 153 Button
on (press) {
yes();
}
Symbol 154 MovieClip Frame 1
function init() {
_visible = true;
_root.wnd_hiscores._visible = false;
_root.playSound("any_btn");
}
function yes() {
var _local1 = _root;
_local1.playSound("any_btn");
_visible = false;
_local1.wnd_hiscores._visible = true;
_local1.wnd_hiscores.redefDefHiScores();
_local1.saveHiScores(_local1.wnd_hiscores.gameType, _local1.wnd_hiscores.konteiner);
_local1.wnd_hiscores.init(-2);
}
function no() {
_root.playSound("any_btn");
_visible = false;
_root.wnd_hiscores._visible = true;
}
stop();
_visible = false;
Symbol 163 Button
on (press) {
next();
}
Symbol 165 Button
on (press) {
prev();
}
Symbol 167 Button
on (press) {
back();
}
Symbol 169 Button
on (press) {
endGame();
}
Symbol 182 MovieClip Frame 1
stop();
Symbol 182 MovieClip Frame 26
gotoAndPlay (10);
Symbol 184 Button
on (press) {
select();
}
Symbol 185 MovieClip Frame 1
function init() {
}
function select() {
var _local1 = _parent;
_root.playSound("any_btn");
_root.levelnow = n;
_local1.active = n;
_local1.showPage(_local1.curPage);
_local1.checkBtnVisibility();
_local1.ok();
}
stop();
_visible = false;
Symbol 187 MovieClip Frame 1
function init(param) {
var _local1 = _root;
_visible = true;
_local1.batttt.removeMovieClip();
_local1._IGNOREUSER = true;
btn_back._visible = _local1._currentFrame == 5;
btn_endGame._visible = _local1._currentFrame != 5;
if (param != 1) {
inGame = 0;
_local1.clearPassedInThisSession();
_local1.loadLevelBeg();
maxPage = Math.floor(levelCount / 6);
active = -1;
active = _local1.levelNow;
} else {
inGame = 1;
var _local2 = Math.floor(_local1.levelNow / 6);
if (findNotPassedLevelStartFromPage(_local2) != -1) {
trace("p = " add _local2);
active = findNotPassedLevelStartFromPage(_local2);
trace("1 - " add active);
} else if (findNotPassedLevelStartFrom0() != -1) {
active = findNotPassedLevelStartFrom0();
trace("2 - " add active);
} else {
active = _local1.levelNow++;
trace("3 - " add active);
}
}
curPage = Math.floor(active / 6);
trace("curPage = " add curPage);
showPage(curPage);
checkBtnVisibility();
}
function ok() {
var _local1 = _root;
_visible = false;
if (inGame == 0) {
_local1.saveLevelBeg();
_local1.play();
if (param != 1) {
_local1.choosed = _local1.levelNow;
} else {
_local1.choosed = -1;
}
} else {
_local1.startLevelN(_local1.levelNow);
}
_local1.playSound("any_btn");
}
function next() {
curPage++;
showPage(curPage);
checkBtnVisibility();
}
function prev() {
curPage--;
showPage(curPage);
checkBtnVisibility();
}
function showPage(page) {
var _local3 = _root;
var i = 0;
while (i < 6) {
var _local1 = this["clip" add i];
var _local2 = (page * 6) + i;
if (_local2 < levelCount) {
_local1._visible = true;
_local1.images.gotoAndStop(_local2 + 1);
if (_local2 == active) {
_local1.border._visible = true;
} else {
_local1.border._visible = false;
}
_local1.n = _local2;
if ((typeof(_local3.settings.data.levelsPassed[_local2]) != "undefined") && (_local3.settings.data.levelsPassed[_local2] != 0)) {
_local1.passed._visible = true;
_local1.passed.n = _local3.settings.data.levelsPassed[_local2];
} else {
_local3.settings.data.levelsPassed[_local2] = 0;
_local1.passed._visible = false;
}
if (_local3.passedITS[_local2] > 0) {
_local1.passedITS._visible = true;
_local1.passedITS.n = _local3.passedITS[_local2];
} else {
_local1.passedITS._visible = false;
}
} else {
_local1._visible = false;
}
i++;
}
}
function deselectAll() {
}
function checkBtnVisibility() {
btn_prev._visible = true;
btn_next._visible = true;
btn_prev._visible = curPage > 0;
btn_next._visible = curPage < (maxPage - 1);
btn_ok._visible = (active >= 0) && (active < levelCount);
}
function back() {
var _local1 = _root;
_visible = false;
_local1.saveLevelBeg();
_local1.gotoAndStop("gameType");
_local1.playSound("any_btn");
}
function endGame() {
var _local1 = _root;
_local1.btn_little_copy.removeMovieClip();
_visible = false;
_local1.saveLevelBeg();
_local1.wnd_winGame.init();
_local1.playSound("any_btn");
}
function getPageNum() {
}
function findNotPassedLevelStartFromPage(n) {
var _local2 = _root;
trace(("findNotPassedLevelStartFromPage(" add n) add ")");
var _local1 = curPage * 6;
while (_local1 < _local2.levelCount) {
trace(_local1);
trace(_local2.getPassedInThisSession(_local1));
if (_local2.getPassedInThisSession(_local1) == 0) {
return(_local1);
}
_local1++;
}
return(-1);
}
function findNotPassedLevelStartFrom0() {
var _local2 = _root;
trace("findNotPassedLevelStartFrom0()");
var _local1 = 0;
while (_local1 < _local2.levelCount) {
trace(_local1);
trace(_local2.getPassedInThisSession(_local1));
if (_local2.getPassedInThisSession(_local1) == 0) {
return(_local1);
}
_local1++;
}
return(-1);
}
stop();
_visible = false;
levelCount = 3;
_root.levelCount = 3;
Symbol 192 Button
on (press) {
cont();
}
Symbol 196 Button
on (press) {
endGame();
}
Symbol 201 MovieClip Frame 1
function init() {
var _local1 = _root;
_local1.playSound("any_btn");
_local1._IGNOREUSER = true;
_local1.levelName = "";
_local1.saveLevelPassed(_local1.levelNow);
_local1.passedInThisSession(_local1.levelNow);
if (checkForWinGame0()) {
return(false);
}
_visible = true;
levelScore = _local1.devRazr(_local1.levelScore);
totalScore = _local1.devRazr(_local1.points);
return(undefined);
}
function cont() {
var _local1 = _root;
_local1.playSound("any_btn");
if (_local1.gameType == 0) {
if (_local1.choosed == 0) {
_local1.levelNow++;
} else if (_local1.levelNow == _local1.choosed) {
_local1.levelNow = 0;
} else {
_local1.levelNow++;
if (_local1.levelNow == _local1.choosed) {
_local1.levelNow++;
}
}
if (_local1.levelNow > (_local1.levels.length - 1)) {
_local1.levelNow = 0;
}
_local1.startLevelN(_local1.levelNow);
} else {
_local1.wnd_choose_level.init(1);
}
_visible = false;
}
function endGame() {
var _local1 = _root;
_local1.playSound("any_btn");
_local1.btn_little_copy.removeMovieClip();
_local1.wnd_winGame.init();
_visible = false;
}
function checkForWinGame0() {
var _local1 = _root;
_local1.playSound("any_btn");
var _local2 = _local1.levels.length - 1;
if (_local1.gameType == 0) {
if (_local1.choosed == _local2) {
if (_local1.levelNow == (_local2 - 1)) {
_local1.wnd_winGame.init();
return(true);
}
} else if (_local1.levelNow == _local2) {
_local1.wnd_winGame.init();
return(true);
}
return(false);
}
return(undefined);
}
stop();
_visible = false;
Symbol 206 Button
on (press) {
cont();
}
Symbol 210 MovieClip Frame 1
function init() {
var _local1 = _root;
_local1.playSound("any_btn");
_local1._IGNOREUSER = true;
totalScore = _local1.points;
_local1.stopBlink();
_local1.playSound("snd_gameover");
_local1.stopMusic();
_local1.ST_GAMEOVER = true;
_local1._IGNOREUSER = true;
_local1.killProcess(_local1.PS_TIMER);
_local1.levelnow = 0;
_local1.removeField();
_local1.batttt.removeMovieClip();
_local1.gotoAndStop("main");
_local1.pre.up._visible = false;
_visible = true;
}
function cont() {
_root.playSound("any_btn");
_visible = false;
_root.pre.up._visible = true;
}
stop();
_visible = false;
Symbol 221 Button
on (press) {
this.startDrag(false, _x, 0, _x, _parent._height - _height);
}
on (release) {
stopDrag();
}
Symbol 224 Button
on (press) {
scroll._y = scroll._y + 20;
if (scroll._y > (scrollline._height - scroll._height)) {
scroll._y = scrollline._height - scroll._height;
}
}
Symbol 226 Button
on (press) {
scroll._y = scroll._y - 20;
if (scroll._y < 0) {
scroll._y = 0;
}
}
Instance of Symbol 216 MovieClip "text" in Symbol 228 MovieClip Frame 1
onClipEvent (enterFrame) {
perc = (100 / (_parent.mask._height - _parent.scrollBar.scroll._height)) * _parent.scrollBar.scroll._y;
scrl.scroll = (scrl.maxscroll / 100) * perc;
}
Symbol 231 Button
on (press) {
back();
}
Symbol 233 Button
on (press) {
playy();
}
Symbol 238 Button
on (press) {
_parent.checkButt();
}
Symbol 239 MovieClip Frame 1
stop();
Symbol 239 MovieClip Frame 2
stop();
Symbol 241 MovieClip Frame 1
function init() {
_root.playSound("any_btn");
_visible = true;
_root.pre.up.buttons._visible = false;
btn_back._visible = true;
btn_play._visible = false;
clip_showNextTime._visible = false;
}
function back() {
_root.playSound("any_btn");
_visible = false;
_root.pre.up.buttons._visible = true;
}
function initNextTime() {
_root.playSound("any_btn");
_visible = true;
_root.pre.up.buttons._visible = false;
btn_back._visible = false;
btn_play._visible = true;
clip_showNextTime._visible = true;
}
function playy() {
var _local1 = _root;
_local1.playSound("any_btn");
_visible = false;
_local1.pre.up.buttons._visible = true;
_local1.pre.play();
}
function checkButt() {
var _local1 = _root;
_local1.playSound("any_btn");
if (clip_showNextTime._currentFrame == 1) {
clip_showNextTime.gotoAndPlay(2);
_local1.settings.data.showHelpNextTime = false;
} else {
clip_showNextTime.gotoAndPlay(1);
_local1.settings.data.showHelpNextTime = true;
}
}
stop();
_visible = false;
Symbol 246 Button
on (press) {
_root.playSound("any_btn");
_root.pressB();
}
on (rollOver) {
hnt = _root.hintt.create("background on/off ");
}
on (rollOut, press, releaseOutside) {
hnt.hideIt();
}
Symbol 248 MovieClip Frame 1
stop();
Symbol 248 MovieClip Frame 2
stop();
Symbol 250 Button
on (press) {
_root.playSound("any_btn");
wnd_quitYN.init();
}
on (rollOver) {
hnt = _root.hintt.create("exit game ");
}
on (rollOut, press, releaseOutside) {
hnt.hideIt();
}
Symbol 258 Button
on (rollOver) {
hnt = _root.hintt.create("this feature is available in offline version only");
}
on (rollOut, press, releaseOutside) {
hnt.hideIt();
}
Symbol 259 Button
on (rollOver) {
play();
}
Symbol 260 Button
on (press) {
ok(1, 1);
play();
if (!_root.newback._visible) {
_root.pressB();
}
}
on (rollOver) {
hnt = _root.hintt.create("erotic");
}
on (rollOut, press, releaseOutside) {
hnt.hideIt();
}
Symbol 261 Button
on (press) {
ok(2, 2);
play();
if (!_root.newback._visible) {
_root.pressB();
}
}
on (rollOver) {
hnt = _root.hintt.create("kids ");
}
on (rollOut, press, releaseOutside) {
hnt.hideIt();
}
Symbol 262 Button
on (press) {
ok(3, 3);
play();
if (!_root.newback._visible) {
_root.pressB();
}
}
on (rollOver) {
hnt = _root.hintt.create("flash ");
}
on (rollOut, press, releaseOutside) {
hnt.hideIt();
}
Symbol 263 Button
on (press) {
ok(4, 4);
play();
if (!_root.newback._visible) {
_root.pressB();
}
}
on (rollOver) {
hnt = _root.hintt.create("classic");
}
on (rollOut, press, releaseOutside) {
hnt.hideIt();
}
Symbol 264 MovieClip Frame 1
function ok(n, nend) {
var _local1 = _root;
_local1.layOutBack = n;
_local1.newBack.gotoAndStop(_local1.layOutBack);
_local1.newBack.gotoAndStop(_local1.layOutBack);
_local1.Back1.gotoAndStop(_local1.layOutBack);
_local1.pointsColorTransform = new Object();
_local1.podlColorTransform = new Object();
if (_local1.layOutBack == 1) {
_local1.pointsColorTransform.ra = 100;
_local1.pointsColorTransform.ga = 100;
_local1.pointsColorTransform.ba = 40;
_local1.pointsColorTransform.aa = 100;
_local1.podlColorTransform.ra = 0;
_local1.podlColorTransform.ga = 50;
_local1.podlColorTransform.ba = 85;
_local1.podlColorTransform.aa = 100;
} else if (_local1.layOutBack == 2) {
_local1.pointsColorTransform.ra = 75;
_local1.pointsColorTransform.ga = 75;
_local1.pointsColorTransform.ba = 0;
_local1.pointsColorTransform.aa = 100;
_local1.podlColorTransform.ra = 50;
_local1.podlColorTransform.ga = 50;
_local1.podlColorTransform.ba = 0;
_local1.podlColorTransform.aa = 100;
} else if (_local1.layOutBack == 3) {
_local1.pointsColorTransform.ra = 100;
_local1.pointsColorTransform.ga = 100;
_local1.pointsColorTransform.ba = 40;
_local1.pointsColorTransform.aa = 100;
_local1.podlColorTransform.ra = 12;
_local1.podlColorTransform.ga = 50;
_local1.podlColorTransform.ba = 0;
_local1.podlColorTransform.aa = 100;
} else if (_local1.layOutBack == 4) {
_local1.pointsColorTransform.ra = 61;
_local1.pointsColorTransform.ga = 0;
_local1.pointsColorTransform.ba = 0;
_local1.pointsColorTransform.aa = 100;
_local1.podlColorTransform.ra = 61;
_local1.podlColorTransform.ga = 0;
_local1.podlColorTransform.ba = 0;
_local1.podlColorTransform.aa = 100;
}
_local1.lvlName.Color = new Color(_local1.lvlName);
_local1.lvlName.color.setTransform(_local1.pointsColorTransform);
_local1.btns_podl.Color = new Color(_local1.btns_podl);
_local1.btns_podl.color.setTransform(_local1.podlColorTransform);
if (_local1.konteiner == 0) {
_local1.clip_hint2.gotoAndStop(2);
} else {
_local1.clip_hint2.gotoAndStop(3);
}
_local1.clip_hint2.gra.gotoAndStop(_local1.layOutBack);
_local1.clip_btn_undo._visible = _local1.konteiner > 0;
_local1.clip_btn_undo.gotoAndStop(2);
_local1.clip_btn_undo.gra.gotoAndStop(_local1.layOutBack);
_local1.kont_gr.gotoAndStop((_local1.konteiner + ((_local1.layOutBack - 1) * 4)) + 1);
_local1.check4pointAbility();
_local1.layOutBack = nend;
}
stop();
if (this._name == "btn_little_clip") {
this.duplicateMovieClip("btn_little", 19000000);
this._visible = false;
_root.btn_little._visible = false;
}
Symbol 264 MovieClip Frame 4
stop();
Symbol 264 MovieClip Frame 9
gotoAndStop (1);
Symbol 266 Button
on (rollOver) {
hnt = _root.hintt.create("this feature is available in offline version only");
}
on (rollOut, press, releaseOutside) {
hnt.hideIt();
}
Symbol 269 MovieClip Frame 1
stop();
Symbol 269 MovieClip Frame 2
stop();
Symbol 272 Button
on (rollOver) {
hnt = _root.hintt.create("this feature is available in offline version only");
}
on (rollOut, press, releaseOutside) {
hnt.hideIt();
}
Symbol 274 MovieClip Frame 1
stop();
Symbol 274 MovieClip Frame 2
stop();
Symbol 281 Button
on (release) {
if (typeof(_root.soundon) == "undefined") {
soundon = true;
}
_root.soundon = !_root.soundon;
if (_root.soundon) {
gotoAndStop (1);
} else {
gotoAndStop (2);
}
_root.playSound("any_btn");
}
on (rollOver) {
hnt = _root.hintt.create("sound on/off ");
}
on (rollOut, press, releaseOutside) {
hnt.hideIt();
}
Symbol 282 MovieClip Frame 1
stop();
Symbol 282 MovieClip Frame 2
stop();
Symbol 288 MovieClip Frame 1
function create(t, t1, t2) {
var _local1 = _root;
getDepth();
this.duplicateMovieClip("hint_" add d, d);
var _local2 = 1;
_local1["hint_" add d].hintIn.txt = t;
if (t1.length > 0) {
_local1["hint_" add d].hintIn.txt1 = t1;
_local2++;
if (t2.length > 0) {
_local1["hint_" add d].hintIn.txt2 = t2;
_local2++;
} else {
_local1["hint_" add d].hintIn.txt2 = "";
}
} else {
_local1["hint_" add d].hintIn.txt1 = "";
_local1["hint_" add d].hintIn.txt2 = "";
}
_local1["hint_" add d]._x = _local1._xmouse;
_local1["hint_" add d]._y = _local1._ymouse;
var _local3 = 6.75 * Math.max(Math.max(t.length, t1.length), t2.length);
var h = (19 * _local2);
if (_local1["hint_" add d]._x > ((800 - _local3) - 23)) {
_local1["hint_" add d]._x = (800 - _local3) - 23;
_local1["hint_" add d]._y = _local1["hint_" add d]._y + 20;
}
_local1["hint_" add d].gotoAndPlay(2);
_local1["hint_" add d].hintIn.hint_back._width = _local3;
_local1["hint_" add d].hintIn.hint_back._height = h;
return(_local1["hint_" add d]);
}
function getDepth() {
if (d > 1300100) {
d = 1300000 /* 0x13D620 */;
} else {
d++;
}
}
function hideIt() {
this.play();
hideFlag = true;
this._visible = false;
}
d = 1300100 /* 0x13D684 */;
if (this._name == "hint") {
_visible = false;
stop();
} else if (_root._currentframe != 2) {
}
Symbol 288 MovieClip Frame 7
stop();
if (hideFlag) {
play();
}
Symbol 288 MovieClip Frame 12
this.removeMovieClip();
Instance of Symbol 292 MovieClip in Symbol 294 MovieClip Frame 1
onClipEvent (enterFrame) {
if (typeof(frames) == "undefined") {
frames = 0;
old = new Date();
} else {
now = new Date();
if ((now.getTime() - old.getTime()) > 1000) {
_parent.fps = "fps: " add frames;
frames = 0;
old = new Date();
} else {
frames++;
}
}
}
Symbol 297 Button
on (press) {
if (typeof(_root.cheat) == "undefined") {
_root.cheat = false;
}
_root.cheat = !_root.cheat;
}
Symbol 303 Button
on (release) {
_root.playSound("any_btn");
_root.gotoAndStop(_root._currentFrame + 1);
}
Symbol 304 Button
on (press) {
_root.playSound("any_btn");
_root.gotoAndStop("gameType");
}
Symbol 310 Button
on (release) {
_root.gotoAndStop(_root._currentFrame + 1);
}
Symbol 318 Button
on (rollOver) {
hnt = _root.hintt.create("this feature is available in offline version only");
}
on (rollOut, press, releaseOutside) {
hnt.hideIt();
}
on (rollOver) {
_parent._parent.ruka.fishka.gotoAndStop(2);
}
on (rollOut, press, releaseOutside) {
_parent._parent.ruka.fishka.gotoAndStop(1);
}
Symbol 319 Button
on (rollOver) {
hnt = _root.hintt.create("this feature is available in offline version only");
}
on (rollOut, press, releaseOutside) {
hnt.hideIt();
}
on (rollOver) {
_parent._parent.ruka.fishka.gotoAndStop(3);
}
on (rollOut, press, releaseOutside) {
_parent._parent.ruka.fishka.gotoAndStop(1);
}
Symbol 320 Button
on (rollOver) {
hnt = _root.hintt.create("this feature is available in offline version only");
}
on (rollOut, press, releaseOutside) {
hnt.hideIt();
}
on (rollOver) {
_parent._parent.ruka.fishka.gotoAndStop(4);
}
on (rollOut, press, releaseOutside) {
_parent._parent.ruka.fishka.gotoAndStop(1);
}
Symbol 328 MovieClip Frame 1
if (_root.layOut == 4) {
wnd.r._y = -25;
_parent.ruka.fishka.gotoAndStop(1);
}
if (_root.layOut == 3) {
wnd.r._y = 1;
_parent.ruka.fishka.gotoAndStop(2);
}
if (_root.layOut == 2) {
wnd.r._y = 28;
_parent.ruka.fishka.gotoAndStop(3);
}
if (_root.layOut == 1) {
wnd.r._y = 54;
_parent.ruka.fishka.gotoAndStop(4);
}
Symbol 328 MovieClip Frame 10
stop();
Symbol 333 MovieClip Frame 1
stop();
Symbol 333 MovieClip Frame 2
stop();
Symbol 333 MovieClip Frame 3
stop();
Symbol 333 MovieClip Frame 4
stop();
Symbol 342 MovieClip Frame 1
stop();
Symbol 342 MovieClip Frame 2
stop();
Symbol 342 MovieClip Frame 3
stop();
Symbol 342 MovieClip Frame 4
stop();
Symbol 350 Button
on (rollOver) {
hnt = _root.hintt.create("this feature is available in offline version only");
}
on (rollOut, press, releaseOutside) {
hnt.hideIt();
}
on (rollOver) {
_parent._parent.fon_ruki.gotoAndStop(3);
}
on (rollOut, press, releaseOutside) {
_parent._parent.fon_ruki.gotoAndStop(4);
}
Symbol 351 Button
on (rollOver) {
hnt = _root.hintt.create("this feature is available in offline version only");
}
on (rollOut, press, releaseOutside) {
hnt.hideIt();
}
on (rollOver) {
_parent._parent.fon_ruki.gotoAndStop(2);
}
on (rollOut, press, releaseOutside) {
_parent._parent.fon_ruki.gotoAndStop(4);
}
Symbol 352 Button
on (rollOver) {
hnt = _root.hintt.create("this feature is available in offline version only");
}
on (rollOut, press, releaseOutside) {
hnt.hideIt();
}
on (rollOver) {
_parent._parent.fon_ruki.gotoAndStop(1);
}
on (rollOut, press, releaseOutside) {
_parent._parent.fon_ruki.gotoAndStop(4);
}
Symbol 354 MovieClip Frame 1
if (_root.layOutBack == 4) {
wnd.r._y = -25;
}
if (_root.layOutBack == 3) {
wnd.r._y = 1;
}
if (_root.layOutBack == 2) {
wnd.r._y = 28;
}
if (_root.layOutBack == 1) {
wnd.r._y = 54;
}
Symbol 354 MovieClip Frame 10
stop();
Symbol 359 Button
on (press) {
_root.playSound("any_btn");
r._y = -25;
_root.konteiner = 3;
}
on (rollOver) {
hnt = _root.hintt.create("3 containers");
}
on (rollOut, press, releaseOutside) {
hnt.hideIt();
}
Symbol 360 Button
on (press) {
_root.playSound("any_btn");
r._y = 1;
_root.konteiner = 2;
}
on (rollOver) {
hnt = _root.hintt.create("2 containers");
}
on (rollOut, press, releaseOutside) {
hnt.hideIt();
}
Symbol 361 Button
on (press) {
_root.playSound("any_btn");
r._y = 28;
_root.konteiner = 1;
}
on (rollOver) {
hnt = _root.hintt.create("1 container");
}
on (rollOut, press, releaseOutside) {
hnt.hideIt();
}
Symbol 362 Button
on (press) {
_root.playSound("any_btn");
r._y = 54;
_root.konteiner = 0;
}
on (rollOver) {
hnt = _root.hintt.create("no containers");
}
on (rollOut, press, releaseOutside) {
hnt.hideIt();
}
Symbol 364 MovieClip Frame 1
if (_root.konteiner == 3) {
wnd.r._y = -25;
}
if (_root.konteiner == 2) {
wnd.r._y = 1;
}
if (_root.konteiner == 1) {
wnd.r._y = 28;
}
if (_root.konteiner == 0) {
wnd.r._y = 54;
}
Symbol 364 MovieClip Frame 10
stop();
Symbol 373 Button
on (press) {
_root.playSound("any_btn");
_root.saveSettings();
_parent.play();
}
Symbol 374 MovieClip Frame 12
stop();
Symbol 375 Button
on (release) {
_root.gotoAndPlay(_root._framesLoaded - 2);
}
Symbol 376 MovieClip Frame 7
fon_ruki.gotoAndStop(_root.layOutBack);
Symbol 376 MovieClip Frame 14
stop();
Symbol 376 MovieClip Frame 22
_root.gotoAndStop(_root._currentframe - 1);
Symbol 379 Button
on (press) {
_root.gotoAndStop("main");
}
Symbol 402 Button
on (press) {
_root.playSound("any_btn");
motion = 2;
play();
}
Symbol 403 Button
on (rollOver) {
hnt = _root.hintt.create("this feature is available in offline version only");
}
on (rollOut, press, releaseOutside) {
hnt.hideIt();
}
Symbol 404 Button
on (press) {
_root.playSound("any_btn");
play();
_root.gameType = 0;
motion = 1;
}
Symbol 407 MovieClip Frame 10
stop();
Symbol 407 MovieClip Frame 20
stop();
if (motion == 1) {
_root.play();
} else {
_root.playSound("any_btn");
_root.gotoAndStop("main");
}
Symbol 413 Button
on (press) {
getURL (_root.moregames_url, "_blank");
}
Symbol 460 Button
on (press) {
_root.stopBlink();
if (_root.ST_PAUSE) {
_root.hidePause();
} else if (!_root._IGNOREUSER) {
_root.showPause();
}
}
Symbol 462 Button
on (press) {
_root.stopBlink();
if (_root._IGNOREUSER) {
return(undefined);
}
if (_root.levelScore >= (-_root.ptsreshuffle)) {
_root.reshuffle();
} else {
_root.playSound("snd_error");
}
_root.check4pointAbility();
if (_root.konteiner > 0) {
_root.checkForNoMoves();
} else {
_root.checkForNoMovesClassic();
}
}
on (rollOver) {
if (_root.levelScore < (-_root.ptsreshuffle)) {
s = "Not enough scores!";
} else {
s = "";
}
hnt = _root.hintt.create("Reshuffle the game field", ("Costs: " add (-_root.ptsreshuffle)) add " scores", s);
}
on (rollOut, press, releaseOutside) {
hnt.hideIt();
}
Symbol 464 Button
on (press) {
_root.stopBlink();
if (_root._IGNOREUSER) {
return(false);
}
if (_root.levelScore >= (-_root.ptshint)) {
_root.hint();
_root.playSound("snd_hint");
} else {
_root.playSound("snd_error");
}
_root.check4pointAbility();
}
on (rollOver) {
if (_root.levelScore < (-_root.ptshint)) {
s = "Not enough scores!";
} else {
s = "";
}
hnt = _root.hintt.create("Show tiles couple on the field", ("Costs: " add (-_root.ptshint)) add " scores", s);
}
on (rollOut, press, releaseOutside) {
hnt.hideIt();
}
Symbol 471 Button
on (press) {
_root.stopBlink();
if (_root._IGNOREUSER) {
return(false);
}
if ((_root.selected.length == 1) && (_root.levelScore >= (-_root.ptshint2))) {
_root.clip_hint2.gotoAndStop(2);
_root.hint2();
_root.playSound("snd_hint");
} else {
_root.playSound("snd_error");
}
_root.check4pointAbility();
}
on (rollOver) {
if (_root.levelScore < (-_root.ptshint2)) {
s = "Not enough scores!";
} else if ((_root.selected.length < 1) && (_root.levelScore >= (-_root.ptshint2))) {
s = "Please select a tile";
} else {
s = "";
}
hnt = _root.hintt.create("Show identical tiles for the current tile", ("Costs: " add (-_root.ptshint2)) add " scores", s);
}
on (rollOut, press, releaseOutside) {
hnt.hideIt();
}
Symbol 472 MovieClip Frame 1
if (_root.newBack._visible) {
gra.gotoAndStop(_root.layOutBack);
} else {
gra.gotoAndStop(1);
}
stop();
Symbol 472 MovieClip Frame 2
if (_root.newBack._visible) {
gra.gotoAndStop(_root.layOutBack);
} else {
gra.gotoAndStop(1);
}
stop();
Symbol 472 MovieClip Frame 3
stop();
Symbol 478 Button
on (press) {
_root.checks = 0;
_root.stopBlink();
if (_root._IGNOREUSER) {
return(false);
}
if ((_root.box.length == _root.konteiner) && (_root.levelScore >= (-_root.ptsundo))) {
clip = _root.box[_root.box.length - 1];
clip._x = _root.lastBlockX;
clip._y = _root.lastBlockY;
clip.inBox = false;
_root.lastStack.push_2(_root.box.pop());
_root.addScore(_root.ptsundo);
_root.clip_btn_undo.gotoAndStop(2);
_root.playSound("snd_undo");
} else {
_root.playSound("snd_error");
}
_root.check4pointAbility();
}
on (rollOver) {
if (_root.levelScore < (-_root.ptsundo)) {
s = "Not enough scores!";
} else {
s = "";
}
hnt = _root.hintt.create("Undo last move ", ("Costs: " add (-_root.ptsundo)) add " scores", s);
}
on (rollOut, press, releaseOutside) {
hnt.hideIt();
}
Symbol 479 MovieClip Frame 1
if (_root.newBack._visible) {
gra.gotoAndStop(_root.layOutBack);
} else {
gra.gotoAndStop(1);
}
stop();
Symbol 479 MovieClip Frame 2
if (_root.newBack._visible) {
gra.gotoAndStop(_root.layOutBack);
} else {
gra.gotoAndStop(1);
}
stop();
Symbol 563 MovieClip Frame 1
function end_exploze() {
}
function duplicateBlock(name, x, y, depth, frame) {
clip = t_block.duplicateMovieClip(name, depth);
clip._x = x;
clip._y = y;
clip.gotoAndStop(frame);
return(clip);
}
function push() {
var _local1 = _root;
_blocks[_blocks.length - 1].Color.setTransform(_local1.greyTransform);
clip = duplicateBlock("block" + _blocks.length, _blocks.length * zSlX, _blocks.length * zSlY, 100 + _blocks.length, _local1.tile[_local1.sk]);
_local1.sk++;
_blocks.push(clip);
clip.Color = new Color(clip);
}
function push_2(block) {
_blocks[_blocks.length - 1].Color.setTransform(_root.greyTransform);
_blocks.push(block);
clip.Color = new Color(clip);
}
function pop() {
removeMovieClip(_blocks.pop());
unFocus();
}
function press() {
var _local1 = _root;
var _local2 = this;
if (isFree()) {
_local2.rOut();
if (_local1.konteiner > 0) {
if (((n = fishkaInBox())) >= 0) {
_local1.blockPoints();
_local1.box[n].killing = 1;
_local1.box.splice(n, 1);
_local2.lastBlock().killing = 1;
} else if (thereIsPlaceInBox()) {
_local1.playSound("snd_click");
var _local3 = getBoxPos();
_local1.lastStack = _local2;
_local1.box.push(_blocks.pop());
clip = _local1.box[_local1.box.length - 1];
_local1.lastBlockX = clip._x;
_local1.lastBlockY = clip._y;
clip._x = ((-clip._parent._x) + -20) + ((_local3 + 1) * 75);
clip._y = (-clip._parent._y) + 520;
clip.inBox = true;
clip.boxPos = _local3;
unFocus();
} else {
_local1.playSound("snd_error");
}
if (_local1.konteiner == _local1.box.length) {
if (typeof(_local1.checks) == "undefined") {
_local1.checks = 0;
}
_local1.checks++;
if (_local1.checks < 3) {
_local1.checkForNoMoves();
}
} else {
_local1.checks = 0;
}
} else {
if (_local1.isSelected(_local2)) {
unFocus();
_local1.selected = new Array();
} else {
focus();
_local1.selected.push(_local2);
}
if (_local1.selected.length == 2) {
_local1.checkSelected();
}
_local1.check4pointAbility();
}
}
}
function focus() {
_blocks[_blocks.length - 1].Color.setTransform(_root.orangeTransform);
}
function unFocus() {
_blocks[_blocks.length - 1].Color.setTransform(_root.normalTransform);
}
function rOver() {
if ((typeof(_blocks[_blocks.length - 1].killing) == "undefined") && (isFree())) {
_blocks[_blocks.length - 1].color.setTransform(_root.blueTransform);
}
}
function rOut() {
if (typeof(_blocks[_blocks.length - 1].killing) == "undefined") {
_blocks[_blocks.length - 1].color.setTransform(_root.normalTransform);
}
}
function isLeftLinked() {
var _local3 = _root;
var _local2 = 0;
while (_local2 < _local3.field.length) {
var _local1 = 0;
while (_local1 < _local3.field[_local2].length) {
if ((_local3.field[_local2][_local1]._left == this) && (_local3.field[_local2][_local1]._blocks.length >= this._blocks.length)) {
return(false);
}
_local1++;
}
_local2++;
}
return(true);
}
function isRightLinked() {
var _local3 = _root;
var _local2 = 0;
while (_local2 < _local3.field.length) {
var _local1 = 0;
while (_local1 < _local3.field[_local2].length) {
if ((_local3.field[_local2][_local1]._right == this) && (_local3.field[_local2][_local1]._blocks.length >= this._blocks.length)) {
return(false);
}
_local1++;
}
_local2++;
}
return(true);
}
function isFree() {
if (_blocks.length == 0) {
return(false);
}
isLeftLinked();
if ((_up._blocks.length * 1) != 0) {
return(false);
}
if ((((_root.field[_i][_j - 1]._blocks[_blocks.length - 1] == undefined) && (_left._blocks[_blocks.length - 1] == undefined)) && (isRightLinked())) || (((_root.field[_i][_j + 1]._blocks[_blocks.length - 1] == undefined) && (_right._blocks[_blocks.length - 1] == undefined)) && (isLeftLinked()))) {
return(true);
}
return(false);
}
function lastBlock() {
return(_blocks[_blocks.length - 1]);
}
function fishkaInBox() {
var _local2 = _root;
var _local3 = this;
var _local1 = 0;
while (_local1 < _local2.box.length) {
if (((_local2.box[_local1]._currentframe == _local3.lastBlock()._currentframe) || ((_local2.box[_local1]._currentframe < 5) && (_local3.lastBlock()._currentframe < 5))) || (((_local2.box[_local1]._currentframe > 8) && (_local2.box[_local1]._currentframe < 13)) && ((_local3.lastBlock()._currentframe > 8) && (_local3.lastBlock()._currentframe < 13)))) {
return(_local1);
}
_local1++;
}
return(-1);
}
function thereIsPlaceInBox() {
return(_root.box.length < _root.konteiner);
}
function getBoxPos() {
var _local3 = _root;
if (_local3.box.length == 0) {
return(0);
}
var _local2 = 0;
while (_local2 < _local3.konteiner) {
var flag = false;
var _local1 = 0;
while (_local1 < _local3.box.length) {
if (_local2 == _local3.box[_local1].boxPos) {
flag = true;
}
_local1++;
}
if (!flag) {
return(_local2);
}
_local2++;
}
return(-1);
}
var _blocks = new Array();
stop();
zSlX = -7;
zSlY = -7.8;
Instance of Symbol 562 MovieClip "t_block" in Symbol 563 MovieClip Frame 1
onClipEvent (enterFrame) {
if (killing > 0) {
if (killing == 1) {
_root.addScoreXY(_root.secondlyPoints, (_parent._x + _x) + 25, _parent._y + _y);
}
killing = killing + 1;
_alpha = (100 - (killing * 30));
if (_alpha <= 10) {
_root._IGNOREUSER = false;
killing = -1;
_root.killIt(this, inBox);
}
}
}
Symbol 572 Button
on (press) {
_root.stopBlink();
if (_root.ST_PAUSE) {
_root.hidePause();
} else if (!_root._IGNOREUSER) {
_root.showPause();
}
}
Symbol 580 Button
on (press) {
_parent.ok();
}
on (press) {
_root.playSound("any_btn");
_root.stopBlink();
if (_root._IGNOREUSER) {
return(undefined);
}
_root.btn_little_copy.removeMovieClip();
_root.wnd_winGame.init();
}
Symbol 582 Button
on (press) {
_parent._parent.ok();
}
on (press) {
_root.checks = 0;
_root.stopBlink();
if (_root._IGNOREUSER) {
return(false);
}
if ((_root.box.length == _root.konteiner) && (_root.levelScore >= (-_root.ptsundo))) {
clip = _root.box[_root.box.length - 1];
clip._x = _root.lastBlockX;
clip._y = _root.lastBlockY;
clip.inBox = false;
_root.lastStack.push_2(_root.box.pop());
_root.addScore(_root.ptsundo);
_root.clip_btn_undo.gotoAndStop(2);
_root.playSound("snd_undo");
} else {
_root.playSound("snd_error");
}
_root.check4pointAbility();
}
on (rollOver) {
if (_root.levelScore < (-_root.ptsundo)) {
s = "Not enough scores!";
} else {
s = "";
}
hnt = _root.hintt.create("Undo last move ", ("Costs: " add (-_root.ptsundo)) add " scores", s);
}
on (rollOut, press, releaseOutside) {
hnt.hideIt();
}
Symbol 584 MovieClip Frame 1
stop();
Symbol 584 MovieClip Frame 2
stop();
Symbol 586 Button
on (press) {
_parent._parent.ok();
}
on (press) {
_root.stopBlink();
if (_root._IGNOREUSER) {
return(undefined);
}
if (_root.levelScore >= (-_root.ptsreshuffle)) {
_root.reshuffle();
} else {
_root.playSound("snd_error");
}
_root.check4pointAbility();
if (_root.konteiner > 0) {
_root.checkForNoMoves(true);
} else {
_root.checkForNoMovesClassic(true);
}
}
on (rollOver) {
if (_root.levelScore < (-_root.ptsreshuffle)) {
s = "Not enough scores!";
} else {
s = "";
}
hnt = _root.hintt.create("Reshuffle the game field", ("Costs: " add (-_root.ptsreshuffle)) add " scores", s);
}
on (rollOut, press, releaseOutside) {
hnt.hideIt();
}
Symbol 588 MovieClip Frame 1
stop();
Symbol 588 MovieClip Frame 2
stop();
Symbol 590 Button
on (press) {
this.startDrag();
}
on (release) {
stopDrag();
}
Symbol 592 MovieClip Frame 1
function init(again) {
var _local1 = _root;
_local1.cheat = false;
clipp.txt = "There are no moves";
if (again) {
clipp.txt = clipp.txt + " again";
}
_local1.playSound("any_btn");
_visible = true;
_local1._IGNOREUSER = true;
_local1.ST_PAUSE = true;
pauseStart = getTimer();
_local1.pause_btn._visible = false;
if ((_local1.levelScore < (-_local1.ptsUndo)) || (_local1.konteiner == 0)) {
clipp.b_u.gotoAndStop(2);
} else {
clipp.b_u.gotoAndStop(1);
}
if (_local1.levelScore < (-_local1.ptsReshuffle)) {
clipp.b_r.gotoAndStop(2);
} else {
clipp.b_r.gotoAndStop(1);
}
}
function ok() {
var _local1 = _root;
_local1.playSound("any_btn");
_visible = false;
_local1._IGNOREUSER = false;
_local1.ST_PAUSE = false;
_local1.startTime = _local1.startTime + (getTimer() - pauseStart);
_local1.pause_btn._visible = true;
}
stop();
_visible = false;
Symbol 598 Button
on (press) {
endGame();
}
Symbol 599 MovieClip Frame 1
function init() {
var _local1 = _root;
_local1.playSound("any_btn");
_visible = true;
_local1._IGNOREUSER = true;
_local1.ST_PAUSE = true;
pauseStart = getTimer();
_local1.pause_btn._visible = false;
}
function yes() {
var _local1 = _root;
_local1.playSound("any_btn");
_local1.startTime = _local1.startTime + (getTimer() - pauseStart);
_visible = false;
_local1._IGNOREUSER = false;
fscommand ("quit");
_local1.ST_PAUSE = false;
play();
_local1.pause_btn._visible = true;
}
function no() {
var _local1 = _root;
_local1.playSound("any_btn");
_local1.startTime = _local1.startTime + (getTimer() - pauseStart);
_visible = false;
_local1._IGNOREUSER = false;
_local1.ST_PAUSE = false;
_local1.pause_btn._visible = true;
}
function endGame() {
var _local1 = _root;
_local1.playSound("any_btn");
_local1.startTime = _local1.startTime + (getTimer() - pauseStart);
_visible = false;
_local1._IGNOREUSER = false;
_local1.hideGameBtns();
_local1.ST_PAUSE = false;
_local1.stopBlink();
_local1.wnd_winGame.init();
_local1.pause_btn._visible = true;
}
stop();
_visible = false;
Symbol 603 Button
on (press) {
cont();
}
Symbol 605 MovieClip Frame 1
function init() {
var _local1 = _root;
_local1.playSound("any_btn");
_local1._IGNOREUSER = true;
totalScore = _local1.points;
_local1.stopBlink();
_local1.playSound("snd_gameover");
_local1.stopMusic();
_local1.ST_GAMEOVER = true;
_local1._IGNOREUSER = true;
_local1.killProcess(_local1.PS_TIMER);
_local1.levelnow = 0;
_local1.removeField();
_local1.batttt.removeMovieClip();
_visible = true;
}
function cont() {
_root.wnd_winGame.init();
_visible = false;
}
_visible = false;
stop();
Symbol 615 MovieClip Frame 1
function create(p, c, p1, x, y) {
var _local1 = _root;
if (typeof(depth) == "undefined") {
depth = 100100 /* 0x018704 */;
}
depth++;
if (depth > 100200) {
depth = 100100 /* 0x018704 */;
}
this.duplicateMovieClip("points_" add depth, depth);
_local1["points_" add depth].clip_points_clip.points = p;
_local1["points_" add depth].clip_points_clip.x = p1;
_local1["points_" add depth].clip_points_clip.cross = c;
_local1["points_" add depth]._x = x;
_local1["points_" add depth]._y = y;
}
function end() {
this.removemovieClip();
}
if (this._name == "clip_points") {
_visible = false;
stop();
} else {
this.Color = new Color(this);
this.color.setTransform(_root.pointsColorTransform);
}
Symbol 615 MovieClip Frame 24
end();