Frame 1
stop();
fscommand ("showmenu", "false");
stop();
System.security.allowDomain(domainToAllow);
System.security.allowDomain("http://freeplay.gamedek.com/");
Instance of Symbol 81 MovieClip in Frame 1
onClipEvent (enterFrame) {
numTotal = _parent.getBytesTotal();
numLoaded = _parent.getBytesLoaded();
numPercent = Math.floor((numLoaded * 100) / numTotal);
if (numPercent < 10) {
strL = "0" + numPercent;
} else {
strL = numPercent;
}
_parent.strLoaded = strL + "%";
if (numPercent >= 100) {
_parent.play();
}
}
Frame 7
function g_fInitUser() {
g_objUser.numUserId = 0;
g_objUser.strUserName = "";
g_objUser.blnActive = false;
g_objUser.numChairId = 0;
g_objUser.numAvatarId = 0;
g_objUser.blnTurn = false;
g_objUser.blnInititator = false;
g_objPlayer1.numUserId = 0;
g_objPlayer1.strUserName = "";
g_objPlayer1.numChairId = 0;
g_objPlayer1.numAvatarId = 0;
g_objPlayer1.blnTurn = false;
g_objPlayer2.numUserId = 0;
g_objPlayer2.strUserName = "";
g_objPlayer2.numChairId = 0;
g_objPlayer2.numAvatarId = 0;
g_objPlayer2.blnTurn = false;
}
function g_fGameInitialized() {
g_fSendToCSA(((((((("<gameinitialized width=\"" + g_numGameWidth) + "\" height=\"") + g_numGameHeight) + "\" backcolor=\"") + g_numBackColor) + "\" gamemode=\"") + g_fGetGameMode()) + "\"/>");
g_blnInitialized = true;
}
function g_fGetFlashVersion() {
var _local1 = getVersion().toUpperCase();
return(parseInt(_local1.substr(4, _local1.length)));
}
function g_fGetRandomValue(a_numMaxValue) {
g_numRandomSeed = (g_numRandomSeed * g_A) % 2147352576;
var _local1 = Math.floor((g_numRandomSeed * a_numMaxValue) / g_C) % a_numMaxValue;
return(_local1);
}
function g_fSetGameSize(a_numWidth, a_numHeight) {
g_numGameWidth = a_numWidth;
g_numGameHeight = a_numHeight;
}
function g_fSetGameBackgroundColor(a_strColor) {
var _local2 = a_strColor;
var _local1 = (_local2.substr(4, 2) + _local2.substr(2, 2)) + _local2.substr(0, 2);
g_numBackColor = parseInt(_local1, 16);
}
function g_fSetGameMode(a_strMode) {
var _local1 = a_strMode.toLowerCase();
if ((_local1 == "single") || (_local1 == "multi")) {
g_strGameMode = _local1;
}
}
function g_fGetGameMode() {
return(g_strGameMode);
}
function g_fSetDebug(a_flag) {
if (typeof(a_flag) == "boolean") {
g_blnDebug = a_flag;
}
if (g_blnDebug) {
_global.g_lcDebug = new LocalConnection();
g_lcDebug.fCheckLocalConnection = function () {
g_lcDebug.send("stend", "fCheckLocalConnection", g_numConnId);
};
g_lcDebug.fRecevePacketFromStend = function (a_strPacket, a_numId) {
strXMLReceive = a_strPacket;
};
g_lcDebug.fSetConnectionId = function (a_numId) {
if (g_numConnId == -1) {
g_numConnId = a_numId;
g_lcDebug.close();
var blnConnect = g_lcDebug.connect("game" + g_numConnId);
g_lvlScoreBoard.numConnId = g_numConnId;
}
};
var blnConnect = g_lcDebug.connect("game");
} else {
delete _global.g_lcDebug;
}
}
function g_fGetDebug() {
return(g_blnDebug);
}
function g_fCenter(a_clip) {
var _local1 = a_clip;
_local1.mcBack._xscale = (100 * g_numGameWidth) / 680;
_local1.mcBack._yscale = (100 * g_numGameHeight) / 430;
_local1._x = 150 + (g_numGameWidth / 2);
_local1._y = g_numGameHeight / 2;
}
function g_fSearchInArray(a_array, a_element) {
var _local2 = a_array;
var _local3 = a_element;
var _local1 = 0;
while (_local1 < _local2.length) {
if (_local2[_local1] == _local3) {
return(_local1);
}
_local1++;
}
return(-1);
}
function g_fLoadScoreBoard() {
loadMovieNum ("scoreboard.swf", g_numScoreBoardLevel);
g_numLoadInterval = setInterval(g_fCheckScoreboardLoaded, 20);
}
function g_fCheckScoreboardLoaded() {
if (eval ("_level" + g_numScoreBoardLevel).blnLoaded) {
g_lvlScoreBoard = eval ("_level" + g_numScoreBoardLevel);
clearInterval(g_numLoadInterval);
g_fHideScoreBoard();
g_lvlScoreBoard._x = (g_numGameWidth - g_lvlScoreBoard.numWidth) / 2;
g_lvlScoreBoard._y = (g_numGameHeight - g_lvlScoreBoard.numHeight) / 2;
g_lvlScoreBoard.objUser = g_objUser;
if (g_blnDebug) {
g_lvlScoreBoard.numConnId = g_numConnId;
g_lvlScoreBoard.fSetDebug(g_blnDebug);
}
g_lvlScoreBoard.watch("strXMLToSend", g_fXMLFromScoreBoard);
g_fStartGameStepExecute();
}
}
function g_fXMLFromScoreBoard(prop, oldval, newval) {
var _local1 = newval;
if (_local1 != "") {
var _local2 = new XML();
_local2.parseXML(_local1);
if (_local2.status == 0) {
g_fSendToCSA(_local1);
}
}
return(_local1);
}
function g_fShowScoreBoard() {
if (mcScoreboardBack == undefined) {
attachMovie("mcScoreboardBack", "mcScoreboardBack", g_numMsgDepth + 100);
g_fCenter(mcScoreboardBack);
}
g_lvlScoreBoard._visible = true;
g_lvlScoreBoard.fSetGameType(g_strGameType);
g_lvlScoreBoard.fShow();
}
function g_fHideScoreBoard() {
if (mcScoreboardBack != undefined) {
mcScoreboardBack.removeMovieClip();
}
g_lvlScoreBoard._visible = false;
}
function g_fSendToCSA(a_strPacket) {
if (a_strPacket == undefined) {
} else {
var _local1 = ("<gameactions>" + a_strPacket) + "</gameactions>";
if (g_blnDebug) {
g_lcDebug.send("stend", "fReceivePacketFromFlash", _local1, g_numConnId);
} else {
fscommand ("SendCommand", _local1);
}
}
}
function g_fSendToServer(a_strPacket) {
if ((a_strPacket == undefined) || (g_blnPracticeGame)) {
} else {
var _local1 = ("<gamesend>" + a_strPacket) + "</gamesend>";
g_fSendToCSA(_local1);
}
}
function g_fSendStep(a_strPacket) {
if (a_strPacket == undefined) {
} else {
var _local3 = a_strPacket;
var _local2 = new XML(_local3);
var _local1 = 0;
while (_local1 < _local2.childNodes.length) {
_local2.childNodes[_local1].attributes.userid = String(g_objUser.numUserId);
_local1++;
}
_local3 = _local2.toString();
_local3 = ("<agmstep>" + _local3) + "</agmstep>";
g_fSendToServer(_local3);
}
}
function g_fReceiveFromCSA() {
if ((strXMLReceive == undefined) || (strXMLReceive == "")) {
return(undefined);
}
g_arrXMLReceived.push(strXMLReceive);
strXMLReceive = "";
g_fSendReadyToCSA();
}
function g_fSendReadyToCSA() {
clearInterval(readyForReceiveInt);
g_fSendToCSA("<readyforreceive/>");
readyForReceiveInt = setInterval(g_fSendReadyToCSA, 5000);
}
function g_fParseReceivedXML() {
if (g_arrXMLReceived.length == 0) {
return(undefined);
}
var xmlNextPacket = new XML(g_arrXMLReceived.shift());
if (xmlNextPacket.status != 0) {
return(undefined);
}
var i = 0;
while (i < xmlNextPacket.childNodes.length) {
if (xmlNextPacket.childNodes[i].nodeName.toLowerCase() == "gameactions") {
var j = 0;
while (j < xmlNextPacket.childNodes[i].childNodes.length) {
var xmlChild = xmlNextPacket.childNodes[i].childNodes[j];
var strPacketsName = xmlChild.nodeName.toLowerCase();
if (g_fSearchInArray(g_arrStdPacketsFromCSA, strPacketsName) >= 0) {
var theFunction = eval ("g_fXML" + strPacketsName);
var arrParams = new Array();
arrParams.push(xmlChild);
theFunction.apply(null, arrParams);
} else {
g_fUnknownXMLPacket(xmlChild);
}
j++;
}
} else {
g_fUnknownXMLPacket(xmlChild);
}
i++;
}
}
function g_fUnknownXMLPacket(a_xmlPacket) {
if (g_fGetDebug) {
if (mcUnknownPacket == undefined) {
attachMovie("mcUnknownPacket", "mcUnknownPacket", g_numMsgDepth + 1);
}
g_fCenter(mcUnknownPacket);
mcUnknownPacket.txtPacket.text = a_xmlPacket;
}
}
function g_fXMLAgmStartGame(a_xmlPacket) {
var _local2 = a_xmlPacket;
g_fStopGameStepExecute();
g_arrGameSteps.splice(0);
var _local1 = 0;
while (_local1 < _local2.childNodes.length) {
if (!(_local2.childNodes[_local1].nodeName.toLowerCase() === "startgamesituation")) {
} else if ((!g_blnRestoreGame) && (!g_blnAllReady)) {
g_fXMLStartGameSituation(_local2.childNodes[_local1]);
u_fInitGame();
gotoAndPlay ("syncronize");
}
_local1++;
}
}
function g_fXMLAgmRestoreGame(a_xmlPacket) {
g_blnRestoreGame = true;
var _local3 = 0;
while (_local3 < a_xmlPacket.childNodes.length) {
if (a_xmlPacket.childNodes[_local3].nodeName.toLowerCase() == "access") {
var _local2 = 0;
while (_local2 < a_xmlPacket.childNodes[_local3].childNodes.length) {
var _local1 = a_xmlPacket.childNodes[_local3].childNodes[_local2];
if (_local1.nodeName.toLowerCase() == "startgamesituation") {
g_fXMLStartGameSituation(_local1);
u_fInitGame();
} else {
g_arrGameSteps.push(_local1);
}
_local2++;
}
}
_local3++;
}
gotoAndPlay ("syncronize");
}
function g_fXMLGameInitialize(a_xmlPacket) {
var _local1 = a_xmlPacket;
if (g_blnInitialized) {
} else {
g_objUser.numUserId = Number(_local1.attributes.userid);
g_objUser.numChairId = Number(_local1.attributes.chairid);
g_objUser.numAvatarId = Number(_local1.attributes.avatarid);
g_objUser.strUserName = String(_local1.attributes.username);
gotoAndStop ("initialize");
}
}
function g_fXMLStandAlone(a_xmlPacket) {
g_blnPracticeGame = true;
g_objUser.blnActive = true;
if (mcAvatar != undefined) {
mcAvatar.setPlayerId(g_objUser.numUserId);
mcAvatar.setPlayerName(g_objUser.strUserName);
if ((g_objUser.numAvatarId > 0) && (g_fGetFlashVersion() > 5)) {
mcAvatar.loadAvatar(g_objUser.numAvatarId + ".jpg");
}
}
u_fInitPracticeGame();
if ((a_xmlPacket.attributes.practiceoptions == undefined) || (Number(a_xmlPacket.attributes.practiceoptions) == 0)) {
u_fInitGame();
gotoAndPlay ("syncronize");
} else {
var _local1 = g_objSAOptions.getOptions();
if (_local1.childNodes.length == 0) {
u_fInitGame();
gotoAndPlay ("syncronize");
} else {
g_fSendToCSA(_local1.toString());
}
}
}
function g_fXMLPracticeOptions(a_xmlPacket) {
var _local1 = 0;
while (_local1 < a_xmlPacket.childNodes.length) {
if (a_xmlPacket.childNodes[_local1].nodeName.toLowerCase() == "item") {
var _local2 = a_xmlPacket.childNodes[_local1];
var strName = _local2.attributes.name.toLowerCase();
var _local3 = _local2.attributes.value;
var strModifier = axmlItem.attributes.modifier;
switch (strName) {
case "time limit" :
g_numGameTime = Number(_local3) * 60;
mcTimer.setTimer(g_numGameTime);
break;
case "game number" :
if (strModifier == "normal") {
g_numRandomSeed = Number(_local3);
} else {
g_numRandomSeed = Math.floor(Math.random() * g_numMAXRandomSeed) + 1;
}
break;
default :
u_fXMLPracticeOptions(_local2);
}
}
_local1++;
}
u_fInitGame();
gotoAndPlay ("syncronize");
}
function g_fXMLGameResign(a_xmlPacket) {
if (a_xmlPacket.attributes.message != undefined) {
g_fShowMessage(a_xmlPacket.attributes.message);
}
if (g_objUser.blnActive == false) {
g_fGameFinished();
} else if ((g_lvlScoreBoard._visible == false) && (!g_blnGameOver)) {
g_fClickResign();
}
}
function g_fXMLGameStop(a_xmlPacket) {
g_fShowMessage(a_xmlPacket.attributes.message);
mcTimer.stopTimer();
g_blnPlayEnable = false;
}
function g_fXMLGameRestore(a_xmlPacket) {
g_fShowMessage(a_xmlPacket.attributes.message);
mcTimer.startTimer();
g_blnPlayEnable = true;
}
function g_fXMLGameFinished() {
mcTimer.stopTimer();
g_blnPlayEnable = false;
g_blnGameOver = true;
if (!g_lvlScoreBoard.blnAnswered) {
gamefinishInt = setInterval(g_fGameFinished, 10000);
} else {
g_fGameFinished();
}
}
function g_fXMLStartGameSituation(a_xmlPacket) {
var _local3 = a_xmlPacket;
g_strGameType = String(_local3.attributes.gametype);
var xmlGameInfo = new XML();
var _local2 = 0;
while (_local2 < _local3.childNodes.length) {
switch (_local3.childNodes[_local2].nodeName.toLowerCase()) {
case "gameinfo" :
xmlGameInfo = _local3.childNodes[_local2];
break;
case "gamers" :
var _local1 = 0;
for(;;){
if (_local1 >= _local3.childNodes[_local2].childNodes.length) {
break;
}
if (_local3.childNodes[_local2].childNodes[_local1].nodeName.toLowerCase() == "gamer") {
g_fXMLGamer(_local3.childNodes[_local2].childNodes[_local1], _local1 + 1);
}
_local1++;
};
}
_local2++;
}
u_fXMLGameInfo(xmlGameInfo);
}
function g_fXMLGamer(a_xmlPacket, a_numPlayer) {
var objPlayer = eval ("g_objPlayer" + String(a_numPlayer));
objPlayer.numUserId = Number(a_xmlPacket.attributes.userid);
if (objPlayer.numUserId == g_objUser.numUserId) {
g_objUser = eval ("g_objPlayer" + String(a_numPlayer));
g_objUser.blnActive = true;
}
objPlayer.strUserName = String(a_xmlPacket.attributes.username);
objPlayer.numAvatarId = Number(a_xmlPacket.attributes.avatarid);
objPlayer.numChairId = Number(a_xmlPacket.attributes.chairid);
var objAvatar = undefined;
if (g_fGetGameMode() == "multi") {
objAvatar = eval ("mcAvatar" + String(a_numPlayer));
} else if (objPlayer.numUserId == g_objUser.numUserId) {
objAvatar = mcAvatar;
}
if (objAvatar != undefined) {
objAvatar.setPlayerId(objPlayer.numUserId);
objAvatar.setPlayerName(objPlayer.strUserName);
if ((objPlayer.numAvatarId > 0) && (g_fGetFlashVersion() > 5)) {
objAvatar.loadAvatar(objPlayer.numAvatarId + ".jpg");
}
}
}
function g_fStartGameStepExecute() {
g_blnStepExecute = true;
}
function g_fStopGameStepExecute() {
g_blnStepExecute = false;
}
function g_fXMLAgmStep(a_xmlPacket) {
var _local2 = a_xmlPacket;
if (_local2.childNodes.length == 0) {
} else {
var _local1 = 0;
while (_local1 < _local2.childNodes.length) {
g_arrGameSteps.push(_local2.childNodes[_local1]);
_local1++;
}
}
}
function g_fXMLException(a_xmlPacket) {
g_blnPlayEnable = false;
g_fStopGameStepExecute();
mcTimer.stopTimer();
if (mcError == undefined) {
attachMovie("mcError", "mcError", g_numMsgDepth + 100);
}
g_fCenter(mcError);
g_fHideScoreBoard();
}
function g_fXMLAllAreReadyToGo(a_xmlPacket) {
if ((!g_blnRestoreGame) && (!g_blnAllReady)) {
g_blnAllReady = true;
gotoAndPlay ("startGame");
}
}
function g_fXMLGamerStatusNotify(a_xmlPacket) {
var _local2 = a_xmlPacket;
var _local1 = Number(_local2.attributes.userid);
var strNewStatus = String(_local2.attributes.gamerstatus).toLowerCase();
switch (strNewStatus) {
case "disconnect" :
if (_local1 != g_objUser.numUserId) {
g_numDisconnectStartAt = Math.floor(getTimer() / 1000);
g_numDisconnectTimer = Number(_local2.attributes.timeout) * 60;
g_lvlScoreBoard.numDisconnectStart = 0;
g_lvlScoreBoard.numDisconnectTimer = g_numDisconnectTimer;
if (g_fGetGameMode() == "multi") {
mcTimer.stopTimer();
g_blnPlayEnable = false;
if (!g_lvlScoreBoard._visible) {
if (g_objPlayer1.numUserId == _local1) {
var _local3 = new XML(((((("<gamerstate userid=\"" + g_objPlayer1.numUserId) + "\" username=\"") + g_objPlayer1.strUserName) + "\" avatarid=\"") + g_objPlayer1.numAvatarId) + "\" score=\"\" state=\"disconnect\" answer=\"\"/>");
g_lvlScoreBoard.fChangePlayerState(_local3.firstChild);
_local3 = new XML(((((("<gamerstate userid=\"" + g_objPlayer2.numUserId) + "\" username=\"") + g_objPlayer2.strUserName) + "\" avatarid=\"") + g_objPlayer2.numAvatarId) + "\" score=\"\" state=\"stillplaying\" answer=\"\"/>");
g_lvlScoreBoard.fChangePlayerState(_local3.firstChild);
} else if (g_objPlayer2.numUserId == _local1) {
var _local3 = new XML(((((("<gamerstate userid=\"" + g_objPlayer1.numUserId) + "\" username=\"") + g_objPlayer1.strUserName) + "\" avatarid=\"") + g_objPlayer1.numAvatarId) + "\" score=\"\" state=\"stillplaying\" answer=\"\"/>");
g_lvlScoreBoard.fChangePlayerState(_local3.firstChild);
_local3 = new XML(((((("<gamerstate userid=\"" + g_objPlayer2.numUserId) + "\" username=\"") + g_objPlayer2.strUserName) + "\" avatarid=\"") + g_objPlayer2.numAvatarId) + "\" score=\"\" state=\"disconnect\" answer=\"\"/>");
g_lvlScoreBoard.fChangePlayerState(_local3.firstChild);
}
g_fShowScoreBoard();
}
}
g_lvlScoreBoard.strXMLReceive = _local2.toString();
}
return;
case "stillplaying" :
g_lvlScoreBoard.strXMLReceive = _local2.toString();
if (_local1 != g_objUser.numUserId) {
g_numDisconnectStartAt = 0;
g_numDisconnectTimer = 0;
} else if (g_fGetGameMode() == "multi") {
if (((g_lvlScoreBoard.mcPlayerL.userID != _local1) && (g_lvlScoreBoard.mcPlayerL.state == "disconnect")) || ((g_lvlScoreBoard.mcPlayerR.userID != _local1) && (g_lvlScoreBoard.mcPlayerR.state == "disconnect"))) {
} else {
g_fHideScoreBoard();
if (!g_blnRestoreGame) {
mcTimer.startTimer();
g_blnPlayEnable = g_objUser.blnActive;
}
}
}
return;
default :
g_numDisconnectStartAt = 0;
g_numDisconnectTimer = 0;
g_lvlScoreBoard.strXMLReceive = _local2.toString();
}
}
function g_fXMLChairTimerReminder(a_xmlPacket) {
return(undefined);
}
function g_fXMLScoreBoard(a_xmlPacket) {
mcTimer.stopTimer();
g_blnPlayEnable = false;
var _local1 = Number(g_strGameType.substr(1, 1));
if (((_local1 == 0) || (_local1 == 1)) || (_local1 == 4)) {
g_lvlScoreBoard.numDisconnectStartAt = Math.floor(getTimer() / 1000) - g_numDisconnectStartAt;
g_lvlScoreBoard.numDisconnectTimer = ((g_numDisconnectTimer > 0) ? (g_numDisconnectTimer) : 600);
g_lvlScoreBoard.strXMLReceive = a_xmlPacket.toString();
g_fShowScoreBoard();
} else {
g_fShowGameOverMessage();
}
}
function g_fXMLTimerState(a_xmlPacket) {
if ((g_blnRestoreGame || (g_blnDebug)) && (Number(a_xmlPacket.attributes.userid) == g_objUser.numUserId)) {
mcTimer.setTimer(Number(a_xmlPacket.attributes.timer));
}
}
function g_fExecuteGameStep() {
if (g_arrGameSteps.length == 0) {
return(undefined);
}
var xmlNextStep = g_arrGameSteps.shift();
var strPacketsName = xmlNextStep.nodeName.toLowerCase();
var strFuncPrefix = "g_";
if (g_fSearchInArray(g_arrStdStepPackets, strPacketsName) == -1) {
strFuncPrefix = "u_";
}
var theFunction = eval ((strFuncPrefix + "fXML") + strPacketsName);
var arrParams = new Array();
arrParams.push(xmlNextStep);
theFunction.apply(null, arrParams);
}
function g_fGameOver(a_winnerid, a_reason) {
var _local2 = a_winnerid;
var _local3 = a_reason;
if (g_blnGameOver) {
} else {
u_fGameOver(_local2, _local3);
mcTimer.stopTimer();
g_blnPlayEnable = false;
g_blnGameOver = true;
if (g_blnStandAloneGame) {
if ((crypto == 2) || (crypto == 0)) {
postGameLog();
trace("score" + mcAvatar.getScore());
_root.xmlGameEnd.load((gameEndSubmitUrl + "?params=") + TEAEncrypt((((("freePlayID=" + freeplayid) + "&score=") + mcAvatar.getScore()) + "&timeStamp=") + timeStamp, tKey));
} else {
_root.t_fLoadGameEnd();
}
} else if (g_blnPracticeGame) {
g_fShowGameOverMessage();
} else {
g_fSendPlayerScore();
if ((_local3 != undefined) && (_local3 != "")) {
g_fSendStep(("<gameovermsg reason=\"" + _local3) + "\"/>");
}
var _local1 = "<gameover";
if ((_local2 != undefined) && (_local2 != 0)) {
_local1 = _local1 + ((" winnerid=\"" + _local2) + "\"");
}
_local1 = _local1 + "/>";
g_fSendStep(_local1);
}
}
}
function g_fSendPlayerScore() {
var _local1 = 0;
if (g_fGetGameMode() == "multi") {
_local1 = ((g_objUser.numUserId == g_objPlayer1.numUserId) ? (mcAvatar1.getScore()) : (mcAvatar2.getScore()));
} else {
_local1 = mcAvatar.getScore();
}
g_fSendStep(("<playerscore score=\"" + _local1) + "\"/>");
}
function g_fShowGameOverMessage() {
if (mcGameOver == undefined) {
attachMovie("mcGameOver", "mcGameOver", g_numMsgDepth);
g_fCenter(mcGameOver);
}
mcGameOver.grGameOver._visible = true;
mcGameOver.txtMessage._visible = false;
}
function g_fSendTimerState() {
if (g_blnPlayEnable && (!g_blnGameOver)) {
g_fSendStep(("<timerstate timer=\"" + mcTimer.getTimer()) + "\"/>");
}
}
function g_fClickResign() {
if ((g_blnGameOver || (!g_blnGameStarted)) || (g_lvlScoreBoard._visible)) {
return(undefined);
}
sndClick.start();
if (mcResign == undefined) {
attachMovie("mcResign", "mcResign", g_numMsgDepth);
g_fCenter(mcResign);
}
if (g_objUser.blnActive) {
mcResign.gotoAndStop("resign");
} else {
mcResign.gotoAndStop("stopWatching");
}
}
function g_fClickResignYes() {
sndClick.start();
mcTimer.stopTimer();
if (g_blnStandAloneGame) {
g_fGameOver(g_objUser.numUserId, "resign");
} else if (g_blnPracticeGame) {
g_blnPracticeGame = false;
g_fGameFinished();
} else {
var _local1 = 0;
if (g_fGetGameMode() == "multi") {
_local1 = ((g_objUser.numUserId == g_objPlayer1.numUserId) ? (g_objPlayer2.numUserId) : (g_objPlayer1.numUserId));
}
g_fGameOver(_local1, "resign");
}
}
function g_fClickResignNo() {
}
function g_fClickStopWatchingYes() {
sndClick.start();
g_blnPlayEnable = false;
g_blnGameOver = true;
g_fGameFinished();
}
function g_fClickStopWatchingNo() {
}
function g_fSetSoundOn() {
g_sndGlobalSound.setVolume(100);
sndClick.start();
}
function g_fSetSoundOff() {
sndClick.start();
g_sndGlobalSound.setVolume(0);
}
function g_fXMLGameOver(a_xmlPacket) {
if (g_fGetGameMode() != "multi") {
return(undefined);
}
mcTimer.stopTimer();
g_blnPlayEnable = false;
g_blnGameOver = true;
var numWinnerId = Number(a_xmlPacket.attributes.winnerid);
}
function g_fXMLGameOverMsg(a_xmlPacket) {
var _local2 = Number(a_xmlPacket.attributes.userid);
if ((g_fGetGameMode() == "single") && (_local2 != g_objUser.numUserId)) {
} else {
mcTimer.stopTimer();
g_blnPlayEnable = false;
g_blnGameOver = true;
var _local1 = String(a_xmlPacket.attributes.reason);
if ((g_lvlScoreBoard._visible == false) && (g_blnRestoreGame == false)) {
g_fStopGameStepExecute();
if (mcGameOver == undefined) {
attachMovie("mcGameOver", "mcGameOver", g_numMsgDepth);
g_fCenter(mcGameOver);
}
if (_local1.toLowerCase() == "resign") {
if ((_local2 != g_objUser.numUserId) && (g_objUser.blnActive)) {
mcGameOver.grGameOver._visible = false;
mcGameOver.txtMessage.text = "YOUR OPPONENT HAS RESIGNED";
mcGameOver.txtMessage._y = (-mcGameOver.txtMessage.textHeight) / 2;
} else {
mcGameOver.grGameOver._visible = true;
mcGameOver.txtMessage._visible = false;
}
} else if (_local1 != "") {
mcGameOver.grGameOver._visible = false;
mcGameOver.txtMessage.text = _local1;
mcGameOver.txtMessage._y = (-mcGameOver.txtMessage.textHeight) / 2;
} else {
mcGameOver.grGameOver._visible = true;
mcGameOver.txtMessage._visible = false;
}
}
}
}
function g_fClickOptionsBtn() {
sndClick.start();
if (mcOptions == undefined) {
attachMovie("mcOptions", "mcOptions", g_numMsgDepth);
g_fCenter(mcOptions);
}
}
function g_fStr2Bln(a_str) {
var _local1 = a_str.toLowerCase();
if (((_local1 == "true") || (_local1 == "t")) || (_local1 == "1")) {
return(true);
}
return(false);
}
function g_fGameFinished() {
clearInterval(readyForReceiveInt);
clearInterval(gamefinishInt);
g_fSendToCSA(g_arrStdAnswersToCSA.gamefinished);
}
function g_fLoadGameEnd() {
mcResign.removeMovieClip();
mcGameOver.removeMovieClip();
if (mcGameEnd != undefined) {
mcGameEnd.removeMovieClip();
}
createEmptyMovieClip("mcGameEnd", g_numMsgDepth + 100);
createEmptyMovieClip("mcGameEndBack", g_numMsgDepth + 99);
with (mcGameEndBack) {
var backColor = 0;
beginFill(backColor, 100);
lineStyle(1, backColor, 100);
moveTo(0, 0);
lineTo(g_numGameWidth, 0);
lineTo(g_numGameWidth, g_numGameHeight);
lineTo(0, g_numGameHeight);
lineTo(0, 0);
endFill();
}
var endUrlArray = new Array();
endUrlArray = endURL.split(".");
var subString = endUrlArray[endUrlArray.length - 1];
if ((subString == "aspx") || (subString == "html")) {
getURL (endURL, "_self");
} else {
loadMovie (endURL, mcGameEnd);
}
}
function g_fCheckGameEndLoading() {
if (mcGameEnd == undefined) {
clearInterval(loadEndGameInt);
} else if (mcGameEnd.getBytesLoaded() >= mcGameEnd.getBytesTotal()) {
if ((mcGameEnd._width > 0) && (mcGameEnd._height > 0)) {
clearInterval(loadEndGameInt);
if ((mcGameEnd._width > g_numGameWidth) || (mcGameEnd._height > g_numGameHeight)) {
var _local2 = g_numGameWidth / mcGameEnd._width;
var _local1 = g_numGameHeight / mcGameEnd._height;
mcGameEnd._xscale = (mcGameEnd._yscale = 100 * Math.min(_local2, _local1));
}
mcGameEnd._x = (g_numGameWidth - mcGameEnd._width) / 2;
mcGameEnd._y = (g_numGameHeight - mcGameEnd._height) / 2;
}
}
}
function getAffiliateId() {
return(affiliateId);
}
function getPlayerScore() {
return(mcAvatar.getScore());
}
function playAgain() {
if (mcGameEnd != undefined) {
mcGameEnd.removeMovieClip();
}
u_fRemoveGameClips();
g_blnPlayEnable = false;
g_blnGameOver = false;
g_blnGameStarted = false;
gotoAndStop ("initialize");
}
function downloadStandAlone() {
getURL (downloadURL, "_blank");
}
function chooseGameEndProcedure() {
if (tKey == undefined) {
tKey = "sjri5jf85jdor560";
}
gameEndSubmitUrl = "http://freeplay.gamedek.com/gameend.aspx";
if (params == undefined) {
myVariables.load("config.txt");
} else {
decryptParams(params);
crypto = 2;
}
}
function t_fLoadGameEnd() {
mcResign.removeMovieClip();
mcGameOver.removeMovieClip();
if (mcGameEnd != undefined) {
mcGameEnd.removeMovieClip();
}
createEmptyMovieClip("mcGameEnd", g_numMsgDepth + 100);
createEmptyMovieClip("mcGameEndBack", g_numMsgDepth + 99);
with (mcGameEndBack) {
var backColor = 0;
beginFill(backColor, 100);
lineStyle(1, backColor, 100);
moveTo(0, 0);
lineTo(g_numGameWidth, 0);
lineTo(g_numGameWidth, g_numGameHeight);
lineTo(0, g_numGameHeight);
lineTo(0, 0);
endFill();
}
var endUrlArray = new Array();
endUrlArray = endURL.split(".");
var subString = endUrlArray[endUrlArray.length - 1];
if ((subString == "aspx") || (subString == "html")) {
getURL (endURL, "_self");
} else {
loadMovie (endURL, mcGameEnd);
}
}
function postGameLog() {
if (gameLogEnabled == 1) {
var _local1 = new LoadVars();
var _local2 = TEAEncrypt((("freeplayid=" + freeplayid) + "&gameLog=") + gameLog, tKey);
_local1.params = _local2;
_local1.sendAndLoad(gameEndSubmitUrl, result_lv, "POST");
gameLog = "";
}
}
function addToLog(myAddition) {
if (gameLogEnabled == 1) {
gameLog = gameLog + myAddition;
}
}
function trc(theString) {
trace((theString + ": ") + eval (theString));
}
function TEAEncrypt(src, key) {
var _local2 = charsToLongs(strToChars(src));
var k = charsToLongs(strToChars(key));
var n = _local2.length;
if (n == 0) {
return("");
}
if (n == 1) {
_local2[n++] = 0;
}
var _local3 = _local2[n - 1];
var y = _local2[0];
var delta = 2654435769;
var max32 = 4294967295;
var mx;
var e;
var q = Math.floor(6 + (52 / n));
var sum = 0;
var sum2 = 0;
while ((q--) > 0) {
sum = sum + delta;
sum = sum >>> 0;
e = (sum >>> 2) & 3;
var _local1 = 0;
while (_local1 < (n - 1)) {
y = _local2[_local1 + 1];
mx = (((_local3 >>> 5) ^ (y << 2)) + ((y >>> 3) ^ (_local3 << 4))) ^ ((sum ^ y) + (k[(_local1 & 3) ^ e] ^ _local3));
mx = mx >>> 0;
_local2[_local1] = _local2[_local1] + mx;
_local2[_local1] = _local2[_local1] >>> 0;
_local3 = _local2[_local1];
_local1++;
}
y = _local2[0];
mx = (((_local3 >>> 5) ^ (y << 2)) + ((y >>> 3) ^ (_local3 << 4))) ^ ((sum ^ y) + (k[(_local1 & 3) ^ e] ^ _local3));
mx = mx >>> 0;
_local2[n - 1] = _local2[n - 1] + mx;
_local2[n - 1] = _local2[n - 1] >>> 0;
_local3 = _local2[n - 1];
}
return(charsToHex(longsToChars(_local2)));
}
function TEADecrypt(src, key) {
var v = charsToLongs(hexToChars(src));
var k = charsToLongs(strToChars(key));
var n = v.length;
if (n == 0) {
return("");
}
var _local2 = v[n - 1];
var _local3 = v[0];
var delta = 2654435769;
var mx;
var e;
var q = Math.floor(6 + (52 / n));
var sum = (q * delta);
while (sum != 0) {
e = (sum >>> 2) & 3;
var _local1 = n - 1;
while (_local1 > 0) {
_local2 = v[_local1 - 1];
mx = (((_local2 >>> 5) ^ (_local3 << 2)) + ((_local3 >>> 3) ^ (_local2 << 4))) ^ ((sum ^ _local3) + (k[(_local1 & 3) ^ e] ^ _local2));
_local3 = (v[_local1] = v[_local1] - mx);
_local1--;
}
_local2 = v[n - 1];
mx = (((_local2 >>> 5) ^ (_local3 << 2)) + ((_local3 >>> 3) ^ (_local2 << 4))) ^ ((sum ^ _local3) + (k[(_local1 & 3) ^ e] ^ _local2));
_local3 = (v[0] = v[0] - mx);
sum = sum - delta;
}
return(charsToStr(longsToChars(v)));
}
function charsToLongs(chars) {
var _local2 = chars;
var _local3 = new Array(Math.ceil(_local2.length / 4));
var _local1 = 0;
while (_local1 < _local3.length) {
_local3[_local1] = ((_local2[_local1 * 4] + (_local2[(_local1 * 4) + 1] << 8)) + (_local2[(_local1 * 4) + 2] << 16)) + (_local2[(_local1 * 4) + 3] << 24);
_local1++;
}
return(_local3);
}
function longsToChars(longs) {
var _local2 = longs;
var _local3 = new Array();
var _local1 = 0;
while (_local1 < _local2.length) {
_local3.push(_local2[_local1] & 255, (_local2[_local1] >>> 8) & 255, (_local2[_local1] >>> 16) & 255, (_local2[_local1] >>> 24) & 255);
_local1++;
}
return(_local3);
}
function charsToHex(chars) {
var _local2 = chars;
var result = new String("");
var _local3 = new Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f");
var _local1 = 0;
while (_local1 < _local2.length) {
result = result + (_local3[_local2[_local1] >> 4] + _local3[_local2[_local1] & 15]);
_local1++;
}
return(result);
}
function hexToChars(hex) {
var _local2 = hex;
var _local3 = new Array();
var _local1 = ((_local2.substr(0, 2) == "0x") ? 2 : 0);
while (_local1 < _local2.length) {
_local3.push(parseInt(_local2.substr(_local1, 2), 16));
_local1 = _local1 + 2;
}
return(_local3);
}
function charsToStr(chars) {
var _local2 = chars;
var _local3 = new String("");
var _local1 = 0;
while (_local1 < _local2.length) {
_local3 = _local3 + String.fromCharCode(_local2[_local1]);
_local1++;
}
return(_local3);
}
function strToChars(str) {
var _local2 = str;
var _local3 = new Array();
var _local1 = 0;
while (_local1 < _local2.length) {
_local3.push(_local2.charCodeAt(_local1));
_local1++;
}
return(_local3);
}
function decryptParams(myParams) {
decPar = TEADecrypt(myParams, tKey);
arrayOfVars = new Array();
arrayOfVars = decPar.split("&");
count = 0;
while (count < arrayOfVars.length) {
varHolder = new Array();
varHolder = arrayOfVars[count].split("=");
Set(varHolder[0], varHolder[1]);
count++;
}
}
stop();
fscommand ("showmenu", "false");
XML.prototype.ignoreWhite = true;
var g_arrXMLToSend = new Array();
var g_arrXMLReceived = new Array();
var g_arrGameSteps = new Array();
var g_blnInitialized = false;
var g_blnAllReady = false;
var g_blnPlayEnable = false;
var g_blnRestoreGame = false;
var g_blnStepExecute = false;
var g_blnGameStarted = false;
var g_blnGameOver = false;
var g_blnPracticeGame = false;
var g_blnStandAloneGame = false;
var g_blnDisconnected = false;
var g_blnDebug = false;
var g_numConnId = -1;
var g_numGameWidth = 640;
var g_numGameHeight = 480;
var g_numBackColor = 0;
var g_numRandomSeed = 0;
var g_numMAXRandomSeed = 256000;
var g_numPrize = 0;
var g_numGameTime = 0;
var g_numDisconnectTimer = 0;
var g_numDisconnectStartAt = 0;
var g_numLoadInterval = 0;
var g_numScoreBoardLevel = 9;
var g_lvlScoreBoard = null;
var g_strGameType = "00";
var g_strGameMode = "single";
var g_strPracticeOptions = "";
var g_strGameVersion = "ver 0.000";
var g_objUser = new Object();
var g_objPlayer1 = new Object();
var g_objPlayer2 = new Object();
var g_objSAOptions = new Object({arrItems:new Array()});
var g_sndGlobalSound = new Sound();
var strXMLReceive = "";
createEmptyMovieClip("mcSBGExecuter", 10000001);
mcSBGExecuter.onEnterFrame = function () {
if (strXMLReceive != "") {
g_fReceiveFromCSA();
}
if (g_arrXMLReceived.length > 0) {
g_fParseReceivedXML();
}
if (g_blnStepExecute && (g_arrGameSteps.length > 0)) {
g_fExecuteGameStep();
}
};
var g_numMsgDepth = 1000000;
var g_arrStdAnswersToCSA = new Array();
g_arrStdAnswersToCSA.readyforreceive = "<readyforreceive/>";
g_arrStdAnswersToCSA.gamestarted = "<gamestarted/>";
g_arrStdAnswersToCSA.gamefinished = "<gamefinished/>";
g_arrStdAnswersToCSA.readytogo = "<readytogo/>";
g_arrStdAnswersToCSA.gameloaded = "<gameloaded/>";
var g_arrStdPacketsFromCSA = new Array("agmstep", "gameinitialize", "standalone", "practiceoptions", "gameresign", "gamestop", "gamerestore", "agmstartgame", "agmrestoregame");
var g_arrStdStepPackets = new Array("setturn", "exception", "allarereadytogo", "gamerstatusnotify", "chairtimerreminder", "scoreboard", "gamefinished", "timerstate", "offerdraw", "answerofferdraw", "gameover", "gameovermsg", "allowtoplay", "playerstimer");
var g_A = 3423313;
var g_C = 2435;
g_objSAOptions.addItem = function (a_name, a_value, a_type, a_modifier, a_arrConstraints) {
var _local1 = a_type;
var _local2 = a_name;
var _local3 = this;
if ((_local1 == undefined) || ((((_local1 != "checkbox") && (_local1 != "combobox")) && (_local1 != "randomseed")) && (_local1 != "integernumeric"))) {
} else if (_local3.arrItems[_local2] == undefined) {
_local3.arrItems[_local2] = new Object({name:_local2, type:_local1, value:a_value, modifier:a_modifier, arrConstraints:a_arrConstraints.slice(0)});
} else {
_local3.changeItem(_local2, a_value, _local1, a_modifier, a_arrConstraints);
}
};
g_objSAOptions.changeItem = function (a_name, a_value, a_type, a_modifier, a_arrConstraints) {
var _local1 = a_name;
var _local2 = a_type;
var _local3 = this;
if ((((_local1 == undefined) || (_local1 == "")) || (_local2 == undefined)) || ((((_local2 != "checkbox") && (_local2 != "combobox")) && (_local2 != "randomseed")) && (_local2 != "integernumeric"))) {
} else {
_local3.arrItems[_local1].type = _local2;
_local3.arrItems[_local1].value = a_value;
_local3.arrItems[_local1].modifier = a_modifier;
_local3.arrItems[_local1].arrConstraints = a_arrConstraints.splice(0);
}
};
g_objSAOptions.removeItem = function (a_name) {
var _local1 = a_name;
if (((_local1 == undefined) || (_local1 == "")) || (this.arrItems[_local1] == undefined)) {
} else {
delete this.arrItems[_local1];
}
};
g_objSAOptions.getOptions = function () {
var _local2 = this;
var _local3 = new XML("<practiceoptions/>").firstChild;
for (var item in _local2.arrItems) {
xmlItem = new XML("<item/>").firstChild;
xmlItem.attributes.name = _local2.arrItems[item].name;
xmlItem.attributes.value = _local2.arrItems[item].value;
xmlItem.attributes.type = _local2.arrItems[item].type;
xmlItem.attributes.modifier = _local2.arrItems[item].modifier;
var _local1 = 0;
while (_local1 < _local2.arrItems[item].arrConstraints.length) {
xmlConstraint = new XML("<constraint/>").firstChild;
xmlConstraint.attributes.name = _local2.arrItems[item].arrConstraints[_local1].name;
xmlConstraint.attributes.value = _local2.arrItems[item].arrConstraints[_local1].value;
xmlItem.appendChild(xmlConstraint);
_local1++;
}
_local3.appendChild(xmlItem);
}
return(_local3);
};
g_fSetGameMode("single");
g_fSendToCSA(g_arrStdAnswersToCSA.gameloaded.toString());
g_fInitUser();
System.security.allowDomain("http://freeplay.gamedek.com/");
g_blnStandAloneGame = true;
g_blnPracticeGame = true;
endURL = "http://freeplay.gamedek.com/game_ends/ending_unknown.swf";
downloadURL = "http://www.gamedek.com/?aff=";
affiliateId = 0;
if (freeplayid == undefined) {
loadVariables ("config.txt", _root);
trace(endURL);
}
playAgain();
var crypto = 0;
var gameLog = "";
myVariables = new LoadVars();
myVariables.onLoad = function (success) {
if (success) {
crypto = 1;
_root.decryptParams(this.params);
} else {
crypto = 0;
}
};
_root.xmlGameEnd = new XML();
_root.xmlGameEnd.onLoad = function (success) {
var _local1 = _root;
if (success) {
_local1.decryptParams(this.firstChild.firstChild.nodeValue);
_local1.endURL = _local1.gameEndUrl;
_local1.t_fLoadGameEnd();
delete this.onLoad;
}
};
var result_lv = new LoadVars();
result_lv.onLoad = function (success) {
if (success) {
trace("whatAmI" + this);
} else {
trace("Error receiving from server.");
}
};
if (g_blnStandAloneGame) {
_quality = "BEST";
_root.menu.hide();
fscommand ("showmenu", "false");
System.security.allowDomain(domainToAllow);
System.security.allowDomain("http://freeplay.gamedek.com/");
chooseGameEndProcedure();
}
function Vector2d(ax, ay) {
this.x = ax;
this.y = ay;
}
function Add(v1, v2) {
return(new Vector2d(v1.x + v2.x, v1.y + v2.y));
}
function Sub(v1, v2) {
return(new Vector2d(v1.x - v2.x, v1.y - v2.y));
}
function Nrm(v) {
var _local1 = v;
return(Math.sqrt((_local1.x * _local1.x) + (_local1.y * _local1.y)));
}
function Normz(v) {
var _local1 = v;
return(new Vector2d(_local1.x / nrm(_local1), _local1.y / nrm(_local1)));
}
function Mul(num, v) {
return(new Vector2d(num * v.x, num * v.y));
}
function Scal(v1, v2) {
return((v1.x * v2.x) + (v1.y * v2.y));
}
function RtoD(x) {
return((x * 180) / Math.PI);
}
function DtoR(x) {
return((x * Math.PI) / 180);
}
g_strGameVersion = "v 0.001";
var numGameWidth = 580;
var numGameHeight = 445;
var messageDepth = 50000;
var record_table_script_url = "rt.jsp";
var currentPreview = "";
var dt = 0.0333333333333333;
var numOriginalSeed = 0;
var blnGameStart;
var numColors = 6;
var ball_speed = 300;
var one_pnts = 10;
var pointsPerEgg = 0;
var diameter = 30;
var q_diameter = (diameter * diameter);
var square = 32;
var n_rows = 20;
var n_columns = 10;
var c_n_rows = 8;
var pnts = 0;
var id;
var wnd_state = new Boolean();
var cur_frm = 0;
var tail = new Vector2d(_root.arw._x, _root.arw._y);
var a = new Array(n_rows);
var st = new Array(n_rows + 1);
var ready_id = null;
var ready_col = null;
var next_id = null;
var next_col = null;
var rolling = new Object();
var state = new Boolean();
var max_try = 5;
var cur_try = 0;
var pnts = 0;
var gameover_v = new Boolean();
var gameover_v = false;
var playSound = new Boolean();
var fire_s = new Sound(_root);
var remove_s = new Sound(_root);
var bombDel_y = new Array(0, 0, 0, 0, 0, 0, -1, -1, -1, -1, -1, -1, -2, -2, -2, -2, -2, -3, -3, -3, -3, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3);
var bombDel_x1 = new Array(-1, 1, -2, 2, -3, 3, 0, -1, -2, -3, 1, 2, 0, -1, -2, 1, 2, 0, -1, -2, 1, 0, -1, -2, -3, 1, 2, 0, -1, -2, 1, 2, 0, -1, -2, 1);
var bombDel_x2 = new Array(-1, 1, -2, 2, -3, 3, 0, -1, -2, 1, 2, 3, 0, -1, -2, 1, 2, 0, -1, 1, 2, 0, -1, -2, 1, 2, 3, 0, -1, -2, 1, 2, 0, -1, 1, 2);
var bombBorder_y = new Array(-4, -4, -4, -4, -4, -3, -3, -2, -2, -1, -1, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4);
var bombBorder_x1 = new Array(-2, -1, 0, 1, 2, -3, 2, -3, 3, -4, 3, -4, 4, -4, 3, -3, 3, -3, 2, -2, -1, 0, 1, 2);
var bombBorder_x2 = new Array(-2, -1, 0, 1, 2, -2, 3, -3, 3, -3, 4, -4, 4, -3, 4, -3, 3, -2, 3, -2, -1, 0, 1, 2);
var toDestr = new Array();
var brd = new Array();
var tmp = new Array();
var bb1 = new Boolean();
var bb2 = new Boolean();
var bb3 = new Boolean();
var bombLoaded = new Boolean();
var current_level = 1;
Frame 13
stop();
g_fCenter(btnMessageBack);
g_fSetGameBackgroundColor("1D134F");
g_fSetGameSize(580, 445);
u_fInitGame();
g_fGameInitialized();
if (g_blnStandAloneGame) {
gotoAndStop ("syncronize");
} else {
u_fInitGame();
g_fLoadScoreBoard();
}
mcAvatar.setRight();
function u_fStartGame() {
var _local3 = _root;
mcTimer.timerWarning = fTimerWarning;
mcTimer.timesRunOut = fGameOver;
mcTimer.timeBonus = fTimeBonus;
if (!g_blnRestoreGame) {
mcTimer.timesRunOut = g_fGameOver;
}
mcTimer.startTimer();
g_blnGameStarted = true;
g_blnPlayEnable = true;
tail = new Vector2d(_local3.arw._x, _local3.arw._y);
_local3.parent_b1._visible = false;
_local3.parent_b2._visible = false;
_local3.parent_b3._visible = false;
_local3.parent_b4._visible = false;
_local3.parent_b5._visible = false;
_local3.parent_b6._visible = false;
_local3.parent_b7._visible = false;
_local3.fld.globalToLocal(tail);
var _local2 = 0;
while (_local2 < (n_rows + 2)) {
a[_local2] = new Array(n_columns);
_local2++;
}
_local2 = 0;
while (_local2 < (n_rows + 2)) {
var _local1 = 0;
while (_local1 < (n_columns + 2)) {
a[_local2][_local1] = new Object();
a[_local2][_local1].sel = new Boolean(false);
a[_local2][_local1].free = new Boolean(true);
_local1++;
}
_local2++;
}
arw.g_b.gotoAndStop(1);
var arr_ball = new Array();
bb1 = false;
bb2 = false;
bb3 = false;
bomb1.theBomb._visible = true;
bomb2.theBomb._visible = true;
bomb3.theBomb._visible = true;
restart_init(current_level);
state = false;
_local3.attachMovie("shotWallWindow", "shtWllWnd", 110000);
_local3.shtWllWnd._x = 175;
_local3.shtWllWnd._y = 150;
_local3.colorWall.body.play();
initBomb = function () {
bombLoaded = true;
removeMovieClip(("_root.ball" + ready_col) + ready_id);
ready_col = 7;
arw.g_b.g_b2.nextBall.gotoAndStop(ready_col + 1);
cur_frm = ready_col + 1;
var _local1 = ready_col;
duplicateMovieClip ("_root.parent_b" + _local1, ("ball" + _local1) + id, id);
setProperty(("ball" + _local1) + id, _x , v.x);
setProperty(("ball" + _local1) + id, _y , v.y);
setProperty(("ball" + _local1) + id, _visible , false);
ready_id = id;
id++;
setProperty(("_root.ball" + ready_col) + ready_id, _x , _root.arw._x);
setProperty(("_root.ball" + ready_col) + ready_id, _y , _root.arw._y);
arr_ball.push(("ball" + _local1) + id);
};
}
function u_fInitGame() {
blnGameStart = true;
numOriginalSeed = g_numRandomSeed;
_root._nextLevel = function () {
removeMovieClip("shtWllWnd");
state = true;
_root._nextLevel = function () {
removeMovieClip("nxtLev");
restart_init(current_level + 1);
state = true;
};
};
numGameWidth = 490;
numGameHeight = 450;
messageDepth = 50000;
numOriginalSeed = g_numRandomSeed;
record_table_script_url = "rt.jsp";
currentPreview = "";
dt = 0.0333333333333333;
numColors = 6;
ball_speed = 300;
one_pnts = 10;
pointsPerEgg = 0;
diameter = 30;
q_diameter = diameter * diameter;
square = 32;
n_rows = 20;
n_columns = 10;
c_n_rows = 8;
pnts = 0;
cur_frm = 0;
ready_id = null;
ready_col = null;
next_id = null;
next_col = null;
max_try = 5;
cur_try = 0;
pnts = 0;
current_level = 1;
gameover_v = false;
playSound = true;
bb1 = false;
bb2 = false;
bb3 = false;
bombLoaded = false;
u_fInitSounds();
}
function u_fInitSounds() {
var _local1 = _root;
sndClick = new Sound();
sndClick.attachSound("Button_Click");
sndTimerWarning = new Sound();
sndTimerWarning.attachSound("Timer_Warning");
var _local2 = "";
sndFire = new Sound();
sndFire.attachSound("FireSound");
sndBomb = new Sound();
sndBomb.attachSound("BombSound");
sndFireBomb = new Sound();
sndFireBomb.attachSound("JaybushSound");
sndFireBomb.setVolume(100);
sndFireBomb.onSoundComplete = function () {
_root.shootBomb();
};
sndPop = new Sound();
sndPop.attachSound("PopSound");
sndRoller = new Sound();
sndRoller.attachSound("RollerSound");
sndWhistle = new Sound();
sndWhistle.attachSound("Whistle");
sndGameOver = new Sound();
sndGameOver.attachSound("GameOverSound");
sndNextLine = new Sound();
sndNextLine.attachSound("NextLineSound");
sndNextLevel = new Sound();
sndNextLevel.attachSound("NextLevelSound");
sndWallBounce = new Sound();
sndWallBounce.attachSound("WallBounceSound");
sndNewGame = new Sound();
sndPlateClick.attachSound("PlateClickSound");
fire_s = new Sound(_local1);
fire_s.attachSound("fire");
fire_s.setVolume(40);
remove_s = new Sound(_local1);
remove_s.attachSound("remove");
_local2 = "Sound Off";
sndNewGame.start();
}
function u_fPreopenOptions() {
mcOptions.setBoard2d(blnLayout2d);
mcOptions.setAnimation(blnAnimation);
}
function u_fChangeOptions() {
blnAnimation = mcOptions.blnAnimation;
if (blnLayout2d != mcOptions.blnLayout2d) {
blnLayout2d = mcOptions.blnLayout2d;
fChangeLayout();
}
}
function u_fGameOver(a_winnerid, a_reason) {
sndRoller.stop();
sndGameOver.start();
pointsPerEgg = 0;
var i = 1;
while (i <= n_rows) {
var j = 1;
while (j <= n_columns) {
if (!a[i][j].free) {
eval (("_root.ball" + a[i][j].col) + a[i][j].cid).gotoAndPlay(16);
a[i][j].free = true;
}
j++;
}
i++;
}
if (ready_id != null) {
eval (("ball" + ready_col) + ready_id).gotoAndPlay(16);
eval (("ball" + next_col) + next_id).gotoAndPlay(16);
}
removeMovieClip(arw);
gameover_v = true;
mcAvatar.setScore(_root.pnts);
}
function u_fInitPracticeGame() {
if (g_blnStandAloneGame) {
g_objUser.blnActive = true;
g_numRandomSeed = Math.floor(Math.random() * 1000) + 1;
numTotalTime = 300;
mcTimer.setTimer(numTotalTime);
u_fInitGame();
mcAvatar.setScore(0);
} else {
g_objSAOptions.addItem("Time Limit", "1", "integernumeric", "normal", new Array({name:"MinValue", value:1}, {name:"MaxValue", value:10}));
g_objSAOptions.addItem("Game Number", "1", "randomseed", "hidden", new Array({name:"MinValue", value:1}, {name:"MaxValue", value:256000}));
}
}
function u_fXMLPracticeOptions(a_xmlPacket) {
numTotalTime = g_numGameTime;
}
function u_fRemoveGameClips() {
mcError.removeMovieClip();
mcGameOver.removeMovieClip();
mcResign.removeMovieClip();
mcHelp.removeMovieClip();
mcGameEndBack.removeMovieClip();
if (mcGameEnd != undefined) {
unloadMovie (mcGameEnd);
mcGameEnd.removeMovieClip();
}
removeMovieClip(arw);
}
function u_fXMLGameInfo(a_xmlPacket) {
var _local1 = a_xmlPacket;
var _local2 = this;
for (var _local3 in _local1.attributes) {
_local2[_local3] = _local1.attributes[_local3];
}
g_numRandomSeed = randomseed;
var numSeconds = ((60 * Number(timer.substr(3, 2))) + Number(timer.substr(6, 2)));
mcTimer.setTimer(numSeconds);
}
function u_fXMLgamelevel(a_xmlPacket) {
var _local1 = a_xmlPacket;
g_fStopGameStepExecute();
var _local2 = Number(_local1.attributes.userid);
if (g_blnRestoreGame && (_local2 == g_objUser.numUserId)) {
mcTimer.setTimer(Number(_local1.attributes.timer));
pnts = Number(_local1.attributes.pnts);
current_level = Number(_local1.attributes.nlevel);
}
g_fStartGameStepExecute();
}
function removeEndRoundEggs() {
pointsPerEgg = (one_pnts * current_level) * current_level;
var i = 1;
while (i <= n_rows) {
var j = 1;
while (j <= n_columns) {
if (!a[i][j].free) {
eval (("_root.ball" + a[i][j].col) + a[i][j].cid).gotoAndPlay(16);
a[i][j].free = true;
}
j++;
}
i++;
}
if (ready_id != null) {
eval (("ball" + ready_col) + ready_id).gotoAndPlay(16);
eval (("ball" + next_col) + next_id).gotoAndPlay(16);
}
}
function restart_init(n_l) {
current_level = n_l;
g_fSendStep(((((("<gamelevel nlevel='" + current_level) + "' pnts='") + pnts) + "' roundRandSeed='") + g_numRandomSeed) + "'>");
mcAvatar.setScore(pnts);
g_numRandomSeed = numOriginalSeed + current_level;
g_fSendPlayerScore();
g_fSendTimerState();
if (current_level < 9) {
nightShield._alpha = (100 - (12 * current_level)) + (12 - current_level);
}
_root.f1._visible = false;
_root.f2._visible = false;
_root.f3._visible = false;
_root.f4._visible = false;
_root.f5._visible = false;
GameOv._visible = false;
id = 5;
var csh = 0;
var i = 1;
while (i < (n_rows + 1)) {
st[i] = csh;
if (csh == 0) {
csh = square / 2;
} else {
csh = 0;
}
i++;
}
max_try = 5;
cur_try = 0;
feedStand.gotoAndStop(max_try + 1);
pointsPerEgg = one_pnts * current_level;
var i = 1;
while (i <= n_rows) {
var j = 1;
while (j <= n_columns) {
if (!a[i][j].free) {
eval (("_root.ball" + a[i][j].col) + a[i][j].cid).gotoAndPlay(16);
a[i][j].free = true;
}
j++;
}
i++;
}
if (ready_id != null) {
eval (("ball" + ready_col) + ready_id).gotoAndPlay(16);
eval (("ball" + next_col) + next_id).gotoAndPlay(16);
}
var levelRows = (2 + n_l);
if (levelRows > 8) {
levelRows = 8;
}
var i = 1;
while (i <= levelRows) {
var j = 1;
while (j <= n_columns) {
var cur_crd = getCoord(new Vector2d(j, i));
_root.fld.localToGlobal(cur_crd);
atrib = RandomBall(cur_crd, true);
a[i][j].col = atrib.x;
a[i][j].cid = atrib.y;
eval (("ball" + a[i][j].col) + a[i][j].cid).gotoAndStop(1);
a[i][j].sel = false;
a[i][j].free = false;
j++;
}
i++;
}
var next_crd = new Vector2d(_root.fld._width, _root.fld._height);
_root.fld.localToGlobal(next_crd);
var atrib = RandomBall(next_crd, false);
next_col = atrib.x;
next_id = atrib.y;
wnd_state = false;
next_ball_init();
trace(n_l - Math.floor(n_l / 6));
colorWall.gotoAndStop(n_l - Math.floor(n_l / 6));
sndNextLine.start();
}
function moveMouse() {
var _local1 = _root;
var _local2 = new Vector2d(_local1._xmouse, _local1._ymouse);
_local1.fld.globalToLocal(_local2);
if ((((_local2.x > _local1.fld._width) || (_local2.y > _local1.fld._height)) || (_local2.x < 0)) || (_local2.y < 0)) {
Mouse.show();
} else {
Mouse.hide();
if (wnd_state || (gameover_v)) {
Mouse.show();
} else if (!state) {
} else {
var dir = Normz(Sub(_local2, tail));
_local1.fld.globalToLocal();
var _local3 = Math.acos(Scal(new Vector2d(-1, 0), dir));
_local1.arw._rotation = RtoD(_local3) - 90;
_local1.arw.g_b.g_b2.beanBowl._rotation = -1 * _local1.arw._rotation;
}
}
}
function next_ball_init() {
var _local1 = _root;
ready_col = next_col;
ready_id = next_id;
arw.g_b.g_b2.nextBall.gotoAndStop(ready_col + 1);
cur_frm = ready_col + 1;
setProperty(("_root.ball" + ready_col) + ready_id, _x , _local1.arw._x);
setProperty(("_root.ball" + ready_col) + ready_id, _y , _local1.arw._y);
var _local2 = new Vector2d(_local1.fld._width, _local1.fld._height);
_local1.fld.localToGlobal(_local2);
var _local3 = RandomBall(_local2, false);
next_col = _local3.x;
next_id = _local3.y;
nxtBl.gotoAndStop(7);
nxtBl.gotoAndStop(next_col);
state = true;
state_1 = true;
bombLoaded = false;
moveMouse();
}
function enter_frame() {
if (wnd_state) {
return(undefined);
}
if (gameover_v) {
return(undefined);
}
if (state_1) {
return(undefined);
}
var cd = new Vector2d(getProperty(rolling.image, _x), getProperty(rolling.image, _y));
var i = 0;
while (i < 2) {
fld.globalToLocal(cd);
if (testHit(cd) || (cd.y < (diameter / 2))) {
fs = getSquare(cd);
fc = getCoord(fs);
_root.fld.localToGlobal(fc);
setProperty(rolling.image, _x , fc.x);
setProperty(rolling.image, _y , fc.y);
a[fs.y][fs.x].col = ready_col;
a[fs.y][fs.x].cid = ready_id;
a[fs.y][fs.x].sel = false;
a[fs.y][fs.x].free = false;
eval (("_root.ball" + a[fs.y][fs.x].col) + a[fs.y][fs.x].cid).gotoAndStop(1);
if (fs.y == 1) {
nextLevel();
return(undefined);
}
if (bombLoaded) {
eval (("_root.ball" + a[fs.y][fs.x].col) + a[fs.y][fs.x].cid).gotoAndPlay(16);
a[fs.y][fs.x].sel = false;
a[fs.y][fs.x].free = true;
var i = 0;
while (i < bombDel_y.length) {
if (st[fs.y] == 0) {
var xx = (fs.x + bombDel_x1[i]);
var yy = (fs.y + bombDel_y[i]);
} else {
var xx = (fs.x + bombDel_x2[i]);
var yy = (fs.y + bombDel_y[i]);
}
if (((((yy >= 1) && (yy <= 14)) && (xx >= 1)) && (xx <= 13)) && (!a[yy][xx].free)) {
pointsPerEgg = one_pnts;
eval (("_root.ball" + a[yy][xx].col) + a[yy][xx].cid).gotoAndPlay(16);
a[yy][xx].sel = false;
a[yy][xx].free = true;
}
i++;
}
var i = 0;
while (i < bombBorder_y.length) {
if (st[fs.y] == 0) {
var xx = (fs.x + bombBorder_x1[i]);
var yy = (fs.y + bombBorder_y[i]);
} else {
var xx = (fs.x + bombBorder_x2[i]);
var yy = (fs.y + bombBorder_y[i]);
}
if (((((yy >= 1) && (yy <= 14)) && (xx >= 1)) && (xx <= 13)) && (!a[yy][xx].free)) {
brd.push(new Vector2d(xx, yy));
}
i++;
}
Destroy(null, null, "bomb");
} else if (!Destroy(fs.x, fs.y)) {
feedStand.gotoAndStop(max_try - cur_try);
sndWallBounce.start();
cur_try++;
if (lastLineTest()) {
GameOver();
return(undefined);
}
if (cur_try > max_try) {
addLine();
if (max_try > 1) {
max_try--;
} else {
max_try = 5;
}
cur_try = 0;
feedStand.gotoAndStop(max_try + 1);
if (lastLineTest()) {
GameOver();
return(undefined);
}
}
}
next_ball_init();
return(undefined);
}
if (((cd.x < (diameter / 2)) && (rolling.speed.x < 0)) || ((cd.x > (_root.fld._width - (diameter / 2))) && (rolling.speed.x > 0))) {
rolling.speed.x = -rolling.speed.x;
sndWallBounce.start();
}
var v = Mul(dt * 0.5, rolling.speed);
fld.localToGlobal(cd);
cd.x = cd.x + v.x;
cd.y = cd.y + v.y;
i++;
}
setProperty(rolling.image, _x , cd.x);
setProperty(rolling.image, _y , cd.y);
}
function nextLevel() {
var _local1 = _root;
state = false;
_local1.attachMovie("nextLevelWindow", "nxtLev", 100000);
_local1.nxtLev._x = 160;
_local1.nxtLev._y = 125;
_local1.pnts = _local1.pnts + (current_level * current_level);
_local1.colorWall.body.play();
}
function mouseOnDuwn() {
var _local2 = _root;
if (wnd_state) {
} else if (gameover_v) {
} else if (!state) {
} else {
var _local1 = new Vector2d(_local2._xmouse, _local2._ymouse);
_local2.fld.globalToLocal(_local1);
if (_local1.x > _local2.fld._width) {
} else if (_local1.y > _local2.fld._height) {
} else if (_local1.x < 0) {
} else if (_local1.y < 0) {
} else {
var dir = Normz(Sub(_local1, tail));
var _local3 = Add(new Vector2d(arw._x, arw._y + 20), Mul(65, dir));
rolling.speed = Mul(ball_speed, dir);
rolling.image = ("ball" + ready_col) + ready_id;
setProperty(rolling.image, _x , _local3.x);
setProperty(rolling.image, _y , _local3.y);
state = false;
arw.g_b.gotoAndPlay(1);
}
}
}
function move_rolling(rl_bl, v) {
var _local1 = rl_bl;
var _local3 = getProperty(_local1.image, _x) + v.x;
var _local2 = getProperty(_local1.image, _y) + v.y;
setProperty(_local1.image, _x , _local3);
setProperty(_local1.image, _y , _local2);
}
function getSquare(v) {
var _local1 = new Vector2d(0, 0);
_local1.y = Math.floor(v.y / square) + 1;
_local1.x = Math.floor((v.x - st[_local1.y]) / square) + 1;
if (_local1.x == (n_columns + 1)) {
_local1.x = n_columns;
}
if (_local1.x == 0) {
_local1.x = 1;
}
return(_local1);
}
function getCoord(v) {
var _local1 = v;
return(new Vector2d((square * ((_local1.x - 1) + 0.5)) + st[_local1.y], square * ((_local1.y - 1) + 0.5)));
}
function testHit(v) {
var _local3 = getSquare(v);
var _local1 = new Vector2d();
_local1.x = _local3.x;
_local1.y = _local3.y - 1;
if (!a[_local1.y][_local1.x].free) {
var _local2 = Sub(getCoord(_local1), v);
if (((_local2.x * _local2.x) + (_local2.y * _local2.y)) < q_diameter) {
return(true);
}
}
_local1.x = _local3.x;
_local1.y = _local3.y + 1;
if (!a[_local1.y][_local1.x].free) {
var _local2 = Sub(getCoord(_local1), v);
if (((_local2.x * _local2.x) + (_local2.y * _local2.y)) < q_diameter) {
return(true);
}
}
_local1.x = _local3.x - 1;
_local1.y = _local3.y;
if (!a[_local1.y][_local1.x].free) {
var _local2 = Sub(getCoord(_local1), v);
if (((_local2.x * _local2.x) + (_local2.y * _local2.y)) < q_diameter) {
return(true);
}
}
_local1.x = _local3.x + 1;
_local1.y = _local3.y;
if (!a[_local1.y][_local1.x].free) {
var _local2 = Sub(getCoord(_local1), v);
if (((_local2.x * _local2.x) + (_local2.y * _local2.y)) < q_diameter) {
return(true);
}
}
if (st[_local3.y] == 0) {
_local1.x = _local3.x - 1;
_local1.y = _local3.y - 1;
if (!a[_local1.y][_local1.x].free) {
var _local2 = Sub(getCoord(_local1), v);
if (((_local2.x * _local2.x) + (_local2.y * _local2.y)) < q_diameter) {
return(true);
}
}
_local1.x = _local3.x - 1;
_local1.y = _local3.y + 1;
if (!a[_local1.y][_local1.x].free) {
var _local2 = Sub(getCoord(_local1), v);
if (((_local2.x * _local2.x) + (_local2.y * _local2.y)) < q_diameter) {
return(true);
}
}
} else {
_local1.x = _local3.x + 1;
_local1.y = _local3.y - 1;
if (!a[_local1.y][_local1.x].free) {
var _local2 = Sub(getCoord(_local1), v);
if (((_local2.x * _local2.x) + (_local2.y * _local2.y)) < q_diameter) {
return(true);
}
}
_local1.x = _local3.x + 1;
_local1.y = _local3.y + 1;
if (!a[_local1.y][_local1.x].free) {
var _local2 = Sub(getCoord(_local1), v);
if (((_local2.x * _local2.x) + (_local2.y * _local2.y)) < q_diameter) {
return(true);
}
}
}
return(false);
}
function Destroy(ax, ay, flg) {
if (flg != "bomb") {
formArray(ax, ay, a[ay][ax].col);
if (toDestr.length < 3) {
var i = 0;
while (i < toDestr.length) {
a[toDestr[i].y][toDestr[i].x].sel = false;
i++;
}
toDestr.splice(0, toDestr.length);
brd.splice(0, brd.length);
return(false);
}
var i = 0;
while (i < toDestr.length) {
pointsPerEgg = one_pnts * i;
eval (("ball" + a[toDestr[i].y][toDestr[i].x].col) + a[toDestr[i].y][toDestr[i].x].cid).gotoAndPlay(16);
a[toDestr[i].y][toDestr[i].x].sel = false;
a[toDestr[i].y][toDestr[i].x].free = true;
i++;
}
toDestr.splice(0, toDestr.length);
}
var i = 0;
while (i < brd.length) {
if ((!way1(brd[i])) && (!a[brd[i].y][brd[i].x].free)) {
formArray(brd[i].x, brd[i].y, -1);
var j = 0;
while (j < toDestr.length) {
pointsPerEgg = one_pnts * 5;
eval (("ball" + a[toDestr[j].y][toDestr[j].x].col) + a[toDestr[j].y][toDestr[j].x].cid).gotoAndPlay(16);
a[toDestr[j].y][toDestr[j].x].sel = false;
a[toDestr[j].y][toDestr[j].x].free = true;
j++;
}
toDestr.splice(0, toDestr.length);
}
i++;
}
brd.splice(0, brd.length);
if (playSound) {
}
return(true);
}
function formArray(fx, fy, fc) {
var _local1 = fy;
var _local2 = fx;
var _local3 = fc;
if (a[_local1][_local2].sel || (a[_local1][_local2].free)) {
} else if ((a[_local1][_local2].col != _local3) && (_local3 != -1)) {
brd.push(new Vector2d(_local2, _local1));
} else {
toDestr.push(new Vector2d(_local2, _local1));
a[_local1][_local2].sel = true;
formArray(_local2, _local1 - 1, _local3);
formArray(_local2, _local1 + 1, _local3);
formArray(_local2 - 1, _local1, _local3);
formArray(_local2 + 1, _local1, _local3);
if (st[_local1] == 0) {
formArray(_local2 - 1, _local1 - 1, _local3);
formArray(_local2 - 1, _local1 + 1, _local3);
} else {
formArray(_local2 + 1, _local1 - 1, _local3);
formArray(_local2 + 1, _local1 + 1, _local3);
}
}
}
function addLine() {
sndNextLine.start();
sndWhistle.start();
var i = 1;
while (i <= (n_rows - 1)) {
var j = 1;
while (j <= n_columns) {
if (!a[i][j].free) {
var old_y = getProperty(("ball" + a[i][j].col) + a[i][j].cid, _y);
old_y = old_y + square;
setProperty(("ball" + a[i][j].col) + a[i][j].cid, _y , old_y);
}
j++;
}
i++;
}
var i = n_rows;
while (i >= 2) {
var j = 1;
while (j <= n_columns) {
a[i][j].col = a[i - 1][j].col;
a[i][j].cid = a[i - 1][j].cid;
eval (("ball" + a[i][j].col) + a[i][j].cid).gotoAndStop(1);
a[i][j].free = a[i - 1][j].free;
a[i][j].sel = false;
j++;
}
i--;
}
var csh = st[2];
var i = 1;
while (i < st.length) {
st[i] = csh;
if (csh == 0) {
csh = square / 2;
} else {
csh = 0;
}
i++;
}
var j = 1;
while (j <= n_columns) {
var cur_crd = getCoord(new Vector2d(j, 1));
_root.fld.localToGlobal(cur_crd);
var atrib = RandomBall(cur_crd, true);
a[1][j].col = atrib.x;
a[1][j].cid = atrib.y;
a[1][j].sel = false;
a[1][j].free = false;
j++;
}
}
function GameOver() {
mcAvatar.setScore(pnts);
g_fGameOver();
}
function RandomBall(v, vs) {
var k = (1 + g_fGetRandomValue(numColors - 1));
duplicateMovieClip ("_root.parent_b" + k, ("ball" + k) + id, id);
setProperty((("ball" + k) + id) + ".bk", _x , ((Math.random() + 1) * (-diameter)) / 2);
setProperty((("ball" + k) + id) + ".bk", _y , ((Math.random() + 1) * (-diameter)) / 2);
setProperty(("ball" + k) + id, _x , v.x);
setProperty(("ball" + k) + id, _y , v.y);
setProperty(("ball" + k) + id, _visible , vs);
if (vs) {
eval (("ball" + k) + id).gotoAndStop(1);
}
arr_ball.push(("ball" + k) + id);
return(new Vector2d(k, id++));
}
function way(v) {
var _local1 = v;
if (a[_local1.y][_local1.x].free) {
return(false);
}
if (a[_local1.y][_local1.x].sel) {
return(false);
}
if (_local1.y == 1) {
return(true);
}
a[_local1.y][_local1.x].sel = true;
tmp.push(_local1);
if (way(new Vector2d(_local1.x, _local1.y - 1))) {
return(true);
}
if (st[_local1.y] == 0) {
if (way(new Vector2d(_local1.x - 1, _local1.y - 1))) {
return(true);
}
} else if (way(new Vector2d(_local1.x + 1, _local1.y - 1))) {
return(true);
}
if (way(new Vector2d(_local1.x - 1, _local1.y))) {
return(true);
}
if (way(new Vector2d(_local1.x + 1, _local1.y))) {
return(true);
}
if (way(new Vector2d(_local1.x, _local1.y + 1))) {
return(true);
}
if (st[_local1.y] == 0) {
if (way(new Vector2d(_local1.x - 1, _local1.y + 1))) {
return(true);
}
} else if (way(new Vector2d(_local1.x + 1, _local1.y + 1))) {
return(true);
}
return(false);
}
function way1(v) {
var _local2 = new Boolean();
_local2 = way(v);
var _local1 = 0;
while (_local1 < tmp.length) {
a[tmp[_local1].y][tmp[_local1].x].sel = false;
_local1++;
}
tmp.splice(0, tmp.length);
return(_local2);
}
function gobpres1() {
MOWind1.gotoAndStop(2);
loadVariables ((((record_table_script_url + "?name=") + MOWind1.name_n) + "&score=") + MOWind1.score_n, "_root.MOWind1");
}
function gobpres2() {
gameover_v = false;
removeMovieClip("MOWind1");
begin_start();
}
function lastLineTest() {
var _local2 = 10;
var _local1 = 1;
while (_local1 <= n_columns) {
if (!a[_local2][_local1].free) {
return(true);
}
_local1++;
}
return(false);
}
function Shoot() {
state_1 = false;
cur_frm = 1;
setProperty(rolling.image, _visible , true);
sndFire.start();
}
function shootBomb() {
_root.paddle.gotoAndPlay(1);
eval ("_root.nxtBl." + _root.currentPreview).gotoAndPlay(44);
_root.arw.g_b.g_b2.nextBall.gotoAndStop(1);
state_1 = false;
cur_frm = 1;
setProperty(rolling.image, _visible , true);
}
function leaveGame() {
if (gameover_v) {
return(undefined);
}
_root.attachMovie("w_leaveGame", "wnd", 400000);
wnd._x = 320;
wnd._y = 240;
wnd_state = true;
}
function onYes() {
getURL ("javascript:self.close()");
}
function onNo() {
removeMovieClip(wnd);
wnd_state = false;
}
function restart_init_tmp() {
if (wnd_state) {
return(undefined);
}
begin_start();
}
function bomba1_press() {
if ((bb1 || (bombLoaded)) || (!state)) {
return(undefined);
}
bomb1.theBomb._visible = false;
bb1 = true;
bom_1._visible = false;
initBomb();
}
function bomba2_press() {
if ((bb2 || (bombLoaded)) || (!state)) {
return(undefined);
}
bomb2.theBomb._visible = false;
bb2 = true;
bom_2._visible = false;
initBomb();
}
function bomba3_press() {
if ((bb3 || (bombLoaded)) || (!state)) {
return(undefined);
}
bomb3.theBomb._visible = false;
bb3 = true;
bom_3._visible = false;
initBomb();
}
function doVolumeUp() {
soundText = "Sound Off";
sndPlateClick.setVolume(50);
sndNewGame.setVolume(100);
sndWallBounce.setVolume(100);
sndNextLevel.setVolume(70);
sndNextLine.setVolume(150);
sndGameOver.setVolume(100);
sndRoller.setVolume(40);
sndPop.setVolume(30);
sndBomb.setVolume(100);
sndFire.setVolume(100);
sndFireBomb.setVolume(100);
}
function doVolumeDown() {
soundText = "Sound On";
sndPlateClick.setVolume(0);
sndNewGame.setVolume(0);
sndWallBounce.setVolume(0);
sndNextLevel.setVolume(0);
sndNextLine.setVolume(0);
sndGameOver.setVolume(0);
sndRoller.setVolume(0);
sndPop.setVolume(0);
sndBomb.setVolume(0);
sndFire.setVolume(0);
}
function removeAllClips() {
i = 0;
while (i < arr_ball.length) {
removeMovieClip(arr_ball[i]);
i++;
}
removeMovieClip(arw);
}
Frame 21
g_fSendToCSA(g_arrStdAnswersToCSA.gamestarted);
if (g_blnStandAloneGame) {
g_fXMLStandAlone("");
gotoAndPlay ("startGame");
} else if (g_blnPracticeGame) {
gotoAndPlay ("startGame");
} else if (g_blnRestoreGame) {
g_fStopGameStepExecute();
gotoAndPlay ("restoreGame");
} else {
if (mcSynchronize == undefined) {
attachMovie("mcSynchronize", "mcSynchronize", g_numMsgDepth);
g_fCenter(mcSynchronize);
}
if ((g_strGameType.substr(1, 1) == "2") || (g_strGameType.substr(1, 1) == "3")) {
mcSynchronize.gotoAndStop("server");
} else {
mcSynchronize.gotoAndStop("opponent");
}
g_fSendStep(g_arrStdAnswersToCSA.readytogo);
g_blnStepExecute = true;
stop();
}
Frame 29
play();
Frame 36
if (g_arrGameSteps.length > 0) {
if ((g_lvlScoreBoard != null) && (g_lvlScoreBoard.blnLoaded)) {
g_fStartGameStepExecute();
}
gotoAndPlay ("restoreGame");
} else {
gotoAndPlay ("startGame");
}
Frame 37
var numCountDown;
var numStartCountDown = getTimer();
strCountDown = "05";
if (mcSynchronize != undefined) {
mcSynchronize.removeMovieClip();
}
Frame 45
numCountDown = -Math.floor((getTimer() - numStartCountDown) / 1000);
if (numCountDown > 0) {
strCountDown = "0" + String(numCountDown);
} else {
strCountDown = "00";
}
Frame 47
if (numCountDown > 0) {
gotoAndPlay ("countDown");
}
Frame 59
stop();
u_fStartGame();
Instance of Symbol 296 MovieClip "colorWall" in Frame 59
onClipEvent (enterFrame) {
_root.enter_frame();
}
Instance of Symbol 326 MovieClip "fld" in Frame 59
onClipEvent (mouseMove) {
_root.moveMouse();
}
onClipEvent (mouseDown) {
_root.mouseOnDuwn();
}
Symbol 21 MovieClip [start_message] Frame 1
stop();
Symbol 21 MovieClip [start_message] Frame 2
play();
this._x = _root.numGameWidth / 2;
this._y = _root.numGameHeight / 2;
Symbol 21 MovieClip [start_message] Frame 3
time = "05";
currTime = Math.round(getTimer() / 1000);
timeDown = 5;
Symbol 21 MovieClip [start_message] Frame 4
newTime = Math.round(getTimer() / 1000);
timeLeft = timeDown - (newTime - currTime);
if (timeLeft <= 0) {
time = "00";
gotoAndPlay (6);
} else {
time = "0" + timeLeft;
}
Symbol 21 MovieClip [start_message] Frame 5
gotoAndPlay (4);
Symbol 21 MovieClip [start_message] Frame 31
_root.play();
this._y = -1000;
stop();
Symbol 21 MovieClip [start_message] Frame 36
this.swapDepths(_root.messageDepth);
this._x = _root.numGameWidth / 2;
this._y = _root.numGameHeight / 2;
Symbol 21 MovieClip [start_message] Frame 100
this._y = 555;
_root.removeAllClips();
this.swapDepths(_root.messageDepth - 50);
_root.gotoAndPlay("frameGameOver");
stop();
Symbol 23 MovieClip Frame 1
stop();
Symbol 27 Button
on (release) {
this.removeMovieClip();
}
Symbol 31 MovieClip [mcUnknownPacket] Frame 1
stop();
Symbol 38 MovieClip [mcSynchronize] Frame 1
stop();
Symbol 38 MovieClip [mcSynchronize] Frame 10
stop();
Symbol 41 MovieClip [mcScoreboardBack] Frame 1
stop();
Symbol 44 Button
on (release) {
_parent.g_fClickResignYes();
btnYes._visible = (btnNo._visible = false);
}
Symbol 47 Button
on (release) {
_parent.g_fClickResignNo();
this.removeMovieClip();
}
Symbol 49 Button
on (release) {
_parent.g_fclickStopWatchYes();
btnYes._visible = (btnNo._visible = false);
}
Symbol 50 Button
on (release) {
_parent.g_fClickStopWatchNo();
this.removeMovieClip();
}
Symbol 52 MovieClip [mcResign] Frame 1
stop();
Instance of Symbol 23 MovieClip in Symbol 52 MovieClip [mcResign] Frame 1
/* no clip actions */
Symbol 57 MovieClip [mcGameOver] Frame 1
var numStartInterval = getTimer();
Symbol 57 MovieClip [mcGameOver] Frame 2
play();
Symbol 57 MovieClip [mcGameOver] Frame 7
if ((getTimer() - numStartInterval) < 5000) {
gotoAndPlay ("loop");
} else {
if (_parent.g_blnPracticeGame) {
_parent.g_fSendToCSA(_parent.g_arrStdAnswersToCSA.gamefinished);
} else {
var numType = Number(_parent.g_strGameType.substr(1, 1));
if ((numType == 2) || (numType == 3)) {
_parent.g_fSendStep("<scoreboard><gameranswer answer=\"0\"/></scoreboard>");
_parent.g_fSendToCSA(_parent.g_arrStdAnswersToCSA.gamefinished);
}
}
_parent.g_fStartGameStepExecute();
stop();
}
Symbol 58 Button
on (release) {
_parent.g_fXMLGameFinished();
}
Symbol 60 MovieClip [mcError] Frame 1
var numStartInterval = getTimer();
Symbol 60 MovieClip [mcError] Frame 2
play();
Symbol 60 MovieClip [mcError] Frame 7
if ((getTimer() - numStartInterval) < 3000) {
gotoAndPlay ("loop");
} else {
_parent.g_fXMLGameFinished();
stop();
}
Symbol 73 MovieClip [SBGAvatar] Frame 1
#initclip 2
SBGAvatar = function () {
this.init();
};
SBGAvatar.prototype = new MovieClip();
SBGAvatar.prototype.init = function () {
var _local1 = this;
_local1.strPlayerName = "PlayerName";
_local1.numPlayerId = 0;
_local1.strAvatarURL = "";
_local1.strSide = "left";
_local1.numAvatarWidth = 80;
_local1.numAvatarHeight = 81;
_local1.numScore = 0;
_local1.nameTextFormat = new TextFormat();
_local1.nameTextFormat = _local1.txtName.getTextFormat();
_local1.setPlayerName(_local1.strPlayerName);
};
SBGAvatar.prototype.loadAvatar = function (a_url) {
var _local1 = this;
_local1.strAvatarURL = a_url;
loadMovie (_local1.strAvatarURL, _local1.mcAvatar);
};
SBGAvatar.prototype.setLeft = function () {
var _local1 = this;
if (_local1.strSide != "left") {
_local1.mcAvatar._height = 81;
_local1.mcAvatar._xscale = 100;
_local1.mcAvatar._x = (-_local1.mcAvatar._width) / 2;
}
_local1.strSide = "left";
};
SBGAvatar.prototype.setRight = function () {
var _local1 = this;
if (_local1.strSide != "right") {
_local1.mcAvatar._height = 81;
_local1.mcAvatar._xscale = -100;
_local1.mcAvatar._x = _local1.mcAvatar._width / 2;
}
_local1.strSide = "right";
};
SBGAvatar.prototype.onLoadAvatar = function (a_avatar) {
var _local1 = this;
if (a_avatar.getBytesLoaded() == a_avatar.getBytesTotal()) {
if (_local1.strSide == "left") {
_local1.setLeft();
} else if (_local1.strSide == "right") {
_local1.setRight();
}
}
};
SBGAvatar.prototype.setPlayerName = function (a_name) {
var _local1 = this;
_local1.strPlayerName = a_name;
_local1.txtName.text = _local1.strPlayerName;
};
SBGAvatar.prototype.getPlayerName = function () {
return(this.strPlayerName);
};
SBGAvatar.prototype.setPlayerId = function (a_id) {
this.numPlayerId = a_id;
};
SBGAvatar.prototype.getPlayerId = function () {
return(this.numPlayerId);
};
SBGAvatar.prototype.setScore = function (a_newScore) {
this.numScore = parseInt(a_newScore);
this.showScore();
};
SBGAvatar.prototype.getScore = function () {
return(this.numScore);
};
SBGAvatar.prototype.changeScore = function (a_delta) {
this.numScore = this.numScore + parseInt(a_delta);
this.showScore();
};
SBGAvatar.prototype.showScore = function () {
this.mcScore.txtScore.text = String(this.numScore);
};
SBGAvatar.prototype.setNameTextFormat = function (a_newTextFormat) {
var _local1 = this;
_local1.nameTextFormat = a_newTextFormat;
_local1.txtName.setTextFormat(_local1.nameTextFormat);
};
SBGAvatar.prototype.getNameTextFormat = function () {
return(this.nameTextFormat);
};
Object.registerClass("SBGAvatar", SBGAvatar);
#endinitclip
Instance of Symbol 72 MovieClip "mcAvatar" in Symbol 73 MovieClip [SBGAvatar] Frame 1
onClipEvent (load) {
_parent.onLoadAvatar(this);
}
Symbol 77 MovieClip [SBGTimer] Frame 1
#initclip 1
SBGTimer = function () {
this.init();
};
SBGTimer.prototype = new MovieClip();
SBGTimer.prototype.init = function () {
var _local1 = this;
_local1.numStart = 0;
_local1.numRemainder = 0;
_local1.numLastTic = 0;
_local1.numTaskInterval = 0;
_local1.numLastTaskTime = 0;
_local1.numWarningTime = 0;
_local1.blnStop = true;
_local1.blnWarning = false;
_local1.blnBonus = false;
_local1.hColorOff = 3394815 /* 0x33CCFF */;
_local1.hColorOn = 16776960 /* 0xFFFF00 */;
_local1.showTime();
};
SBGTimer.prototype.onEnterFrame = function () {
if (!this.blnStop) {
this.tick();
}
};
SBGTimer.prototype.tick = function () {
var _local1 = this;
var _local2 = getTimer();
if (_local1.blnBonus) {
_local1.numRemainder = _local1.numRemainder - 1;
_local1.timeBonus();
} else {
_local1.numRemainder = _local1.numRemainder - ((_local2 - _local1.numLastTic) / 1000);
_local1.numLastTic = _local2;
}
_local1.showTime();
if (_local1.numRemainder <= 0) {
_local1.numRemainder = 0;
_local1.blnBonus = false;
_local1.stopTimer();
_local1.showTime();
_local1.timesRunOut();
} else if (!_local1.blnBonus) {
if ((Math.floor(_local1.numRemainder) == _local1.numWarningTime) && (!_local1.blnWarning)) {
_local1.blnWarning = true;
_local1.timerWarning();
}
if ((_local1.numTaskInterval > 0) && ((_local1.numLastTaskTime - _local1.numRemainder) >= _local1.numTaskInterval)) {
_local1.numLastTaskTime = _local1.numRemainder;
_local1.doTask();
}
}
};
SBGTimer.prototype.showTime = function () {
var _local3 = Math.round(this.numRemainder);
var _local2 = Math.floor(_local3 / 60);
var strMinutes = ((_local2 < 10) ? ("0" + String(_local2)) : (String(_local2)));
var _local1 = _local3 % 60;
var strSeconds = ((_local1 < 10) ? ("0" + String(_local1)) : (String(_local1)));
this.txtTime.text = (strMinutes + ":") + strSeconds;
};
SBGTimer.prototype.startTimer = function () {
var _local1 = this;
if (_local1.numRemainder <= 0) {
} else {
_local1.numLastTic = getTimer();
_local1.blnStop = false;
_local1.numLastTaskTime = _local1.numRemainder;
var _local2 = new Color(_local1.txtTime);
_local2.setRGB(_local1.hColorOn, 16);
_local2 = new Color(_local1.mcTime);
_local2.setRGB(_local1.hColorOn, 16);
_local1.showTime();
}
};
SBGTimer.prototype.startTimerAt = function (a_time) {
var _local1 = this;
if (a_time <= 0) {
} else {
_local1.numLastTic = getTimer();
_local1.numRemainder = a_time;
_local1.blnStop = false;
_local1.numLastTaskTime = _local1.numRemainder;
var _local2 = new Color(_local1.txtTime);
_local2.setRGB(_local1.hColorOn);
_local2 = new Color(_local1.mcTime);
_local2.setRGB(_local1.hColorOn, 16);
_local1.showTime();
}
};
SBGTimer.prototype.stopTimer = function () {
var _local1 = this;
_local1.blnStop = true;
var _local2 = new Color(_local1.txtTime);
_local2.setRGB(_local1.hColorOff);
_local2 = new Color(_local1.mcTime);
_local2.setRGB(_local1.hColorOff);
};
SBGTimer.prototype.getTimer = function () {
return(Math.floor(this.numRemainder * 10) / 10);
};
SBGTimer.prototype.setTimer = function (a_time) {
this.numRemainder = a_time;
this.showTime();
};
SBGTimer.prototype.setWarningTime = function (a_time) {
this.numWarningTime = a_time;
};
SBGTimer.prototype.setTaskInterval = function (a_time) {
this.numTaskInterval = a_time;
};
SBGTimer.prototype.startTimeBonus = function () {
this.blnBonus = true;
};
SBGTimer.prototype.timerWarning = function () {
};
SBGTimer.prototype.timesRunOut = function () {
};
SBGTimer.prototype.doTask = function () {
};
SBGTimer.prototype.timeBonus = function () {
};
Object.registerClass("SBGTimer", SBGTimer);
#endinitclip
Symbol 115 MovieClip Frame 1
if (_root.logoUrl == undefined) {
play();
} else {
loadBrandMov.loadMovie(_root.logoUrl);
stop();
}
Symbol 115 MovieClip Frame 2
stop();
Symbol 157 MovieClip Frame 1
stop();
Symbol 169 MovieClip Frame 20
stop();
Symbol 188 MovieClip Frame 5
stop();
Symbol 192 MovieClip Frame 6
stop();
Symbol 196 MovieClip Frame 6
stop();
Symbol 199 MovieClip Frame 6
stop();
Symbol 200 MovieClip Frame 2
_root.riseChicken.play();
Symbol 200 MovieClip Frame 3
_root.riseChicken.play();
Symbol 200 MovieClip Frame 4
_root.riseChicken.play();
Symbol 200 MovieClip Frame 5
_root.riseChicken.play();
Symbol 200 MovieClip Frame 6
stop();
_root.riseChicken.play();
Symbol 205 MovieClip Frame 11
_root.sndPlateClick.start();
Symbol 205 MovieClip Frame 21
gotoAndStop (1);
Symbol 207 MovieClip Frame 1
stop();
Symbol 210 Button
on (release) {
_parent.g_fSetSoundOff();
this.gotoAndStop("on");
}
Symbol 213 Button
on (release) {
_parent.g_fSetSoundOn();
this.gotoAndStop("off");
}
Symbol 215 MovieClip Frame 1
stop();
Symbol 215 MovieClip Frame 6
stop();
Symbol 220 Button
on (release, releaseOutside) {
if (_currentframe == 1) {
play();
}
}
Symbol 233 MovieClip Frame 56
stop();
Symbol 234 Button
on (release) {
play();
}
Symbol 237 MovieClip Frame 44
stop();
Symbol 238 Button
on (release) {
play();
}
Symbol 244 MovieClip Frame 28
stop();
Symbol 260 MovieClip Frame 36
stop();
Symbol 261 Button
on (release) {
_parent.play();
}
Symbol 262 MovieClip Frame 1
stop();
Symbol 262 MovieClip Frame 6
stop();
Symbol 262 MovieClip Frame 11
stop();
Symbol 262 MovieClip Frame 16
stop();
Symbol 262 MovieClip Frame 21
stop();
Symbol 263 MovieClip Frame 5
stop();
Symbol 266 Button
on (release, releaseOutside) {
play();
}
Symbol 267 MovieClip Frame 1
stop();
Symbol 267 MovieClip Frame 2
this.oldDepth = this.getDepth();
this.swapDepths(_parent.g_numMsgDepth - 5);
Symbol 267 MovieClip Frame 20
stop();
Symbol 267 MovieClip Frame 39
this.swapDepths(this.oldDepth);
gotoAndStop (1);
Symbol 269 MovieClip Frame 1
stop();
Symbol 271 MovieClip Frame 1
stop();
Symbol 285 MovieClip Frame 1
g_b2.nextBall.gotoAndStop(_root.cur_frm);
Symbol 285 MovieClip Frame 3
g_b2.nextBall.gotoAndStop(_root.cur_frm);
Symbol 285 MovieClip Frame 5
if (_root.bombLoaded) {
stop();
_root.sndFireBomb.start();
} else {
_root.paddle.gotoAndPlay(1);
eval ("_root.nxtBl." + _root.currentPreview).gotoAndPlay(44);
g_b2.nextBall.gotoAndStop(1);
_root.shoot();
}
Symbol 285 MovieClip Frame 7
Symbol 285 MovieClip Frame 18
gotoAndStop (1);
Symbol 293 MovieClip Frame 1
Symbol 293 MovieClip Frame 2
if (!_root.blnGameStart) {
_root.removeEndRoundEggs();
_root.sndNextLevel.start();
} else {
_root.blnGameStart = false;
_root.sndNewGame.start();
if (!_root.g_blnRestoreGame) {
_root.hitWallMessage.play();
}
}
Symbol 293 MovieClip Frame 45
gotoAndStop (1);
_root._nextLevel();
if (_root.g_blnRestoreGame) {
_root.g_blnRestoreGame = false;
_root.mcTimer.timesRunOut = _root.g_fGameOver;
_root.mcTimer.startTimer();
}
Symbol 296 MovieClip Frame 1
stop();
Symbol 298 MovieClip Frame 1
stop();
Symbol 301 Button
on (release) {
play();
}
Symbol 305 MovieClip Frame 1
_root.playSound = true;
stop();
Symbol 305 MovieClip Frame 2
_root.playSound = false;
stop();
Symbol 309 MovieClip Frame 15
gotoAndPlay (1);
Symbol 309 MovieClip Frame 16
bonusMessage.pointBonusText.text = _root.pointsPerEgg;
_root.pnts = _root.pnts + _root.pointsPerEgg;
_root.soundPopMovie.play();
Symbol 309 MovieClip Frame 29
this.removeMovieClip();
Symbol 310 MovieClip Frame 15
gotoAndPlay (1);
Symbol 310 MovieClip Frame 16
bonusMessage.pointBonusText.text = _root.pointsPerEgg;
_root.pnts = _root.pnts + _root.pointsPerEgg;
_root.soundPopMovie.play();
Symbol 310 MovieClip Frame 29
this.removeMovieClip();
Symbol 311 MovieClip Frame 15
gotoAndPlay (1);
Symbol 311 MovieClip Frame 16
bonusMessage.pointBonusText.text = _root.pointsPerEgg;
_root.pnts = _root.pnts + _root.pointsPerEgg;
_root.soundPopMovie.play();
Symbol 311 MovieClip Frame 29
this.removeMovieClip();
Symbol 312 MovieClip Frame 15
gotoAndPlay (1);
Symbol 312 MovieClip Frame 16
bonusMessage.pointBonusText.text = _root.pointsPerEgg;
_root.pnts = _root.pnts + _root.pointsPerEgg;
_root.soundPopMovie.play();
Symbol 312 MovieClip Frame 29
this.removeMovieClip();
Symbol 313 MovieClip Frame 15
gotoAndPlay (1);
Symbol 313 MovieClip Frame 16
bonusMessage.pointBonusText.text = _root.pointsPerEgg;
_root.pnts = _root.pnts + _root.pointsPerEgg;
_root.soundPopMovie.play();
Symbol 313 MovieClip Frame 29
this.removeMovieClip();
Symbol 314 MovieClip Frame 15
gotoAndPlay (1);
Symbol 314 MovieClip Frame 16
bonusMessage.pointBonusText.text = _root.pointsPerEgg;
_root.pnts = _root.pnts + _root.pointsPerEgg;
_root.sndBomb.start();
Symbol 314 MovieClip Frame 29
this.removeMovieClip();
Symbol 318 Button
on (release) {
_root.bomba1_press();
}
Symbol 320 Button
on (release) {
_root.bomba2_press();
}
Symbol 322 Button
on (release) {
_root.bomba3_press();
}
Symbol 343 MovieClip Frame 1
previewEgg.play();
Symbol 343 MovieClip Frame 36
_root.gate.stop();
_root.gears.stop();
previewEgg.gotoAndStop(1);
_root.sndRoller.stop();
stop();
Symbol 343 MovieClip Frame 37
_root.gate.gotoAndPlay(1);
Symbol 343 MovieClip Frame 44
_root.gate.play();
_root.gears.play();
Symbol 343 MovieClip Frame 63
var redtago = _root.next_col;
_root.arw.g_b.g_b2.nextBall.gotoAndStop(redtago + 1);
stop();
_parent.gotoAndStop(7);
Symbol 344 MovieClip Frame 1
previewEgg.play();
Symbol 344 MovieClip Frame 36
_root.gate.stop();
_root.gears.stop();
previewEgg.gotoAndStop(1);
_root.sndRoller.stop();
stop();
Symbol 344 MovieClip Frame 37
_root.gate.gotoAndPlay(1);
Symbol 344 MovieClip Frame 44
_root.gate.play();
_root.gears.play();
Symbol 344 MovieClip Frame 63
var redtago = _root.next_col;
_root.arw.g_b.g_b2.nextBall.gotoAndStop(redtago + 1);
stop();
_parent.gotoAndStop(7);
Symbol 345 MovieClip Frame 1
previewEgg.play();
Symbol 345 MovieClip Frame 36
_root.gate.stop();
_root.gears.stop();
previewEgg.gotoAndStop(1);
_root.gate.play();
_root.sndRoller.stop();
stop();
Symbol 345 MovieClip Frame 37
_root.gate.gotoAndPlay(1);
Symbol 345 MovieClip Frame 44
_root.gate.play();
_root.gears.play();
Symbol 345 MovieClip Frame 63
var redtago = _root.next_col;
_root.arw.g_b.g_b2.nextBall.gotoAndStop(redtago + 1);
stop();
_parent.gotoAndStop(7);
Symbol 346 MovieClip Frame 1
previewEgg.play();
Symbol 346 MovieClip Frame 36
_root.gate.stop();
_root.gears.stop();
previewEgg.gotoAndStop(1);
_root.sndRoller.stop();
stop();
Symbol 346 MovieClip Frame 37
_root.gate.gotoAndPlay(1);
Symbol 346 MovieClip Frame 44
_root.gate.play();
_root.gears.play();
Symbol 346 MovieClip Frame 63
var redtago = _root.next_col;
_root.arw.g_b.g_b2.nextBall.gotoAndStop(redtago + 1);
stop();
_parent.gotoAndStop(7);
Symbol 347 MovieClip Frame 1
previewEgg.play();
Symbol 347 MovieClip Frame 36
_root.gate.stop();
_root.gears.stop();
previewEgg.gotoAndStop(1);
_root.sndRoller.stop();
stop();
Symbol 347 MovieClip Frame 37
_root.gate.gotoAndPlay(1);
Symbol 347 MovieClip Frame 44
_root.gate.play();
_root.gears.play();
Symbol 347 MovieClip Frame 63
var redtago = _root.next_col;
_root.arw.g_b.g_b2.nextBall.gotoAndStop(redtago + 1);
stop();
_parent.gotoAndStop(7);
Symbol 348 MovieClip Frame 15
gotoAndPlay (1);
Symbol 348 MovieClip Frame 16
bonusMessage.pointBonusText.text = _root.pointsPerEgg;
_root.pnts = _root.pnts + _root.pointsPerEgg;
_root.soundPopMovie.play();
Symbol 348 MovieClip Frame 29
this.removeMovieClip();
Symbol 349 MovieClip Frame 1
previewEgg.play();
Symbol 349 MovieClip Frame 30
previewEgg.gotoAndStop(1);
_root.sndRoller.stop();
stop();
Symbol 349 MovieClip Frame 31
_root.gate.gotoAndPlay(1);
Symbol 349 MovieClip Frame 53
var redtago = _root.next_col;
_root.arw.g_b.g_b2.nextBall.gotoAndStop(redtago + 1);
stop();
_parent.gotoAndStop(7);
Symbol 350 MovieClip Frame 1
previewRed.goToAndPlay(1);
_root.currentPreview = "previewRed";
_root.sndRoller.start();
Symbol 350 MovieClip Frame 2
previewBlue.goToAndPlay(1);
_root.currentPreview = "previewBlue";
_root.sndRoller.start();
Symbol 350 MovieClip Frame 3
previewBrown.goToAndPlay(1);
_root.currentPreview = "previewBrown";
_root.sndRoller.start();
Symbol 350 MovieClip Frame 4
previewGreen.goToAndPlay(1);
_root.currentPreview = "previewGreen";
_root.sndRoller.start();
Symbol 350 MovieClip Frame 5
previewYellow.goToAndPlay(1);
_root.currentPreview = "previewYellow";
_root.sndRoller.start();
Symbol 350 MovieClip Frame 6
previewOrange.goToAndPlay(1);
_root.currentPreview = "previewOrange";
_root.sndRoller.start();