Frame 1
fscommand ("showmenu", false);
stop();
Instance of Symbol 112 MovieClip in Frame 1
onClipEvent (load) {
b = _root.getBytesTotal();
}
onClipEvent (enterFrame) {
l = _root.getBytesLoaded();
p = (l / b) * 100;
text = Math.floor(p);
text = text + "%";
bar._xscale = Number(Math.floor(p)) * 53;
if (l >= b) {
_root.gotoAndStop(2);
}
}
Frame 2
function playSound1(snd) {
if (!_root.ignoreSound) {
if (_root.soundon) {
so = new Sound();
so.attachSound(snd);
so.start(0, 1);
}
}
}
function playMusic(snd) {
if (!_root.ignoreSound) {
if (_root.soundon) {
so = new Sound();
so.attachSound(snd);
so.start(0, 999);
}
}
}
function loadSettings() {
_root.cardStyle = settings.data.cardStyle;
_root.backStyle = settings.data.backStyle;
}
function saveSettings() {
settings.data.cardStyle = _root.cardStyle;
settings.data.backStyle = _root.backStyle;
}
function redefineSettings() {
settings.data.cardStyle = 0;
settings.data.backStyle = 0;
}
function loadHiScores_pr() {
if ((settings.data.hiScores_pr == undefined) || (settings.data.hiScoreNames_pr == undefined)) {
redefineHiScores_pr();
}
_root.hiScores = settings.data.hiScores_pr;
_root.hiScoreNames = settings.data.hiScoreNames_pr;
}
function loadHiScores_adv() {
if ((settings.data.hiScores_adv == undefined) || (settings.data.hiScoreNames_adv == undefined)) {
redefineHiScores_adv();
}
_root.hiScores = settings.data.hiScores_adv;
_root.hiScoreNames = settings.data.hiScoreNames_adv;
}
function saveHiScores_pr() {
settings.data.hiScores_pr = hiScores;
settings.data.hiScoreNames_pr = hiScoreNames;
}
function saveHiScores_adv() {
settings.data.hiScores_adv = hiScores;
settings.data.hiScoreNames_adv = hiScoreNames;
}
function redefineHiScores_pr() {
settings.data.hiScores_pr = defaultHiScores_pr;
settings.data.hiScoreNames_pr = defaultHiScoreNames_pr;
loadHiScores();
}
function redefineHiScores_adv() {
settings.data.hiScores_adv = defaultHiScores_adv;
settings.data.hiScoreNames_adv = defaultHiScoreNames_adv;
loadHiScores();
}
function scoreIsHi(scr) {
if (_root.gameType == "adventure") {
loadHiScores_adv();
} else {
loadHiScores_pr();
}
return(scr > hiScores[9]);
}
function insertWithEnptyName(iscore) {
if (_root.gameType == "adventure") {
loadHiScores_adv();
} else {
loadHiScores_pr();
}
i = 0;
while (i < 10) {
trace((((("i = " add i) add "; iscore = ") add iscore) add "; _root.hiScores[i] = ") add _root.hiScores[i]);
if (iscore > _root.hiScores[i]) {
_root.hiScores.splice(i, 0, iscore);
_root.hiScoreNames.splice(i, 0, "");
break;
}
i++;
}
_root.hiScores.splice(10);
if (_root.gameType == "adventure") {
saveHiScores_adv();
} else {
saveHiScores_pr();
}
return(i);
}
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) {
return((s.substring(0, length(s) - i) add " ") add s.substring(length(s) - i, length(s)));
}
function showNewGame_wnd() {
attachMovie("wnd_newGame", "wndNewGame", _root.getNextHighestDepth());
_root.wndNewGame._x = 386.6;
_root.wndNewGame._y = 320.4;
}
function hideNewGame_wnd() {
_root.wndNewGame.removeMovieClip();
}
fscommand ("showmenu", false);
_root.soundon = true;
defaultHiScoreNames_pr = ["Alex", "Peter", "Anna", "Georege", "Nicole", "Mike", "Eclipse", "Junior", "PopLoop", "September"];
defaultHiScoreNames_adv = ["Alex", "Peter", "Anna", "Georege", "Nicole", "Mike", "Eclipse", "Junior", "PopLoop", "September"];
defaultHiScores_pr = [870, 762, 698, 641, 626, 601, 597, 581, 570, 535];
defaultHiScores_adv = [5220, 4572, 4188, 3846, 3756, 3606, 3582, 3486, 3420, 3210];
settings = SharedObject.getLocal("elite_solitaire_freesell_settings1");
if (typeof(settings.data.present) == "undefined") {
settings.data.present = true;
redefineSettings();
redefineHiScores();
}
loadSettings();
var moreGamesUrl = "http://www.doublegames.com/?fr=elitefreecellon";
var downloadURL = "http://www.doublegames.com/downloads.html?fr=elitefreecellon";
var buyURL = "http://www.doublegames.com/order.html?fr=elitefreecellon";
var MaxHoriz = 8;
var Height = 35;
var CardSpeed = 10;
var MaxNoResize = 8;
var leftCardsCoords = new Array(2, 2);
var rightCardsCoords = new Array(350, 2);
var startY = 120;
var sndDisco = "disco";
var soundBuffer = 1;
var spointsPerCard = 10;
var startPoints = 500;
var jackPotScores = new Array(25, 25, 25, 25, 30, 30, 30, 35, 35, 35, 50, 50, 75, 100, 150, 250, 500);
var spinTime = 5;
var countDownTime = 10;
_root.enterScore = -1;
_root.currentLevel = 0;
wnd_newGame._visible = false;
wnd_gameOver._visible = false;
wnd_finish._visible = false;
wnd_newGame_tab._visible = false;
stop();
Frame 3
stop();
Frame 4
stop();
Frame 5
stop();
Frame 6
Frame 23
function initGame() {
indent = 0;
check = 0;
ignoreUser = 0;
cardSoundCount = 0;
spoints = 0;
soundIt = 0;
stackSelected = undefined;
lastSoundTime = 0;
isPause = false;
isGame = false;
isInstruction = false;
isWin = false;
if (currentLevel == 0) {
totalScore = 0;
currentLevel = 0;
}
initBoard();
randomizeCards();
initCards();
setTimer();
}
function showPause() {
attachMovie("pause_tab", "wndPause", _root.getNextHighestDepth());
_root.wndPause._x = 400;
_root.wndPause._y = 300;
}
function hidePause() {
_root.wndPause.removeMovieClip();
}
function showFinish() {
attachMovie("finish_tab", "wndPause", _root.getNextHighestDepth());
_root.wndPause._x = 400;
_root.wndPause._y = 300;
}
function showWindow(name) {
attachMovie(name, name, _root.getNextHighestDepth());
_root.name._x = 400;
_root.name._y = 300;
}
function hideWindow(name) {
_root.name.removeMovieClip();
}
function mainProcess() {
processTimer();
if (check) {
checkCards();
}
if (moveStack.length) {
dragCards();
}
if (soundIt && (!ignoreSound)) {
playSound();
}
}
function hideParentMovies() {
card3.stop();
card1.stop();
card2.stop();
card3.stop();
card4.stop();
card5.stop();
card3._visible = false;
card1._visible = false;
card2._visible = false;
card3._visible = false;
card4._visible = false;
card5._visible = false;
left_tpl._visible = false;
main_tpl._visible = false;
right_tpl._visible = false;
arrow_tpl._visible = false;
alert_tpl._visible = false;
trace(wnd_newGame_tab._visible);
wnd_newGame_tab._visible = false;
wnd_gameOver._visible = false;
}
function setTimer() {
lastTime = getTimer();
points = startPoints;
}
function processTimer() {
var _local1 = getTimer();
var _local2;
var _local3;
if ((_local1 < pauseStart) || (pauseStart == undefined)) {
_local2 = Math.floor(_local1 / 1000) - Math.floor(lastTime / 1000);
} else {
_local2 = Math.floor(pauseStart / 1000) - Math.floor(lastTime / 1000);
pauseStart = _local1 + 500;
}
if ((points > 0) && (!isPause)) {
points = points - _local2;
}
if (points == 0) {
removeCards();
isWin = false;
if (gameType == "practice") {
wnd_gameOver.init(0);
} else if (trying == 0) {
wnd_gameOver.init(0);
} else {
gotoAndStop ("jackpot");
}
}
lastTime = _local1;
}
function playSound() {
var _local1 = getTimer();
var _local2 = Math.floor(_local1 / 1000) - Math.floor(lastSoundTime / 1000);
if (_local2 > soundBuffer) {
cardSounds[(cardSoundsCount++) % cardSounds.length].start();
lastSoundTime = _local1;
soundIt--;
if (soundIt < 0) {
soundIt = 0;
}
}
}
function playMusic() {
var _local1 = getTimer();
var _local2 = Math.floor(_local1 / 1000) - Math.floor(lastSoundTime / 1000);
if (_local2 > soundBuffer) {
cardSounds[(cardSoundsCount++) % cardSounds.length].start();
lastSoundTime = _local1;
soundIt--;
if (soundIt < 0) {
soundIt = 0;
}
}
}
function randomizeCards() {
var _local1;
var _local2;
var _local3;
randomStack = new Array();
_local1 = 0;
while (_local1 < 52) {
randomStack.push(_local1 + 1);
_local1++;
}
while (_local1-- , _local1 > 0) {
_local2 = random(_local1);
_local3 = randomStack[_local1];
randomStack[_local1] = randomStack[_local2];
randomStack[_local2] = _local3;
}
}
function initBoard() {
var _local2;
var _local3;
leftStack = new Array();
rightStack = new Array();
cardStack = new Array();
moveStack = new Array();
var _local5 = Math.floor((640 - (MaxHoriz * card3._width)) / (MaxHoriz + 1));
var _local4 = Math.ceil(card3._width);
var _local7 = _local5;
var _local6 = startY + 35;
_local3 = _local7 + 40;
_local5 = 20;
_local2 = 0;
while (_local2 < MaxHoriz) {
cardStack.push(new Array());
child = "main_" + _local2;
duplicateMovieClip ("main_tpl", child, indent++);
_root[child].num = _local2;
_root[child]._x = _local3;
_root[child]._y = _local6;
_local3 = _local3 + (_local4 + _local5);
_local2++;
}
_local3 = leftCardsCoords[0] + 65;
_local2 = 0;
while (_local2 < 4) {
leftStack.push(new Array());
child = "left_" + _local2;
duplicateMovieClip ("left_tpl", child, indent++);
_root[child].num = _local2;
_root[child]._x = _local3;
_root[child]._y = leftCardsCoords[1] + 6;
_local3 = _local3 + (_local4 + 2);
_local2++;
}
_local3 = rightCardsCoords[0] + 98;
_local2 = 0;
while (_local2 < 4) {
rightStack.push(new Array());
child = "right_" + _local2;
duplicateMovieClip ("right_tpl", child, indent++);
_root[child].num = _local2;
_root[child]._x = _local3;
_root[child]._y = rightCardsCoords[1] + 6;
_local3 = _local3 + (_local4 + 2);
_local2++;
}
}
function hideBoard() {
var _local2;
_local2 = 0;
while (_local2 < MaxHoriz) {
_root["main_" + _local2]._visible = false;
_local2++;
}
_local2 = 0;
while (_local2 < 4) {
_root["left_" + _local2]._visible = false;
leftStack.push(new Array());
child = "left_" + _local2;
duplicateMovieClip ("left_tpl", child, indent++);
_root[child].num = _local2;
_root[child]._x = x;
_root[child]._y = leftCardsCoords[1] + 6;
x = x + (width + 2);
_local2++;
}
x = rightCardsCoords[0] + 98;
_local2 = 0;
while (_local2 < 4) {
rightStack.push(new Array());
child = "right_" + _local2;
duplicateMovieClip ("right_tpl", child, indent++);
_root[child].num = _local2;
_root[child]._x = x;
_root[child]._y = rightCardsCoords[1] + 6;
x = x + (width + 2);
_local2++;
}
}
function initArrow() {
Mouse.hide();
duplicateMovieClip ("arrow_tpl", "arrow", indent++);
}
function dropArrow() {
Mouse.show();
if (typeof(arrow) != undefined) {
removeMovieClip("arrow");
}
}
function initCards() {
var _local3;
var _local4;
var _local5 = 0;
var _local2;
_local3 = 0;
while (_local3 < 52) {
_st_time = getTimer();
_local4 = _local3 % MaxHoriz;
if (!_local4) {
_local5++;
}
_local2 = "card_" + (_local3 + 1);
duplicateMovieClip (cardTheme, _local2, indent++);
_root[_local2].cardFrame = randomStack[_local3];
_root[_local2]._x = _root["main_" + _local4]._x;
_root[_local2]._y = _root["main_" + _local4]._y + ((_local5 - 1) * Height);
_root[_local2].stack = _local4;
cardStack[_local4].push(_local2);
_local3++;
}
}
function hideCards() {
var _local2 = 0;
while (_local2 < 52) {
_root["card_" + (_local2 + 1)]._visible = false;
_local2++;
}
_local2 = 0;
while (_local2 < leftStack.length) {
_root[leftStack[_local2]]._visible = false;
_local2++;
}
_local2 = 0;
while (_local2 < rightStack.length) {
_root[rightStack[_local2]]._visible = false;
_local2++;
}
_local2 = 0;
while (_local2 < MaxHoriz) {
_root["main_" + _local2]._visible = false;
_local2++;
}
}
function showCards() {
var _local2 = 0;
while (_local2 < 52) {
_root["card_" + (_local2 + 1)]._visible = true;
_local2++;
}
_local2 = 0;
while (_local2 < leftStack.length) {
_root[leftStack[_local2]]._visible = true;
_local2++;
}
_local2 = 0;
while (_local2 < rightStack.length) {
_root[rightStack[_local2]]._visible = true;
_local2++;
}
_local2 = 0;
while (_local2 < MaxHoriz) {
_root["main_" + _local2]._visible = true;
_local2++;
}
}
function selectStack(stack) {
var _local3;
var _local8;
var _local2;
var _local4;
var _local5;
var _local10;
var _local6;
var _local7;
tempStack = new Array();
_local8 = cardStack[stack].length;
_local2 = cardStack[stack][_local8 - 1];
_local4 = (_root[_local2]._currentframe % 13) || 13;
_local5 = Boolean(_root[_local2]._currentframe < 27);
tempStack.push(_local2);
_local3 = _local8 - 1;
while (_local3 > 0) {
_local10 = _local2;
_local6 = _local4;
_local7 = _local5;
_local2 = cardStack[stack][_local3 - 1];
_local4 = (_root[_local2]._currentframe % 13) || 13;
_local5 = Boolean(_root[_local2]._currentframe < 27);
if (((_local6 + 1) != _local4) or (_local5 == _local7)) {
break;
}
tempStack.push(_local2);
_local3--;
}
return(tempStack[0]);
}
function selectCard(stack) {
var _local2 = new Color(selectStack(stack));
var _local1 = _local2.getTransform();
_local1.ra = 40;
_local1.ga = 50;
_local1.ba = 40;
_local2.setTransform(_local1);
stackSelected = stack;
}
function selectLeftCard(stack) {
var _local2 = leftStack[stack].pop();
var _local3 = new Color(_local2);
var _local1 = _local3.getTransform();
tempStack = new Array();
_local1.ra = 40;
_local1.ga = 50;
_local1.ba = 40;
_local3.setTransform(_local1);
leftStack[stack].push(_local2);
tempStack.push(_local2);
leftSelected = stack;
}
function releaseCard() {
if (stackSelected == undefined) {
return(undefined);
}
var _local2 = cardStack[stackSelected].pop();
var _local3 = new Color(_local2);
var _local1 = _local3.getTransform();
_local1.ra = 100;
_local1.ga = 100;
_local1.ba = 100;
_local3.setTransform(_local1);
cardStack[stackSelected].push(_local2);
stackSelected = undefined;
}
function moveToLeftStack() {
}
function releaseLeftCard() {
if (leftSelected == undefined) {
return(undefined);
}
var _local2 = leftStack[leftSelected].pop();
var _local3 = new Color(_local2);
var _local1 = _local3.getTransform();
_local1.ra = 100;
_local1.ga = 100;
_local1.ba = 100;
_local3.setTransform(_local1);
leftStack[leftSelected].push(_local2);
leftSelected = undefined;
}
function moveCard(card, stack) {
var _local5 = _root[card]._currentframe;
if (cardStack[stack].length) {
var _local4 = cardStack[stack].pop();
cardStack[stack].push(_local4);
x = _root[_local4]._x;
y = _root[_local4]._y + Height;
} else {
x = _root["main_" + stack]._x;
y = _root["main_" + stack]._y;
}
removeMovieClip(card);
duplicateMovieClip (cardTheme, card, indent++);
_root[card].gotoAndStop(_local5);
_root[card]._x = x;
_root[card]._y = y;
_root[card].stack = stack;
cardStack[stack].push(card);
check = 1;
}
function moveCardToLeft(card, stack) {
var _local5 = _root[card]._currentframe;
if (cardStack[stack].length) {
var _local4 = cardStack[stack].pop();
cardStack[stack].push(_local4);
x = _root[_local4]._x;
y = _root[_local4]._y + Height;
} else {
x = _root["left_" + stack]._x;
y = _root["left_" + stack]._y;
}
removeMovieClip(card);
duplicateMovieClip (cardTheme, card, indent++);
_root[card].gotoAndStop(_local5);
_root[card]._x = x;
_root[card]._y = y;
_root[card].stack = stack;
cardStack[stack].push(card);
check = 1;
}
function moveCup(fromStack, toStack, count) {
var _local1 = 0;
tempStack = new Array();
while ((_local1++) < count) {
tempStack.push(cardStack[fromStack].pop());
}
while (tempStack.length) {
moveCard(tempStack.pop(), toStack);
}
}
function moveRightCard(card, stack) {
var _local3 = "right_" + stack;
var _local6 = _root[card]._currentframe;
var _local5 = _root[card]._x;
var _local4 = _root[card]._y;
removeMovieClip(card);
duplicateMovieClip (cardTheme, card, indent++);
_root[card].gotoAndStop(_local6);
_root[card]._x = _local5;
_root[card]._y = _local4;
_root[card].xspeed = ((_root[_local3]._x - _local5) * CardSpeed) / 100;
_root[card].yspeed = ((_root[_local3]._y - _local4) * CardSpeed) / 100;
_root[card].endx = _root[_local3]._x;
_root[card].endy = _root[_local3]._y;
_root[card].right = stack;
rightStack[stack].push(card);
moveStack.push(card);
soundIt++;
spoints = spoints + spointsPerCard;
}
function moveLeftCard(card, stack) {
var _local4 = _root[card]._currentframe;
removeMovieClip(card);
duplicateMovieClip (cardTheme, card, indent++);
_root[card].gotoAndStop(_local4);
_root[card]._x = _root["left_" + stack]._x;
_root[card]._y = _root["left_" + stack]._y;
_root[card].left = stack;
leftStack[stack].push(card);
check = 1;
if (!_root.ignoreSound) {
_root.playSound1("pressCard");
}
}
function checkCards() {
var _local4;
var _local2;
var _local3;
var _local8;
var _local5;
var _local6;
var _local9;
var _local10;
var _local7;
check = 0;
_local4 = 0;
while (_local4 < 4) {
_local6 = undefined;
if (rightStack[_local4].length) {
_local6 = rightStack[_local4].pop();
rightStack[_local4].push(_local6);
_local9 = getType(_local6);
_local10 = (_root[_local6]._currentframe % 13) || 13;
}
_local2 = 0;
while (_local2 < MaxHoriz) {
if (cardStack[_local2].length) {
_local3 = cardStack[_local2].pop();
_local8 = getType(_local3);
_local5 = (_root[_local3]._currentframe % 13) || 13;
if (_local6 == undefined) {
if (_local5 == 1) {
moveRightCard(_local3, _local4);
_local7 = _local4;
break;
}
cardStack[_local2].push(_local3);
} else {
if ((_local9 == _local8) && ((_local10 + 1) == _local5)) {
moveRightCard(_local3, _local4);
_local7 = _local4;
break;
}
cardStack[_local2].push(_local3);
}
}
_local2++;
}
_local2 = 0;
while (_local2 < 4) {
if (leftStack[_local2].length) {
_local3 = leftStack[_local2].pop();
_local8 = getType(_local3);
_local5 = (_root[_local3]._currentframe % 13) || 13;
if (_local6 == undefined) {
if (_local5 == 1) {
if (_local7 == _local4) {
_local4++;
}
moveRightCard(_local3, _local4);
break;
}
leftStack[_local2].push(_local3);
} else {
if ((_local9 == _local8) && ((_local10 + 1) == _local5)) {
if (_local7 == _local4) {
_local4++;
}
moveRightCard(_local3, _local4);
break;
}
leftStack[_local2].push(_local3);
}
}
_local2++;
}
_local4++;
}
pressCards();
checkWon();
}
function getType(card) {
var _local2 = _root[card]._currentframe;
switch (true) {
case _local2 < 14 :
return(1);
case _local2 < 27 :
return(2);
case _local2 < 40 :
return(3);
case true :
return(4);
}
}
function dragCards() {
var _local6;
var _local2;
var _local5;
var _local4;
var _local3 = new Array();
_local6 = 0;
while (moveStack.length) {
_local2 = moveStack.pop();
_root[_local2]._x = _root[_local2]._x + _root[_local2].xspeed;
_root[_local2]._y = _root[_local2]._y + _root[_local2].yspeed;
_local5 = _root[_local2].endx;
_local4 = _root[_local2].endy;
if ((Math.abs(_root[_local2]._x - _root[_local2].endx) < 2) or (Math.abs(_root[_local2]._y - _root[_local2].endy) < 2)) {
_root[_local2]._x = _local5;
_root[_local2]._y = _local4;
check = 1;
guy.gotoAndStop(((guy._currentframe > 1) ? 1 : 2));
} else {
_local3.push(_local2);
}
}
while (_local3.length) {
moveStack.push(_local3.pop());
}
}
function showAlert(fromStack, toStack, leftfree) {
var _local2 = "alert";
duplicateMovieClip ("alert_tpl", _local2, indent++);
_root[_local2].fromStack = fromStack;
_root[_local2].toStack = toStack;
_root[_local2].free = leftfree;
}
function closeAlert(act) {
var _local2 = _root.alert.fromStack;
var _local4 = _root.alert.toStack;
var _local3 = _root.alert.free;
removeMovieClip("alert");
if (act) {
moveCard(cardStack[_local2].pop(), _local4);
} else {
moveCup(_local2, _local4, ((tempStack.length <= _local3) ? (tempStack.length) : (_local3 + 1)));
}
ignoreUser = 0;
}
function pressCards() {
var _local4;
var _local2;
var _local3;
var _local5;
var _local6;
_local4 = 0;
while (_local4 < MaxHoriz) {
_local5 = cardStack[_local4].length;
if (_local5 > MaxNoResize) {
_local3 = cardStack[_local4][0];
_local6 = _root[_local3]._y;
_local2 = 1;
while (_local2 < _local5) {
_local3 = cardStack[_local4][_local2];
_root[_local3]._y = _local6 + (((Height * MaxNoResize) * _local2) / _local5);
_local2++;
}
} else {
_local3 = cardStack[_local4][0];
_local6 = _root[_local3]._y;
_local2 = 1;
while (_local2 < _local5) {
_local3 = cardStack[_local4][_local2];
_root[_local3]._y = _local6 + (Height * _local2);
_local2++;
}
}
_local4++;
}
}
function checkWon() {
var _local4 = points + Number(_root.scores.text);
var _local2;
var _local3 = 0;
var _local5;
if (moveStack.length) {
return(undefined);
}
_local2 = 0;
while (_local2 < 4) {
if (rightStack[_local2].length == 13) {
_local3++;
}
_local2++;
}
if (_local3 == 4) {
isWin = true;
removeCards();
if (!_root.ignoreSound) {
_root.playSound1("sndWin");
}
gotoAndStop ("disco");
if (gameType == "adventure") {
totalScore = totalScore + _local4;
} else {
totalScore = _local4;
}
trace("totalScore=" + totalScore);
wnd_gameOver.init(totalScore);
}
}
function sendScores() {
var _local2 = spoints_tpl.text;
var _local3 = ((scores add _local2) add internalKeyword) add externalKeyword;
var _local5 = calcMD5(_local3);
var _local4 = (((((((_root.serverUrl add "&cacheKiller=") add escape(getTimer())) add "&points=") add escape(scores)) add "&spoints=") add escape(_local2)) add "&hash=") add escape(_local5);
_root.loadVariables(_local4, "_root");
}
function removeCards() {
var _local2;
var _local1;
_local1 = 0;
while (_local1 < MaxHoriz) {
removeMovieClip("main_" + _local1);
_local1++;
}
_local1 = 0;
while (_local1 < 4) {
removeMovieClip("left_" + _local1);
removeMovieClip("right_" + _local1);
_local1++;
}
_local1 = 0;
while (_local1 < 52) {
removeMovieClip("card_" + (_local1 + 1));
_local1++;
}
}
function loadTheme(themeNumber) {
_root.bg.gotoAndStop(themeNumber + 1);
}
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) {
str = "";
j = 0;
while (j <= 3) {
str = str + (hex_chr.charAt((num >> ((j * 8) + 4)) & 15) + hex_chr.charAt((num >> (j * 8)) & 15));
j++;
}
return(str);
}
function str2blks_MD5(str) {
nblk = ((str.length + 8) >> 6) + 1;
blks = new Array(nblk * 16);
i = 0;
while (i < (nblk * 16)) {
blks[i] = 0;
i++;
}
i = 0;
while (i < str.length) {
blks[i >> 2] = blks[i >> 2] | (str.charCodeAt(i) << ((((str.length * 8) + i) % 4) * 8));
i++;
}
blks[i >> 2] = blks[i >> 2] | (128 << ((((str.length * 8) + i) % 4) * 8));
var _local2 = str.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) {
return(cmn(bitOR(bitAND(b, c), bitAND(~b, d)), a, b, 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));
}
var moreGamesUrl = "http://www.doublegames.com/?fr=elitefreecellon";
var downloadURL = "http://www.doublegames.com/downloads.html?fr=elitefreecellon";
var buyURL = "http://www.doublegames.com/order.html?fr=elitefreecellon";
var MaxHoriz = 8;
var Height = 35;
var CardSpeed = 10;
var MaxNoResize = 8;
var leftCardsCoords = new Array(2, 2);
var rightCardsCoords = new Array(350, 2);
var startY = 120;
var sndDisco = "disco";
var soundBuffer = 1;
var spointsPerCard = 10;
var startPoints = 500;
var jackPotScores = new Array(25, 25, 25, 25, 30, 30, 30, 35, 35, 35, 50, 50, 75, 100, 150, 250, 500);
var spinTime = 5;
var countDownTime = 10;
var cardStack;
var randomStack;
var leftStack;
var rightStack;
var indent;
var stackSelected;
var leftSelected;
var check;
var moveStack;
var tempStack;
var ignoreUser;
var ignoreSound;
var cardSoundCount;
var lastTime;
var soundIt;
var lastSoundTime;
var isPause;
var fullScreen;
var btnPressed;
var isGame;
var pauseStart;
var isInstruction;
var currentLevel;
var gameType;
var isWin;
var totalScore;
var trying;
var hsType;
var cardTheme:String;
cardTheme = "card3";
var hex_chr = "0123456789abcdef";
_root.bg.gotoAndStop(3);
hideParentMovies();
trace("isInstruction=" + isInstruction);
if (!isGame) {
if (!isInstruction) {
initGame();
}
}
var cardSounds = new Array(sndCard.length);
var i = 0;
while (i < sndCard.length) {
cardSounds[i] = new Sound();
cardSounds[i].attachSound(sndCard[i]);
i++;
}
var discoSound = new Sound();
discoSound.attachSound(sndDisco);
Instance of Symbol 282 MovieClip "arrow_tpl" in Frame 23
onClipEvent (enterFrame) {
_x = _root._xmouse;
_y = _root._ymouse;
}
Instance of Symbol 397 MovieClip "joker" in Frame 23
onClipEvent (enterFrame) {
if (_xmouse > 0) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
Frame 24
mainProcess();
Frame 25
gotoAndPlay(_currentframe - 1);
Frame 26
stop();
Frame 27
stop();
Frame 28
loadMovie (bannerUrl, "_root.banner");
Frame 29
stop();
Symbol 11 MovieClip [available_hint] Frame 22
stop();
Symbol 24 Button
on (release) {
_root.removeCards();
fscommand ("quit");
play();
_root.wnd_quitGame.removeMovieClip();
}
Symbol 30 Button
on (release) {
_root.isPause = false;
_root.showCards();
_root.wnd_quitGame.removeMovieClip();
}
Symbol 34 Button
on (release) {
_root.removeCards();
_root.isGame = false;
_root.cuurentLevel = 0;
_root.totalScore = 0;
_root.gotoAndPlay("start");
_root.wnd_newGame.removeMovieClip();
}
Symbol 35 Button
on (release) {
_root.isPause = false;
_root.showCards();
_root.wnd_newGame.removeMovieClip();
}
Symbol 45 Button
on (release) {
_root.gameType = "adventure";
_root.gotoAndStop("map");
this.removeMovieClip();
}
Symbol 50 Button
on (release) {
_root.gameType = "practice";
_root.gotoAndPlay(6);
this.removeMovieClip();
}
Symbol 56 Button
on (release) {
this.removeMovieClip();
}
on (rollOver) {
if (!_root.ignoreSound) {
_root.playSound1("overBtn");
}
}
on (release) {
if (!_root.ignoreSound) {
_root.playSound1("releaseBtn");
}
}
Symbol 63 Button
on (release) {
_root.showCards();
_root.isPause = false;
_root.gotoAndPlay("start");
_root.wnd_choose.removeMovieClip();
_root.isGame = false;
}
on (rollOver) {
if (!_root.ignoreSound) {
_root.playSound1("overBtn");
}
}
on (release) {
if (!_root.ignoreSound) {
_root.playSound1("releaseBtn");
}
}
Symbol 68 Button
on (release) {
_root.isGame = false;
_root.pauseStart = undefined;
_root.attachMovie("wnd_gameType", "wnd_gameType", _root.getNextHighestDepth());
_root.wnd_gameType._x = 400;
_root.wnd_gameType._y = 300;
_root.wnd_choose.removeMovieClip();
}
on (rollOver) {
if (!_root.ignoreSound) {
_root.playSound1("overBtn");
}
}
on (release) {
if (!_root.ignoreSound) {
_root.playSound1("releaseBtn");
}
}
Symbol 75 Button
on (release) {
_root.isPause = false;
_root.showCards();
_root.hidePause();
}
on (rollOver) {
if (!_root.ignoreSound) {
_root.playSound1("overBtn");
}
}
on (release) {
if (!_root.ignoreSound) {
_root.playSound1("releaseBtn");
}
}
Symbol 87 Button
on (release) {
_root.wnd_finish._visible = false;
_root.gotoAndStop(4);
}
on (rollOver) {
if (!_root.ignoreSound) {
_root.playSound1("overBtn");
}
}
on (release) {
if (!_root.ignoreSound) {
_root.playSound1("releaseBtn");
}
}
Symbol 117 MovieClip Frame 1
function init(m) {
motion = m;
if (motion == fadeIn) {
_root.playSound1("in");
begX = 0;
begY = 0;
sqWidth = 41;
sqHeight = 41;
sqStepX = 40;
sqStepY = 40;
sqCountX = 13;
sqCountY = 15;
sqPerStep = 40;
} else {
_root.playSound1("out");
begX = 0;
begY = 0;
sqWidth = 81;
sqHeight = 81;
sqStepX = 80;
sqStepY = 80;
sqCountX = 13;
sqCountY = 15;
sqPerStep = 30;
}
deleteAllSquares();
initStack();
reshuffleStack();
work = true;
}
function everyFrame() {
if (work) {
var _local1 = 0;
while (_local1 < sqPerStep) {
if (motion == fadeOut) {
deleteSquare(field.pop());
}
if (motion == fadeIn) {
addSquare(field.pop());
}
if (field.length == 0) {
work = false;
return(undefined);
}
_local1++;
}
}
}
function initStack() {
field = new Array();
var _local3 = 0;
while (_local3 < sqCountX) {
var _local2 = 0;
while (_local2 < sqCountY) {
var _local1 = new Object();
_local1.name = (("sq_" add _local3) add "_") add _local2;
_local1.x = _local3;
_local1.y = _local2;
field.push(_local1);
if (motion == 0) {
addSquare(_local1);
}
_local2++;
}
_local3++;
}
}
function reshuffleStack() {
var _local3 = new Object();
var _local1 = 0;
while (_local1 < (sqCountX * sqCountY)) {
var _local2 = random(field.length);
_local3 = field[_local1];
field[_local1] = field[_local2];
field[_local2] = _local3;
_local1++;
}
}
function deleteAllSquares() {
field = new Array();
var _local3 = 0;
while (_local3 < sqCountX) {
var _local2 = 0;
while (_local2 < sqCountY) {
this[(("sq_" add _local3) add "_") add _local2].removeMovieClip();
_local2++;
}
_local3++;
}
}
function deleteSquare(obj) {
this[obj.name].removeMovieClip();
}
function addSquare(obj) {
var _local3 = getDepth();
sq.duplicateMovieClip(obj.name, _local3);
this[obj.name]._x = begX + (obj.x * sqStepX);
this[obj.name]._y = begY + (obj.y * sqStepY);
this[obj.name]._width = sqWidth;
this[obj.name]._height = sqHeight;
}
function getDepth() {
if (typeof(depth) == "undefined") {
depth = 0;
}
depth++;
return(depth);
}
stop();
work = false;
fadeOut = 0;
fadeIn = 1;
Symbol 126 Button
on (release) {
getURL (_root.moreGamesUrl, "_blank");
}
Instance of Symbol 117 MovieClip "mask" in Symbol 129 MovieClip Frame 1
onClipEvent (enterFrame) {
everyFrame();
}
Symbol 159 Button
on (release) {
getURL (_root.moreGamesUrl, "_blank");
}
Symbol 165 Button
on (release) {
getURL (_root.buyURL, "_blank");
}
Symbol 171 Button
on (release) {
getURL (_root.downloadURL, "_blank");
}
Symbol 172 Button
on (rollOver) {
_root.attachMovie("available_hint", "available_hint", _root.getNextHighestDepth());
main_ShowSymbol(4);
_root.onMouseMove = function () {
if (_root._xmouse < 150) {
_root.available_hint._x = 145;
} else {
_root.available_hint._x = _root._xmouse;
}
_root.available_hint._y = _root._ymouse - 10;
_root.available_hint.gotoAndPlay(1);
};
}
on (rollOut) {
if (_root.available_hint != undefined) {
_root.available_hint.removeMovieClip();
}
}
Symbol 173 Button
on (release) {
motion = 2;
play();
}
on (rollOver) {
if (!_root.ignoreSound) {
_root.playSound1("overBtn");
}
}
on (release) {
if (!_root.ignoreSound) {
_root.playSound1("releaseBtn");
}
}
Symbol 174 Button
on (release) {
_parent.motion = 1;
_parent.play();
}
on (rollOver) {
if (!_root.ignoreSound) {
_root.playSound1("overBtn");
}
}
on (release) {
if (!_root.ignoreSound) {
_root.playSound1("releaseBtn");
}
}
Symbol 175 Button
on (release) {
if (_root.isGame) {
_root.attachMovie("wnd_choose", "wnd_choose", _root.getNextHighestDepth());
_root.wnd_choose._x = 400;
_root.wnd_choose._y = 300;
} else {
_root.attachMovie("wnd_gameType", "wnd_gameType", _root.getNextHighestDepth());
_root.wnd_gameType._x = 400;
_root.wnd_gameType._y = 300;
}
}
on (rollOver) {
if (!_root.ignoreSound) {
_root.playSound1("overBtn");
}
}
on (release) {
if (!_root.ignoreSound) {
_root.playSound1("releaseBtn");
}
}
Symbol 176 MovieClip Frame 2
motion = 0;
if (_root.isGame) {
settings.gotoAndStop(2);
} else {
settings.gotoAndStop(1);
}
clip.mask.init(1);
Symbol 176 MovieClip Frame 20
stop();
Symbol 176 MovieClip Frame 30
clip.mask.init(0);
Symbol 176 MovieClip Frame 41
stop();
if (motion == 0) {
_root.gotoAndPlay(5);
} else if (motion == 1) {
_root.gotoAndStop("settings");
} else if (motion == 2) {
_root.gotoAndStop("instructions");
} else if (motion == 3) {
_root.gotoAndStop(4);
} else if (motion == 4) {
fscommand ("quit");
play();
}
Instance of Symbol 117 MovieClip "mask" in Symbol 181 MovieClip Frame 1
onClipEvent (enterFrame) {
everyFrame();
}
Symbol 198 Button
on (release) {
play();
}
on (rollOver) {
if (!_root.ignoreSound) {
_root.playSound1("overBtn");
}
}
on (release) {
if (!_root.ignoreSound) {
_root.playSound1("releaseBtn");
}
}
Symbol 199 Button
on (rollOver) {
_root.attachMovie("available_hint", "available_hint", _root.getNextHighestDepth());
main_ShowSymbol(4);
_root.onMouseMove = function () {
if (_root._xmouse < 150) {
_root.available_hint._x = 145;
} else {
_root.available_hint._x = _root._xmouse;
}
_root.available_hint._y = _root._ymouse - 10;
_root.available_hint.gotoAndPlay(1);
};
}
on (rollOut) {
if (_root.available_hint != undefined) {
_root.available_hint.removeMovieClip();
}
}
Symbol 202 MovieClip Frame 1
stop();
Symbol 202 MovieClip Frame 2
stop();
Symbol 202 MovieClip Frame 3
stop();
Symbol 202 MovieClip Frame 4
stop();
Symbol 202 MovieClip Frame 5
stop();
Symbol 202 MovieClip Frame 6
stop();
Symbol 203 MovieClip Frame 4
stop();
Symbol 203 MovieClip Frame 7
lii.gotoAndStop(_root.backStyle + 1);
Symbol 206 MovieClip Frame 1
stop();
Symbol 206 MovieClip Frame 2
stop();
Symbol 206 MovieClip Frame 3
stop();
Symbol 206 MovieClip Frame 4
stop();
Symbol 206 MovieClip Frame 5
stop();
Symbol 206 MovieClip Frame 6
stop();
Symbol 207 MovieClip Frame 4
stop();
Symbol 207 MovieClip Frame 7
lii_c.gotoAndStop(_root.cardStyle + 1);
Symbol 208 MovieClip Frame 1
_root.loadSettings();
Symbol 208 MovieClip Frame 2
_root.backStyle = 2;
_root.cardStyle = 3;
clip3.mask.init(1);
Symbol 208 MovieClip Frame 28
litt.lii.gotoAndStop(_root.backStyle + 1);
litt_c.lii_c.gotoAndStop(_root.cardStyle + 1);
stop();
Symbol 208 MovieClip Frame 35
clip3.mask.init(0);
Symbol 208 MovieClip Frame 45
stop();
_root.saveSettings();
_root.gotoAndStop("pregame");
Symbol 219 Button
on (press) {
dragging = true;
}
on (release, releaseOutside) {
dragging = false;
}
Symbol 221 MovieClip Frame 1
function drag() {
if ((_ymouse > line._y) && (_ymouse < (line._y + line._height))) {
scroller._y = _ymouse;
var _local1 = (_ymouse - line._y) / line._height;
field.scroll = int(_local1 * field.maxscroll);
if (field.scroll >= field.maxscroll) {
field.scroll = field.maxscroll;
}
} else if (_ymouse <= line._y) {
setPos(1);
} else if (_ymouse >= (line._y + line._height)) {
setPos(field.maxscroll);
}
}
function setPos(num) {
var _local1 = ((((num == 1) ? 0 : (num)) * line._height) / field.maxscroll) + line._y;
scroller._y = _local1;
field.scroll = num;
}
function init() {
if (field.scroll == field.maxscroll) {
scroller._visible = false;
} else {
scroller._visible = true;
}
}
Instance of Symbol 220 MovieClip "scroller" in Symbol 221 MovieClip Frame 1
onClipEvent (mouseMove) {
if (dragging) {
this._parent.drag();
updateAfterEvent(mouseMove);
}
}
Symbol 225 Button
on (press) {
_root.playSound("snd_click");
mouse_down = true;
}
on (release, releaseOutside) {
mouse_down = false;
}
Symbol 230 Button
on (press) {
_root.playSound("snd_click");
mouse_down = true;
}
on (release, releaseOutside) {
mouse_down = false;
}
Instance of Symbol 117 MovieClip "mask" in Symbol 234 MovieClip Frame 1
onClipEvent (enterFrame) {
everyFrame();
}
Instance of Symbol 221 MovieClip "inst_scr" in Symbol 234 MovieClip Frame 1
onClipEvent (load) {
field = this._parent.instructions;
}
Instance of Symbol 226 MovieClip in Symbol 234 MovieClip Frame 1
onClipEvent (load) {
var scroller = this._parent.inst_scr;
}
onClipEvent (enterFrame) {
if (mouse_down && (!this.scroller.scroller.dragging)) {
this.scroller.field.scroll = this.scroller.field.scroll + 1;
this.scroller.setPos(this.scroller.field.scroll);
}
}
Instance of Symbol 231 MovieClip in Symbol 234 MovieClip Frame 1
onClipEvent (load) {
var scroller = this._parent.inst_scr;
}
onClipEvent (enterFrame) {
if (mouse_down && (!this.scroller.scroller.dragging)) {
this.scroller.field.scroll = this.scroller.field.scroll - 1;
this.scroller.setPos(this.scroller.field.scroll);
}
}
Symbol 235 Button
on (release) {
if (!_root.isInstruction) {
play();
} else {
_root.isPause = false;
_root.showCards();
_root.gotoAndPlay("start");
_root.isInstruction = false;
}
}
on (rollOver) {
if (!_root.ignoreSound) {
_root.playSound1("overBtn");
}
}
on (release) {
if (!_root.ignoreSound) {
_root.playSound1("releaseBtn");
}
}
Symbol 236 MovieClip Frame 2
clip1.mask.init(1);
Symbol 236 MovieClip Frame 17
stop();
Symbol 236 MovieClip Frame 24
clip1.mask.init(0);
Symbol 236 MovieClip Frame 34
stop();
_root.gotoAndStop("pregame");
Symbol 248 MovieClip Frame 1
stop();
Symbol 248 MovieClip Frame 2
Symbol 248 MovieClip Frame 3
stop();
Symbol 248 MovieClip Frame 4
stop();
Symbol 248 MovieClip Frame 5
stop();
Symbol 248 MovieClip Frame 6
stop();
Symbol 258 Button
on (release) {
_root.isPause = true;
_root.hideCards();
_root.attachMovie("wnd_newGame", "wnd_newGame", _root.getNextHighestDepth());
_root.wnd_newGame._x = 400;
_root.wnd_newGame._y = 300;
}
on (rollOver) {
if (!_root.ignoreSound) {
_root.playSound1("overBtn");
}
}
on (release) {
if (!_root.ignoreSound) {
_root.playSound1("releaseBtn");
}
}
Symbol 261 Button
on (release) {
if (!_root.isPause) {
_root.isPause = true;
_root.hideCards();
_root.showPause();
}
}
on (rollOver) {
if (!_root.ignoreSound) {
_root.playSound1("overBtn");
}
}
on (release) {
if (!_root.ignoreSound) {
_root.playSound1("releaseBtn");
}
}
Symbol 268 Button
on (press) {
_root.closeAlert(1);
}
Symbol 272 Button
on (press) {
_root.closeAlert(0);
}
Symbol 275 Button
on (release) {
if (_root.ignoreSound) {
_root.ignoreSound = 0;
this.gotoAndStop("on");
} else {
_root.ignoreSound = 1;
this.gotoAndStop("off");
}
}
Symbol 277 MovieClip Frame 1
stop();
Symbol 277 MovieClip Frame 2
stop();
Symbol 280 Button
on (release) {
_root.isPause = true;
_root.pauseStart = getTimer();
_root.isInstruction = true;
_root.hideCards();
_root.gotoAndStop("instructions");
}
Symbol 284 Button
on (press) {
if (_root.ignoreUser) {
return(undefined);
}
var stack;
var card;
stack = undefined;
if (_root.stackSelected != undefined) {
stack = _root.stackSelected;
_root.releaseCard();
card = _root.cardStack[stack].pop();
} else if (_root.leftSelected != undefined) {
stack = _root.leftSelected;
_root.releaseLeftCard();
card = _root.leftStack[stack].pop();
}
if (stack != undefined) {
_root.moveLeftCard(card, num);
_root.dropArrow();
}
}
on (rollOver) {
if (_root.ignoreUser) {
return(undefined);
}
if ((_root.stackSelected != undefined) or (_root.leftSelected != undefined)) {
_root.initArrow();
}
}
on (rollOut) {
_root.dropArrow();
}
Symbol 286 Button
on (press) {
if (_root.ignoreUser) {
return(undefined);
}
if (_root.stackSelected != undefined) {
var st = _root.stackSelected;
_root.releaseCard();
var card = _root.cardStack[st].pop();
if ((_root[card]._currentframe % 13) == 1) {
_root.moveRightCard(card, num);
} else {
_root.cardStack[st].push(card);
}
}
_root.dropArrow();
}
on (rollOver) {
if (_root.stackSelected) {
var st = _root.stackSelected;
var card = _root.cardStack[st].pop();
_root.cardStack[st].push(card);
if ((_root[card]._currentframe % 13) == 1) {
_root.initArrow();
}
}
}
on (rollOut) {
_root.dropArrow();
}
Symbol 288 Button
on (press) {
if (_root.ignoreUser) {
return(undefined);
}
var stack;
var card;
stack = (card = undefined);
if (_root.stackSelected != undefined) {
stack = _root.stackSelected;
_root.releaseCard();
card = _root.cardStack[stack].pop();
if (_root.tempStack.length > 1) {
var i;
var free = 0;
i = 0;
while (i < 4) {
if (_root.leftStack[i].length == 0) {
free++;
}
i++;
}
if (free) {
_root.cardStack[stack].push(card);
_root.showAlert(stack, num, free);
} else {
_root.moveCard(card, num);
}
} else {
_root.moveCard(card, num);
}
} else if (_root.leftSelected != undefined) {
stack = _root.leftSelected;
_root.releaseLeftCard();
card = _root.leftStack[stack].pop();
_root.moveCard(card, num);
}
_root.dropArrow();
}
on (rollOver) {
if (_root.ignoreUser) {
return(undefined);
}
var fromStack = undefined;
if ((_root.stackSelected != undefined) || (_root.leftSelected != undefined)) {
_root.initArrow();
}
}
on (rollOut) {
_root.dropArrow();
}
Symbol 293 Button
on (press) {
var freeCells = 0;
if (_root.ignoreUser) {
return(undefined);
}
if (!secondClick) {
startInterval = getTimer();
secondClick = true;
}
if (_root.stackSelected != undefined) {
var st = _root.stackSelected;
_root.releaseCard();
if (i == 0) {
if ((toType != fromType) && ((toRank - 1) == fromRank)) {
_root.moveCard(_root.cardStack[st].pop(), stack);
} else {
_root.check = 1;
}
} else if (i > 0) {
_root.moveCup(st, stack, i + 1);
} else {
endInterval = getTimer();
interval = endInterval - startInterval;
if (((st == stack) && (interval < 350)) && (interval > 1)) {
var k = 0;
while (k < 4) {
if (_root.leftStack[k].length == 0) {
_root.moveLeftCard(_root.cardStack[st].pop(), k);
if (!_root.ignoreSound) {
_root.playSound1("pressCard");
}
break;
}
k++;
}
}
_root.check = 1;
secondClick = false;
}
if (!_root.ignoreSound) {
_root.playSound1("pushCard");
}
} else {
if (_root.leftSelected != undefined) {
var st = _root.leftSelected;
_root.releaseLeftCard();
var card = _root.leftStack[st].pop();
if (((toRank - 1) == fromRank) && (toType != fromType)) {
_root.moveCard(card, stack);
} else {
_root.leftStack[st].push(card);
}
} else if (stack != undefined) {
_root.selectCard(stack);
} else if (left != undefined) {
_root.selectLeftCard(left);
}
if (!_root.ignoreSound) {
_root.playSound1("pushCard");
}
}
_root.dropArrow();
}
on (rollOver) {
if (_root.ignoreUser) {
return(undefined);
}
var fromStack;
var fromType;
var fromCard;
var fromRank;
var toType;
var toCard;
var toRank;
fromStack = undefined;
if (_root.stackSelected != undefined) {
fromStack = _root.stackSelected;
fromCard = _root.cardStack[fromStack].pop();
_root.cardStack[fromStack].push(fromCard);
} else if (_root.leftSelected != undefined) {
fromStack = _root.leftSelected;
fromCard = _root.leftStack[fromStack].pop();
_root.leftStack[fromStack].push(fromCard);
}
if (fromStack != undefined) {
if (stack != undefined) {
toCard = _root.cardStack[stack].pop();
_root.cardStack[stack].push(toCard);
toType = Boolean(_root[toCard]._currentframe < 27);
toRank = (_root[toCard]._currentframe % 13) || 13;
var i;
var free = 0;
var tLength = _root.tempStack.length;
i = 0;
while (i < 4) {
if (_root.leftStack[i].length == 0) {
free++;
}
i++;
}
i = 0;
while (i < 8) {
if (_root.cardStack[i].length == 0) {
free++;
}
i++;
}
i = tLength - 1;
while (i >= 0) {
fromCard = _root.tempStack[i];
fromType = Boolean(_root[fromCard]._currentframe < 27);
fromRank = (_root[fromCard]._currentframe % 13) || 13;
if ((((toRank - 1) == fromRank) && (toType != fromType)) && ((i - 1) < free)) {
_root.initArrow();
return(undefined);
}
i--;
}
} else if (right != undefined) {
fromType = _root.getType(fromCard);
fromRank = (_root[fromCard]._currentframe % 13) || 13;
toCard = _root.rightStack[right].pop();
_root.rightStack[right].push(toCard);
toType = _root.getType(toCard);
toRank = (_root[toCard]._currentframe % 13) || 13;
if (((toRank + 1) == fromRank) && (toType == fromType)) {
_root.initArrow();
}
}
}
}
on (rollOut) {
_root.dropArrow();
}
Symbol 394 MovieClip Frame 1
gotoAndStop(cardFrame);
Symbol 397 MovieClip Frame 1
stop();
Symbol 397 MovieClip Frame 2
stop();
Symbol 405 Button
on (release) {
_root.gotoAndStop("pregame");
}
on (rollOver) {
if (!_root.ignoreSound) {
_root.playSound1("overBtn");
}
}
on (release) {
if (!_root.ignoreSound) {
_root.playSound1("releaseBtn");
}
}
Symbol 406 MovieClip Frame 1
function init(hs) {
trace(hs);
_visible = true;
hhs = hs;
trace(score);
score = _root.devRazr(hs);
trace("score=" + score);
}
function cont() {
_visible = false;
if (_root.gameType == "adventure") {
if (_root.currentLevel < 5) {
if (_root.isWin) {
_root.currentLevel++;
_root.gotoAndStop("map");
} else {
_root.gotoAndStop(4);
}
}
if (_root.currentLevel == 5) {
if (_root.scoreIsHi(hhs)) {
_root.enterScore = hhs;
} else {
_root.enterScore = -1;
}
_root.gotoAndStop(4);
}
} else {
if (_root.scoreIsHi(hhs)) {
_root.enterScore = hhs;
} else {
_root.enterScore = -1;
}
_root.gotoAndStop(4);
}
}
_visible = false;
stop();
Symbol 407 MovieClip Frame 1
fscommand ("allowscale", "0");
w = "15";
h = "15";
angle = int(Math.random() * 120);
trace("angle=" + angle);
m = Number(w) + Number(h);
Symbol 407 MovieClip Frame 4
i = "1";
mc = "1";
Symbol 407 MovieClip Frame 5
y = 1;
x = i;
if (Number(i) < Number(h)) {
k = i;
} else if (Number(i) > Number(w)) {
k = Number(m - i) + 1;
y = i - w;
x = w;
} else {
k = h;
}
l = "1";
while (Number(l) <= Number(k)) {
x = x - 1;
y = Number(y) + 1;
attachMovie("move", "move" add mc, mc);
setProperty("move" add mc, _x , 230 + Number(x * 4));
setProperty("move" add mc, _y , 170 + Number(y * 4));
setProperty("move" add mc, _rotation , mc * angle);
mc = Number(mc) + 1;
l = Number(l) + 1;
}
i = Number(i) + 1;
Symbol 407 MovieClip Frame 6
if (Number(i) >= Number(Number(m) + 1)) {
stop();
} else {
gotoAndPlay (5);
}
Symbol 425 Button
on (release) {
_root.gotoAndStop("pregame");
}