Frame 1
function Grab_decode(toDecode) {
if ((toDecode == undefined) || (toDecode == "")) {
return("");
}
_root.Grab_equalSign = false;
var decodedArray = new Array();
decodedArray = Base64toBinary(toDecode);
var code = "decode";
var decodedMessage = XOR_decode(code, decodedArray, _root.secWord);
return(decodedMessage);
}
function Grab_encode(toEncode) {
if ((toEncode == undefined) || (toEncode == "")) {
return("");
}
var code = "encode";
var codedArray = new Array();
codedArray = XOR_encode(code, toEncode, _root.secWord);
var out = intToBin_enc(codedArray);
return(out);
}
function encodeBase64(n) {
var char = base64.charAt(n);
return(char);
}
function XOR_encode(code, myString, secWord) {
var len = (myString.length - 1);
var secLen = (secWord.length - 1);
var j = -1;
var charSec;
var charString;
var foo;
var xor_enc_array = new Array();
var i = 0;
while (i <= len) {
j++;
if (j > secLen) {
j = 0;
}
charSec = secWord.charCodeAt(j);
charString = myString.charCodeAt(i);
foo = charSec ^ charString;
xor_enc_array[i] = foo;
i++;
}
return(xor_enc_array);
}
function XOR_decode(code, myArray, secWord) {
var len = (myArray.length - 1);
var secLen = (secWord.length - 1);
var j = -1;
var charSec;
var charString;
var foo;
var encoded = "";
var xor_enc_array = new Array();
var i = 0;
while (i <= len) {
j++;
if (j > secLen) {
j = 0;
}
charSec = secWord.charCodeAt(j);
charString = myArray[i];
foo = charSec ^ charString;
encoded = encoded + String.fromCharCode(foo);
i++;
}
if (_root.Grab_equalSign) {
encoded = encoded.substring(0, len);
}
return(encoded);
}
function toBinary(val) {
var str = "";
var j;
var p;
var bit = 0;
while (bit < 8) {
j = val % 2;
j = j.toString();
p = j.indexOf(".");
if (p != -1) {
j = j.substring(0, p);
}
j = Number(j);
if (j == 0) {
str = str + "0";
} else {
str = str + "1";
}
val = val / 2;
val = val.toString();
p = val.indexOf(".");
if (p != -1) {
val = val.substring(0, p);
}
val = Number(val);
bit++;
}
var tmp = str;
str = "";
var i = 7;
while (i >= 0) {
str = str + tmp.slice(i, i + 1);
i--;
}
return(str);
}
function intToBin_enc(codedArray) {
var len = (codedArray.length - 1);
var c;
var b;
var binString = "";
var i = 0;
while (i <= len) {
c = codedArray[i];
b = toBinary(c);
binString = binString + b;
i++;
}
var out = binToBase64(binString);
return(out);
}
function binToBase64(bin) {
var len = bin.length;
var j = 0;
var binArray = new Array();
var z = 0;
var Base64OutString;
var i = 0;
while (i <= (len - 1)) {
if (j < 6) {
j++;
} else {
j = 1;
z++;
}
if (binArray[z] == undefined) {
binArray[z] = "";
}
binArray[z] = binArray[z] + bin.charAt(i);
i++;
}
if (j == 2) {
needed = 2;
}
if (j == 6) {
needed = 0;
}
if (j == 4) {
needed = 1;
}
var binLen = binArray.length;
var x = 0;
while (x <= (binLen - 1)) {
var elemLen = (binArray[x].length - 1);
if (elemLen < 5) {
var addN = (4 - elemLen);
var f = 0;
while (f <= addN) {
if (binArray[x] == undefined) {
binArray[x] = "";
}
binArray[x] = binArray[x] + "0";
f++;
}
}
x++;
}
var out = bin6ToInt(binArray, needed);
return(out);
}
function bin6ToInt(myArray, needed) {
var len = myArray.length;
var n;
var bit;
var outArray = new Array();
var t = 0;
var digit;
var binLen;
var Base64OutString = "";
var i = 0;
while (i <= (len - 1)) {
n = myArray[i];
outArray[i] = 0;
digitVal = 1;
binLen = n.length;
var j = (binLen - 1);
while (j >= 0) {
bit = n.charAt(j);
bit = Number(bit);
bit = bit * digitVal;
if (outArray[i] == undefined) {
outArray[i] = "";
}
outArray[i] = outArray[i] + bit;
digitVal = digitVal * 2;
j--;
}
Base64OutString = Base64OutString + encodeBase64(outArray[i]);
i++;
}
var kk = needed;
while (kk >= 1) {
Base64OutString = Base64OutString + "-";
kk--;
}
return(Base64OutString);
}
function Base64toBinary(sentText) {
var c;
var intArray = new Array();
var binString = "";
var i = 0;
while (i <= (sentText.length - 1)) {
c = sentText.charAt(i);
if (c != "-") {
intArray[i] = decodeBase64(c);
intArray[i] = toBinary(intArray[i]);
intArray[i] = intArray[i].substring(2);
binString = binString + intArray[i];
} else {
_root.Grab_equalSign = true;
}
i++;
}
var decodedArray = new Array();
decodedArray = sixToEightBit(binString);
return(decodedArray);
}
function sixToEightBit(binString) {
var j = 0;
var z = 0;
var sixBitArray = new Array();
var len = (binString.length - 1);
var i = 0;
while (i <= len) {
if (j < 8) {
j++;
} else {
j = 1;
z++;
}
var char = binString.charAt(i);
if (sixBitArray[z] == undefined) {
sixBitArray[z] = "";
}
sixBitArray[z] = sixBitArray[z] + char;
i++;
}
var decodedArray = new Array();
decodedArray = binToInt8(sixBitArray, 0);
return(decodedArray);
}
function binToInt8(myArray, needed) {
var len = myArray.length;
var n;
var bit;
var outArray = new Array();
var k;
var digit;
var binLen;
var decoded;
var digitVal;
var i = 0;
while (i <= (len - 1)) {
n = myArray[i];
digitVal = 1;
binLen = n.length;
var j = (binLen - 1);
while (j >= 0) {
bit = n.charAt(j);
bit = Number(bit);
bit = bit * digitVal;
if (outArray[i] == undefined) {
outArray[i] = 0;
}
outArray[i] = outArray[i] + bit;
digitVal = digitVal * 2;
j--;
}
i++;
}
return(outArray);
}
function intToText(decodedArray) {
var len = (decodedArray.length - 1);
var finalDecoded = "";
var num;
var i = 0;
while (i <= len) {
num = decodedArray[i];
finalDecoded = finalDecoded + String.fromCharCode(num);
i++;
}
return(finalDecoded);
}
function decodeBase64(c) {
var n = base64.indexOf(c);
return(n);
}
base64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789._";
secWord = "904aeff532295b6e";
gameID = "BFD379DB-0AC7-4DC7-8900-09DEDD1A377C";
gameIDencoded = Grab_encode(gameID);
trialURLdecoded = Grab_decode(grab_trialURL);
buyURLdecoded = Grab_decode(grab_buyURL);
if (grab_ccode == undefined) {
grab_ccode = "";
}
Frame 2
stop();
Instance of Symbol 14 MovieClip in Frame 2
onClipEvent (enterFrame) {
loaded = int(_root.getBytesLoaded() / 5600);
gotoAndStop(loaded);
}
Frame 6
function addPlayersHand() {
playerHand = ((((_root.P1.value + _root.P2.value) + _root.P3.value) + _root.P4.value) + _root.P5.value) + _root.P6.value;
if ((playerHand == 21) and (_root.P3.value == 0)) {
gotoAndPlay (1);
} else if ((playerHand == 21) and (_root.P3.value != 0)) {
gotoAndPlay (1);
} else if (playerHand > 21) {
x = 1;
while (x <= 6) {
if (eval (("_root.P" + x) + ".ace") == 1) {
playerHand = playerHand - 10;
if ((playerHand == 21) and (_root.P3.value == 0)) {
gotoAndPlay (1);
x = 10;
} else if ((playerHand == 21) and (_root.P3.value != 0)) {
gotoAndPlay (1);
x = 10;
} else if (playerHand <= 21) {
x = 10;
}
}
x++;
}
if (playerHand > 21) {
gotoAndPlay (1);
}
}
}
function addDealersHand() {
dealersHand = ((((_root.D1.value + _root.D2.value) + _root.D3.value) + _root.D4.value) + _root.D5.value) + _root.D6.value;
if (((dealersHand >= 17) and (dealersHand <= 21)) || ((playerHand == 21) and (_root.P3.value == 0))) {
gotoAndPlay (1);
} else if (dealersHand > 21) {
x = 1;
while (x <= 6) {
if (eval (("_root.D" + x) + ".ace") == 1) {
dealersHand = dealersHand - 10;
if (((dealersHand >= 17) and (dealersHand <= 21)) || ((playerHand == 21) and (_root.P3.value == 0))) {
x = 10;
gotoAndPlay (1);
} else if (dealersHand <= 21) {
x = 10;
}
}
x++;
}
if (dealersHand > 21) {
gotoAndPlay (1);
}
}
}
Instance of Symbol 66 MovieClip "randomizer" in Frame 6
//component parameters
onClipEvent (initialize) {
total = 51;
}
Frame 9
stop();
Frame 15
Set("/:bonus", 1);
Set("/:computerCards", 0);
Set("/:endtime", 0);
N = 1;
x = 1;
while (x <= 5) {
Set("playerHand" + x, eval ("/:cardNumber" + N));
N = N + 1;
x++;
}
N = 6;
x = 1;
while (x <= 5) {
Set("dealerHand" + x, eval ("/:cardNumber" + N));
N = N + 1;
x++;
}
N = 10;
x = 1;
while (x <= 17) {
Set("playersStack" + x, eval ("/:cardNumber" + N));
N = N + 1;
x++;
}
playersStackN = 17;
x = 1;
while (x <= 17) {
Set("dealersStack" + x, eval ("/:cardNumber" + N));
N = N + 1;
x++;
}
dealersStackN = 17;
sideStackN = 0;
sideStackN2 = 6;
x = 1;
while (x <= 6) {
Set("sideStack" + x, eval ("/:cardNumber" + N));
N = N + 1;
x++;
}
middleStack1 = eval ("/:cardNumber" + N);
N = N + 1;
middleStack2 = eval ("/:cardNumber" + N);
middleStackN = 2;
N = N + 1;
Instance of Symbol 99 MovieClip "M1" in Frame 15
onClipEvent (load) {
startX = _x;
startY = _y;
}
Instance of Symbol 99 MovieClip "M2" in Frame 15
onClipEvent (load) {
startX = _x;
startY = _y;
}
Instance of Symbol 110 MovieClip "D1" in Frame 15
onClipEvent (load) {
startX = _x;
startY = _y;
}
Instance of Symbol 110 MovieClip "D2" in Frame 15
onClipEvent (load) {
startX = _x;
startY = _y;
}
Instance of Symbol 110 MovieClip "D3" in Frame 15
onClipEvent (load) {
startX = _x;
startY = _y;
}
Instance of Symbol 110 MovieClip "D4" in Frame 15
onClipEvent (load) {
startX = _x;
startY = _y;
}
Instance of Symbol 110 MovieClip "D5" in Frame 15
onClipEvent (load) {
startX = _x;
startY = _y;
}
Instance of Symbol 116 MovieClip "P3" in Frame 15
onClipEvent (load) {
startX = _x;
startY = _y;
}
Instance of Symbol 116 MovieClip "P4" in Frame 15
onClipEvent (load) {
startX = _x;
startY = _y;
}
Instance of Symbol 116 MovieClip "P5" in Frame 15
onClipEvent (load) {
startX = _x;
startY = _y;
}
Instance of Symbol 116 MovieClip "P2" in Frame 15
onClipEvent (load) {
startX = _x;
startY = _y;
}
Instance of Symbol 116 MovieClip "P1" in Frame 15
onClipEvent (load) {
startX = _x;
startY = _y;
}
Frame 27
_root.D1.gotoAndStop(dealerHand1);
_root.P1.gotoAndStop(playerHand1);
Frame 29
_root.D2.gotoAndStop(dealerHand2);
_root.P2.gotoAndStop(playerHand2);
Frame 31
_root.D3.gotoAndStop(dealerHand3);
_root.P3.gotoAndStop(playerHand3);
Frame 33
_root.D4.gotoAndStop(dealerHand4);
_root.P4.gotoAndStop(playerHand4);
Frame 35
_root.D5.gotoAndStop(dealerHand5);
_root.P5.gotoAndStop(playerHand5);
Frame 67
_root.M1.gotoAndStop(middleStack1);
Frame 69
_root.M2.gotoAndStop(middleStack2);
Frame 81
stop();
Frame 86
Set("/:win", 1);
Frame 121
gotoAndPlay (160);
Frame 122
Set("/:win", 0);
Frame 181
if (/:win == 1) {
WB = 100;
} else {
WB = 0;
}
score = score + WB;
Frame 191
TB = int(/:endtime * 0.5);
score = score + TB;
Frame 198
if (dealersStackN ne "") {
CCB = dealersStackN;
} else {
CCB = 0;
}
CCB = (CCB + /:computerCards) * 25;
score = score + CCB;
Frame 212
if (/:win == 1) {
level = level + 1;
gotoAndPlay (15);
}
Frame 213
score = score.toString();
scoreEncoded = _root.Grab_encode(score);
getURL (((((("javascript:reportGameScore('" + gameIDencoded) + "', '") + scoreEncoded) + "', '") + grab_ccode) + "')");
stop();
Symbol 14 MovieClip Frame 1
stop();
Symbol 14 MovieClip Frame 25
_root.gotoAndStop("main");
stop();
Symbol 14 MovieClip Frame 26
_root.gotoAndStop("main");
stop();
Symbol 14 MovieClip Frame 27
_root.gotoAndStop("main");
stop();
Symbol 14 MovieClip Frame 28
_root.gotoAndStop("main");
stop();
Symbol 14 MovieClip Frame 29
_root.gotoAndStop("main");
stop();
Symbol 14 MovieClip Frame 30
_root.gotoAndStop("main");
stop();
Symbol 14 MovieClip Frame 31
_root.gotoAndStop("main");
stop();
Symbol 14 MovieClip Frame 32
_root.gotoAndStop("main");
stop();
Symbol 14 MovieClip Frame 33
_root.gotoAndStop("main");
stop();
Symbol 14 MovieClip Frame 34
_root.gotoAndStop("main");
stop();
Symbol 14 MovieClip Frame 35
_root.gotoAndStop("main");
stop();
Symbol 14 MovieClip Frame 36
_root.gotoAndStop("main");
stop();
Symbol 23 Button
on (release) {
N = 0;
score = 0;
level = 1;
gotoAndPlay (15);
}
Symbol 27 Button
on (release) {
if (_root.INS._currentframe == 1) {
_root.INS.gotoAndStop(2);
} else {
_root.INS.gotoAndStop(1);
}
}
Symbol 37 Button
on (release) {
gotoAndStop (1);
}
Symbol 63 MovieClip Frame 1
stop();
Symbol 66 MovieClip Frame 2
a = new Array(total);
i = 1;
while (i <= total) {
R = random(total);
if (a[R] != null) {
R = random(total);
if (a[R] != null) {
R = 0;
while (R <= total) {
if (a[R] == null) {
break;
}
R++;
}
}
}
a[R] = i;
i++;
}
x = 0;
while (x <= total) {
x = x + 1;
Set("/:cardNumber" add x, a[x - 1] + 3);
}
Symbol 66 MovieClip Frame 3
stop();
Symbol 74 Button
on (release) {
if (_root.INS._currentframe == 1) {
_root.INS.gotoAndStop(2);
} else {
_root.INS.gotoAndStop(1);
}
}
Symbol 77 MovieClip Frame 1
stop();
Symbol 99 MovieClip Frame 1
stop();
value = 0;
Symbol 99 MovieClip Frame 2
value = 0;
Symbol 99 MovieClip Frame 3
stop();
value = 1;
Symbol 99 MovieClip Frame 4
value = 2;
Symbol 99 MovieClip Frame 5
value = 3;
Symbol 99 MovieClip Frame 6
value = 2;
Symbol 99 MovieClip Frame 7
value = 3;
Symbol 99 MovieClip Frame 8
value = 4;
Symbol 99 MovieClip Frame 9
value = 10;
Symbol 99 MovieClip Frame 10
value = 11;
Symbol 99 MovieClip Frame 11
value = 4;
Symbol 99 MovieClip Frame 12
value = 5;
Symbol 99 MovieClip Frame 13
value = 9;
Symbol 99 MovieClip Frame 14
value = 6;
Symbol 99 MovieClip Frame 15
value = 7;
Symbol 99 MovieClip Frame 16
value = 12;
Symbol 99 MovieClip Frame 17
value = 13;
Symbol 99 MovieClip Frame 18
value = 11;
Symbol 99 MovieClip Frame 19
value = 12;
Symbol 99 MovieClip Frame 20
value = 13;
Symbol 99 MovieClip Frame 21
value = 8;
Symbol 99 MovieClip Frame 22
value = 4;
Symbol 99 MovieClip Frame 23
value = 5;
Symbol 99 MovieClip Frame 24
value = 6;
Symbol 99 MovieClip Frame 25
value = 12;
Symbol 99 MovieClip Frame 26
value = 13;
Symbol 99 MovieClip Frame 27
value = 1;
Symbol 99 MovieClip Frame 28
value = 5;
Symbol 99 MovieClip Frame 29
value = 6;
Symbol 99 MovieClip Frame 30
value = 1;
Symbol 99 MovieClip Frame 31
value = 3;
Symbol 99 MovieClip Frame 32
value = 4;
Symbol 99 MovieClip Frame 33
value = 7;
Symbol 99 MovieClip Frame 34
value = 8;
Symbol 99 MovieClip Frame 35
value = 9;
Symbol 99 MovieClip Frame 36
value = 9;
Symbol 99 MovieClip Frame 37
value = 10;
Symbol 99 MovieClip Frame 38
value = 11;
Symbol 99 MovieClip Frame 39
value = 10;
Symbol 99 MovieClip Frame 40
value = 2;
Symbol 99 MovieClip Frame 41
value = 3;
Symbol 99 MovieClip Frame 42
value = 6;
Symbol 99 MovieClip Frame 43
value = 7;
Symbol 99 MovieClip Frame 44
value = 8;
Symbol 99 MovieClip Frame 45
value = 10;
Symbol 99 MovieClip Frame 46
value = 11;
Symbol 99 MovieClip Frame 47
value = 5;
Symbol 99 MovieClip Frame 48
value = 1;
Symbol 99 MovieClip Frame 49
value = 12;
Symbol 99 MovieClip Frame 50
value = 13;
Symbol 99 MovieClip Frame 51
value = 7;
Symbol 99 MovieClip Frame 52
value = 8;
Symbol 99 MovieClip Frame 53
value = 2;
Symbol 99 MovieClip Frame 54
value = 9;
Symbol 100 MovieClip Frame 1
stop();
if (((((_root.P1.value == 0) or (_root.P2.value == 0)) or (_root.P3.value == 0)) or (_root.P4.value == 0)) or (_root.P5.value == 0)) {
if (/:playersStackN ne "") {
gotoAndPlay (2);
} else {
gotoAndStop (1);
_root.PD.gotoAndStop(2);
}
} else if (/:playersStackN ne "") {
gotoAndStop (1);
} else {
gotoAndStop (1);
_root.PD.gotoAndStop(2);
}
Symbol 100 MovieClip Frame 2
play();
Symbol 100 MovieClip Frame 3
play();
Symbol 100 MovieClip Frame 8
if (_root.P1.value == 0) {
_root.P1.gotoAndStop(eval ("/:playersStack" + /:playersStackN));
} else if (_root.P2.value == 0) {
_root.P2.gotoAndStop(eval ("/:playersStack" + /:playersStackN));
} else if (_root.P3.value == 0) {
_root.P3.gotoAndStop(eval ("/:playersStack" + /:playersStackN));
} else if (_root.P4.value == 0) {
_root.P4.gotoAndStop(eval ("/:playersStack" + /:playersStackN));
} else if (_root.P5.value == 0) {
_root.P5.gotoAndStop(eval ("/:playersStack" + /:playersStackN));
}
Set("/:playersStackN", /:playersStackN - 1);
if (/:playersStackN <= 0) {
Set("/:playersStackN", "");
}
Symbol 100 MovieClip Frame 11
if (((((_root.P1.value == 0) or (_root.P2.value == 0)) or (_root.P3.value == 0)) or (_root.P4.value == 0)) or (_root.P5.value == 0)) {
if (/:playersStackN ne "") {
gotoAndPlay (2);
} else {
gotoAndStop (1);
_root.PD.gotoAndStop(2);
}
} else if (/:playersStackN ne "") {
gotoAndStop (1);
} else {
gotoAndStop (1);
_root.PD.gotoAndStop(2);
}
Symbol 102 Button
on (release) {
Set("/:stuck", 0);
Set("/:sideStackN", /:sideStackN + 1);
if (eval ("/:sideStack" + /:sideStackN) > 2) {
_root.M1.gotoAndStop(eval ("/:sideStack" + /:sideStackN));
} else {
Set("/:sideStackN", 1);
_root.M1.gotoAndStop(eval ("/:sideStack" + /:sideStackN));
}
Set("/:sideStackN", /:sideStackN + 1);
if (eval ("/:sideStack" + /:sideStackN) > 2) {
_root.M2.gotoAndStop(eval ("/:sideStack" + /:sideStackN));
} else {
Set("/:sideStackN", 1);
_root.M2.gotoAndStop(eval ("/:sideStack" + /:sideStackN));
}
play();
}
Symbol 104 MovieClip Frame 1
stop();
Symbol 107 MovieClip Frame 1
stop();
Symbol 110 MovieClip Frame 1
stop();
value = 0;
Symbol 110 MovieClip Frame 2
value = 100;
Symbol 110 MovieClip Frame 3
stop();
value = 1;
Symbol 110 MovieClip Frame 4
value = 2;
Symbol 110 MovieClip Frame 5
value = 3;
Symbol 110 MovieClip Frame 6
value = 2;
Symbol 110 MovieClip Frame 7
value = 3;
Symbol 110 MovieClip Frame 8
value = 4;
Symbol 110 MovieClip Frame 9
value = 10;
Symbol 110 MovieClip Frame 10
value = 11;
Symbol 110 MovieClip Frame 11
value = 4;
Symbol 110 MovieClip Frame 12
value = 5;
Symbol 110 MovieClip Frame 13
value = 9;
Symbol 110 MovieClip Frame 14
value = 6;
Symbol 110 MovieClip Frame 15
value = 7;
Symbol 110 MovieClip Frame 16
value = 12;
Symbol 110 MovieClip Frame 17
value = 13;
Symbol 110 MovieClip Frame 18
value = 11;
Symbol 110 MovieClip Frame 19
value = 12;
Symbol 110 MovieClip Frame 20
value = 13;
Symbol 110 MovieClip Frame 21
value = 8;
Symbol 110 MovieClip Frame 22
value = 4;
Symbol 110 MovieClip Frame 23
value = 5;
Symbol 110 MovieClip Frame 24
value = 6;
Symbol 110 MovieClip Frame 25
value = 12;
Symbol 110 MovieClip Frame 26
value = 13;
Symbol 110 MovieClip Frame 27
value = 1;
Symbol 110 MovieClip Frame 28
value = 5;
Symbol 110 MovieClip Frame 29
value = 6;
Symbol 110 MovieClip Frame 30
value = 1;
Symbol 110 MovieClip Frame 31
value = 3;
Symbol 110 MovieClip Frame 32
value = 4;
Symbol 110 MovieClip Frame 33
value = 7;
Symbol 110 MovieClip Frame 34
value = 8;
Symbol 110 MovieClip Frame 35
value = 9;
Symbol 110 MovieClip Frame 36
value = 9;
Symbol 110 MovieClip Frame 37
value = 10;
Symbol 110 MovieClip Frame 38
value = 11;
Symbol 110 MovieClip Frame 39
value = 10;
Symbol 110 MovieClip Frame 40
value = 2;
Symbol 110 MovieClip Frame 41
value = 3;
Symbol 110 MovieClip Frame 42
value = 6;
Symbol 110 MovieClip Frame 43
value = 7;
Symbol 110 MovieClip Frame 44
value = 8;
Symbol 110 MovieClip Frame 45
value = 10;
Symbol 110 MovieClip Frame 46
value = 11;
Symbol 110 MovieClip Frame 47
value = 5;
Symbol 110 MovieClip Frame 48
value = 1;
Symbol 110 MovieClip Frame 49
value = 12;
Symbol 110 MovieClip Frame 50
value = 13;
Symbol 110 MovieClip Frame 51
value = 7;
Symbol 110 MovieClip Frame 52
value = 8;
Symbol 110 MovieClip Frame 53
value = 2;
Symbol 110 MovieClip Frame 54
value = 9;
Symbol 113 Button
on (press) {
startDrag ("", true);
}
on (release) {
stopDrag();
if (value == 13) {
cardUp = 1;
} else {
cardUp = value + 1;
}
if (value == 1) {
cardDown = 13;
} else {
cardDown = value - 1;
}
if (this._droptarget eq "/M1") {
if ((_root.M1.value == cardUp) or (_root.M1.value == cardDown)) {
Set("/:sideStackN2", /:sideStackN2 + 1);
Set("/:sideStack" + /:sideStackN2, _currentframe);
Set("/:bonus", /:bonus + /:bonus);
Set("/:score", /:score + /:bonus);
_root.combo.gotoAndPlay(2);
_root.M1.gotoAndStop(_currentframe);
if (/:playersStackN ne "") {
_root.addCard.gotoAndPlay(2);
} else {
value = 0;
if (((((_root.P1.value == 0) and (_root.P2.value == 0)) and (_root.P3.value == 0)) and (_root.P4.value == 0)) and (_root.P5.value == 0)) {
Set("/:endtime", (_root.timer.min * 100) + _root.timer.sec2);
x = 1;
while (x <= 5) {
if (eval (("_root.D" + x) + "._currentframe") > 2) {
Set("/:computerCards", /:computerCards + 1);
}
x++;
}
_root.gotoAndPlay("won");
}
}
gotoAndStop (2);
}
} else if (this._droptarget eq "/M2") {
if ((_root.M2.value == cardUp) or (_root.M2.value == cardDown)) {
Set("/:sideStackN2", /:sideStackN2 + 1);
Set("/:sideStack" + /:sideStackN2, _currentframe);
Set("/:bonus", /:bonus + /:bonus);
Set("/:score", /:score + /:bonus);
_root.combo.gotoAndPlay(2);
_root.M2.gotoAndStop(_currentframe);
if (/:playersStackN ne "") {
_root.addCard.gotoAndPlay(2);
} else {
value = 0;
if (((((_root.P1.value == 0) and (_root.P2.value == 0)) and (_root.P3.value == 0)) and (_root.P4.value == 0)) and (_root.P5.value == 0)) {
Set("/:endtime", (_root.timer.min * 100) + _root.timer.sec2);
x = 1;
while (x <= 5) {
if (eval (("_root.D" + x) + "._currentframe") > 2) {
Set("/:computerCards", /:computerCards + 1);
}
x++;
}
_root.gotoAndPlay("won");
}
}
gotoAndStop (2);
}
}
_x = startX;
_y = startY;
}
Symbol 116 MovieClip Frame 1
stop();
value = 0;
Symbol 116 MovieClip Frame 2
value = 0;
Symbol 116 MovieClip Frame 3
stop();
value = 1;
Symbol 116 MovieClip Frame 4
value = 2;
Symbol 116 MovieClip Frame 5
value = 3;
Symbol 116 MovieClip Frame 6
value = 2;
Symbol 116 MovieClip Frame 7
value = 3;
Symbol 116 MovieClip Frame 8
value = 4;
Symbol 116 MovieClip Frame 9
value = 10;
Symbol 116 MovieClip Frame 10
value = 11;
Symbol 116 MovieClip Frame 11
value = 4;
Symbol 116 MovieClip Frame 12
value = 5;
Symbol 116 MovieClip Frame 13
value = 9;
Symbol 116 MovieClip Frame 14
value = 6;
Symbol 116 MovieClip Frame 15
value = 7;
Symbol 116 MovieClip Frame 16
value = 12;
Symbol 116 MovieClip Frame 17
value = 13;
Symbol 116 MovieClip Frame 18
value = 11;
Symbol 116 MovieClip Frame 19
value = 12;
Symbol 116 MovieClip Frame 20
value = 13;
Symbol 116 MovieClip Frame 21
value = 8;
Symbol 116 MovieClip Frame 22
value = 4;
Symbol 116 MovieClip Frame 23
value = 5;
Symbol 116 MovieClip Frame 24
value = 6;
Symbol 116 MovieClip Frame 25
value = 12;
Symbol 116 MovieClip Frame 26
value = 13;
Symbol 116 MovieClip Frame 27
value = 1;
Symbol 116 MovieClip Frame 28
value = 5;
Symbol 116 MovieClip Frame 29
value = 6;
Symbol 116 MovieClip Frame 30
value = 1;
Symbol 116 MovieClip Frame 31
value = 3;
Symbol 116 MovieClip Frame 32
value = 4;
Symbol 116 MovieClip Frame 33
value = 7;
Symbol 116 MovieClip Frame 34
value = 8;
Symbol 116 MovieClip Frame 35
value = 9;
Symbol 116 MovieClip Frame 36
value = 9;
Symbol 116 MovieClip Frame 37
value = 10;
Symbol 116 MovieClip Frame 38
value = 11;
Symbol 116 MovieClip Frame 39
value = 10;
Symbol 116 MovieClip Frame 40
value = 2;
Symbol 116 MovieClip Frame 41
value = 3;
Symbol 116 MovieClip Frame 42
value = 6;
Symbol 116 MovieClip Frame 43
value = 7;
Symbol 116 MovieClip Frame 44
value = 8;
Symbol 116 MovieClip Frame 45
value = 10;
Symbol 116 MovieClip Frame 46
value = 11;
Symbol 116 MovieClip Frame 47
value = 5;
Symbol 116 MovieClip Frame 48
value = 1;
Symbol 116 MovieClip Frame 49
value = 12;
Symbol 116 MovieClip Frame 50
value = 13;
Symbol 116 MovieClip Frame 51
value = 7;
Symbol 116 MovieClip Frame 52
value = 8;
Symbol 116 MovieClip Frame 53
value = 2;
Symbol 116 MovieClip Frame 54
value = 9;
Symbol 126 MovieClip Frame 1
min = 3;
sec = 59;
sec2 = 59;
Symbol 126 MovieClip Frame 17
sec2 = sec2 - 1;
if ((sec2 < 10) and (sec2 >= 0)) {
sec = "0" + sec2;
} else {
sec = sec2;
}
if (((sec2 <= 10) and (min == 0)) and (sec2 > 0)) {
gotoAndPlay (18);
} else if ((sec2 == -1) and (min > 0)) {
sec2 = 60;
sec = sec2;
min = min - 1;
gotoAndPlay (2);
} else if ((sec2 == -1) and (min == 0)) {
stop();
sec = 0;
_root.gotoAndPlay("lost");
} else {
gotoAndPlay (2);
}
Symbol 126 MovieClip Frame 19
gotoAndPlay (2);
Symbol 130 MovieClip Frame 1
stop();
Symbol 130 MovieClip Frame 2
Set("/:bonusDisplay", "+" + /:bonus);
Symbol 145 MovieClip Frame 8
if (/:stuck == 7) {
_root.addCard2.gotoAndStop(2);
}
Symbol 145 MovieClip Frame 9
match = 0;
deck = 0;
matchDif = 0;
Symbol 145 MovieClip Frame 10
x = 1;
while (x <= 5) {
if (eval (("_root.D" + x) + ".value") == 13) {
cardUp = 1;
} else {
cardUp = eval (("_root.D" + x) + ".value") + 1;
}
if (eval (("_root.D" + x) + ".value") == 1) {
cardDown = 13;
} else {
cardDown = eval (("_root.D" + x) + ".value") - 1;
}
if ((_root.M1.value == cardUp) or (_root.M1.value == cardDown)) {
match = x;
deck = 1;
break;
}
if ((_root.M2.value == cardUp) or (_root.M2.value == cardDown)) {
match = x;
deck = 2;
break;
}
x++;
}
Symbol 145 MovieClip Frame 11
if (match == 0) {
Set("/:stuck", /:stuck + 1);
gotoAndPlay (2);
} else {
Set("/:stuck", 0);
dx = eval (("_root.D" + match) + "._x");
mx = eval (("_root.M" + deck) + "._x");
if (dx <= mx) {
dirrection = -1;
} else {
dirrection = -1;
}
eval (("_root.D" + match) + ".cover").gotoAndStop(2);
_root.addCard2.gotoAndStop(1);
if (/:level == 1) {
difX = ((eval (("_root.D" + match) + "._x") - eval (("_root.M" + deck) + "._x")) / 20) * dirrection;
difY = (eval (("_root.D" + match) + "._y") - eval (("_root.M" + deck) + "._y")) / 20;
} else if (/:level == 2) {
difX = ((eval (("_root.D" + match) + "._x") - eval (("_root.M" + deck) + "._x")) / 17) * dirrection;
difY = (eval (("_root.D" + match) + "._y") - eval (("_root.M" + deck) + "._y")) / 17;
gotoAndPlay (16);
} else if (/:level == 3) {
difX = ((eval (("_root.D" + match) + "._x") - eval (("_root.M" + deck) + "._x")) / 14) * dirrection;
difY = (eval (("_root.D" + match) + "._y") - eval (("_root.M" + deck) + "._y")) / 14;
gotoAndPlay (19);
} else if (/:level == 4) {
difX = ((eval (("_root.D" + match) + "._x") - eval (("_root.M" + deck) + "._x")) / 11) * dirrection;
difY = (eval (("_root.D" + match) + "._y") - eval (("_root.M" + deck) + "._y")) / 11;
gotoAndPlay (22);
} else {
difX = ((eval (("_root.D" + match) + "._x") - eval (("_root.M" + deck) + "._x")) / 8) * dirrection;
difY = (eval (("_root.D" + match) + "._y") - eval (("_root.M" + deck) + "._y")) / 8;
gotoAndPlay (25);
}
}
Symbol 145 MovieClip Frame 13
setProperty("_root.D" + match, _x , eval (("_root.D" + match) + "._x") + difX);
setProperty("_root.D" + match, _y , eval (("_root.D" + match) + "._y") - difY);
Symbol 145 MovieClip Frame 14
setProperty("_root.D" + match, _x , eval (("_root.D" + match) + "._x") + difX);
setProperty("_root.D" + match, _y , eval (("_root.D" + match) + "._y") - difY);
Symbol 145 MovieClip Frame 15
setProperty("_root.D" + match, _x , eval (("_root.D" + match) + "._x") + difX);
setProperty("_root.D" + match, _y , eval (("_root.D" + match) + "._y") - difY);
Symbol 145 MovieClip Frame 16
setProperty("_root.D" + match, _x , eval (("_root.D" + match) + "._x") + difX);
setProperty("_root.D" + match, _y , eval (("_root.D" + match) + "._y") - difY);
Symbol 145 MovieClip Frame 17
setProperty("_root.D" + match, _x , eval (("_root.D" + match) + "._x") + difX);
setProperty("_root.D" + match, _y , eval (("_root.D" + match) + "._y") - difY);
Symbol 145 MovieClip Frame 18
setProperty("_root.D" + match, _x , eval (("_root.D" + match) + "._x") + difX);
setProperty("_root.D" + match, _y , eval (("_root.D" + match) + "._y") - difY);
Symbol 145 MovieClip Frame 19
setProperty("_root.D" + match, _x , eval (("_root.D" + match) + "._x") + difX);
setProperty("_root.D" + match, _y , eval (("_root.D" + match) + "._y") - difY);
Symbol 145 MovieClip Frame 20
setProperty("_root.D" + match, _x , eval (("_root.D" + match) + "._x") + difX);
setProperty("_root.D" + match, _y , eval (("_root.D" + match) + "._y") - difY);
Symbol 145 MovieClip Frame 21
setProperty("_root.D" + match, _x , eval (("_root.D" + match) + "._x") + difX);
setProperty("_root.D" + match, _y , eval (("_root.D" + match) + "._y") - difY);
Symbol 145 MovieClip Frame 22
setProperty("_root.D" + match, _x , eval (("_root.D" + match) + "._x") + difX);
setProperty("_root.D" + match, _y , eval (("_root.D" + match) + "._y") - difY);
Symbol 145 MovieClip Frame 23
setProperty("_root.D" + match, _x , eval (("_root.D" + match) + "._x") + difX);
setProperty("_root.D" + match, _y , eval (("_root.D" + match) + "._y") - difY);
Symbol 145 MovieClip Frame 24
setProperty("_root.D" + match, _x , eval (("_root.D" + match) + "._x") + difX);
setProperty("_root.D" + match, _y , eval (("_root.D" + match) + "._y") - difY);
Symbol 145 MovieClip Frame 25
setProperty("_root.D" + match, _x , eval (("_root.D" + match) + "._x") + difX);
setProperty("_root.D" + match, _y , eval (("_root.D" + match) + "._y") - difY);
Symbol 145 MovieClip Frame 26
setProperty("_root.D" + match, _x , eval (("_root.D" + match) + "._x") + difX);
setProperty("_root.D" + match, _y , eval (("_root.D" + match) + "._y") - difY);
Symbol 145 MovieClip Frame 27
setProperty("_root.D" + match, _x , eval (("_root.D" + match) + "._x") + difX);
setProperty("_root.D" + match, _y , eval (("_root.D" + match) + "._y") - difY);
Symbol 145 MovieClip Frame 28
setProperty("_root.D" + match, _x , eval (("_root.D" + match) + "._x") + difX);
setProperty("_root.D" + match, _y , eval (("_root.D" + match) + "._y") - difY);
Symbol 145 MovieClip Frame 29
setProperty("_root.D" + match, _x , eval (("_root.D" + match) + "._x") + difX);
setProperty("_root.D" + match, _y , eval (("_root.D" + match) + "._y") - difY);
Symbol 145 MovieClip Frame 30
setProperty("_root.D" + match, _x , eval (("_root.D" + match) + "._x") + difX);
setProperty("_root.D" + match, _y , eval (("_root.D" + match) + "._y") - difY);
Symbol 145 MovieClip Frame 31
setProperty("_root.D" + match, _x , eval (("_root.D" + match) + "._x") + difX);
setProperty("_root.D" + match, _y , eval (("_root.D" + match) + "._y") - difY);
Symbol 145 MovieClip Frame 33
matchDif = eval (("_root.D" + match) + ".value") - eval (("_root.M" + deck) + ".value");
if ((((matchDif == -1) or (matchDif == 1)) or (matchDif == -12)) or (matchDif == 12)) {
Set("/:bonus", 1);
Set("/:sideStackN2", /:sideStackN2 + 1);
Set("/:sideStack" + /:sideStackN2, eval (("_root.D" + match) + "._currentframe"));
eval ("_root.M" + deck).gotoAndStop(eval (("_root.D" + match) + "._currentframe"));
setProperty("_root.D" + match, _x , eval (("_root.D" + match) + ".startX"));
setProperty("_root.D" + match, _y , eval (("_root.D" + match) + ".startY"));
if (/:dealersStackN >= 1) {
eval ("_root.D" + match).gotoAndStop(2);
gotoAndPlay (37);
} else {
eval ("_root.D" + match).gotoAndStop(2);
gotoAndPlay (2);
}
} else {
setProperty("_root.D" + match, _x , eval (("_root.D" + match) + ".startX"));
setProperty("_root.D" + match, _y , eval (("_root.D" + match) + ".startY"));
gotoAndPlay (2);
}
Symbol 145 MovieClip Frame 41
if (/:dealersStackN == "") {
if (((((_root.D1._currentframe == 2) and (_root.D2._currentframe == 2)) and (_root.D3._currentframe == 2)) and (_root.D4._currentframe == 2)) and (_root.D5._currentframe == 2)) {
Set("/:endtime", (_root.timer.min * 100) + _root.timer.sec2);
_root.gotoAndPlay("lost");
}
}
Symbol 145 MovieClip Frame 48
if ((/:dealersStackN >= 1) and (/:dealersStackN ne "")) {
Set("/:dealersStackN", /:dealersStackN - 1);
eval (("_root.D" + match) + ".cover").gotoAndStop(1);
eval ("_root.D" + match).gotoAndStop(eval ("/:dealersStack" + /:dealersStackN));
}
if (/:dealersStackN < 1) {
Set("/:dealersStackN", "");
_root.DD.gotoAndStop(2);
}
Symbol 145 MovieClip Frame 49
if (/:level == 1) {
gotoAndPlay (2);
} else if (/:level == 3) {
gotoAndPlay (3);
} else if (/:level == 4) {
gotoAndPlay (4);
} else if (/:level == 5) {
gotoAndPlay (5);
} else {
gotoAndPlay (6);
}
Symbol 147 MovieClip Frame 11
stop();
Symbol 165 Button
on (press) {
score = 0;
gotoAndStop (6);
}
Symbol 166 Button
on (press) {
getURL ("javascript:submitChallenge()");
}