Frame 1
function sortByVal(element1, element2) {
if (element1.piType < element2.piType) {
return(-1);
}
if (element1.piType > element2.piType) {
return(1);
}
return(0);
}
function sortBySuit(element1, element2) {
if (element1.piSuit < element2.piSuit) {
return(-1);
}
if (element1.piSuit > element2.piSuit) {
return(1);
}
return(0);
}
function sortByScore(element1, element2) {
if (element1.mGetScore() > element2.mGetScore()) {
return(-1);
}
if (element1.mGetScore() < element2.mGetScore()) {
return(1);
}
return(0);
}
function judge(laCards) {
var _local1 = laCards;
var liValue = 0;
_local1.sort(sortByVal);
var _local2 = 0;
var liSuitCount = 0;
var liLongestSuit = 0;
var liLongest = 0;
var liHiVal = 0;
var lbAdd = false;
if (_local1[_local1.length - 1].piType == 12) {
var loHigh = _local1[_local1.length - 1];
_local1.splice(0, 0, loHigh);
lbAdd = true;
}
var _local3 = 1;
while (_local3 < _local1.length) {
var liFirstType = _local1[_local3 - 1].piType;
if (liFirstType == 12) {
liFirstType = -1;
}
if (liFirstType == (_local1[_local3].piType - 1)) {
_local2++;
if (_local2 > liLongest) {
liLongest = _local2;
liHiVal = _local1[_local3].piType;
}
if (_local1[_local3 - 1].piSuit == _local1[_local3].piSuit) {
liSuitCount++;
if (liSuitCount > liLongestSuit) {
liLongestSuit = liSuitCount;
}
} else {
liSuitCount = 0;
}
} else if (liFirstType == _local1[_local3].piType) {
} else {
_local2 = 0;
}
_local3++;
}
if (liLongest > 3) {
liValue = 400 + liHiVal;
}
if (lbAdd) {
_local1.splice(0, 1);
}
if ((liLongest > 3) and (liLongestSuit > 3)) {
liValue = 800 + liHiVal;
}
if (liValue < 700) {
_local1.sort(sortBySuit);
_local2 = 0;
var liLongest = 0;
var liHiVal = 0;
_local3 = 1;
while (_local3 < _local1.length) {
if (_local1[_local3 - 1].piSuit == _local1[_local3].piSuit) {
_local2++;
if (_local2 > liLongest) {
liLongest = _local2;
liHiVal = _local1[_local3].piType;
}
} else {
_local2 = 0;
}
_local3++;
}
if (liLongest >= 4) {
liValue = 500 + liHiVal;
}
}
if (liValue < 800) {
_local1.sort(sortByVal);
_local2 = 0;
var liLongest = 0;
var liHiVal = 0;
_local3 = 1;
while (_local3 < _local1.length) {
if (_local1[_local3 - 1].piType == _local1[_local3].piType) {
_local2++;
if (_local2 > liLongest) {
liLongest = _local2;
liHiVal = _local1[_local3].piType;
}
} else {
_local2 = 0;
}
_local3++;
}
if (liLongest == 3) {
liValue = 700 + liHiVal;
} else if ((liLongest == 2) and (liValue < 400)) {
liValue = 300 + liHiVal;
_local2 = 0;
liLongest = 0;
liHiVal2 = 0;
_local3 = 1;
while (_local3 < _local1.length) {
if ((_local1[_local3 - 1].piType == _local1[_local3].piType) and (liHiVal != _local1[_local3].piType)) {
_local2++;
if (_local2 > liLongest) {
liLongest = _local2;
liHiVal2 = _local1[_local3].piType;
}
}
_local3++;
}
if (liLongest > 0) {
liValue = (600 + liHiVal) + liHiVal2;
}
} else if ((liLongest == 1) and (liValue < 200)) {
liValue = 100 + liHiVal;
_local2 = 0;
liLongest = 0;
liHiVal2 = 0;
_local3 = 1;
while (_local3 < _local1.length) {
if ((_local1[_local3 - 1].piType == _local1[_local3].piType) and (liHiVal != _local1[_local3].piType)) {
_local2++;
if (_local2 > liLongest) {
liLongest = _local2;
liHiVal2 = _local1[_local3].piType;
}
}
_local3++;
}
if (liLongest > 0) {
liValue = (200 + liHiVal) + liHiVal2;
}
} else if (liValue < 100) {
_local1.sort(sortByVal);
liValue = _local1[_local1.length - 1].piType;
}
}
return(liValue);
}
function getKickerValue(laCards) {
var _local1 = laCards;
var liValue = 0;
var laMasterCardSet = [];
var laPrivate = [];
var i = 0;
while (i < _local1.length) {
var loCard = _local1[i];
if (loCard.mIsMarked()) {
laPrivate.push(loCard);
}
i++;
}
_local1.sort(sortByVal);
var _local2 = 0;
var liSuitCount = 0;
var liLongestSuit = 0;
var liLongest = 0;
var liHiVal = 0;
var lbAdd = false;
var laCardsUsed = [];
var laTemp = [];
if (_local1[_local1.length - 1].piType == 12) {
var loHigh = _local1[_local1.length - 1];
_local1.splice(0, 0, loHigh);
lbAdd = true;
}
var i = 1;
while (i < _local1.length) {
var liFirstType = _local1[i - 1].piType;
if (liFirstType == 12) {
liFirstType = -1;
}
if (liFirstType == (_local1[i].piType - 1)) {
_local2++;
if (laTemp.length == 0) {
laTemp.push(_local1[i - 1]);
}
laTemp.push(_local1[i]);
if (_local2 > liLongest) {
liLongest = _local2;
liHiVal = _local1[i].piType;
laCardsUsed = copyArray(laTemp);
}
if (_local1[i - 1].piSuit == _local1[i].piSuit) {
liSuitCount++;
if (liSuitCount > liLongestSuit) {
liLongestSuit = liSuitCount;
}
} else {
liSuitCount = 0;
}
} else if (liFirstType == _local1[i].piType) {
} else {
laTemp = [];
_local2 = 0;
}
i++;
}
if (liLongest > 3) {
liValue = 400 + liHiVal;
laMasterCardSet = copyArray(laCardsUsed);
}
if (lbAdd) {
_local1.splice(0, 1);
}
if ((liLongest > 3) and (liLongestSuit > 3)) {
liValue = 800 + liHiVal;
}
if (liValue < 700) {
_local1.sort(sortBySuit);
_local2 = 0;
var liLongest = 0;
var liHiVal = 0;
var laCardsUsed = [];
var laTemp = [];
var i = 1;
while (i < _local1.length) {
if (_local1[i - 1].piSuit == _local1[i].piSuit) {
_local2++;
if (laTemp.length == 0) {
laTemp.push(_local1[i - 1]);
}
laTemp.push(_local1[i]);
if (_local2 > liLongest) {
laCardsUsed = copyArray(laTemp);
liLongest = _local2;
liHiVal = _local1[i].piType;
}
} else {
laTemp = [];
_local2 = 0;
}
i++;
}
if (liLongest >= 4) {
liValue = 500 + liHiVal;
laMasterCardSet = copyArray(laCardsUsed);
}
}
if (liValue < 800) {
_local1.sort(sortByVal);
_local2 = 0;
var liLongest = 0;
var liHiVal = 0;
var laCardsUsed = [];
var laTemp = [];
var i = 1;
while (i < _local1.length) {
if (_local1[i - 1].piType == _local1[i].piType) {
_local2++;
if (laTemp.length == 0) {
laTemp.push(_local1[i - 1]);
}
laTemp.push(_local1[i]);
if (_local2 > liLongest) {
laCardsUsed = copyArray(laTemp);
liLongest = _local2;
liHiVal = _local1[i].piType;
}
} else {
laTemp = [];
_local2 = 0;
}
i++;
}
if (liLongest == 3) {
liValue = 700 + liHiVal;
laMasterCardSet = copyArray(laCardsUsed);
} else if ((liLongest == 2) and (liValue < 400)) {
liValue = 300 + liHiVal;
laMasterCardSet = copyArray(laCardsUsed);
_local2 = 0;
liLongest = 0;
liHiVal2 = 0;
var laCardsUsed = [];
var laTemp = [];
var i = 1;
while (i < _local1.length) {
if ((_local1[i - 1].piType == _local1[i].piType) and (liHiVal != _local1[i].piType)) {
_local2++;
if (laTemp.length == 0) {
laTemp.push(_local1[i - 1]);
}
laTemp.push(_local1[i]);
if (_local2 > liLongest) {
laCardsUsed = copyArray(laTemp);
liLongest = _local2;
liHiVal2 = _local1[i].piType;
}
}
i++;
}
if (liLongest > 0) {
liValue = (600 + liHiVal) + liHiVal2;
addArrays(laMasterCardSet, laCardsUsed);
}
} else if ((liLongest == 1) and (liValue < 200)) {
liValue = 100 + liHiVal;
laMasterCardSet = copyArray(laCardsUsed);
_local2 = 0;
liLongest = 0;
liHiVal2 = 0;
var laCardsUsed = [];
var laTemp = [];
var i = 1;
while (i < _local1.length) {
if ((_local1[i - 1].piType == _local1[i].piType) and (liHiVal != _local1[i].piType)) {
_local2++;
if (laTemp.length == 0) {
laTemp.push(_local1[i - 1]);
}
laTemp.push(_local1[i]);
if (_local2 > liLongest) {
laCardsUsed = copyArray(laTemp);
liLongest = _local2;
liHiVal2 = _local1[i].piType;
}
}
i++;
}
if (liLongest > 0) {
liValue = (200 + liHiVal) + liHiVal2;
addArrays(laMasterCardSet, laCardsUsed);
}
} else if (liValue < 100) {
_local1.sort(sortByVal);
liValue = _local1[_local1.length - 1].piType;
laMasterCardSet = [];
laMasterCardSet.push(_local1[_local1.length - 1]);
}
}
var laTemp = [];
var i = 0;
while (i < laMasterCardSet.length) {
var loCard = laMasterCardSet[i];
if (loCard.mIsMarked()) {
laTemp.push(loCard);
}
i++;
}
var laUnused = [];
var i = 0;
while (i < laPrivate.length) {
var liUsed = false;
var loCard = laPrivate[i];
var _local3 = 0;
while (_local3 < laTemp.length) {
if (loCard == laTemp[_local3]) {
liUsed = true;
}
_local3++;
}
if (liUsed == false) {
laUnused.push(loCard);
}
i++;
}
var liUnusedValue = 0;
laUnused.sort(sortByVal);
var i = 0;
while (i < laUnused.length) {
var loCard = laUnused[i];
liUnusedValue = liUnusedValue + loCard.piType;
i++;
}
if (laMasterCardSet.length == 5) {
liUnusedValue = 0;
} else if ((laMasterCardSet.length == 4) and (laUnused.length == 2)) {
liUnusedValue = laUnused[1];
}
if (liUnusedValue > 0) {
liUnusedValue = liUnusedValue / 100;
}
return(liUnusedValue);
}
function copyArray(laArray) {
var _local2 = laArray;
var _local3 = new Array();
var _local1 = 0;
while (_local1 < _local2.length) {
_local3.push(_local2[_local1]);
_local1++;
}
return(_local3);
}
function addArrays(laArray1, laArray2) {
var _local2 = laArray2;
var _local3 = laArray1;
var _local1 = 0;
while (_local1 < _local2.length) {
_local3.push(_local2[_local1]);
_local1++;
}
return(_local3);
}
function cCard(liNum, liSuit, liType) {
var _local1 = this;
_local1.piNum = liNum;
var _local2 = ["diamonds", "hearts", "clubs", "spades"];
_local1.piSuit = liSuit;
_local1.psSuit = _local2[_local1.piSuit];
var _local3 = ["2", "3", "4", "5", "6", "7", "8", "9", "10", "Jack", "Queen", "King", "Ace"];
_local1.piType = liType;
_local1.psType = _local3[_local1.piType];
_local1.pbMarked = false;
}
cCard.prototype.mGetCardNum = function () {
var _local1 = ((this.piSuit * 13) + this.piType) + 1;
return(_local1);
};
cCard.prototype.mGetType = function () {
return(this.piType);
};
cCard.prototype.mGetSuit = function () {
return(this.piSuit);
};
cCard.prototype.mShow = function (liCardDealt, liFace, liX, liY) {
var _local1 = this;
var _local2 = "card" + _local1.piNum;
_local1.pmClip = attachMovie("cards", _local2, liCardDealt);
_local1.pmClip.back.gotoAndStop(_root.goGame.mGetDeck());
_local1.pmClip.gotoAndStop(liFace + 1);
_local1.pmClip._x = liX;
_local1.pmClip._y = liY;
_local1.pmClip._xscale = 100;
_local1.pmClip._yscale = 100;
};
cCard.prototype.mFaceUp = function () {
this.pmClip.gotoAndStop(this.mGetCardNum() + 1);
};
cCard.prototype.mDispose = function () {
this.pmClip._x = -400;
this.pmClip.removeMovieClip();
};
cCard.prototype.mMark = function () {
this.pbMarked = true;
};
cCard.prototype.mIsMarked = function () {
return(this.pbMarked);
};
cCard.prototype.mUpdateBack = function () {
this.pmClip.back.gotoAndStop(_root.goGame.mGetDeck());
};
function cDeck() {
this.paCards = new Array();
var _local3 = 0;
var _local2 = 0;
while (_local2 < 4) {
var _local1 = 0;
while (_local1 < 13) {
_local3++;
this.paCards.push(new cCard(_local3, _local2, _local1));
_local1++;
}
_local2++;
}
this.mShuffle();
}
cDeck.prototype.mShuffle = function () {
var _local1 = this;
var laNew = new Array();
while (_local1.paCards.length > 0) {
var _local2 = int(Math.random() * _local1.paCards.length);
var _local3 = _local1.paCards[_local2];
laNew.push(_local3);
_local1.paCards.splice(_local2, 1);
}
_local1.paCards = laNew;
};
cDeck.prototype.mGetCard = function () {
var _local1 = this.paCards.pop();
return(_local1);
};
cDeck.prototype.mGetCount = function () {
return(this.paCards.length);
};
function cPlayer(lmStage, liNum, liChar) {
var _local1 = this;
var _local3 = liNum;
_local1.pmStage = lmStage;
_local1.piNum = _local3;
_local1.piChar = liChar;
var _local2 = [[195, 275], [108, 50], [316, 50], [540, 240]];
_local1.piX = _local2[_local3 - 1][0];
_local1.piY = _local2[_local3 - 1][1];
_local1.piCash = 250;
_local1.piDelay = 1500;
_local1.mClearHand();
}
cPlayer.prototype.mAddCard = function (loCard, liCardDealt) {
var _local1 = this;
var _local3 = loCard;
_local3.mMark();
_local1.paCards.push(_local3);
var liCardNum = _local3.mGetCardNum();
var _local2 = [[0, 0], [14, 0]];
var liDX = _local2[_local1.paCards.length - 1][0];
var liDY = _local2[_local1.paCards.length - 1][1];
_local3.mShow(liCardDealt, 0, _local1.piX + liDX, _local1.piY + liDY);
};
cPlayer.prototype.mClearHand = function () {
var _local1 = this;
if (_local1.piCash > 0) {
_local1.piDecision = 0;
} else {
_local1.piDecision = 1;
}
_local1.pmClip.gotoAndStop("off");
_local1.mClearBet();
_local1.mClearCards();
};
cPlayer.prototype.mUpdateBacks = function () {
var _local2 = this;
var _local1 = 0;
while (_local1 < _local2.paCards.length) {
_local2.paCards[_local1].mUpdateBack();
_local1++;
}
};
cPlayer.prototype.mClearCards = function () {
var _local3 = this;
var _local1 = 0;
while (_local1 < _local3.paCards.length) {
var _local2 = _local3.paCards[_local1];
_local2.mDispose();
_local1++;
}
_local3.paCards = [];
};
cPlayer.prototype.mReset = function () {
var _local1 = this;
var _local2 = "p" + _local1.piNum;
_local1.pmClip = _local1.pmStage[_local2];
_local1.pmClip.icon.gotoAndStop(_local1.piChar);
_local1.pmClip.psCash = "$" + _local1.piCash;
_local1.mSetStatus("");
_local1.mClearBet();
_local1.pmClip.gotoAndStop("off");
_local1.piMyBet = 0;
};
cPlayer.prototype.mAddChips = function (liAmount) {
var _local1 = this;
_local1.piCash = _local1.piCash + liAmount;
_local1.pmClip.psCash = "$" + _local1.piCash;
};
cPlayer.prototype.mStartTurn = function (liBet, liRaise) {
var _local1 = this;
if (_local1.piCash < liRaise) {
_local1.piDecision = 1;
_local1.pmStage.goGame.mNewDeck();
_local1.mDecide();
} else {
_local1.pmClip.gotoAndPlay("on");
_local1.mSetStatus("thinking...");
_local1.piBet = liBet;
_local1.piRaise = liRaise;
_local1.piStart = getTimer();
}
};
cPlayer.prototype.mUpdate = function (laFlop) {
var _local1 = this;
if ((_local1.piStart + _local1.piDelay) < getTimer()) {
_local1.mDecide();
} else {
_local1.mThink(laFlop);
}
};
cPlayer.prototype.mGetKickerVal = function (laFlop) {
var _local3 = this;
var _local2 = new Array();
var _local1 = 0;
while (_local1 < _local3.paCards.length) {
_local2.push(_local3.paCards[_local1]);
_local1++;
}
_local1 = 0;
while (_local1 < laFlop.length) {
_local2.push(laFlop[_local1]);
_local1++;
}
var liValue = getKickerValue(_local2);
return(liValue);
};
cPlayer.prototype.mThink = function (laFlop) {
var _local2 = this;
if (_local2.pbThink != true) {
var liChance = 0;
var _local3 = new Array();
var _local1 = 0;
while (_local1 < _local2.paCards.length) {
_local3.push(_local2.paCards[_local1]);
_local1++;
}
_local1 = 0;
while (_local1 < laFlop.length) {
_local3.push(laFlop[_local1]);
_local1++;
}
_local2.piValue = judge(_local3);
trace((("player " + _local2.piNum) + " score: ") + _local2.piValue);
if (_local3.length < 3) {
if (_local2.piValue < 7) {
liChance = _local2.piValue + 1;
} else {
liChance = 10;
}
} else if (_local3.length < 6) {
if (_local2.piValue < 10) {
liChance = 1;
} else if (_local2.piValue > 110) {
liChance = 10;
} else {
liChance = 5;
}
} else if (_local3.length < 7) {
if (_local2.piValue < 107) {
liChance = 1;
} else if (_local2.piValue > 200) {
liChance = 10;
} else {
liChance = 5;
}
} else if (_local2.piValue < 110) {
liChance = 1;
} else if (_local2.piValue > 300) {
liChance = 10;
} else {
liChance = 5;
}
_local2.pbThink = true;
_local2.piDecision = _local2.mNormalize(liChance);
}
};
cPlayer.prototype.mNormalize = function (liChance) {
var _local2 = liChance;
var _local1 = 0;
if (this.piBet == this.piMyBet) {
if ((_local2 > 8) or ((int(Math.random() * 10) + 1) >= 9)) {
_local1 = 3;
} else {
_local1 = 2;
}
} else if ((_local2 > 8) or ((int(Math.random() * 10) + 1) >= 8)) {
_local1 = 3;
if ((int(Math.random() * 10) + 1) >= _local2) {
_local1 = 4;
}
} else if ((int(Math.random() * 10) + 1) >= _local2) {
_local1 = 3;
} else {
_local1 = 1;
}
return(_local1);
};
cPlayer.prototype.mDecide = function (liRound) {
var _local1 = this;
if (_local1.piDecision == 1) {
_local1.mFold();
} else if (_local1.piDecision == 2) {
_local1.mCheck();
} else if (_local1.piDecision == 3) {
_local1.mCall();
} else if (_local1.piDecision == 4) {
_local1.mRaise();
}
_root.goGame.mTurnDone(_local1.piDecision, _local1.piMyBet);
_local1.pbThink = false;
_local1.pmClip.gotoAndStop("off");
};
cPlayer.prototype.mCall = function () {
var _local1 = this;
if ((_local1.piCash - _local1.piRaise) < 0) {
_local1.mFold();
} else {
if (_local1.piBet == 0) {
var _local2 = _local1.piRaise;
_local1.mSetStatus("open: $" + _local2);
} else {
var _local2 = _local1.piBet;
_local1.mSetStatus("call: $" + _local2);
}
var _local3 = _local2 - _local1.piMyBet;
_local1.mAddToBet(_local3);
}
};
cPlayer.prototype.mRaise = function () {
var _local1 = this;
if ((_local1.piCash - _local1.piRaise) < 0) {
_local1.mFold();
} else {
var _local2 = (_local1.piBet + _local1.piRaise) - _local1.piMyBet;
_local1.mAddToBet(_local2);
_local1.mSetStatus("raise to: $" + _local1.piMyBet);
}
};
cPlayer.prototype.mCheck = function () {
this.mSetBet(0);
this.mSetStatus("check");
};
cPlayer.prototype.mFold = function () {
var _local1 = this;
_local1.mClearCards();
_local1.mSetStatus("fold");
_local1.mClearBet();
};
cPlayer.prototype.mAddToBet = function (liAmount) {
var _local1 = this;
_local1.piCash = _local1.piCash - liAmount;
_local1.piMyBet = _local1.piMyBet + liAmount;
_local1.pmClip.psCash = "$" + _local1.piCash;
_local1.pmClip.psBet = "$" + _local1.piMyBet;
_local1.mSetBet(_local1.piMyBet);
};
cPlayer.prototype.mClearBet = function (liAmount) {
this.pmClip.psBet = "";
this.mSetBet(-1);
};
cPlayer.prototype.mBlindOpen = function (liAmount) {
this.mAddToBet(liAmount);
this.mSetStatus("blind open: $" + liAmount);
};
cPlayer.prototype.mBlindRaise = function (liAmount) {
this.mAddToBet(liAmount);
this.mSetStatus("blind raise: $" + liAmount);
};
cPlayer.prototype.mGetBet = function () {
var _local1 = this;
var _local2 = _local1.piMyBet;
_local1.piMyBet = 0;
_local1.mSetBet(-1);
_local1.pmClip.psBet = "";
return(_local2);
};
cPlayer.prototype.mGetDecision = function () {
return(this.piDecision);
};
cPlayer.prototype.mGetScore = function (laFlop) {
var _local2 = this;
var _local1 = 0;
if (_local2.piDecision > 1) {
_local1 = _local2.piValue + _local2.mGetKickerVal(laFlop);
}
trace((("player " + _local2.piNum) + " score: ") + _local1);
return(_local1);
};
cPlayer.prototype.mWin = function (liPot) {
var _local1 = this;
_local1.piCash = _local1.piCash + liPot;
_local1.pmClip.psCash = "$" + _local1.piCash;
_local1.pmClip.gotoAndPlay("win");
_local1.mSetStatus(_local1.mGetHandType());
trace(_local1.mGetScore());
};
cPlayer.prototype.mShowdown = function () {
var _local3 = this;
var _local1 = 0;
while (_local1 < _local3.paCards.length) {
var _local2 = _local3.paCards[_local1];
_local2.mFaceUp();
_local1++;
}
_local3.mSetStatus(_local3.mGetHandType());
};
cPlayer.prototype.mGetHandType = function () {
var _local2 = this;
var _local1 = "";
if (_local2.piValue > 799) {
_local1 = "Straight Flush";
} else if (_local2.piValue > 699) {
_local1 = "Four of a Kind";
} else if (_local2.piValue > 599) {
_local1 = "Full House";
} else if (_local2.piValue > 499) {
_local1 = "Flush";
} else if (_local2.piValue > 399) {
_local1 = "Straight";
} else if (_local2.piValue > 299) {
_local1 = "Three of a Kind";
} else if (_local2.piValue > 199) {
_local1 = "Two Pair";
} else if (_local2.piValue > 99) {
_local1 = "Pair";
} else {
_local1 = "High Card";
}
return(_local1);
};
cPlayer.prototype.mSetStatus = function (lsStatus) {
var _local1 = this;
_local1.pmClip.psStatus = lsStatus;
if (lsStatus == "") {
_local1.pmClip.dark.gotoAndStop("off");
} else {
_local1.pmClip.dark.gotoAndStop("on");
}
};
cPlayer.prototype.mSetBet = function (liBet) {
liFrame = int(liBet / 10) + 2;
if (liBet < 0) {
liFrame = 1;
}
this.pmClip.bet.gotoAndStop(liFrame);
};
cPlayer.prototype.mGetCash = function () {
return(this.piCash);
};
function cHuman(lmStage, liNum) {
var _local1 = this;
_local1.pmStage = lmStage;
_local1.piNum = liNum;
_local1.mClearHand();
_local1.piCash = 250;
_local1.piX = 507;
_local1.piY = 415;
}
cHuman.prototype.mAddCard = function (loCard, liCardDealt) {
var _local1 = this;
var _local3 = loCard;
_local3.mMark();
_local1.paCards.push(_local3);
var liCardNum = _local3.mGetCardNum();
var _local2 = [[0, 0], [0, 0], [50, 0], [45, 0], [60, 0], [75, 0]];
var liDX = _local2[_local1.paCards.length][0];
var liDY = _local2[_local1.paCards.length][1];
_local3.mShow(liCardDealt, liCardNum, _local1.piX + liDX, _local1.piY + liDY);
};
cHuman.prototype.mReset = function () {
var _local1 = this;
var _local2 = "p" + _local1.piNum;
_local1.pmClip = _local1.pmStage[_local2];
_local1.pmClip.psCash = "$" + _local1.piCash;
_local1.mSetStatus("");
_local1.mClearBet();
_local1.pmClip.gotoAndStop("off");
_local1.piMyBet = 0;
};
cHuman.prototype.mAddChips = function (liAmount) {
var _local1 = this;
_local1.piCash = _local1.piCash + liAmount;
_local1.pmClip.psCash = "$" + _local1.piCash;
};
cHuman.prototype.mGetChips = function () {
return(this.piCash);
};
cHuman.prototype.mClearHand = function () {
var _local1 = this;
_local1.piDecision = 0;
_local1.pmClip.gotoAndStop("off");
_local1.mClearCards();
_local1.mSetStatus("");
};
cHuman.prototype.mUpdateBacks = function () {
var _local2 = this;
var _local1 = 0;
while (_local1 < _local2.paCards.length) {
_local2.paCards[_local1].mUpdateBack();
_local1++;
}
};
cHuman.prototype.mClearCards = function () {
var _local3 = this;
var _local1 = 0;
while (_local1 < _local3.paCards.length) {
var _local2 = _local3.paCards[_local1];
_local2.mDispose();
_local1++;
}
_local3.paCards = [];
};
cHuman.prototype.mStartTurn = function (liBet, liRaise) {
var _local1 = this;
var _local2 = liBet;
var _local3 = liRaise;
if (_local1.piCash < _local3) {
_local1.piDecision = 1;
_local1.pmStage.goGame.mBroke();
_local1.mFold();
} else {
if (_local2 == _local1.piMyBet) {
_local1.pmStage.gotoAndStop("d1");
} else {
_local1.pmStage.gotoAndStop("d2");
}
_local1.pmClip.gotoAndPlay("on");
_local1.mSetStatus("thinking...");
_local1.piBet = _local2;
_local1.piRaise = _local3;
_local1.piStart = getTimer();
if (_local2 == 0) {
_local2 = _local3;
}
_local2 = _local2 - _local1.piMyBet;
_local1.pmStage.psBetAmount = "$" + _local2;
_local1.pmStage.psRaiseAmount = "$" + (_local2 + _local3);
}
};
cHuman.prototype.mUpdate = function (laFlop) {
this.mThink(laFlop);
};
cHuman.prototype.mGetKickerVal = function (laFlop) {
var _local3 = this;
var _local2 = new Array();
var _local1 = 0;
while (_local1 < _local3.paCards.length) {
_local2.push(_local3.paCards[_local1]);
_local1++;
}
_local1 = 0;
while (_local1 < laFlop.length) {
_local2.push(laFlop[_local1]);
_local1++;
}
var liValue = getKickerValue(_local2);
return(liValue);
};
cHuman.prototype.mThink = function (laFlop) {
var _local2 = this;
if (_local2.pbThink != true) {
var liChance = 0;
var _local3 = new Array();
var _local1 = 0;
while (_local1 < _local2.paCards.length) {
_local3.push(_local2.paCards[_local1]);
_local1++;
}
_local1 = 0;
while (_local1 < laFlop.length) {
_local3.push(laFlop[_local1]);
_local1++;
}
_local2.piValue = judge(_local3);
trace((("player " + _local2.piNum) + " score: ") + _local2.piValue);
_local2.pbThink = true;
}
};
cHuman.prototype.mDecide = function (liRound) {
};
cHuman.prototype.mCall = function () {
var _local1 = this;
if (_local1.piBet == 0) {
var _local2 = _local1.piRaise;
_local1.mSetStatus("open: $" + _local2);
} else {
var _local2 = _local1.piBet;
_local1.mSetStatus("call: $" + _local2);
}
var _local3 = _local2 - _local1.piMyBet;
_local1.mAddToBet(_local3);
_local1.pbThink = false;
_local1.piDecision = 3;
_root.goGame.mTurnDone(3, _local1.piMyBet);
_local1.pmClip.gotoAndStop("off");
_local1.pmStage.gotoAndStop("main");
};
cHuman.prototype.mRaise = function () {
var _local1 = this;
var _local2 = (_local1.piBet + _local1.piRaise) - _local1.piMyBet;
_local1.mAddToBet(_local2);
_local1.mSetStatus("raise to: $" + _local1.piMyBet);
_local1.pbThink = false;
_local1.piDecision = 4;
_root.goGame.mTurnDone(4, _local1.piMyBet);
_local1.pmClip.gotoAndStop("off");
_local1.pmStage.gotoAndStop("main");
};
cHuman.prototype.mCheck = function () {
var _local1 = this;
_local1.mSetStatus("check");
_local1.pbThink = false;
_local1.piDecision = 2;
_root.goGame.mTurnDone(2, 0);
_local1.mSetBet(0);
_local1.pmClip.gotoAndStop("off");
_local1.pmStage.gotoAndStop("main");
};
cHuman.prototype.mFold = function () {
var _local1 = this;
_local1.mClearHand();
_local1.mSetStatus("fold");
_local1.mClearBet();
_local1.pbThink = false;
_local1.piDecision = 1;
_root.goGame.mTurnDone(1, 0);
_local1.pmClip.gotoAndStop("off");
_local1.pmStage.gotoAndStop("main");
};
cHuman.prototype.mAddToBet = function (liAmount) {
var _local1 = this;
_local1.piCash = _local1.piCash - liAmount;
_local1.piMyBet = _local1.piMyBet + liAmount;
trace("mAddToBet: " + _local1.piMyBet);
_local1.mSetBet(_local1.piMyBet);
_local1.pmClip.psCash = "$" + _local1.piCash;
_local1.pmClip.psBet = "$" + _local1.piMyBet;
};
cHuman.prototype.mClearBet = function (liAmount) {
this.pmClip.psBet = "";
};
cHuman.prototype.mBlindOpen = function (liAmount) {
var _local1 = liAmount;
trace("Blind Open: " + _local1);
this.mAddToBet(_local1);
this.mSetStatus("blind open: $" + _local1);
};
cHuman.prototype.mBlindRaise = function (liAmount) {
this.prototype.mAddToBet(liAmount);
this.mSetStatus("blind raise: $" + liAmount);
};
cHuman.prototype.mGetBet = function () {
var _local1 = this;
var _local2 = _local1.piMyBet;
_local1.piMyBet = 0;
_local1.mSetBet(-1);
_local1.pmClip.psBet = "";
return(_local2);
};
cHuman.prototype.mGetDecision = function () {
return(this.piDecision);
};
cHuman.prototype.mGetScore = function (laFlop) {
var _local2 = this;
var _local1 = 0;
if (_local2.piDecision > 1) {
_local1 = _local2.piValue + _local2.mGetKickerVal(laFlop);
}
trace((("human " + _local2.piNum) + " score: ") + _local1);
return(_local1);
};
cHuman.prototype.mWin = function (liPot) {
var _local1 = this;
_local1.piCash = _local1.piCash + liPot;
_local1.pmClip.psCash = "$" + _local1.piCash;
_local1.pmClip.gotoAndPlay("win");
_local1.mSetStatus(_local1.mGetHandType());
trace(_local1.mGetScore());
};
cHuman.prototype.mShowdown = function () {
var _local3 = this;
var _local1 = 0;
while (_local1 < _local3.paCards.length) {
var _local2 = _local3.paCards[_local1];
_local2.mFaceUp();
_local1++;
}
_local3.mSetStatus(_local3.mGetHandType());
};
cHuman.prototype.mGetHandType = function () {
var _local2 = this;
var _local1 = "";
if (_local2.piValue > 799) {
_local1 = "Straight Flush";
} else if (_local2.piValue > 699) {
_local1 = "Four of a Kind";
} else if (_local2.piValue > 599) {
_local1 = "Full House";
} else if (_local2.piValue > 499) {
_local1 = "Flush";
} else if (_local2.piValue > 399) {
_local1 = "Straight";
} else if (_local2.piValue > 299) {
_local1 = "Three of a Kind";
} else if (_local2.piValue > 199) {
_local1 = "Two Pair";
} else if (_local2.piValue > 99) {
_local1 = "Pair";
} else {
_local1 = "High Card";
}
return(_local1);
};
cHuman.prototype.mSetStatus = function (lsStatus) {
var _local1 = this;
_local1.pmClip.psStatus = lsStatus;
if (lsStatus == "") {
_local1.pmClip.dark.gotoAndStop("off");
} else {
_local1.pmClip.dark.gotoAndStop("on");
}
};
cHuman.prototype.mSetBet = function (liBet) {
var _local1 = liBet;
trace("Bet: " + _local1);
liFrame = int(_local1 / 10) + 2;
if (_local1 < 0) {
liFrame = 1;
}
this.pmClip.bet.gotoAndStop(liFrame);
};
cHuman.prototype.mGetCash = function () {
return(this.piCash);
};
function cSound(lmStage) {
var _local1 = this;
_local1.pmStage = lmStage;
_local1.pbSound = true;
_local1.poSound1 = new Sound(_local1.pmStage.audio1);
_local1.poSound2 = new Sound(_local1.pmStage.audio2);
_local1.poSound1.attachSound("crowdNoise");
_local1.poSound2.attachSound("hickRock");
_local1.poSound1.setVolume(50);
_local1.poSound2.setVolume(50);
_local1.poSound1.start(0, 10000);
_local1.poSound2.start(0, 10000);
}
cSound.prototype.mSoundOn = function () {
var _local1 = this;
if (_local1.pbSound == false) {
_local1.pbSound = true;
_local1.poSound1.start(0, 10000);
_local1.poSound2.start(0, 10000);
}
};
cSound.prototype.mSoundOff = function () {
var _local1 = this;
if (_local1.pbSound) {
_local1.pbSound = false;
_local1.poSound1.stop();
_local1.poSound2.stop();
}
};
function cGame(lmClip) {
var _local1 = this;
var _local3 = lmClip;
var _local2 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
_local1.pmStage = _local3;
_local1.paPlayers = new Array();
_local1.paPlayers.push(new cHuman(_local3, 0));
var liRnd = int(Math.random() * _local2.length);
var liCharacter = _local2[liRnd];
_local1.paPlayers.push(new cPlayer(_local3, 1, 1));
_local1.mClearPot();
_local1.piState = 0;
_local1.piDealer = 0;
_local1.piTurn = 0;
_local1.piDeck = 1;
_local1.pbNewDeck = false;
_local1.pbBroke = false;
}
cGame.prototype.mClearPot = function () {
var _local1 = this;
_local1.pmPot = _local1.pmStage.pot;
_local1.piPot = 0;
_local1.pmPot.psPot = "Pot: $" + _local1.piPot;
};
cGame.prototype.mClearFlop = function () {
var _local3 = this;
var _local1 = 0;
while (_local1 < _local3.paFlop.length) {
var _local2 = _local3.paFlop[_local1];
_local2.mDispose();
_local1++;
}
_local3.paFlop = [];
};
cGame.prototype.mAddChips = function () {
this.paPlayers[0].mAddChips(250);
this.pmStage.gotoAndPlay("deal");
};
cGame.prototype.mResetDaisy = function () {
var _local1 = this;
_local1.pmStage.gotoAndPlay("deal");
_local1.paPlayers[1].mAddChips(250);
var _local2 = "Daisy" + _local1.piDeck;
_local1.pmStage.daisy.gotoAndPlay(_local2);
_local1.paPlayers[0].mUpdateBacks();
_local1.paPlayers[1].mUpdateBacks();
};
cGame.prototype.mQuit = function () {
var _local2 = this;
var _local1 = _local2.paPlayers[0].mGetChips() - 250;
_local2.pmStage.psWinnings = "$" + _local1;
if (_local1 > 0) {
_local2.pmStage.gotoAndPlay("congrats");
} else {
_local2.pmStage.gotoAndPlay("bye");
}
};
cGame.prototype.mNewHand = function () {
var _local1 = this;
var _local2 = 0;
while (_local2 < _local1.paPlayers.length) {
var _local3 = _local1.paPlayers[_local2];
_local3.mClearHand();
_local2++;
}
_local1.mClearFlop();
_local1.mClearPot();
if (_local1.pbNewDeck or (_local1.paPlayers[1].mGetCash() < 20)) {
_local1.pbNewDeck = false;
_local1.piState = 0;
if (_local1.piDeck < 3) {
_local1.piDeck++;
_local1.pmStage.daisy.play();
_local1.pmStage.gotoAndPlay("decks");
} else {
var liWinnings = (_local1.paPlayers[0].mGetChips() - 250);
_local1.pmStage.psWinnings = "$" + liWinnings;
_local1.pmStage.gotoAndPlay("congrats");
}
} else if (_local1.pbBroke or (_local1.paPlayers[0].mGetCash() < 20)) {
_local1.pbBroke = false;
_local1.piState = 0;
_local1.pmStage.gotoAndPlay("broke");
} else {
_local1.piState = 6;
_local1.piDealer++;
if (_local1.piDealer > (_local1.paPlayers.length - 1)) {
_local1.piDealer = 0;
}
_local1.piStartTime = getTimer();
_local1.piNextState = 9;
}
};
cGame.prototype.mReset = function () {
var _local3 = this;
var _local1 = 0;
while (_local1 < _local3.paPlayers.length) {
var _local2 = _local3.paPlayers[_local1];
_local2.mClearHand();
_local1++;
}
_local3.mClearFlop();
_local3.mClearPot();
_local3.pmStage.gotoAndPlay("title");
};
cGame.prototype.mAddToPot = function (liAmount) {
var _local1 = this;
_local1.piPot = _local1.piPot + liAmount;
_local1.pmPot.psPot = "Pot: $" + _local1.piPot;
};
cGame.prototype.mDeal = function () {
var _local2 = this;
_local2.mClearPot();
_local2.mClearFlop();
_local2.piCardsDealt = 0;
_local2.poDeck = new cDeck();
_local2.piCount = 0;
_local2.piCount2 = 0;
_local2.piCardsDealt = 0;
_local2.piState = 1;
var _local1 = 0;
while (_local1 < _local2.paPlayers.length) {
_local2.paPlayers[_local1].mReset();
_local1++;
}
_local2.piCount = _local2.piDealer + 1;
if (_local2.piCount == _local2.paPlayers.length) {
_local2.piCount = 0;
}
};
cGame.prototype.mUpdate = function () {
var _local1 = this;
if (_local1.piState == 0) {
} else if (_local1.piState == 1) {
if (_local1.piCount2 < 2) {
_local1.pmStage.dealer.gotoAndStop(_local1.piDealer + 2);
if ((_local1.piCount < _local1.paPlayers.length) and (_local1.piCount != _local1.piDealer)) {
var loCard = _local1.poDeck.mGetCard();
_local1.paPlayers[_local1.piCount].mAddCard(loCard, _local1.piCardsDealt);
_local1.mPlaySound("deal");
_local1.piCardsDealt++;
_local1.piCount++;
} else if ((_local1.piCount == _local1.paPlayers.length) and (_local1.piCount != _local1.piDealer)) {
_local1.piCount = 0;
} else {
var loCard = _local1.poDeck.mGetCard();
_local1.paPlayers[_local1.piCount].mAddCard(loCard, _local1.piCardsDealt);
_local1.mPlaySound("deal");
_local1.piCardsDealt++;
_local1.piCount = _local1.piDealer + 1;
if (_local1.piCount == _local1.paPlayers.length) {
_local1.piCount = 0;
}
_local1.piCount2++;
}
} else {
_local1.piState = 2;
}
} else if (_local1.piState == 2) {
_local1.pmStage.dealer.gotoAndStop(_local1.piDealer + 2);
_local1.piRound = 1;
_local1.piTurn = _local1.piDealer + 1;
if (_local1.piTurn >= _local1.paPlayers.length) {
_local1.piTurn = 0;
}
_local1.poCurrentPlayer = _local1.paPlayers[_local1.piTurn];
_local1.piBet = 20;
_local1.piCall = 20;
_local1.poCurrentPlayer.mBlindOpen(10);
_local1.piLastPlayer = _local1.piTurn;
_local1.piTurn++;
if (_local1.piTurn >= _local1.paPlayers.length) {
_local1.piTurn = 0;
}
_local1.poCurrentPlayer = _local1.paPlayers[_local1.piTurn];
_local1.piStartTime = getTimer();
_local1.piNextState = 3;
_local1.piState = 6;
} else if (_local1.piState == 3) {
_local1.poCurrentPlayer = _local1.paPlayers[_local1.piTurn];
if (_local1.poCurrentPlayer.mGetDecision() != 1) {
_local1.piState = 4;
_local1.poCurrentPlayer.mStartTurn(_local1.piBet, _local1.piCall);
} else {
_local1.piTurn++;
if (_local1.piTurn > (_local1.paPlayers.length - 1)) {
_local1.piTurn = 0;
}
}
} else if (_local1.piState == 4) {
_local1.poCurrentPlayer.mUpdate(_local1.paFlop);
} else if (_local1.piState == 5) {
_local1.piStartTime = getTimer();
_local1.piState = 6;
var liStillIn = 0;
var _local3 = 0;
while (_local3 < _local1.paPlayers.length) {
var loPlayer = _local1.paPlayers[_local3];
var liBet = loPlayer.mGetBet();
if (loPlayer.mGetDecision() > 1) {
liStillIn++;
}
_local1.mAddToPot(liBet);
_local3++;
}
if ((_local1.piRound < 4) and (liStillIn > 1)) {
_local1.piRound++;
_local1.mFlop(_local1.piRound);
_local1.piTurn = _local1.mFindNextActive(_local1.piDealer);
_local1.piLastPlayer = _local1.mFindPrevActive(_local1.piTurn);
_local1.piBet = 0;
_local1.piNextState = 3;
} else {
_local1.piState = 7;
}
} else if (_local1.piState == 6) {
if ((_local1.piStartTime + 1000) < getTimer()) {
_local1.piState = _local1.piNextState;
}
} else if (_local1.piState == 7) {
var liStillIn = 0;
var _local2 = new Array();
var _local3 = 0;
while (_local3 < _local1.paPlayers.length) {
var loPlayer = _local1.paPlayers[_local3];
_local2.push(loPlayer);
if (loPlayer.mGetDecision() != 1) {
var loWinner = loPlayer;
liStillIn++;
}
_local3++;
}
if (liStillIn > 1) {
_local2.sort(sortByScore);
if (_local2[0].mGetScore(_local1.paFlop) == _local2[1].mGetScore(_local1.paFlop)) {
var liScore = _local2[0].mGetScore(_local1.paFlop);
trace("Kicker: " + liKicker);
var liTie = 0;
_local3 = 0;
while (_local3 < _local2.length) {
if ((_local2[_local3].mGetScore(_local1.paFlop) == liScore) and (_local2[_local3].mGetDecision() != 1)) {
liTie++;
}
_local3++;
}
trace("Tied: " + liTie);
var liSplit = int(_local1.piPot / liTie);
_local3 = 0;
while (_local3 < _local2.length) {
if ((_local2[_local3].mGetScore(_local1.paFlop) == liScore) and (_local2[_local3].mGetDecision() != 1)) {
_local2[_local3].mWin(liSplit);
}
_local3++;
}
} else {
var loPlayer = _local2[0];
loPlayer.mWin(_local1.piPot);
}
_local3 = 0;
while (_local3 < _local1.paPlayers.length) {
var loPlayer = _local1.paPlayers[_local3];
if (loPlayer.mGetDecision() > 1) {
loPlayer.mShowdown();
}
_local3++;
}
} else {
loWinner.mWin(_local1.piPot);
}
_local1.piPot = 0;
trace("game over");
_local1.piState = 8;
gotoAndPlay ("d4");
} else if (_local1.piState == 8) {
} else if (_local1.piState == 9) {
_local1.piState = 0;
_local1.pmStage.gotoAndPlay("deal");
}
};
cGame.prototype.mTurnDone = function (liDecision, liBet) {
var _local1 = this;
var _local2 = liDecision;
var _local3 = liBet;
if (_local3 > _local1.piBet) {
_local1.piLastPlayer = _local1.mFindPrevActive(_local1.piTurn);
}
if (_local2 == 3) {
_local1.mPlaySound("chips1");
} else if (_local2 == 4) {
_local1.mPlaySound("chips2");
}
if (_local2 > 2) {
_local1.piBet = _local3;
}
if (_local1.piTurn != _local1.piLastPlayer) {
_local1.piTurn++;
if (_local1.piTurn > (_local1.paPlayers.length - 1)) {
_local1.piTurn = 0;
}
_local1.piState = 3;
} else if (_local1.piTurn == _local1.piLastPlayer) {
_local1.piState = 5;
}
if (_local1.piBet < _local3) {
_local1.piBet = _local3;
}
if (_local2 == 1) {
_local1.piState = 5;
}
};
cGame.prototype.mFlop = function (liRound) {
var _local2 = this;
var liStartX = 305;
var _local3 = 277;
var liSpace = 50;
if (liRound == 2) {
var _local1 = 0;
while (_local1 < 3) {
var loCard = _local2.poDeck.mGetCard();
_local2.paFlop.push(loCard);
var liDealt = (52 - _local2.poDeck.mGetCount());
var liFace = loCard.mGetCardNum();
loCard.mShow(liDealt, liFace, liStartX + (_local1 * liSpace), _local3);
_local2.mPlaySound("deal");
_local1++;
}
} else {
var loCard = _local2.poDeck.mGetCard();
_local2.paFlop.push(loCard);
var liDealt = (52 - _local2.poDeck.mGetCount());
var liFace = loCard.mGetCardNum();
loCard.mShow(liDealt, liFace, liStartX + ((_local2.paFlop.length - 1) * liSpace), _local3);
_local2.mPlaySound("deal");
}
};
cGame.prototype.mFindNextActive = function (liStart) {
var _local3 = -1;
var _local1 = liStart;
while (_local3 == -1) {
_local1++;
if (_local1 > (this.paPlayers.length - 1)) {
_local1 = 0;
}
var _local2 = this.paPlayers[_local1];
if (_local2.mGetDecision() != 1) {
_local3 = _local1;
}
}
return(_local3);
};
cGame.prototype.mFindPrevActive = function (liStart) {
var _local3 = -1;
var _local1 = liStart;
while (_local3 == -1) {
_local1--;
if (_local1 < 0) {
_local1 = this.paPlayers.length - 1;
}
var _local2 = this.paPlayers[_local1];
if (_local2.mGetDecision() != 1) {
_local3 = _local1;
}
}
return(_local3);
};
cGame.prototype.mShowRankings = function () {
var _local1 = this;
_local1.piPausedState = _local1.piState;
_local1.piPausedFrame = _local1.pmStage._currentframe;
_local1.piState = 0;
_local1.pmStage.gotoAndPlay("ranks");
};
cGame.prototype.mShowInst = function () {
var _local1 = this;
_local1.piPausedState = _local1.piState;
_local1.piPausedFrame = _local1.pmStage._currentframe;
_local1.piState = 0;
_local1.pmStage.gotoAndPlay("inst2");
};
cGame.prototype.mBroke = function () {
this.pbBroke = true;
};
cGame.prototype.mNewDeck = function () {
this.pbNewDeck = true;
};
cGame.prototype.mCashOut = function () {
var _local1 = this;
_local1.piPausedState = _local1.piState;
_local1.piPausedFrame = _local1.pmStage._currentframe;
_local1.piState = 0;
_local1.pmStage.gotoAndPlay("quit");
};
cGame.prototype.mGetDeck = function () {
return(this.piDeck);
};
cGame.prototype.mResume = function () {
var _local1 = this;
_local1.piState = _local1.piPausedState;
_local1.pmStage.gotoAndStop(_local1.piPausedFrame);
};
cGame.prototype.mPlaySound = function (lsSound) {
loSound = new Sound();
loSound.attachSound(lsSound);
loSound.start();
};
Instance of Symbol 130 MovieClip [Cards] in Frame 1
onClipEvent (enterFrame) {
_root.goGame.mUpdate();
}
Instance of Symbol 139 MovieClip in Frame 1
onClipEvent (load) {
_parent.stop();
}
onClipEvent (enterFrame) {
if (_parent._framesloaded < _parent._totalframes) {
var liFrame = int((_parent._framesloaded / _parent._totalframes) * 100);
this.gotoAndStop(liFrame + 1);
} else {
this.gotoAndStop(101);
_parent.play();
}
}
Frame 4
goSound = new cSound(_root);
Frame 6
stop();
Frame 10
stop();
Frame 11
stop();
Frame 16
Selection.setFocus("name");
stop();
Frame 20
goGame = new cGame(_root);
Frame 27
stop();
Frame 43
goGame.mDeal();
Frame 45
stop();
Frame 51
stop();
Frame 55
stop();
Frame 59
stop();
Frame 65
stop();
Frame 68
_root.inst.swapDepths(1000);
Frame 69
stop();
Frame 72
_root.ranks.swapDepths(1000);
Frame 73
stop();
Frame 77
_root.broke.swapDepths(1000);
Frame 78
stop();
Frame 79
_root.broke.removeMovieClip();
if (pbQuit) {
_root.goGame.mQuit();
} else {
_root.goGame.mAddChips();
_root.goGame.mNewHand();
}
Frame 82
_root.quit.swapDepths(1000);
Frame 83
stop();
Frame 84
_root.quit.removeMovieClip();
if (pbQuit) {
_root.goGame.mQuit();
} else {
goGame.mResume();
}
Frame 87
_root.congrats.swapDepths(1000);
Frame 111
_root.congrats.removeMovieClip();
Frame 112
goGame.mReset();
Frame 114
_root.thanks.swapDepths(1000);
Frame 139
_root.thanks.removeMovieClip();
Frame 140
goGame.mReset();
Frame 142
stop();
Symbol 11 MovieClip Frame 1
stop();
Symbol 14 Button
on (rollOver, press, dragOver, keyPress "<Down>") {
tellTarget ("krick") {
nextFrame();
};
gotoAndStop ("2");
}
Symbol 15 Button
on (rollOver, press, dragOver, keyPress "<Up>") {
tellTarget ("krick") {
prevFrame();
};
gotoAndStop ("2b");
}
Symbol 16 Button
on (rollOver, press, dragOver, keyPress "<Down>") {
tellTarget ("krick") {
nextFrame();
};
gotoAndStop ("1");
}
Symbol 17 Button
on (rollOver, press, dragOver, keyPress "<Up>") {
tellTarget ("krick") {
prevFrame();
};
gotoAndStop ("1b");
}
Symbol 18 MovieClip [rules_clip] Frame 1
stop();
Symbol 25 MovieClip Frame 1
stop();
Symbol 25 MovieClip Frame 2
stop();
Symbol 25 MovieClip Frame 3
stop();
Symbol 130 MovieClip [Cards] Frame 1
stop();
Symbol 139 MovieClip Frame 1
stop();
Symbol 145 Button
on (release) {
goSound.mSoundOn();
}
Symbol 148 Button
on (release) {
goSound.mSoundOff();
}
Symbol 156 MovieClip Frame 5
stop();
Symbol 158 Button
on (release) {
gotoAndPlay ("inst");
}
Symbol 162 MovieClip Frame 5
stop();
Symbol 163 Button
on (release) {
gotoAndPlay ("name");
}
Symbol 165 Button
on (release) {
gotoAndPlay ("title");
}
Symbol 184 Button
on (release) {
gotoAndPlay ("start");
}
on (keyPress "<Enter>") {
gotoAndPlay ("start");
}
Symbol 196 Button
on (release) {
gotoAndPlay ("showtable");
}
Symbol 217 MovieClip Frame 13
stop();
Symbol 217 MovieClip Frame 19
stop();
Symbol 217 MovieClip Frame 33
stop();
Symbol 217 MovieClip Frame 39
stop();
Symbol 217 MovieClip Frame 53
stop();
Symbol 217 MovieClip Frame 59
stop();
Symbol 218 MovieClip Frame 1
stop();
Symbol 218 MovieClip Frame 5
stop();
Symbol 238 MovieClip Frame 1
stop();
Symbol 254 Button
on (release) {
_parent.goGame.mNewHand();
}
Symbol 258 MovieClip Frame 2
stop();
Symbol 258 MovieClip Frame 6
stop();
Symbol 258 MovieClip Frame 11
stop();
Symbol 267 MovieClip Frame 2
stop();
Symbol 267 MovieClip Frame 6
stop();
Symbol 267 MovieClip Frame 11
stop();
Symbol 270 MovieClip Frame 1
stop();
Symbol 274 Button
on (release) {
goGame.mCashOut();
}
Symbol 277 Button
on (release) {
goGame.mShowRankings();
}
Symbol 280 Button
on (release) {
goGame.mShowInst();
}
Symbol 293 Button
on (release) {
goGame.poCurrentPlayer.mCheck();
}
Symbol 295 Button
on (release) {
goGame.poCurrentPlayer.mCall();
}
Symbol 297 Button
on (release) {
goGame.poCurrentPlayer.mFold();
}
Symbol 301 Button
on (release) {
goGame.poCurrentPlayer.mCheck();
}
Symbol 304 Button
on (release) {
goGame.poCurrentPlayer.mFold();
}
Symbol 307 Button
on (release) {
goGame.poCurrentPlayer.mCall();
}
Symbol 309 Button
on (release) {
goGame.poCurrentPlayer.mCall();
}
Symbol 311 Button
on (release) {
goGame.poCurrentPlayer.mRaise();
}
Symbol 312 Button
on (release) {
goGame.poCurrentPlayer.mCall();
}
Symbol 314 Button
on (release) {
goGame.poCurrentPlayer.mRaise();
}
Symbol 318 Button
on (release) {
_root.inst.removeMovieClip();
goGame.mResume();
}
Symbol 319 Button
on (release) {
_root.ranks.removeMovieClip();
goGame.mResume();
}
Symbol 329 Button
on (release) {
_parent.pbQuit = true;
_parent.play();
}
Symbol 335 Button
on (release) {
_parent.pbQuit = false;
_parent.play();
}
Symbol 344 Button
on (release) {
_parent.pbQuit = true;
_parent.play();
}
Symbol 351 Button
on (release) {
_parent.pbQuit = false;
_parent.play();
}
Symbol 368 Button
on (release) {
_root.goGame.mResetDaisy();
_root.goGame.mNewHand();
}
Symbol 375 MovieClip Frame 1
var liDeck = _parent.goGame.mGetDeck();
var lsWhere = ("Deck" + liDeck);
trace("Where: " + lsWhere);
this.gotoAndPlay(lsWhere);
Symbol 375 MovieClip Frame 31
stop();
Symbol 375 MovieClip Frame 61
stop();