Frame 1
System.security.allowDomain("dev.looneytunes.warnerbros.com");
System.security.allowDomain("preview.looneytunes.warnerbros.com");
System.security.allowDomain("looneytunes.warnerbros.com");
System.security.allowDomain("looneytunes2.warnerbros.com");
System.security.allowDomain("pdl.warnerbros.com");
System.security.allowDomain("*.warnerbros.com");
Object.prototype.gameMC = this;
Object.prototype.containerMC = _parent;
if (containerMC != null) {
containerMC.init();
_root.gDebug = "InContainer\n";
}
gameMC.gLoadInit = false;
gameMC.gGameState = "INIT";
gameMC.gLoadStartTime = 0;
gameMC.gVersionNum = "1.0";
gameMC.gPaused = false;
gameMC.gInitGame = null;
gameMC.min_score = -1;
trace("GameParent: " + _parent);
if (gameMC.gGameID eq "") {
gameMC.gGameID = "lt_Marvin_Solitaire";
}
if (gameMC.gHSRoot_swf eq "") {
gameMC.gHSRoot_swf = "/games/med/";
}
if (gameMC.gHSRoot_jsp eq "") {
gameMC.gHSRoot_jsp = "/web/load_variables/games/";
}
if (gameMC.gHSRoot_top100 eq "") {
gameMC.gHSRoot_top100 = "/web/games/";
}
function getScore() {
return(gameMC.gScore);
}
function showDebugWindow() {
gameMC.debug_clip.showDebug();
}
function hideDebugWindow() {
gameMC.debug_clip.hideDebug();
}
function pause() {
gameMC.gPaused = true;
}
function unPause() {
gameMC.gPaused = false;
}
function restart() {
containerMC.resetContainer();
containerMC.init();
gameMC.gScore = 0;
gameMC.gLevel = 1;
}
gameMC.HSLoading = function () {
if (gameMC.gLoadInit != true) {
gameMC.gGameState = "LOADING";
gameMC.gLoadStartTime = int(getTimer() / 1000);
gameMC.gLoadInit = true;
}
};
gameMC.HSLoaded = function () {
tellTarget (gameMC.hs_scripts) {
call("mLoaded");
};
};
gameMC.HSPlay = function () {
tellTarget (gameMC.hs_scripts) {
call("mPlay");
};
};
gameMC.HSLevelStart = function () {
tellTarget (gameMC.hs_scripts) {
call("mLevelStart");
};
};
gameMC.HSGameOver = function () {
gameMC.gScore = Number(_root.gScore);
gameMC.gLevel = Number(_root.gLevel);
gameMC.attachMovie("hs_placeholder", "hs_placeholder", 10000);
if (containerMC != null) {
containerMC.hs_placeholder._x = 125;
containerMC.hs_placeholder._y = 60;
} else {
gameMC.hs_placeholder._x = 125;
gameMC.hs_placeholder._y = 60;
}
tellTarget (gameMC.hs_scripts) {
call("mGameOver");
};
};
function cTimer() {
this.startTime = getTimer();
}
cTimer.prototype.restartTimer = function () {
this.startTime = getTimer();
};
cTimer.prototype.milliseconds = function () {
return(getTimer() - this.startTime);
};
cTimer.prototype.seconds = function () {
return(this.getSeconds());
};
cTimer.prototype.getSeconds = function () {
return(int((getTimer() - this.startTime) / 1000));
};
gameMC.iReadyScreenTimer = new cTimer();
gameMC.iLevelPauseTimer = new cTimer();
gameMC.btn_handler_next_screen = function () {
gameMC.play();
};
gameMC.btn_handler_play = function () {
gameMC.gotoAndPlay("NextLevel");
};
gameMC.btn_handler_gameover = function () {
gameMC.gotoAndPlay("GameOver");
};
gameMC.btn_handler_restart = function () {
gameMC.gotoAndPlay(1);
};
Frame 5
ifFrameLoaded (76) {
if (gameMC.gLoadHSScripts == true) {
_root.gDebug = _root.gDebug + "WaitingForScripts\n";
if (gameMC.hs_scripts.gLoaded == true) {
gameMC.gotoAndPlay("loaded");
}
} else {
gameMC.gotoAndPlay("loaded");
_root.gDebug = _root.gDebug + "gameMC.gLoadHSScripts = false \n";
}
}
gameMC.HSLoading();
gameMC.loader.percent.text = ("" + int((gameMC._framesloaded / gameMC._totalframes) * 100)) + "%";
Instance of Symbol 253 MovieClip "debug_clip" in Frame 5
onClipEvent (load) {
function showDebug() {
_visible = true;
_x = 200;
}
function hideDebug() {
_visible = false;
_x = -200;
}
function displayDebugSettings() {
var _local1 = _root;
_local1.gDebug = "Settings:\n";
_local1.gDebug = _local1.gDebug + (gameMC.gGameID + newline);
_local1.gDebug = _local1.gDebug + (gameMC.gDB_domain + newline);
_local1.gDebug = _local1.gDebug + (gameMC.gHSRoot_swf + newline);
_local1.gDebug = _local1.gDebug + (gameMC.gHSRoot_jsp + newline);
_local1.gDebug = _local1.gDebug + (gameMC.gHSRoot_top100 + newline);
}
_visible = false;
_root.gDebug = _root.gDebug + "Loaded";
if (gameMC.gDebugMode == true) {
showDebug();
}
}
Frame 7
gameMC.gotoAndPlay("loading");
Frame 11
gameMC.HSLoaded();
var CARDDECK_MOVIECLIP = "deck";
var CARDDECK_SCALE_X = 100;
var CARDDECK_SCALE_Y = 100;
var CARDDECK_CURR_DEPTH = 100;
var CARDDECK_NUMBER = "card";
var CARDDECK_SUIT = "suit";
var CARDDECK_SUITS = ["spades", "hearts", "diamonds", "clubs"];
var CARD_ANIM = {_BACK:"faceDown", _FLIP:"flipOver", _IDLE:"normal", _OVER:"highlight", _SELECTED:"selected", _NORMAL:"matchNormal", _SUIT:"matchSuit", _INVISIBLE:"invisible", _RETURN:"return"};
var CARD_FLIP = "flip";
var LINKAGE = {_GAMEBACK:"gameBkg", _HUD:"gameBkg.HUD", _WELL:"gameBkg.HUD.backer.cardStack", _WELL_OVER:"gameBkg.HUD.dealCards", _DEAL1:"gameBkg.HUD.dealPos1", _DEAL2:"gameBkg.HUD.dealPos2", _DEAL3:"gameBkg.HUD.dealPos3", _DEAL4:"gameBkg.HUD.dealPos4", _PIP1:"gameBkg.HUD.open.cp1.cp1_text", _PIP2:"gameBkg.HUD.open.cp2.cp2_text", _PIP3:"gameBkg.HUD.open.cp3.cp3_text", _PIP4:"gameBkg.HUD.open.cp4.cp4_text", _CLEAR_OUT_BONUS:"gameBkg.HUD.clearOutBonus", _CARDS_AWAY:"gameBkg.HUD.cardsAway", _SCORE:["gameBkg.HUD.hudValues.score", "gameBkg.HUD.hudValues.scoreBlack"], _LEVEL:["gameBkg.HUD.hudValues.level", "gameBkg.HUD.hudValues.levelBlack"], _LIVES:"gameBkg.HUD.open.lifeCounter.lifeLights"};
var GAME_OVER = {_LEVEL_BONUS:["gameBkg.HUD.cardClose.levelCompleteScreen.lb1", "gameBkg.HUD.cardClose.levelCompleteScreen.lb2", "gameBkg.HUD.cardClose.levelCompleteScreen.lb3"], _CLEAR_OUT:["gameBkg.HUD.cardClose.levelCompleteScreen.co1", "gameBkg.HUD.cardClose.levelCompleteScreen.co2", "gameBkg.HUD.cardClose.levelCompleteScreen.co3"], _SUIT_BONUS:["gameBkg.HUD.cardClose.levelCompleteScreen.sb1", "gameBkg.HUD.cardClose.levelCompleteScreen.sb2", "gameBkg.HUD.cardClose.levelCompleteScreen.sb3"], _SET_BONUS:["gameBkg.HUD.cardClose.levelCompleteScreen.so1", "gameBkg.HUD.cardClose.levelCompleteScreen.so2", "gameBkg.HUD.cardClose.levelCompleteScreen.so3"], _CURR_SCORE:"gameBkg.HUD.cardClose.levelCompleteScreen.lscore", _CAPTION:"gameBkg.HUD.cardClose.screenChoice"};
var OVER_STATES = {_LOSE:"fail", _WIN:"complete"};
var LIVES_LABELS = ["zero", "one", "two", "three"];
var WELL_OVER_LABELS = ["idle", "one", "two", "three", "four"];
var HUD_DEALS = new Array();
var HUD_PIPS = new Array();
var SCREEN_LEVEL_GAMEOVER = "gameOver";
var SCREEN_DEPTH = 5000;
var POINTS_LEVEL_COMPLETE = 750;
var POINTS_STABLE_BONUS = 500;
var POINTS_NORMAL_SET = 100;
var POINTS_HOUSE_SET = 250;
var NUM_HIGHLIGHTS = 2;
var TARGET_MATCH_VALUE = 13;
var WELL_DEAL_DELAY = 3;
var PLAYER_NUM_LIVES = 3;
var WELL_XLOC = 252.5;
var WELL_YLOC = 227.5;
var WELL_RADIUS = 1600;
var DECK_NUM_CARDS = 52;
var DECK_NUM_SUITS = 4;
var DECK_NUM_CARDS_PER_SUIT = (DECK_NUM_CARDS / DECK_NUM_SUITS);
var DECK_CARD_VALUE = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13];
var DECK_SHUFFLE_TIMES = 3;
var XCOORD = 0;
var YCOORD = 1;
var DEPTH = 2;
var LOC_PLAYDECK = new Array(40, 275, 600);
var LOC_DISCARDPILE = new Array(240, -100, 100);
var LOC_FILES = new Array(new Array(172.6, 312.2, 200), new Array(253.3, 312.2, 300), new Array(328.4, 312.2, 400), new Array(409.2, 312.2, 500));
var BOARD_DEPTH = 1000;
var FILE1_DEPTH = (BOARD_DEPTH + 200);
var FILE2_DEPTH = (BOARD_DEPTH + 201);
var FILE3_DEPTH = (BOARD_DEPTH + 202);
var FILE4_DEPTH = (BOARD_DEPTH + 203);
var LOC_BOARD = new Array(new Array(55.65, 65.9, BOARD_DEPTH + 0), new Array(133.65, 65.9, BOARD_DEPTH + 1), new Array(55.65, 182, BOARD_DEPTH + 2), new Array(133.65, 182, BOARD_DEPTH + 3), new Array(90.95, 122.9, BOARD_DEPTH + 100), new Array(212.25, 63.9, BOARD_DEPTH + 4), new Array(290.15, 63.9, BOARD_DEPTH + 5), new Array(212.25, 180, BOARD_DEPTH + 6), new Array(290.15, 180, BOARD_DEPTH + 7), new Array(251.05, 125, BOARD_DEPTH + 101), new Array(368.25, 63.9, BOARD_DEPTH + 8), new Array(446.15, 63.9, BOARD_DEPTH + 9), new Array(368.25, 180, BOARD_DEPTH + 10), new Array(446.15, 180, BOARD_DEPTH + 11), new Array(408.5, 123.9, BOARD_DEPTH + 102));
var TILEOFFSET_PLAYDECK = new Array(0, 0);
var TILEOFFSET_DISCARDPILE = new Array(0, 0);
var TILEOFFSET_FILES = new Array(0, 0);
var DEALER_REVEAL_PER_FRAME = 1;
var DEALER_CARDMOVE_FRAMES = 4;
var DEALER_BOARD_DEAL_DELAY = 9;
var STAGE_WIDTH = 500;
var STAGE_HEIGHT = 375;
var SND_LINKAGE = 0;
var SND_VOLUME = 1;
var SND_DEFS = {_BKGRND:["background", 100], _WELCOME:["welcome", 100], _PANEL_SWING:["panelSwing", 100], _CARD_DEAL:["cardDeal", 100], _MATCH:["match", 50], _SUIT_BONUS:["suitBonus", 100], _CLEAR_OUT:["clearOut", 50]};
function fnOnSoundComplete() {
this.m_bIsPlaying = false;
}
var SND_LOOPFOREVER = 2147483647;
var SND_CONTLAYER = 2000;
cSoundMan = function () {
var _local1 = this;
_local1.m_stageSoundProps = new Sound();
_local1.m_soundLayer = SND_CONTLAYER;
_local1.m_sound = new Array();
};
cSoundMan.prototype.m_fnCreateSound = function (linkage, volume) {
var _local3 = linkage;
var _local2 = 0;
gameMC.createEmptyMovieClip(_local3, this.m_soundLayer++);
var _local1 = new Sound(_root[_local3]);
_local1.attachSound(_local3);
_local1.setVolume(volume);
_local1.setPan(0);
_local1.m_bIsPlaying = false;
_local1.onSoundComplete = fnOnSoundComplete;
_local2 = this.m_sound.length;
this.m_sound.push(_local1);
return(_local2);
};
cSoundMan.prototype.m_fnPlayAsBkgrnd = function (idx) {
this.m_sound[idx].start(0, SND_LOOPFOREVER);
this.m_sound[idx].m_bIsPlaying = true;
};
cSoundMan.prototype.m_fnPlaySFX = function (idx, xLoc) {
var _local1 = idx;
var _local2 = this;
var _local3 = (200 * xLoc) - 100;
_local2.m_sound[_local1].setPan(_local3);
_local2.m_sound[_local1].start();
_local2.m_sound[_local1].m_bIsPlaying = true;
};
cSoundMan.prototype.m_fnPlaySFXCenter = function (idx) {
var _local1 = idx;
var _local2 = this;
_local2.m_sound[_local1].setPan(0);
_local2.m_sound[_local1].start();
_local2.m_sound[_local1].m_bIsPlaying = true;
};
cSoundMan.prototype.m_fnStopAllSounds = function () {
var _local2 = this;
var _local1 = 0;
while (_local1 < _local2.m_sound.length) {
_local2.m_sound[_local1].stop();
_local2.m_sound[idx].m_bIsPlaying = false;
_local1++;
}
};
cSoundMan.prototype.m_fnIsSoundPlaying = function (idx) {
return(this.m_sound[idx].m_bIsPlaying);
};
gameMC.g_SoundMan = new cSoundMan();
function cCard(Card, Suit, bFaceDown, bVisible, depth) {
var _local1 = this;
var _local2 = Card;
_local1.m_Card = _local2;
_local1.m_Suit = Suit;
_local1.m_value = DECK_CARD_VALUE[_local2];
var _local3 = (((("Card_" + _local2) + "_Suit_") + Suit) + "_ID_") + depth;
gameMC.attachMovie(CARDDECK_MOVIECLIP, _local3, depth);
_local1.m_clip = _root[_local3];
_local1.m_clip._xscale = CARDDECK_SCALE_X;
_local1.m_clip._yscale = CARDDECK_SCALE_Y;
_local1.m_clip._visible = bVisible;
_local1.m_clip[CARDDECK_SUIT].gotoAndStop(CARDDECK_SUITS[Suit]);
_local1.m_clip[CARDDECK_SUIT][CARDDECK_NUMBER].gotoAndStop(_local2 + 1);
}
function cDeck(depth) {
var _local1 = this;
_local1.m_xLoc = 0;
_local1.m_yLoc = 0;
_local1.m_depth = depth;
_local1.m_cards = new Array();
}
cCard.prototype.m_fnSetFaceDown = function (bFaceDown) {
};
cDeck.prototype.m_fnClear = function () {
var _local1 = this;
while (_local1.m_cards.length) {
_local1.m_cards.shift().m_clip.removeMovieClip();
}
};
cDeck.prototype.m_fnFill = function () {
var _local2 = this;
var _local1 = 0;
while (_local1 < DECK_NUM_CARDS) {
_local2.m_cards.push(new cCard(_local1 % DECK_NUM_CARDS_PER_SUIT, Math.floor(_local1 / DECK_NUM_CARDS_PER_SUIT), true, false, _local2.m_depth + _local2.m_cards.length));
_local1++;
}
};
cDeck.prototype.m_fnShuffle = function () {
var _local1 = this;
var _local2 = 0;
var _local3 = 0;
var swapper = null;
while (_local2 < (_local1.m_cards.length - 1)) {
_local3 = (random((_local1.m_cards.length - _local2) - 1) + _local2) + 1;
swapper = _local1.m_cards[_local2];
_local1.m_cards[_local2] = _local1.m_cards[_local3];
_local1.m_cards[_local3] = swapper;
_local1.m_cards[_local2].m_clip.swapDepths(_local1.m_cards[_local3].m_clip);
_local2++;
}
};
cDeck.prototype.m_fnMoveDeck = function (xLoc, yLoc, xTile, yTile) {
var _local2 = this;
var _local3 = xLoc;
_local2.m_xLoc = _local3;
_local2.m_yLoc = yLoc;
var _local1 = 0;
while (_local1 < _local2.m_cards.length) {
_local2.m_cards[_local1].m_clip._x = _local3 + (xTile * _local1);
_local2.m_cards[_local1].m_clip._y = yLoc + (yTile * _local1);
_local2.m_cards[_local1].m_clip.swapDepths(_local2.m_depth + _local1);
_local1++;
}
};
cDeck.prototype.m_fnGiveCard = function () {
return(this.m_cards.pop());
};
cDeck.prototype.m_fnTakeCard = function (card) {
if (card == null) {
return(this.m_cards.length);
}
return(this.m_cards.push(card));
};
function cBoardCard(locData, overflowDeck, overflowIndicator) {
var _local1 = this;
_local1.STATIC_IDLE = 0;
_local1.STATIC_ANIMATING = 1;
_local1.STATIC_NO_CARD = 2;
_local1.m_card = null;
_local1.m_locData = locData;
_local1.m_deck = overflowDeck;
_local1.m_deckDepthIcon = overflowIndicator;
if ((_local1.m_deck != null) && (_local1.m_deckDepthIcon != null)) {
_local1.m_deckDepthIcon.text = _local1.m_deck.m_cards.length;
}
_local1.m_state = _local1.STATIC_NO_CARD;
_local1.m_bBurried = false;
}
cBoardCard.prototype.m_fnSetVisible = function (bVisible) {
if (this.m_card) {
this.m_card.m_clip._visible = bVisible;
}
};
cBoardCard.prototype.m_fnClickable = function () {
var _local1 = this;
if (gameMC.gCanClickStuff == false) {
return(false);
}
if (_local1.m_bBurried == true) {
return(false);
}
if (_local1.m_state != _local1.STATIC_IDLE) {
return(false);
}
if (_local1.m_state == _local1.STATIC_ANIMATING) {
if ((_local1.m_card.m_clip.m_state != CARD_ANIM._IDLE) && (_local1.m_card.m_clip.m_state != CARD_ANIM._OVER)) {
return(false);
}
}
return(true);
};
cBoardCard.prototype.m_fnMouseProximity = function () {
var _local2 = gameMC._xmouse - this.m_card.m_clip._x;
var _local1 = gameMC._ymouse - this.m_card.m_clip._y;
return(((_local2 * _local2) + (_local1 * _local1)) <= 800);
};
cBoardCard.prototype.onMouseDown = function () {
};
cBoardCard.prototype.onMouseMove = function () {
var _local1 = this;
if (_local1.m_fnClickable()) {
if (_local1.m_card.m_clip.hitTest(gameMC._xmouse, gameMC._ymouse, true)) {
if (_local1.m_card.m_clip.m_state == CARD_ANIM._IDLE) {
_local1.m_fnDoAnim(CARD_ANIM._OVER);
}
} else if (_local1.m_card.m_clip.m_state == CARD_ANIM._OVER) {
_local1.m_fnDoAnim(CARD_ANIM._IDLE);
}
}
};
cBoardCard.prototype.onMouseUp = function () {
var _local1 = this;
if (_local1.m_fnClickable()) {
if (_local1.m_card.m_clip.hitTest(gameMC._xmouse, gameMC._ymouse, true)) {
fnReportCardClicked(_local1);
}
}
};
cBoardCard.prototype.m_fnTick = function () {
var _local1 = this;
switch (_local1.m_state) {
case _local1.STATIC_IDLE :
_local1.m_fnUpdateIdle();
return;
case _local1.STATIC_ANIMATING :
_local1.m_fnUpdateAnimating();
return;
case _local1.STATIC_NO_CARD :
_local1.m_fnUpdateNoCard();
}
};
cBoardCard.prototype.m_fnUpdateIdle = function () {
var _local1 = this;
if (_local1.m_card.m_clip.playing == true) {
_local1.m_state = _local1.STATIC_ANIMATING;
}
};
cBoardCard.prototype.m_fnUpdateAnimating = function () {
var _local1 = this;
if (_local1.m_card.m_clip.m_bIsPlaying == false) {
if (_local1.m_card.m_clip.m_state == CARD_ANIM._INVISIBLE) {
_local1.m_card.m_clip._visible = false;
gameMC.gDiscardPile.m_fnTakeCard(_local1.m_fnGiveCard());
gameMC.gWell.onMouseMove();
}
_local1.m_state = _local1.STATIC_IDLE;
}
};
cBoardCard.prototype.m_fnUpdateNoCard = function () {
};
cBoardCard.prototype.m_fnDoAnim = function (anim) {
var _local1 = this;
if (_local1.m_card == null) {
} else {
_local1.m_state = _local1.STATIC_ANIMATING;
_local1.m_card.m_clip.gotoAndPlay(anim);
}
};
cBoardCard.prototype.m_fnReceiveCard = function (card, move) {
var _local1 = this;
if (card == null) {
} else {
var _local2 = 1;
if ((_local1.m_card != null) && (_local1.m_deck != null)) {
_local1.m_card.m_clip._visible = false;
_local1.m_deck.m_fnTakeCard(_local1.m_card);
_local2 = _local2 + _local1.m_deck.m_cards.length;
}
Mouse.addListener(_local1);
_local1.m_card = card;
if ((move == true) && (_local1.m_locData)) {
_local1.m_card.m_clip._x = _local1.m_locData[XCOORD];
_local1.m_card.m_clip._y = _local1.m_locData[YCOORD];
_local1.m_card.m_clip.swapDepths(_local1.m_locData[DEPTH]);
}
if (_local1.m_deckDepthIcon != null) {
_local1.m_deckDepthIcon.text = _local2;
}
_local1.m_state = _local1.STATIC_IDLE;
}
};
cBoardCard.prototype.m_fnGiveCard = function () {
var _local1 = this;
if (_local1.m_card == null) {
return(null);
}
var _local3 = _local1.m_card;
var _local2 = 0;
Mouse.removeListener(_local1);
_local1.m_card = null;
_local1.m_state = STATIC_NO_CARD;
if ((_local1.m_deck != null) && (_local1.m_deck.m_cards.length > 0)) {
_local1.m_fnReceiveCard(_local1.m_deck.m_fnGiveCard(), true);
_local1.m_card.m_clip._visible = true;
_local1.m_fnDoAnim(CARD_ANIM._RETURN);
_local2 = _local1.m_deck.m_cards.length + 1;
}
if (_local1.m_deckDepthIcon != null) {
_local1.m_deckDepthIcon.text = _local2;
}
return(_local3);
};
cBoardCard.prototype.m_fnClear = function () {
var _local1 = this;
if (_local1.m_deck != null) {
_local1.m_deck.m_fnClear();
if (_local1.m_deckDepthIcon != null) {
_local1.m_deckDepthIcon.text = "0";
}
}
var _local2 = _local1.m_fnGiveCard();
if (_local2 != null) {
_local2.m_clip.removeMovieClip();
}
};
function cWell(wellLinkage, wellOverLinkage, deck) {
var _local1 = this;
_local1.STATIC_IDLE = 0;
_local1.STATIC_DEAL = 1;
_local1.STATIC_ANIM = 2;
_local1.m_clip = wellLinkage;
_local1.m_clipOver = wellOverLinkage;
_local1.m_deck = deck;
_local1.m_anim = {state:"na", card:0, delay:0};
Mouse.addListener(_local1);
_local1.m_state = _local1.STATIC_IDLE;
_local1.m_clip.gotoAndStop(_local1.m_deck.m_cards.length + 1);
}
cWell.prototype.onMouseDown = function () {
};
cWell.prototype.onMouseMove = function () {
this.m_fnSetNumDeal(!this.m_clip.hitTest(gameMC._xmouse, gameMC._ymouse, true));
};
cWell.prototype.onMouseUp = function () {
var _local1 = this;
if (_local1.m_fnClickable() && (_local1.m_clip.hitTest(gameMC._xmouse, gameMC._ymouse, true))) {
_local1.m_fnStartDealAnim();
}
};
cWell.prototype.m_fnClickable = function () {
if (gameMC.gCanClickStuff == false) {
return(false);
}
if (fnStableAnimating() == true) {
return(false);
}
if (this.m_state != this.STATIC_IDLE) {
return(false);
}
return(true);
};
cWell.prototype.m_fnMouseProximity = function () {
var _local3 = this;
var _local2 = gameMC._xmouse - _local3.m_xCenter;
var _local1 = gameMC._ymouse - _local3.m_yCenter;
return(((_local2 * _local2) + (_local1 * _local1)) <= _local3.m_radius);
};
cWell.prototype.m_fnTick = function () {
var _local1 = this;
switch (_local1.m_state) {
case _local1.STATIC_IDLE :
_local1.m_fnUpdateIdle();
return;
case _local1.STATIC_DEAL :
_local1.m_fnUpdateDeal();
return;
case _local1.STATIC_ANIM :
_local1.m_fnUpdateAnim();
}
};
cWell.prototype.m_fnUpdateIdle = function () {
this.m_clip.gotoAndStop(this.m_deck.m_cards.length + 1);
};
cWell.prototype.m_fnUpdateAnim = function () {
var _local1 = this;
if (_local1.m_anim.state == "anim_running") {
if (_local1.m_anim.card.m_bPlaying == false) {
_local1.m_state = _local1.STATIC_IDLE;
}
}
if (_local1.m_anim.state == "anim_wait") {
if (fnStableAnimating() == false) {
_local1.m_anim.card.play();
_local1.m_anim.state = "anim_running";
}
}
};
cWell.prototype.m_fnDoAnim = function (anim) {
var _local1 = this;
_local1.m_anim.state = "anim_wait";
_local1.m_anim.card = anim;
_local1.m_state = _local1.STATIC_ANIM;
};
cWell.prototype.m_fnUpdateDeal = function () {
var _local1 = this;
if (_local1.m_anim.state == "full_deal_card") {
if (HUD_DEALS[_local1.m_anim.card].m_bIsPlaying == false) {
var _local2 = gameMC.gBoardCards[LOC_BOARD.length + _local1.m_anim.card];
_local2.m_fnReceiveCard(_local1.m_Deck.m_fnGiveCard(), true);
_local2.m_card.m_clip._visible = true;
_local2.m_fnDoAnim(CARD_ANIM._IDLE);
_local1.m_clip.gotoAndStop(_local1.m_deck.m_cards.length + 1);
trace("playing deal sound");
gameMC.g_SoundMan.m_fnPlaySFXCenter(gameMC.gSnd.deal);
_local1.m_anim.state = "full_deal_start";
}
}
if (_local1.m_anim.state == "full_deal_wait") {
if (LINKAGE._CARDS_AWAY.m_bPlaying == false) {
_local1.m_anim.state = "full_deal_start";
}
}
if (_local1.m_anim.state == "full_deal_start") {
_local1.m_anim.card++;
if ((_local1.m_deck.m_cards.length == 0) || ((_local1.m_anim.card + LOC_BOARD.length) >= gameMC.gBoardCards.length)) {
_local1.m_state = _local1.STATIC_IDLE;
_local1.onMouseMove();
return;
}
HUD_DEALS[_local1.m_anim.card].play();
_local1.m_anim.state = "full_deal_card";
}
if (_local1.m_anim.state == "holes_deal_card") {
if (HUD_DEALS[_local1.m_anim.card].m_bIsPlaying == false) {
var _local2 = gameMC.gBoardCards[LOC_BOARD.length + _local1.m_anim.card];
_local2.m_fnReceiveCard(_local1.m_Deck.m_fnGiveCard(), true);
_local2.m_card.m_clip._visible = true;
_local2.m_fnDoAnim(CARD_ANIM._IDLE);
_local1.m_clip.gotoAndStop(_local1.m_deck.m_cards.length + 1);
trace("playing deal sound");
gameMC.g_SoundMan.m_fnPlaySFXCenter(gameMC.gSnd.deal);
_local1.m_anim.state = "holes_deal_start";
}
}
if (_local1.m_anim.state == "holes_deal_wait") {
if (LINKAGE._CARDS_AWAY.m_bPlaying == false) {
_local1.m_anim.state = "holes_deal_start";
}
}
if (_local1.m_anim.state == "holes_deal_start") {
_local1.m_anim.card = 0;
while ((_local1.m_anim.card + LOC_BOARD.length) < gameMC.gBoardCards.length) {
if (gameMC.gBoardCards[_local1.m_anim.card + LOC_BOARD.length].m_card == null) {
break;
}
_local1.m_anim.card++;
}
if ((_local1.m_deck.m_cards.length == 0) || ((_local1.m_anim.card + LOC_BOARD.length) >= gameMC.gBoardCards.length)) {
_local1.m_state = _local1.STATIC_IDLE;
_local1.onMouseMove();
} else {
HUD_DEALS[_local1.m_anim.card].play();
_local1.m_anim.state = "holes_deal_card";
}
}
};
cWell.prototype.m_fnStartDealAnim = function () {
var _local3 = this;
var _local1 = 0;
while (_local1 < gameMC.gHighlights.length) {
gameMC.gHighlights[_local1].m_fnSetInterest(null);
_local1++;
}
_local1 = LOC_BOARD.length;
while (_local1 < gameMC.gBoardCards.length) {
if (gameMC.gBoardCards[_local1].m_card == null) {
break;
}
_local1++;
}
if (_local1 >= gameMC.gBoardCards.length) {
_local3.m_anim.state = "full_deal_wait";
var _local2 = gameMC.gBoardCards.length - LOC_BOARD.length;
if (_local2 > _local3.m_deck.m_cards.length) {
_local2 = _local3.m_deck.m_cards.length;
}
_local1 = LOC_BOARD.length;
while (_local1 < (LOC_BOARD.length + _local2)) {
gameMC.gBoardCards[_local1].m_card.m_clip._visible = false;
_local1++;
}
LINKAGE._CARDS_AWAY.play();
} else {
_local3.m_anim.state = "holes_deal_start";
}
_local3.m_anim.card = -1;
_local3.m_anim.delay = 0;
_local3.m_state = _local3.STATIC_DEAL;
};
cWell.prototype.m_fnSetNumDeal = function (bZero) {
var _local3 = this;
if (bZero == true) {
_local3.m_clipOver.gotoAndStop(WELL_OVER_LABELS[0]);
} else {
var _local2 = 0;
var _local1 = LOC_BOARD.length;
while (_local1 < gameMC.gBoardCards.length) {
if (gameMC.gBoardCards[_local1].m_card == null) {
_local2++;
}
_local1++;
}
if (_local2 == 0) {
_local2 = 4;
}
if (_local2 > _local3.m_deck.m_cards.length) {
_local2 = _local3.m_deck.m_cards.length;
}
_local3.m_clipOver.gotoAndStop(WELL_OVER_LABELS[_local2]);
}
};
function cDealer(boardCards, well, files) {
var _local1 = this;
_local1.STATIC_PLAY_DECK = 0;
_local1.STATIC_BOARD = 1;
_local1.STATIC_MISC = 2;
_local1.m_well = well;
_local1.m_files = files;
_local1.m_boardCards = boardCards;
_local1.m_currentAnim = _local1.STATIC_BOARD;
_local1.m_bComplete = false;
}
cDealer.prototype.m_fnProcessComplete = function () {
var _local1 = this;
switch (_local1.m_currentAnim) {
case _local1.STATIC_PLAY_DECK :
_local1.m_fnDoPlayDeck();
break;
case _local1.STATIC_BOARD :
_local1.m_fnDoBoard();
break;
case _local1.STATIC_MISC :
_local1.m_fnDoMisc();
}
return(_local1.m_bComplete);
};
cDealer.prototype.m_fnDoBoard = function () {
var _local2 = this;
var _local1 = 0;
while (_local1 < LOC_BOARD.length) {
_local2.m_boardCards[_local1].m_fnReceiveCard(_local2.m_well.m_deck.m_fnGiveCard(), true);
if (((_local1 == 4) || (_local1 == 9)) || (_local1 == 14)) {
_local2.m_boardCards[_local1].m_fnDoAnim(CARD_ANIM._IDLE);
}
_local2.m_boardCards[_local1].m_card.m_clip._visible = true;
_local1++;
}
_local2.m_currentAnim = _local2.STATIC_PLAY_DECK;
_local2.m_currentAnimState = "start_hud_anim";
};
cDealer.prototype.m_fnDoPlayDeck = function () {
var _local1 = this;
if (_local1.m_currentAnimState == "wait_anim_done") {
if (LINKAGE._HUD.m_bIsPlaying == false) {
_local1.m_well.m_fnStartDealAnim();
_local1.m_bComplete = true;
return;
}
} else if (_local1.m_currentAnimState == "start_hud_anim") {
_local1.m_well.m_fnUpdateIdle();
LINKAGE._HUD.gotoAndPlay("open");
_local1.m_currentAnimState = "wait_anim_done";
}
};
cDealer.prototype.m_fnDoMisc = function () {
};
function cHighlight() {
this.m_cardInterest = null;
}
cHighlight.prototype.m_fnSetInterest = function (card) {
this.m_cardInterest = card;
};
function fnDealGame() {
gameMC.gDealManager = new cDealer(gameMC.gBoardCards, gameMC.gWell, gameMC.gFileDecks);
}
function fnIsDealDone() {
return(gameMC.gDealManager.m_fnProcessComplete());
}
function fnUpdateBurried() {
var group1Burried = (((gameMC.gBoardCards[4].m_card != null) && (gameMC.gBoardCards[4].m_card.m_clip.m_state != CARD_ANIM._NORMAL)) && (gameMC.gBoardCards[4].m_card.m_clip.m_state != CARD_ANIM._SUIT));
var _local2 = ((gameMC.gBoardCards[9].m_card != null) && (gameMC.gBoardCards[9].m_card.m_clip.m_state != CARD_ANIM._NORMAL)) && (gameMC.gBoardCards[9].m_card.m_clip.m_state != CARD_ANIM._SUIT);
var _local3 = ((gameMC.gBoardCards[14].m_card != null) && (gameMC.gBoardCards[14].m_card.m_clip.m_state != CARD_ANIM._NORMAL)) && (gameMC.gBoardCards[14].m_card.m_clip.m_state != CARD_ANIM._SUIT);
gameMC.gBoardCards[0].m_bBurried = group1Burried;
gameMC.gBoardCards[1].m_bBurried = group1Burried;
gameMC.gBoardCards[2].m_bBurried = group1Burried;
gameMC.gBoardCards[3].m_bBurried = group1Burried;
gameMC.gBoardCards[5].m_bBurried = _local2;
gameMC.gBoardCards[6].m_bBurried = _local2;
gameMC.gBoardCards[7].m_bBurried = _local2;
gameMC.gBoardCards[8].m_bBurried = _local2;
gameMC.gBoardCards[10].m_bBurried = _local3;
gameMC.gBoardCards[11].m_bBurried = _local3;
gameMC.gBoardCards[12].m_bBurried = _local3;
gameMC.gBoardCards[13].m_bBurried = _local3;
var _local1 = 0;
while (_local1 < gameMC.gBoardCards.length) {
if ((gameMC.gBoardCards[_local1].m_bBurried == true) && (gameMC.gBoardCards[_local1].m_card.m_clip.m_state == CARD_ANIM._IDLE)) {
gameMC.gBoardCards[_local1].m_fnDoAnim(CARD_ANIM._BACK);
}
if ((gameMC.gBoardCards[_local1].m_bBurried == false) && (gameMC.gBoardCards[_local1].m_card.m_clip.m_state == CARD_ANIM._BACK)) {
gameMC.gBoardCards[_local1].m_fnDoAnim(CARD_ANIM._FLIP);
if ((((((_local1 == 1) || (_local1 == 3)) || (_local1 == 6)) || (_local1 == 8)) || (_local1 == 11)) || (_local1 == 13)) {
gameMC.gBoardCards[_local1].m_card.m_clip[CARD_FLIP]._xscale = -CARDDECK_SCALE_X;
}
if ((((((_local1 == 2) || (_local1 == 3)) || (_local1 == 7)) || (_local1 == 8)) || (_local1 == 12)) || (_local1 == 13)) {
gameMC.gBoardCards[_local1].m_card.m_clip[CARD_FLIP]._yscale = -CARDDECK_SCALE_Y;
}
}
_local1++;
}
}
function fnReportCardClicked(card) {
var _local2 = card;
var _local1 = 0;
while (_local1 < gameMC.gHighlights.length) {
if (gameMC.gHighlights[_local1].m_cardInterest == _local2) {
gameMC.gHighlights[_local1].m_fnSetInterest(null);
_local2.m_fnDoAnim(CARD_ANIM._IDLE);
return;
}
_local1++;
}
_local1 = 0;
while (_local1 < gameMC.gHighlights.length) {
if (gameMC.gHighlights[_local1].m_cardInterest == null) {
gameMC.gHighlights[_local1].m_fnSetInterest(_local2);
_local2.m_fnDoAnim(CARD_ANIM._SELECTED);
gameMC.g_SoundMan.m_fnPlaySFXCenter(gameMC.gSnd.runeSelect);
return;
}
_local1++;
}
}
function fnCheckMatch() {
var _local2 = 0;
var _local3 = 0;
var _local1 = 0;
while (_local1 < gameMC.gHighlights.length) {
if (gameMC.gHighlights[_local1].m_cardInterest) {
_local3++;
_local2 = _local2 + gameMC.gHighlights[_local1].m_cardInterest.m_card.m_value;
}
_local1++;
}
if (_local2 == TARGET_MATCH_VALUE) {
fnClearMatch(true);
} else if (_local2 > TARGET_MATCH_VALUE) {
fnClearMatch(false);
} else if (_local3 == gameMC.gHighlights.length) {
fnClearMatch(false);
}
}
function fnClearMatch(validMatch) {
var _local2 = CARD_ANIM._IDLE;
if (validMatch) {
_local2 = fnUpdateScore();
trace(_local2);
}
var _local1 = 0;
while (_local1 < gameMC.gHighlights.length) {
if (gameMC.gHighlights[_local1].m_cardInterest) {
gameMC.gHighlights[_local1].m_cardInterest.m_fnDoAnim(_local2);
gameMC.gHighlights[_local1].m_fnSetInterest(null);
}
_local1++;
}
}
function fnUpdateScore() {
var _local1;
var retType = CARD_ANIM._IDLE;
_local1 = 0;
while (_local1 < gameMC.gHighlights.length) {
if (gameMC.gHighlights[_local1].m_cardInterest) {
var _local2 = LOC_BOARD.length;
while (_local2 < gameMC.gBoardCards.length) {
if (gameMC.gHighlights[_local1].m_cardInterest == gameMC.gBoardCards[_local2]) {
break;
}
_local2++;
}
if (_local2 < gameMC.gBoardCards.length) {
break;
}
}
_local1++;
}
if (_local1 < gameMC.gHighlights.length) {
_local1 = LOC_BOARD.length;
while (_local1 < gameMC.gBoardCards.length) {
if ((gameMC.gBoardCards[_local1].m_deck.m_cards.length != 0) || (((gameMC.gBoardCards[_local1].m_card && (gameMC.gBoardCards[_local1].m_card.m_clip.m_state != CARD_ANIM._SELECTED)) && (gameMC.gBoardCards[_local1].m_card.m_clip.m_state != CARD_ANIM._NORMAL)) && (gameMC.gBoardCards[_local1].m_card.m_clip.m_state != CARD_ANIM._SUIT))) {
break;
}
_local1++;
}
if (_local1 >= gameMC.gBoardCards.length) {
gameMC.gPlayer.numStableClears++;
gameMC.gPlayer.stableClearsTotal++;
gameMC.gPlayer.score = gameMC.gPlayer.score + POINTS_STABLE_BONUS;
gameMC.g_SoundMan.m_fnPlaySFXCenter(gameMC.gSnd.stableClear);
gameMC.gWell.m_fnDoAnim(LINKAGE._CLEAR_OUT_BONUS);
trace("score: stable bonus");
}
}
var _local3 = "na";
_local1 = 0;
while (_local1 < gameMC.gHighlights.length) {
if ((_local3 == "na") && (gameMC.gHighlights[_local1].m_cardInterest)) {
_local3 = gameMC.gHighlights[_local1].m_cardInterest.m_card.m_Suit;
} else if (gameMC.gHighlights[_local1].m_cardInterest && (_local3 == gameMC.gHighlights[_local1].m_cardInterest.m_card.m_Suit)) {
break;
}
_local1++;
}
if (_local1 >= gameMC.gHighlights.length) {
gameMC.gPlayer.numNormalSets++;
gameMC.gPlayer.normalSetsTotal++;
gameMC.gPlayer.score = gameMC.gPlayer.score + POINTS_NORMAL_SET;
gameMC.g_SoundMan.m_fnPlaySFXCenter(gameMC.gSnd.match);
retType = CARD_ANIM._NORMAL;
trace("score: normal set");
} else {
gameMC.gPlayer.numHouseSets++;
gameMC.gPlayer.houseSetsTotal++;
gameMC.gPlayer.score = gameMC.gPlayer.score + POINTS_HOUSE_SET;
gameMC.g_SoundMan.m_fnPlaySFXCenter(gameMC.gSnd.suit);
retType = CARD_ANIM._SUIT;
trace("score: house set");
}
fnUpdateHUD();
return(retType);
}
function fnCheckGameOver() {
if (gameMC.gPlayDeck.m_cards.length > 0) {
} else {
var _local2;
var _local1;
var _local3 = 0;
_local2 = 0;
while (_local2 < gameMC.gBoardCards.length) {
if ((gameMC.gBoardCards[_local2].m_card != null) && (gameMC.gBoardCards[_local2].m_bBurried == false)) {
_local3++;
if ((gameMC.gBoardCards[_local2].m_fnClickable() == false) || (gameMC.gBoardCards[_local2].m_card.m_value == TARGET_MATCH_VALUE)) {
return;
}
_local1 = _local2 + 1;
while (_local1 < gameMC.gBoardCards.length) {
if ((gameMC.gBoardCards[_local1].m_card != null) && (gameMC.gBoardCards[_local1].m_bBurried == false)) {
if ((gameMC.gBoardCards[_local1].m_fnClickable() == false) || ((gameMC.gBoardCards[_local1].m_card.m_value + gameMC.gBoardCards[_local2].m_card.m_value) == TARGET_MATCH_VALUE)) {
return;
}
}
_local1++;
}
}
_local2++;
}
if (_local3 > 0) {
gameMC.gotoAndPlay("Lose");
} else {
gameMC.gotoAndPlay("Win");
}
}
}
function fnFillGameOverValues(linkage) {
linkage.screen.finalScore.text = gameMC.gPlayer.score;
}
function fnUpdateHUD() {
LINKAGE._SCORE[0].text = gameMC.gPlayer.score;
LINKAGE._SCORE[1].text = gameMC.gPlayer.score;
}
function fnMakeBoardVisible(bVisible) {
var _local2 = bVisible;
var _local1 = 0;
while (_local1 < gameMC.gBoardCards.length) {
gameMC.gBoardCards[_local1].m_fnSetVisible(_local2);
_local1++;
}
}
function fnLinkage(str) {
return(eval ("gameMC." + str));
}
function fnFillRoundCompleteValues(bWin) {
var _local1 = (bWin ? (gameMC.gPlayer.level) : 0);
gameMC.gPlayer.score = gameMC.gPlayer.score + (_local1 * POINTS_LEVEL_COMPLETE);
fnLinkage(GAME_OVER._CAPTION).gotoAndPlay((bWin ? (OVER_STATES._WIN) : (OVER_STATES._LOSE)));
fnLinkage(GAME_OVER._LEVEL_BONUS[0]).text = _local1;
fnLinkage(GAME_OVER._LEVEL_BONUS[1]).text = POINTS_LEVEL_COMPLETE;
fnLinkage(GAME_OVER._LEVEL_BONUS[2]).text = _local1 * POINTS_LEVEL_COMPLETE;
fnLinkage(GAME_OVER._CLEAR_OUT[0]).text = gameMC.gPlayer.numStableClears;
fnLinkage(GAME_OVER._CLEAR_OUT[1]).text = POINTS_STABLE_BONUS;
fnLinkage(GAME_OVER._CLEAR_OUT[2]).text = gameMC.gPlayer.numStableClears * POINTS_STABLE_BONUS;
fnLinkage(GAME_OVER._SUIT_BONUS[0]).text = gameMC.gPlayer.numHouseSets;
fnLinkage(GAME_OVER._SUIT_BONUS[1]).text = POINTS_HOUSE_SET;
fnLinkage(GAME_OVER._SUIT_BONUS[2]).text = gameMC.gPlayer.numHouseSets * POINTS_HOUSE_SET;
fnLinkage(GAME_OVER._SET_BONUS[0]).text = gameMC.gPlayer.numNormalSets;
fnLinkage(GAME_OVER._SET_BONUS[1]).text = POINTS_NORMAL_SET;
fnLinkage(GAME_OVER._SET_BONUS[2]).text = gameMC.gPlayer.numNormalSets * POINTS_NORMAL_SET;
fnLinkage(GAME_OVER._CURR_SCORE).text = gameMC.gPlayer.score;
}
function fnConvertHUDDefinesToLinkages() {
LINKAGE._GAMEBACK = fnLinkage(LINKAGE._GAMEBACK);
LINKAGE._HUD = fnLinkage(LINKAGE._HUD);
LINKAGE._WELL = fnLinkage(LINKAGE._WELL);
LINKAGE._WELL_OVER = fnLinkage(LINKAGE._WELL_OVER);
LINKAGE._DEAL1 = fnLinkage(LINKAGE._DEAL1);
LINKAGE._DEAL2 = fnLinkage(LINKAGE._DEAL2);
LINKAGE._DEAL3 = fnLinkage(LINKAGE._DEAL3);
LINKAGE._DEAL4 = fnLinkage(LINKAGE._DEAL4);
LINKAGE._SCORE[0] = fnLinkage(LINKAGE._SCORE[0]);
LINKAGE._SCORE[1] = fnLinkage(LINKAGE._SCORE[1]);
LINKAGE._LEVEL[0] = fnLinkage(LINKAGE._LEVEL[0]);
LINKAGE._LEVEL[1] = fnLinkage(LINKAGE._LEVEL[1]);
LINKAGE._LIVES = fnLinkage(LINKAGE._LIVES);
LINKAGE._CARDS_AWAY = fnLinkage(LINKAGE._CARDS_AWAY);
LINKAGE._CLEAR_OUT_BONUS = fnLinkage(LINKAGE._CLEAR_OUT_BONUS);
HUD_DEALS.push(gameMC.attachMovie("dealPos1", "dealPos1_5001", 5001));
HUD_DEALS.push(gameMC.attachMovie("dealPos2", "dealPos2_5002", 5002));
HUD_DEALS.push(gameMC.attachMovie("dealPos3", "dealPos3_5003", 5003));
HUD_DEALS.push(gameMC.attachMovie("dealPos4", "dealPos4_5004", 5004));
HUD_PIPS.push(fnLinkage(LINKAGE._PIP1));
HUD_PIPS.push(fnLinkage(LINKAGE._PIP2));
HUD_PIPS.push(fnLinkage(LINKAGE._PIP3));
HUD_PIPS.push(fnLinkage(LINKAGE._PIP4));
}
function fnBoardAnimating() {
var _local1 = 0;
while (_local1 < gameMC.gBoardCards.length) {
if (gameMC.gBoardCards[_local1].m_state == gameMC.gBoardCards[_local1].STATIC_ANIMATING) {
return(true);
}
_local1++;
}
return(false);
}
function fnStableAnimating() {
var _local1 = LOC_BOARD.length;
while (_local1 < gameMC.gBoardCards.length) {
if ((gameMC.gBoardCards[_local1].m_card && (gameMC.gBoardCards[_local1].m_card.m_clip.m_state != CARD_ANIM._IDLE)) && (gameMC.gBoardCards[_local1].m_card.m_clip.m_state != CARD_ANIM._SELECTED)) {
return(true);
}
_local1++;
}
return(false);
}
function fnWellAnimating() {
if (gameMC.gWell.m_state != gameMC.gWell.STATIC_IDLE) {
return(true);
}
return(false);
}
stop();
var gSnd = {bkgrnd:gameMC.g_SoundMan.m_fnCreateSound(SND_DEFS._BKGRND[SND_LINKAGE], SND_DEFS._BKGRND[SND_VOLUME]), welcome:gameMC.g_SoundMan.m_fnCreateSound(SND_DEFS._WELCOME[SND_LINKAGE], SND_DEFS._WELCOME[SND_VOLUME]), panel:gameMC.g_SoundMan.m_fnCreateSound(SND_DEFS._PANEL_SWING[SND_LINKAGE], SND_DEFS._PANEL_SWING[SND_VOLUME]), deal:gameMC.g_SoundMan.m_fnCreateSound(SND_DEFS._CARD_DEAL[SND_LINKAGE], SND_DEFS._CARD_DEAL[SND_VOLUME]), match:gameMC.g_SoundMan.m_fnCreateSound(SND_DEFS._MATCH[SND_LINKAGE], SND_DEFS._MATCH[SND_VOLUME]), suit:gameMC.g_SoundMan.m_fnCreateSound(SND_DEFS._SUIT_BONUS[SND_LINKAGE], SND_DEFS._SUIT_BONUS[SND_VOLUME]), clrOut:gameMC.g_SoundMan.m_fnCreateSound(SND_DEFS._CLEAR_OUT[SND_LINKAGE], SND_DEFS._CLEAR_OUT[SND_VOLUME])};
gameMC.g_SoundMan.m_fnPlayAsBkgrnd(gameMC.gSnd.bkgrnd);
Frame 17
screen_title.gotoAndPlay("title");
btn_temp.onRelease = gameMC.btn_handler_next_screen;
Instance of Symbol 447 MovieClip "Cr_clip" in Frame 17
onClipEvent (load) {
function mKeyStroke() {
var _local1;
var _local2 = -1;
if ((getTimer() - pCrTimer) > 400) {
_local1 = 1;
while (_local1 < 91) {
if (Key.isDown(_local1)) {
_local2 = _local1;
}
_local1++;
}
if (_local2 >= 48) {
pCrCheck = (pCrCheck + _local2) + ":";
trace("CrCheck: " + pCrCheck);
pCrTimer = getTimer();
if (pCrCheck == "87:66:67:72:48:52:") {
trace("OK");
pCrCheck = "";
pCrOn = true;
mCr();
}
} else if ((_local2 == 13) || (_local2 == 32)) {
pCrCheck = "";
pCrTimer = getTimer();
}
}
}
function mCr() {
trace("mCr");
this.gotoAndPlay("show");
gameMC.debug_clip.showDebug();
gameMC.debug_clip.displayDebugSettings();
}
}
onClipEvent (enterFrame) {
mKeyStroke();
}
Frame 23
screen_title.gotoAndPlay("instructions");
Frame 32
screen_title.gotoAndPlay("play");
btn_temp.onRelease = gameMC.btn_handler_play;
gameMC.HSPlay();
trace("play");
fnConvertHUDDefinesToLinkages();
var gPlayDeck = new cDeck(LOC_PLAYDECK[DEPTH]);
var gDiscardPile = new cDeck(LOC_DISCARDPILE[DEPTH]);
var gFileDecks = new Array();
var loop = 0;
while (loop < LOC_FILES.length) {
gFileDecks.push(new cDeck(LOC_FILES[loop][DEPTH]));
loop++;
}
var gBoardCards = new Array();
loop = 0;
while (loop < LOC_BOARD.length) {
gBoardCards.push(new cBoardCard(LOC_BOARD[loop], null, null));
loop++;
}
loop = 0;
while (loop < LOC_FILES.length) {
gBoardCards.push(new cBoardCard(LOC_FILES[loop], gameMC.gFileDecks[loop], HUD_PIPS[loop]));
loop++;
}
var gHighlights = new Array();
loop = 0;
while (loop < NUM_HIGHLIGHTS) {
gHighlights.push(new cHighlight());
loop++;
}
var gWell = new cWell(LINKAGE._WELL, LINKAGE._WELL_OVER, gameMC.gPlayDeck);
Frame 33
gameMC.gCanClickStuff = false;
var gPlayer = {lives:PLAYER_NUM_LIVES, level:1, score:0, numStableClears:0, numNormalSets:0, numHouseSets:0, stableClearsTotal:0, normalSetsTotal:0, houseSetsTotal:0};
Frame 37
gameMC.HSLevelStart();
trace("NextLevel");
gameMC.gPlayer.numStableClears = 0;
gameMC.gPlayer.numNormalSets = 0;
gameMC.gPlayer.numHouseSets = 0;
var loop = 0;
while (loop < gameMC.gFileDecks.length) {
gameMC.gFileDecks[loop].m_fnClear();
loop++;
}
gDiscardPile.m_fnClear();
loop = 0;
while (loop < gameMC.gBoardCards.length) {
gameMC.gBoardCards[loop].m_fnClear();
loop++;
}
gPlayDeck.m_fnClear();
gPlayDeck.m_fnFill();
loop = 0;
while (loop < DECK_SHUFFLE_TIMES) {
gPlayDeck.m_fnShuffle();
loop++;
}
gameMc.gameBkg.space.play();
Frame 40
fnDealGame();
LINKAGE._LIVES.gotoAndStop(LIVES_LABELS[gameMC.gPlayer.lives]);
LINKAGE._LEVEL[0].text = gameMC.gPlayer.level;
LINKAGE._LEVEL[1].text = gameMC.gPlayer.level;
fnUpdateHUD();
Frame 41
Frame 42
if (!fnIsDealDone()) {
gotoAndPlay(_currentframe - 1);
} else {
fnUpdateBurried();
}
Frame 45
gameMC.gCanClickStuff = true;
var loop = 0;
while (loop < gameMC.gBoardCards.length) {
gameMC.gBoardCards[loop].m_fnTick();
loop++;
}
fnUpdateBurried();
gameMC.gWell.m_fnTick();
fnCheckMatch();
fnCheckGameOver();
Frame 46
gameMC.gotoAndPlay("MainLoop");
Frame 53
gameMC.gCanClickStuff = false;
Frame 54
if (fnBoardAnimating() || (fnWellAnimating())) {
var loop = 0;
while (loop < gameMC.gBoardCards.length) {
gameMC.gBoardCards[loop].m_fnTick();
loop++;
}
gameMC.gWell.m_fnTick();
gotoAndPlay(_currentframe - 1);
}
Frame 55
trace("level won");
gameMC.g_SoundMan.m_fnPlaySFXCenter(gameMC.gSnd.levelWin);
fnMakeBoardVisible(false);
LINKAGE._HUD.gotoAndPlay("gameOver");
fnFillRoundCompleteValues(true);
stop();
Frame 56
gameMC.gPlayer.level++;
gameMC.gotoAndPlay("NextLevel");
Frame 58
gameMC.gCanClickStuff = false;
Frame 59
if (fnBoardAnimating() || (fnWellAnimating())) {
var loop = 0;
while (loop < gameMC.gBoardCards.length) {
gameMC.gBoardCards[loop].m_fnTick();
loop++;
}
gameMC.gWell.m_fnTick();
gotoAndPlay(_currentframe - 1);
}
Frame 60
trace("level lost");
gameMC.g_SoundMan.m_fnPlaySFXCenter(gameMC.gSnd.levelLose);
gameMC.gPlayer.lives--;
if (gameMC.gPlayer.lives <= 0) {
gameMC.gotoAndPlay("GameOver");
} else {
fnMakeBoardVisible(false);
LINKAGE._HUD.gotoAndPlay("gameOver");
fnFillRoundCompleteValues(false);
}
stop();
Frame 61
gameMC.gotoAndPlay("NextLevel");
Frame 63
btn_temp.onRelease = gameMC.btn_handler_restart;
gameMC.HSGameOver();
trace("game over");
gameMC.gCanClickStuff = false;
gameMC.gScore = gameMC.gPlayer.score;
gameMC.attachMovie(SCREEN_LEVEL_GAMEOVER, "currentScreen", SCREEN_DEPTH);
trace(gameMC.currentScreen);
gameMC.currentScreen._x = STAGE_WIDTH / 2;
gameMC.currentScreen._y = STAGE_HEIGHT / 2;
fnFillGameOverValues(gameMC.currentScreen);
gameMC.g_SoundMan.m_fnPlaySFXCenter(gameMC.gSnd.titleScreen);
stop();
Frame 64
gameMC.currentScreen.removeMovieClip();
gDiscardPile.m_fnClear();
loop = 0;
while (loop < gameMC.gBoardCards.length) {
gameMC.gBoardCards[loop].m_fnClear();
loop++;
}
gPlayDeck.m_fnClear();
gameMC.gameBkg.HUD.gotoAndStop("open");
if (gameMC.gameOverReturn == "play") {
gameMC.gotoAndPlay("play");
} else {
gameMC.gameBkg.gotoAndStop("instructions");
gameMC.gameBkg.instructions.gotoAndPlay("fromGameEnd");
gameMC.stop();
}
Symbol 25 MovieClip Frame 1
stop();
Symbol 63 MovieClip Frame 1
stop();
Symbol 90 MovieClip Frame 1
stop();
Symbol 117 MovieClip Frame 1
stop();
Symbol 144 MovieClip Frame 1
stop();
Symbol 145 MovieClip Frame 1
stop();
Symbol 145 MovieClip Frame 2
stop();
Symbol 145 MovieClip Frame 3
stop();
Symbol 145 MovieClip Frame 4
stop();
Symbol 154 MovieClip Frame 4
Symbol 159 MovieClip Frame 13
Symbol 159 MovieClip Frame 16
Symbol 159 MovieClip Frame 19
Symbol 159 MovieClip Frame 22
Symbol 159 MovieClip Frame 42
stop();
_parent.play();
Symbol 164 MovieClip [deck] Frame 1
m_state = "faceDown";
m_bIsPlaying = true;
Symbol 164 MovieClip [deck] Frame 8
stop();
m_bIsPlaying = false;
Symbol 164 MovieClip [deck] Frame 9
m_state = "flipOver";
m_bIsPlaying = true;
Symbol 164 MovieClip [deck] Frame 13
m_state = "normal";
m_bIsPlaying = true;
Symbol 164 MovieClip [deck] Frame 18
stop();
m_bIsPlaying = false;
Symbol 164 MovieClip [deck] Frame 19
m_state = "highlight";
m_bIsPlaying = true;
Symbol 164 MovieClip [deck] Frame 22
stop();
m_bIsPlaying = false;
Symbol 164 MovieClip [deck] Frame 23
m_state = "selected";
m_bIsPlaying = true;
Symbol 164 MovieClip [deck] Frame 29
stop();
m_bIsPlaying = false;
Symbol 164 MovieClip [deck] Frame 30
m_state = "matchNormal";
m_bIsPlaying = true;
Symbol 164 MovieClip [deck] Frame 34
gotoAndPlay ("invisible");
Symbol 164 MovieClip [deck] Frame 35
m_state = "matchSuit";
m_bIsPlaying = true;
Symbol 164 MovieClip [deck] Frame 36
this.bonusPopup.BonusSuit.gotoAndStop(this.suit._currentframe);
Symbol 164 MovieClip [deck] Frame 40
stop();
Symbol 164 MovieClip [deck] Frame 41
m_state = "invisible";
m_bIsPlaying = false;
Symbol 164 MovieClip [deck] Frame 47
stop();
Symbol 164 MovieClip [deck] Frame 48
m_state = "return";
m_bIsPlaying = true;
Symbol 164 MovieClip [deck] Frame 49
gotoAndPlay ("normal");
Symbol 179 Button
on (release) {
gameMC.gameOverReturn = "play";
_parent.play();
}
Symbol 183 Button
on (release) {
gameMC.gameOverReturn = "instructions";
_parent.play();
}
Symbol 211 MovieClip [gameOver] Frame 10
stop();
Symbol 211 MovieClip [gameOver] Frame 16
gameMC.play();
Symbol 220 MovieClip [dealPos4] Frame 1
stop();
m_bIsPlaying = false;
Symbol 220 MovieClip [dealPos4] Frame 2
m_bIsPlaying = true;
Symbol 221 MovieClip [dealPos3] Frame 1
stop();
m_bIsPlaying = false;
Symbol 221 MovieClip [dealPos3] Frame 2
m_bIsPlaying = true;
Symbol 222 MovieClip [dealPos2] Frame 1
stop();
m_bIsPlaying = false;
Symbol 222 MovieClip [dealPos2] Frame 2
m_bIsPlaying = true;
Symbol 223 MovieClip [dealPos1] Frame 1
stop();
m_bIsPlaying = false;
Symbol 223 MovieClip [dealPos1] Frame 2
m_bIsPlaying = true;
Symbol 227 MovieClip [hs_placeholder] Frame 1
_visible = false;
Symbol 227 MovieClip [hs_placeholder] Frame 5
stop();
Symbol 229 MovieClip [hs_placeholder] Frame 1
_visible = false;
Symbol 229 MovieClip [hs_placeholder] Frame 5
stop();
Symbol 248 MovieClip Frame 1
this.loadMovie(gameMC.gHSRoot_swf + "HSScripts.swf");
Symbol 248 MovieClip Frame 4
stop();
Symbol 250 Button
on (release) {
gameMC.gDebug = "";
}
Symbol 251 Button
on (press) {
startDrag ("");
}
on (release) {
stopDrag();
}
Symbol 253 MovieClip Frame 5
stop();
Symbol 255 Button
on (keyPress "0") {
gotoAndPlay ("loading");
}
on (keyPress "1") {
gotoAndPlay ("loadingToTitle");
}
on (keyPress "2") {
gotoAndPlay ("instructions");
}
on (keyPress "3") {
gotoAndPlay ("inGame");
}
Symbol 261 MovieClip Frame 5
stop();
Symbol 262 MovieClip Frame 9
stop();
Symbol 283 MovieClip Frame 11
if (title == 1) {
stop();
} else if (title == 0) {
play();
}
Symbol 283 MovieClip Frame 12
gotoAndPlay(levelTwo);
Symbol 283 MovieClip Frame 42
if (title == 1) {
stop();
} else if (title == 0) {
play();
}
Symbol 283 MovieClip Frame 43
gotoAndPlay(levelThree);
Symbol 283 MovieClip Frame 74
if (title == 1) {
stop();
} else if (title == 0) {
play();
}
Symbol 283 MovieClip Frame 75
gotoAndPlay(toOne);
Symbol 283 MovieClip Frame 95
gotoAndPlay(levelOne);
Symbol 305 Button
on (release) {
this._parent._parent.gotoAndPlay("instructions");
}
Symbol 306 Button
on (release) {
this._parent._parent.gotoAndPlay("titleToGame");
}
Symbol 316 Button
on (release) {
this._parent.gotoAndPlay("out");
}
Symbol 319 Button
on (release) {
_parent.play();
}
Symbol 320 MovieClip Frame 7
stop();
Symbol 321 MovieClip Frame 13
stop();
this._parent.gotoAndPlay("inGame");
Symbol 331 MovieClip Frame 1
stop();
Symbol 342 MovieClip Frame 1
gameMC.g_SoundMan.m_fnPlaySFXCenter(gameMC.gSnd.panel);
Symbol 342 MovieClip Frame 10
gameMC.g_SoundMan.m_fnPlaySFXCenter(gameMC.gSnd.panel);
Symbol 342 MovieClip Frame 21
stop();
Symbol 342 MovieClip Frame 22
gameMC.g_SoundMan.m_fnPlaySFXCenter(gameMC.gSnd.panel);
Symbol 342 MovieClip Frame 35
stop();
Symbol 342 MovieClip Frame 37
gameMC.g_SoundMan.m_fnPlaySFXCenter(gameMC.gSnd.panel);
Symbol 342 MovieClip Frame 46
stop();
Symbol 342 MovieClip Frame 47
gameMC.g_SoundMan.m_fnPlaySFXCenter(gameMC.gSnd.panel);
Symbol 342 MovieClip Frame 59
stop();
this._parent.gotoAndPlay("InGame");
Symbol 345 MovieClip Frame 1
stop();
m_bPlaying = false;
Symbol 345 MovieClip Frame 2
m_bPlaying = true;
Symbol 345 MovieClip Frame 4
gotoAndStop (1);
Symbol 353 MovieClip Frame 1
stop();
m_bPlaying = false;
Symbol 353 MovieClip Frame 2
m_bPlaying = true;
Symbol 353 MovieClip Frame 6
gameMC.g_SoundMan.m_fnPlaySFXCenter(gameMC.gSnd.clrOut);
Symbol 353 MovieClip Frame 19
gameMC.g_SoundMan.m_fnPlaySFXCenter(gameMC.gSnd.clrOut);
Symbol 353 MovieClip Frame 40
gotoAndStop (1);
Symbol 363 MovieClip Frame 1
stop();
Symbol 363 MovieClip Frame 2
stop();
Symbol 363 MovieClip Frame 6
stop();
Symbol 363 MovieClip Frame 10
stop();
Symbol 363 MovieClip Frame 14
stop();
Symbol 363 MovieClip Frame 18
stop();
Symbol 363 MovieClip Frame 22
stop();
Symbol 363 MovieClip Frame 26
stop();
Symbol 363 MovieClip Frame 30
stop();
Symbol 363 MovieClip Frame 34
stop();
Symbol 370 MovieClip Frame 1
stop();
Symbol 379 MovieClip Frame 1
stop();
Symbol 379 MovieClip Frame 7
stop();
Symbol 379 MovieClip Frame 14
stop();
Symbol 379 MovieClip Frame 20
stop();
Symbol 392 MovieClip Frame 10
stop();
Symbol 405 Button
on (release) {
_parent._parent.gotoAndPlay("away");
}
Symbol 412 Button
on (release) {
_parent._parent.gotoAndPlay("away");
}
Symbol 415 MovieClip Frame 1
stop();
Symbol 415 MovieClip Frame 9
stop();
Symbol 436 MovieClip Frame 9
gameMC.g_SoundMan.m_fnPlaySFXCenter(gameMC.gSnd.panel);
Symbol 436 MovieClip Frame 18
stop();
Symbol 437 MovieClip Frame 1
m_bIsPlaying = true;
Symbol 437 MovieClip Frame 2
gameMC.g_SoundMan.m_fnPlaySFXCenter(gameMC.gSnd.panel);
Symbol 437 MovieClip Frame 15
this.backer.gotoAndStop(2);
gameMC.g_SoundMan.m_fnPlaySFXCenter(gameMC.gSnd.panel);
Symbol 437 MovieClip Frame 20
stop();
m_bIsPlaying = false;
Symbol 437 MovieClip Frame 28
stop();
Symbol 437 MovieClip Frame 29
gameMC.g_SoundMan.m_fnPlaySFXCenter(gameMC.gSnd.panel);
Symbol 437 MovieClip Frame 39
gotoAndStop ("open");
gameMC.play();
Symbol 438 MovieClip Frame 1
this.onEnterFrame = function () {
_global.title = 0;
};
Symbol 438 MovieClip Frame 11
this.onEnterFrame = function () {
_global.title = 0;
};
stop();
gameMC.g_SoundMan.m_fnPlaySFXCenter(gameMC.gSnd.welcome);
Symbol 438 MovieClip Frame 17
this.onEnterFrame = function () {
_global.title = 1;
};
stop();
gameMC.g_SoundMan.m_fnPlaySFXCenter(gameMC.gSnd.panel);
Symbol 438 MovieClip Frame 26
stop();
Symbol 438 MovieClip Frame 35
this.onEnterFrame = function () {
_global.title = 1;
};
HUD.stop();
gameMC.gotoAndPlay("play");
Symbol 438 MovieClip Frame 40
stop();
Symbol 446 Button
on (release) {
gameMC.gotoAndPlay("GameOver");
}
Symbol 447 MovieClip Frame 4
stop();
Symbol 447 MovieClip Frame 9
stop();