Frame 1
stop();
Instance of Symbol 138 MovieClip in Frame 1
onClipEvent (enterFrame) {
this.onPress = function () {
getURL ("http://www.armorgames.com", "_blank");
};
}
Frame 2
stop();
Instance of Symbol 142 MovieClip in Frame 2
on (release) {
getURL ("http://www.likwidgames.com", "_blank");
}
Frame 3
function playSounds(sndNum) {
if (_root.soundOn == true) {
switch (sndNum) {
case 1 :
chipSound = new Sound(_root.snd1_mc);
chipSound.attachSound("chipSnd");
chipSound.start(0, 1);
break;
case 2 :
dealSound = new Sound(_root.snd2_mc);
dealSound.attachSound("dealSnd");
dealSound.setVolume(40);
dealSound.start(0, 1);
break;
case 3 :
gameMusicMC = new Sound(_root.snd3_mc);
gameMusicMC.attachSound("gameMusic");
gameMusicMC.start(0, 999);
gameMusicMC.setVolume(20);
break;
case 4 :
bustSound = new Sound(_root.snd4_mc);
bustSound.attachSound("bustSnd");
bustSound.start(0, 1);
break;
case 5 :
winSound = new Sound(_root.snd5_mc);
winSound.attachSound("standSnd");
winSound.start(0, 1);
break;
case 6 :
themeMusicMC = new Sound(_root.snd6_mc);
themeMusicMC.attachSound("themeMusic");
themeMusicMC.start(0, 999);
}
}
}
_root.createEmptyMovieClip("snd1_mc", _root.getNextHighestDepth());
_root.createEmptyMovieClip("snd2_mc", _root.getNextHighestDepth());
_root.createEmptyMovieClip("snd3_mc", _root.getNextHighestDepth());
_root.createEmptyMovieClip("snd4_mc", _root.getNextHighestDepth());
_root.createEmptyMovieClip("snd5_mc", _root.getNextHighestDepth());
_root.createEmptyMovieClip("snd6_mc", _root.getNextHighestDepth());
startButton.useHandCursor = false;
rulesButton.useHandCursor = false;
playBut.useHandCursor = false;
newsBut.useHandCursor = false;
soundOn = true;
_root.playSounds(6);
stop();
Instance of Symbol 30 MovieClip in Frame 3
on (release) {
getURL ("http://www.armorgames.com", "_blank");
}
Frame 4
_root.attachMovie("textScreenMC", "textScreen", _root.getNextHighestDepth(), {_x:85, _y:200});
_root.textScreen.gotoAndStop(2);
function getCompName() {
randNameNum = Math.floor(Math.random() * nameArr.length);
randName = nameArr[randNameNum];
nameArr.splice(randNameNum, 1);
return(randName);
}
function addTotalBox(playerNum) {
switch (playerNum) {
case 1 :
var _local2 = _root.attachMovie("totalMC", "playerTotalBox", d);
_local2._y = 325;
_local2._x = 285;
_local2.totalTxt.text = player.total;
d++;
break;
case 2 :
_local2 = _root.attachMovie("totalMC", "comp1TotalBox", 99997);
_local2._y = 275;
_local2._x = 135;
_local2.totalTxt.text = comp1.total;
break;
case 3 :
_local2 = _root.attachMovie("totalMC", "comp2TotalBox", 99998);
_local2._y = 275;
_local2._x = 438;
_local2.totalTxt.text = comp2.total;
break;
case 4 :
_local2 = _root.attachMovie("totalMC", "dealerTotalBox", 99999);
_local2._y = 82;
_local2._x = 285;
_local2.totalTxt.text = dealer.total;
}
}
function prepUser(user) {
i = 0;
while (i < playersArr.length) {
trace("PREP USER: " + playersArr[i].name);
playersArr[i].cards = [];
playersArr[i].total = 0;
playersArr[i].result = null;
if (playersArr[i].type == "comp") {
playersArr[i].bet = compBet(playersArr[i]);
}
i++;
}
}
function getResults() {
p = 0;
while (p < playersArr.length) {
if (playersArr[p].result == "Bust") {
playersArr[p].cash = playersArr[p].cash - playersArr[p].bet;
} else if (dealer.total > 21) {
playersArr[p].result = "Win";
trace((((("DEALER BUST --- " + playersArr.name) + " BET: ") + playersArr[p].bet) + " || CASH: ") + playersArr[p].cash);
if ((playersArr[p].total == 21) && (playersArr[p].cards.length == 2)) {
trace("BLACKJACK!!!");
playersArr[p].bet = Math.floor(playersArr[p].bet + (playersArr[p].bet / 2));
playersArr[p].cash = playersArr[p].cash + Math.floor(playersArr[p].bet + (playersArr[p].bet / 2));
} else {
playersArr[p].cash = playersArr[p].cash + playersArr[p].bet;
}
} else if (playersArr[p].total == dealer.total) {
playersArr[p].result = "Push";
} else if (playersArr[p].total > dealer.total) {
playersArr[p].result = "Win";
if ((playersArr[p].total == 21) && (playersArr[p].cards.length == 2)) {
trace("BLACKJACK!!!");
playersArr[p].bet = Math.floor(playersArr[p].bet + (playersArr[p].bet / 2));
playersArr[p].cash = playersArr[p].cash + playersArr[p].bet;
} else {
playersArr[p].cash = playersArr[p].cash + playersArr[p].bet;
}
} else if (playersArr[p].total < dealer.total) {
playersArr[p].result = "Lose";
playersArr[p].cash = playersArr[p].cash - playersArr[p].bet;
}
p++;
}
playerCash = convertCash(player, false);
showResultsInt = setInterval(showResults, 750);
}
function showResults() {
clearInterval(showResultsInt);
_root.attachMovie("resultsScreenMC", "resultsScreen", _root.getNextHighestDepth(), {_x:85, _y:185});
_root.sortHighscores();
}
function checkDeck() {
if (cardArr.length == 1) {
cardArr = cardArrBackup.copy();
}
}
function drawCard(player) {
randCard = Math.floor(Math.random() * cardArr.length);
var _local1 = attachMovie("card", "card" + d, d);
_local1._x = 200;
_local1._y = 232;
_local1.cardVal = cardArr[randCard][1].toUpperCase();
_local1.suit = cardArr[randCard][0];
_local1.num = cardArr[randCard][2];
getSuit(_local1);
if (player == "human") {
addCard(_local1);
} else if (player == "dealer") {
addCardDealer(_local1);
} else if (player == "comp") {
addCardDealer(_local1);
}
cardArr.splice(randCard, 1);
checkDeck();
d++;
}
function disableButtons(disable) {
if (disable == true) {
hitButton.enabled = false;
hitButton._alpha = 50;
standButton.enabled = false;
standButton._alpha = 50;
dealButton.enabled = false;
dealButton._alpha = 50;
} else {
hitButton.enabled = true;
hitButton._alpha = 100;
standButton.enabled = true;
standButton._alpha = 100;
clearButton.enabled = false;
clearButton._alpha = 50;
}
}
function convertBet(bet) {
dealButton.enabled = true;
dealButton._alpha = 100;
bet = ("$ " + bet) + ".00";
return(bet);
}
function convertCash(user, gamestart) {
if (gamestart == true) {
cash = user.cash - user.bet;
cash = ("$ " + cash) + ".00";
return(cash);
}
cash = ("$ " + user.cash) + ".00";
trace("USER CASH: " + user.cash);
return(cash);
}
function sortByNumber(a, b) {
return(a.cash < b.cash);
}
function sortHighscores() {
playersArr.sort(sortByNumber);
i = 0;
while (i < playersArr.length) {
trace("CASH: " + playersArr[i].cash);
_root.resultsScreen["place" + i].text = (Number(i) + 1) + ".";
_root.resultsScreen["name" + i].text = playersArr[i].name;
if ((playersArr[i].result == "Lose") || (playersArr[i].result == "Bust")) {
_root.resultsScreen["winnings" + i].text = "- $" + playersArr[i].bet;
_root.resultsScreen["winnings" + i].setTextFormat(redText);
} else if (playersArr[i].result == "Push") {
_root.resultsScreen["winnings" + i].text = "Push";
} else {
_root.resultsScreen["winnings" + i].text = "+ $" + playersArr[i].bet;
_root.resultsScreen["winnings" + i].setTextFormat(greenText);
}
_root.resultsScreen["cash" + i].text = "$" + playersArr[i].cash;
if (playersArr[i].type == "human") {
_root.resultsScreen["name" + i].setTextFormat(blueText);
_root.resultsScreen["cash" + i].setTextFormat(blueText);
if (playersArr[i].result == "Win") {
_root.playSounds(5);
}
}
i++;
}
}
function leaveTable() {
trace("RUNNING PLAYER LEFT TABLE");
if (_root.playerLeft == true) {
trace("PLAYER LEAVING");
_root.attachMovie("textScreenMC", "textScreen", _root.getNextHighestDepth(), {_x:85, _y:200});
if (((_root.playersGameover[0].type == "human") || (_root.playersGameover[1].type == "human")) || (_root.playersGameover[2].type == "human")) {
gameOver();
}
if (_root.playersGameover.length == 2) {
_root.textScreen.leftTxt.text = ((_root.comp1.name + " and ") + _root.comp2.name) + " have left the table.";
} else {
_root.textScreen.leftTxt.text = _root.playersGameover[0].name + " has left the table.";
}
}
if (_root.playersArr.length < 3) {
_root.addCompCount++;
trace("ADD COMP COUNT: " + _root.addCompCount);
if (_root.addCompCount >= (Math.floor(Math.random() * 5) + 2)) {
addComp();
}
}
}
function gameOver() {
_root.textScreen.gotoAndStop(4);
_root.textScreen.gameoverTxt.text = ("Sorry " + _root.playerNameTxt.text) + ", but you do not have enough chips to continue playing. \n\nPlease come back when you have more money.";
}
function addComp() {
trace("ADD A COMP");
_root.addCompCount = 0;
trace("_root.playersArr.length: " + _root.playersArr.length);
if (_root.playersArr.length == 1) {
randComp = Math.floor(Math.random() * 2) + 1;
trace("BOTH COMPS GONE, ADD A RANDOM ONE: " + randComp);
newComp = _root["comp" + randComp];
newCompNum = randComp;
} else {
trace("ONLY 1 COMP GONE, CHECK WHICH");
if (_root.comp1.cash != 0) {
trace("ADD COMP2");
newComp = _root.comp2;
newCompNum = 2;
} else {
trace("ADD COMP1");
newComp = _root.comp1;
newCompNum = 1;
}
}
_root[("comp" + newCompNum) + "Name"] = _root.getCompName();
_root.newComp.name = _root[("comp" + newCompNum) + "Name"];
_root.newComp.cash = 1000;
_root.newComp.num = newCompNum;
_root.newComp.bet = 0;
_root.newComp.type = "comp";
_root["nameBoxComp" + _root.newComp.num]._visible = true;
_root.playersArr.push(_root.newComp);
_root.attachMovie("textScreenMC", "textScreen", _root.getNextHighestDepth(), {_x:85, _y:185});
_root.textScreen.leftTxt.text = _root.newComp.name + " has joined the table.";
}
function restartGame() {
clearInterval(_root.ID);
clearInterval(_root.ID2);
clearInterval(_root.ID3);
clearInterval(_root.ID4);
clearInterval(_root.drawComp);
clearInterval(_root.dealerDecisionInt);
clearInterval(_root.compAgain);
clearInterval(_root.dealCompInt);
clearInterval(_root.compHitAgain);
_root.playersArr = [_root.player, _root.comp1, _root.comp2];
_root.addCompCount = 0;
r = 1;
while (r < 3) {
thisComp = _root["comp" + r];
thisComp.cash = 1000;
thisComp.num = r;
thisComp.bet = 0;
_root["nameBoxComp" + thisComp.num]._visible = true;
r++;
}
_root.playerTotalBox.removeMovieClip();
_root.comp1TotalBox.removeMovieClip();
_root.comp2TotalBox.removeMovieClip();
_root.dealerTotalBox.removeMovieClip();
_root.comp1Hand._x = 0;
_root.comp2Hand._x = 0;
_root.chip1MC.enabled = true;
_root.chip1MC._alpha = 100;
_root.chip5MC.enabled = true;
_root.chip5MC._alpha = 100;
_root.chip10MC.enabled = true;
_root.chip10MC._alpha = 100;
_root.chip25MC.enabled = true;
_root.chip25MC._alpha = 100;
_root.chip100MC.enabled = true;
_root.chip100MC._alpha = 100;
_root.chip500MC.enabled = true;
_root.chip500MC._alpha = 100;
_root.clearButton.enabled = true;
_root.clearButton._alpha = 100;
_root.playerBet = _root.convertBet(_root.player.bet);
p = 0;
while (p < _root.player.cards.length) {
removeMovieClip(_root.player.cards[p]);
p++;
}
c1 = 0;
while (c1 < _root.comp1.cards.length) {
removeMovieClip(_root.comp1.cards[c1]);
c1++;
}
c2 = 0;
while (c2 < _root.comp2.cards.length) {
removeMovieClip(_root.comp2.cards[c2]);
c2++;
}
c = 0;
while (c < _root.dealer.cards.length) {
removeMovieClip(_root.dealer.cards[c]);
c++;
}
_root.gameStatus = "";
_root.dealerTotalBox.gotoAndStop(1);
_root.nameBoxPlayer.gotoAndStop(1);
_root.nameBoxComp1.gotoAndStop(1);
_root.nameBoxComp2.gotoAndStop(1);
_root.clearBet();
_root.setCompChips();
_root.player.cash = 1000;
_root.playerCash = _root.convertCash(_root.player, false);
}
function moveChip(newChip, chipType) {
new mx.transitions.Tween(newChip, "_x", mx.transitions.easing.Strong.easeOut, 0, 0, 0.5, true);
new mx.transitions.Tween(newChip, "_y", mx.transitions.easing.Strong.easeOut, 120, -(chipType.length * 3), 0.5, true);
}
function moveCompChip(newChip, chipType) {
new mx.transitions.Tween(newChip, "_x", mx.transitions.easing.Strong.easeOut, 0, 0, 0.5, true);
new mx.transitions.Tween(newChip, "_y", mx.transitions.easing.Strong.easeOut, 120, -(chipType.length * 3), 0.25, true);
}
function dealHuman(num) {
if (_root.paused != true) {
dealCount = 0;
randCard = Math.floor(Math.random() * cardArr.length);
var _local2 = _root.playerHand.attachMovie("card", "card" + d, d);
_root.playSounds(2);
if (playerHand["card" + (d - 1)] == null) {
thisX = 20;
} else {
thisX = Number(_root.playerHand["card" + (d - 1)]._x + (cardWidth - 17));
}
var _local3 = new mx.transitions.Tween(_local2, "_x", mx.transitions.easing.Strong.easeOut, 40, thisX, 1, true);
new mx.transitions.Tween(_local2, "_y", mx.transitions.easing.Strong.easeOut, 40, 310, 1, true);
addCardProperties(cardArr, randCard, _local2);
d++;
cardArr.splice(randCard, 1);
checkDeck();
player.cards[player.cards.length] = _local2;
alertTotal.gotoAndPlay(2);
player.total = checkBust(player.cards);
totalTxt.text = player.total;
_local3.onMotionFinished = function () {
};
if (player.cards.length == num) {
clearInterval(_root._root.ID2);
addTotalBox(1);
if (player.total == 21) {
playerTotalBox.gotoAndStop(3);
}
_root.ID3 = setInterval(dealComp, 500, 2);
}
}
}
function dealComp(num) {
if (_root.paused != true) {
if (_root["comp" + num].cash == 0) {
if (num == 1) {
clearInterval(_root.ID);
_root.ID2 = setInterval(dealHuman, 500, cardTotal);
} else {
clearInterval(_root.ID3);
_root.ID4 = setInterval(dealDealer, 500, cardTotal);
}
} else {
_root.playSounds(2);
randCard = Math.floor(Math.random() * cardArr.length);
var _local3 = _root[("comp" + num) + "Hand"].attachMovie("card", "card" + d, d);
if (_root[("comp" + num) + "Hand"]["card" + (d - 1)] == null) {
if (num == 1) {
thisX = 122;
} else {
thisX = 425;
}
} else if (num == 1) {
thisX = Number(_root[("comp" + num) + "Hand"]["card" + (d - 1)]._x + (cardWidth - 25));
} else {
thisX = Number(_root[("comp" + num) + "Hand"]["card" + (d - 1)]._x + (cardWidth - 13));
}
new mx.transitions.Tween(_local3, "_x", mx.transitions.easing.Strong.easeOut, 280, thisX, 1, true);
new mx.transitions.Tween(_local3, "_y", mx.transitions.easing.Strong.easeOut, 40, 260, 1, true);
addCardProperties(cardArr, randCard, _local3);
if (_root["comp" + num].cards.length == 0) {
_local3.flipped = true;
_local3.gotoAndStop(5);
} else {
_local3.flipped = false;
}
d++;
cardArr.splice(randCard, 1);
checkDeck();
_root["comp" + num].cards[_root["comp" + num].cards.length] = _local3;
_root["comp" + num].total = checkBust(_root["comp" + num].cards);
if (_root["comp" + num].cards.length == 2) {
if (num == 1) {
clearInterval(_root.ID);
_root.ID2 = setInterval(dealHuman, 500, cardTotal);
} else {
clearInterval(_root.ID3);
_root.ID4 = setInterval(dealDealer, 500, cardTotal);
}
}
}
}
}
function dealDealer(num) {
if (_root.paused != true) {
randCard = Math.floor(Math.random() * cardArr.length);
var _local2 = _root.dealerHand.attachMovie("card", "card" + d, d);
if (dealerHand["card" + (d - 1)] == null) {
thisX = 20;
} else {
thisX = Number(_root.dealerHand["card" + (d - 1)]._x + (cardWidth - 17));
}
_root.playSounds(2);
var _local3 = new mx.transitions.Tween(_local2, "_x", mx.transitions.easing.Strong.easeOut, 40, thisX, 1, true);
new mx.transitions.Tween(_local2, "_y", mx.transitions.easing.Strong.easeOut, 40, 65, 0.2, true);
addCardProperties(cardArr, randCard, _local2);
if (dealer.cards.length == 0) {
_local2.flipped = true;
_local2.gotoAndStop(5);
} else {
_local2.flipped = false;
}
d++;
cardArr.splice(randCard, 1);
checkDeck();
dealer.cards[dealer.cards.length] = _local2;
dealer.total = checkBust(dealer.cards);
if (dealer.cards.length == num) {
doneDealing = true;
clearInterval(_root.ID4);
if (comp1.cash == 0) {
disableButtons(false);
nameBoxPlayer.gotoAndStop(2);
alertStatus.gotoAndPlay(2);
} else {
getSuit(_root.comp1.cards[0]);
addTotalBox(2);
if (comp1.total == 21) {
comp1TotalBox.gotoAndStop(3);
}
nameBoxComp1.gotoAndStop(2);
_root.dealCompInt = setInterval(compDecision, 1000, 1);
}
}
}
}
function addCardDealer(newCard) {
if (_root.paused != true) {
var _local2 = _root.dealerHand.attachMovie("card", "card" + d, d);
_local2._x = 100;
_local2._y = 232;
_local2.cardVal = newCard.cardVal;
_local2.suit = newCard.suit;
_local2.num = newCard.num;
dealer.cards[dealer.cards.length] = _local2;
dealer.total = checkBust(dealer.cards);
dealerTotalBox.totalTxt.text = dealer.total;
removeMovieClip(newCard);
getSuit(_local2);
_root.playSounds(2);
new mx.transitions.Tween(_local2, "_x", mx.transitions.easing.Strong.easeOut, _local2._x, dealer.cards[dealer.cards.length - 2]._x + (cardWidth - 15), 1, true);
var _local4 = new mx.transitions.Tween(_local2, "_y", mx.transitions.easing.Strong.easeOut, 40, 65, 1, true);
_local4.onMotionFinished = function () {
dealer.total = checkBust(dealer.cards);
_root.compAgain = setInterval(dealerTurn, 750);
};
d++;
dealerHand._x = dealerHand._x - 12;
clearInterval(_root.drawComp);
}
}
function dealerTurn() {
if (_root.paused != true) {
gameStatus = dealer.name + "'s TURN";
alertStatus.gotoAndPlay(2);
clearInterval(_root.dealerDecisionInt);
if (playersBusted.length == 3) {
getResults();
} else {
if (dealer.total < 17) {
_root.drawComp = setInterval(drawCard, 750, "dealer");
} else if (dealer.total > 21) {
dealerTotalBox.gotoAndStop(2);
getResults();
} else {
getResults();
}
clearInterval(_root.compAgain);
}
}
}
function compDecision(compNum) {
if (_root.paused != true) {
clearInterval(_root.dealCompInt);
gameStatus = _root["comp" + compNum].name + "'s TURN";
alertStatus.gotoAndPlay(2);
getSuit(_root["comp" + compNum].cards[0]);
probableDealer = dealer.cards[1].num + 10;
if ((_root["comp" + compNum].total < probableDealer) && (probableDealer > 16)) {
if (_root["comp" + compNum].total > 16) {
randNum = Math.floor(Math.random() * 1);
if (randNum == 1) {
compHit(compNum);
} else {
compStand(compNum);
}
} else {
compHit(compNum);
}
} else if (_root["comp" + compNum].total < 17) {
compHit(compNum);
} else {
compStand(compNum);
}
}
}
function compHit(compNum) {
if (_root.paused != true) {
randCard = Math.floor(Math.random() * cardArr.length);
var _local2 = _root[("comp" + compNum) + "Hand"].attachMovie("card", "card" + d, d, {x:d * 30, y:10});
_local2._x = 300;
_local2._y = 0;
_local2.cardVal = cardArr[randCard][1].toUpperCase();
_local2.suit = cardArr[randCard][0];
_local2.num = cardArr[randCard][2];
cardArr.splice(randCard, 1);
checkDeck();
getSuit(_local2);
_root.playSounds(2);
_root["comp" + compNum].cards[_root["comp" + compNum].cards.length] = _local2;
_root["comp" + compNum].total = checkBust(_root["comp" + compNum].cards);
_root[("comp" + compNum) + "TotalBox"].totalTxt.text = _root["comp" + compNum].total;
new mx.transitions.Tween(_local2, "_x", mx.transitions.easing.Strong.easeOut, 280, _root["comp" + compNum].cards[_root["comp" + compNum].cards.length - 2]._x + (cardWidth - 17), 1, true);
var _local3 = new mx.transitions.Tween(_local2, "_y", mx.transitions.easing.Strong.easeOut, 40, 260, 1, true);
_local3.onMotionFinished = function () {
if ((_root["comp" + compNum].total < 17) && (_root["comp" + compNum].total < probableDealer)) {
_root[("comp" + compNum) + "Status"] = "Hitting";
_root.compHitAgain = setInterval(compDecision, 1000, compNum);
} else if (_root["comp" + compNum].total > 21) {
_root[("comp" + compNum) + "TotalBox"].gotoAndStop(2);
playersBusted[playersBusted.length] = _root["comp" + compNum];
_root["nameBoxComp" + compNum].gotoAndStop(1);
_root["comp" + compNum].result = "Bust";
if (compNum == 2) {
getSuit(dealer.cards[0]);
addTotalBox(4);
if (dealer.total == 21) {
dealerTotalBox.gotoAndStop(3);
}
_root.dealerDecisionInt = setInterval(dealerTurn, 1500);
} else {
gameStatus = "HIT OR STAND";
disableButtons(false);
nameBoxPlayer.gotoAndStop(2);
alertStatus.gotoAndPlay(2);
}
} else {
_root[("comp" + compNum) + "Status"] = "Standing";
_root["nameBoxComp" + compNum].gotoAndStop(1);
if (compNum == 2) {
getSuit(dealer.cards[0]);
addTotalBox(4);
if (dealer.total == 21) {
dealerTotalBox.gotoAndStop(3);
}
_root.dealerDecisionInt = setInterval(dealerTurn, 1500);
} else {
gameStatus = "HIT OR STAND";
disableButtons(false);
nameBoxPlayer.gotoAndStop(2);
alertStatus.gotoAndPlay(2);
}
}
};
d++;
_root[("comp" + compNum) + "Hand"]._x = _root[("comp" + compNum) + "Hand"]._x - 10;
clearInterval(_root.compHitAgain);
}
}
function compStand(compNum) {
if (_root.paused != true) {
_root[("comp" + compNum) + "Status"] = "Standing";
_root["nameBoxComp" + compNum].gotoAndStop(1);
if (compNum == 2) {
getSuit(dealer.cards[0]);
addTotalBox(4);
if (dealer.total == 21) {
dealerTotalBox.gotoAndStop(3);
}
_root.dealerDecisionInt = setInterval(dealerTurn, 1500);
} else {
gameStatus = "HIT OR STAND";
disableButtons(false);
nameBoxPlayer.gotoAndStop(2);
alertStatus.gotoAndPlay(2);
}
}
}
function addCard(newCard) {
hitButton.enabled = false;
hitButton._alpha = 50;
standButton.enabled = false;
standButton._alpha = 50;
var _local2 = _root.playerHand.attachMovie("card", "card" + d, d);
_local2._x = 100;
_local2._y = 232;
_local2.cardVal = newCard.cardVal;
_local2.suit = newCard.suit;
_local2.num = newCard.num;
player.cards[player.cards.length] = _local2;
removeMovieClip(newCard);
getSuit(_local2);
_root.playSounds(2);
new mx.transitions.Tween(_local2, "_x", mx.transitions.easing.Strong.easeOut, _local2._x, player.cards[player.cards.length - 2]._x + (cardWidth - 15), 1, true);
var _local4 = new mx.transitions.Tween(_local2, "_y", mx.transitions.easing.Strong.easeOut, 40, 310, 1, true);
gameStatus = "HIT OR STAND";
alertStatus.gotoAndPlay(2);
player.total = checkBust(player.cards);
alertTotal.gotoAndPlay(2);
totalTxt.text = player.total;
_root.playerTotalBox.totalTxt.text = player.total;
_local4.onMotionFinished = function () {
hitButton.enabled = true;
hitButton._alpha = 100;
standButton.enabled = true;
standButton._alpha = 100;
if (player.total > 21) {
_root.playSounds(4);
gameStatus = "BUST";
player.result = "Bust";
playerTotalBox.gotoAndStop(2);
playersBusted[playersBusted.length] = player;
clearInterval(_root.drawComp);
disableButtons(true);
if (comp2.cash == 0) {
getSuit(dealer.cards[0]);
addTotalBox(4);
if (dealer.total == 21) {
dealerTotalBox.gotoAndStop(3);
}
_root.dealerDecisionInt = setInterval(dealerTurn, 1500);
} else {
getSuit(comp2.cards[0]);
nameBoxPlayer.gotoAndStop(1);
nameBoxComp2.gotoAndStop(2);
addTotalBox(3);
_root.dealCompInt = setInterval(compDecision, 1000, 2);
}
}
};
d++;
playerHand._x = playerHand._x - 12;
}
function playerStand() {
disableButtons(true);
nameBoxPlayer.gotoAndStop(1);
if (comp2.cash == 0) {
getSuit(dealer.cards[0]);
addTotalBox(4);
if (dealer.total == 21) {
dealerTotalBox.gotoAndStop(3);
}
_root.dealerDecisionInt = setInterval(dealerTurn, 1500);
} else {
gameStatus = comp2.name + "'s TURN";
alertStatus.gotoAndPlay(2);
addTotalBox(3);
if (comp2.total == 21) {
comp2TotalBox.gotoAndStop(3);
}
getSuit(comp2.cards[0]);
nameBoxComp2.gotoAndStop(2);
_root.dealCompInt = setInterval(compDecision, 1000, 2);
}
}
function checkBust(cardArr) {
ace = false;
total = 0;
n = 0;
while (n < cardArr.length) {
total = total + cardArr[n].num;
n++;
}
if (total > 21) {
a = 0;
while (a < cardArr.length) {
if (cardArr[a].cardVal == "A") {
if (cardArr[a].num != 1) {
ace = true;
aceCard = cardArr[a];
}
}
a++;
}
if (ace == true) {
aceCard.num = 1;
total = total - 10;
}
} else if (total == 21) {
}
return(total);
}
function setChips() {
_root.player.chips1 = [];
_root.player.chips5 = [];
_root.player.chips10 = [];
_root.player.chips25 = [];
_root.player.chips100 = [];
_root.player.chips500 = [];
}
function setCompChips() {
trace("SETTING CHIPS!!!!");
_root.playSounds(1);
_root.comp1.bet = 0;
_root.comp2.bet = 0;
cr = 0;
while (cr < _root.chipArr.length) {
removeChips(_root.comp1["chips" + _root.chipArr[cr]]);
removeChips(_root.comp2["chips" + _root.chipArr[cr]]);
_root.comp1["chips" + _root.chipArr[cr]] = [];
_root.comp2["chips" + _root.chipArr[cr]] = [];
cr++;
}
_root.comp1Chips._visible = true;
_root.comp2Chips._visible = true;
}
function clearBet() {
player.bet = 0;
playerBet = convertBet(player.bet);
removeChips(_root.player.chips1);
_root.player.chips1 = [];
removeChips(_root.player.chips5);
_root.player.chips5 = [];
removeChips(_root.player.chips10);
_root.player.chips10 = [];
removeChips(_root.player.chips25);
_root.player.chips25 = [];
removeChips(_root.player.chips100);
_root.player.chips100 = [];
removeChips(_root.player.chips500);
_root.player.chips500 = [];
_root.dealButton.enabled = false;
_root.dealButton._alpha = 50;
}
function removeChips(chipArray) {
p = 0;
while (p < chipArray.length) {
removeMovieClip(chipArray[p]);
p++;
}
}
function compBet(user) {
randBet = Math.floor(Math.random() * compBetArr.length);
var _local1 = Math.floor(user.cash * compBetArr[randBet]);
if (user.cash < 200) {
_local1 = user.cash / (Math.floor(Math.random() * 4) + 3);
}
_local1 = _local1 / 5;
_local1 = Math.round(_local1);
_local1 = _local1 * 5;
if (_local1 > user.cash) {
trace((("**** USER BET TOO MUCH!!! Cash: " + user.cash) + " Bet: ") + _local1);
}
compChips(user, _local1);
return(_local1);
}
function chipTest(user, bet) {
compChips(user, bet);
}
function compChips(user, bet) {
lowestChip = null;
lowestChipNum = 100000 /* 0x0186A0 */;
l = 0;
while (l < chipArr.length) {
if (((bet / chipArr[l]) < lowestChipNum) && ((bet / chipArr[l]) >= 1)) {
lowestChip = chipArr[l];
lowestChipNum = bet / chipArr[l];
}
l++;
}
compChipMC = _root[("comp" + user.num) + "Chips"];
comp = _root["comp" + user.num];
compChipArr = _root.comp["chips" + lowestChip];
var _local3 = compChipMC["chip" + lowestChip].attachMovie("chip" + lowestChip, "chip" + compChipArr.length, compChipArr.length);
_local3.filters = [_root.chipShadow];
compChipArr[compChipArr.length] = _local3;
_root.moveCompChip(_local3, compChipArr);
betLeft = Number(bet - lowestChip);
if (((lowestChipNum % 1) ? true : (falselowestChipNum != 1))) {
chipTest(user, betLeft);
}
}
function checkGameover() {
_root.playerLeft = false;
_root.playersGameover = [];
w = 0;
while (w < playersArr.length) {
trace("Checking: " + playersArr[w].name);
if (playersArr[w].cash < 25) {
_root.playerLeft = true;
playersArr[w].cash = 0;
playersArr[w].bet = 0;
_root[("comp" + playersArr[w].num) + "Name"] = "";
_root["nameBoxComp" + playersArr[w].num]._visible = false;
trace("REMOVE " + playersArr[w].name);
trace(playersArr.length);
_root.playersGameover.push(playersArr[w]);
}
w++;
}
j = 0;
while (j < _root.playersGameover.length) {
h = 0;
while (h < _root.playersArr.length) {
if (_root.playersGameover[j].name == _root.playersArr[h].name) {
_root.playersArr[h].cash = 0;
_root.playersArr[h].bet = 0;
_root[("comp" + _root.playersArr[h].num) + "Name"] = "";
_root["nameBoxComp" + _root.playersArr[h].num]._visible = false;
_root.playersArr.splice(h, 1);
}
h++;
}
j++;
}
_root.leaveTable();
}
function addCardProperties(cardArr, randCard, newCard) {
newCard.cardVal = cardArr[randCard][1].toUpperCase();
newCard.suit = cardArr[randCard][0];
newCard.num = cardArr[randCard][2];
getSuit(newCard);
}
function centerCards() {
leftSpace = 600 - ((cardWidth * cardTotal) + ((10 * cardTotal) - 1));
playerHand._x = leftSpace / 2;
dealerHand._x = leftSpace / 2;
}
function getSuit(card) {
switch (card.suit) {
case 1 :
card.gotoAndStop(1);
break;
case 2 :
card.gotoAndStop(2);
break;
case 3 :
card.gotoAndStop(3);
break;
case 4 :
card.gotoAndStop(4);
}
}
function initGame(restart) {
setCompChips();
disableButtons(true);
playerCash = convertCash(player, true);
alertStatus.gotoAndPlay(2);
gameStatus = "DEALING CARDS";
prepUser();
dealer.cards = [];
dealer.total = 0;
playersBusted = [];
gameoverMC._visible = false;
gameoverMC.gameoverTxt = "";
ID = setInterval(dealComp, 500, 1);
centerCards();
}
var redText = new TextFormat();
redText.color = 11342097 /* 0xAD1111 */;
redText.size = 14;
redText.font = "Arial Rounded MT Bold";
var blueText = new TextFormat();
blueText.color = 3114989 /* 0x2F87ED */;
blueText.size = 14;
blueText.font = "Arial Rounded MT Bold";
var greenText = new TextFormat();
greenText.color = 3385088 /* 0x33A700 */;
greenText.size = 14;
greenText.font = "Arial Rounded MT Bold";
compBetArr = [0.05, 0.05, 0.05, 0.05, 0.05, 0.1, 0.1, 0.1, 0.1, 0.2, 0.3];
chipArr = [1, 5, 10, 25, 100, 500];
Array.prototype.copy = Array.prototype.slice;
var chipShadow = (new flash.filters.DropShadowFilter(2, 45, 0, 0.4, 2, 2, 2, 3));
cardArr = [[1, "2", 2], [1, "3", 3], [1, "4", 4], [1, "5", 5], [1, "6", 6], [1, "7", 7], [1, "8", 8], [1, "9", 9], [1, "10", 10], [1, "j", 10], [1, "q", 10], [1, "k", 10], [1, "a", 11], [4, "2", 2], [4, "3", 3], [4, "4", 4], [4, "5", 5], [4, "6", 6], [4, "7", 7], [4, "8", 8], [4, "9", 9], [4, "10", 10], [4, "j", 10], [4, "q", 10], [4, "k", 10], [4, "a", 11], [2, "2", 2], [2, "3", 3], [2, "4", 4], [2, "5", 5], [2, "6", 6], [2, "7", 7], [2, "8", 8], [2, "9", 9], [2, "10", 10], [2, "j", 10], [2, "q", 10], [2, "k", 10], [2, "a", 11], [3, "2", 2], [3, "3", 3], [3, "4", 4], [3, "5", 5], [3, "6", 6], [3, "7", 7], [3, "8", 8], [3, "9", 9], [3, "10", 10], [3, "j", 10], [3, "q", 10], [3, "k", 10], [3, "a", 11]];
cardArrBackup = cardArr.copy();
nameArr = ["Jodi", "Mike", "Aryana", "Lynn", "Rick", "Colin", "Ashley", "Lyla", "Wayne"];
_root.playSounds(3);
_root.themeMusicMC.stop();
d = 4;
cardTotal = 2;
cardWidth = 40;
player = new Object();
dealer = new Object();
comp1 = new Object();
comp2 = new Object();
_root.createEmptyMovieClip("playerHand", 7);
trace(playerName);
player.name = playerName;
playerNameTxt.text = playerName;
player.cash = 1000;
player.bet = 0;
player.type = "human";
attachMovie("chipHolderMC", "playerChips", 1);
playerChips._x = 285;
playerChips._y = 250;
playerChipsArr = [];
_root.createEmptyMovieClip("comp1Hand", 6);
comp1Name = getCompName();
comp1.name = comp1Name;
comp1.cash = 1000;
comp1.num = 1;
comp1.bet = 0;
comp1.type = "comp";
attachMovie("chipHolderCompMC", "comp1Chips", 2);
comp1Chips._x = 120;
comp1Chips._y = 220;
comp1ChipsArr = [];
_root.createEmptyMovieClip("comp2Hand", 5);
comp2Name = getCompName();
comp2.name = comp2Name;
comp2.cash = 1000;
comp2.num = 2;
comp2.bet = 0;
comp2.type = "comp";
attachMovie("chipHolderCompMC", "comp2Chips", 3);
comp2Chips._x = 430;
comp2Chips._y = 220;
comp2ChipsArr = [];
_root.createEmptyMovieClip("dealerHand", 4);
dealerName = "Dealer";
dealer.name = dealerName;
disableButtons(true);
playersArr = [player, comp1, comp2];
addCompCount = 0;
setChips();
hitButton.useHandCursor = false;
standButton.useHandCursor = false;
dealButton.useHandCursor = false;
menuButton.useHandCursor = false;
clearButton.useHandCursor = false;
soundButton.useHandCursor = false;
chip1MC.useHandCursor = false;
chip5MC.useHandCursor = false;
chip10MC.useHandCursor = false;
chip25MC.useHandCursor = false;
chip100MC.useHandCursor = false;
chip500MC.useHandCursor = false;
nameBoxComp2.useHandCursor = false;
nameBoxComp1.useHandCursor = false;
Instance of Symbol 199 MovieClip "nameBoxComp1" in Frame 4
on (rollOver) {
_root.attachMovie("compStatsMC", "comp1Stats", 34344, {_x:97, _y:362});
_root.comp1Stats.betTxt.text = _root.comp1.bet + ".00";
_root.comp1Stats.cashTxt.text = (_root.comp1.cash - _root.comp1.bet) + ".00";
}
on (rollOut) {
_root.comp1Stats.removeMovieClip();
}
Instance of Symbol 199 MovieClip "nameBoxComp2" in Frame 4
on (rollOver) {
_root.attachMovie("compStatsMC", "comp2Stats", 34343, {_x:400, _y:362});
_root.comp2Stats.betTxt.text = _root.comp2.bet + ".00";
_root.comp2Stats.cashTxt.text = (_root.comp2.cash - _root.comp2.bet) + ".00";
}
on (rollOut) {
_root.comp2Stats.removeMovieClip();
}
Symbol 24 MovieClip [card] Frame 1
stop();
Symbol 24 MovieClip [card] Frame 2
stop();
Symbol 24 MovieClip [card] Frame 3
stop();
Symbol 24 MovieClip [card] Frame 4
stop();
Symbol 24 MovieClip [card] Frame 5
stop();
Symbol 28 MovieClip [deckPile] Frame 1
stop();
Symbol 28 MovieClip [deckPile] Frame 2
stop();
Symbol 28 MovieClip [deckPile] Frame 3
stop();
Symbol 28 MovieClip [deckPile] Frame 4
stop();
Symbol 28 MovieClip [deckPile] Frame 5
stop();
Symbol 35 Button
on (release) {
_root.textScreen.removeMovieClip();
}
Symbol 42 Button
on (release) {
_root.restartGame();
_root.paused = false;
_root.menuMC.removeMovieClip();
}
Symbol 47 Button
on (release) {
_root.gameMusicMC.stop();
_root.restartGame();
_root.paused = false;
_root.gotoAndStop(3);
_root.menuMC.removeMovieClip();
}
Symbol 52 Button
on (release) {
_root.paused = false;
_root.menuMC.removeMovieClip();
}
Symbol 55 Button
on (release) {
getURL ("http://www.likwidgames.com", "_blank");
}
Symbol 60 Button
on (release) {
getURL ("http://www.armorgames.com", "_blank");
}
Symbol 61 MovieClip [menuMC] Frame 1
butResume.useHandCursor = false;
butPlay.useHandCursor = false;
butRestart.useHandCursor = false;
butQuit.useHandCursor = false;
stop();
Instance of Symbol 30 MovieClip in Symbol 61 MovieClip [menuMC] Frame 1
on (rollOver) {
this.useHandCursor = false;
}
Symbol 72 Button
on (release) {
_root.gameMusicMC.stop();
_root.restartGame();
_root.paused = false;
_root.gotoAndStop(3);
_root.textScreen.removeMovieClip();
}
Symbol 74 MovieClip [textScreenMC] Frame 1
buttonContinue.useHandCursor = false;
stop();
Instance of Symbol 30 MovieClip in Symbol 74 MovieClip [textScreenMC] Frame 1
on (rollOver) {
this.useHandCursor = false;
}
Symbol 74 MovieClip [textScreenMC] Frame 2
stop();
Symbol 74 MovieClip [textScreenMC] Frame 3
buttonContinue.useHandCursor = false;
stop();
Symbol 74 MovieClip [textScreenMC] Frame 4
butPlay.useHandCursor = false;
butQuit.useHandCursor = false;
stop();
Symbol 77 Button
on (release) {
_root.playerTotalBox.removeMovieClip();
_root.comp1TotalBox.removeMovieClip();
_root.comp1Hand._x = 0;
_root.comp2TotalBox.removeMovieClip();
_root.comp2Hand._x = 0;
_root.dealerTotalBox.removeMovieClip();
_root.chip1MC.enabled = true;
_root.chip1MC._alpha = 100;
_root.chip5MC.enabled = true;
_root.chip5MC._alpha = 100;
_root.chip10MC.enabled = true;
_root.chip10MC._alpha = 100;
_root.chip25MC.enabled = true;
_root.chip25MC._alpha = 100;
_root.chip100MC.enabled = true;
_root.chip100MC._alpha = 100;
_root.chip500MC.enabled = true;
_root.chip500MC._alpha = 100;
_root.clearButton.enabled = true;
_root.clearButton._alpha = 100;
_root.playerBet = _root.convertBet(_root.player.bet);
p = 0;
while (p < _root.player.cards.length) {
removeMovieClip(_root.player.cards[p]);
p++;
}
c1 = 0;
while (c1 < _root.comp1.cards.length) {
removeMovieClip(_root.comp1.cards[c1]);
c1++;
}
c2 = 0;
while (c2 < _root.comp2.cards.length) {
removeMovieClip(_root.comp2.cards[c2]);
c2++;
}
c = 0;
while (c < _root.dealer.cards.length) {
removeMovieClip(_root.dealer.cards[c]);
c++;
}
if (_root.player.bet > _root.player.cash) {
_root.clearBet();
}
_root.comp1Chips._visible = false;
_root.comp2Chips._visible = false;
_root.checkGameover();
_root.resultsScreen.removeMovieClip();
}
Symbol 90 MovieClip [resultsScreenMC] Frame 1
buttonContinue.useHandCursor = false;
stop();
Instance of Symbol 30 MovieClip in Symbol 90 MovieClip [resultsScreenMC] Frame 1
on (rollOver) {
this.useHandCursor = false;
}
Symbol 101 MovieClip [totalMC] Frame 1
stop();
Symbol 101 MovieClip [totalMC] Frame 2
stop();
Symbol 101 MovieClip [totalMC] Frame 3
stop();
Symbol 138 MovieClip Frame 126
_root.nextFrame();
Symbol 238 MovieClip [__Packages.mx.transitions.OnEnterFrameBeacon] Frame 0
class mx.transitions.OnEnterFrameBeacon
{
function OnEnterFrameBeacon () {
}
static function init() {
var _local4 = _global.MovieClip;
if (!_root.__OnEnterFrameBeacon) {
mx.transitions.BroadcasterMX.initialize(_local4);
var _local3 = _root.createEmptyMovieClip("__OnEnterFrameBeacon", 9876);
_local3.onEnterFrame = function () {
_global.MovieClip.broadcastMessage("onEnterFrame");
};
}
}
static var version = "1.1.0.52";
}
Symbol 239 MovieClip [__Packages.mx.transitions.BroadcasterMX] Frame 0
class mx.transitions.BroadcasterMX
{
var _listeners;
function BroadcasterMX () {
}
static function initialize(o, dontCreateArray) {
if (o.broadcastMessage != undefined) {
delete o.broadcastMessage;
}
o.addListener = mx.transitions.BroadcasterMX.prototype.addListener;
o.removeListener = mx.transitions.BroadcasterMX.prototype.removeListener;
if (!dontCreateArray) {
o._listeners = new Array();
}
}
function addListener(o) {
removeListener(o);
if (broadcastMessage == undefined) {
broadcastMessage = mx.transitions.BroadcasterMX.prototype.broadcastMessage;
}
return(_listeners.push(o));
}
function removeListener(o) {
var _local2 = _listeners;
var _local3 = _local2.length;
while (_local3--) {
if (_local2[_local3] == o) {
_local2.splice(_local3, 1);
if (!_local2.length) {
broadcastMessage = undefined;
}
return(true);
}
}
return(false);
}
function broadcastMessage() {
var _local5 = String(arguments.shift());
var _local4 = _listeners.concat();
var _local6 = _local4.length;
var _local3 = 0;
while (_local3 < _local6) {
_local4[_local3][_local5].apply(_local4[_local3], arguments);
_local3++;
}
}
static var version = "1.1.0.52";
}
Symbol 240 MovieClip [__Packages.mx.transitions.Tween] Frame 0
class mx.transitions.Tween
{
var obj, prop, begin, useSeconds, _listeners, addListener, prevTime, _time, looping, _duration, broadcastMessage, isPlaying, _fps, prevPos, _pos, change, _intervalID, _startTime;
function Tween (obj, prop, func, begin, finish, duration, useSeconds) {
mx.transitions.OnEnterFrameBeacon.init();
if (!arguments.length) {
return;
}
this.obj = obj;
this.prop = prop;
this.begin = begin;
position = (begin);
this.duration = (duration);
this.useSeconds = useSeconds;
if (func) {
this.func = func;
}
this.finish = (finish);
_listeners = [];
addListener(this);
start();
}
function set time(t) {
prevTime = _time;
if (t > duration) {
if (looping) {
rewind(t - _duration);
update();
broadcastMessage("onMotionLooped", this);
} else {
if (useSeconds) {
_time = _duration;
update();
}
stop();
broadcastMessage("onMotionFinished", this);
}
} else if (t < 0) {
rewind();
update();
} else {
_time = t;
update();
}
//return(time);
}
function get time() {
return(_time);
}
function set duration(d) {
_duration = (((d == null) || (d <= 0)) ? (_global.Infinity) : (d));
//return(duration);
}
function get duration() {
return(_duration);
}
function set FPS(fps) {
var _local2 = isPlaying;
stopEnterFrame();
_fps = fps;
if (_local2) {
startEnterFrame();
}
//return(FPS);
}
function get FPS() {
return(_fps);
}
function set position(p) {
setPosition(p);
//return(position);
}
function setPosition(p) {
prevPos = _pos;
obj[prop] = (_pos = p);
broadcastMessage("onMotionChanged", this, _pos);
updateAfterEvent();
}
function get position() {
return(getPosition());
}
function getPosition(t) {
if (t == undefined) {
t = _time;
}
return(func(t, begin, change, _duration));
}
function set finish(f) {
change = f - begin;
//return(finish);
}
function get finish() {
return(begin + change);
}
function continueTo(finish, duration) {
begin = position;
this.finish = (finish);
if (duration != undefined) {
this.duration = (duration);
}
start();
}
function yoyo() {
continueTo(begin, time);
}
function startEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.addListener(this);
} else {
_intervalID = setInterval(this, "onEnterFrame", 1000 / _fps);
}
isPlaying = true;
}
function stopEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.removeListener(this);
} else {
clearInterval(_intervalID);
}
isPlaying = false;
}
function start() {
rewind();
startEnterFrame();
broadcastMessage("onMotionStarted", this);
}
function stop() {
stopEnterFrame();
broadcastMessage("onMotionStopped", this);
}
function resume() {
fixTime();
startEnterFrame();
broadcastMessage("onMotionResumed", this);
}
function rewind(t) {
_time = ((t == undefined) ? 0 : (t));
fixTime();
update();
}
function fforward() {
time = (_duration);
fixTime();
}
function nextFrame() {
if (useSeconds) {
time = ((getTimer() - _startTime) / 1000);
} else {
time = (_time + 1);
}
}
function onEnterFrame() {
nextFrame();
}
function prevFrame() {
if (!useSeconds) {
time = (_time - 1);
}
}
function toString() {
return("[Tween]");
}
function fixTime() {
if (useSeconds) {
_startTime = getTimer() - (_time * 1000);
}
}
function update() {
position = (getPosition(_time));
}
static var version = "1.1.0.52";
static var __initBeacon = mx.transitions.OnEnterFrameBeacon.init();
static var __initBroadcaster = mx.transitions.BroadcasterMX.initialize(mx.transitions.Tween.prototype, true);
function func(t, b, c, d) {
return(((c * t) / d) + b);
}
}
Symbol 241 MovieClip [__Packages.mx.transitions.easing.Strong] Frame 0
class mx.transitions.easing.Strong
{
function Strong () {
}
static function easeIn(t, b, c, d) {
t = t / d;
return((((((c * t) * t) * t) * t) * t) + b);
}
static function easeOut(t, b, c, d) {
t = (t / d) - 1;
return((c * (((((t * t) * t) * t) * t) + 1)) + b);
}
static function easeInOut(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return(((((((c / 2) * t) * t) * t) * t) * t) + b);
}
t = t - 2;
return(((c / 2) * (((((t * t) * t) * t) * t) + 2)) + b);
}
static var version = "1.1.0.52";
}
Symbol 142 MovieClip Frame 120
_root.nextFrame();
Symbol 149 Button
on (release) {
if (_root.soundOn == true) {
_root.soundOn = false;
_root.themeMusicMC.stop();
} else {
_root.soundOn = true;
_root.themeMusicMC.start(0, 999);
}
}
Symbol 154 Button
on (release) {
nameBoxMC.gotoAndStop(2);
}
Symbol 159 Button
on (release) {
getURL ("http://www.armorgames.com", "_blank");
}
Symbol 164 Button
on (release) {
getURL ("http://www.armorblog.com", "_blank");
}
Symbol 172 Button
on (release) {
if (nameBox.text != "") {
_root.playerName = nameBox.text;
_root.nextFrame();
}
}
Symbol 173 MovieClip Frame 1
stop();
Symbol 173 MovieClip Frame 2
goButton.useHandCursor = false;
Instance of Symbol 30 MovieClip in Symbol 173 MovieClip Frame 2
on (rollOver) {
this.useHandCursor = false;
}
Symbol 176 Button
on (release) {
if (_root.soundOn == true) {
_root.soundOn = false;
_root.gameMusicMC.setVolume(0);
} else {
_root.soundOn = true;
_root.gameMusicMC.setVolume(20);
}
}
Symbol 180 MovieClip Frame 1
stop();
Symbol 180 MovieClip Frame 2
play();
Symbol 184 MovieClip Frame 1
stop();
Symbol 184 MovieClip Frame 2
play();
Symbol 189 Button
on (release) {
playerStand();
}
Symbol 194 Button
on (release) {
if (doneDealing == true) {
gameStatus = "HITTING";
drawCard("human");
}
}
Symbol 199 MovieClip Frame 1
stop();
Symbol 199 MovieClip Frame 2
stop();
Symbol 205 Button
on (release) {
if (_root.player.bet >= 25) {
chip1MC.enabled = false;
chip1MC._alpha = 50;
chip5MC.enabled = false;
chip5MC._alpha = 50;
chip10MC.enabled = false;
chip10MC._alpha = 50;
chip25MC.enabled = false;
chip25MC._alpha = 50;
chip100MC.enabled = false;
chip100MC._alpha = 50;
chip500MC.enabled = false;
chip500MC._alpha = 50;
clearButton.enabled = false;
clearButton._alpha = 50;
_root.initGame(true);
} else {
_root.attachMovie("textScreenMC", "textScreen", _root.getNextHighestDepth(), {_x:85, _y:200});
_root.textScreen.gotoAndStop(3);
}
}
Symbol 212 Button
on (release) {
if (_root.paused != true) {
_root.paused = true;
_root.attachMovie("menuMC", "menuMC", _root.getNextHighestDepth(), {_x:85, _y:185});
}
}
Symbol 224 Button
on (release) {
clearBet();
}
Symbol 227 Button
on (release) {
if ((player.bet + 1) > player.cash) {
} else {
_root.playSounds(1);
player.bet = player.bet + 1;
playerBet = convertBet(player.bet);
var newChip = _root.playerChips.chip1.attachMovie("chip1", "chip" + _root.player.chips1.length, _root.player.chips1.length);
_root.moveChip(newChip, _root.player.chips1);
newChip.filters = [_root.chipShadow];
_root.player.chips1[_root.player.chips1.length] = newChip;
}
}
Symbol 229 Button
on (release) {
if ((player.bet + 5) > player.cash) {
} else {
_root.playSounds(1);
player.bet = player.bet + 5;
playerBet = convertBet(player.bet);
var newChip = _root.playerChips.chip5.attachMovie("chip5", "chip" + _root.player.chips5.length, _root.player.chips5.length);
_root.moveChip(newChip, _root.player.chips5);
newChip.filters = [_root.chipShadow];
_root.player.chips5[_root.player.chips5.length] = newChip;
}
}
Symbol 231 Button
on (release) {
if ((player.bet + 10) > player.cash) {
} else {
_root.playSounds(1);
player.bet = player.bet + 10;
playerBet = convertBet(player.bet);
var newChip = _root.playerChips.chip10.attachMovie("chip10", "chip" + _root.player.chips10.length, _root.player.chips10.length);
_root.moveChip(newChip, _root.player.chips10);
newChip.filters = [_root.chipShadow];
_root.player.chips10[_root.player.chips10.length] = newChip;
}
}
Symbol 233 Button
on (release) {
if ((player.bet + 25) > player.cash) {
} else {
_root.playSounds(1);
player.bet = player.bet + 25;
playerBet = convertBet(player.bet);
var newChip = _root.playerChips.chip25.attachMovie("chip25", "chip" + _root.player.chips25.length, _root.player.chips25.length);
_root.moveChip(newChip, _root.player.chips25);
newChip.filters = [_root.chipShadow];
_root.player.chips25[_root.player.chips25.length] = newChip;
}
}
Symbol 235 Button
on (release) {
if ((player.bet + 100) > player.cash) {
} else {
_root.playSounds(1);
player.bet = player.bet + 100;
playerBet = convertBet(player.bet);
var newChip = _root.playerChips.chip100.attachMovie("chip100", "chip" + _root.player.chips100.length, _root.player.chips100.length);
_root.moveChip(newChip, _root.player.chips100);
newChip.filters = [_root.chipShadow];
_root.player.chips100[_root.player.chips100.length] = newChip;
}
}
Symbol 237 Button
on (release) {
if ((player.bet + 500) > player.cash) {
} else {
_root.playSounds(1);
player.bet = player.bet + 500;
playerBet = convertBet(player.bet);
var newChip = _root.playerChips.chip500.attachMovie("chip500", "chip" + _root.player.chips500.length, _root.player.chips500.length);
_root.moveChip(newChip, _root.player.chips500);
newChip.filters = [_root.chipShadow];
_root.player.chips500[_root.player.chips500.length] = newChip;
}
}