Frame 1
function f_FireWave() {
var _local2;
var _local4 = false;
var _local3;
var _local5;
if (((!_root.b_IsRotating) && (!_root.b_PoppingCoins)) && (!_root.b_Paused)) {
_local2 = 1;
while (_local2 <= _root.n_CoinMaxX) {
_local3 = _root.o_CoinContainer[("o_Coin_" + _local2.toString()) + "_1"];
if ((_local3.n_TypeID == 0) || (_local3.n_TypeID == undefined)) {
_local4 = true;
_root.f_InitialiseCoin(_local2, 1, _root.o_DropItems[_local2 - 1]);
}
_local2++;
}
}
_root.f_ChooseNextDrop();
if (_root.s_GameMode.toLowerCase() != "obstruction") {
_root.n_WaveFreq = _root.n_WaveFreq - _root.n_WaveReduction;
if (_root.n_WaveFreq < _root.n_WaveFloor) {
_root.n_WaveFreq = _root.n_WaveFloor;
}
_root.o_GameControls.o_WaveProgress.n_MaxValue = _root.n_WaveFreq;
}
_root.n_WaveCounter = _root.n_WaveFreq;
_root.d_WaveLastDrop = new Date();
_root.d_WaveTimer = new Date();
return(_local4);
}
function f_ChooseNextDrop() {
var _local3;
var _local2;
_root.o_DropItems = new Array();
_local3 = 1;
while (_local3 <= _root.n_CoinMaxX) {
_local2 = 1 + Math.floor(Math.random() * 5);
_local2 = ((_local2 == 6) ? 5 : (_local2));
_root.o_DropItems.push(_local2);
_root.o_DropContainer["o_Item_" + (_local3 - 1).toString()].gotoAndStop("Coin_" + _local2.toString());
_local3++;
}
}
function f_InitialiseGame() {
var _local3;
var _local2;
var _local6;
var _local5;
var _local4;
var _local7 = false;
_root.a_MessageArray = new Array();
_root.d_MessageLast = undefined;
_root.o_GameControls._x = 0;
_root.o_GameControls.gotoAndStop(_root.s_GameMode.toLowerCase());
_root.o_PopStats = [0, 0, 0, 0, 0, 0, 0, 0];
_root.b_ShownInstructions = false;
_root.o_GameControls.o_Instructions._visible = true;
_root.o_GameControls.o_Instructions.gotoAndPlay(_root.s_GameMode.toLowerCase() + "_1");
if (_root.o_KeyList != undefined) {
Key.removeListener(_root.o_KeyList);
}
_root.o_KeyList = new Object();
_root.o_KeyList.onKeyUp = function () {
if ((Key.getCode() == 77) || (Key.getCode() == 109)) {
_root.f_ToggleSounds();
}
if (_root.b_ShownInstructions) {
if ((Key.getCode() == 80) || (Key.getCode() == 112)) {
_root.f_TogglePause();
}
if ((((((Key.getCode() == 32) || (Key.getCode() == 40)) || (Key.getCode() == 83)) || (Key.getCode() == 115)) && (!_root.b_IsRotating)) && (!_root.b_PoppingCoins)) {
if (!_root.f_FireWave()) {
_root.b_LevelEnding = true;
_root.b_LevelEnded = false;
}
}
if (((Key.getCode() == 37) || (Key.getCode() == 65)) || (Key.getCode() == 97)) {
_root.f_StartRotate(-90);
}
if (((Key.getCode() == 39) || (Key.getCode() == 68)) || (Key.getCode() == 100)) {
_root.f_StartRotate(90);
}
}
};
Key.addListener(_root.o_KeyList);
_root.b_KeyLeft = false;
_root.b_KeyRight = false;
_root.b_KeyDown = false;
_local3 = 1;
while (_local3 <= _root.n_CoinMaxX) {
_root.o_DropContainer["o_Item_" + (_local3 - 1).toString()].gotoAndStop("Coin_1");
_local2 = 1;
while (_local2 <= _root.n_CoinMaxY) {
_local6 = _root.o_CoinContainer.attachMovie("Coin", (("o_Coin_" + _local3.toString()) + "_") + _local2.toString(), (100000 + (_local3 * 1000)) + _local2);
_root.f_InitialiseCoin(_local3, _local2, -1);
_local2++;
}
_local3++;
}
_root.o_GameLogo.gotoAndStop(1);
_root.o_CoinContainer._x = _root.n_ContainerX;
_root.o_CoinContainer._y = _root.n_ContainerY;
if (_root.s_GameMode.toLowerCase() == "freeplay") {
_root.n_WaveOrigFreq = 5000;
_root.n_WaveReduction = 50;
_root.n_WaveFloor = 1500;
_root.n_GameSeconds = 0;
_root.n_CoinsNeeded = 3;
_root.o_GameControls.o_TimeLeftTitle._visible = false;
_root.o_GameControls.o_Timer._visible = false;
_root.o_GameControls.o_WaveProgress._visible = true;
_root.o_GameControls.o_NextWaveText._visible = true;
_root.n_GameLevel = undefined;
_root.n_PopsNeeded = 0;
_local7 = true;
} else if (_root.s_GameMode.toLowerCase() == "progressive") {
_root.n_WaveOrigFreq = 7000;
_root.n_WaveReduction = 50;
_root.n_WaveFloor = 1500;
_root.n_GameSeconds = _root.o_Levels[0][0];
_root.n_CoinsNeeded = 3;
_root.o_GameControls.o_TimeLeftTitle._visible = true;
_root.o_GameControls.o_Timer._visible = true;
_root.o_GameControls.o_WaveProgress._visible = true;
_root.o_GameControls.o_NextWaveText._visible = true;
_root.n_GameLevel = 1;
_root.n_PopsNeeded = _root.o_Levels[_root.n_GameLevel - 1][1];
_local7 = true;
} else if (_root.s_GameMode.toLowerCase() == "obstruction") {
_root.f_LoadObstructArray();
_root.n_WaveOrigFreq = 4000;
_root.n_WaveReduction = 150;
_root.n_WaveFloor = 2000;
_root.n_GameSeconds = 120;
_root.n_CoinsNeeded = 3;
_root.o_GameControls.o_TimeLeftTitle._visible = true;
_root.o_GameControls.o_Timer._visible = true;
_root.o_GameControls.o_WaveProgress._visible = true;
_root.o_GameControls.o_NextWaveText._visible = true;
_root.n_GameLevel = 1;
_root.n_PopsNeeded = 0;
_local7 = true;
_root.f_DisplayObstruction(_root.n_GameLevel - 1);
}
_root.n_TimerSeconds = _root.n_GameSeconds;
if (_root.n_TimerSeconds > 0) {
_root.o_GameControls.o_Timer.n_Seconds = _root.n_TimerSeconds;
_root.o_GameControls.o_Timer.d_LastTick = new Date();
}
_root.n_Score = 0;
_root.b_PoppingCoins = false;
_root.b_LevelEnding = false;
_root.b_LevelEnded = false;
_root.b_GameInit = true;
_root.b_GameOver = false;
_root.b_Paused = false;
_local4 = 1;
while (_local4 <= 5) {
_local5 = _root.o_GameControls["o_CoinCollect_" + _local4.toString()];
_local5.n_TypeID = _local4;
_local5._visible = _local7;
_local5.n_Total = 0;
_local5.o_CoinGraphics.gotoAndStop("Coin_" + _local4.toString());
_local4++;
}
_root.n_WaveFreq = n_WaveOrigFreq;
_root.n_WaveCounter = _root.n_WaveFreq;
_root.o_GameControls.o_WaveProgress.n_MaxValue = _root.n_WaveFreq;
_root.o_GameControls.o_WaveProgress.n_CurrentValue = _root.n_WaveCounter;
_root.f_ChooseNextDrop();
}
function f_SuperPop(n_TypeID) {
var _local7;
var _local11;
var _local2;
var _local5;
var _local3;
if (!_root.b_IsRotating) {
_root.f_PlaySound("o_Explosions", "MegaPop");
_root.f_StartShake(5);
var _local6;
var _local4;
o_Anim.gotoAndPlay(1);
_local7 = 1;
while (_local7 <= 5) {
_local11 = _root.o_GameControls["o_CoinCollect_" + _local7.toString()];
_local11.n_Total = 0;
_local7++;
}
_root.b_PoppingCoins = true;
_root.n_NewScore = 0;
_local6 = 1;
while (_local6 <= _root.n_CoinMaxX) {
_local4 = 1;
while (_local4 <= _root.n_CoinMaxY) {
_local2 = _root.o_CoinContainer[(("o_Coin_" + _local6.toString()) + "_") + _local4.toString()];
if (_local2.n_TypeID == n_TypeID) {
_root.n_NewScore = _root.n_NewScore + _root.n_BaseScore;
_local2.n_TypeID = 0;
_local2.b_Popping = true;
_local2.o_CoinGraphics.gotoAndPlay("Coin_Pop");
_local5 = _root.o_CoinContainer.attachMovie("Kill_Laser", "Laser_" + _root.o_CoinContainer.getNextHighestDepth(), _root.o_CoinContainer.getNextHighestDepth(), _local3);
switch (Math.ceil(Math.random() * 4)) {
case 1 :
_local3 = new Object({_x:-140, _y:_local2._y, _rotation:0});
break;
case 2 :
_local3 = new Object({_x:140, _y:_local2._y, _rotation:180});
break;
case 3 :
_local3 = new Object({_x:_local2._x, _y:-140, _rotation:90});
break;
default :
_local3 = new Object({_x:_local2._x, _y:140, _rotation:270});
}
_local5._x = _local3._x;
_local5._y = _local3._y;
_local5._rotation = _local3._rotation;
}
_local4++;
}
_local6++;
}
if (_root.n_NewScore != 0) {
_root.n_Score = _root.n_Score + _root.n_NewScore;
}
_root.b_PoppingCoins = false;
}
}
function f_StartPop(n_X, n_Y, n_TypeID) {
var _local4;
var _local5;
var _local14;
var _local6;
var _local13;
var _local12;
var _local11 = 0;
var _local8;
_root.a_CoinArray = new Array();
a_CheckArray = new Array();
var _local3;
var _local2;
_root.a_CheckArray = new Array(_root.n_CoinMaxX);
_local3 = 1;
while (_local3 <= _root.n_CoinMaxX) {
_root.a_CheckArray[_local3] = new Array(_root.n_CoinMaxY);
_local2 = 1;
while (_local2 <= _root.n_CoinMaxY) {
_root.a_CheckArray[_local3][_local2] = false;
_local2++;
}
_local3++;
}
if (((!_root.b_PoppingCoins) && (!_root.b_Paused)) && (n_TypeID != 6)) {
_root.b_PoppingCoins = true;
_root.n_NewScore = 0;
_root.n_NewMultiplier = 0;
_root.n_CoinPopTypeID = n_TypeID;
_root.n_MaxX = n_X;
_root.n_MaxY = n_Y;
_root.n_MinX = n_X;
_root.n_MinY = n_Y;
_root.f_PopCoin(n_X, n_Y);
if (_root.a_CoinArray.length >= _root.n_CoinsNeeded) {
if (_root.n_GameLevel == undefined) {
_local8 = 1;
} else {
_local8 = ((_root.a_CoinArray.length - _root.n_CoinsNeeded) + 1) * (1 + ((_root.n_GameLevel - 1) / 10));
}
_local4 = 0;
while (_local4 < _root.a_CoinArray.length) {
_local5 = _root.o_CoinContainer["o_Coin_" + _root.a_CoinArray[_local4].toString()];
_root.n_NewScore = _root.n_NewScore + _root.n_BaseScore;
_local5.n_TypeID = 0;
_local5.b_Popping = true;
_local5.o_CoinGraphics.gotoAndPlay("Coin_Pop");
_local4++;
}
}
if (_root.n_NewScore != 0) {
_root.f_DoEffect(_root.a_CoinArray.length);
_root.n_Score = _root.n_Score + _root.n_NewScore;
_root.o_GameControls["o_CoinCollect_" + n_TypeID.toString()].n_Total = _root.o_GameControls["o_CoinCollect_" + n_TypeID.toString()].n_Total + _root.a_CoinArray.length;
_local13 = ((_root.o_CoinContainer._x - (_root.o_CoinContainer._width / 2)) + (((_root.n_MaxX + _root.n_MinX) / 2) * _root.n_CoinSpacing)) - (_root.n_CoinSpacing / 2);
_local12 = ((_root.o_CoinContainer._y - (_root.o_CoinContainer._height / 2)) + (((_root.n_MaxY + _root.n_MinY) / 2) * _root.n_CoinSpacing)) - (_root.n_CoinSpacing / 2);
if (_root.n_PopsNeeded > 0) {
_root.n_PopsNeeded = _root.n_PopsNeeded - _root.a_CoinArray.length;
if (_root.n_PopsNeeded <= 0) {
_root.o_GameControls.o_Timer.n_Seconds = 0;
_root.n_PopsNeeded = 0;
}
}
if (_root.a_CoinArray.length <= 10) {
_root.o_PopStats[_root.a_CoinArray.length - 3] = _root.o_PopStats[_root.a_CoinArray.length - 3] + 1;
} else {
_root.o_PopStats[7] = _root.o_PopStats[7] + 1;
}
if (_root.a_CoinArray.length > _root.n_CoinsNeeded) {
_local6 = "Excellent";
if (_root.a_CoinArray.length < _root.o_ScoreWords.length) {
_local6 = _root.o_ScoreWords[_root.a_CoinArray.length - (_root.n_CoinsNeeded + 1)];
} else {
trace("here");
_local6 = _root.o_ScoreWords[_root.o_ScoreWords.length - 1];
}
_root.f_ShowMessage((_root.a_CoinArray.length.toString() + "x Pop! ") + _local6);
}
}
_root.b_PoppingCoins = false;
}
}
function f_PopCoin(n_X, n_Y) {
var _local4 = _root.o_CoinContainer[(("o_Coin_" + n_X.toString()) + "_") + n_Y.toString()];
var _local5 = false;
if ((_root.n_CoinPopTypeID == _local4.n_TypeID) && (!_root.a_CheckArray[n_X][n_Y])) {
if ((((((n_X <= _root.n_CoinMaxX) && (n_Y <= _root.n_CoinMaxX)) && (n_X > 0)) && (n_Y > 0)) && (_local4.n_TypeID > 0)) && (_local4.n_TypeID < 6)) {
if (_root.n_MinX > n_X) {
_root.n_MinX = n_X;
}
if (_root.n_MaxX < n_X) {
_root.n_MaxX = n_X;
}
if (_root.n_MinY > n_Y) {
_root.n_MinY = n_Y;
}
if (_root.n_MaxY < n_Y) {
_root.n_MaxY = n_Y;
}
_root.a_CoinArray[a_CoinArray.length] = (n_X.toString() + "_") + n_Y.toString();
_root.a_CheckArray[n_X][n_Y] = true;
_root.f_PopCoin(n_X, n_Y - 1);
_root.f_PopCoin(n_X, n_Y + 1);
_root.f_PopCoin(n_X - 1, n_Y);
_root.f_PopCoin(n_X + 1, n_Y);
}
}
}
function f_DropCoin(n_X, n_Y) {
var _local2;
var _local3;
var _local5;
if ((((n_Y <= _root.n_CoinMaxX) && (!_root.b_PoppingCoins)) && (!root.b_IsRotating)) && (!_root.b_Paused)) {
_local5 = n_Y - 1;
_local2 = _root.o_CoinContainer[(("o_Coin_" + n_X.toString()) + "_") + _local5.toString()];
_local3 = _root.o_CoinContainer[(("o_Coin_" + n_X.toString()) + "_") + n_Y.toString()];
if (_local2 != undefined) {
if ((((((!_local2.b_Popping) || (_local2.b_Popping == undefined)) && (!_local3.b_Popping)) && ((_local3.n_TypeID == 0) || (_local3.n_TypeID == undefined))) && (_local2.n_TypeID > 0)) && (_local2.n_TypeID < 6)) {
if (_local2.n_TypeID == undefined) {
_local3.n_TypeID = 0;
_local3.o_CoinGraphics.gotoAndStop("Coin_0");
} else {
_local3.n_TypeID = _local2.n_TypeID;
_local3.o_CoinGraphics.gotoAndStop("Coin_" + _local2.n_TypeID);
}
_local2.n_TypeID = 0;
_local2.o_CoinGraphics.gotoAndStop("Coin_0");
}
}
}
}
function f_ResetRotateArray() {
var _local3;
var _local2;
_root.o_RotateArray = new Array(_root.n_CoinMaxX);
_local3 = 1;
while (_local3 <= _root.n_CoinMaxX) {
_root.o_RotateArray[_local3] = new Array(_root.n_CoinMaxY);
_local2 = 1;
while (_local2 <= _root.n_CoinMaxY) {
_root.o_RotateArray[_local3][_local2] = 0;
_local2++;
}
_local3++;
}
}
function f_StartRotate(n_Direction) {
if ((((!_root.b_IsRotating) && (!_root.b_Paused)) && (_root.o_GameControls.o_Timer.n_Seconds != 0)) && (_root.o_GameControls.o_WaveProgress.n_CurrentValue < _root.o_GameControls.o_WaveProgress.n_MaxValue)) {
_root.n_RotateDestination = n_Direction;
_root.b_IsRotating = true;
}
}
function f_SwapRotatedField(n_Degrees) {
var _local3;
var _local2;
var _local6;
var _local5;
var _local4;
_root.f_ResetRotateArray();
_root.f_SetBoxRotation(0);
if (n_Degrees == -90) {
_root.o_CoinContainer.o_RotateBackground._rotation = f_DegreeTransform(_root.o_CoinContainer.o_RotateBackground._rotation, 90);
_local3 = 1;
while (_local3 <= _root.n_CoinMaxX) {
_local2 = 1;
while (_local2 <= _root.n_CoinMaxY) {
_local6 = _local2;
_local5 = (_root.n_CoinMaxX + 1) - _local3;
_root.o_RotateArray[_local3][_local2] = _root.o_CoinContainer[(("o_Coin_" + _local6.toString()) + "_") + _local5.toString()].n_TypeID;
_local2++;
}
_local3++;
}
} else if (n_Degrees == 90) {
_root.o_CoinContainer.o_RotateBackground._rotation = f_DegreeTransform(_root.o_CoinContainer.o_RotateBackground._rotation, -90);
_local3 = 1;
while (_local3 <= _root.n_CoinMaxX) {
_local2 = 1;
while (_local2 <= _root.n_CoinMaxY) {
_local6 = _local2;
_local5 = (_root.n_CoinMaxX + 1) - _local3;
_root.o_RotateArray[_local6][_local5] = _root.o_CoinContainer[(("o_Coin_" + _local3.toString()) + "_") + _local2.toString()].n_TypeID;
_local2++;
}
_local3++;
}
}
_local3 = 1;
while (_local3 <= _root.n_CoinMaxX) {
_local2 = 1;
while (_local2 <= _root.n_CoinMaxY) {
_local4 = _root.o_CoinContainer[(("o_Coin_" + _local3.toString()) + "_") + _local2.toString()];
_local4.n_TypeID = _root.o_RotateArray[_local3][_local2];
_local4.o_CoinGraphics.gotoAndStop("Coin_" + _root.o_RotateArray[_local3][_local2].toString());
_local4._rotation = 0;
_local2++;
}
_local3++;
}
}
function f_InitialiseCoin(n_X, n_Y, n_NewTypeID) {
var _local2 = _root.o_CoinContainer[(("o_Coin_" + n_X.toString()) + "_") + n_Y.toString()];
var _local3;
if ((_local2.n_TypeID == undefined) || (_local2.n_TypeID == 0)) {
if (n_NewTypeID == -1) {
_local3 = Math.ceil(Math.random() * 5);
} else {
_local3 = n_NewTypeID;
}
if (_root.b_GameInit) {
_local2.n_TypeID = _local3;
} else {
_local2.n_TypeID = 0;
}
_local2.n_X = n_X;
_local2.n_Y = n_Y;
_local2.b_Popping = false;
_local2._x = (_root.n_CoinLeftTopPadding + (n_X * _root.n_CoinSpacing)) - _root.n_CoinSpacing;
_local2._y = (_root.n_CoinLeftTopPadding + (n_Y * _root.n_CoinSpacing)) - _root.n_CoinSpacing;
_local2.o_CoinGraphics.gotoAndStop("Coin_" + _local2.n_TypeID.toString());
}
}
function f_SetBoxRotation(n_RotateValue) {
var _local3;
var _local2;
_root.o_CoinContainer._rotation = n_RotateValue;
_local3 = 1;
while (_local3 <= _root.n_CoinMaxX) {
_local2 = 1;
while (_local2 <= _root.n_CoinMaxY) {
if (_root.o_CoinContainer[(("o_Coin_" + _local3.toString()) + "_") + _local2.toString()].n_TypeID != 0) {
_root.o_CoinContainer[(("o_Coin_" + _local3.toString()) + "_") + _local2.toString()]._rotation = n_RotateValue * -1;
}
_local2++;
}
_local3++;
}
}
function f_ToggleSounds() {
var _local2 = new Date();
var _local3 = SharedObject.getLocal("GameSettings");
if (d_SoundsToggle == undefined) {
d_SoundsToggle = new Date(1999, 12, 31, 23, 59, 59, 0);
}
if (_root.f_OverTimeDiff(_root.d_SoundsToggle, _local2, 100)) {
_root.b_SoundsOn = !_root.b_SoundsOn;
_local3.data.b_SoundsOn = _root.b_SoundsOn;
if (_root.b_SoundsOn) {
_root.f_PlaySound("o_Sounds", "GameMusic");
} else {
stopAllSounds();
}
_root.d_SoundsToggle = _local2;
}
}
function f_PlaySound(s_Group, s_Sound) {
if (_root.b_SoundsOn) {
_root[s_Group].gotoAndPlay(s_Sound);
}
}
function f_StartGame(s_NewGameType) {
_root.b_GameInit = false;
_root.s_GameMode = s_NewGameType;
_root.o_GameLogo.gotoAndPlay("MoveToSide");
_root.gotoAndPlay("Start");
}
function f_EndGame() {
var _local4;
var _local2;
var _local3;
_local4 = 1;
while (_local4 <= _root.n_CoinMaxX) {
_local2 = 1;
while (_local2 <= _root.n_CoinMaxY) {
_local3 = _root.o_CoinContainer[(("o_Coin_" + _local4.toString()) + "_") + _local2.toString()];
_local3.n_TypeID = 0;
_local3.removeMovieClip();
_local2++;
}
_local4++;
}
if (_root.o_KeyList != undefined) {
Key.removeListener(_root.o_KeyList);
_root.o_KeyList = undefined;
}
_root.gotoAndPlay("EndGame");
}
function f_DegreeTransform(n_CurrentPosition, n_ChangeVal) {
if ((n_CurrentPosition + n_ChangeVal) > 360) {
return((n_CurrentPosition + n_ChangeVal) - 360);
}
if ((n_CurrentPosition + n_ChangeVal) < 0) {
return((n_CurrentPosition + n_ChangeVal) + 360);
}
return(n_CurrentPosition + n_ChangeVal);
}
function f_OverTimeDiff(d_DateFrom, d_DateTo, n_MillisecondsDiff) {
var _local2 = (d_DateFrom.getMilliseconds() + (d_DateFrom.getSeconds() * 1000)) + (d_DateFrom.getMinutes() * 60000);
var _local1 = (d_DateTo.getMilliseconds() + (d_DateTo.getSeconds() * 1000)) + (d_DateTo.getMinutes() * 60000);
if (((_local2 + n_MillisecondsDiff) <= _local1) || (_local2 >= (_local1 + n_MillisecondsDiff))) {
return(true);
}
return(false);
}
function f_TimeDiff(d_DateFrom, d_DateTo) {
var _local3 = (d_DateFrom.getMilliseconds() + (d_DateFrom.getSeconds() * 1000)) + (d_DateFrom.getMinutes() * 60000);
var _local2 = (d_DateTo.getMilliseconds() + (d_DateTo.getSeconds() * 1000)) + (d_DateTo.getMinutes() * 60000);
return(_local2 - _local3);
}
function f_TogglePause() {
if ((f_TimeDiff(_root.d_LastPause, new Date()) > 1000) || (_root.d_LastPause == undefined)) {
if (!_root.b_Paused) {
_root.b_PausedMusic = _root.b_SoundsOn;
if (_root.b_PausedMusic) {
_root.f_ToggleSounds();
}
} else if (_root.b_PausedMusic) {
_root.f_ToggleSounds();
}
_root.b_Paused = !_root.b_Paused;
_root.d_LastPause = new Date();
}
}
function f_DisplayObstruction(n_ArrayVal) {
var _local6 = a_ObstructArray[n_ArrayVal].split("|");
var _local2;
var _local4;
var _local3;
var _local5;
_local4 = 0;
while (_local4 < 10) {
_local2 = 0;
while (_local2 < 10) {
_local5 = _local6[_local4].substring(_local2, _local2 + 1) == "1";
_local3 = _root.o_CoinContainer[(("o_Coin_" + (_local2 + 1).toString()) + "_") + (_local4 + 1).toString()];
if (_local5) {
_local3.n_TypeID = 6;
_local3.o_CoinGraphics.gotoAndStop("Coin_6");
} else {
_local3.n_TypeID = 0;
_local3.o_CoinGraphics.gotoAndStop("Coin_0");
}
_local2++;
}
_local4++;
}
}
function f_LoadObstructArray() {
a_ObstructArray = new Array();
a_ObstructArray[0] = "0000000000|0010000000|0010000000|0011110000|0000000000|0000000000|0000111100|0000000100|0000000100|0000000000|";
a_ObstructArray[1] = "0000000000|0000000000|0100000000|0010000000|0001000000|0000000000|0000001000|0000000100|0000000010|0000000000|";
a_ObstructArray[2] = "0000000000|0000000000|0011000000|0000000000|0000001100|0000000000|0000000000|0000000000|0011000000|0000000000|";
a_ObstructArray[3] = "0000000000|0000000000|0010000000|0010000000|0000000000|0000110000|0000000000|0000000100|0000000100|0000000000|";
a_ObstructArray[4] = "0000110000|0000000000|0000000000|0000000000|1000110000|0000110001|0000000000|0000000000|0000000000|0000110000|";
a_ObstructArray[5] = "0010000000|0010000000|0010000000|0010000000|0000000000|0000000000|0000000100|0000000100|0000000100|0000000100|";
a_ObstructArray[6] = "0000000000|0000000000|0000000000|0000010000|0000010000|0010000100|0000100000|0000100000|0000000000|0000000000|";
a_ObstructArray[7] = "0000000000|0000000000|0010000000|0010000000|0000000000|0011001100|0000000000|0000000100|0000000100|0000000000|";
a_ObstructArray[8] = "1000000111|1000000000|1000000000|0000000000|0000000000|0000000000|0000000000|0000000001|0000000001|1110000001|";
a_ObstructArray[9] = "0000001100|0000000000|1000000000|1000000000|0000000000|0000000000|0000000001|0000000001|0000000000|0011000000|";
a_ObstructArray[10] = "0000000000|0000000000|0000000000|0000000000|0000110000|0000110000|0000000000|0000000000|0000000000|0000000000|";
a_ObstructArray[11] = "0000110000|0000110000|0000000000|0000000000|1100000011|1100000011|0000000000|0000000000|0000110000|0000110000|";
}
function f_LockedSite() {
if (((_root._url.toLowerCase().indexOf("smileygamer.com") == -1) && (_root._url.toLowerCase().indexOf("thenakeddeveloper.com") == -1)) && (_root._url.toLowerCase().indexOf("localhost") == -1)) {
return(false);
}
return(true);
}
function f_QuitGame() {
var _local2;
_root.f_PlaySound("o_Explosions", "MegaPop");
_root.n_GameLevel = _root.a_ObstructArray.length + 1;
_root.b_LevelEnding = true;
}
function f_ShowMessage(s_Text) {
if (_root.s_GameMode != "menu") {
_root.a_MessageArray.push(s_Text);
}
}
function f_DoMessages() {
var _local2;
var _local3;
if (_root.a_MessageArray.length > 0) {
if (_root.f_TimeDiff(_root.d_MessageLast, new Date()) >= _root.n_MessageDelay) {
_local2 = _root.attachMovie("Messages", "Messages", _root.getNextHighestDepth());
_local3 = _root.a_MessageArray.shift();
_local2._x = _root.n_GameWidth / 2;
_local2._y = (_root.n_GameHeight / 2) - 50;
_local2.o_InnerText.o_Text.text = _local3;
_local2.gotoAndPlay(1);
_root.d_MessageLast = new Date();
}
}
}
function f_StartShake(n_CoinCount) {
if (n_CoinCount > 3) {
var _local4 = 0.25;
var _local5 = 3;
var _local2 = 0.25;
_root.b_Shaking = true;
_root.d_ShakeStart = new Date();
_root.n_ShakeStrength = _root.n_ShakeLower + ((n_CoinCount - 3) * _root.n_ShakeMultiplier);
_root.n_ShakeStrength = ((_root.n_ShakeStrength > _root.n_ShakeUpper) ? (_root.n_ShakeUpper) : (_root.n_ShakeStrength));
_root.o_CoinContainer._x = _root.n_ContainerX;
_root.o_CoinContainer._y = _root.n_ContainerY;
}
}
function f_DoShake() {
if (_root.b_Shaking) {
_root.o_CoinContainer._x = _root.n_ContainerX + ((_root.n_ShakeStrength * -1) + (Math.random() * (_root.n_ShakeStrength * 2)));
_root.o_CoinContainer._y = _root.n_ContainerY + ((_root.n_ShakeStrength * -1) + (Math.random() * (_root.n_ShakeStrength * 2)));
if (_root.d_ShakeStart.getTime() <= (new Date().getTime() - _root.n_ShakeLength)) {
_root.f_EndShake();
}
}
}
function f_EndShake() {
_root.o_CoinContainer._x = _root.n_ContainerX;
_root.o_CoinContainer._y = _root.n_ContainerY;
_root.b_Shaking = false;
_root.d_ShakeStart = undefined;
_root.n_ShakeStrength = 0;
}
function f_DoEffect(n_Coins) {
var _local2;
if (n_Coins >= 5) {
_local2 = _root.o_CoinContainer.attachMovie("BigBlast", "BigBlast_" + _root.o_CoinContainer.getNextHighestDepth(), {_x:0, _y:0});
_local2._rotation = 0;
_local2.gotoAndPlay(1);
_root.f_StartShake(5);
_root.f_PlaySound("o_Explosions", "LargePop");
} else {
_root.f_PlaySound("o_Explosions", "Pop");
}
}
var b_Testing = false;
var s_TestURL = "";
var s_URL = (_root.b_Testing ? (_root.s_TestURL) : (_root._url));
var _mochiads_game_id = "3d42a9a092892b74";
var CPMStarContentSpotID = "1155Q4B6711AF";
var CPMStarInverlevelID = "1156QCEC211D0";
var s_SmileyID = "3772";
var s_GameAds = "";
var d_AdvertStartTime;
var n_CPMWaitTime = 5000;
var b_Debugging = true;
var n_GameLocation;
var b_LockedSite;
var a_MessageArray;
var n_MessageDelay = 750;
var d_MessageLast;
var n_MessageRepeatDelay = 2000;
var n_Score;
var o_ScoreWords = ["Excellent", "Hot", "Amazing", "Awesome", "Epic", "Uber", "Legendary"];
var n_CoinsNeeded = 3;
var n_BaseScore = 50;
var s_GameMode = "progressive";
var n_GameMinutes;
var n_GameSeconds;
var n_PopsNeeded;
var n_TimerSeconds;
var n_TotalTimerSeconds;
var n_GameLevel;
var b_LevelEnding;
var b_LevelEnded;
var b_GameOver;
var n_LevelEndPopChance = 20;
var n_GameUpperTime = 120;
var b_SoundsOn;
var d_SoundsToggle;
var b_GameInit;
var b_ShownInstructions;
var a_ObstructArray;
var n_WaveCounter;
var n_WaveOrigFreq;
var n_WaveFreq;
var d_WaveLastDrop;
var d_WaveTimer;
var n_WaveReduction;
var n_WaveFloor;
var o_Levels = [[120, 40], [120, 45], [110, 50], [110, 55], [100, 60], [100, 70], [100, 75], [100, 80], [90, 90], [90, 100], [90, 120], [80, 150]];
var o_DropItems;
var n_CoinSpacing = 27;
var n_CoinLeftTopPadding = -121;
var n_CoinMaxX = 10;
var n_CoinMaxY = 10;
var n_CoinPopTypeID;
var b_PoppingCoins;
var a_CoinArray;
var a_CheckArray;
var n_CoinTimeBoost = 0.5;
var n_SuperPopLimit = 50;
var o_PopStats;
var b_Shaking;
var d_ShakeStart;
var n_ShakeStrength;
var n_ShakeLower = 0.25;
var n_ShakeUpper = 3;
var n_ShakeMultiplier = 0.25;
var n_ShakeLength = 1000;
var n_MaxX;
var n_MaxY;
var n_MinX;
var n_MinY;
var n_GameWidth = 500;
var n_GameHeight = 500;
var n_ContainerX = 250;
var n_ContainerY = 275;
var b_IsRotating;
var n_RotateSpeed = 10;
var n_RotateDestination;
var o_RotateArray;
var b_Paused;
var b_PausedMusic;
var d_LastPause;
var o_KeyList;
var b_KeyLeft;
var b_KeyRight;
var b_KeyDown;
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
var pv;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
pv = ((fv == 5) ? (getVersion()) : (System.capabilities.version));
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=8&fv=") + fv) + "&v=") + escape(pv)) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
function postMindJoltAPIConnect(success) {
trace("[MindJoltAPI] service successfully loaded");
}
var MindJoltAPI;
this.KIBA_Logo._visible = false;
_lockroot = true;
__com_mochibot__("f1558189", this, 10301, true);
mochi.as2.MochiServices.connect("3d42a9a092892b74");
this.KIBA_Logo._visible = false;
this.o_AddictingLogo._visible = false;
if (MindJoltAPI == undefined) {
System.security.allowDomain("static.mindjolt.com");
MindJoltAPI = createEmptyMovieClip("MindJoltAPI", getNextHighestDepth());
var apiPath = ((_level0.mjPath != undefined) ? (_level0.mjPath) : "http://static.mindjolt.com/api/as2/api_as2_local.swf");
var apiLoader = new MovieClipLoader();
var apiLoadListener = new Object();
apiLoader.addListener(apiLoadListener);
apiLoadListener.onLoadInit = function () {
MindJoltAPI.service.connect(postMindJoltAPIConnect);
};
apiLoadListener.onLoadError = function () {
trace("[MindJoltAPI] failed to load.");
};
apiLoader.loadClip(apiPath, MindJoltAPI);
}
if (((((((_root.s_URL.toLowerCase().indexOf("addictinggames", 0) > 0) || (_root.s_URL.toLowerCase().indexOf("smileygamer", 0) > 0)) || (_root.s_URL.toLowerCase().indexOf("static.kaisergames.de", 0) > 0)) || (_root.s_URL.toLowerCase().indexOf("cdn.kaisergames.de", 0) > 0)) || (_root.s_URL.toLowerCase().indexOf("vo.llnwd.net", 0) > 0)) || (_root.s_URL.toLowerCase().indexOf("kongregate", 0) > 0)) || (_root.s_URL.toLowerCase().indexOf("gamesclub.com", 0) > 0)) {
if (_root.s_URL.toLowerCase().indexOf("addictinggames", 0) > 0) {
this.o_AddictingLogo._x = 275;
this.o_AddictingLogo._visible = true;
}
if (((_root.s_URL.toLowerCase().indexOf("static.kaisergames.de", 0) > 0) || (_root.s_URL.toLowerCase().indexOf("cdn.kaisergames.de", 0) > 0)) || (_root.s_URL.toLowerCase().indexOf("vo.llnwd.net", 0) > 0)) {
this.KIBA_Logo._x = 215;
this.KIBA_Logo._visible = true;
} else {
this.KIBA_Logo._visible = false;
}
} else {
this.o_AddictingLogo._visible = false;
this.KIBA_Logo._visible = false;
this.adBox.loadMovie("http://server.cpmstar.com/adviewas2.swf?contentspotid=" + _root.CPMStarContentSpotID);
o_Loader.gotoAndPlay(2);
}
stop();
Frame 2
stop();
Frame 3
_root.b_GameInit = false;
this.o_GameLogo.gotoAndPlay(1);
Frame 4
this.stop();
Frame 5
this.stop();
Frame 6
this.onEnterFrame = function () {
var _local4;
var _local3;
var _local12;
var _local8 = true;
var _local5;
var _local7;
if (_root.b_GameInit != true) {
this.o_LevelText._visible = false;
_root.f_InitialiseGame();
var _local6;
var _local9;
_local6 = 1;
while (_local6 <= 5) {
_local9 = _root.o_GameControls["o_CoinCollect_" + _local6.toString()];
_local9.o_CoinGraphics.gotoAndStop("Coin_" + _local6.toString());
_local6++;
}
o_GameControls.o_WaveProgress._visible = true;
o_GameControls.o_NextWaveText._visible = true;
} else if (_root.b_ShownInstructions) {
if ((!_root.b_LevelEnding) && (!_root.b_LevelEnded)) {
if (_root.n_GameLevel != undefined) {
this.o_GameControls.o_LevelText._visible = true;
if (_root.s_GameMode.toLowerCase() == "obstruction") {
this.o_GameControls.o_LevelText.text = (_root.n_GameLevel.toString() + " of ") + _root.a_ObstructArray.length.toString();
} else {
this.o_GameControls.o_LevelText.text = (_root.n_GameLevel.toString() + " of ") + _root.o_Levels.length.toString();
}
} else {
this.o_GameControls.o_LevelText._visible = false;
}
if (Key.isDown(80) || (Key.isDown(112))) {
_root.f_TogglePause();
}
if (Key.isDown(27)) {
_root.f_QuitGame();
}
if (!_root.b_Paused) {
_root.n_WaveCounter = _root.f_TimeDiff(_root.d_WaveTimer, new Date());
_root.o_GameControls.o_WaveProgress.n_CurrentValue = _root.n_WaveCounter;
}
if (_root.b_IsRotating) {
if ((_root.n_RotateDestination < 0) && (_root.o_CoinContainer._rotation > _root.n_RotateDestination)) {
_root.f_SetBoxRotation(_root.o_CoinContainer._rotation - n_RotateSpeed);
} else if ((_root.n_RotateDestination > 0) && (_root.o_CoinContainer._rotation < _root.n_RotateDestination)) {
_root.f_SetBoxRotation(_root.o_CoinContainer._rotation + n_RotateSpeed);
} else if ((_root.n_RotateDestination > 0) && (_root.o_CoinContainer._rotation >= _root.n_RotateDestination)) {
_root.f_SwapRotatedField(-90);
b_IsRotating = false;
} else if ((_root.n_RotateDestination < 0) && (_root.o_CoinContainer._rotation <= _root.n_RotateDestination)) {
_root.f_SwapRotatedField(90);
b_IsRotating = false;
}
} else if ((!_root.b_IsRotating) && (!_root.b_Paused)) {
_local4 = 1;
while (_local4 <= _root.n_CoinMaxX) {
_local3 = _root.n_CoinMaxY;
while (_local3 >= 2) {
_root.f_DropCoin(_local4, _local3);
_local3--;
}
_local4++;
}
if ((_root.n_WaveCounter >= _root.n_WaveFreq) && (!_root.b_PoppingCoins)) {
if (!_root.f_FireWave()) {
_root.b_LevelEnding = true;
_root.b_LevelEnded = false;
}
}
}
if (!_root.b_Paused) {
_root.o_Paused._x = -1000;
if ((_root.o_GameControls.o_Timer.n_Seconds == 0) && (!_root.b_IsRotating)) {
_root.b_LevelEnding = true;
_root.b_LevelEnded = true;
}
} else if (!_root.b_IsRotating) {
_root.o_Paused._x = _root.o_CoinContainer._x;
_root.o_Paused._y = _root.o_CoinContainer._y;
}
} else if (_root.b_LevelEnding) {
if ((_root.s_GameMode.toLowerCase() == "progressive") && (_root.n_PopsNeeded <= 0)) {
_local8 = true;
} else {
_local3 = 1;
while (_local3 <= _root.n_CoinMaxY) {
_local4 = 1;
while (_local4 <= _root.n_CoinMaxX) {
_local5 = _root.o_CoinContainer[(("o_Coin_" + _local4.toString()) + "_") + _local3.toString()];
if ((_local5.n_TypeID != 6) && (_local5.n_TypeID != 0)) {
_local7 = 100 * Math.random(100);
if (_local7 <= _root.n_LevelEndPopChance) {
_local5.o_CoinGraphics.gotoAndPlay("Coin_Pop");
_local5.n_TypeID = 0;
}
_local8 = false;
}
_local4++;
}
_local3++;
}
}
if (_local8 == true) {
_root.b_LevelEnding = false;
_root.b_LevelEnded = true;
}
} else if (_root.b_LevelEnded) {
_root.n_GameLevel++;
if (_root.s_GameMode.toLowerCase() == "obstruction") {
if ((_root.n_GameLevel <= _root.a_ObstructArray.length) && (_root.o_GameControls.o_Timer.n_Seconds == 0)) {
_root.attachMovie("LevelUp_Animation", "o_LevelUp", _root.getNextHighestDepth(), {_x:_root.n_ContainerX, _y:_root.n_ContainerY});
_root.f_DisplayObstruction(_root.n_GameLevel - 1);
_root.b_LevelEnded = false;
_root.b_LevelEnding = false;
_root.n_TimerSeconds = _root.n_GameSeconds;
_root.o_GameControls.o_Timer.n_Seconds = _root.n_TimerSeconds;
if (!_root.f_FireWave()) {
_root.b_LevelEnding = true;
_root.b_LevelEnded = false;
}
} else if ((_root.n_GameLevel > _root.a_ObstructArray.length) && (_root.o_GameControls.o_Timer.n_Seconds == 0)) {
_root.attachMovie("YouWon_Animation", "o_GameOver", _root.getNextHighestDepth(), {_x:_root.n_ContainerX, _y:_root.n_ContainerY});
_root.b_GameOver = true;
} else {
_root.attachMovie("GameOver_Animation", "o_GameOver", _root.getNextHighestDepth(), {_x:_root.n_ContainerX, _y:_root.n_ContainerY});
_root.b_GameOver = true;
}
} else if (_root.s_GameMode.toLowerCase() == "progressive") {
if ((_root.n_GameLevel <= _root.o_Levels.length) && (_root._root.n_PopsNeeded <= 0)) {
_root.attachMovie("LevelUp_Animation", "o_LevelUp", _root.getNextHighestDepth(), {_x:_root.n_ContainerX, _y:_root.n_ContainerY});
_root.b_LevelEnded = false;
_root.b_LevelEnding = false;
_root.n_TimerSeconds = _root.o_Levels[_root.n_GameLevel - 1][0];
_root.o_GameControls.o_Timer.n_Seconds = _root.n_TimerSeconds;
_root.n_PopsNeeded = _root.o_Levels[_root.n_GameLevel - 1][1];
} else if ((_root.n_GameLevel > _root.o_Levels.length) && (_root._root.n_PopsNeeded <= 0)) {
_root.attachMovie("YouWon_Animation", "o_GameOver", _root.getNextHighestDepth(), {_x:_root.n_ContainerX, _y:_root.n_ContainerY});
_root.b_GameOver = true;
} else {
_root.attachMovie("GameOver_Animation", "o_GameOver", _root.getNextHighestDepth(), {_x:_root.n_ContainerX, _y:_root.n_ContainerY});
_root.b_GameOver = true;
}
} else {
_root.b_GameOver = true;
}
}
}
_root.f_DoShake();
_root.f_DoMessages();
};
Frame 7
if (_root.b_GameOver) {
_root.f_EndGame();
} else {
_root.gotoAndPlay("GameLoop");
}
Frame 8
this.onEnterFrame = eval (undefined)();
this.stop();
Frame 9
this.stop();
Frame 11
var o_Settings = SharedObject.getLocal("GameSettings");
if ((_root.n_Score > Shared.data.n_Score) || (o_Settings.data.n_Score == undefined)) {
o_Settings.data.n_Score = _root.n_Score;
}
this.o_FinalScore.text = _root.n_Score.toString();
_root.HPScoreService.postScore(_root.n_Score, _root.s_GameMode);
_root.kongregateServices.connect();
_root.kongregateScores.submit(_root.n_Score);
ScoreAPI = new LocalConnection();
ScoreAPI.send(_root.com_mindjolt_api, "submitScore", _root.n_Score, _root.s_GameMode);
trace(_root.s_GameMode.toLowerCase());
if (_root.s_GameMode.toLowerCase() == "freeplay") {
var o = {n:[11, 10, 14, 4, 8, 5, 14, 2, 6, 14, 14, 4, 12, 11, 11, 8], f:function (i, s) {
if (s.length == 16) {
return(s);
}
return(this.f(i + 1, s + this.n[i].toString(16)));
}};
var boardID = o.f(0, "");
mochi.as2.MochiScores.showLeaderboard({boardID:boardID, score:_root.n_Score});
}
if (_root.s_GameMode.toLowerCase() == "progressive") {
var o = {n:[6, 13, 8, 11, 15, 10, 4, 1, 7, 0, 9, 9, 10, 2, 14, 5], f:function (i, s) {
if (s.length == 16) {
return(s);
}
return(this.f(i + 1, s + this.n[i].toString(16)));
}};
var boardID = o.f(0, "");
mochi.as2.MochiScores.showLeaderboard({boardID:boardID, score:_root.n_Score});
} else if (_root.s_GameMode.toLowerCase() == "obstruction") {
var o = {n:[3, 11, 2, 13, 9, 15, 14, 9, 7, 11, 0, 6, 10, 13, 15, 5], f:function (i, s) {
if (s.length == 16) {
return(s);
}
return(this.f(i + 1, s + this.n[i].toString(16)));
}};
var boardID = o.f(0, "");
mochi.as2.MochiScores.showLeaderboard({boardID:boardID, score:_root.n_Score});
}
this.stop();
Frame 12
gotoAndPlay ("Menu");
Symbol 4 MovieClip [Messages] Frame 34
this.removeMovieClip();
Symbol 6 MovieClip [NewScoreText] Frame 1
this.onEnterFrame = function () {
this.o_ScoreText.text = _parent.n_NewScore.toString();
};
Symbol 7 MovieClip [NewScoreHolder] Frame 1
var n_NewScore;
Symbol 7 MovieClip [NewScoreHolder] Frame 16
this.removeMovieClip();
Symbol 11 MovieClip [LevelUp_Animation] Frame 1
_root.f_PlaySound("o_Sounds", "LevelUp");
Symbol 11 MovieClip [LevelUp_Animation] Frame 31
this.removeMovieClip();
Symbol 16 MovieClip [BigBlast] Frame 11
this.removeMovieClip();
Symbol 18 MovieClip [Score] Frame 1
var s_ScoreString = ("0000000000" + _root.n_Score.toString()).toString();
if (_root.n_Score != undefined) {
this.ScoreText.text = s_ScoreString.substring(s_ScoreString.length - 10, s_ScoreString.length);
} else {
this.ScoreText.text = "0000000000";
}
Symbol 18 MovieClip [Score] Frame 2
gotoAndPlay (1);
Symbol 26 MovieClip [Progress] Frame 1
function f_showProgress() {
if (n_CurrentValue != undefined) {
if (this.n_CurrentValue >= this.n_MaxValue) {
this.gotoAndPlay("Unfinished");
} else {
this.gotoAndPlay("Finished");
}
} else {
this.gotoAndPlay("Unfinished");
}
}
var n_MaxValue;
var n_CurrentValue;
this.onEnterFrame = function () {
if ((n_MaxValue != undefined) and (n_CurrentValue != undefined)) {
if (n_CurrentValue > n_MaxValue) {
o_ProgressBar._width = o_ProgressBorder._width;
} else {
o_ProgressBar._width = (o_ProgressBorder._width / n_MaxValue) * n_CurrentValue;
}
}
};
Symbol 26 MovieClip [Progress] Frame 2
this.f_showProgress();
Symbol 26 MovieClip [Progress] Frame 4
this.f_showProgress();
Symbol 40 Button [ClickToPlayGame]
on (release) {
_root.gotoAndPlay("Splash");
}
Symbol 41 MovieClip [Loader] Frame 2
var siteLoaded = _root.getBytesLoaded();
var siteTotal = _root.getBytesTotal();
var percentage = Math.round((siteLoaded / siteTotal) * 100);
loadingBar._xscale = percentage;
percentClip.percentDisplay.text = percentage + "%";
percentClip._x = loadingBar._x + loadingBar._width;
bytesDisplay.text = ((("loaded " + siteLoaded) + " of ") + siteTotal) + " bytes";
if (siteLoaded >= siteTotal) {
_root.d_AdvertStartTime = new Date();
gotoAndPlay ("End");
}
Symbol 41 MovieClip [Loader] Frame 3
gotoAndPlay ("Looper");
Symbol 41 MovieClip [Loader] Frame 4
if (((((((_root.s_URL.toLowerCase().indexOf(_root.s_TestSiteString, 0) > 0) || (_root.s_URL.toLowerCase().indexOf("addictinggames.com", 0) > 0)) || (_root.s_URL.toLowerCase().indexOf("smileygamer.com", 0) > 0)) || (_root.s_URL.toLowerCase().indexOf("static.kaisergames.de", 0) > 0)) || (_root.s_URL.toLowerCase().indexOf("cdn.kaisergames.de", 0) > 0)) || (_root.s_URL.toLowerCase().indexOf("vo.llnwd.net", 0) > 0)) || (_root.s_URL.toLowerCase().indexOf("kongregate.com", 0) > 0)) {
_root.gotoAndPlay("Splash");
} else if (_root.f_TimeDiff(_root.d_AdvertStartTime, new Date()) >= _root.n_CPMWaitTime) {
this.gotoAndPlay("PlayGame");
}
Symbol 41 MovieClip [Loader] Frame 5
this.gotoAndPlay("End");
Symbol 41 MovieClip [Loader] Frame 6
this.stop();
Symbol 47 Button [KIBA_LoaderLink]
on (release) {
getURL ("http://www.kibagames.com", "_blank");
}
Symbol 62 Button
on (release) {
getURL ("http://www.addictinggames.com", "_blank");
}
Symbol 382 MovieClip [__Packages.mochi.as2.MochiSync] Frame 0
class mochi.as2.MochiSync
{
var _syncContainer;
function MochiSync () {
_syncContainer = {};
}
function getProp(name) {
return(_syncContainer[name]);
}
function setProp(name, value) {
if (_syncContainer[name] == value) {
return(undefined);
}
_syncContainer[name] = value;
mochi.as2.MochiServices.send("sync_propUpdate", {name:name, value:value});
}
function triggerEvent(eventType, args) {
switch (eventType) {
case SYNC_REQUEST :
mochi.as2.MochiServices.send("sync_syncronize", _syncContainer);
break;
case SYNC_PROPERTY :
_syncContainer[args.name] = args.value;
}
}
static var SYNC_REQUEST = "SyncRequest";
static var SYNC_PROPERTY = "UpdateProperty";
}
Symbol 383 MovieClip [__Packages.mochi.as2.MochiServices] Frame 0
class mochi.as2.MochiServices
{
static var _id, _container, _clip, _sendChannelName, __get__comChannelName, onError, _listenChannel, _sendChannel;
function MochiServices () {
}
static function get id() {
return(_id);
}
static function get clip() {
return(_container);
}
static function get childClip() {
return(_clip);
}
static function getVersion() {
return("3.3 as2");
}
static function allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function get isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function set comChannelName(val) {
if (val != undefined) {
if (val.length > 3) {
_sendChannelName = val + "_fromgame";
initComChannels();
}
}
//return(__get__comChannelName());
}
static function get connected() {
return(_connected);
}
static function connect(id, clip, onError) {
warnID(id, false);
if ((!_connected) && (_clip == undefined)) {
trace("MochiServices Connecting...");
_connecting = true;
init(id, clip);
}
if (onError != undefined) {
mochi.as2.MochiServices.onError = onError;
} else if (mochi.as2.MochiServices.onError == undefined) {
mochi.as2.MochiServices.onError = function (errorCode) {
trace(errorCode);
};
}
}
static function disconnect() {
if (_connected || (_connecting)) {
_connecting = (_connected = false);
flush(true);
if (_clip != undefined) {
_clip.removeMovieClip();
delete _clip;
}
_listenChannel.close();
}
}
static function init(id, clip) {
_id = id;
if (clip != undefined) {
_container = clip;
} else {
_container = _root;
}
loadCommunicator(id, _container);
}
static function loadCommunicator(id, clip) {
var _local6 = "_mochiservices_com_" + id;
var _local5 = new MovieClipLoader();
var _local3 = {};
if (_clip != null) {
return(_clip);
}
if (!isNetworkAvailable) {
return(null);
}
if (urlOptions().servURL) {
_servURL = urlOptions().servURL;
}
var _local4 = _servURL + _services;
if (urlOptions().servicesURL) {
_local4 = urlOptions().servicesURL;
}
allowDomains(_local4);
_clip = clip.createEmptyMovieClip(_local6, 10336, false);
_listenChannelName = _listenChannelName + ((Math.floor(new Date().getTime()) + "_") + Math.floor(Math.random() * 99999));
listen();
if (_local3.waitInterval != null) {
clearInterval(_local3.waitInterval);
}
_local3.onLoadError = loadError;
_local3.onLoadStart = function (target_mc) {
this.isLoading = true;
};
_local3.startTime = getTimer();
_local3.wait = function () {
if ((getTimer() - this.startTime) > 10000) {
if (!this.isLoading) {
mochi.as2.MochiServices.disconnect();
mochi.as2.MochiServices.onError.apply(null, ["IOError"]);
}
clearInterval(this.waitInterval);
}
};
_local3.waitInterval = setInterval(_local3, "wait", 1000);
_local5.addListener(_local3);
_local5.loadClip((((((_local4 + "?listenLC=") + _listenChannelName) + "&mochiad_options=") + escape(_root.mochiad_options)) + "&api_version=") + getVersion(), _clip);
_sendChannel = new LocalConnection();
_sendChannel._queue = [];
return(_clip);
}
static function loadError(target_mc, errorCode, httpStatus) {
trace("MochiServices could not load.");
disconnect();
onError.apply(null, [errorCode]);
}
static function onStatus(infoObject) {
if (!(infoObject.level === "error")) {
} else {
_connected = false;
_listenChannel.connect(_listenChannelName);
}
}
static function listen() {
_listenChannel = new LocalConnection();
_listenChannel.handshake = function (args) {
mochi.as2.MochiServices.__set__comChannelName(args.newChannel);
};
_listenChannel.allowDomain = function (d) {
return(true);
};
_listenChannel.allowInsecureDomain = _listenChannel.allowDomain;
_listenChannel._nextcallbackID = 0;
_listenChannel._callbacks = {};
_listenChannel.connect(_listenChannelName);
trace("Waiting for MochiAds services to connect...");
}
static function initComChannels() {
if (!_connected) {
_sendChannel.onStatus = function (infoObject) {
mochi.as2.MochiServices.onStatus(infoObject);
};
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"});
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"registerGame", id:_id, clip:_clip, version:getVersion()});
_listenChannel.onStatus = function (infoObject) {
mochi.as2.MochiServices.onStatus(infoObject);
};
_listenChannel.onReceive = function (pkg) {
var _local5 = pkg.callbackID;
var _local4 = this._callbacks[_local5];
if (!_local4) {
return(undefined);
}
var _local2 = _local4.callbackMethod;
var _local3 = _local4.callbackObject;
if (_local3 && (typeof(_local2) == "string")) {
_local2 = _local3[_local2];
}
if (_local2 != undefined) {
_local2.apply(_local3, pkg.args);
}
delete this._callbacks[_local5];
};
_listenChannel.onEvent = function (pkg) {
switch (pkg.target) {
case "events" :
mochi.as2.MochiEvents.triggerEvent(pkg.event, pkg.args);
break;
case "coins" :
mochi.as2.MochiCoins.triggerEvent(pkg.event, pkg.args);
break;
case "sync" :
mochi.as2.MochiServices.servicesSync.triggerEvent(pkg.event, pkg.args);
}
};
_listenChannel.onError = function () {
mochi.as2.MochiServices.onError.apply(null, ["IOError"]);
};
trace("[SERVICES_API] connected!");
_connecting = false;
_connected = true;
while (_sendChannel._queue.length > 0) {
_sendChannel.send(_sendChannelName, "onReceive", _sendChannel._queue.shift());
}
}
}
static function flush(error) {
var _local1;
var _local2;
while (_sendChannel._queue.length > 0) {
_local1 = _sendChannel._queue.shift();
if (_local1.callbackID != null) {
_local2 = _listenChannel._callbacks[_local1.callbackID];
}
delete _listenChannel._callbacks[_local1.callbackID];
if (error) {
handleError(_local1.args, _local2.callbackObject, _local2.callbackMethod);
}
}
}
static function handleError(args, callbackObject, callbackMethod) {
if (args != null) {
if (args.onError != null) {
args.onError.apply(null, ["NotConnected"]);
}
if ((args.options != null) && (args.options.onError != null)) {
args.options.onError.apply(null, ["NotConnected"]);
}
}
if (callbackMethod != null) {
args = {};
args.error = true;
args.errorCode = "NotConnected";
if ((callbackObject != null) && (typeof(callbackMethod) == "string")) {
callbackObject[callbackMethod](args);
} else if (callbackMethod != null) {
callbackMethod.apply(args);
}
}
}
static function send(methodName, args, callbackObject, callbackMethod) {
if (_connected) {
_sendChannel.send(_sendChannelName, "onReceive", {methodName:methodName, args:args, callbackID:_listenChannel._nextcallbackID});
} else {
if ((_clip == undefined) || (!_connecting)) {
trace("Error: MochiServices not connected. Please call MochiServices.connect(). Function: " + methodName);
handleError(args, callbackObject, callbackMethod);
flush(true);
return(undefined);
}
_sendChannel._queue.push({methodName:methodName, args:args, callbackID:_listenChannel._nextcallbackID});
}
_listenChannel._callbacks[_listenChannel._nextcallbackID] = {callbackObject:callbackObject, callbackMethod:callbackMethod};
_listenChannel._nextcallbackID++;
}
static function urlOptions() {
var _local5 = {};
var _local6;
if (_root._url.indexOf("mochiad_options") != -1) {
var _local2 = (_root._url.indexOf("mochiad_options") + "mochiad_options".length) + 1;
_local6 = _root._url.substr(_local2, _root._url.length);
} else if (_root.mochiad_options) {
_local6 = _root.mochiad_options;
}
if (_local6) {
var _local4 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = _local4[_local2].split("=");
_local5[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
return(_local5);
}
static function warnID(bid, leaderboard) {
bid = bid.toLowerCase();
if (bid.length != 16) {
trace(("WARNING: " + (leaderboard ? "board" : "game")) + " ID is not the appropriate length");
return(undefined);
}
if (bid == "1e113c7239048b3f") {
if (leaderboard) {
trace("WARNING: Using testing board ID");
} else {
trace("WARNING: Using testing board ID as game ID");
}
return(undefined);
}
if (bid == "84993a1de4031cd8") {
if (leaderboard) {
trace("WARNING: Using testing game ID as board ID");
} else {
trace("WARNING: Using testing game ID");
}
return(undefined);
}
var _local1 = 0;
while (_local1 < bid.length) {
switch (bid.charAt(_local1)) {
case "0" :
case "1" :
case "2" :
case "3" :
case "4" :
case "5" :
case "6" :
case "7" :
case "8" :
case "9" :
case "a" :
case "b" :
case "c" :
case "d" :
case "e" :
case "f" :
break;
default :
trace("WARNING: Board ID contains illegal characters: " + bid);
return(undefined);
}
_local1++;
}
}
static function addLinkEvent(url, burl, btn, onClick) {
var timeout = 1500;
var t0 = getTimer();
var _local2 = new Object();
_local2.mav = getVersion();
_local2.swfv = btn.getSWFVersion() || 6;
_local2.swfurl = btn._url;
_local2.fv = System.capabilities.version;
_local2.os = System.capabilities.os;
_local2.lang = System.capabilities.language;
_local2.scres = (System.capabilities.screenResolutionX + "x") + System.capabilities.screenResolutionY;
var s = "?";
var _local3 = 0;
for (var _local6 in _local2) {
if (_local3 != 0) {
s = s + "&";
}
_local3++;
s = ((s + _local6) + "=") + escape(_local2[_local6]);
}
if (!(netupAttempted || (_connected))) {
var ping = btn.createEmptyMovieClip("ping", 777);
var _local7 = btn.createEmptyMovieClip("nettest", 778);
netupAttempted = true;
ping.loadMovie("http://x.mochiads.com/linkping.swf?t=" + getTimer());
_local7.onEnterFrame = function () {
if ((ping._totalframes > 0) && (ping._totalframes == ping._framesloaded)) {
delete this.onEnterFrame;
} else if ((getTimer() - t0) > timeout) {
delete this.onEnterFrame;
mochi.as2.MochiServices.netup = false;
}
};
}
var _local4 = btn.createEmptyMovieClip("clk", 1001);
_local4._alpha = 0;
_local4.beginFill(1044735);
_local4.moveTo(0, 0);
_local4.lineTo(0, btn._height);
_local4.lineTo(btn._width, btn._height);
_local4.lineTo(btn._width, 0);
_local4.lineTo(0, 0);
_local4.endFill();
_local4.onRelease = function () {
if (mochi.as2.MochiServices.netup) {
getURL (url + s, "_blank");
} else {
getURL (burl, "_blank");
}
if (onClick != undefined) {
onClick();
}
};
}
static function setContainer(clip) {
}
static function stayOnTop(clip) {
}
static var _servURL = "http://www.mochiads.com/static/lib/services/";
static var _services = "services.swf";
static var _mochiLC = "MochiLC.swf";
static var _listenChannelName = "__ms_";
static var _connecting = false;
static var _connected = false;
static var netup = true;
static var netupAttempted = false;
static var servicesSync = new mochi.as2.MochiSync();
}
Symbol 384 MovieClip [__Packages.mochi.as2.MochiEventDispatcher] Frame 0
class mochi.as2.MochiEventDispatcher
{
var eventTable;
function MochiEventDispatcher () {
eventTable = {};
}
function buildDelegate(thisObject, thatObject) {
var _local2 = {thisObject:thisObject, thatObject:thatObject};
if (thatObject != undefined) {
var funct = ((typeof(thatObject) == "string") ? (thisObject[thatObject]) : (thatObject));
_local2.delegate = function (args) {
funct.call(thisObject, args);
};
} else {
_local2.delegate = thisObject;
}
return(_local2);
}
function compareDelegate(d_A, d_B) {
if ((d_A.thisObject != d_B.thisObject) || (d_A.thatObject != d_B.thatObject)) {
return(false);
}
return(true);
}
function addEventListener(event, thisObject, thatObject) {
removeEventListener(event, thisObject, thatObject);
eventTable[event].push(buildDelegate(thisObject, thatObject));
}
function removeEventListener(event, thisObject, thatObject) {
var _local3 = buildDelegate(thisObject, thatObject);
if (eventTable[event] == undefined) {
eventTable[event] = [];
return(undefined);
}
for (var _local4 in eventTable[event]) {
if (!compareDelegate(eventTable[event][_local4], _local3)) {
continue;
}
eventTable[event].splice(Number(_local4), 1);
}
}
function triggerEvent(event, args) {
if (eventTable[event] == undefined) {
return(undefined);
}
for (var _local4 in eventTable[event]) {
eventTable[event][_local4].delegate(args);
}
}
}
Symbol 385 MovieClip [__Packages.mochi.as2.MochiEvents] Frame 0
class mochi.as2.MochiEvents
{
static var gameStart, levelStart;
function MochiEvents () {
}
static function getVersion() {
return(mochi.as2.MochiServices.getVersion());
}
static function startSession(achievementID) {
mochi.as2.MochiServices.send("events_beginSession", {achievementID:achievementID}, null, null);
}
static function trigger(kind, obj) {
if (obj == undefined) {
obj = {};
} else if (obj.kind != undefined) {
trace("WARNING: optional arguements package contains key 'id', it will be overwritten");
obj.kind = kind;
}
mochi.as2.MochiServices.send("events_triggerEvent", {eventObject:obj}, null, null);
}
static function setNotifications(clip, style) {
var _local2 = {};
for (var _local3 in style) {
_local2[_local3] = style[_local3];
}
_local2.clip = clip;
mochi.as2.MochiServices.send("events_setNotifications", _local2, null, null);
}
static function addEventListener(eventType, thisObject, thatObject) {
_dispatcher.addEventListener(eventType, thisObject, thatObject);
}
static function triggerEvent(eventType, args) {
_dispatcher.triggerEvent(eventType, args);
}
static function removeEventListener(eventType, thisObject, thatObject) {
_dispatcher.removeEventListener(eventType, thisObject, thatObject);
}
static function startGame() {
gameStart = new Date().getTime();
trigger("start_game");
}
static function endGame() {
var _local1 = new Date().getTime() - gameStart;
trigger("end_game", {time:_local1});
}
static function startLevel() {
levelStart = new Date().getTime();
trigger("start_level");
}
static function endLevel() {
var _local1 = new Date().getTime() - levelStart;
trigger("end_level", {time:_local1});
}
static var ACHIEVEMENT_RECEIVED = "AchievementReceived";
static var ALIGN_TOP_LEFT = "ALIGN_TL";
static var ALIGN_TOP = "ALIGN_T";
static var ALIGN_TOP_RIGHT = "ALIGN_TR";
static var ALIGN_LEFT = "ALIGN_L";
static var ALIGN_CENTER = "ALIGN_C";
static var ALIGN_RIGHT = "ALIGN_R";
static var ALIGN_BOTTOM_LEFT = "ALIGN_BL";
static var ALIGN_BOTTOM = "ALIGN_B";
static var ALIGN_BOTTOM_RIGHT = "ALIGN_BR";
static var FORMAT_SHORT = "ShortForm";
static var FORMAT_LONG = "LongForm";
static var _dispatcher = new mochi.as2.MochiEventDispatcher();
}
Symbol 386 MovieClip [__Packages.mochi.as2.MochiCoins] Frame 0
class mochi.as2.MochiCoins
{
function MochiCoins () {
}
static function getVersion() {
return(mochi.as2.MochiServices.getVersion());
}
static function showStore(options) {
mochi.as2.MochiServices.send("coins_showStore", {options:options}, null, null);
}
static function showItem(options) {
if ((options == undefined) || (typeof(options.item) != "string")) {
trace("ERROR: showItem call must pass an Object with an item key");
return(undefined);
}
mochi.as2.MochiServices.send("coins_showItem", {options:options}, null, null);
}
static function showVideo(options) {
if ((options == undefined) || (typeof(options.item) != "string")) {
trace("ERROR: showVideo call must pass an Object with an item key");
return(undefined);
}
mochi.as2.MochiServices.send("coins_showVideo", {options:options}, null, null);
}
static function showLoginWidget(options) {
mochi.as2.MochiServices.setContainer();
mochi.as2.MochiServices.stayOnTop();
mochi.as2.MochiServices.send("coins_showLoginWidget", {options:options});
}
static function hideLoginWidget() {
mochi.as2.MochiServices.send("coins_hideLoginWidget");
}
static function getStoreItems() {
mochi.as2.MochiServices.send("coins_getStoreItems");
}
static function getUserInfo() {
mochi.as2.MochiServices.send("coins_getUserInfo");
}
static function saveUserProperties(properties) {
mochi.as2.MochiServices.send("coins_saveUserProperties", properties);
}
static function addEventListener(eventType, delegate) {
_dispatcher.addEventListener(eventType, delegate);
}
static function triggerEvent(eventType, args) {
_dispatcher.triggerEvent(eventType, args);
}
static function removeEventListener(eventType, delegate) {
_dispatcher.removeEventListener(eventType, delegate);
}
static var LOGGED_IN = "LoggedIn";
static var LOGGED_OUT = "LoggedOut";
static var LOGIN_SHOW = "LoginShow";
static var LOGIN_HIDE = "LoginHide";
static var STORE_SHOW = "StoreShow";
static var STORE_HIDE = "StoreHide";
static var PROFILE_SHOW = "ProfileShow";
static var PROFILE_HIDE = "ProfileHide";
static var PROPERTIES_SAVED = "PropertySaved";
static var WIDGET_LOADED = "WidgetLoaded";
static var ITEM_OWNED = "ItemOwned";
static var ITEM_NEW = "ItemNew";
static var STORE_ITEMS = "StoreItems";
static var USER_INFO = "UserInfo";
static var ERROR = "Error";
static var IO_ERROR = "IOError";
static var NO_USER = "NoUser";
static var PROPERTIES_SIZE = "PropertiesSize";
static var _dispatcher = new mochi.as2.MochiEventDispatcher();
}
Symbol 387 MovieClip [__Packages.mochi.as2.MochiScores] Frame 0
class mochi.as2.MochiScores
{
static var boardID, onClose, onError;
function MochiScores () {
}
static function setBoardID(boardID) {
mochi.as2.MochiServices.warnID(boardID, true);
mochi.as2.MochiScores.boardID = boardID;
mochi.as2.MochiServices.send("scores_setBoardID", {boardID:boardID});
}
static function showLeaderboard(options) {
options.clip = mochi.as2.MochiServices.clip;
if ((options.clip != mochi.as2.MochiServices.__get__clip()) || (mochi.as2.MochiServices.__get__childClip()._target == undefined)) {
mochi.as2.MochiServices.disconnect();
trace("WARNING! This application is attempting to connect to MochiServices inside a showLeaderboard call!");
trace("make sure MochiServices.connect is called as early in the application runtime as possible.");
mochi.as2.MochiServices.connect(mochi.as2.MochiServices.__get__id(), options.clip);
}
delete options.clip;
if (options.name != null) {
if (typeof(options.name) == "object") {
if (options.name.text != undefined) {
options.name = options.name.text;
}
}
}
if (options.score != null) {
if (options.score instanceof TextField) {
if (options.score.text != undefined) {
options.score = options.score.text;
}
} else if (options.score instanceof mochi.as2.MochiDigits) {
options.score = options.score.value;
}
var _local1 = Number(options.score);
if (isNaN(_local1)) {
trace(("ERROR: Submitted score '" + options.score) + "' will be rejected, score is 'Not a Number'");
} else if ((_local1 == Number.NEGATIVE_INFINITY) || (_local1 == Number.POSITIVE_INFINITY)) {
trace(("ERROR: Submitted score '" + options.score) + "' will be rejected, score is an infinite");
} else {
if (Math.floor(_local1) != _local1) {
trace(("WARNING: Submitted score '" + options.score) + "' will be truncated");
}
options.score = _local1;
}
}
if (options.onDisplay != null) {
options.onDisplay();
} else {
mochi.as2.MochiServices.__get__clip().stop();
}
if (options.onClose != null) {
onClose = options.onClose;
} else {
onClose = function () {
mochi.as2.MochiServices.__get__clip().play();
};
}
if (options.onError != null) {
onError = options.onError;
} else {
onError = onClose;
}
if (options.boardID == null) {
if (boardID != null) {
options.boardID = boardID;
}
}
mochi.as2.MochiServices.warnID(options.boardID, true);
trace("[MochiScores] NOTE: Security Sandbox Violation errors below are normal");
mochi.as2.MochiServices.send("scores_showLeaderboard", {options:options}, null, doClose);
}
static function closeLeaderboard() {
mochi.as2.MochiServices.send("scores_closeLeaderboard");
}
static function getPlayerInfo(callbackObj, callbackMethod) {
mochi.as2.MochiServices.send("scores_getPlayerInfo", null, callbackObj, callbackMethod);
}
static function submit(score, name, callbackObj, callbackMethod) {
score = Number(score);
if (isNaN(score)) {
trace(("ERROR: Submitted score '" + String(score)) + "' will be rejected, score is 'Not a Number'");
} else if ((score == Number.NEGATIVE_INFINITY) || (score == Number.POSITIVE_INFINITY)) {
trace(("ERROR: Submitted score '" + String(score)) + "' will be rejected, score is an infinite");
} else {
if (Math.floor(score) != score) {
trace(("WARNING: Submitted score '" + String(score)) + "' will be truncated");
}
score = Number(score);
}
mochi.as2.MochiServices.send("scores_submit", {score:score, name:name}, callbackObj, callbackMethod);
}
static function requestList(callbackObj, callbackMethod) {
mochi.as2.MochiServices.send("scores_requestList", null, callbackObj, callbackMethod);
}
static function scoresArrayToObjects(scores) {
var _local5 = {};
var _local1;
var _local4;
var _local2;
var _local6;
for (var _local8 in scores) {
if (typeof(scores[_local8]) == "object") {
if ((scores[_local8].cols != null) && (scores[_local8].rows != null)) {
_local5[_local8] = [];
_local2 = scores[_local8];
_local4 = 0;
while (_local4 < _local2.rows.length) {
_local6 = {};
_local1 = 0;
while (_local1 < _local2.cols.length) {
_local6[_local2.cols[_local1]] = _local2.rows[_local4][_local1];
_local1++;
}
_local5[_local8].push(_local6);
_local4++;
}
} else {
_local5[_local8] = {};
for (var _local7 in scores[_local8]) {
_local5[_local8][_local7] = scores[_local8][_local7];
}
}
} else {
_local5[_local8] = scores[_local8];
}
}
return(_local5);
}
static function doClose(args) {
if (args.error == true) {
if (args.errorCode == undefined) {
args.errorCode = "IOError";
}
onError.apply(null, [args.errorCode]);
} else {
onClose.apply();
}
}
}
Symbol 388 MovieClip [__Packages.mochi.as2.MochiDigits] Frame 0
class mochi.as2.MochiDigits
{
var Encoder, Fragment, Sibling;
function MochiDigits (digit, index) {
Encoder = 0;
setValue(digit, index);
}
function get value() {
return(Number(toString()));
}
function set value(v) {
setValue(v);
//return(value);
}
function addValue(v) {
value = value + v;
}
function setValue(digit, index) {
var _local3 = digit.toString();
if ((index == undefined) || (isNaN(index))) {
index = 0;
}
Fragment = _local3.charCodeAt(index++) ^ Encoder;
if (index < _local3.length) {
Sibling = new mochi.as2.MochiDigits(digit, index);
} else {
Sibling = null;
}
reencode();
}
function reencode() {
var _local2 = int(2147483647 * Math.random());
Fragment = Fragment ^ (_local2 ^ Encoder);
Encoder = _local2;
}
function toString() {
var _local2 = String.fromCharCode(Fragment ^ Encoder);
return(((Sibling != null) ? (_local2.concat(Sibling.toString())) : (_local2)));
}
}
Symbol 80 Button [SplashButton]
on (release) {
getURL ("http://www.smileygamer.com/?gameref=" + _root.s_SmileyID, "_blank");
}
Symbol 81 Button [Smiley_Button]
on (release) {
getURL ("http://www.smileygamer.com/?gameref=" + _root.s_SmileyID, "_blank");
}
Symbol 85 Button [Juegos_Button]
on (release) {
getURL ("http://www.juegosdiarios.com", "_blank");
}
Symbol 87 MovieClip [SplashGraphics] Frame 1
trace(_root.s_URL);
if (_root.s_URL.toLowerCase().indexOf("juegosdiarios", 0) > 0) {
this.gotoAndPlay("Juegos");
} else if (_root.s_URL.toLowerCase().indexOf("addictinggames", 0) > 0) {
this.gotoAndPlay("addicting");
}
Symbol 87 MovieClip [SplashGraphics] Frame 121
_root.play();
Symbol 87 MovieClip [SplashGraphics] Frame 242
_root.play();
Symbol 87 MovieClip [SplashGraphics] Frame 363
_root.play();
Symbol 116 MovieClip [CoinGraphics] Frame 1
stop();
Symbol 116 MovieClip [CoinGraphics] Frame 2
stop();
Symbol 116 MovieClip [CoinGraphics] Frame 3
stop();
Symbol 116 MovieClip [CoinGraphics] Frame 4
stop();
Symbol 116 MovieClip [CoinGraphics] Frame 5
stop();
Symbol 116 MovieClip [CoinGraphics] Frame 6
stop();
Symbol 116 MovieClip [CoinGraphics] Frame 7
stop();
Symbol 116 MovieClip [CoinGraphics] Frame 18
_parent.b_Popping = false;
Symbol 118 Button [CoinButton]
on (release) {
if (!_root.b_Paused) {
if ((((_root.o_CoinContainer[(("o_Coin_" + this.n_X.toString()) + "_") + (this.n_Y - 1).toString()].n_TypeID == this.n_TypeID) || (_root.o_CoinContainer[(("o_Coin_" + (this.n_X + 1).toString()) + "_") + this.n_Y.toString()].n_TypeID == this.n_TypeID)) || (_root.o_CoinContainer[(("o_Coin_" + (this.n_X - 1).toString()) + "_") + this.n_Y.toString()].n_TypeID == this.n_TypeID)) || (_root.o_CoinContainer[(("o_Coin_" + this.n_X.toString()) + "_") + (this.n_Y + 1).toString()].n_TypeID == this.n_TypeID)) {
_root.f_StartPop(this.n_X, this.n_Y, this.n_TypeID);
}
}
}
Symbol 119 MovieClip [Coin] Frame 1
var n_TypeID;
var n_X;
var n_Y;
var b_Popping;
this.onEnterFrame = function () {
};
Symbol 119 MovieClip [Coin] Frame 2
this.gotoAndPlay("CoinStart");
Symbol 139 Button [StartTimedGame]
on (release) {
_root.f_StartGame("progressive");
}
Symbol 141 Button [StartObstructionGame]
on (release) {
_root.f_StartGame("obstruction");
}
Symbol 143 Button [StartFreePlayGame]
on (release) {
_root.f_StartGame("freeplay");
}
Symbol 149 Button
on (release) {
_root.o_GameLogo.gotoAndPlay("MoveToSide");
_root.s_GameMode = "progressive";
_root.n_Score = 0;
_root.gotoAndPlay("HiScores");
}
Symbol 150 Button
on (release) {
_root.o_GameLogo.gotoAndPlay("MoveToSide");
_root.s_GameMode = "obstruction";
_root.n_Score = 0;
_root.gotoAndPlay("HiScores");
}
Symbol 151 Button
on (release) {
_root.o_GameLogo.gotoAndPlay("MoveToSide");
_root.s_GameMode = "freeplay";
_root.n_Score = 0;
_root.gotoAndPlay("HiScores");
}
Symbol 159 Button [KIBA_MenuLink]
on (release) {
getURL ("http://www.kibagames.com", "_blank");
}
Symbol 163 Button [Juegos_Small_Button]
on (release) {
getURL ("http://www.juegosdiarios.com", "_blank");
}
Symbol 169 Button
on (release) {
_root.f_ToggleSounds();
}
Symbol 172 Button
on (release) {
_root.f_ToggleSounds();
}
Symbol 173 MovieClip [SoundsOnOff_SansKey] Frame 1
if (_root.b_SoundsOn == false) {
this.gotoAndPlay("Off");
} else {
this.gotoAndPlay("On");
}
Symbol 173 MovieClip [SoundsOnOff_SansKey] Frame 3
if (_root.b_SoundsOn) {
this.gotoAndPlay("On");
} else {
this.gotoAndPlay("Off");
}
Symbol 173 MovieClip [SoundsOnOff_SansKey] Frame 5
if (_root.b_SoundsOn) {
this.gotoAndPlay("On");
} else {
this.gotoAndPlay("Off");
}
Symbol 177 Button [AddGame]
on (release) {
getURL ("http://www.smileygamer.com/freecontent.html?gameref=" + _root.s_SmileyID, "_blank");
}
Symbol 178 MovieClip [MenuContainer] Frame 28
if (_root.s_URL.toLowerCase().indexOf("juegosdiarios", 0) > 0) {
this.o_Juegos._visible = true;
this.o_Juegos._x = 0;
} else {
this.o_Juegos._visible = false;
this.o_Juegos._x = -1000;
}
if (_root.s_URL.toLowerCase().indexOf("addictinggames", 0) > 0) {
this.o_Addicting._visible = true;
this.o_Addicting._x = 0;
} else {
this.o_Addicting._visible = false;
this.o_Addicting._x = -1000;
}
if (((_root.s_URL.toLowerCase().indexOf("static.kaisergames.de", 0) > 0) || (_root.s_URL.toLowerCase().indexOf("cdn.kaisergames.de", 0) > 0)) || (_root.s_URL.toLowerCase().indexOf("vo.llnwd.net", 0) > 0)) {
this.o_KIBA._visible = true;
this.o_KIBA._x = 0;
} else {
this.o_KIBA._visible = false;
this.o_KIBA._x = -1000;
}
stop();
Symbol 182 Button [Credits_Click]
on (release) {
getURL ("http://www.smileygamer.com/?gameref=" + _root.s_SmileyID, "_blank");
}
Symbol 212 MovieClip [GameLogo] Frame 1
if (_root.b_SoundsOn == undefined) {
_root.b_SoundsOn = true;
_root.f_PlaySound("o_Sounds", "GameMusic");
}
Symbol 212 MovieClip [GameLogo] Frame 42
stop();
Symbol 212 MovieClip [GameLogo] Frame 55
this.stop();
Symbol 223 Button [SponsorMoreGames]
on (release) {
getURL ("http://www.smileygamer.com/?gameref=" + _root.s_SmileyID, "_blank");
}
Symbol 228 MovieClip [Sounds] Frame 2
gotoAndStop (1);
Symbol 228 MovieClip [Sounds] Frame 4
gotoAndStop (1);
Symbol 228 MovieClip [Sounds] Frame 6
gotoAndStop (1);
Symbol 228 MovieClip [Sounds] Frame 8
gotoAndStop (1);
Symbol 228 MovieClip [Sounds] Frame 10
gotoAndStop (1);
Symbol 232 MovieClip [ExplosionSounds] Frame 2
gotoAndStop (1);
Symbol 232 MovieClip [ExplosionSounds] Frame 4
this.stop();
Symbol 232 MovieClip [ExplosionSounds] Frame 6
this.stop();
Symbol 232 MovieClip [ExplosionSounds] Frame 8
this.stop();
Symbol 232 MovieClip [ExplosionSounds] Frame 10
this.stop();
Symbol 239 MovieClip [GameStart_Animation] Frame 26
_root.gotoAndPlay("GameLoop");
Symbol 243 Button
on (release) {
_root.f_ToggleSounds();
}
Symbol 244 Button
on (release) {
_root.f_ToggleSounds();
}
Symbol 245 MovieClip [SoundsOnOff] Frame 1
if (_root.b_SoundsOn == false) {
this.gotoAndPlay("Off");
} else {
this.gotoAndPlay("On");
}
Symbol 245 MovieClip [SoundsOnOff] Frame 3
if (_root.b_SoundsOn) {
this.gotoAndPlay("On");
} else {
this.gotoAndPlay("Off");
}
Symbol 245 MovieClip [SoundsOnOff] Frame 5
if (_root.b_SoundsOn) {
this.gotoAndPlay("On");
} else {
this.gotoAndPlay("Off");
}
Symbol 251 Button [CoinCollectorHit]
on (release) {
if (this.n_Total >= _root.n_SuperPopLimit) {
_root.f_SuperPop(this.n_TypeID);
}
}
Symbol 252 MovieClip [CoinCollector] Frame 1
var n_Total;
var n_TypeID;
this.onEnterFrame = function () {
if (n_TypeID == undefined) {
n_TypeID = this._name.split("_")[this._name.split("_").length - 1];
}
if (n_Total != undefined) {
if (n_Total < _root.n_SuperPopLimit) {
this.o_Total.text = "x" + n_Total.toString();
this.o_MovingArrows._visible = false;
} else {
this.o_Total.text = "READY";
this.o_MovingArrows._visible = true;
}
} else {
this.o_Total.text = "x0";
this.o_MovingArrows._visible = false;
}
};
Symbol 252 MovieClip [CoinCollector] Frame 2
gotoAndPlay (1);
Symbol 258 Button
on (release) {
_root.f_StartRotate(-90);
}
Symbol 263 Button
on (release) {
_root.f_StartRotate(90);
}
Symbol 266 Button
on (release) {
_root.f_QuitGame();
}
Symbol 270 Button
on (release) {
_root.f_FireWave();
}
Symbol 279 MovieClip [PreviewBox] Frame 1
var n_Rotate;
if (n_Rotate != undefined) {
n_Rotate = n_Rotate + 5;
if (n_Rotate > 360) {
n_Rotate = n_Rotate - 360;
}
} else {
n_Rotate = 0;
}
this.o_Rotate._rotation = n_Rotate;
Symbol 279 MovieClip [PreviewBox] Frame 2
this.gotoAndPlay(1);
Symbol 284 Button
on (release) {
this.gotoAndPlay("progressive_2");
}
Symbol 288 Button
on (release) {
_root.b_ShownInstructions = true;
_root.o_GameControls.o_Instructions._visible = false;
}
Symbol 290 Button
on (release) {
this.gotoAndPlay("progressive_3");
}
Symbol 294 Button
on (release) {
this.gotoAndPlay("progressive_4");
}
Symbol 296 Button
on (release) {
this.gotoAndPlay("progressive_5");
}
Symbol 302 Button
on (release) {
this.gotoAndPlay("progressive_6");
}
Symbol 304 Button
on (release) {
this.gotoAndPlay("progressive_7");
}
Symbol 306 Button
on (release) {
this.gotoAndPlay("obstruction_2");
}
Symbol 307 Button
on (release) {
this.gotoAndPlay("obstruction_3");
}
Symbol 308 Button
on (release) {
this.gotoAndPlay("obstruction_4");
}
Symbol 309 Button
on (release) {
this.gotoAndPlay("obstruction_5");
}
Symbol 310 Button
on (release) {
this.gotoAndPlay("obstruction_6");
}
Symbol 311 Button
on (release) {
this.gotoAndPlay("obstruction_7");
}
Symbol 313 Button
on (release) {
this.gotoAndPlay("freeplay_2");
}
Symbol 314 Button
on (release) {
this.gotoAndPlay("freeplay_3");
}
Symbol 315 Button
on (release) {
this.gotoAndPlay("freeplay_4");
}
Symbol 316 Button
on (release) {
this.gotoAndPlay("freeplay_5");
}
Symbol 317 Button
on (release) {
this.gotoAndPlay("freeplay_6");
}
Symbol 319 MovieClip [Instructions] Frame 1
this.stop();
Symbol 319 MovieClip [Instructions] Frame 2
this.stop();
Symbol 319 MovieClip [Instructions] Frame 3
this.stop();
Symbol 319 MovieClip [Instructions] Frame 4
this.stop();
Symbol 319 MovieClip [Instructions] Frame 5
this.stop();
Symbol 319 MovieClip [Instructions] Frame 6
this.stop();
Symbol 319 MovieClip [Instructions] Frame 7
this.stop();
Symbol 319 MovieClip [Instructions] Frame 8
this.stop();
Symbol 319 MovieClip [Instructions] Frame 9
this.stop();
Symbol 319 MovieClip [Instructions] Frame 10
this.stop();
Symbol 319 MovieClip [Instructions] Frame 11
this.stop();
Symbol 319 MovieClip [Instructions] Frame 12
this.stop();
Symbol 319 MovieClip [Instructions] Frame 13
this.stop();
Symbol 319 MovieClip [Instructions] Frame 14
this.stop();
Symbol 319 MovieClip [Instructions] Frame 15
this.stop();
Symbol 319 MovieClip [Instructions] Frame 16
this.stop();
Symbol 319 MovieClip [Instructions] Frame 17
this.stop();
Symbol 319 MovieClip [Instructions] Frame 18
this.stop();
Symbol 319 MovieClip [Instructions] Frame 19
this.stop();
Symbol 319 MovieClip [Instructions] Frame 20
this.stop();
Symbol 319 MovieClip [Instructions] Frame 21
this.stop();
Symbol 321 MovieClip [Timer] Frame 1
var n_Seconds;
var d_LastTick;
this.onEnterFrame = function () {
var _local4 = "00";
var _local3 = "00";
var _local6 = this.o_TimerText.getTextFormat();
var _local5;
if ((!_root.b_Paused) && (_root.b_ShownInstructions)) {
if ((this.n_Seconds != undefined) && (this.d_LastTick != undefined)) {
if (this.n_Seconds > 0) {
if (_root.f_OverTimeDiff(this.d_LastTick, new Date(), 1000)) {
this.n_Seconds--;
this.d_LastTick = new Date();
}
}
if (this.n_Seconds <= 30) {
_local5 = 16711680 /* 0xFF0000 */;
} else if ((this.n_Seconds > 30) && (this.n_Seconds <= 60)) {
_local5 = 16776960 /* 0xFFFF00 */;
} else {
_local5 = 16777215 /* 0xFFFFFF */;
}
_local6.color = _local5;
_local4 = "00" + Math.floor(this.n_Seconds / 60);
_local4 = _local4.substr(_local4.length - 2, 2);
_local3 = "00" + (this.n_Seconds % 60);
_local3 = _local3.substr(_local3.length - 2, 2);
this.o_TimerText.text = (_local4 + ":") + _local3;
this.o_TimerText.setTextFormat(_local6);
}
}
};
Symbol 328 MovieClip [PopsNeeded] Frame 1
if (_root.n_PopsNeeded > 0) {
this.ScoreText.text = _root.n_PopsNeeded;
} else {
this.ScoreText.text = "0";
}
Symbol 328 MovieClip [PopsNeeded] Frame 2
gotoAndPlay (1);
Symbol 333 MovieClip [GameControls] Frame 1
this.stop();
Symbol 333 MovieClip [GameControls] Frame 2
this.stop();
Symbol 333 MovieClip [GameControls] Frame 3
this.stop();
Symbol 337 MovieClip [GameEnd_Animation] Frame 56
_root.gotoAndPlay("PreHiScores");
Symbol 372 Button [PreHiScoreGoNext]
on (release) {
this.play();
}
Symbol 375 Button
on (release) {
this.play();
}
Symbol 376 MovieClip [PreHiScores_Animation] Frame 6
var o_PopText;
this.o_Text.text = "You Scored " + _root.n_Score.toString();
var i = 0;
while (i < _root.o_PopStats.length) {
this["o_Hits_" + (i + 3).toString()].text = _root.o_PopStats[i].toString();
i++;
}
if (_root.s_URL.toLowerCase().indexOf("addictinggames", 0) > 0) {
this.o_AddictingLogo._x = 0;
this.o_AddictingLogo._visible = true;
} else {
if ((((((((_root.s_URL.toLowerCase().indexOf(_root.s_TestSiteString, 0) > 0) || (_root.s_URL.toLowerCase().indexOf("addictinggames", 0) > 0)) || (_root.s_URL.toLowerCase().indexOf("smileygamer", 0) > 0)) || (_root.s_URL.toLowerCase().indexOf("static.kaisergames.de", 0) > 0)) || (_root.s_URL.toLowerCase().indexOf("cdn.kaisergames.de", 0) > 0)) || (_root.s_URL.toLowerCase().indexOf("vo.llnwd.net", 0) > 0)) || (_root.s_URL.toLowerCase().indexOf("kongregate", 0) > 0)) || (_root.s_URL.toLowerCase().indexOf("gamesclub.com", 0) > 0)) {
} else {
this.adBox.loadMovie("http://server.cpmstar.com/adviewas2.swf?contentspotid=" + _root.CPMStarInverlevelID);
}
this.o_AddictingLogo._visible = false;
}
if (_root.s_URL.toLowerCase().indexOf("mindjolt", 0) > 0) {
this.o_Text.text = "Saving your score : " + _root.n_Score.toString();
_root.MindJoltAPI.service.submitScore(_root.n_Score);
} else {
this.o_Text.text = "You Scored " + _root.n_Score.toString();
}
if ((_root.s_URL.toLowerCase().indexOf("addictinggames", 0) > 0) || (_root.s_URL.toLowerCase().indexOf("mindjolt", 0) > 0)) {
this.o_GoNext._visible = false;
this.o_GoMenu._visible = true;
} else {
this.o_GoNext._visible = true;
this.o_GoMenu._visible = false;
}
this.stop();
Symbol 376 MovieClip [PreHiScores_Animation] Frame 11
if ((_root.s_URL.toLowerCase().indexOf("addictinggames", 0) > 0) || (_root.s_URL.toLowerCase().indexOf("mindjolt", 0) > 0)) {
_root.gotoAndPlay("Menu");
} else {
_root.gotoAndPlay("HiScores");
}