Frame 1
total = getBytesTotal();
gameurl = _url.toLowerCase();
validsite = 1;
Frame 2
actual = getBytesLoaded();
percloaded = int((actual / total) * 100);
if (percloaded < 100) {
showperc = percloaded add "%";
display.gotoAndStop(int(percloaded / 10) + 1);
} else if (validsite >= 0) {
gotoAndPlay (4);
}
Frame 3
gotoAndPlay ("Scene 5");
Frame 170
stop();
Frame 171
function clickedcard(clicknum) {
if ((anim == false) and (dragmode == true)) {
enddrag(clicknum);
} else if ((anim == false) and (dragmode == false)) {
clicknum = Number(clicknum);
if (clicknum < 10) {
cardprefix = "c0";
} else {
cardprefix = "c";
}
tempmc = eval (cardprefix add clicknum);
tempmc.swapDepths(currentdepth + 200);
startDrag (tempmc, true);
dragmode = true;
dragtime = getTimer();
}
}
function releasecard(clicknum) {
hilite._x = -500;
hilite._y = -500;
infotext = "";
if ((totmoves == 0) and (shuffle == false)) {
infotext = "No available moves, please reshuffle";
}
rtime = getTimer() - dragtime;
if ((dragmode == true) and (rtime > dblclickspeed)) {
enddrag(clicknum);
}
lastclick = getTimer();
}
function dblclickcard(clicknum) {
clicknum = Number(clicknum);
if (clicknum < 10) {
cardprefix = "c0";
} else {
cardprefix = "c";
}
tempmc = eval (cardprefix add clicknum);
cv = tempmc.cardval;
cs = tempmc.cardsuit;
bn = tempmc.board;
if (bn <= 16) {
movetohome();
} else {
stopDrag();
bpos = eval ("col" add bn);
tempmc._x = bpos._x;
tempmc._y = bpos._y;
dragmode = false;
}
lastclick = 0;
}
function enddrag(clicknum) {
dragtime = 0;
clicknum = Number(clicknum);
if (clicknum < 10) {
cardprefix = "c0";
} else {
cardprefix = "c";
}
tempmc = eval (cardprefix add clicknum);
stopDrag();
dragmode = false;
bn = tempmc.board;
destmc = eval ("col" add bn);
dropped = 0;
validdrop = false;
f = 1;
while (f <= 24) {
dropmc = eval ("col" add f);
dropcheck = dropmc.hitTest(tempmc._x, tempmc._y);
if (dropcheck == true) {
dropped = f;
}
f++;
}
if (((bn > 16) and (dropped > 16)) and (bn != dropped)) {
validdrop = false;
if (math.abs(bn - dropped) == 4) {
cv = tempmc.cardval;
droppos = eval ("col" add dropped);
cv2 = droppos.val;
if ((dropped <= 20) and ((cv2 - cv) == 1)) {
tempmc._x = droppos._x;
tempmc._y = droppos._y;
tempmc.board = dropped;
tempmc.swapDepths(currentdepth);
tempmc.depth = currentdepth;
currentdepth = currentdepth + 1;
droppos.val = droppos.val - 1;
grabpos = eval ("col" add bn);
grabpos.val = grabpos.val - 1;
validdrop = true;
}
if (((dropped > 20) and ((cv - cv2) == 1)) and (validdrop != true)) {
tempmc._x = droppos._x;
tempmc._y = droppos._y;
tempmc.board = dropped;
tempmc.swapDepths(currentdepth);
tempmc.depth = currentdepth;
currentdepth = currentdepth + 1;
droppos.val = droppos.val + 1;
grabpos = eval ("col" add bn);
grabpos.val = grabpos.val + 1;
validdrop = true;
}
}
if (validdrop == xxxfalse) {
droppos = eval ("col" add bn);
tempmc.destx = droppos._x;
tempmc.desty = droppos._y;
tempmc.animsteps = 5;
anim = true;
}
}
if ((dropped != 0) and (dropped <= 16)) {
tempboard = eval ("board" add dropped);
topcard = tempboard[tempboard.length - 1];
if (topcard < 10) {
cardprefix = "c0";
} else {
cardprefix = "c";
}
cardmc = eval (cardprefix add topcard);
dropsuit = cardmc.cardsuit;
dropval = cardmc.cardval;
if ((dropsuit == tempmc.cardsuit) and (bn <= 16)) {
valdiff = Math.abs(dropval - tempmc.cardval);
if ((valdiff == 1) or (valdiff == 12)) {
bn = cardmc.board;
destmc = eval ("col" add bn);
tempmc._x = destmc._x;
tempmc._y = destmc._y;
oldbn = tempmc.board;
tempmc.board = bn;
tempmc.swapDepths(currentdepth);
tempmc.depth = currentdepth;
currentdepth = currentdepth + 1;
validdrop = true;
tempboard = eval ("board" add bn);
tempboard.push(clicknum);
tempboard = eval ("board" add oldbn);
tempboard.pop();
}
}
calcmoves();
}
if (((dropped != 0) and (dropped > 16)) and (validdrop == false)) {
cv = tempmc.cardval;
cs = tempmc.cardsuit;
bn = tempmc.board;
if (bn <= 16) {
movetohome();
}
}
if (validdrop == false) {
clicknum = Number(clicknum);
if (clicknum < 10) {
cardprefix = "c0";
} else {
cardprefix = "c";
}
tempmc = eval (cardprefix add clicknum);
bn = tempmc.board;
destmc = eval ("col" add bn);
tempmc.destx = destmc._x;
tempmc.desty = destmc._y;
tempmc.animsteps = 5;
anim = true;
}
}
function movetohome() {
moved = false;
anim = false;
if (cs == "hearts") {
if ((home1.val - cv) == 1) {
tempmc.animsteps = animsteps / 2;
tempmc.destx = home1._x;
tempmc.desty = home1._y;
anim = true;
home1.val = home1.val - 1;
tempmc.board = 17;
tempmc.depth = currentdepth;
currentdepth = currentdepth + 1;
moved = true;
}
if (((home5.val - cv) == -1) and (moved == false)) {
tempmc.animsteps = animsteps / 2;
tempmc.destx = home5._x;
tempmc.desty = home5._y;
anim = true;
home5.val = home5.val + 1;
tempmc.board = 21;
tempmc.depth = currentdepth;
currentdepth = currentdepth + 1;
moved = true;
}
}
if (cs == "clubs") {
if (((home2.val - cv) == 1) and (moved == false)) {
tempmc.animsteps = animsteps / 2;
tempmc.destx = home2._x;
tempmc.desty = home2._y;
anim = true;
home2.val = home2.val - 1;
tempmc.board = 18;
tempmc.depth = currentdepth;
currentdepth = currentdepth + 1;
moved = true;
}
if (((home6.val - cv) == -1) and (moved == false)) {
tempmc.animsteps = animsteps / 2;
tempmc.destx = home6._x;
tempmc.desty = home6._y;
anim = true;
home6.val = home6.val + 1;
tempmc.board = 22;
tempmc.depth = currentdepth;
currentdepth = currentdepth + 1;
moved = true;
}
}
if (cs == "diamonds") {
if (((home3.val - cv) == 1) and (moved == false)) {
tempmc.animsteps = animsteps / 2;
tempmc.destx = home3._x;
tempmc.desty = home3._y;
anim = true;
home3.val = home3.val - 1;
tempmc.board = 19;
tempmc.depth = currentdepth;
currentdepth = currentdepth + 1;
moved = true;
}
if (((home7.val - cv) == -1) and (moved == false)) {
tempmc.animsteps = animsteps / 2;
tempmc.destx = home7._x;
tempmc.desty = home7._y;
anim = true;
home7.val = home7.val + 1;
tempmc.board = 23;
tempmc.depth = currentdepth;
currentdepth = currentdepth + 1;
moved = true;
}
}
if (cs == "spades") {
if (((home4.val - cv) == 1) and (moved == false)) {
tempmc.animsteps = animsteps / 2;
tempmc.destx = home4._x;
tempmc.desty = home4._y;
anim = true;
home4.val = home4.val - 1;
tempmc.board = 20;
tempmc.depth = currentdepth;
currentdepth = currentdepth + 1;
moved = true;
}
if (((home8.val - cv) == -1) and (moved == false)) {
tempmc.animsteps = animsteps / 2;
tempmc.destx = home8._x;
tempmc.desty = home8._y;
anim = true;
home8.val = home8.val + 1;
tempmc.board = 24;
tempmc.depth = currentdepth;
currentdepth = currentdepth + 1;
moved = true;
}
}
if (anim == true) {
tempboard = eval ("board" add bn);
tempboard.pop();
totalscore = securescore(totalscore, 5, 1);
} else {
enddrag(clicknum);
}
}
function calcmoves() {
totmoves = 0;
hint = 0;
movelist = "";
f = 1;
while (f <= 16) {
tempboard = eval ("board" add f);
topcard = tempboard[tempboard.length - 1];
if (topcard < 10) {
cardprefix = "c0";
} else {
cardprefix = "c";
}
cardmc = eval (cardprefix add topcard);
cv = cardmc.cardval;
cs = cardmc.cardsuit;
if (cs == "hearts") {
if ((home1.val - cv) == 1) {
movelist = (((movelist add "Pile ") add f) add " to home.") add newline;
totmoves = totmoves + 1;
hint = f;
}
if ((home5.val - cv) == -1) {
movelist = (((movelist add "Pile ") add f) add " to home.") add newline;
totmoves = totmoves + 1;
hint = f;
}
}
if (cs == "clubs") {
if ((home2.val - cv) == 1) {
movelist = (((movelist add "Pile ") add f) add " to home.") add newline;
totmoves = totmoves + 1;
hint = f;
}
if ((home6.val - cv) == -1) {
movelist = (((movelist add "Pile ") add f) add " to home.") add newline;
totmoves = totmoves + 1;
hint = f;
}
}
if (cs == "diamonds") {
if ((home3.val - cv) == 1) {
movelist = (((movelist add "Pile ") add f) add " to home.") add newline;
totmoves = totmoves + 1;
hint = f;
}
if ((home7.val - cv) == -1) {
movelist = (((movelist add "Pile ") add f) add " to home.") add newline;
totmoves = totmoves + 1;
hint = f;
}
}
if (cs == "spades") {
if ((home4.val - cv) == 1) {
movelist = (((movelist add "Pile ") add f) add " to home.") add newline;
totmoves = totmoves + 1;
hint = f;
}
if ((home8.val - cv) == -1) {
movelist = (((movelist add "Pile ") add f) add " to home.") add newline;
totmoves = totmoves + 1;
hint = f;
}
}
g = 1;
while (g <= 16) {
if (f != g) {
tempboard2 = eval ("board" add g);
topcard2 = tempboard2[tempboard2.length - 1];
if (topcard2 < 10) {
cardprefix = "c0";
} else {
cardprefix = "c";
}
cardmc2 = eval (cardprefix add topcard2);
cv2 = cardmc2.cardval;
cs2 = cardmc2.cardsuit;
cdiff = math.abs(cv - cv2);
if (((cdiff == 1) or (cdiff == 12)) and (cs2 == cs)) {
movelist = ((((movelist add "Pile ") add f) add " to pile ") add g) add newline;
totmoves = totmoves + 1;
if (hint == 0) {
hint = f;
}
}
}
g++;
}
f++;
}
if (totmoves == 0) {
infotext = "No available moves, please reshuffle";
}
}
function securescore(oldscore, ssval, ssmode) {
var _local1 = ssval;
var _local2 = ssmode;
var _local3 = oldscore;
ssmodified = false;
if ((securestartscore + (securetotal / ssfactor)) != _local3) {
ssmodified = true;
}
if (_local2 == 1) {
securetotal = securetotal + (_local1 * ssfactor);
}
if (_local2 == 2) {
securetotal = securetotal - (_local1 * ssfactor);
}
if (_local2 == 3) {
securetotal = securetotal + ((_local1 * ssfactor) - _local3);
}
securecount = securecount + 1;
if (_local3 != (securescorecheck / ssfactor)) {
ssmodified = true;
}
if (_local2 == 1) {
securescorecheck = securescorecheck + (_local1 * ssfactor);
}
if (_local2 == 2) {
securescorecheck = securescorecheck - (_local1 * ssfactor);
}
if (_local2 == 3) {
securescorecheck = _local1 * ssfactor;
}
if (ssmodified == true) {
securescorecheck = 0;
}
return(securescorecheck / ssfactor);
}
securestartscore = 0;
securescorecheck = 0;
securetotal = 0;
securecount = 0;
ssfactor = random(10) + -1;
totalscore = securescore(0, 0, 3);
framespeed = 25;
hint_val = 5;
shuff_val = 3;
infotext = "";
lastclick = 0;
dblclickspeed = 300;
dragmode = false;
dragtime = 0;
totmoves = 0;
showscore = "0000";
deck = new Array();
suitorder = new Array("clubs", "hearts", "spades", "diamonds", "clubs");
board1 = new Array();
board2 = new Array();
board3 = new Array();
board4 = new Array();
board5 = new Array();
board6 = new Array();
board7 = new Array();
board8 = new Array();
board9 = new Array();
board10 = new Array();
board11 = new Array();
board12 = new Array();
board13 = new Array();
board14 = new Array();
board15 = new Array();
board16 = new Array();
gameover = false;
deckpos = 1;
suitval = 1;
numdecks = 2;
cardwidth = 63;
cardheight = 84;
startx = -320;
starty = 540;
totcards = 52 * numdecks;
ftemp = 0;
f = 1;
while (f <= totcards) {
deck[f] = f;
ftemp = ftemp + 1;
if (ftemp > 52) {
ftemp = ftemp - 52;
}
cardnum = ftemp;
if (cardnum < 10) {
cardprefix2 = "c0";
} else {
cardprefix2 = "c";
}
if (f < 10) {
cardprefix = "c0";
} else {
cardprefix = "c";
}
attachMovie(cardprefix2 add ftemp, cardprefix add f, 50 + f);
mcname = eval (cardprefix add f);
mcname._x = startx;
mcname._y = starty + (f * 10);
mcname._width = cardwidth;
mcname._height = cardheight;
cardval = ftemp % 13;
if (cardval == 0) {
cardval = 13;
}
suitval = suitval % 4;
if ((suitval == 1) or (suitval == 3)) {
cardcol = "red";
} else {
cardcol = "black";
}
mcname.cardval = cardval;
mcname.cardcol = cardcol;
mcname.cardsuit = suitorder[suitval];
mcname.location = "deck";
mcname.available = false;
mcname.depth = f;
mcname.gotoAndStop(2);
if (cardval == 13) {
suitval = suitval + 1;
}
f++;
}
mixes = 20;
shuffletype = 1;
f = 1;
while (f <= mixes) {
g = 1;
while (g <= totcards) {
if (shuffletype == 1) {
swap = random(totcards) + 1;
}
temp = deck[swap];
deck[swap] = deck[g];
deck[g] = temp;
g++;
}
f++;
}
f = 1;
while (f <= 8) {
Set(("home" add f) add ".val", 0);
f++;
}
maxcols = 16;
currentcol = 1;
f = 1;
while (f <= totcards) {
ff = deck[f];
if (ff < 10) {
cardprefix = "c0";
} else {
cardprefix = "c";
}
mcname = eval (cardprefix add ff);
mcname.animsteps = 0;
mcname.swapDepths(f + 50);
mcname.depth = f + 50;
dest = eval ("col" add currentcol);
cv = mcname.cardval;
cs = mcname.cardsuit;
mcname.destx = dest._x;
mcname.desty = dest._y;
homepos = false;
if (((cv == 13) and (cs == "hearts")) and (home1.val == 0)) {
mcname.destx = home1._x;
mcname.desty = home1._y;
currentcol = currentcol - 1;
home1.val = 13;
homepos = true;
mcname.board = 17;
}
if (((cv == 13) and (cs == "clubs")) and (home2.val == 0)) {
mcname.destx = home2._x;
mcname.desty = home2._y;
currentcol = currentcol - 1;
home2.val = 13;
homepos = true;
mcname.board = 18;
}
if (((cv == 13) and (cs == "diamonds")) and (home3.val == 0)) {
mcname.destx = home3._x;
mcname.desty = home3._y;
currentcol = currentcol - 1;
home3.val = 13;
homepos = true;
mcname.board = 19;
}
if (((cv == 13) and (cs == "spades")) and (home4.val == 0)) {
mcname.destx = home4._x;
mcname.desty = home4._y;
currentcol = currentcol - 1;
home4.val = 13;
homepos = true;
mcname.board = 20;
}
if (((cv == 1) and (cs == "hearts")) and (home5.val == 0)) {
mcname.destx = home5._x;
mcname.desty = home5._y;
currentcol = currentcol - 1;
home5.val = 1;
homepos = true;
mcname.board = 21;
}
if (((cv == 1) and (cs == "clubs")) and (home6.val == 0)) {
mcname.destx = home6._x;
mcname.desty = home6._y;
currentcol = currentcol - 1;
home6.val = 1;
homepos = true;
mcname.board = 22;
}
if (((cv == 1) and (cs == "diamonds")) and (home7.val == 0)) {
mcname.destx = home7._x;
mcname.desty = home7._y;
currentcol = currentcol - 1;
home7.val = 1;
homepos = true;
mcname.board = 23;
}
if (((cv == 1) and (cs == "spades")) and (home8.val == 0)) {
mcname.destx = home8._x;
mcname.desty = home8._y;
currentcol = currentcol - 1;
home8.val = 1;
homepos = true;
mcname.board = 24;
}
if (homepos == false) {
tempboard = eval ("board" add currentcol);
pushed = tempboard.push(ff);
mcname.board = currentcol;
}
currentcol = currentcol + 1;
if (currentcol > maxcols) {
currentcol = 1;
}
f++;
}
currentdepth = f + 50;
deal = true;
dealcard = 1;
dealdelay = 4;
delay = dealdelay;
shuffdelay = 3;
attachMovie("dealer", "hands", 1001);
hands._x = 292;
hands._y = 436;
hands._visible = true;
attachMovie("dealer2", "hands2", 1);
hands2._x = 291;
hands2._y = 440;
attachMovie("buttonbar", "bbar", 2001);
bbar._x = 320;
bbar._y = 505;
attachMovie("showhint", "hilite", 12001);
hilite._x = -500;
hilite._y = -500;
col17 = home1;
col18 = home2;
col19 = home3;
col20 = home4;
col21 = home5;
col22 = home6;
col23 = home7;
col24 = home8;
Instance of Symbol 244 MovieClip in Frame 171
onClipEvent (enterFrame) {
if ((/:securescorecheck / /:ssfactor) != /:totalscore) {
Set("/:totalscore", 0);
}
tempscore = "0000" add Math.abs(/:totalscore);
sl = tempscore.length;
Set("/:showscore", tempscore.substr(sl - 4, 4));
if (/:totalscore < 0) {
Set("/:showscore", "-" add /:showscore);
}
}
Frame 172
if ((shuffle == true) and (delay <= 0)) {
tempboard = eval ("board" add shuffcard);
if (tempboard.length > 1) {
topcard = tempboard[0];
if (topcard < 10) {
cardprefix = "c0";
} else {
cardprefix = "c";
}
cardmc = eval (cardprefix add topcard);
if (shuffpart == 1) {
if (shuffcard <= 4) {
cardmc.destx = cardmc._x + 70;
cardmc.desty = cardmc._y;
}
if (shuffcard == 5) {
cardmc.destx = cardmc._x - 70;
cardmc.desty = cardmc._y;
}
if ((shuffcard > 5) and (shuffcard < 12)) {
cardmc.destx = cardmc._x;
cardmc.desty = cardmc._y + 90;
}
if (shuffcard == 12) {
cardmc.destx = cardmc._x + 70;
cardmc.desty = cardmc._y;
}
if (shuffcard > 12) {
cardmc.destx = cardmc._x - 70;
cardmc.desty = cardmc._y;
}
cardmc.animsteps = 3;
anim = true;
} else {
destmc = eval ("col" add shuffcard);
cardmc.swapDepths(currentdepth);
cardmc.depth = currentdepth;
currentdepth = currentdepth + 1;
cardmc.destx = destmc._x;
cardmc.desty = destmc._y;
cardmc.animsteps = 3;
anim = true;
tempboard = eval ("board" add shuffcard);
if (tempboard.length > 1) {
topcard = tempboard[0];
h = 1;
while (h < tempboard.length) {
tempboard[h - 1] = tempboard[h];
h++;
}
tempboard.pop();
tempboard.push(topcard);
}
}
}
if (shuffpart == 1) {
shuffpart = 2;
} else {
shuffpart = 1;
shuffcard = shuffcard + 1;
}
if (shuffcard > 16) {
shuffle = false;
}
delay = shuffdelay;
}
if (shuffle == true) {
delay = delay - 1;
}
if ((deal == true) and (delay == 0)) {
animsteps = 10;
delay = dealdelay;
f = deck[dealcard];
if (f < 10) {
cardprefix = "c0";
} else {
cardprefix = "c";
}
mcname = eval (cardprefix add f);
mcname.animsteps = animsteps;
mcname._x = 320;
mcname._y = 420;
mcname.gotoAndStop(1);
anim = true;
dealcard = dealcard + 1;
if (dealcard > totcards) {
deal = false;
}
}
if (deal == true) {
delay = delay - 1;
}
if (anim == true) {
maxsteps = 0;
f = 1;
while (f <= totcards) {
if (f < 10) {
cardprefix = "c0";
} else {
cardprefix = "c";
}
mcname = eval (cardprefix add f);
stepcount = mcname.animsteps;
if (stepcount > maxsteps) {
maxsteps = stepcount;
}
if (stepcount > 0) {
dx = mcname.destx;
dy = mcname.desty;
sx = mcname._x;
sy = mcname._y;
newx = (dx - sx) / stepcount;
newy = (dy - sy) / stepcount;
mcname._x = mcname._x + newx;
mcname._y = mcname._y + newy;
stepcount = stepcount - 1;
mcname.animsteps = stepcount;
if (stepcount == 0) {
newdepth = mcname.depth;
mcname.swapDepths(newdepth);
}
}
f++;
}
if (maxsteps == 0) {
anim = false;
removeMovieClip("hands");
removeMovieClip("hands2");
calcmoves();
}
}
Frame 173
if ((((shuff_val == 0) and (totmoves == 0)) and (shuffle == false)) and (anim == false)) {
gotoAndPlay ("gameover");
}
gotoAndPlay ("gameloop");
Frame 174
attachMovie("gameover", "gover", 9999);
gover._x = 49;
gover._y = 70;
stop();
Frame 175
removeMovieClip("go");
removeMovieClip("gover");
removeMovieClip("hands");
removeMovieClip("hands2");
removeMovieClip("bbar");
removeMovieClip("hilite");
f = 1;
while (f <= totcards) {
cardnum = f;
if (cardnum < 10) {
cardprefix = "c0";
} else {
cardprefix = "c";
}
mcname = eval (cardprefix add f);
removeMovieClip(mcname);
f++;
}
gotoAndPlay (170);
Symbol 5 Button
on (press) {
cardnum = substring(this, 10, 3);
if (/:gameover == false) {
/:clickedcard(cardnum);
}
}
on (release, releaseOutside) {
cardnum = substring(this, 10, 3);
if ((/:lastclick > 0) and ((getTimer() - /:lastclick) < /:dblclickspeed)) {
if (/:gameover == false) {
/:dblclickcard(cardnum);
}
} else if (/:gameover == false) {
/:releasecard(cardnum);
}
}
Symbol 17 MovieClip Frame 1
Symbol 119 Button
on (press) {
_root.gotoAndPlay("restart");
}
Symbol 137 Button [download]
on (release) {
getURL ("http://www.gameshandbook.com/freegames.php", "_blank");
}
Symbol 138 Button [playmore]
on (release) {
getURL ("http://www.gameshandbook.com", "_blank");
}
Symbol 211 Button
on (press) {
/:gotoAndPlay("restart");
}
Symbol 212 MovieClip [gameover] Frame 1
logoheight = 57;
stripheight = 3;
totstrips = logoheight / stripheight;
f = 2;
while (f <= (totstrips + 1)) {
duplicateMovieClip ("s1", "s" add f, f);
tempmc = eval ("s" add f);
tempmc._x = s1._x;
tempmc._y = s1._y + ((f - 1) * stripheight);
tempmc.logo._y = tempmc.logo._y - ((f - 1) * stripheight);
f++;
}
ang = 0;
ang2 = 0;
angdiff = Math.PI / (totstrips + 1);
angdiff2 = (Math.PI/4) / (totstrips + 1);
loop = 0;
Symbol 212 MovieClip [gameover] Frame 2
xm = (_xmouse - 275) / 3;
ym = _ymouse - 200;
smid = 275;
ymid = 200;
wavesize = 65;
wavesize2 = 15;
ang = loop * angdiff;
ang2 = loop * angdiff2;
f = 1;
while (f <= (totstrips + 1)) {
tempmc = eval ("s" add f);
yinc = Math.sin(ang2) * wavesize;
xinc = Math.sin(ang) * wavesize2;
ang = ang + angdiff;
ang2 = ang2 + angdiff2;
newy = ymid + yinc;
newx = smid + xinc;
tempmc._y = newy;
tempmc._x = newx;
f++;
}
loop = loop + 1;
Symbol 212 MovieClip [gameover] Frame 3
gotoAndPlay (2);
Symbol 218 Button
on (press) {
if (((/:deal != true) and (/:shuffle != true)) and (/:totmoves > 0)) {
tempmc = eval ("/:col" add /:hint);
/:hilite._x = tempmc._x;
/:hilite._y = tempmc._y;
Set("/:hint_val", /:hint_val - 1);
if (/:hint_val != 1) {
Set("/:infotext", ("Only " add /:hint_val) add " hints remaining");
} else {
Set("/:infotext", ("Only " add /:hint_val) add " hint remaining");
}
if (/:hint_val == 0) {
Set("/:infotext", "No hints left!");
/:bbar.buttonhint._visible = false;
}
}
}
Symbol 221 Button
on (press) {
if ((/:shuffle != true) and (/:deal != true)) {
Set("/:shuffle", true);
Set("/:shuffpart", 1);
Set("/:shuffcard", 1);
Set("/:delay", /:shuffdelay);
Set("/:shuff_val", /:shuff_val - 1);
if (/:shuff_val != 1) {
Set("/:infotext", ("Only " add /:shuff_val) add " shuffles remaining");
} else {
Set("/:infotext", ("Only " add /:shuff_val) add " shuffle remaining");
}
if (/:shuff_val == 0) {
Set("/:infotext", "No shuffles remaining");
/:bbar.buttonshuffle._visible = false;
}
/:hilite._x = -500;
/:hilite._y = -500;
}
}
Symbol 226 Button
on (press) {
if ((/:deal != true) and (/:shuffle != true)) {
/:gotoAndPlay("gameover");
}
}
Symbol 236 Button
on (press) {
gotoAndPlay (171);
}