Frame 1
function isSiteInvalid() {
var _local1 = false;
if (String(_url).toUpperCase().indexOf("MINICLIP.") <= 0) {
_local1 = true;
}
return(_local1);
}
_quality = "HIGH";
_root.sound_on = true;
Stage.scaleMode = "noScale";
fscommand ("trapallkeys", true);
fscommand ("showmenu", "false");
if (isSiteInvalid()) {
invalidMsg_str = "Sorry you are not allowed to place this version of the game on your website...2DPlay.com Team";
trace("stopped");
stop();
}
Frame 2
stop();
Frame 14
function music_play(play_flag) {
var _local1 = _root;
if (play_flag) {
if (!_local1.music_started) {
_local1.music_started = true;
_local1.music_sfx.start(0, 9999);
}
} else {
_local1.music_started = false;
_local1.music_sfx.stop();
}
}
function hex_md5(s) {
return(binl2hex(core_md5(str2binl(s), s.length * chrsz)));
}
function b64_md5(s) {
return(binl2b64(core_md5(str2binl(s), s.length * chrsz)));
}
function str_md5(s) {
return(binl2str(core_md5(str2binl(s), s.length * chrsz)));
}
function hex_hmac_md5(key, data) {
return(binl2hex(core_hmac_md5(key, data)));
}
function b64_hmac_md5(key, data) {
return(binl2b64(core_hmac_md5(key, data)));
}
function str_hmac_md5(key, data) {
return(binl2str(core_hmac_md5(key, data)));
}
function md5_vm_test() {
return(hex_md5("abc") == "900150983cd24fb0d6963f7d28e17f72");
}
function core_md5(x, len) {
x[len >> 5] = x[len >> 5] | (128 << (len % 32));
x[(((len + 64) >>> 9) << 4) + 14] = len;
var a = 1732584193;
var _local3 = -271733879;
var _local2 = -1732584194;
var _local1 = 271733878 /* 0x10325476 */;
var i = 0;
while (i < x.length) {
var olda = a;
var oldb = _local3;
var oldc = _local2;
var oldd = _local1;
a = md5_ff(a, _local3, _local2, _local1, x[i + 0], 7, -680876936);
_local1 = md5_ff(_local1, a, _local3, _local2, x[i + 1], 12, -389564586);
_local2 = md5_ff(_local2, _local1, a, _local3, x[i + 2], 17, 606105819);
_local3 = md5_ff(_local3, _local2, _local1, a, x[i + 3], 22, -1044525330);
a = md5_ff(a, _local3, _local2, _local1, x[i + 4], 7, -176418897);
_local1 = md5_ff(_local1, a, _local3, _local2, x[i + 5], 12, 1200080426);
_local2 = md5_ff(_local2, _local1, a, _local3, x[i + 6], 17, -1473231341);
_local3 = md5_ff(_local3, _local2, _local1, a, x[i + 7], 22, -45705983);
a = md5_ff(a, _local3, _local2, _local1, x[i + 8], 7, 1770035416);
_local1 = md5_ff(_local1, a, _local3, _local2, x[i + 9], 12, -1958414417);
_local2 = md5_ff(_local2, _local1, a, _local3, x[i + 10], 17, -42063);
_local3 = md5_ff(_local3, _local2, _local1, a, x[i + 11], 22, -1990404162);
a = md5_ff(a, _local3, _local2, _local1, x[i + 12], 7, 1804603682);
_local1 = md5_ff(_local1, a, _local3, _local2, x[i + 13], 12, -40341101);
_local2 = md5_ff(_local2, _local1, a, _local3, x[i + 14], 17, -1502002290);
_local3 = md5_ff(_local3, _local2, _local1, a, x[i + 15], 22, 1236535329);
a = md5_gg(a, _local3, _local2, _local1, x[i + 1], 5, -165796510);
_local1 = md5_gg(_local1, a, _local3, _local2, x[i + 6], 9, -1069501632);
_local2 = md5_gg(_local2, _local1, a, _local3, x[i + 11], 14, 643717713);
_local3 = md5_gg(_local3, _local2, _local1, a, x[i + 0], 20, -373897302);
a = md5_gg(a, _local3, _local2, _local1, x[i + 5], 5, -701558691);
_local1 = md5_gg(_local1, a, _local3, _local2, x[i + 10], 9, 38016083);
_local2 = md5_gg(_local2, _local1, a, _local3, x[i + 15], 14, -660478335);
_local3 = md5_gg(_local3, _local2, _local1, a, x[i + 4], 20, -405537848);
a = md5_gg(a, _local3, _local2, _local1, x[i + 9], 5, 568446438);
_local1 = md5_gg(_local1, a, _local3, _local2, x[i + 14], 9, -1019803690);
_local2 = md5_gg(_local2, _local1, a, _local3, x[i + 3], 14, -187363961);
_local3 = md5_gg(_local3, _local2, _local1, a, x[i + 8], 20, 1163531501);
a = md5_gg(a, _local3, _local2, _local1, x[i + 13], 5, -1444681467);
_local1 = md5_gg(_local1, a, _local3, _local2, x[i + 2], 9, -51403784);
_local2 = md5_gg(_local2, _local1, a, _local3, x[i + 7], 14, 1735328473);
_local3 = md5_gg(_local3, _local2, _local1, a, x[i + 12], 20, -1926607734);
a = md5_hh(a, _local3, _local2, _local1, x[i + 5], 4, -378558);
_local1 = md5_hh(_local1, a, _local3, _local2, x[i + 8], 11, -2022574463);
_local2 = md5_hh(_local2, _local1, a, _local3, x[i + 11], 16, 1839030562);
_local3 = md5_hh(_local3, _local2, _local1, a, x[i + 14], 23, -35309556);
a = md5_hh(a, _local3, _local2, _local1, x[i + 1], 4, -1530992060);
_local1 = md5_hh(_local1, a, _local3, _local2, x[i + 4], 11, 1272893353);
_local2 = md5_hh(_local2, _local1, a, _local3, x[i + 7], 16, -155497632);
_local3 = md5_hh(_local3, _local2, _local1, a, x[i + 10], 23, -1094730640);
a = md5_hh(a, _local3, _local2, _local1, x[i + 13], 4, 681279174);
_local1 = md5_hh(_local1, a, _local3, _local2, x[i + 0], 11, -358537222);
_local2 = md5_hh(_local2, _local1, a, _local3, x[i + 3], 16, -722521979);
_local3 = md5_hh(_local3, _local2, _local1, a, x[i + 6], 23, 76029189);
a = md5_hh(a, _local3, _local2, _local1, x[i + 9], 4, -640364487);
_local1 = md5_hh(_local1, a, _local3, _local2, x[i + 12], 11, -421815835);
_local2 = md5_hh(_local2, _local1, a, _local3, x[i + 15], 16, 530742520);
_local3 = md5_hh(_local3, _local2, _local1, a, x[i + 2], 23, -995338651);
a = md5_ii(a, _local3, _local2, _local1, x[i + 0], 6, -198630844);
_local1 = md5_ii(_local1, a, _local3, _local2, x[i + 7], 10, 1126891415);
_local2 = md5_ii(_local2, _local1, a, _local3, x[i + 14], 15, -1416354905);
_local3 = md5_ii(_local3, _local2, _local1, a, x[i + 5], 21, -57434055);
a = md5_ii(a, _local3, _local2, _local1, x[i + 12], 6, 1700485571);
_local1 = md5_ii(_local1, a, _local3, _local2, x[i + 3], 10, -1894986606);
_local2 = md5_ii(_local2, _local1, a, _local3, x[i + 10], 15, -1051523);
_local3 = md5_ii(_local3, _local2, _local1, a, x[i + 1], 21, -2054922799);
a = md5_ii(a, _local3, _local2, _local1, x[i + 8], 6, 1873313359);
_local1 = md5_ii(_local1, a, _local3, _local2, x[i + 15], 10, -30611744);
_local2 = md5_ii(_local2, _local1, a, _local3, x[i + 6], 15, -1560198380);
_local3 = md5_ii(_local3, _local2, _local1, a, x[i + 13], 21, 1309151649);
a = md5_ii(a, _local3, _local2, _local1, x[i + 4], 6, -145523070);
_local1 = md5_ii(_local1, a, _local3, _local2, x[i + 11], 10, -1120210379);
_local2 = md5_ii(_local2, _local1, a, _local3, x[i + 2], 15, 718787259);
_local3 = md5_ii(_local3, _local2, _local1, a, x[i + 9], 21, -343485551);
a = safe_add(a, olda);
_local3 = safe_add(_local3, oldb);
_local2 = safe_add(_local2, oldc);
_local1 = safe_add(_local1, oldd);
i = i + 16;
}
return(Array(a, _local3, _local2, _local1));
}
function md5_cmn(q, a, b, x, s, t) {
return(safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s), b));
}
function md5_ff(a, b, c, d, x, s, t) {
var _local1 = b;
return(md5_cmn((_local1 & c) | ((~_local1) & d), a, _local1, x, s, t));
}
function md5_gg(a, b, c, d, x, s, t) {
return(md5_cmn((b & d) | (c & (~d)), a, b, x, s, t));
}
function md5_hh(a, b, c, d, x, s, t) {
return(md5_cmn((b ^ c) ^ d, a, b, x, s, t));
}
function md5_ii(a, b, c, d, x, s, t) {
return(md5_cmn(c ^ (b | (~d)), a, b, x, s, t));
}
function core_hmac_md5(key, data) {
var _local2 = str2binl(key);
if (_local2.length > 16) {
_local2 = core_md5(_local2, key.length * chrsz);
}
var _local3 = Array(16);
var opad = Array(16);
var _local1 = 0;
while (_local1 < 16) {
_local3[_local1] = _local2[_local1] ^ 909522486;
opad[_local1] = _local2[_local1] ^ 1549556828;
_local1++;
}
var hash = core_md5(_local3.concat(str2binl(data)), 512 + (data.length * chrsz));
return(core_md5(opad.concat(hash), 640));
}
function safe_add(x, y) {
var _local1 = (x & 65535) + (y & 65535);
var _local2 = ((x >> 16) + (y >> 16)) + (_local1 >> 16);
return((_local2 << 16) | (_local1 & 65535));
}
function bit_rol(num, cnt) {
return((num << cnt) | (num >>> (32 - cnt)));
}
function str2binl(str) {
var _local2 = str;
var _local3 = Array();
var mask = ((1 << chrsz) - 1);
var _local1 = 0;
while (_local1 < (_local2.length * chrsz)) {
_local3[_local1 >> 5] = _local3[_local1 >> 5] | ((_local2.charCodeAt(_local1 / chrsz) & mask) << (_local1 % 32));
_local1 = _local1 + chrsz;
}
return(_local3);
}
function binl2str(bin) {
var _local2 = bin;
var _local3 = "";
var mask = ((1 << chrsz) - 1);
var _local1 = 0;
while (_local1 < (_local2.length * 32)) {
_local3 = _local3 + String.fromCharCode((_local2[_local1 >> 5] >>> (_local1 % 32)) & mask);
_local1 = _local1 + chrsz;
}
return(_local3);
}
function binl2hex(binarray) {
var _local2 = binarray;
var _local3 = (hexcase ? "0123456789ABCDEF" : "0123456789abcdef");
var str = "";
var _local1 = 0;
while (_local1 < (_local2.length * 4)) {
str = str + (_local3.charAt((_local2[_local1 >> 2] >> (((_local1 % 4) * 8) + 4)) & 15) + _local3.charAt((_local2[_local1 >> 2] >> ((_local1 % 4) * 8)) & 15));
_local1++;
}
return(str);
}
function binl2b64(binarray) {
var _local3 = binarray;
var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
var str = "";
var _local2 = 0;
while (_local2 < (_local3.length * 4)) {
var triplet = (((((_local3[_local2 >> 2] >> (8 * (_local2 % 4))) & 255) << 16) | (((_local3[(_local2 + 1) >> 2] >> (8 * ((_local2 + 1) % 4))) & 255) << 8)) | ((_local3[(_local2 + 2) >> 2] >> (8 * ((_local2 + 2) % 4))) & 255));
var _local1 = 0;
while (_local1 < 4) {
if (((_local2 * 8) + (_local1 * 6)) > (_local3.length * 32)) {
str = str + b64pad;
} else {
str = str + tab.charAt((triplet >> (6 * (3 - _local1))) & 63);
}
_local1++;
}
_local2 = _local2 + 3;
}
return(str);
}
AwardsScoring = new Array();
AwardsScoring.push([1400, 2000]);
AwardsScoring.push([1200, 1600]);
AwardsScoring.push([700, 1100]);
AwardsScoring.push([1000, 1600]);
AwardsScoring.push([900, 1300]);
AwardsScoring.push([1000, 1500]);
AwardsScoring.push([1200, 1900]);
AwardsScoring.push([1100, 1700]);
AwardsScoring.push([1400, 2000]);
AwardsScoring.push([1400, 2000]);
AwardsScoring.push([1200, 1800]);
AwardsScoring.push([1500, 2300]);
AwardsScoring.push([1500, 2300]);
AwardsScoring.push([1700, 2600]);
AwardsScoring.push([800, 1300]);
AwardsScoring.push([1200, 1800]);
AwardsScoring.push([1200, 1800]);
AwardsScoring.push([700, 1300]);
AwardsScoring.push([1400, 2000]);
AwardsScoring.push([1000, 1600]);
AwardsScoring.push([1400, 2100]);
AwardsScoring.push([500, 1000]);
AwardsScoring.push([1700, 2300]);
AwardsScoring.push([700, 1100]);
AwardsScoring.push([1000, 1500]);
_root.AwardType = function (level) {
var _local2 = _global.Settings.playedScores[level];
var _local3 = _root.AwardsScoring[level][0];
var _local1 = _root.AwardsScoring[level][1];
var interval = ((_local1 - _local3) / 3);
if (_local2 < _local3) {
return(3);
}
if (_local2 < _local1) {
return(2);
}
return(1);
};
music_started = false;
first_play = SharedObject.getLocal("sheriff_tripeaks");
if (first_play.data.played != "true") {
first_play.data.played = "true";
first_play.flush();
show_tips = true;
} else {
show_tips = false;
}
var button_sfx = new Sound();
button_sfx.attachSound("button_sfx");
var music_sfx = new Sound();
music_sfx.attachSound("music");
var wrong_card_sfx = new Sound();
wrong_card_sfx.attachSound("wrong_card");
var level_done_sfx = new Sound();
level_done_sfx.attachSound("level_done");
var non_playable_sfx = new Sound();
non_playable_sfx.attachSound("non_playable");
var points_sfx = new Sound();
points_sfx.attachSound("points");
var set_sfx = new Sound();
set_sfx.attachSound("set");
var shot_sfx = new Sound();
shot_sfx.attachSound("shot");
var undo_sfx = new Sound();
undo_sfx.attachSound("undo");
var game_over_sfx = new Sound();
game_over_sfx.attachSound("game_over");
var level_start_sfx = new Sound();
level_start_sfx.attachSound("level_start");
var MEvents = new Object();
var hexcase = 0;
var b64pad = "";
var chrsz = 8;
Frame 15
pan._visible = false;
Settings.Init();
SharedVals.Init();
music_play(true);
stop();
Frame 16
stop();
Frame 17
stop();
Instance of Symbol 312 MovieClip in Frame 17
onClipEvent (load) {
function ClearStats() {
var _local1 = SharedObject.getLocal("saves4");
_local1.data.inited = 0;
_global.Settings.Init();
InitRootVars();
}
function InitRootVars() {
var _local1 = _root;
var saves = SharedObject.getLocal("saves4");
_local1.games_played = saves.data.games_played;
_local1.games_win = saves.data.games_win;
_local1.games_lost = saves.data.games_lost;
_local1.total_score = (_local1.levels_comp = (_local1.gold_awarded = (_local1.silver_awarded = (_local1.bronze_awarded = 0))));
var _local2 = 0;
while (_local2 < 25) {
var _local3 = _global.Settings.playedScores[_local2];
if (_local3 > 0) {
_local1.total_score = _local1.total_score + _local3;
_local1.levels_comp = _local1.levels_comp + 1;
var star_type = _local1.AwardType(_local2);
switch (star_type) {
case 1 :
_local1.gold_awarded = _local1.gold_awarded + 1;
break;
case 2 :
_local1.silver_awarded = _local1.silver_awarded + 1;
break;
case 3 :
_local1.bronze_awarded = _local1.bronze_awarded + 1;
}
}
_local2++;
}
}
InitRootVars();
}
Frame 18
stop();
Instance of Symbol 108 MovieClip in Frame 18
onClipEvent (enterFrame) {
if (_root.show_tips) {
gotoAndStop (1);
} else {
gotoAndStop (2);
}
}
Instance of Symbol 119 MovieClip in Frame 18
onClipEvent (enterFrame) {
if (_quality == "LOW") {
gotoAndStop (1);
} else if (_quality == "MEDIUM") {
gotoAndStop (2);
} else {
gotoAndStop (3);
}
}
Instance of Symbol 108 MovieClip in Frame 18
onClipEvent (enterFrame) {
if (_root.sound_on) {
gotoAndStop (1);
} else {
gotoAndStop (2);
}
}
Frame 19
pan._visible = false;
music_play(true);
SharedVals.Init();
Frame 20
pan._visible = false;
Levels.wait = wait;
Levels.pan = pan;
Levels.navPrv = pan.navPrv;
Levels.navNext = pan.navNext;
Levels.Init();
Frame 21
Levels.Init2();
Frame 22
pan._visible = true;
Game.delPrvLevel();
Levels.activate();
stop();
Frame 23
_root.level_start_sfx.start(0, 1);
phs2._visible = false;
wait._visible = true;
pan._visible = false;
_root.undosLeftString = "x3";
_root.playTimeText = "05:00";
_root.scoreText = "0";
music_play(false);
Frame 24
pan._visible = false;
phs2.isMain = true;
phs2.doInit();
Frame 25
pan._visible = false;
_root.onEnterFrame = function () {
Game.doFrame();
};
Game.pan = phs2;
Game.msgPan = msgPan;
Game.txtTime = txtTime;
Game.txtScore = txtScore;
Game.bar = bar;
Game.btnReturn = btnReturn;
Game.btnUndo = btnUndo;
Game.activate();
Game.startIt();
Game.setOvers();
Game.testAfterDelete();
Game.enableAll(true);
phs2._visible = true;
wait._visible = false;
Game.TipsControl();
stop();
Symbol 378 MovieClip [__Packages.Game] Frame 0
class Game
{
static var snapNums, playStartTime, timeDisp, is_paused, pan, msgPan, timeLeft, txtScore, btnReturn, btnUndo, toppest2Num, playStarted, playFinished, playTime, rndPlayTime, toppest, toppest2, timeSetNum, deletedAll, noMoreMove, bar, strPlayTime, txtTime, currentDepth, prvToppest;
function Game () {
}
static function startIt() {
undosLeft = 3;
_root.undosLeftString = "x" + String(undosLeft);
var _local1;
_local1 = 0;
while (_local1 < 52) {
snapNums[_local1] = -1;
_local1++;
}
_local1 = 0;
while (_local1 < 52) {
while (snapNums[index] < 0) {
var index = Math.floor(Math.random() * 52);
if (snapNums[index] < 0) {
snapNums[index] = _local1;
}
}
_local1++;
}
if (SharedVals.playLevel == -1) {
SharedVals.playLevel = Math.min(Settings.lastLevel + 1, Settings.levels.length);
}
if (true || (SharedVals.playLevel <= (Settings.lastLevel + 1))) {
setLevel(Settings.levels[SharedVals.playLevel - 1]);
} else {
delPrvLevel();
_root.gotoAndPlay("preLevelsFrame");
}
}
static function PauseOff() {
playStartTime = getTimer() - timeDisp;
is_paused = false;
}
static function activate() {
SharedVals.snapShot = false;
SharedVals.panel = pan;
msgPan._visible = false;
timeLeft = 300;
txtScore.text = "0";
is_paused = true;
btnReturn.onPress = function () {
if (!Game.is_paused) {
Game.is_paused = true;
Game.pause_clip = _root.attachMovie("pause_clip", "pc", 100000);
Game.pause_clip._x = 275;
Game.pause_clip._y = 200;
}
};
btnUndo.onPress = function () {
if (Game.playFinished) {
return(undefined);
}
Game.undo();
};
}
static function TipsControl() {
if (_root.show_tips) {
is_paused = true;
_root.attachMovie("window_tip", "window_tip", 100000);
} else {
is_paused = false;
}
}
static function enableAll(e) {
var _local3 = e;
var _local2;
var _local1;
_local2 = 0;
while (_local2 < 52) {
_local1 = SharedVals.panel["rect" + String(_local2)];
if ((_local1.exist && (_local1.isShowing)) || (toppest2Num == _local2)) {
_local1.useHandCursor = _local3 && true;
} else {
_local1.useHandCursor = false;
}
_local2++;
}
btnUndo.useHandCursor = _local3 && (lastMove != -1);
btnReturn.useHandCursor = _local3;
}
static function loadFromStr(s12) {
var s1;
var s2;
var _local3 = new String("");
var _local2;
var _local1;
_local3 = s12;
_local2 = _local3.indexOf(">", 0);
s1 = _local3.slice(0, _local2);
s2 = _local3.slice(_local2 + 1, _local3.length);
_local2 = -1;
_local3 = s2;
_local1 = _local3.indexOf(";", 0);
if (_local1 >= 0) {
do {
loadOneFromStr(_local3.substring(_local2 + 1, _local1));
_local2 = _local1;
_local1 = _local3.indexOf(";", _local2 + 1);
} while (_local1 >= 0);
}
}
static function loadOneFromStr(t) {
var _local2 = new String(t);
var _local3;
var k2;
var k3;
var k4;
var k5;
var s1;
var s2;
var s3;
var s4;
var s5;
var _local1;
_local3 = _local2.indexOf(",", 0);
if (_local3 < 0) {
} else {
k2 = _local2.indexOf(",", _local3 + 1);
if (k2 < 0) {
} else {
k3 = _local2.indexOf(",", k2 + 1);
if (k3 < 0) {
} else {
k4 = _local2.indexOf(",", k3 + 1);
if (k4 < 0) {
} else {
k5 = _local2.indexOf(",", k4 + 1);
if (k5 < 0) {
} else {
s1 = _local2.substring(0, _local3);
s2 = _local2.substring(_local3 + 1, k2);
s3 = _local2.substring(k2 + 1, k3);
s4 = _local2.substring(k3 + 1, k4);
s5 = _local2.substring(k4 + 1, k5);
if (isNaN(s1)) {
} else if (isNaN(s2)) {
} else if (isNaN(s3)) {
} else if (isNaN(s4)) {
} else if (isNaN(s5)) {
} else {
SharedVals.panel.readyNum++;
_local1 = SharedVals.panel["rect" + String(SharedVals.panel.readyNum)];
_local1._x = Number(s1);
_local1._y = Number(s2);
_local1._rotation = Number(s3);
_local1.rVal = Number(s4);
_local1.depth = _local1.rVal;
_local1.swapDepths(_local1.depth);
if (SharedVals.snapShot) {
_local1.makeIt = Number(s5) == 1;
} else {
_local1.makeIt = true;
}
_local1._visible = true;
_local1.exist = true;
}
}
}
}
}
}
}
static function delPrvLevel() {
var k;
var b;
var mc;
playStarted = false;
playFinished = false;
playTime = 0;
rndPlayTime = 0;
playStartTime = 0;
}
static function setLevel(s) {
var k;
var mc;
delPrvLevel();
reSet();
loadFromStr(s);
giveNumbers();
toppest = SharedVals.panel["rect" + String(SharedVals.panel.readyNum + 1)];
if ((SharedVals.panel.readyNum + 2) < 52) {
toppest2Num = SharedVals.panel.readyNum + 2;
toppest2 = SharedVals.panel["rect" + String(toppest2Num)];
_root.readyTxt = String(52 - toppest2Num);
} else {
toppest2Num = -1;
_root.readyTxt = "";
}
if (SharedVals.snapShot) {
toppest.makeNumber();
}
toppest.showMe(true);
toppest._x = SharedVals.panel.place2._x;
toppest._y = SharedVals.panel.place2._y;
playStarted = true;
playStartTime = getTimer();
}
static function setOvers() {
var k;
var k2;
var _local3;
var _local2;
var mc2;
var pmc;
var _local1 = new Object();
var fnd;
k = 0;
while (k < 52) {
_local2 = SharedVals.panel["rect" + String(k)];
_local2.overs.splice(0);
if (_local2.exist) {
k2 = 0;
while (k2 < 52) {
mc2 = SharedVals.panel["rect" + String(k2)];
if (mc2.exist && (mc2.depth > _local2.depth)) {
fnd = false;
_local3 = 0;
while (_local3 <= 11) {
pmc = _root.rect["pin" + String(_local3)];
_local1.x = pmc._x;
_local1.y = pmc._y;
_local2.localToGlobal(_local1);
if (mc2.hitTest(_local1.x, _local1.y, true)) {
fnd = true;
}
_local3++;
}
if (fnd) {
_local2.overs.push(k2);
}
}
k2++;
}
} else {
_local2.depth = 1000 - k;
_local2.swapDepths(_local2.depth);
}
k++;
}
}
static function reSet() {
var k;
state = 0;
timeSetNum = 0;
SharedVals.frameNum = 0;
playStarted = false;
playFinished = false;
playTime = 0;
rndPlayTime = 0;
playStartTime = 0;
score = 0;
deletedAll = false;
noMoreMove = false;
toppest2Num = -1;
msgPan._visible = false;
SharedVals.panel.reset();
lastMove = -1;
btnUndo._alpha = 20;
btnUndo.useHandCursor = false;
bar.setVal(0);
}
static function setTime() {
var tc;
var t0;
var _local3;
var t2;
var ts0;
var _local2;
var _local1;
playTime = timeLeft - ((getTimer() - playStartTime) / 1000);
if (Math.floor(playTime) == -1) {
playerLoosed(true);
}
if (Math.round(playTime) != rndPlayTime) {
rndPlayTime = int(playTime);
t0 = int(rndPlayTime / 3600);
ts0 = String(t0);
if (t0 < 10) {
ts0 = "0" + ts0;
}
_local3 = int((rndPlayTime - (t0 * 60)) / 60);
if (_local3 == 60) {
_local3 = 0;
}
_local2 = String(_local3);
if (_local3 < 10) {
_local2 = "0" + _local2;
}
t2 = rndPlayTime % 60;
_local1 = String(t2);
if (t2 < 10) {
_local1 = "0" + _local1;
}
if (t0 == 0) {
strPlayTime = (_local2 + ":") + _local1;
} else {
strPlayTime = (((ts0 + ":") + _local2) + ":") + _local1;
}
_root.playTimeText = String(strPlayTime);
txtTime.text = String(strPlayTime);
}
}
static function doFrame() {
if (!is_paused) {
timeDisp = getTimer() - playStartTime;
if (playFinished) {
return(undefined);
}
if (playStarted) {
SharedVals.frameNum++;
setTime();
}
if (state == 1) {
toppest.frames--;
if (toppest.frames == 0) {
toppest.swapDepths(currentDepth);
state = 0;
toppest.frames = -1;
toppest.exist = false;
toppest.showMe(true);
toppest._x = pan.place2._x;
toppest._y = pan.place2._y;
toppest._rotation = 0;
if (deletedAll) {
playerWinned();
return(undefined);
}
if (noMoreMove) {
playerLoosed(false);
return(undefined);
}
} else {
toppest._x = toppest._x + toppest.dX;
toppest._y = toppest._y + toppest.dY;
toppest._rotation = toppest._rotation + toppest.dR;
}
}
bar.addVal(-0.2);
bar.refreshMe();
}
}
static function testAfterDelete() {
var _local2;
var _local3;
var k3;
var v;
var _local1;
var mc2;
var pmc;
var p = new Object();
var fnd;
var fnd2;
fnd = false;
_local2 = 0;
while (_local2 < 52) {
_local1 = SharedVals.panel["rect" + String(_local2)];
if (_local1.exist) {
fnd = true;
fnd2 = false;
_local3 = 0;
while (_local3 < _local1.overs.length) {
mc2 = SharedVals.panel["rect" + String(_local1.overs[_local3])];
if (mc2.exist) {
fnd2 = true;
}
_local3++;
}
_local1.showMe(!fnd2);
}
_local2++;
}
deletedAll = !fnd;
if (deletedAll) {
} else if (toppest2Num != -1) {
} else {
fnd = false;
_local2 = 0;
while (_local2 < 52) {
_local1 = SharedVals.panel["rect" + String(_local2)];
if (_local1.exist && (_local1.isShowing)) {
v = Math.abs(_local1.card_number - toppest.card_number);
if ((v == 1) || (v == 12)) {
fnd = true;
}
}
_local2++;
}
if (!fnd) {
noMoreMove = true;
}
}
}
static function setScore(s) {
_root.points_sfx.start(0, 1);
score = score + s;
_root.scoreText = String(score);
txtScore.text = String(score);
}
static function playerLoosed(is_time_out) {
var _local1 = SharedObject.getLocal("saves4");
_local1.data.games_played = _local1.data.games_played + 1;
_local1.data.games_lost = _local1.data.games_lost + 1;
_local1.flush();
pan._x = pan.x0;
pan._y = pan.y0;
msgPan.showForLoose(is_time_out);
enableAll(false);
playFinished = true;
}
static function playerWinned() {
var _local1 = SharedObject.getLocal("saves4");
_local1.data.games_played = _local1.data.games_played + 1;
_local1.data.games_win = _local1.data.games_win + 1;
_local1.flush();
pan._x = pan.x0;
pan._y = pan.y0;
Settings.setLastLevel(SharedVals.playLevel, score);
msgPan.showForWin(score, SharedVals.playLevel != Settings.levels.length);
enableAll(false);
playFinished = true;
}
static function giveNumbers() {
if (_root._currentframe > 21) {
var _local1;
var mc;
var _local2 = new Array();
var tempArray_2 = new Array();
_local1 = 0;
while (_local1 < 52) {
_local2.push(-1);
tempArray_2.push(0);
_local1++;
}
_local1 = 0;
while (_local1 < 52) {
var _local3 = Math.floor(Math.random() * 52);
if (_local2[_local3] < 0) {
_local2[_local3] = _local1;
} else {
_local1 = _local1 - 1;
}
_local1++;
}
_local1 = 0;
while (_local1 < 52) {
var flag = false;
do {
var _local3 = Math.floor(Math.random() * _local2.length);
var card_num = _local2[_local3];
var current_card = (card_num % 13);
var previous_card = (tempArray_2[_local1 - 1] % 13);
if (_local1 < 50) {
if (current_card != previous_card) {
tempArray_2[_local1] = card_num;
_local2.splice(_local3, 1);
flag = true;
}
} else {
tempArray_2[_local1] = card_num;
_local2.splice(_local3, 1);
flag = true;
}
} while (!flag);
_local1++;
}
_local1 = 0;
while (_local1 < 52) {
mc = SharedVals.panel["rect" + String(_local1)];
mc.setNumber(tempArray_2[_local1]);
mc.makeNumber();
_local1++;
}
}
}
static function undo() {
var _local1 = _root;
if (playFinished) {
} else if (lastMove == -1) {
} else {
if (lastMove == 1) {
toppest._x = toppest.prvX;
toppest._y = toppest.prvY;
toppest._rotation = toppest.prvRotation;
toppest.depth = toppest.prvDepth;
toppest.swapDepths(toppest.depth);
toppest.exist = true;
toppest = prvToppest;
bar.addVal(-20);
setScore(-lastScore);
enableAll(true);
}
if (lastMove == 2) {
SharedVals.panel.readyNum--;
toppest2Num = SharedVals.panel.readyNum + 2;
toppest2 = SharedVals.panel["rect" + String(toppest2Num)];
_local1.readyTxt = String(52 - toppest2Num);
toppest._x = toppest.prvX;
toppest._y = toppest.prvY;
toppest._rotation = toppest.prvRotation;
toppest.depth = toppest.prvDepth;
toppest.swapDepths(toppest.depth);
toppest.showMe(false);
toppest = prvToppest;
enableAll(true);
}
_local1.undo_sfx.start(0, 1);
testAfterDelete();
lastMove = -1;
undosLeft = undosLeft - 1;
_local1.undosLeftString = "x" + String(undosLeft);
if (undosLeft == 0) {
btnUndo._visible = false;
btnUndo._x = -100;
} else {
btnUndo._alpha = 20;
btnUndo.useHandCursor = false;
bar.setVal(0);
}
}
}
static function pressed(mc) {
var _local1 = mc;
var _local3 = _root;
if (!is_paused) {
if (playFinished) {
} else if (state != 0) {
} else if (_local1.exist && (_local1.isShowing)) {
var _local2 = Math.abs(toppest.card_number - _local1.card_number);
if ((_local2 == 1) || (_local2 == 12)) {
state = 1;
_local1.frames = 6;
_local1.prvX = _local1._x;
_local1.prvY = _local1._y;
_local1.prvRotation = _local1._rotation;
_local1.prvDepth = _local1.depth;
_local1.dX = (pan.place2._x - _local1._x) / _local1.frames;
_local1.dY = (pan.place2._y - _local1._y) / _local1.frames;
_local1.dR = (-_local1._rotation) / _local1.frames;
_local1.exist = false;
_local1.depth = toppest.depth + 10060;
_local1.swapDepths(_local1.depth);
prvToppest = toppest;
toppest = _local1;
lastMove = 1;
btnUndo._alpha = 100;
btnUndo.useHandCursor = true;
testAfterDelete();
bar.addVal(20);
lastScore = 20 + bar.rndVal;
setScore(lastScore);
enableAll(true);
} else {
_local3.wrong_card_sfx.start(0, 1);
}
} else if (toppest2Num != -1) {
if (_local1.bigNumber == toppest2.bigNumber) {
_local3.set_sfx.start(0, 1);
_local1.depth = toppest.depth + 1;
_local1.swapDepths(_local1.depth);
_local1.prvX = _local1._x;
_local1.prvY = _local1._y;
_local1.prvRotation = _local1._rotation;
_local1.prvDepth = _local1.depth;
prvToppest = toppest;
toppest = _local1;
lastMove = 2;
btnUndo._alpha = 100;
btnUndo.useHandCursor = true;
SharedVals.panel.readyNum++;
if ((SharedVals.panel.readyNum + 2) < 52) {
toppest2Num = SharedVals.panel.readyNum + 2;
toppest2 = SharedVals.panel["rect" + String(toppest2Num)];
_local3.readyTxt = String(52 - toppest2Num);
} else {
toppest2Num = -1;
_local3.readyTxt = "";
}
state = 1;
_local1.frames = 2;
_local1.dX = (pan.place2._x - _local1._x) / _local1.frames;
_local1.dY = (pan.place2._y - _local1._y) / _local1.frames;
_local1.dR = (-_local1._rotation) / _local1.frames;
testAfterDelete();
enableAll(true);
}
}
}
}
static var undosLeft = 0;
static var tmpPoint = new Object();
static var state = 0;
static var score = 0;
static var lastMove = -1;
static var lastScore = 0;
}
Symbol 379 MovieClip [__Packages.SharedVals] Frame 0
class SharedVals
{
static var livesCount, tmpColFnd, colFnd, tmpColNum, colNum, tmpColNum2, colNum2, slowerFound, MAXCOLTIME;
function SharedVals () {
}
static function Init() {
livesCount = 3;
}
static function saveCols() {
tmpColDisks1 = colDisks1.slice();
tmpColDisks2 = colDisks2.slice();
tmpColNums = colNums.slice();
tmpColFnd = colFnd;
tmpColNum = colNum;
tmpColNum2 = colNum2;
clearCols();
}
static function clearCols() {
rotColDisks1.splice(0);
rotColDisks2.splice(0);
colDisks1.splice(0);
colDisks2.splice(0);
colNums.splice(0);
colFnd = false;
slowerFound = false;
colNum = 1;
colNum2 = 1;
}
static function restoreCols() {
colDisks1 = tmpColDisks1.slice();
colDisks2 = tmpColDisks2.slice();
colNums = tmpColNums.slice();
colFnd = tmpColFnd;
colNum = tmpColNum;
colNum2 = tmpColNum2;
tmpColDisks1.splice(0);
tmpColDisks2.splice(0);
tmpColNums.splice(0);
}
static function makeEqNums() {
var _local1;
_local1 = 0;
while (_local1 <= (colNums.length - 1)) {
colNums[_local1] = colNum;
_local1++;
}
}
static function twoColsEqual() {
var _local2;
var _local1;
var _local3;
if (colNums.length != tmpColNums.length) {
return(false);
}
_local2 = 0;
while (_local2 <= (colNums.length - 1)) {
_local3 = false;
_local1 = 0;
while (_local1 <= (tmpColNums.length - 1)) {
if ((colDisks1[_local2] == tmpColDisks1[_local1]) && (colDisks2[_local2] == tmpColDisks2[_local1])) {
_local3 = true;
}
_local1++;
}
if (!_local3) {
return(false);
}
_local2++;
}
return(true);
}
static function isInCol(bnum) {
var _local2 = bnum;
var _local1;
var kk;
var fnd;
_local1 = 0;
while (_local1 <= (colNums.length - 1)) {
if (colNums[_local1] == colNum) {
if ((colDisks1[_local1] == _local2) || (colDisks2[_local1] == _local2)) {
return(true);
}
}
_local1++;
}
return(false);
}
static function clearTimesArrays() {
var _local1;
var _local2 = new Array();
_local1 = 0;
while (_local1 <= (times.length - 1)) {
_local2 = times[_local1];
_local2.splice(0);
_local1++;
}
times.splice(0);
timesMin.splice(0);
timesNum1 = 0;
timesNum2 = 0;
}
static function addToTimesArray(rnum) {
var _local1;
var _local2 = new Array();
_local1 = 0;
while (_local1 <= 99) {
_local2.push(MAXCOLTIME);
_local1++;
}
times.push(_local2);
timesMin.push(MAXCOLTIME);
timesNum1 = timesMin.length;
timesNum2 = rnum;
}
static function setNoTimesFor(tnum, rnum) {
var _local2 = tnum;
var _local3 = rnum;
var _local1;
timesMin[_local2] = -1;
_local1 = 0;
while (_local1 <= (timesNum2 - 1)) {
if (_local1 != _local3) {
times[_local2][_local1] = -1;
}
_local1++;
}
_local1 = 0;
while (_local1 <= (timesNum1 - 1)) {
if (_local1 != _local2) {
times[_local1][_local3] = -1;
timesMin[_local1] = -1;
}
_local1++;
}
}
static function addTimesFor() {
var _local1;
var _local2;
var tmpt1 = new Array();
var _local3 = new Array();
timesNum1++;
timesNum2++;
_local1 = 0;
while (_local1 <= 99) {
tmpt1.push(MAXCOLTIME);
_local3.push(MAXCOLTIME);
_local1++;
}
if (timesNum1 > times.length) {
times.push(tmpt1);
timesMin.push(MAXCOLTIME);
}
times[timesNum1 - 1] = _local3;
timesMin[timesNum1 - 1] = MAXCOLTIME;
_local1 = 0;
while (_local1 <= (timesNum1 - 1)) {
timesMin[_local1] = MAXCOLTIME;
_local2 = 0;
while (_local2 <= (timesNum2 - 1)) {
times[_local1][_local2] = MAXCOLTIME;
_local2++;
}
_local1++;
}
}
static function delTimesFor(tnum, rnum) {
var _local2 = tnum;
var _local3 = rnum;
var _local1;
if (_local2 != -1) {
timesMin[_local2] = timesMin[timesNum1 - 1];
_local1 = 0;
while (_local1 <= (timesNum2 - 1)) {
times[_local2][_local1] = times[timesNum1 - 1][_local1];
_local1++;
}
timesNum1--;
}
_local1 = 0;
while (_local1 <= (timesNum1 - 1)) {
times[_local1][_local3] = times[_local1][timesNum2 - 1];
if (timesMin[_local1] != MAXCOLTIME) {
timesMin[_local1] = -2;
}
_local1++;
}
timesNum2--;
}
static function setTimesForTwo(t1num, r1num, t2num, r2num, v) {
var _local1 = v;
var _local2 = t2num;
var _local3 = t1num;
if (_local3 != -1) {
if (timesMin[_local3] != -2) {
if (_local1 < timesMin[_local3]) {
timesMin[_local3] = _local1;
}
}
times[_local3][r2num] = _local1;
}
if (_local2 != -1) {
if (timesMin[_local2] != -2) {
if (_local1 < timesMin[_local2]) {
timesMin[_local2] = _local1;
}
}
times[_local2][r1num] = _local1;
}
}
static function setTimesMins() {
var _local1;
var k;
var _local2;
var _local3;
var ta;
k = 0;
while (k <= (timesNum1 - 1)) {
if (timesMin[k] == -2) {
_local2 = MAXCOLTIME;
ta = times[k];
_local1 = 0;
while (_local1 <= (timesNum2 - 1)) {
_local3 = ta[_local1];
if (_local3 < _local2) {
_local2 = _local3;
}
_local1++;
}
timesMin[k] = _local2;
}
k++;
}
}
static var colDisks1 = new Array();
static var colDisks2 = new Array();
static var colNums = new Array();
static var tmpColDisks1 = new Array();
static var tmpColDisks2 = new Array();
static var tmpColNums = new Array();
static var rotColDisks1 = new Array();
static var rotColDisks2 = new Array();
static var playLevel = -1;
static var timesNum1 = 0;
static var timesNum2 = 0;
static var times = new Array();
static var timesMin = new Array();
static var frameNum = 0;
static var deletedDisks = new Array();
}
Symbol 380 MovieClip [__Packages.Settings] Frame 0
class Settings
{
static var levelNum, saves, lastLevel;
function Settings () {
}
static function Init() {
var k;
var tmpO;
var mc;
levels.splice(0);
ExtInit();
levelNum = levels.length;
readSaves();
SharedVals.frameNum = 0;
}
static function getStr() {
var _local1;
var _local2;
_local2 = "";
_local1 = 0;
while (_local1 <= (playedScores.length - 1)) {
_local2 = _local2 + (String(playedScores[_local1]) + ";");
_local1++;
}
return(_local2);
}
static function fillScores(t, n) {
var _local3 = new String(t);
var _local1;
var _local2;
playedScores.splice(0);
_local1 = -1;
_local2 = _local3.indexOf(";", 0);
if (_local2 >= 0) {
do {
playedScores.push(Number(_local3.substring(_local1 + 1, _local2)));
_local1 = _local2;
_local2 = _local3.indexOf(";", _local1 + 1);
} while (_local2 >= 0);
}
_local2 = playedScores.length - 1;
_local1 = _local2;
while (_local1 <= (n - 1)) {
playedScores.push(-1);
_local1++;
}
}
static function readSaves() {
var k0;
var k;
saves = SharedObject.getLocal("saves4");
if (saves.data.inited != 224) {
trace(saves.data.inited);
lastLevel = 0;
playedScores.splice(0);
fillScores("", levelNum);
saves.data.inited = 224;
saves.data.lastLevel = lastLevel;
saves.data.playedScores = getStr();
saves.data.games_played = 0;
saves.data.games_win = 0;
saves.data.games_lost = 0;
saves.flush();
} else {
lastLevel = saves.data.lastLevel;
fillScores(saves.data.playedScores, levelNum);
k0 = playedScores.length;
}
}
static function writeSaves() {
saves.data.playedScores = getStr();
saves.data.lastLevel = lastLevel;
saves.flush();
}
static function setLastLevel(n, sc) {
var _local1 = n;
if (_local1 > lastLevel) {
lastLevel = _local1;
}
if (sc > playedScores[_local1 - 1]) {
playedScores[_local1 - 1] = sc;
}
writeSaves();
}
static function ExtInit() {
levelNum = 25;
levels.push("-100,80,20,;-100,120,20,;-100,160,20,;-100,200,20,;-100,240,20,;>140,80,0,2000,0,;220,80,0,2001,0,;300,80,0,2002,0,;380,80,0,2003,0,;140,240,0,2004,0,;220,240,0,2005,0,;300,240,0,2006,0,;380,240,0,2007,0,;120,120,0,2008,0,;160,120,0,2009,0,;200,120,0,2010,0,;240,120,0,2011,0,;280,120,0,2012,0,;320,120,0,2013,0,;360,120,0,2014,0,;400,120,0,2015,0,;120,200,0,2016,0,;160,200,0,2017,0,;200,200,0,2018,0,;240,200,0,2019,0,;280,200,0,2020,0,;320,200,0,2021,0,;360,200,0,2022,0,;400,200,0,2023,0,;260,160,0,2024,1,;300,160,0,2025,1,;100,160,0,2026,1,;140,160,0,2027,1,;180,160,0,2028,1,;220,160,0,2029,1,;340,160,0,2030,1,;380,160,0,2031,1,;420,160,0,2032,1,;");
levels.push("-120,100,20,;-120,140,10,;-120,180,20,;-120,220,10,;>140,100,0,2000,0,;260,100,0,2001,0,;380,100,0,2002,0,;120,140,0,2003,0,;160,140,0,2004,0,;240,140,0,2005,0,;280,140,0,2006,0,;360,140,0,2007,0,;400,140,0,2008,0,;140,180,0,2009,0,;100,180,0,2010,0,;180,180,0,2011,0,;220,180,0,2012,0,;260,180,0,2013,0,;300,180,0,2014,0,;340,180,0,2015,0,;380,180,0,2016,0,;420,180,0,2017,0,;120,220,0,2018,1,;160,220,0,2019,1,;80,220,0,2020,1,;200,220,0,2021,1,;240,220,0,2022,1,;280,220,0,2023,1,;320,220,0,2024,1,;360,220,0,2025,1,;400,220,0,2026,1,;440,220,0,2027,1,;");
levels.push("-120,100,20,;-120,180,20,;-140,260,20,;-120,220,20,;-120,140,20,;>120,140,0,2000,0,;200,140,0,2001,0,;120,220,0,2002,0,;200,220,0,2003,0,;140,180,0,2004,0,;180,180,0,2005,0,;160,180,0,2006,1,;320,140,0,2007,0,;400,140,0,2008,0,;320,220,0,2009,0,;400,220,0,2010,0,;340,180,0,2011,0,;380,180,0,2012,0,;360,180,0,2013,1,;220,180,0,2014,0,;300,180,0,2015,0,;240,180,0,2016,0,;280,180,0,2017,0,;260,180,0,2018,1,;");
levels.push("-120,100,20,;-120,140,20,;-120,200,20,;-120,240,20,;-120,160,20,;-120,180,20,;>140,100,0,2000,0,;260,100,0,2001,0,;140,240,0,2002,0,;260,240,0,2003,0,;120,140,0,2004,0,;160,140,0,2005,0,;240,140,0,2006,0,;280,140,0,2007,0,;120,200,0,2008,0,;160,200,0,2009,0,;240,200,0,2010,0,;280,200,0,2011,0,;100,160,0,2012,1,;140,180,0,2013,1,;180,160,0,2014,1,;220,180,0,2015,1,;260,160,0,2016,1,;300,180,0,2017,1,;380,100,0,2018,0,;380,240,0,2019,0,;360,140,0,2020,0,;400,140,0,2021,0,;360,200,0,2022,0,;400,200,0,2023,0,;340,160,0,2024,1,;380,180,0,2025,1,;420,160,0,2026,1,;");
levels.push("-140,100,20,;-140,140,20,;-140,200,20,;-140,240,20,;-120,160,20,;-140,180,20,;>220,100,0,2000,0,;260,100,0,2001,0,;220,240,0,2002,0,;260,240,0,2003,0,;200,200,0,2004,0,;240,200,0,2005,0,;280,200,0,2006,0,;200,140,0,2007,0,;240,140,0,2008,0,;280,140,0,2009,0,;180,100,0,2010,1,;300,100,0,2011,1,;180,240,0,2012,1,;300,240,0,2013,1,;180,160,0,2014,1,;220,180,0,2015,1,;260,160,0,2016,1,;300,180,0,2017,1,;");
levels.push("-120,200,10,;-120,180,10,;-120,120,10,;-140,80,10,;-120,140,10,;-120,260,10,;-120,240,10,;-120,160,10,;-100,220,10,;>150,80,0,2000,0,;190,80,0,2001,0,;230,200,0,2004,0,;230,80,0,2006,0,;270,80,0,2007,0,;270,200,0,2009,0,;310,80,0,2012,0,;350,80,0,2013,0,;190,140,0,2008,0,;310,140,0,2009,0,;230,140,0,2010,0,;270,140,0,2011,0,;170,120,0,2013,1,;330,120,0,2014,1,;210,120,0,2015,0,;250,120,0,2016,0,;290,120,0,2017,0,;250,180,0,2018,0,;210,180,0,2019,0,;290,180,0,2020,0,;250,240,0,2021,0,;230,140,0,2022,1,;270,140,0,2023,1,;250,200,0,2024,1,;");
levels.push("-100,80,20,;-100,100,20,;-100,120,20,;-100,140,20,;-100,160,20,;-100,180,20,;-100,200,20,;-100,220,20,;-100,240,20,;-100,260,20,;-100,280,20,;-100,60,20,;-100,40,20,;>240,40,0,2000,0,;240,280,0,2001,0,;120,160,0,2002,0,;360,160,0,2003,0,;220,60,0,2004,0,;260,60,0,2005,0,;220,260,0,2006,0,;260,260,0,2007,0,;140,120,0,2008,0,;140,200,0,2009,0,;340,120,0,2010,0,;340,200,0,2011,0,;240,80,0,2012,0,;200,80,0,2013,0,;280,80,0,2014,0,;160,100,0,2015,0,;160,160,0,2016,0,;160,220,0,2017,0,;320,220,0,2018,0,;320,160,0,2019,0,;320,100,0,2020,0,;200,240,0,2021,0,;240,240,0,2022,0,;280,240,0,2023,0,;180,120,0,2024,1,;220,120,0,2025,1,;260,120,0,2026,1,;300,120,0,2027,1,;220,200,0,2028,1,;260,200,0,2029,1,;180,200,0,2030,1,;300,200,0,2031,1,;");
levels.push("-120,80,20,;-120,160,20,;-120,240,20,;-120,200,20,;-120,120,20,;>140,80,50,2000,0,;200,80,50,2001,0,;260,80,50,2002,0,;320,80,50,2003,0,;380,80,50,2004,0,;140,160,50,2005,0,;200,160,50,2006,0,;260,160,50,2007,0,;320,160,50,2008,0,;380,160,50,2009,0,;140,240,50,2010,0,;200,240,50,2011,0,;260,240,50,2012,0,;320,240,50,2013,0,;380,240,50,2014,0,;140,200,-50,2015,0,;200,200,-50,2016,0,;260,200,-50,2017,0,;320,200,-50,2018,0,;380,200,-50,2019,0,;140,120,-50,2020,0,;200,120,-50,2021,0,;260,120,-50,2022,0,;320,120,-50,2023,0,;380,120,-50,2024,0,;140,160,0,2025,1,;200,160,0,2026,1,;260,160,0,2027,1,;320,160,0,2028,1,;380,160,0,2029,1,;");
levels.push("-120,80,20,;-120,240,20,;-120,120,20,;-120,200,20,;-120,160,20,;>120,80,0,2000,0,;120,240,0,2001,0,;400,240,0,2002,0,;400,80,0,2003,0,;160,80,0,2004,0,;360,80,0,2005,0,;160,240,0,2006,0,;360,240,0,2007,0,;240,80,0,2008,0,;280,80,0,2009,0,;240,240,0,2010,0,;280,240,0,2011,0,;140,120,0,2012,0,;260,120,0,2013,0,;380,120,0,2014,0,;140,200,0,2015,0,;260,200,0,2016,0,;380,200,0,2017,0,;120,160,0,2018,1,;160,160,0,2019,0,;240,160,0,2020,0,;280,160,0,2021,0,;360,160,0,2022,0,;400,160,0,2023,1,;200,120,0,2024,0,;320,120,0,2025,0,;200,200,0,2026,0,;320,200,0,2027,0,;200,160,0,2028,0,;320,160,0,2029,0,;180,160,0,2030,1,;220,160,0,2031,1,;300,160,0,2032,1,;340,160,0,2033,1,;");
levels.push("-120,240,20,;-120,60,20,;-120,80,20,;-120,100,20,;-120,120,20,;-120,160,20,;-120,200,20,;-120,220,20,;-120,260,20,;>240,60,0,2000,0,;240,260,0,2001,0,;220,80,0,2002,0,;260,80,0,2003,0,;220,240,0,2004,0,;260,240,0,2005,0,;200,100,0,2006,0,;240,100,0,2007,0,;280,100,0,2008,0,;200,220,0,2009,0,;240,220,0,2010,0,;280,220,0,2011,0,;180,120,0,2012,0,;220,120,0,2013,0,;260,120,0,2014,0,;300,120,0,2015,0,;180,200,0,2016,0,;220,200,0,2017,0,;260,200,0,2018,0,;300,200,0,2019,0,;160,160,0,2020,1,;200,160,0,2021,1,;240,160,0,2022,1,;280,160,0,2023,1,;320,160,0,2024,1,;100,120,0,2025,0,;380,120,0,2026,0,;100,200,0,2027,0,;380,200,0,2028,0,;120,160,0,2029,1,;360,160,0,2030,1,;");
levels.push("-100,60,20,;-100,120,20,;-100,160,10,;-100,200,20,;-100,260,20,;-120,100,20,;-120,220,20,;>140,60,0,2000,0,;180,60,0,2001,0,;140,120,0,2002,0,;180,120,0,2003,0,;340,60,0,2004,0,;380,60,0,2005,0,;340,120,0,2006,0,;380,120,0,2007,0,;140,200,0,2008,0,;180,200,0,2009,0,;140,260,0,2010,0,;180,260,0,2011,0,;340,200,0,2012,0,;380,200,0,2013,0,;340,260,0,2014,0,;380,260,0,2015,0,;240,120,0,2016,0,;280,120,0,2017,0,;240,200,0,2018,0,;280,200,0,2019,0,;160,100,0,2020,1,;360,100,0,2021,1,;160,220,0,2022,1,;360,220,0,2023,1,;200,160,0,2024,0,;320,160,0,2025,0,;260,160,0,2026,0,;220,160,0,2027,0,;300,160,0,2028,0,;240,160,0,2029,1,;280,160,0,2030,1,;");
levels.push("-120,80,20,;-100,140,20,;-120,200,20,;-120,220,20,;-120,260,20,;-100,100,10,;-120,180,10,;-100,240,10,;-140,160,10,;>140,80,0,2000,0,;100,140,0,2001,0,;180,140,0,2002,0,;140,200,0,2003,0,;420,140,0,2004,0,;340,140,0,2005,0,;380,80,0,2006,0,;380,200,0,2007,0,;260,140,0,2008,0,;220,200,0,2009,0,;300,200,0,2010,0,;260,260,0,2011,0,;120,100,0,2012,0,;160,100,0,2013,0,;280,240,0,2014,0,;120,180,0,2015,0,;160,180,0,2016,0,;240,240,0,2017,0,;240,160,0,2018,0,;280,160,0,2019,0,;360,100,0,2020,0,;400,100,0,2021,0,;360,180,0,2022,0,;400,180,0,2023,0,;140,140,0,2024,1,;260,200,0,2025,1,;380,140,0,2026,1,;240,80,0,2027,0,;280,80,0,2028,0,;220,100,0,2029,1,;300,100,0,2030,1,;120,260,0,2031,0,;160,260,0,2032,0,;100,240,0,2033,1,;180,240,0,2034,1,;360,260,0,2035,0,;400,260,0,2036,0,;340,240,0,2037,1,;420,240,0,2038,1,;");
levels.push("-120,80,20,;-120,140,20,;-120,200,20,;-120,260,20,;-140,120,20,;-140,220,20,;-140,160,20,;-100,180,20,;-120,100,20,;-120,240,20,;>240,80,0,2000,0,;240,260,0,2001,0,;200,120,0,2002,0,;280,120,0,2003,0,;200,220,0,2004,0,;280,220,0,2005,0,;160,160,0,2006,0,;320,180,0,2007,0,;120,200,0,2008,0,;360,140,0,2009,0,;160,260,0,2010,0,;320,80,0,2011,0,;220,100,0,2012,0,;180,140,0,2013,0,;140,180,0,2014,0,;260,240,0,2015,0,;300,200,0,2016,0,;340,160,0,2017,0,;180,240,0,2018,0,;340,100,0,2019,0,;300,100,0,2020,0,;140,240,0,2021,0,;220,240,0,2022,0,;260,100,0,2023,0,;240,120,0,2024,1,;240,220,0,2025,1,;160,220,0,2026,1,;320,120,0,2027,1,;160,160,0,2028,1,;320,180,0,2029,1,;");
levels.push("-120,80,20,;-120,140,20,;-120,220,20,;-120,260,20,;-120,120,20,;-120,240,20,;-60,200,20,;-140,160,20,;>120,140,0,2000,0,;80,80,0,2001,0,;360,140,0,2002,0,;80,200,0,2003,0,;120,260,0,2004,0,;160,200,0,2005,0,;200,140,0,2006,0,;160,80,0,2007,0,;240,80,0,2008,0,;280,140,0,2009,0,;240,200,0,2010,0,;200,260,0,2011,0,;280,260,0,2012,0,;320,200,0,2013,0,;320,80,0,2014,0,;400,200,0,2015,0,;400,80,0,2016,0,;360,260,0,2017,0,;100,120,0,2018,0,;140,120,0,2019,0,;180,120,0,2020,0,;220,120,0,2021,0,;260,120,0,2022,0,;300,120,0,2023,0,;340,120,0,2024,0,;380,120,0,2025,0,;100,220,0,2026,1,;140,220,0,2027,1,;180,220,0,2028,1,;220,220,0,2029,1,;260,220,0,2030,1,;300,220,0,2031,1,;340,220,0,2032,1,;380,220,0,2033,1,;120,160,0,2034,1,;160,160,0,2035,1,;200,160,0,2036,1,;240,160,0,2037,1,;280,160,0,2038,1,;320,160,0,2039,1,;360,160,0,2040,1,;");
levels.push("-140,80,20,;-140,120,20,;-140,200,20,;-140,240,20,;-120,160,20,;>340,160,0,2004,0,;180,160,0,2005,0,;220,160,0,2006,0,;260,160,0,2007,0,;300,160,0,2008,0,;140,240,0,2009,0,;180,240,0,2010,0,;220,240,0,2011,0,;260,240,0,2012,0,;300,240,0,2013,0,;340,240,0,2014,0,;380,240,0,2021,0,;220,80,0,2012,0,;260,80,0,2013,0,;300,80,0,2014,0,;200,120,0,2015,1,;240,120,0,2016,1,;280,120,0,2017,1,;320,120,0,2018,1,;160,200,0,2019,1,;200,200,0,2020,1,;240,200,0,2021,1,;280,200,0,2022,1,;320,200,0,2023,1,;360,200,0,2024,1,;");
levels.push("-140,100,20,;-140,160,20,;-120,220,20,;-140,140,20,;-100,180,20,;>120,160,0,2000,0,;160,160,0,2001,0,;280,160,0,2002,0,;200,160,0,2003,0,;240,160,0,2004,0,;320,160,0,2005,0,;360,160,0,2006,0,;160,100,0,2007,0,;200,100,0,2008,0,;240,100,0,2009,0,;160,220,0,2010,0,;200,220,0,2011,0,;280,100,0,2012,0,;320,100,0,2013,0,;360,100,0,2014,0,;240,220,0,2015,0,;280,220,0,2016,0,;320,220,0,2017,0,;360,220,0,2018,0,;400,160,0,2019,0,;140,140,0,2020,0,;180,180,0,2021,0,;220,140,0,2022,0,;260,180,0,2023,0,;300,140,0,2024,0,;340,180,0,2025,0,;380,140,0,2026,0,;140,180,0,2027,1,;180,140,0,2028,1,;220,180,0,2029,1,;260,140,0,2030,1,;300,180,0,2031,1,;340,140,0,2032,1,;380,180,0,2033,1,;");
levels.push("-140,80,20,;-140,160,20,;-140,240,20,;-140,120,20,;-140,200,20,;>140,80,0,2000,0,;360,80,0,2001,0,;140,240,0,2002,0,;360,240,0,2003,0,;180,160,0,2004,0,;320,160,0,2005,0,;220,80,0,2006,0,;280,80,0,2007,0,;220,240,0,2008,0,;280,240,0,2009,0,;160,120,0,2010,0,;200,120,0,2011,0,;160,200,0,2012,0,;200,200,0,2013,0,;300,120,0,2014,0,;340,120,0,2015,0,;300,200,0,2016,0,;340,200,0,2017,0,;180,160,0,2018,1,;320,160,0,2019,1,;120,120,0,2021,0,;120,200,0,2022,0,;140,160,0,2023,1,;380,120,0,2024,0,;380,200,0,2025,0,;360,160,0,2026,1,;");
levels.push("-120,80,20,;-120,160,20,;-120,240,20,;-120,120,20,;-120,200,20,;>180,80,0,2000,0,;220,80,0,2001,1,;260,80,0,2002,1,;300,80,0,2003,0,;180,240,0,2004,0,;220,240,0,2005,1,;260,240,0,2006,1,;300,240,0,2007,0,;140,120,-90,2008,0,;140,200,-90,2009,0,;340,120,90,2010,0,;340,200,90,2011,0,;180,120,-50,2012,0,;300,120,50,2013,0,;180,200,50,2014,0,;300,200,-50,2015,0,;200,160,0,2016,0,;280,160,0,2017,0,;240,160,0,2018,0,;220,160,0,2019,0,;260,160,0,2020,0,;240,160,0,2021,1,;");
levels.push("-100,80,20,;-100,120,20,;-120,200,20,;-120,240,20,;-120,160,20,;-120,140,20,;-100,180,20,;>240,80,0,2000,0,;160,80,0,2001,0,;320,80,0,2002,0,;160,240,0,2003,0,;240,240,0,2004,0,;320,240,0,2005,0,;120,160,0,2006,0,;360,160,0,2007,0,;140,120,0,2008,0,;180,120,0,2009,0,;220,120,0,2010,0,;260,120,0,2011,0,;300,120,0,2012,0,;340,120,0,2013,0,;140,200,0,2014,0,;180,200,0,2015,0,;220,200,0,2016,0,;260,200,0,2017,0,;300,200,0,2018,0,;340,200,0,2019,0,;160,160,0,2020,1,;200,160,0,2021,0,;240,160,0,2022,0,;280,160,0,2023,0,;320,160,0,2024,1,;220,140,0,2025,0,;260,180,0,2026,0,;220,180,0,2027,1,;260,140,0,2028,1,;");
levels.push("-140,80,20,;-140,120,20,;-140,200,20,;-140,240,20,;-140,160,20,;>260,240,0,2000,0,;260,80,0,2001,0,;140,80,0,2002,0,;380,80,0,2003,0,;140,240,0,2004,0,;380,240,0,2005,0,;200,120,0,2006,0,;320,120,0,2007,0,;200,200,0,2008,0,;320,200,0,2009,0,;140,160,0,2010,0,;260,160,0,2011,0,;380,160,0,2012,0,;160,120,0,2013,0,;360,120,0,2014,0,;160,200,0,2015,0,;360,200,0,2016,0,;240,120,0,2017,0,;280,120,0,2018,0,;240,200,0,2019,0,;280,200,0,2020,0,;180,160,0,2021,0,;340,160,0,2022,0,;220,160,0,2023,0,;300,160,0,2024,0,;200,160,10,2025,1,;320,160,10,2026,1,;260,160,10,2027,1,;");
levels.push("-100,100,20,;-100,160,20,;-100,220,20,;-120,140,20,;-120,180,20,;>120,100,0,2000,0,;160,100,0,2001,0,;140,160,0,2002,0,;120,220,0,2003,0,;160,220,0,2004,0,;240,100,0,2005,0,;280,100,0,2006,0,;240,220,0,2007,0,;260,160,0,2008,0,;280,220,0,2009,0,;360,100,0,2010,0,;400,100,0,2011,0,;380,160,0,2012,0,;360,220,0,2013,0,;400,220,0,2014,0,;120,180,50,2015,0,;160,140,50,2016,0,;140,100,50,2017,1,;140,220,50,2018,1,;260,100,50,2019,1,;280,140,50,2020,1,;240,180,50,2021,1,;260,220,50,2022,1,;380,100,50,2023,1,;400,140,50,2024,0,;360,180,50,2025,0,;380,220,50,2026,1,;200,160,50,2027,0,;320,160,50,2028,0,;80,160,50,2029,0,;440,160,50,2030,0,;100,160,0,2031,1,;420,160,0,2032,1,;180,160,0,2033,1,;340,160,0,2034,1,;");
levels.push("-120,100,20,;-120,140,20,;-120,180,20,;-120,220,20,;-120,260,20,;-120,60,20,;>220,60,0,2000,0,;200,100,0,2001,0,;180,140,0,2002,0,;160,180,0,2003,0,;140,220,0,2004,0,;120,260,0,2005,1,;200,260,0,2006,0,;220,220,0,2007,0,;240,180,0,2008,0,;260,140,0,2009,0,;280,100,0,2010,0,;300,60,0,2011,1,;380,60,0,2012,0,;360,100,0,2013,0,;340,140,0,2014,0,;320,180,0,2015,0,;300,220,0,2016,0,;280,260,0,2017,1,;");
levels.push("-100,100,10,;-120,120,10,;-120,180,10,;-100,220,10,;-120,140,10,;-120,160,10,;>160,100,0,2000,0,;200,100,0,2001,0,;240,100,0,2002,0,;280,100,0,2003,0,;320,100,0,2004,0,;120,100,0,2005,0,;360,100,0,2006,0,;120,220,0,2007,0,;160,220,0,2008,0,;200,220,0,2009,0,;240,220,0,2010,0,;280,220,0,2011,0,;320,220,0,2012,0,;360,220,0,2013,0,;220,120,0,2014,0,;140,120,0,2015,0,;180,120,0,2016,0,;260,120,0,2017,0,;300,120,0,2018,0,;340,120,0,2019,0,;140,180,0,2020,0,;220,180,0,2021,0,;180,180,0,2022,0,;260,180,0,2023,0,;300,180,0,2024,0,;340,180,0,2025,0,;160,140,0,2026,0,;200,140,0,2027,0,;240,140,0,2028,0,;280,140,0,2029,0,;320,140,0,2030,0,;180,160,0,2031,1,;220,160,0,2032,1,;260,160,0,2033,1,;300,160,0,2034,1,;");
levels.push("-140,160,20,;-140,200,20,;-120,240,20,;-100,120,20,;>180,160,0,2000,0,;200,200,0,2001,0,;220,160,0,2002,0,;240,200,0,2003,0,;260,160,0,2004,0,;280,200,0,2005,0,;300,160,0,2006,0,;320,200,0,2007,0,;340,160,0,2008,0,;160,120,0,2009,1,;200,120,0,2010,1,;240,120,0,2011,1,;280,120,0,2012,1,;320,120,0,2013,1,;360,120,0,2014,1,;");
levels.push("-120,120,20,;-120,140,20,;-100,160,20,;-100,180,20,;-120,200,20,;-140,220,20,;-100,100,20,;>240,100,0,2000,0,;220,120,0,2001,0,;260,120,0,2002,0,;240,140,0,2003,0,;200,140,0,2004,0,;280,140,0,2005,0,;220,160,0,2006,0,;260,160,0,2007,0,;180,160,0,2008,0,;300,160,0,2009,0,;200,180,0,2010,0,;240,180,0,2011,0,;280,180,0,2012,0,;320,180,0,2014,0,;160,180,0,2015,0,;180,200,0,2016,0,;140,200,0,2017,0,;220,200,0,2018,0,;260,200,0,2019,0,;300,200,0,2020,0,;340,200,0,2021,0,;120,220,0,2022,1,;160,220,0,2023,1,;200,220,0,2024,1,;240,220,0,2025,1,;280,220,0,2026,1,;320,220,0,2027,1,;360,220,0,2028,1,;");
}
static var playTime = 180;
static var levels = new Array();
static var playedScores = new Array();
static var snapZoom = 1;
}
Symbol 381 MovieClip [__Packages.Tip] Frame 0
class Tip extends MovieClip
{
function Tip () {
var _local1 = this;
super();
var _local2 = _local1.FindCard();
if (_local2 == undefined) {
_local1.tip_arrow._visible = false;
} else {
_local1.tip_arrow._x = _local2._x + 25;
_local1.tip_arrow._y = _local2._y + 4;
if (_local1.tip_arrow._x > 275) {
_local1.part._x = 148;
} else {
_local1.part._x = 402;
}
}
}
function FindCard() {
var top_card_number = _global.Game.toppest.card_number;
var i = 0;
while (i < 52) {
var match_card_mc = eval ("_root.phs2.rect" + i);
var dif_num_cards = Math.abs(top_card_number - match_card_mc.card_number);
if ((match_card_mc.isShowing && (match_card_mc.exist)) && ((dif_num_cards == 1) || (dif_num_cards == 12))) {
return(match_card_mc);
}
i++;
}
return(undefined);
}
}
Symbol 382 MovieClip [__Packages.Levels] Frame 0
class Levels
{
static var pan, semSelectedMC, selectedMC, wait, navPrv, navNext;
function Levels () {
}
static function deleteSmalls() {
var _local1;
var _local3;
var _local2;
_local3 = 1;
while (_local3 <= 5) {
_local1 = 1;
while (_local1 <= 5) {
_local2 = pan[("table" + String(_local3)) + String(_local1)];
_local2.phs.deleteMCs();
_local2.removeMovieClip();
_local1++;
}
_local3++;
}
}
static function createSmalls() {
//var _local2 = this;
var _local3;
var y;
var _local1;
y = 1;
while (y <= 5) {
_local3 = 1;
while (_local3 <= 5) {
_local1 = pan.attachMovie("smallTableSymbol", ("table" + String(y)) + String(_local3), (y * 6) + _local3);
_local1.val = -1;
_local1._xscale = 25;
_local1._yscale = 25;
_local1._x = 18 + ((_local3 - 1) * 60);
_local1._y = 50 + ((y - 1) * _local1._height);
_local1.onRollOver = function () {
if (Levels.isSelected && (Levels.selectedMC._name == this._name)) {
return(undefined);
}
_root.hoverSound.start();
Levels.semSelectTable(this);
};
_local1.onRollOut = function () {
if ((!Levels.isSemSelected) || (Levels.semSelectedMC._name != this._name)) {
return(undefined);
}
Levels.isSemSelected = false;
if (Levels.isSelected) {
Levels.selectTable(Levels.selectedMC);
}
};
_local1.onPress = function () {
var _local1 = this;
var _local2 = _root;
if (Levels.isSelected) {
if (!_local1.playable) {
_local2.non_playable_sfx.start(0, 1);
}
if ((Levels.selectedMC._name == _local1._name) && (_local1.playable)) {
_local2.playSound.start();
Levels.isInited1 = false;
Levels.isInited2 = false;
Levels.deleteSmalls();
_local2.gotoAndPlay("prePlayFrame");
} else {
_local2.levelSeleclSound.start();
Levels.selectedMC.sel._visible = false;
Levels.selectTable(_local1);
}
} else {
_local2.levelSeleclSound.start();
Levels.selectTable(_local1);
}
};
_local3++;
}
y++;
}
}
static function selectTableNum(n) {
var _local2;
var _local3;
var _local1;
_local3 = 1;
while (_local3 <= 5) {
_local2 = 1;
while (_local2 <= 5) {
_local1 = pan[("table" + String(_local3)) + String(_local2)];
if (_local1.val == n) {
selectTable(_local1);
} else {
_local1.sel._visible = false;
}
_local2++;
}
_local3++;
}
}
static function semSelectTable(tt) {
var _local1 = tt;
isSemSelected = true;
pan.btnPlay._visible = false;
semSelectedMC = _local1;
pan.previewTable.isThumb = false;
pan.previewTable.resetTable(semSelectedMC.initString, semSelectedMC.playScore, semSelectedMC.playable, semSelectedMC.prvPlayed);
_root.txtTotalLevels = (("LEVEL " + String(_local1.val)) + " OF ") + String(Settings.levels.length);
pan.previewTable.okSign.gotoAndStop(_root.AwardType(_local1.val - 1));
}
static function selectTable(tt) {
var _local1 = tt;
isSelected = true;
pan.btnPlay._visible = _local1.playable;
selectedLevel = _local1.val;
SharedVals.playLevel = selectedLevel;
selectedMC = _local1;
selectedMC.sel._visible = true;
pan.previewTable.isThumb = false;
pan.previewTable.resetTable(selectedMC.initString, selectedMC.playScore, selectedMC.playable, selectedMC.prvPlayed);
_root.txtTotalLevels = (("LEVEL " + String(_local1.val)) + " OF ") + String(Settings.levels.length);
pan.previewTable.okSign.gotoAndStop(_root.AwardType(_local1.val - 1));
}
static function resetTable(tnum, s1, t, p, prvp) {
var _local2 = tnum;
var x;
var _local3;
var _local1;
_local3 = int((_local2 - 1) / 5) + 1;
x = ((_local2 - 1) % 5) + 1;
_local1 = pan[("table" + String(_local3)) + String(x)];
_local1.val = (firstLevel - 1) + _local2;
_local1.resetTable(s1, t, p, prvp);
_local1._visible = s1 != "";
}
static function hidePan() {
pan.removeMovieClip();
}
static function Init2() {
var _local1;
var _local2;
var _local3;
if (isInited2) {
} else {
isInited2 = true;
_local2 = 1;
while (_local2 <= 5) {
_local1 = 1;
while (_local1 <= 5) {
_local3 = pan[("table" + String(_local2)) + String(_local1)];
_local3.phs.doInit();
_local1++;
}
_local2++;
}
pan.previewTable.phs.doInit();
}
}
static function Init() {
var _local3 = _root;
_local3.total_score = 0;
var _local1 = 0;
while (_local1 < 25) {
var _local2 = _global.Settings.playedScores[_local1];
if (_local2 > 0) {
_local3.total_score = _local3.total_score + _local2;
}
_local1++;
}
_local3.total_score_str = String("TOTAL SCORE: " + _local3.total_score);
if (isInited1) {
} else {
isInited1 = true;
pan._visible = false;
wait._visible = true;
createSmalls();
pan.btnPlay.onPress = function () {
_root.playSound.start();
Levels.isInited1 = false;
Levels.isInited2 = false;
Levels.deleteSmalls();
_root.gotoAndPlay("prePlayFrame");
};
pan.btnMenu.onPress = function () {
_root.clickSound.start();
_root.gotoAndStop("startFrame");
};
}
}
static function activate() {
pan.btnPlay._visible = false;
SharedVals.snapShot = true;
if (SharedVals.playLevel == -1) {
SharedVals.playLevel = Settings.lastLevel;
}
if (firstLevel == -1) {
firstLevel = 1;
resetSmalls();
}
if ((selectedLevel <= 0) || (SharedVals.playLevel == selectedLevel)) {
selectedLevel = Math.min(Math.min(SharedVals.playLevel + 1, Settings.lastLevel + 1), Settings.levels.length);
firstLevel = (int((selectedLevel - 1) / 25) * 25) + 1;
resetSmalls();
selectTableNum(selectedLevel);
}
resetSmalls();
navPrv.setValsFor(firstLevel, -1, Settings.levels.length, navPrvPress);
navNext.setValsFor(firstLevel, 1, Settings.levels.length, navNextPress);
pan._visible = true;
wait._visible = false;
}
static function resetSmalls() {
var _local1;
_root.txtLevels = (("LEVELS " + String(firstLevel)) + "-") + String(Math.min(firstLevel + 24, Settings.levels.length));
_local1 = firstLevel;
while (_local1 <= (firstLevel + 24)) {
if (_local1 <= Settings.levels.length) {
resetTable((_local1 - firstLevel) + 1, Settings.levels[_local1 - 1], Settings.playedScores[_local1 - 1], _local1 <= (Settings.lastLevel + 1), _local1 < (Settings.lastLevel + 1));
} else {
resetTable((_local1 - firstLevel) + 1, "", -1, false, false);
}
_local1++;
}
navPrv.setValsFor(firstLevel, -1, Settings.levels.length, navPrvPress);
navNext.setValsFor(firstLevel, 1, Settings.levels.length, navNextPress);
}
static function navPrvPress() {
_root.clickSound.start();
firstLevel = Math.min(Settings.levels.length, firstLevel - 25);
resetSmalls();
selectTable(selectedMC);
}
static function navNextPress() {
_root.clickSound.start();
firstLevel = Math.min(Settings.levels.length, firstLevel + 25);
resetSmalls();
selectTable(selectedMC);
}
static var firstLevel = -1;
static var isSelected = false;
static var isSemSelected = false;
static var selectedLevel = -1;
static var isInited1 = false;
static var isInited2 = false;
}
Symbol 9 MovieClip Frame 1
this._visible = false;
Symbol 15 Button
on (release) {
getURL ("http://www.miniclip.com", "_blank");
}
Symbol 20 MovieClip Frame 2
if (_url.indexOf("http") > -1) {
if (_parent._parent._parent.loadAdNow) {
cacheBuster = getTimer() + random(999999);
showAd = "http://www.miniclip.com/swfcontent/push/didyouknow.swf?cacheBuster" + cacheBuster;
trace("Loading ad: " + showAd);
mcAd.loadMovie(showAd);
} else {
gotoAndPlay(_currentframe - 1);
}
}
Symbol 20 MovieClip Frame 4
if ((mcAd.getBytesTotal() != 0) && (mcAd.getBytesLoaded() == mcAd.getBytesTotal())) {
gotoAndStop ("showAd");
} else {
gotoAndPlay(_currentframe - 1);
}
Symbol 20 MovieClip Frame 12
stop();
Symbol 30 MovieClip Frame 1
stop();
Symbol 30 MovieClip Frame 100
stop();
Symbol 32 MovieClip Frame 1
stop();
Symbol 32 MovieClip Frame 12
_root.play();
_root.isFinished = true;
_parent.stop();
stop();
Symbol 36 Button
on (release) {
getURL ("http://www.miniclip.com/", "_blank");
}
Symbol 37 MovieClip Frame 2
_parent.mcAnimation.play();
stop();
Symbol 37 MovieClip Frame 13
_parent.gotoAndPlay("preload");
stop();
Symbol 53 MovieClip Frame 1
stop();
Symbol 53 MovieClip Frame 60
Symbol 53 MovieClip Frame 121
_parent.mcBackground.play();
stop();
Symbol 54 MovieClip Frame 1
loadAdNow = false;
_root.stop();
play();
Instance of Symbol 9 MovieClip "mcIntro" in Symbol 54 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 54 MovieClip Frame 2
xPos = _x;
yPos = _y;
mcBackground._x = mcBackground._x - xPos;
mcBackground._y = mcBackground._y - yPos;
mcAnimation._x = mcAnimation._x - xPos;
mcAnimation._y = mcAnimation._y - yPos;
var stageWidth = Stage.width;
var stageHeight = Stage.height;
var centerStageX = (stageWidth / 2);
var centerStageY = (stageHeight / 2);
mcBackground._width = stageWidth;
mcBackground._height = stageHeight;
mcAnimation._x = mcAnimation._x + centerStageX;
mcAnimation._y = mcAnimation._y + (centerStageY - (stageHeight / 10));
stop();
Instance of Symbol 32 MovieClip "mcLoadingAnimated" in Symbol 54 MovieClip Frame 2
onClipEvent (load) {
_visible = false;
}
Symbol 54 MovieClip Frame 3
var loadedPercent = int((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
if (loadedPercent == 100) {
_root.play();
stop();
} else {
loadAdNow = true;
mcLoadingAnimated._visible = true;
}
Symbol 54 MovieClip Frame 5
var loadedPercent = int((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
if (loadedPercent < 100) {
mcLoadingAnimated.mcLoading.gotoAndStop(loadedPercent);
mcLoadingAnimated.mcLoading.txtPercentLoaded1 = ("The game is loading (" + loadedPercent) + "%)";
mcLoadingAnimated.mcLoading.txtPercentLoaded2 = ("The game is loading (" + loadedPercent) + "%)";
gotoAndPlay(_currentframe - 1);
} else {
mcLoadingAnimated.play();
stop();
}
Symbol 83 MovieClip [rectSymbol] Frame 1
function deleteMCs() {
numberMC.removeMovieClip();
typeMC.removeMovieClip();
overs.splice(0);
}
function setNumber(n) {
this.n = n;
bigNumber = n;
card_number = (bigNumber % 13) + 1;
typeNum = int(bigNumber / 13) + 1;
}
function makeNumber() {
numberMC.removeMovieClip();
typeMC.removeMovieClip();
if (typeNum == 1) {
typeMC = attachMovie("type1Symbol", "type_mc", 100);
} else if (typeNum == 2) {
typeMC = attachMovie("type2Symbol", "type_mc", 100);
} else if (typeNum == 3) {
typeMC = attachMovie("type3Symbol", "type_mc", 100);
} else if (typeNum == 4) {
typeMC = attachMovie("type4Symbol", "type_mc", 100);
}
typeMC._x = _root.rect.typeMC._x;
typeMC._y = _root.rect.typeMC._y;
numberTxt.text = String(card_number + 1);
switch (card_number) {
case 10 :
numberTxt.text = "J";
break;
case 11 :
numberTxt.text = "Q";
break;
case 12 :
numberTxt.text = "K";
break;
case 13 :
numberTxt.text = "A";
}
if ((typeNum == 1) || (typeNum == 2)) {
numberTxt.textColor = 0;
} else {
numberTxt.textColor = 16711680 /* 0xFF0000 */;
}
}
function showMe(s) {
back._visible = !s;
isShowing = s;
}
var overs = new Array();
var numberMC;
var typeMC;
back.swapDepths(1000);
showMe(false);
stop();
Symbol 94 Button
on (press) {
_global.Game.is_paused = false;
_root.gotoAndPlay("preLevelsFrame");
removeMovieClip(this);
}
Symbol 98 Button
on (press) {
_global.Game.PauseOff();
removeMovieClip(this);
}
Symbol 103 Button
on (press) {
if (_root.sound_on) {
_root.sound_on = false;
_root.set_sfx.setVolume(0);
} else {
_root.sound_on = true;
_root.set_sfx.setVolume(100);
}
}
Symbol 108 MovieClip Frame 1
stop();
Symbol 108 MovieClip Frame 2
stop();
Symbol 112 Button
on (press) {
if (_quality == "HIGH") {
_quality = "LOW";
} else if (_quality == "MEDIUM") {
_quality = "HIGH";
} else {
_quality = "MEDIUM";
}
}
Symbol 119 MovieClip Frame 1
stop();
Symbol 119 MovieClip Frame 2
stop();
Symbol 119 MovieClip Frame 3
stop();
Symbol 123 Button
on (press) {
if (_root.show_tips) {
_root.show_tips = false;
} else {
_root.show_tips = true;
}
}
Symbol 125 Button
on (release) {
getURL ("http://www.miniclip.com", "_blank");
}
Symbol 130 Button
on (press) {
getURL ("http://www.2DPlay.com?gameid=954&ref=miniclip", "_blank");
}
Instance of Symbol 108 MovieClip in Symbol 131 MovieClip [pause_clip] Frame 1
onClipEvent (enterFrame) {
if (_root.sound_on) {
gotoAndStop (1);
} else {
gotoAndStop (2);
}
}
Instance of Symbol 119 MovieClip in Symbol 131 MovieClip [pause_clip] Frame 1
onClipEvent (enterFrame) {
if (_quality == "LOW") {
gotoAndStop (1);
} else if (_quality == "MEDIUM") {
gotoAndStop (2);
} else {
gotoAndStop (3);
}
}
Instance of Symbol 108 MovieClip in Symbol 131 MovieClip [pause_clip] Frame 1
onClipEvent (enterFrame) {
if (_root.show_tips) {
gotoAndStop (1);
} else {
gotoAndStop (2);
}
}
Symbol 133 MovieClip [tableSymbol] Frame 1
function doInit() {
var _local2 = this;
var _local1;
if (inited != true) {
inited = true;
k = 0;
while (k < 52) {
if (!isMain) {
_local1 = attachMovie("rectSymbol_preview", "rect" + String(k), 1000 + k);
} else {
_local1 = attachMovie("rectSymbol", "rect" + String(k), 1000 + k);
_local1.onPress = function () {
Game.pressed(this);
};
}
k++;
}
}
if (isMain) {
reset();
}
}
function reset() {
var _local1 = this;
k = 0;
while (k < 52) {
mc = _local1["rect" + String(k)];
mc._x = place1._x;
mc._y = place1._y;
mc._rotation = 0;
mc.depth = 1000 + k;
mc.swapDepths(mc.depth);
mc.exist = false;
mc.showMe(false);
k++;
}
readyNum = -1;
}
function resetTrace() {
var _local1 = this;
k = 0;
while (k < 52) {
mc = _local1["rect" + String(k)];
mc._x = mc.card_number * 34;
mc._y = 50 * mc.typeNum;
k++;
}
}
function deleteMCs() {
var _local2 = this;
var _local1;
k = 0;
while (k < 52) {
_local1 = _local2["rect" + String(k)];
_local1.deleteMCs();
_local1.removeMovieClip();
k++;
}
}
var readyNum = -1;
var isMain = false;
var dX = 0;
var dY = 0;
var frames = -1;
var exist = true;
rect._visible = false;
stop();
Symbol 149 MovieClip Frame 1
stop();
Symbol 149 MovieClip Frame 2
stop();
Symbol 149 MovieClip Frame 3
stop();
Symbol 150 MovieClip [smallTableSymbol] Frame 1
function resetTable(s, t, p, prvp) {
initString = s;
SharedVals.panel = phs;
SharedVals.table = this;
phs.reset();
if (p) {
Game.setLevel(initString);
}
playScore = t;
prvPlayed = prvp;
playable = p;
okSign.gotoAndStop(_root.AwardType(val - 1));
okSign._visible = prvPlayed;
if (prvPlayed) {
locked._visible = false;
} else {
locked._visible = false;
}
if (!playable) {
locked._visible = true;
}
txt._visible = !((!prvPlayed) && (playable));
}
var playScore;
var initString;
var playable = false;
var prvPlayed = false;
var dStore = new Array();
sel._visible = false;
okSign._visible = false;
stop();
Symbol 160 Button
on (press) {
_root.show_tips = false;
_global.Game.is_paused = false;
_global.Game.playStartTime = getTimer();
_parent.removeMovieClip();
}
Symbol 164 Button
on (press) {
_parent.nextFrame();
}
Symbol 183 MovieClip [window_tip] Frame 1
#initclip 6
Object.registerClass("window_tip", Tip);
#endinitclip
stop();
Symbol 183 MovieClip [window_tip] Frame 2
nextFrame();
Symbol 183 MovieClip [window_tip] Frame 3
stop();
Symbol 183 MovieClip [window_tip] Frame 4
stop();
Symbol 183 MovieClip [window_tip] Frame 5
stop();
Symbol 183 MovieClip [window_tip] Frame 6
stop();
Symbol 183 MovieClip [window_tip] Frame 7
stop();
Symbol 183 MovieClip [window_tip] Frame 8
_root.show_tips = false;
_global.Game.is_paused = false;
_global.Game.playStartTime = getTimer();
this.removeMovieClip();
Symbol 184 MovieClip Frame 1
stop();
Symbol 196 MovieClip Frame 1
stop();
Symbol 209 MovieClip Frame 1
_root.button_sfx.start(0, 1);
Symbol 209 MovieClip Frame 68
gotoAndPlay (45);
Symbol 211 Button
on (press) {
SharedVals.playLevel = -1;
_root.gotoAndPlay("preLevelsFrame");
}
Symbol 215 Button
on (press) {
_root.gotoAndStop("options");
}
Symbol 219 Button
on (press) {
_root.gotoAndStop("help");
}
Symbol 223 Button
on (press) {
_root.gotoAndStop("stats_screen");
}
Symbol 235 MovieClip Frame 1
stop();
Symbol 235 MovieClip Frame 2
stop();
Symbol 235 MovieClip Frame 3
stop();
Symbol 236 MovieClip Frame 1
function resetTable(s, t, p, prvp) {
var _local1 = _root;
initString = s;
SharedVals.panel = phs;
SharedVals.table = this;
phs.reset();
if (p) {
Game.setLevel(initString);
}
playScore = t;
prvPlayed = prvp;
playable = p;
okSign._visible = prvPlayed;
if (prvPlayed) {
_local1.levelScore = "SCORE: " + String(playScore);
locked._visible = false;
} else {
_local1.levelScore = "";
locked._visible = false;
}
if (!playable) {
_local1.levelScore = "LOCKED!";
locked._visible = true;
}
}
var playScore;
var initString;
var playable = false;
var prvPlayed = false;
var dStore = new Array();
okSign._visible = false;
stop();
Symbol 244 MovieClip Frame 1
function setValsFor(n, d, m, f) {
if (d == -1) {
v = n > 1;
}
if (d == 1) {
v = ((n + 25) - 1) < m;
}
if (v) {
_visible = true;
this.onPress = f;
} else {
_visible = false;
delete this.onPress;
}
}
var v;
stop();
Symbol 246 MovieClip Frame 1
function setValsFor(n, d, m, f) {
if (d == -1) {
v = n > 1;
}
if (d == 1) {
v = ((n + 25) - 1) < m;
}
if (v) {
_visible = true;
this.onPress = f;
} else {
_visible = false;
delete this.onPress;
}
}
var v = false;
var fade = 0;
stop();
Symbol 253 Button
on (release) {
getURL ("http://www.2dplay.com/index.php?gameid=954&ref=miniclip", "_blank");
}
Symbol 262 Button
on (press) {
_root.gotoAndPlay("startFrame");
}
Symbol 301 Button
on (press) {
gotoAndPlay (2);
}
Symbol 305 Button
on (press) {
gotoAndPlay (1);
}
Symbol 309 Button
on (press) {
ClearStats();
gotoAndPlay (1);
}
Symbol 312 MovieClip Frame 1
stop();
Symbol 312 MovieClip Frame 2
stop();
Symbol 327 Button
on (release) {
getURL ("http://www.miniclip.com", "_blank");
}
Symbol 340 MovieClip Frame 1
function doInit() {
var _local2 = this;
var _local1;
if (inited != true) {
inited = true;
k = 0;
while (k < 52) {
if (!isMain) {
_local1 = attachMovie("rectSymbol_preview", "rect" + String(k), 1000 + k);
} else {
_local1 = attachMovie("rectSymbol", "rect" + String(k), 1000 + k);
_local1.onPress = function () {
Game.pressed(this);
};
}
k++;
}
}
if (isMain) {
reset();
}
}
function reset() {
var _local1 = this;
k = 0;
while (k < 52) {
mc = _local1["rect" + String(k)];
mc._x = place1._x;
mc._y = place1._y;
mc._rotation = 0;
mc.depth = 1000 + k;
mc.swapDepths(mc.depth);
mc.exist = false;
mc.showMe(false);
k++;
}
readyNum = -1;
}
function resetTrace() {
var _local1 = this;
k = 0;
while (k < 52) {
mc = _local1["rect" + String(k)];
mc._x = mc.card_number * 34;
mc._y = 50 * mc.typeNum;
k++;
}
}
function deleteMCs() {
var _local2 = this;
var _local1;
k = 0;
while (k < 52) {
_local1 = _local2["rect" + String(k)];
_local1.deleteMCs();
_local1.removeMovieClip();
k++;
}
}
var readyNum = -1;
var isMain = false;
var dX = 0;
var dY = 0;
var frames = -1;
var exist = true;
rect._visible = false;
stop();
Instance of Symbol 339 MovieClip in Symbol 340 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(100000);
}
Symbol 353 MovieClip Frame 1
function totalScoreCount() {
var _local3 = _root;
_local3.total_score = 0;
var _local1 = 0;
while (_local1 < 25) {
var _local2 = _global.Settings.playedScores[_local1];
if (_local2 > 0) {
_local3.total_score = _local3.total_score + _local2;
}
_local1++;
}
_local3.total_score_str = String("TOTAL SCORE: " + _local3.total_score);
}
function showForLoose(is_time_out) {
_root.game_over_sfx.start(0, 1);
result_star._visible = false;
txtScore = "GAME OVER";
txtMsg = (is_time_out ? "TIME OUT!" : "NO MORE MOVES!");
_visible = true;
}
function showForWin(sc, c) {
_root.level_done_sfx.start(0, 1);
if (c) {
txtMsg = "LEVEL COMPLETE";
} else {
txtMsg = "GAME COMPLETE!!!";
}
totalScoreCount();
txtScore = "YOUR SCORE: " + String(sc);
result_star.gotoAndStop(_root.AwardType(_global.Levels.selectedLevel - 1));
_visible = true;
}
function hideMe() {
txtMsg = "";
txtScore = "";
_visible = false;
}
btnExit.onPress = function () {
hideMe();
_root.gotoAndPlay("preLevelsFrame");
};
hideMe();
Symbol 358 MovieClip Frame 1
stop();
Symbol 359 MovieClip Frame 1
function setVal(v) {
val = Math.max(0, Math.min(100, v));
}
function addVal(v) {
val = Math.max(0, Math.min(100, val + v));
if ((val == 100) && (star._currentframe == 1)) {
bar._yscale = 100;
star._y = -bar._height;
_global.Game.setScore(100);
setVal(0);
_root.pistol.gotoAndPlay(2);
}
}
function refreshMe() {
if (star._currentframe == 1) {
var _local1 = Math.round(val);
if (_local1 != rndVal) {
rndVal = _local1;
}
bar._yscale = rndVal;
star._y = -bar._height;
}
}
var val = 0;
var rndVal = -1;
refreshMe();
stop();
Symbol 377 MovieClip Frame 1
stop();
Symbol 377 MovieClip Frame 2
_root.shot_sfx.start(0, 1);