Frame 1
function f_ShowScores(b_ClearScores) {
if (b_ClearScores) {
_root.n_Score = 0;
}
_root.gotoAndPlay("HiScores");
}
function f_BuildMap() {
var _local3;
var _local2;
var _local7;
var _local6;
var _local4;
var _local5;
if (_root.o_TileContainer) {
_root._root.o_TileContainer.removeMovieClip();
}
_root.attachMovie("TileContainer", "o_TileContainer", _root.getNextHighestDepth());
_root.o_TileStrengthArray = new Array(_root.n_XTiles);
_root.n_CurrentObjects = 0;
_root.o_TileContainer._x = _root.n_GameWidth / 2;
_root.o_TileContainer._y = _root.n_GameHeight / 2;
_local3 = 0;
while (_local3 < _root.n_XTiles) {
_root.o_TileStrengthArray[_local3] = new Array(_root.n_YTiles);
_local2 = 0;
while (_local2 < _root.n_YTiles) {
_root.o_TileStrengthArray[_local3][_local2] = new Object({n_TypeID:0, n_Distance:100000, n_DistancePerc:10000, n_Angle:0, n_X:_local3, n_Y:_local2, n_UpgradeID:0});
_local4 = (("Tile_" + _local3) + "_") + _local2;
_local7 = _root.n_TileContainerOffsetX + ((_local3 * _root.n_TileSize) * 1.5);
_local6 = _root.n_TileContainerOffsetY + ((_local2 * _root.n_TileHeight) + (((_local3 % 2) * _root.n_TileHeight) / 2));
_local5 = _root.f_DistanceToObject(new Object({_x:_local7, _y:_local6}), new Object({_x:0, _y:0}));
if (_local5 < (_root.n_GameRadius - _root.n_GameBufferZone)) {
_root.o_TileStrengthArray[_local3][_local2].n_Distance = _local5;
_root.o_TileStrengthArray[_local3][_local2].n_DistancePerc = (1 / _root.n_GameRadius) * _local5;
_root.o_TileContainer.attachMovie("Tile", _local4, _root.o_TileContainer.getNextHighestDepth(), {_x:_local7, _y:_local6});
_root.o_TileContainer[_local4].o_Upgrades.gotoAndStop("Upgrade_0");
if ((_local3 == Math.floor(_root.n_XTiles / 2)) && (_local2 == Math.floor(_root.n_YTiles / 2))) {
_root.o_TileContainer[_local4].gotoAndStop(2);
_root.o_TileAtCentre = _root.o_TileContainer[_local4];
_root.o_TileAtCentreDetail = _root.o_TileStrengthArray[_local3][_local2];
_root.o_TileStrengthArray[_local3][_local2].n_TypeID = 999;
} else if ((_local5 <= _root.n_PlayingFieldStartSize) && ((_root.s_GameMode == "level") || (_root.s_GameMode == "freeplay"))) {
_root.o_TileStrengthArray[_local3][_local2].n_TypeID = Math.ceil(Math.random() * _root.n_ObjectTypeCount);
_root.o_TileContainer[_local4].gotoAndStop("Tile_" + _root.o_TileStrengthArray[_local3][_local2].n_TypeID);
_root.n_CurrentObjects++;
} else {
_root.o_TileContainer[_local4].gotoAndStop(1);
_root.o_TileStrengthArray[_local3][_local2].n_TypeID = 0;
}
}
_local2++;
}
_local3++;
}
_local3 = 0;
while (_local3 < _root.n_XTiles) {
_local2 = 0;
while (_local2 < _root.n_YTiles) {
o_Tile = _root.o_TileContainer[(("Tile_" + _local3) + "_") + _local2];
_root.o_TileStrengthArray[_local3][_local2].n_Angle = _root.f_AngleToObject(o_Tile, _root.o_TileAtCentre);
_local2++;
}
_local3++;
}
}
function f_DisconnectedObjects() {
var _local11;
var _local5;
var _local3;
var _local4;
var _local7;
var _local2;
var _local6;
var _local10;
_local11 = 0;
_local10 = 0;
_root.f_StartFlood(_root.o_TileAtCentreDetail.n_X, _root.o_TileAtCentreDetail.n_Y, 1);
if (_root.o_TileFloodArray.length > 0) {
_local6 = _root.attachMovie("TileContainer", "Drop_" + _root.getNextHighestDepth(), _root.getNextHighestDepth(), {_x:_root.o_TileContainer._x, _y:_root.o_TileContainer._y, _rotation:_root.o_TileContainer._rotation, s_Mode:"Drop"});
_local5 = 0;
while (_local5 < _root.n_XTiles) {
_local3 = 0;
while (_local3 < _root.n_YTiles) {
_local2 = _root.o_TileStrengthArray[_local5][_local3];
if (((!_root.o_TileFloodArray[_local5][_local3].b_Checked) && (_local2.n_TypeID > 0)) && (_local2 != _root.o_TileAtCentreDetail)) {
_local4 = _root.o_TileContainer[(("Tile_" + _local2.n_X) + "_") + _local2.n_Y];
_local7 = _local6.attachMovie("Tile", "Tile_" + _local6.getNextHighestDepth(), _local6.getNextHighestDepth(), {_x:_local4._x, _y:_local4._y});
_local7.gotoAndStop("Tile_" + _local2.n_TypeID);
_local7.o_Upgrades.gotoAndStop("Upgrade_0");
_local2.n_TypeID = 0;
_local2.n_UpgradeID = 0;
_root.f_SetTileState(_local4, 0, 0);
_local10++;
b_DoBreak = true;
}
if ((_local2.n_TypeID != 0) && (_local2 != _root.o_TileAtCentreDetail)) {
_local11++;
}
_local3++;
}
_local5++;
}
_root.n_CurrentObjects = _local11;
}
return(_local10);
}
function f_EndGame(b_Win) {
var _local8;
var _local5;
var _local4;
var _local7;
var _local3;
var _local6;
this.onEnterFrame = undefined;
if (!b_Win) {
_root.b_GameInit = undefined;
}
_root.b_GameOver = true;
_root.b_GameOverAnimPlaying = true;
if (o_MList != undefined) {
Mouse.removeListener(_root.o_MList);
}
Mouse.show();
_root.o_Cursor.removeMovieClip();
_root.o_Gun.removeMovieClip();
_local6 = _root.attachMovie("TileContainer", "Drop_" + _root.getNextHighestDepth(), _root.getNextHighestDepth(), {_x:_root.o_TileContainer._x, _y:_root.o_TileContainer._y, _rotation:_root.o_TileContainer._rotation, s_Mode:"Drop"});
_local8 = 0;
while (_local8 < _root.n_XTiles) {
_local5 = 0;
while (_local5 < _root.n_YTiles) {
_local3 = _root.o_TileStrengthArray[_local8][_local5];
if ((_local3.n_TypeID > 0) && (_local3 != _root.o_TileAtCentreDetail)) {
_local4 = _root.o_TileContainer[(("Tile_" + _local3.n_X) + "_") + _local3.n_Y];
_local7 = _local6.attachMovie("Tile", "Tile_" + _local6.getNextHighestDepth(), _local6.getNextHighestDepth(), {_x:_local4._x, _y:_local4._y});
_local7.gotoAndStop("Tile_" + _local3.n_TypeID);
_local7.o_Upgrades.gotoAndStop("Upgrade_0");
_local3.n_TypeID = 0;
_local3.n_UpgradeID = 0;
_root.f_SetTileState(_local4, 0, 0);
n_PointCounter++;
}
_local5++;
}
_local8++;
}
_root.o_TileContainer._visible = false;
_root.o_TileStrengthArray = undefined;
_root.o_TileContainer.removeMovieClip();
if (b_Win) {
_root.n_Score = _root.n_Score + _root.n_ScoreBonusForFinishing;
_root.o_Win.gotoAndPlay("Win");
} else {
_root.o_Win.gotoAndPlay("Lose");
}
}
function f_TileUnderPoint(n_PosX, n_PosY) {
var _local2 = ((_root.n_XTiles - 1) / 2) + Math.round((n_PosX / _root.n_TileSize) / 1.5);
var _local3 = ((_root.n_YTiles - 1) / 2) + Math.round((n_PosY - (((_local2 % 2) * _root.n_TileHeight) / 2)) / _root.n_TileHeight);
var _local4 = new Object({x:_local2, y:_local3});
return(_local4);
}
function f_TilesInRange(n_PosX, n_PosY, n_Range) {
var _local3;
var _local2;
var _local5 = new Array();
var _local4;
var _local6 = _root.o_TileContainer[(("Tile_" + n_PosX) + "_") + n_PosY];
_local3 = 0;
while (_local3 < _root.n_XTiles) {
_local2 = 0;
while (_local2 < _root.n_YTiles) {
_local4 = _root.o_TileContainer[(("Tile_" + _local3) + "_") + _local2];
if (_local4 && (_root.o_TileStrengthArray[_local3][_local2].n_TypeID > 0)) {
if (_root.f_DistanceToObject(_local4, _local6) <= n_Range) {
_local5.push(_root.o_TileStrengthArray[_local3][_local2]);
}
}
_local2++;
}
_local3++;
}
return(_local5);
}
function f_SetTileState(o_Tile, n_TypeID, n_UpgradeID) {
o_Tile.gotoAndStop("Tile_" + n_TypeID.toString());
o_Tile.o_Upgrades.gotoAndStop("Upgrade_" + n_UpgradeID.toString());
}
function f_ProjectObject(o_Object, n_Angle, n_Movement) {
var _local4 = 1;
var _local7 = -7.83205965360079E-15;
var _local1 = (n_Angle - 90) / 57.2957795130823;
var _local3 = n_Movement * Math.cos(_local1);
var _local2 = n_Movement * Math.sin(_local1);
o_Object._x = o_Object._x + _local3;
o_Object._y = o_Object._y + _local2;
}
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_DistanceToObject(o_Source, o_Destination) {
var _local3;
var _local2;
var _local1;
_local2 = o_Source._x - o_Destination._x;
_local1 = o_Source._y - o_Destination._y;
_local3 = Math.sqrt((_local2 * _local2) + (_local1 * _local1));
return(_local3);
}
function f_AngleToObject(o_Source, o_Destination) {
var _local2;
var _local4;
var _local3;
_local4 = o_Destination._x - o_Source._x;
_local3 = -1 * (o_Destination._y - o_Source._y);
_local2 = Math.atan2(_local3, _local4);
_local2 = Math.round((_local2 / Math.PI) * 180);
return(_root.f_DegreeTransform((_local2 - 90) * -1, 0));
}
function f_ShortestRoute(n_SourceAngle, n_DestAngle) {
var _local1;
if (n_DestAngle > n_SourceAngle) {
if ((n_DestAngle - n_SourceAngle) >= 180) {
_local1 = -1;
} else {
_local1 = 1;
}
} else if (n_DestAngle < n_SourceAngle) {
if ((n_SourceAngle - n_DestAngle) >= 180) {
_local1 = 1;
} else {
_local1 = -1;
}
} else {
_local1 = 0;
}
return(_local1);
}
function f_DistanceToAngle(n_SourceAngle, n_DestAngle) {
return(f_DegreeTransform(n_SourceAngle - n_DestAngle, 0));
}
function f_FireProjectile(b_Player, n_FireTypeID) {
var _local2;
var _local3 = 0;
var _local4;
var _local13 = _root.n_ShotTime;
var _local6;
var _local12;
var _local10;
var _local11;
var _local8;
var _local5;
if (b_Player) {
_local8 = _root.n_NextObject;
if (n_FireTypeID != 1) {
_local5 = _root.n_NextUpgradeID;
} else {
_local5 = 0;
}
} else {
_local8 = Math.ceil(Math.random() * _root.n_ObjectTypeCount);
_local5 = 0;
}
while ((_local3 <= _root.n_ProjectilesUpperLimit) && (_local4 == undefined)) {
_local2 = _root["Projectile_" + _local3.toString()];
if (_local2 == undefined) {
_local4 = _local3;
}
_local3++;
}
if ((_local4 != undefined) && ((_root.f_OverTimeDiff(_root.d_LastShot, new Date(), _local13) || (!b_Player)) || (b_Player && (n_FireTypeID == 1)))) {
_local2 = _root.attachMovie("Projectile", "Projectile_" + _local4.toString(), _root.getNextHighestDepth(), {_x:_root.o_Gun._x, _y:_root.o_Gun._y});
if (_local5 != undefined) {
_local2.o_Graphics.o_Upgrades.gotoAndStop("Upgrade_" + _local5);
} else {
_local2.o_Graphics.o_Upgrades.gotoAndStop("Upgrade_0");
}
switch (n_FireTypeID) {
case 1 :
_local2.n_TypeID = 7;
_local2.n_UpgradeID = 0;
_local2.o_Graphics.gotoAndStop("Tile_7");
break;
default :
_local2.n_TypeID = _local8;
if (_local5 != undefined) {
_local2.n_UpgradeID = _local5;
} else {
_local2.n_UpgradeID = 0;
}
_local2.o_Graphics.gotoAndStop("Tile_" + _local8.toString());
}
_local2.n_Timer = _root.n_ProjectileDistance;
_local2.d_Created = new Date();
_local2.b_Player = b_Player;
_local2.b_Init = true;
if (b_Player) {
switch (n_FireTypeID) {
case 0 :
if (_root.s_GameMode == "clearall") {
_root.d_ClearAllLastTime = new Date();
}
_local2.n_Angle = _root.o_Gun._rotation;
break;
case 1 :
_local2.n_Angle = Math.round(Math.random() * 360);
_local6 = (_local2.n_Angle - 90) / 57.2957795130823;
_local2._x = _root.o_TileContainer._x + ((_root.n_GunRadSize * (Math.cos(_local6) * Math.PI)) * -1);
_local2._y = _root.o_TileContainer._y + ((_root.n_GunRadSize * Math.sin(_local6 * -1)) * Math.PI);
}
} else {
_local2.n_Angle = Math.round(Math.random() * 360);
_local6 = (_local2.n_Angle - 90) / 57.2957795130823;
_local2._x = _root.o_TileContainer._x + ((_root.n_GunRadSize * (Math.cos(_local6) * Math.PI)) * -1);
_local2._y = _root.o_TileContainer._y + ((_root.n_GunRadSize * Math.sin(_local6 * -1)) * Math.PI);
}
_local12 = new Object({_x:0, _y:0});
_root.f_ProjectObject(_local12, _local2.n_Angle, (_root.n_TileHeight / 2) - 3);
_local10 = new Object({_x:0, _y:0});
_root.f_ProjectObject(_local10, _local2.n_Angle + 45, (_root.n_TileHeight / 2) - 3);
_local11 = new Object({_x:0, _y:0});
_root.f_ProjectObject(_local11, _local2.n_Angle - 45, (_root.n_TileHeight / 2) - 3);
_local2.a_HitPoints = new Array();
_local2.a_HitPoints.push(_local12);
_local2.a_HitPoints.push(_local10);
_local2.a_HitPoints.push(_local11);
_local2.n_FireSpeed = _root.n_ProjectileVelocity;
if (b_Player && (n_FireTypeID != 1)) {
_root.f_ChooseNextObject();
_root.n_ProjectileRegen = _root.n_ProjectileRegenLimit;
_root.d_LastShot = new Date();
_local2.b_Connector = _root.b_ConnectorActive;
_root.b_ConnectorActive = false;
} else {
_local2.b_Connector = false;
}
_root.n_CurrentObjects++;
_root.f_PlaySound("o_Sounds", "Shot");
return(true);
}
return(false);
}
function f_MoveProjectile(o_Projectile) {
var _local5 = 1;
var _local6 = -7.83205965360079E-15;
var _local2 = (o_Projectile.n_Angle - 90) / 57.2957795130823;
var _local4 = o_Projectile.n_FireSpeed * Math.cos(_local2);
var _local3 = o_Projectile.n_FireSpeed * Math.sin(_local2);
o_Projectile._x = o_Projectile._x + _local4;
o_Projectile._y = o_Projectile._y + _local3;
}
function f_ShowMessage(s_Text) {
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) - 200;
_local2.o_InnerText.o_Text.text = _local3;
_local2.gotoAndPlay(0);
_root.d_MessageLast = new Date();
_root.a_MessageRelayArray.push(_local3);
if (_root.a_MessageRelayArray.length > 5) {
_local3 = _root.a_MessageRelayArray.shift();
}
}
}
}
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_OverTimeDiff(d_DateFrom, d_DateTo, n_MillisecondsDiff) {
var _local2 = d_DateFrom.getTime();
var _local1 = d_DateTo.getTime();
if (((_local2 + n_MillisecondsDiff) <= _local1) || (_local2 >= (_local1 + n_MillisecondsDiff))) {
return(true);
}
return(false);
}
function f_TimeDiff(d_DateFrom, d_DateTo) {
var _local2 = d_DateFrom.getTime();
var _local1 = d_DateTo.getTime();
return(_local1 - _local2);
}
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_ChooseType() {
var _local6 = 0;
var _local3;
var _local2;
var _local5;
var _local8 = false;
var _local4 = 0;
var _local7 = true;
switch (_root.s_GameMode) {
case "clearall" :
_local5 = new Array(_root.n_ObjectTypeCount);
_local4 = 1;
while (_local4 <= _root.n_ObjectTypeCount) {
_local5[_local4] = 0;
_local4++;
}
_local3 = 0;
while (_local3 < _root.n_XTiles) {
_local2 = 0;
while (_local2 < _root.n_YTiles) {
if (_root.o_TileStrengthArray[_local3][_local2].n_TypeID > 0) {
_local7 = false;
_local5[_root.o_TileStrengthArray[_local3][_local2].n_TypeID]++;
}
_local2++;
}
_local3++;
}
if (!_local7) {
_local4 = 0;
_local8 = false;
while ((!_local8) && (_local4 <= 20)) {
_local6 = Math.ceil(Math.random() * _root.n_ObjectTypeCount);
_local8 = _local5[_local6] > 0;
_local4++;
}
} else {
_local6 = Math.ceil(Math.random() * _root.n_ObjectTypeCount);
}
break;
default :
_local6 = Math.ceil(Math.random() * _root.n_ObjectTypeCount);
}
return(_local6);
}
function f_ChooseNextObject() {
if ((_root.n_ThenObject == undefined) || (_root.n_ThenObject == 0)) {
_root.n_ThenObject = f_ChooseType();
_root.n_ThenUpgradeID = 0;
if (_root.s_GameMode != "clearall") {
if (Math.random() <= (((_root.s_GameMode == "freeplay") ? (_root.n_OpenPlayUpgradeChance) : (_root.o_LevelArray[_root.n_Level][2])) / 100)) {
_root.n_ThenUpgradeID = Math.floor(((_root.s_GameMode == "freeplay") ? (_root.o_Upgrades.length) : (_root.o_LevelArray[_root.n_Level][1])) * Math.random()) + 1;
if (_root.n_ThenUpgradeID > ((_root.s_GameMode == "freeplay") ? (_root.o_Upgrades.length) : (_root.o_LevelArray[_root.n_Level][1]))) {
_root.n_ThenUpgradeID = ((_root.s_GameMode == "freeplay") ? (_root.o_Upgrades.length) : (_root.o_LevelArray[_root.n_Level][1]));
}
}
}
}
_root.n_NextObject = _root.n_ThenObject;
_root.n_NextUpgradeID = _root.n_ThenUpgradeID;
_root.n_ThenObject = f_ChooseType();
_root.n_ThenUpgradeID = 0;
if (_root.s_GameMode != "clearall") {
if (Math.random() <= (((_root.s_GameMode == "freeplay") ? (_root.n_OpenPlayUpgradeChance) : (_root.o_LevelArray[_root.n_Level][2])) / 100)) {
_root.n_ThenUpgradeID = Math.floor(((_root.s_GameMode == "freeplay") ? (_root.o_Upgrades.length) : (_root.o_LevelArray[_root.n_Level][1])) * Math.random()) + 1;
if (_root.n_ThenUpgradeID > ((_root.s_GameMode == "freeplay") ? (_root.o_Upgrades.length) : (_root.o_LevelArray[_root.n_Level][1]))) {
_root.n_ThenUpgradeID = ((_root.s_GameMode == "freeplay") ? (_root.o_Upgrades.length) : (_root.o_LevelArray[_root.n_Level][1]));
}
}
}
_root.o_NextContainer.o_NextObject.o_Graphics.gotoAndStop("Tile_" + _root.n_NextObject);
_root.o_NextContainer.o_NextObject.o_Graphics.o_Upgrades.gotoAndStop("Upgrade_" + n_NextUpgradeID.toString());
_root.o_NextContainer.o_ThenObject.o_Graphics.gotoAndStop("Tile_" + _root.n_ThenObject);
_root.o_NextContainer.o_ThenObject.o_Graphics.o_Upgrades.gotoAndStop("Upgrade_" + n_ThenUpgradeID.toString());
}
function f_StartFlood(n_XTile, n_YTile, n_SearchType) {
var _local4;
_root.o_TileFloodArray = new Array(_root.n_XTiles);
n_X = 0;
while (n_X < _root.n_XTiles) {
_root.o_TileFloodArray[n_X] = new Array(_root.n_YTiles);
n_Y = 0;
while (n_Y < _root.n_YTiles) {
_root.o_TileFloodArray[n_X][n_Y] = new Object({b_Checked:false, b_Flag:false});
n_Y++;
}
n_X++;
}
_local4 = _root.o_TileStrengthArray[n_XTile][n_YTile];
if ((_local4.n_TypeID > 0) || (n_SearchType == 1)) {
_root.f_ItemFlood(n_XTile, n_YTile, n_SearchType, _local4);
}
return(a_FloodArray);
}
function f_ItemFlood(n_X, n_Y, n_SearchType, o_SourceTileDetail, a_Array) {
var _local8;
var _local10;
var _local9;
var _local7 = (n_X % 2) == 1;
var _local6;
_local6 = _root.o_TileStrengthArray[n_X][n_Y];
if (_local6 != undefined) {
if (((((_local6.n_TypeID == o_SourceTileDetail.n_TypeID) && (n_SearchType == 2)) && (_local6.n_TypeID > 0)) || ((n_SearchType == 1) && ((_local6.n_TypeID > 0) || (_local6 == _root.o_TileAtCentreDetail)))) && (!_root.o_TileFloodArray[n_X][n_Y].b_Checked)) {
_root.o_TileFloodArray[n_X][n_Y].b_Checked = true;
if ((((n_X > 0) && (n_Y > 0)) && (n_X <= _root.n_XTiles)) && (n_Y <= _root.n_YTiles)) {
_root.f_ItemFlood(n_X, n_Y - 1, n_SearchType, o_SourceTileDetail);
_root.f_ItemFlood(n_X, n_Y + 1, n_SearchType, o_SourceTileDetail);
if (_local7) {
_root.f_ItemFlood(n_X - 1, n_Y, n_SearchType, o_SourceTileDetail);
_root.f_ItemFlood(n_X + 1, n_Y, n_SearchType, o_SourceTileDetail);
_root.f_ItemFlood(n_X - 1, n_Y + 1, n_SearchType, o_SourceTileDetail);
_root.f_ItemFlood(n_X + 1, n_Y + 1, n_SearchType, o_SourceTileDetail);
} else {
_root.f_ItemFlood(n_X - 1, n_Y - 1, n_SearchType, o_SourceTileDetail);
_root.f_ItemFlood(n_X + 1, n_Y - 1, n_SearchType, o_SourceTileDetail);
_root.f_ItemFlood(n_X - 1, n_Y, n_SearchType, o_SourceTileDetail);
_root.f_ItemFlood(n_X + 1, n_Y, n_SearchType, o_SourceTileDetail);
}
}
}
_root.o_TileFloodArray[n_X][n_Y].b_Flag = true;
} else {
_root.o_TileFloodArray[n_X][n_Y].b_Flag = true;
}
}
function f_ActivateUpgrade(n_UpgradeID) {
var _local8;
var _local3 = false;
var _local5 = false;
var _local6;
var _local7;
if (((_root.o_Upgrades[n_UpgradeID][3] > 0) && (_root.f_TimeDiff(_root.o_Upgrades[n_UpgradeID][1], new Date()) >= _root.n_UpgradeDelay)) || (!_root.o_Upgrades[n_UpgradeID][2])) {
switch (n_UpgradeID) {
case 0 :
_root.f_PlaySound("o_Sounds", "Quad");
_root.f_ShowMessage("Omega Particle Activated");
_root.n_NextObject = 6;
_root.o_NextContainer.o_NextObject.o_Graphics.gotoAndStop("Tile_6");
_local3 = true;
break;
case 1 :
var _local2 = 1;
while (_local2 <= 5) {
_root.f_FireProjectile(true, 1);
_local3 = true;
_local2++;
}
break;
case 2 :
_root.d_VirusGerminateMajor = new Date();
_root.o_WaveProgress.n_CurrentValue = 0;
break;
case 3 :
_local2 = 1;
while (_local2 <= 5) {
_root.f_FireProjectile(false, 0);
_local3 = true;
_local2++;
}
break;
case 4 :
_root.b_Frozen = true;
_root.d_FreezeTime = new Date();
_root.o_Frozen.gotoAndPlay("Frozen");
break;
case 5 :
if (!_root.b_Frozen) {
_root.n_PlayingFieldVelocity = _root.n_PlayingFieldSpin * ((Math.random() > 0.5) ? 1 : -1);
}
break;
case 6 :
_root.o_Connector.gotoAndPlay("Start");
_root.b_ConnectorActive = true;
_local3 = true;
}
if (_local3 && (_root.o_Upgrades[n_UpgradeID][2])) {
_root.o_Upgrades[n_UpgradeID][1] = new Date();
_root.o_Upgrades[n_UpgradeID][3]--;
_root.f_SetUpgradeCounters();
return(true);
}
return(_local3);
}
return(false);
}
function f_SetUpgradeCounters() {
var _local2 = 0;
while (_local2 < _root.o_Upgrades.length) {
_root.o_PowerupGrouping["UpgradeText_" + (_local2 + 1)].text = "x" + _root.o_Upgrades[_local2][3];
_local2++;
}
}
var b_Debugging = false;
var s_GameMode = "level";
var n_XTiles = 29;
var n_YTiles = 25;
var n_GameRadius = 250;
var n_GameBufferZone = 20;
var n_TileHeight = 22;
var n_TileCosSize = 29;
var n_TileCos = Math.cos((_root.n_TileCosSize * Math.PI) / 180);
var n_TileSize = ((_root.n_TileHeight / _root.n_TileCos) / 2);
var n_TileContainerOffsetX = (-1 * ((((_root.n_XTiles - 1) / 2) * _root.n_TileSize) * 1.5));
var n_TileContainerOffsetY = (-1 * ((((_root.n_YTiles - 1) / 2) * _root.n_TileHeight) + ((((_root.n_XTiles / 2) % 2) * _root.n_TileHeight) / 2)));
var o_TileAtCentre;
var o_TileAtCentreDetail;
var o_TileStrengthArray;
var o_TileFloodArray;
var n_GameWidth = 600;
var n_GameHeight = 600;
var n_GameCheckBorder = 0;
var b_GameInit = false;
var b_GameOver = false;
var b_GameOverAnimPlaying = true;
var d_GameOverTimer = new Date();
var n_PlayingFieldVelocity = 0;
var n_PlayingFieldMaxVelocity = 5;
var n_PlayingFieldSlowDown = 0.2;
var n_PlayingFieldStartSize = 60;
var n_PlayingFieldDropAlphaChange = 5;
var n_PlayingFieldDropSpeed = 8;
var n_GunXPos;
var n_GunInertia;
var n_GunInertiaLowerLimit = -5;
var n_GunInertiaUpperLimit = 5;
var n_GunInertiaIncrementVal = 0.35;
var n_GunInertiaDecrementVal = 0.75;
var n_GunLength = 4;
var n_GunRadSize = 80;
var n_GunShootAngle = 180;
var n_GunRadians;
var n_GunAngle;
var n_ShotTime = 400;
var d_LastShot;
var n_ProjectileBaseDamage = 1000;
var n_ProjectileDistance = 1000;
var n_ProjectilesUpperLimit = 40;
var n_ProjectilesVariance = 4;
var n_ProjectilesVarianceScatter = 20;
var n_ProjectileVelocity = 20;
var n_ProjectileRandomPerc = 100;
var o_VirusTransformMap = new Array();
var n_VirusGerminateCounter = 0;
var n_VirusGerminateBase = 10;
var d_VirusGerminateMajor;
var d_VirusGerminateMinor;
var n_VirusGerminateMajorInterval = 20000;
var n_VirusGerminateMajorIntervalMin = 5000;
var n_VirusGerminateMinorInterval = 100;
var n_WaveCounter = 0;
var n_ClearAllBallRespawnSize = 100;
var n_ClearAllBallMaxSize = 140;
var n_ClearAllShotsMax = 6;
var n_ClearAllShotsMin = 3;
var n_ClearAllShotsBeforeSpawn;
var n_ClearAllShotsMade;
var n_ClearAllTimerMax = 10000;
var n_ClearAllTimerMin = 4000;
var n_ClearAllTimerReduce = 500;
var n_ClearAllTimer = 0;
var d_ClearAllLastTime = new Date();
var n_OpenPlayLevel = 55;
var n_OpenPlaySpawnRate = 8000;
var n_OpenPlaySpawnAmount = 10;
var n_OpenPlayUpgradeChance = 40;
var n_Level;
var o_LevelArray = [[0, 0, 0, 0, 0, 0], [40000, 7, 25, 25, 40], [30000, 7, 25, 25, 12], [20000, 7, 25, 25, 10], [17500, 7, 25, 25, 10], [17000, 7, 25, 25, 11], [16500, 7, 25, 25, 11], [16000, 7, 25, 25, 11], [15500, 7, 25, 25, 12], [15000, 7, 25, 25, 12], [14500, 7, 25, 25, 12], [14000, 7, 25, 25, 12], [13500, 7, 25, 25, 13], [13000, 7, 25, 25, 13], [12500, 7, 25, 25, 13], [12000, 7, 25, 25, 14], [11500, 7, 25, 25, 15], [11000, 7, 25, 25, 15], [10500, 7, 25, 25, 15], [10000, 7, 25, 25, 15], [10000, 7, 25, 25, 15], [10000, 7, 25, 25, 15], [10000, 7, 25, 25, 15], [10000, 7, 25, 25, 15], [10000, 7, 25, 25, 15], [10000, 7, 25, 25, 15], [10000, 7, 25, 25, 15], [10000, 7, 25, 25, 14], [10000, 7, 25, 25, 14], [10000, 7, 25, 25, 13], [10000, 7, 33, 33, 13], [10000, 7, 33, 33, 13], [9500, 7, 33, 33, 12], [9500, 7, 33, 33, 12], [9500, 7, 33, 33, 12], [9000, 7, 33, 33, 12], [9000, 7, 40, 40, 12], [8500, 7, 40, 40, 12], [8500, 7, 40, 40, 12], [8500, 7, 40, 40, 12], [8500, 7, 40, 40, 12], [8000, 7, 45, 45, 12], [8000, 7, 45, 45, 13], [8000, 7, 45, 45, 13], [8000, 7, 45, 45, 13], [8000, 7, 46, 46, 14], [8000, 7, 47, 47, 14], [8000, 7, 48, 48, 14], [8000, 7, 49, 49, 15], [8000, 7, 50, 50, 18], [7500, 7, 50, 50, 18], [7500, 7, 50, 50, 18], [7000, 7, 50, 50, 18], [7000, 7, 50, 50, 18], [6500, 7, 50, 50, 18], [6500, 7, 50, 50, 18], [7500, 7, 50, 50, 19], [7000, 7, 50, 50, 20], [7000, 7, 50, 50, 21], [6500, 7, 50, 50, 22], [6500, 7, 50, 50, 22]];
var d_LastObject;
var n_NextObject;
var n_NextUpgradeID;
var n_ThenObject;
var n_ThenUpgradeID;
var n_ObjectTypeCount = 5;
var n_MaxObjects = 125;
var n_WarningLevel = 100;
var n_CurrentObjects = 0;
var n_ObjectTimeout = 5000;
var n_ObjectTimeoutSpeed = 5;
var n_UpgradeLimit = 10;
var n_AlphaParticleBlastSize = 30;
var n_OmegaParticleBlastSize = 30;
var n_MultiballAmount = 10;
var n_ReplenishAmmoAmount = 10;
var n_DegradeAmmoAmount = 5;
var n_PlayingFieldSpin = 15;
var n_TimeGain = 0.5;
var n_TimeLoss = 0.5;
var b_Frozen = false;
var n_FreezeLength = 15000;
var d_FreezeTime;
var b_ConnectorActive = false;
var n_UpgradeDelay = 1000;
var o_Upgrades = [["Omega Particle", new Date(), true, (_root.b_Debugging ? 5 : 0), false], ["Gamma Shower", new Date(), true, (_root.b_Debugging ? 5 : 0), false], ["Delay Spawn", new Date(), false, 0, false], ["Random Spawn", new Date(), false, 0, false], ["Freeze", new Date(), false, 0, false], ["Random Spin", new Date(), false, 0, false], ["The Connector", new Date(), true, (_root.b_Debugging ? 5 : 0), false]];
var n_UpgradeDelay = 1000;
var n_UpgradeSpawnChance = 25;
var a_MessageArray;
var a_MessageRelayArray;
var n_MessageDelay = 750;
var d_MessageLast;
var n_MessageRepeatDelay = 2000;
var n_Score;
var o_ScoreMultiplierArray = [[1, "Single"], [1.25, "Double"], [1.5, "Triple"], [2, "Quadruple"], [2.5, "Penta"], [3, "Hex"], [3.5, "Hept"], [4, "Oct"], [4.5, "Ennea"], [5, "Deca"], [6, "Hendeca"], [7, "Dodeca"], [8, "Triskaideka"], [9, "Tetradeca"], [10, "Pentadeca"], [11, "Lots 'a' "]];
var n_ScoreBonusForFinishing = 500000;
var n_ScoreMultiplier = 0.5;
var n_BaseObjectScore = 50;
var o_MList;
function playAgain() {
_root.gotoAndStop("MainMenu");
}
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);
}
System.security.allowDomain("shockwave.com", "intranet.shockwave.com", "gameblast.shockwave.com", "www.shockwave.com", "dev.shockwave.com", "stage.shockwave.com");
_level0.swHighScoreObject = new Object();
_level0.swHighScoreObject.showTab = "view";
_level0.swHighScoreObject.gameId = "XXXX";
_level0.swHighScoreObject.gameTitle = "Spinning Bubbles";
_level0.swHighScoreObject.screenWidth = 600;
_level0.swHighScoreObject.screenHeight = 600;
_level0.swHighScoreObject.scoreDescriptor = "points";
_level0.swHighScoreObject.numPlayers = 1;
_level0.swHighScoreObject.player1Score = 0;
_level0.swHighScoreObject.player2Score = 0;
_level0.swHighScoreObject.player3Score = 0;
_level0.swHighScoreObject.player4Score = 0;
_level0.HSHubURL = "http://www.shockwave.com/content/highscores/scorez-2002.swf";
__com_mochibot__("3c010cad", this, 10301, true);
o_Loader.gotoAndPlay(2);
stop();
Frame 2
this.stop();
Frame 3
this.onEnterFrame = function () {
if (Key.isDown(77) || (Key.isDown(109))) {
_root.f_ToggleSounds();
}
_root.n_Score = 0;
};
Frame 4
this.gotoAndPlay("MainMenu");
Frame 5
this.onEnterFrame = function () {
var _local9;
var _local11;
var _local6;
var _local10;
var _local12;
var _local5;
if ((!_root.b_GameInit) && (!_root.b_GameOver)) {
_root.f_BuildMap();
_root.b_GameInit = true;
_root.b_GameOver = false;
_root.b_GameOverAnimPlaying = false;
_root.d_GameOverTimer = new Date();
_root.n_GunInertia = 0;
_root.n_GunXPos = 270;
_root.n_PlayFieldSinPos = 0;
var _local3 = 0;
while (_local3 < _root.o_Upgrades.length) {
_root.o_Upgrades[_local3][1] = new Date();
_root.o_Upgrades[_local3][3] = (_root.b_Debugging ? 5 : 0);
_local3++;
}
_root.f_SetUpgradeCounters();
_root.b_Frozen = false;
_root.b_ConnectorActive = false;
_root.n_Level = 0;
_root.o_LevelText.text = "0 of " + (_root.o_LevelArray.length - 1).toString();
_root.n_Score = 0;
Mouse.hide();
_local5 = _root.attachMovie("CursorGraphic", "o_Cursor", _root.getNextHighestDepth());
_local5._x = _root._xmouse;
_local5._y = _root._ymouse;
_root.attachMovie("Gun", "o_Gun", _root.getNextHighestDepth());
_root.a_MessageArray = new Array();
_root.d_MessageLast = undefined;
_root.a_MessageRelayArray = new Array();
_root.o_WarningCircle.gotoAndStop(1);
_root.o_ThenObject.o_Graphics.gotoAndStop(1);
_root.o_NextObject.o_Graphics.gotoAndStop(1);
_root.f_ChooseNextObject();
_root.o_PowerupGrouping._visible = (((_root.s_GameMode == "level") || (_root.s_GameMode == "freeplay")) ? true : false);
switch (_root.s_GameMode) {
case "clearall" :
_root.n_ClearAllShotsBeforeSpawn = _root.n_ClearAllShotsMin + Math.ceil(Math.random() * (_root.n_ClearAllShotsMax - _root.n_ClearAllShotsMin));
_root.n_ClearAllShotsMade = 0;
_root.d_ClearAllLastTime = new Date();
_root.n_ClearAllTimer = _root.n_ClearAllTimerMax;
_root.o_WaveProgress.n_MaxValue = _root.n_ClearAllTimer;
_root.o_WaveProgress.n_CurrentValue = 0;
_root.o_TopMessage.text = ((_root.n_ClearAllShotsBeforeSpawn.toString() + " of ") + _root.n_ClearAllShotsBeforeSpawn.toString()) + " shots left";
break;
default :
_root.n_VirusGerminateCounter = 1;
_root.d_VirusGerminateMajor = new Date() - 10000;
_root.d_VirusGerminateMinor = new Date();
_root.n_WaveCounter = 0;
_root.o_WaveProgress.n_MaxValue = 0;
_root.o_WaveProgress.n_CurrentValue = _root.n_WaveCounter;
_root.o_TopMessage.text = "";
}
_root.o_MList = new Object();
_root.o_MList.onMouseDown = function () {
if ((!_root.b_Paused) && (_root.b_GameInit)) {
if (_root.f_DistanceToObject(new Object({_x:_root._xmouse, _y:_root._ymouse}), new Object({_x:_root.o_TileContainer._x, _y:_root.o_TileContainer._y})) <= _root.n_GameRadius) {
_root.f_FireProjectile(1, 0);
}
}
};
_root.o_MList.onMouseMove = function () {
_root.o_Cursor._x = _root._xmouse;
_root.o_Cursor._y = _root._ymouse;
if (_root.f_DistanceToObject(_root.o_Cursor, new Object({_x:_root.o_TileContainer._x, _y:_root.o_TileContainer._y})) > _root.n_GameRadius) {
_root.o_Cursor._visible = false;
Mouse.show();
} else {
_root.o_Cursor._visible = true;
Mouse.hide();
}
};
Mouse.addListener(_root.o_MList);
} else {
_root.f_DoMessages();
if (Key.isDown(80) || (Key.isDown(112))) {
_root.f_TogglePause();
}
if (Key.isDown(77) || (Key.isDown(109))) {
_root.f_ToggleSounds();
}
if (Key.isDown(27)) {
_root.f_EndGame(false);
}
if ((!_root.b_Paused) && (!_root.b_GameOver)) {
if ((_root.s_GameMode == "level") || (_root.s_GameMode == "freeplay")) {
if (Key.isDown(49)) {
_root.f_ActivateUpgrade(0);
}
if (Key.isDown(50)) {
_root.f_ActivateUpgrade(1);
}
if (Key.isDown(51)) {
_root.f_ActivateUpgrade(6);
}
}
if (!_root.b_Frozen) {
this.o_TileContainer._rotation = this.o_TileContainer._rotation + _root.n_PlayingFieldVelocity;
if (_root.n_PlayingFieldVelocity > 0) {
_root.n_PlayingFieldVelocity = _root.n_PlayingFieldVelocity - _root.n_PlayingFieldSlowDown;
} else if (_root.n_PlayingFieldVelocity < 0) {
_root.n_PlayingFieldVelocity = _root.n_PlayingFieldVelocity + _root.n_PlayingFieldSlowDown;
}
if ((_root.n_PlayingFieldVelocity < _root.n_PlayingFieldSlowDown) && (_root.n_PlayingFieldVelocity > 0)) {
_root.n_PlayingFieldVelocity = 0;
} else if ((_root.n_PlayingFieldVelocity > (_root.n_PlayingFieldSlowDown * -1)) && (_root.n_PlayingFieldVelocity < 0)) {
_root.n_PlayingFieldVelocity = 0;
}
} else {
if (_root.f_TimeDiff(_root.d_FreezeTime, new Date()) >= _root.n_FreezeLength) {
_root.b_Frozen = false;
_root.o_Frozen.gotoAndStop("Holding");
}
_root.n_PlayingFieldVelocity = 0;
}
if (Key.isDown(37) or Key.isDown(65)) {
if (_root.n_GunInertia < _root.n_GunInertiaUpperLimit) {
_root.n_GunInertia = _root.n_GunInertia + _root.n_GunInertiaIncrementVal;
}
}
if (Key.isDown(39) or Key.isDown(68)) {
if (_root.n_GunInertia > _root.n_GunInertiaLowerLimit) {
_root.n_GunInertia = _root.n_GunInertia - _root.n_GunInertiaIncrementVal;
}
}
if (((((_root.n_GunInertia != 0) && (!Key.isDown(37))) && (!Key.isDown(65))) && (!Key.isDown(39))) && (!Key.isDown(68))) {
if (_root.n_GunInertia > 0) {
_root.n_GunInertia = _root.n_GunInertia - _root.n_GunInertiaDecrementVal;
} else if (_root.n_GunInertia < 0) {
_root.n_GunInertia = _root.n_GunInertia + _root.n_GunInertiaDecrementVal;
}
if (((_root.n_GunInertia > 0) && (_root.n_GunInertia <= _root.n_GunInertiaDecrementVal)) || ((_root.n_GunInertia < 0) && (_root.n_GunInertia >= (_root.n_GunInertiaDecrementVal * -1)))) {
_root.n_GunInertia = 0;
}
}
_root.n_GunXPos = _root.f_DegreeTransform(_root.n_GunXPos, _root.n_GunInertia);
_root.n_GunRadians = _root.n_GunXPos / 57.2957795130823;
_root.o_Gun._x = _root.o_TileContainer._x + ((_root.n_GunRadSize * (Math.cos(_root.n_GunRadians) * Math.PI)) * -1);
_root.o_Gun._y = _root.o_TileContainer._y + ((_root.n_GunRadSize * Math.sin(_root.n_GunRadians * -1)) * Math.PI);
_root.o_Gun._rotation = _root.f_AngleToObject(o_Gun, new Object({_x:_root._xmouse, _y:_root._ymouse}));
_root.o_NextContainer._x = _root.o_Gun._x;
_root.o_NextContainer._y = _root.o_Gun._y;
_root.o_NextContainer._rotation = _root.n_GunXPos - 180;
_root.o_WarningCircle._alpha = (40 / _root.n_MaxObjects) * _root.n_CurrentObjects;
_root.o_WarningCircle._width = ((_root.n_GameRadius * 2) / _root.n_MaxObjects) * _root.n_CurrentObjects;
_root.o_WarningCircle._height = _root.o_WarningCircle._width;
switch (_root.s_GameMode) {
case "clearall" :
if (_root.n_CurrentObjects == 0) {
_root.d_VirusGerminateMajor = new Date();
_root.n_VirusGerminateCounter = 1;
_root.n_Level++;
_root.o_LevelText.text = _root.n_Level.toString();
_root.n_ClearAllTimer = _root.n_ClearAllTimerMax - (_root.n_ClearAllTimerReduce * (_root.n_Level - 1));
if (_root.n_ClearAllTimer < _root.n_ClearAllTimerMin) {
_root.n_ClearAllTimer = _root.n_ClearAllTimerMin;
}
trace(_root.n_ClearAllTimer);
_root.o_WaveProgress.n_MaxValue = _root.n_ClearAllTimer;
_root.o_WaveProgress.n_CurrentValue = 0;
_root.f_ShowMessage("Level " + _root.n_Level.toString());
}
_local6 = Math.floor(_root.f_TimeDiff(_root.d_VirusGerminateMajor, new Date()) / _root.n_VirusGerminateMinorInterval) + 1;
if (_root.n_VirusGerminateCounter >= _root.n_ClearAllBallRespawnSize) {
_root.n_VirusGerminateCounter = 0;
}
_root.o_WaveProgress.n_CurrentValue = _root.f_TimeDiff(_root.d_ClearAllLastTime, new Date());
if ((_root.n_ClearAllShotsMade >= _root.n_ClearAllShotsBeforeSpawn) || (_root.f_TimeDiff(_root.d_ClearAllLastTime, new Date()) >= _root.n_ClearAllTimer)) {
_root.n_ClearAllShotsBeforeSpawn = _root.n_ClearAllShotsMin + Math.ceil(Math.random() * (_root.n_ClearAllShotsMax - _root.n_ClearAllShotsMin));
_root.d_ClearAllLastTime = new Date();
_root.n_ClearAllShotsMade = 0;
_root.o_WaveProgress.n_CurrentValue = 0;
var _local4 = 1;
while (_local4 <= (_root.n_ClearAllShotsBeforeSpawn * 2)) {
_root.f_FireProjectile(false, 0);
b_DidActivate = true;
_local4++;
}
}
_root.o_TopMessage.text = (((_root.n_ClearAllShotsBeforeSpawn - _root.n_ClearAllShotsMade).toString() + " of ") + _root.n_ClearAllShotsBeforeSpawn.toString()) + " shots left";
break;
default :
_root.n_WaveCounter = _root.f_TimeDiff(_root.d_VirusGerminateMajor, new Date());
_root.o_WaveProgress.n_CurrentValue = _root.n_WaveCounter;
_root.o_TopMessage.text = Math.round((((_root.s_GameMode == "level") ? (_root.o_LevelArray[_root.n_Level][0]) : (_root.n_OpenPlaySpawnRate)) - _root.f_TimeDiff(_root.d_VirusGerminateMajor, new Date())) / 1000) + " seconds";
if (_root.f_OverTimeDiff(_root.d_VirusGerminateMajor, new Date(), ((_root.s_GameMode == "level") ? (_root.o_LevelArray[_root.n_Level][0]) : (_root.n_OpenPlaySpawnRate)))) {
_root.d_VirusGerminateMajor = new Date();
_root.n_VirusGerminateCounter = 1;
if (_root.s_GameMode == "level") {
_root.n_Level++;
}
_root.o_WaveProgress.n_MaxValue = ((_root.s_GameMode == "level") ? (_root.o_LevelArray[_root.n_Level][0]) : (_root.n_OpenPlaySpawnRate));
_root.o_WaveProgress.n_CurrentValue = 0;
if (_root.s_GameMode == "level") {
_root.f_ShowMessage("Level " + _root.n_Level.toString());
_root.o_LevelText.text = (_root.n_Level.toString() + " of ") + (_root.o_LevelArray.length - 1).toString();
} else {
_root.o_LevelText.text = "Open Play";
}
}
_local6 = Math.floor(_root.f_TimeDiff(_root.d_VirusGerminateMajor, new Date()) / _root.n_VirusGerminateMinorInterval) + 1;
if (_root.n_VirusGerminateCounter < ((_root.s_GameMode == "level") ? (_root.o_LevelArray[_root.n_Level][4]) : (_root.n_OpenPlaySpawnAmount))) {
break;
}
_root.n_VirusGerminateCounter = 0;
}
if (_root.n_VirusGerminateCounter == _local6) {
_root.f_FireProjectile(0, 0);
_root.n_VirusGerminateCounter++;
if (_root.s_GameMode == "clearall") {
_root.d_ClearAllLastTime = new Date();
}
}
if (_root.n_CurrentObjects > _root.n_MaxObjects) {
_root.f_EndGame(false);
} else if ((_root.n_Level >= _root.o_LevelArray.length) && (_root.s_GameMode == "level")) {
_root.f_EndGame(true);
}
}
}
};
Instance of Symbol 411 MovieClip [TileContainer] "controller" in Frame 5
onClipEvent (enterFrame) {
_root.getMouse();
}
Frame 6
if (!_root.b_GameOver) {
this.gotoAndPlay("Game");
} else if (_root.b_GameOver && (!_root.b_GameOverAnimPlaying)) {
this.gotoAndPlay("HiScores");
} else {
this.gotoAndPlay("Game");
}
Frame 7
if (_root.o_TileContainer) {
_root._root.o_TileContainer.removeMovieClip();
}
switch (_root.s_GameMode) {
case "level" :
_root.swHighScoreObject.gameId = "spinningbubbles2";
_level0.swHighScoreObject.gameTitle = "Spinning Bubbles (Levelled)";
break;
case "freeplay" :
_root.swHighScoreObject.gameId = "spinningbubbles1";
_level0.swHighScoreObject.gameTitle = "Spinning Bubbles (Free Play)";
break;
case "clearall" :
_root.swHighScoreObject.gameId = "spinningbubbles3";
_level0.swHighScoreObject.gameTitle = "Spinning Bubbles (Clear All)";
}
_level0.swHighScoreObject.player1Score = _root.n_Score;
_root.swHighScoreObject.showTab = "submit";
docount = true;
loadMovieNum (_root.HSHubURL, 2);
this.stop();
Frame 8
gotoAndPlay ("MainMenu");
Frame 9
this.o_Instructions.gotoAndPlay(("Instruction_" + _root.s_GameMode.toString()) + "_1");
this.stop();
Symbol 10 MovieClip [Explosions] Frame 22
this.removeMovieClip();
Symbol 10 MovieClip [Explosions] Frame 44
this.removeMovieClip();
Symbol 14 MovieClip [Messages] Frame 46
this.removeMovieClip();
Symbol 48 MovieClip [TilePopped] Frame 1
var s_Mode;
var n_Angle;
var n_Speed;
var d_CreationDate;
var n_UpgradeID;
this.onEnterFrame = function () {
var _local7;
var _local3;
var _local4;
if (this.hitTest(_root.o_NextContainer)) {
if (this.n_UpgradeID > 0) {
if (_root.o_Upgrades[this.n_UpgradeID - 1][2]) {
_root.f_ShowMessage(("Collected '" + _root.o_Upgrades[this.n_UpgradeID - 1][0].toString()) + "' Powerup!");
_root.o_Upgrades[this.n_UpgradeID - 1][3]++;
_root.f_SetUpgradeCounters();
} else {
_root.f_ShowMessage(("Activated '" + _root.o_Upgrades[this.n_UpgradeID - 1][0].toString()) + "' Powerdown!");
_root.f_ActivateUpgrade(this.n_UpgradeID - 1);
}
}
this.removeMovieClip();
}
if (_root.b_GameOver) {
this.removeMovieClip();
}
if (_root.f_TimeDiff(this.d_CreationDate, new Date()) >= _root.n_ObjectTimeout) {
this._alpha = this._alpha - _root.n_ObjectTimeoutSpeed;
if (this._alpha <= 0) {
this.removeMovieClip();
}
}
switch (s_Mode) {
case "Project" :
_root.f_ProjectObject(this, this.n_Angle, this.n_Speed);
_local3 = _root.f_DistanceToObject(this, _root.o_TileContainer);
if ((_local3 >= _root.n_GameRadius) && (this.n_UpgradeID > 0)) {
_root.f_ProjectObject(this, this.n_Angle, _root.n_GameRadius - _local3);
this.s_Mode = "Stick";
if (this.n_UpgradeID > 0) {
_local4 = _root.attachMovie("TileSpawn", "TileSpawn_" + _root.getNextHighestDepth(), _root.getNextHighestDepth(), {_x:this._x, _y:this._y});
if (_root.o_Upgrades[this.n_UpgradeID - 1][2]) {
_local4.gotoAndPlay("Green");
} else {
_local4.gotoAndPlay("Red");
}
}
} else if ((_local3 >= (_root.n_GameRadius * 1.5)) && (this.n_UpgradeID <= 0)) {
this.removeMovieClip();
}
break;
case "Stick" :
break;
case "Drop" :
}
};
Symbol 48 MovieClip [TilePopped] Frame 2
this.gotoAndPlay(1);
Symbol 49 MovieClip [Projectile] Frame 1
var n_Strength;
var b_Init;
var d_Created;
var n_FireSpeed;
var n_Angle;
var n_TypeID;
var n_UpgradeID;
var b_Connector;
var n_ShotGroupID;
var a_HitPoints;
var b_Player;
this.onEnterFrame = function () {
var _local37;
var _local13;
var _local36;
var _local26 = false;
var _local34 = _root.o_Upgrades[_root.n_InvulID][0];
var _local29;
var _local30;
var _local28;
var _local23;
var _local33 = (Math.PI/180);
var _local7;
var _local3;
var _local16;
var _local4;
var _local12;
var _local8;
var _local6;
var _local11;
var _local10;
var _local9 = 0;
var _local14;
var _local18;
var _local17;
var _local27 = 10;
var _local25 = 5;
var _local5;
var _local31 = 0;
var _local15 = 0;
var _local32 = false;
var _local35;
var _local24;
if (_root.b_GameOver) {
this.removeMovieClip();
}
if ((b_Init != null) && (!_root.b_GameOver)) {
_root.f_MoveProjectile(this);
if (_root.f_DistanceToObject(new Object({_x:this._x, _y:this._y}), new Object({_x:_root.o_TileContainer._x, _y:_root.o_TileContainer._y})) > _root.n_GameRadius) {
if (_root.s_GameMode == "clearall") {
_root.n_ClearAllShotsMade++;
}
_local26 = true;
} else {
switch (this.n_TypeID) {
case 6 :
_local14 = false;
_local9 = 0;
while ((_local9 < a_HitPoints.length) && (!_local14)) {
_local3 = new Object({x:this._x + a_HitPoints[_local9]._x, y:this._y + a_HitPoints[_local9]._y});
_root.o_TileContainer.globalToLocal(_local3);
_local7 = _root.f_TileUnderPoint(_local3.x, _local3.y);
_local16 = _root.o_TileContainer[(("Tile_" + _local7.x) + "_") + _local7.y];
if (_local16) {
_local4 = _root.o_TileStrengthArray[_local7.x][_local7.y];
if ((_local4.n_TypeID > 0) || (_local4 == _root.o_TileAtCentreDetail)) {
_local14 = true;
}
}
_local9++;
}
if (_local14 && (_local4)) {
_local12 = _root.f_TilesInRange(_local4.n_X, _local4.n_Y, _root.n_OmegaParticleBlastSize);
_local9 = 0;
while (_local9 < _local12.length) {
_local5 = _local12[_local9];
_local8 = _root.o_TileContainer[(("Tile_" + _local5.n_X) + "_") + _local5.n_Y];
if (_local8 && (_local5 != _root.o_TileAtCentreDetail)) {
_local3 = new Object({x:_local8._x, y:_local8._y});
_root.o_TileContainer.localToGlobal(_local3);
_local6 = _root.attachMovie("TilePopped", "TilePop_" + _root.getNextHighestDepth(), _root.getNextHighestDepth(), {_x:_local3.x, _y:_local3.y});
_local6.o_Graphics.gotoAndStop("Tile_" + _local5.n_TypeID);
_local6.n_UpgradeID = _local5.n_UpgradeID;
_local6.o_Graphics.o_Upgrades.gotoAndStop("Upgrade_" + _local5.n_UpgradeID);
_local6.n_Angle = _root.f_AngleToObject(new Object({_x:this._x, _y:this._y}), new Object({_x:_local3.x, _y:_local3.y}));
_local6.d_CreationDate = new Date();
_local6.n_Speed = this.n_FireSpeed;
_local6.s_Mode = "Project";
_local5.n_TypeID = 0;
_local5.n_UpgradeID = 0;
_root.f_SetTileState(_local8, 0, 0);
_local15++;
}
_local9++;
}
_local26 = true;
}
if (_local26) {
_root.f_PlaySound("o_Explosions", "OmegaHit");
_local24 = _root.attachMovie("Explosions", "Explosion_" + _root.getNextHighestDepth(), _root.getNextHighestDepth(), {_x:this._x, _y:this._y});
_local24.gotoAndPlay("Type_2");
_local15 = _local15 + _root.f_DisconnectedObjects();
}
break;
case 7 :
_local14 = false;
_local9 = 0;
while ((_local9 < a_HitPoints.length) && (!_local14)) {
_local3 = new Object({x:this._x + a_HitPoints[_local9]._x, y:this._y + a_HitPoints[_local9]._y});
_root.o_TileContainer.globalToLocal(_local3);
_local7 = _root.f_TileUnderPoint(_local3.x, _local3.y);
_local16 = _root.o_TileContainer[(("Tile_" + _local7.x) + "_") + _local7.y];
if (_local16) {
_local4 = _root.o_TileStrengthArray[_local7.x][_local7.y];
if ((_local4.n_TypeID > 0) || (_local4 == _root.o_TileAtCentreDetail)) {
_local14 = true;
}
}
_local9++;
}
if (_local14 && (_local4)) {
_local12 = _root.f_TilesInRange(_local4.n_X, _local4.n_Y, _root.n_AlphaParticleBlastSize);
_local9 = 0;
while (_local9 < _local12.length) {
_local5 = _local12[_local9];
_local8 = _root.o_TileContainer[(("Tile_" + _local5.n_X) + "_") + _local5.n_Y];
if (_local8 && (_local5 != _root.o_TileAtCentreDetail)) {
_local3 = new Object({x:_local8._x, y:_local8._y});
_root.o_TileContainer.localToGlobal(_local3);
_local6 = _root.attachMovie("TilePopped", "TilePop_" + _root.getNextHighestDepth(), _root.getNextHighestDepth(), {_x:_local3.x, _y:_local3.y});
_local6.o_Graphics.gotoAndStop("Tile_" + _local5.n_TypeID);
_local6.n_UpgradeID = _local5.n_UpgradeID;
_local6.o_Graphics.o_Upgrades.gotoAndStop("Upgrade_" + _local5.n_UpgradeID);
_local6.n_Angle = _root.f_AngleToObject(new Object({_x:this._x, _y:this._y}), new Object({_x:_local3.x, _y:_local3.y}));
_local6.d_CreationDate = new Date();
_local6.n_Speed = this.n_FireSpeed;
_local6.s_Mode = "Project";
_local5.n_TypeID = 0;
_local5.n_UpgradeID = 0;
_root.f_SetTileState(_local8, 0, 0);
_local15++;
}
_local9++;
}
_local26 = true;
}
if (_local26) {
_root.f_PlaySound("o_Explosions", "BreakAway");
_local24 = _root.attachMovie("Explosions", "Explosion_" + _root.getNextHighestDepth(), _root.getNextHighestDepth(), {_x:this._x, _y:this._y});
_local24.gotoAndPlay("Type_1");
_local15 = _local15 + _root.f_DisconnectedObjects();
}
break;
default :
_local14 = false;
_local9 = 0;
for(;;){
if (!((_local9 < a_HitPoints.length) && (!_local14))) {
break;
}
_local3 = new Object({x:this._x + a_HitPoints[_local9]._x, y:this._y + a_HitPoints[_local9]._y});
_root.o_TileContainer.globalToLocal(_local3);
_local7 = _root.f_TileUnderPoint(_local3.x, _local3.y);
_local16 = _root.o_TileContainer[(("Tile_" + _local7.x) + "_") + _local7.y];
if (_local16) {
_local4 = _root.o_TileStrengthArray[_local7.x][_local7.y];
if ((((!b_Connector) && (_local4.n_TypeID > 0)) || (b_Connector && (_local4.n_TypeID == this.n_TypeID))) || (_local4 == _root.o_TileAtCentreDetail)) {
_local14 = true;
_local18 = false;
_local17 = 0;
while ((!_local18) && (_local17 <= _local27)) {
_local3 = new Object({x:this._x, y:this._y});
_root.o_TileContainer.globalToLocal(_local3);
_local7 = _root.f_TileUnderPoint(_local3.x, _local3.y);
_local8 = _root.o_TileContainer[(("Tile_" + _local7.x) + "_") + _local7.y];
_local5 = _root.o_TileStrengthArray[_local7.x][_local7.y];
if ((((!b_Connector) && (_local5.n_TypeID == 0)) || (b_Connector && (_local5.n_TypeID != this.n_TypeID))) && (_local5 != _root.o_TileAtCentreDetail)) {
_local5.n_UpgradeID = this.n_UpgradeID;
_local5.n_TypeID = this.n_TypeID;
_root.f_SetTileState(_local8, this.n_TypeID, this.n_UpgradeID);
_local18 = true;
} else {
_root.f_ProjectObject(this, this.n_Angle - 180, _local25);
}
_local17++;
}
_local26 = true;
if (b_Player) {
_local29 = _root.f_DegreeTransform(_local4.n_Angle, _root.o_TileContainer._rotation);
n_Angle = _root.f_DegreeTransform(n_Angle, 0);
_local30 = _local4.n_Distance;
_local28 = _local4.n_DistancePerc;
n_Temp = _root.f_DegreeTransform(_local29 - n_Angle, 0);
if (n_Temp > 180) {
_local23 = 180 - n_Temp;
} else {
_local23 = n_Temp;
}
_root.n_PlayingFieldVelocity = _root.n_PlayingFieldVelocity + (((_local23 / 30) * _root.n_PlayingFieldMaxVelocity) * _local28);
if (_root.n_PlayingFieldVelocity > _root.n_PlayingFieldMaxVelocity) {
_root.n_PlayingFieldVelocity = _root.n_PlayingFieldMaxVelocity;
}
if (_root.n_PlayingFieldVelocity < (_root.n_PlayingFieldMaxVelocity * -1)) {
_root.n_PlayingFieldVelocity = _root.n_PlayingFieldMaxVelocity * -1;
}
_root.f_StartFlood(_local5.n_X, _local5.n_Y, 2);
_local12 = new Array();
_local11 = 0;
while (_local11 < _root.n_XTiles) {
_local10 = 0;
while (_local10 < _root.n_YTiles) {
if (_root.o_TileFloodArray[_local11][_local10].b_Checked && _root.o_TileFloodArray[_local11][_local10].b_Flag) {
_local4 = _root.o_TileStrengthArray[_local11][_local10];
_local12.push(_local4);
}
_local10++;
}
_local11++;
}
if (_local12.length > 2) {
_root.f_PlaySound("o_Explosions", "BreakAway");
_local24 = _root.attachMovie("Explosions", "Explostion_" + _root.getNextHighestDepth(), _root.getNextHighestDepth(), {_x:this._x, _y:this._y});
_local24.gotoAndPlay("Type_1");
_local13 = 0;
while (_local13 < _local12.length) {
_local4 = _local12[_local13];
_local8 = _root.o_TileContainer[(("Tile_" + _local4.n_X) + "_") + _local4.n_Y];
_local3 = new Object({x:_local8._x, y:_local8._y});
_root.o_TileContainer.localToGlobal(_local3);
_local6 = _root.attachMovie("TilePopped", "TilePop_" + _root.getNextHighestDepth(), _root.getNextHighestDepth(), {_x:_local3.x, _y:_local3.y});
_local6.o_Graphics.gotoAndStop("Tile_" + _local4.n_TypeID);
_local6.n_UpgradeID = _local4.n_UpgradeID;
_local6.o_Graphics.o_Upgrades.gotoAndStop("Upgrade_" + _local4.n_UpgradeID);
if ((_local5.n_X == _local4.n_X) && (_local5.n_Y == _local4.n_Y)) {
_local6.n_Angle = this.n_Angle;
} else {
_local6.n_Angle = _root.f_AngleToObject(new Object({_x:this._x, _y:this._y}), new Object({_x:_local3.x, _y:_local3.y}));
}
_local6.d_CreationDate = new Date();
_local6.n_Speed = this.n_FireSpeed;
_local6.s_Mode = "Project";
_local4.n_TypeID = 0;
_local4.n_UpgradeID = 0;
_root.f_SetTileState(_local8, 0, 0);
_local15++;
_local13++;
}
_local15 = _local15 + _root.f_DisconnectedObjects();
} else {
if (_root.s_GameMode == "clearall") {
_root.n_ClearAllShotsMade++;
}
_root.f_PlaySound("o_Sounds", "hittile");
}
}
}
}
_local9++;
};
}
}
} else if (_root.b_GameOver) {
this.removeMovieClip();
}
if (_local26) {
if (b_Player && (_local15 > 0)) {
if (_local15 > _root.o_ScoreMultiplierArray.length) {
_local15 = _root.o_ScoreMultiplierArray.length;
}
_local31 = Math.round(_root.n_BaseObjectScore * _root.o_ScoreMultiplierArray[_local15 - 1][0]);
if (!isNaN(_local31)) {
_root.o_LevelProgress.n_CurrentValue = _root.o_LevelProgress.n_CurrentValue + _local31;
_root.n_Score = _root.n_Score + _local31;
}
if (this.n_TypeID != 7) {
s_Message = _root.o_ScoreMultiplierArray[_local15 - 1][1] + " Shot";
s_Message = s_Message + ((" (x" + _root.o_ScoreMultiplierArray[_local15 - 1][0]) + " bonus)");
}
if ((s_Message != undefined) && (s_Message != "")) {
_root.f_ShowMessage(s_Message);
}
}
this.removeMovieClip();
}
};
Symbol 49 MovieClip [Projectile] Frame 2
this.gotoAndPlay(1);
Symbol 62 MovieClip [TileSpawn] Frame 21
this.removeMovieClip();
Symbol 62 MovieClip [TileSpawn] Frame 42
this.removeMovieClip();
Symbol 62 MovieClip [TileSpawn] Frame 63
this.removeMovieClip();
Symbol 68 MovieClip [Gun] Frame 1
Symbol 68 MovieClip [Gun] Frame 2
gotoAndPlay ("Start");
Symbol 96 Button
on (release) {
this.gotoAndPlay("Instruction_level_2");
}
Symbol 105 Button [StartGame]
on (release) {
_root.b_GameInit = undefined;
_root.gotoAndPlay("Game");
}
Symbol 108 Button
on (release) {
this.gotoAndPlay("Instruction_level_3");
}
Symbol 117 MovieClip [ObjectCounter] Frame 1
this.onEnterFrame = function () {
var _local3 = Math.round(100 - ((100 / _root.n_MaxObjects) * _root.n_CurrentObjects));
var _local4 = new TextFormat();
if (_local3 >= 50) {
_local4.color = 16777215 /* 0xFFFFFF */;
} else if ((_local3 < 50) && (_local3 >= 35)) {
_local4.color = 10092441 /* 0x99FF99 */;
} else if ((_local3 < 35) && (_local3 >= 20)) {
_local4.color = 16776960 /* 0xFFFF00 */;
} else if ((_local3 < 20) && (_local3 >= 10)) {
_local4.color = 16750848 /* 0xFF9900 */;
} else if (_local3 < 10) {
_local4.color = 16711680 /* 0xFF0000 */;
}
this.o_ScoreText.text = _local3.toString() + "%";
this.o_ScoreText.setTextFormat(_local4);
};
Symbol 117 MovieClip [ObjectCounter] Frame 2
gotoAndPlay (1);
Symbol 124 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 124 MovieClip [Progress] Frame 2
this.f_showProgress();
Symbol 124 MovieClip [Progress] Frame 4
this.f_showProgress();
Symbol 140 Button
on (release) {
this.gotoAndPlay("Instruction_level_4");
}
Symbol 153 Button
on (release) {
this.gotoAndPlay("Instruction_clearall_2");
}
Symbol 155 Button
on (release) {
this.gotoAndPlay("Instruction_clearall_3");
}
Symbol 161 Button
on (release) {
this.gotoAndPlay("Instruction_freeplay_2");
}
Symbol 162 Button
on (release) {
this.gotoAndPlay("Instruction_freeplay_3");
}
Symbol 171 Button
on (release) {
this.gotoAndPlay("Instruction_freeplay_4");
}
Symbol 176 MovieClip [InstructionMovie] Frame 1
stop();
Symbol 176 MovieClip [InstructionMovie] Frame 2
stop();
Symbol 176 MovieClip [InstructionMovie] Frame 3
stop();
Symbol 176 MovieClip [InstructionMovie] Frame 4
stop();
Symbol 176 MovieClip [InstructionMovie] Frame 5
stop();
Symbol 176 MovieClip [InstructionMovie] Frame 6
stop();
Symbol 176 MovieClip [InstructionMovie] Frame 7
stop();
Symbol 176 MovieClip [InstructionMovie] Frame 8
stop();
Symbol 176 MovieClip [InstructionMovie] Frame 9
stop();
Symbol 176 MovieClip [InstructionMovie] Frame 10
stop();
Symbol 176 MovieClip [InstructionMovie] Frame 11
stop();
Symbol 177 MovieClip [ObjectGraphicsSmall] Frame 1
this.stop();
Symbol 180 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 180 MovieClip [Score] Frame 2
gotoAndPlay (1);
Symbol 187 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) {
gotoAndPlay ("End");
}
Symbol 187 MovieClip [Loader] Frame 3
gotoAndPlay ("Looper");
Symbol 187 MovieClip [Loader] Frame 4
_root.gotoAndPlay("Splash");
Symbol 202 Button
on (press) {
getURL ("http://www.addictinggames.com", blank);
}
Symbol 209 MovieClip [Sounds] Frame 2
gotoAndStop (1);
Symbol 209 MovieClip [Sounds] Frame 4
gotoAndStop (1);
Symbol 209 MovieClip [Sounds] Frame 6
gotoAndStop (1);
Symbol 209 MovieClip [Sounds] Frame 8
gotoAndStop (1);
Symbol 209 MovieClip [Sounds] Frame 10
gotoAndStop (1);
Symbol 209 MovieClip [Sounds] Frame 12
gotoAndStop (1);
Symbol 212 MovieClip [ExplosionSounds] Frame 2
gotoAndStop (1);
Symbol 212 MovieClip [ExplosionSounds] Frame 4
this.stop();
Symbol 212 MovieClip [ExplosionSounds] Frame 6
this.stop();
Symbol 212 MovieClip [ExplosionSounds] Frame 8
this.stop();
Symbol 212 MovieClip [ExplosionSounds] Frame 10
this.stop();
Symbol 212 MovieClip [ExplosionSounds] Frame 12
this.stop();
Symbol 221 Button
on (press) {
_root.getURL("http://www.addictinggames.com");
}
Symbol 372 MovieClip Frame 147
stop();
Symbol 373 MovieClip Frame 1
_root.stop();
Symbol 373 MovieClip Frame 440
_root.b_SoundsOn = true;
_root.f_PlaySound("o_Sounds", "GameMusic");
_root.play();
Symbol 386 Button
on (release) {
_root.s_GameMode = "clearall";
_root.b_GameOver = false;
_root.gotoAndPlay("Instructions");
}
Symbol 389 Button
on (release) {
_root.s_GameMode = "level";
_root.b_GameOver = false;
_root.gotoAndPlay("Instructions");
}
Symbol 396 Button
on (release) {
_root.s_GameMode = "freeplay";
_root.b_GameOver = false;
_root.gotoAndPlay("Instructions");
}
Symbol 402 Button
on (release) {
_root.swHighScoreObject.showTab = "view";
_root.swHighScoreObject.gameId = "spinningbubbles1";
_level0.swHighScoreObject.gameTitle = "Spinning Bubbles (Free Play)";
docount = true;
loadMovieNum (_root.HSHubURL, 2);
}
Symbol 403 Button
on (release) {
_root.swHighScoreObject.showTab = "view";
_root.swHighScoreObject.gameId = "spinningbubbles2";
_level0.swHighScoreObject.gameTitle = "Spinning Bubbles (Levelled)";
docount = true;
loadMovieNum (_root.HSHubURL, 2);
}
Symbol 404 Button
on (release) {
_root.swHighScoreObject.showTab = "view";
_root.swHighScoreObject.gameId = "spinningbubbles3";
_level0.swHighScoreObject.gameTitle = "Spinning Bubbles (Clear All)";
docount = true;
loadMovieNum (_root.HSHubURL, 2);
}
Symbol 409 Button [SmallLink]
on (release) {
getURL ("http://www.thenakeddeveloper.com", "_blank");
}
Symbol 411 MovieClip [TileContainer] Frame 1
var s_Mode;
if (s_Mode == "Drop") {
if (this._alpha > 0) {
this._alpha = this._alpha - _root.n_PlayingFieldDropAlphaChange;
this._y = this._y + _root.n_PlayingFieldDropSpeed;
} else {
this.removeMovieClip();
}
} else {
this.stop();
}
Symbol 411 MovieClip [TileContainer] Frame 2
gotoAndPlay (1);
Symbol 419 MovieClip [Warning] Frame 2
if (_root.n_CurrentObjects >= _root.n_WarningLevel) {
this.gotoAndPlay("Warning");
} else {
this.gotoAndPlay("Holding");
}
Symbol 419 MovieClip [Warning] Frame 15
if (_root.n_CurrentObjects >= _root.n_WarningLevel) {
this.gotoAndPlay("Warning");
} else {
this.gotoAndPlay("Holding");
}
Symbol 425 MovieClip [Frozen] Frame 1
stop();
Symbol 425 MovieClip [Frozen] Frame 2
_root.f_PlaySound("o_Sounds", "Freeze");
Symbol 425 MovieClip [Frozen] Frame 6
stop();
Symbol 435 MovieClip [MessageRelay] Frame 1
if (_root.a_MessageRelayArray.length > 0) {
this.o_Messages.text = "";
this.o_LatestMessage.text = (_root.a_MessageRelayArray[_root.a_MessageRelayArray.length - 1].toString() + newline) + "\x0E";
var i = (_root.a_MessageRelayArray.length - 2);
while (i >= 0) {
this.o_Messages.text = this.o_Messages.text + ((_root.a_MessageRelayArray[i].toString() + newline) + "\x0E");
i--;
}
}
Symbol 435 MovieClip [MessageRelay] Frame 2
this.gotoAndPlay(1);
Symbol 444 MovieClip [Win] Frame 1
stop();
Symbol 444 MovieClip [Win] Frame 52
if (_root.o_TileContainer) {
_root._root.o_TileContainer.removeMovieClip();
}
_root.b_GameOver = true;
_root.b_GameOverAnimPlaying = false;
this.gotoAndStop(1);
Symbol 444 MovieClip [Win] Frame 103
if (_root.o_TileContainer) {
_root._root.o_TileContainer.removeMovieClip();
}
_root.b_GameOver = true;
_root.b_GameOverAnimPlaying = false;
this.gotoAndStop(1);
Symbol 448 MovieClip [Connector] Frame 1
this.stop();
Symbol 448 MovieClip [Connector] Frame 31
if (_root.b_ConnectorActive) {
this.gotoAndPlay("Start");
} else {
this.gotoAndStop(1);
}
Symbol 453 Button
on (release) {
_root.gotoAndPlay("MainMenu");
}