Frame 1
function f_LockedSite() {
if (((_root._url.toLowerCase().indexOf("flowplay.com") == -1) && (_root._url.toLowerCase().indexOf("localhost") == -1)) && (_root._url.toLowerCase().indexOf("ourworld.com") == -1)) {
return(false);
}
return(true);
}
function f_ReportStatistics() {
if (_root.b_LockedSite) {
flash.external.ExternalInterface.call("fpSendStat", "ShotsFired", _root.n_StatsShotsFired, "max");
flash.external.ExternalInterface.call("fpSendStat", "BadSporesReleased", _root.n_StatsBadSporesReleased, "max");
flash.external.ExternalInterface.call("fpSendStat", "GoodSporesReleased", _root.n_StatsGoodSporesReleased, "max");
flash.external.ExternalInterface.call("fpSendStat", "BlocksKilled", _root.n_StatsBlocksKilled, "max");
flash.external.ExternalInterface.call("fpSendStat", "SporesKilled", _root.n_StatsSporesKilled, "max");
flash.external.ExternalInterface.call("fpSendStat", "WeaponsFired", _root.n_StatsWeaponsFired, "max");
} else if (_root._url.toLowerCase().indexOf("kongregate.com") != -1) {
}
}
function f_DamageVirus(n_X, n_Y, n_Damage) {
var _local5;
var _local4;
if (_root.o_VirusArray[n_X][n_Y] >= _root.o_VirusTransformLevels[1]) {
_root.f_PlaySound("o_Explosions", "VirusHit");
if ((_root.o_VirusArray[n_X][n_Y] - n_Damage) < _root.o_VirusTransformLevels[1]) {
if (b_GameOver == false) {
_root.f_AddScore(_root.o_VirusArray[n_X][n_Y]);
}
_local5 = (_root.o_VirusTransformLevels[1] - _root.o_VirusArray[n_X][n_Y]) * -1;
_root.o_VirusArray[n_X][n_Y] = 0;
_root.n_StatsBlocksKilled++;
_local4 = _root[(("Virus_" + n_X.toString()) + "_") + n_Y.toString()];
_local4.b_Die = true;
if ((_local4.n_PowerupType > 0) && (_local4.n_Type != 0)) {
_root.f_ShootSpore(n_X, n_Y, 1, _local4.n_PowerupType);
}
} else {
if (b_GameOver == false) {
_root.f_AddScore(n_Damage);
}
_root.o_VirusArray[n_X][n_Y] = _root.o_VirusArray[n_X][n_Y] - n_Damage;
_local5 = 0;
}
} else {
_local5 = n_Damage;
}
return(_local5);
}
function f_AddScore(n_Value) {
_root.n_Score = _root.n_Score + n_Value;
FlowPlayAPI.SetScore(_root.n_Score);
}
function f_ActivateUpgrade(n_UpgradeID) {
if (((_root.o_Upgrades[n_UpgradeID][0] == 0) && (o_Upgrades[n_UpgradeID][6] == 1)) && (o_Upgrades[n_UpgradeID][1] >= o_Upgrades[n_UpgradeID][4])) {
_root.o_Upgrades[n_UpgradeID][0] = 1;
_root.o_Upgrades[n_UpgradeID][1] = 0;
_root.n_StatsWeaponsFired++;
if (n_UpgradeID == 1) {
var _local6 = _root.attachMovie("SmartBomb", "SmartBomb", 10100);
_local6._x = o_Arena._x;
_local6._y = o_Arena._y;
} else if (n_UpgradeID == 4) {
var _local5 = _root.attachMovie("BeamLaser", "BeamLaser_1", 1010100);
_local5._x = o_Arena._x;
_local5._y = o_Arena._y;
_local5._rotation = _root.o_Gun._rotation;
if (o_Upgrades[0][0] == 1) {
var _local3 = _root.attachMovie("BeamLaser", "BeamLaser_2", 1010101);
_local3._x = o_Arena._x;
_local3._y = o_Arena._y;
_local3._rotation = _root.o_Gun_120._rotation;
var _local4 = _root.attachMovie("BeamLaser", "BeamLaser_3", 1010102);
_local4._x = o_Arena._x;
_local4._y = o_Arena._y;
_local4._rotation = _root.o_Gun_240._rotation;
}
_root.f_PlaySound("o_Sounds", "BeamLaser");
} else if (n_UpgradeID == 5) {
_root.o_FreezeRay.gotoAndPlay("FreezeAnimation");
}
}
}
function f_BombArea(n_Distance, n_DamageAmount) {
var _local3;
var _local2;
var _local5;
var _local4;
_local3 = 0;
while (_local3 < _root.n_VirusArrayWidth) {
_local2 = 0;
while (_local2 < _root.n_VirusArrayHeight) {
if ((o_PlayingFieldLoader[_local2].charAt(_local3) == n_Distance.toString()) and (_root.o_VirusArray[_local3][_local2] >= o_VirusTransformLevels[1])) {
f_DamageVirus(_local3, _local2, n_DamageAmount * _root.n_UpgradeSmartbombMultiplier);
}
_local2++;
}
_local3++;
}
n_SporeHalfWidth = _root.n_VirusWidth / 2;
_local4 = 0;
while (_local4 <= _root.n_SporeUpperLimit) {
_local5 = _root["Spore_" + _local4.toString()];
if (_local5 != undefined) {
_root.f_DamageSpore(_local5, _root.o_ProjectileLevels[_root.n_ProjectileLevel]);
}
_local4++;
}
}
function f_DoDamageDisplay() {
_root.o_Damage._x = 0;
_root.o_Damage._y = 0;
_root.o_Damage._width = _root._width;
_root.o_Damage._height = _root._height;
_root.o_Damage.gotoAndPlay(0);
}
function f_CalculatePowerup(n_XCoord, n_YCoord) {
var _local4 = Math.random() * 100;
var _local2;
var _local3 = _root[(("Virus_" + n_XCoord.toString()) + "_") + n_YCoord.toString()];
if ((_local4 >= 0) and (_local4 < _root.n_SporeGoodChancePerc)) {
_local2 = Math.ceil(_root.o_Upgrades.length / (_root.n_SporeGoodChancePerc / _local4));
} else {
_local2 = 0;
}
if (((_root.o_Upgrades[_local2][7] != _root.o_Upgrades[_local2][8]) && (_local2 > 7)) || (_local2 <= 7)) {
_local3.n_PowerupType = _local2;
_local3.o_PowerUps._visible = false;
_local3.o_PowerUps.gotoAndPlay("Powerup_" + _local2.toString());
} else {
_local3.n_PowerupType = 0;
_local3.o_PowerUps._visible = false;
_local3.o_PowerUps.gotoAndPlay("Powerup_0");
}
}
function f_CollectPowerup(n_PowerupType) {
if (n_PowerupType >= 7) {
f_UpgradePowerup(n_PowerupType);
} else if ((_root.o_Upgrades[n_PowerupType][6] == undefined) || (_root.o_Upgrades[n_PowerupType][6] == 0)) {
f_EnablePowerup(n_PowerupType);
} else {
f_UpgradePowerup(n_PowerupType);
}
}
function f_UpgradePowerup(n_PowerupType) {
if (n_PowerupType < 7) {
_root.o_Upgrades[n_PowerupType][1] = _root.o_Upgrades[n_PowerupType][1] + ((_root.o_Upgrades[n_PowerupType][4] / 100) * _root.n_UpgradeRepowerPerc);
}
if (_root.o_Upgrades[n_PowerupType][7] < _root.o_Upgrades[n_PowerupType][8]) {
_root.o_Upgrades[n_PowerupType][7]++;
if (n_PowerupType < 7) {
_root.o_Upgrades[n_PowerupType][4] = _root.o_Upgrades[n_PowerupType][4] - Math.floor((_root.o_Upgrades[n_PowerupType][4] / 100) * _root.o_Upgrades[n_PowerupType][9]);
f_ShowMessage(("Increase in '" + _root.o_Upgrades[n_PowerupType][5].toString()) + "' recharge speed.");
} else if (n_PowerupType == 7) {
_root.n_ProjectileRegenLimit--;
f_ShowMessage("Rate of fire increased.");
} else if (n_PowerupType == 8) {
_root.n_ProjectileDistance = _root.n_ProjectileDistance + _root.n_ProjectileDistanceAdd;
f_ShowMessage("Shot distance increased.");
} else if (n_PowerupType == 9) {
_root.n_ProjectileLevel++;
f_ShowMessage("Damage output increased.");
}
} else {
f_ShowMessage("That powerup is maxed out!");
}
}
function f_EnablePowerup(n_PowerupType) {
_root.o_Upgrades[n_PowerupType][6] = 1;
_root["o_Powerup_" + n_PowerupType.toString()].o_Instructions.n_Type = n_PowerupType + 1;
_root["o_Powerup_" + n_PowerupType.toString()].o_Instructions.n_Counter = _root.n_InstructionTime;
f_ShowMessage(("You collected the '" + _root.o_Upgrades[n_PowerupType][5].toString()) + "' power up.");
}
function f_DamageSpore(o_Spore, n_DamageAmount) {
var _local3;
if (_root.n_Wave < _root.n_SoundsCutLevel) {
_root.f_PlaySound("o_Explosions", "SporeHit");
}
o_Spore._x = o_Spore._x - (o_Spore.n_XVelocity * _root.n_SporePushBackAmount);
o_Spore._y = o_Spore._y - (o_Spore.n_YVelocity * _root.n_SporePushBackAmount);
o_Spore.n_Strength = o_Spore.n_Strength - n_DamageAmount;
_local3 = o_Spore.n_Strength * -1;
return(_local3);
}
function f_ShootSpore(n_XCoord, n_YCoord, n_Type, n_PowerupType) {
var _local3;
var _local9;
var _local6;
var _local2;
_root.n_SporeCount = undefined;
_local2 = 0;
while (_local2 <= _root.n_SporeUpperLimit) {
if ((_root["Spore_" + _local2] == undefined) && (_root.n_SporeCount == undefined)) {
_root.n_SporeCount = _local2;
}
_local2++;
}
if (_root.n_SporeCount != undefined) {
_local3 = _root.attachMovie("Spore", "Spore_" + _root.n_SporeCount.toString(), 20000 + _root.n_SporeCount);
_local3._x = (_root.n_VirusArrayX + (n_XCoord * _root.n_VirusWidth)) + ((_local3._width / 2) - 1);
_local3._y = (_root.n_VirusArrayY + (n_YCoord * _root.n_VirusWidth)) + ((_local3._height / 2) - 1);
_local3.n_Type = n_Type;
_local3.n_PowerupType = n_PowerupType;
if (n_Type == 0) {
_local3.n_Strength = _root.n_SporeStartStrengthBad;
_root.n_StatsBadSporesReleased++;
} else {
_local3.n_Strength = _root.n_SporeStartStrengthGood;
_root.n_StatsGoodSporesReleased++;
}
_local3.n_XVelocity = ((_local3._x - _root.o_Arena._x) / _root.o_Arena._width) * (1 + (Math.random() * 5));
_local3.n_YVelocity = ((_local3._y - _root.o_Arena._y) / _root.o_Arena._height) * (1 + (Math.random() * 5));
_local3.gotoAndPlay("SporeStart_" + n_Type.toString());
_local3.o_Powerups.gotoAndPlay("Powerup_" + n_PowerupType.toString());
}
}
function f_Germinate(n_XCoord, n_YCoord, n_SourceStrength) {
if ((((n_XCoord >= 0) and (n_XCoord < n_VirusArrayWidth)) and (n_YCoord >= 0)) and (n_YCoord < n_VirusArrayHeight)) {
if (o_PlayingFieldLoader[n_YCoord].charAt(n_XCoord) != "0") {
_root.o_VirusArray[n_XCoord][n_YCoord] = _root.o_VirusArray[n_XCoord][n_YCoord] + Math.round(Math.random() * (n_VirusGerminateBase + ((n_SourceStrength / 100) * n_VirusGerminateBoostPerc)));
}
}
}
function f_ShowMessage(s_Text) {
var _local2 = _root.attachMovie("Messages", "Messages", 2000000);
_local2._x = n_PlayingFieldX;
_local2._y = n_PlayingFieldY;
_local2.o_InnerText.o_Text.text = s_Text;
_local2.gotoAndPlay(0);
}
function f_FireProjectile(n_Type, n_AngleOffset, n_StartOffSet) {
var _local2;
var _local3 = 0;
var _local11 = 0;
var _local12 = 0;
var _local7;
var _local5;
var _local4 = Math.cos(Math.PI * (n_AngleOffset / 180));
var _local6 = Math.sin(Math.PI * (n_AngleOffset / 180));
var _local9;
var _local8;
_root.n_StatsShotsFired++;
_local2 = _root["Projectile_" + _root.n_ProjectilesCounter.toString()];
if (_local2 == undefined) {
_local2 = _root.attachMovie("Projectile", "Projectile_" + _root.n_ProjectilesCounter.toString(), 10000 + _root.n_ProjectilesCounter);
}
_root.n_ProjectilesCounter++;
if (_root.n_ProjectilesCounter > _root.n_ProjectilesUpperLimit) {
_root.n_ProjectilesCounter = 0;
}
_local3 = (_root.n_GunXPos + n_StartOffSet) / 57.2957795130823;
_local2._x = _root.n_PlayingFieldX + (((82 - _root.n_GunLength) * (Math.cos(_local3) * Math.PI)) * -1);
_local2._y = _root.n_PlayingFieldY + (((82 - _root.n_GunLength) * Math.sin(_local3 * -1)) * Math.PI);
_local7 = (-1 * (_local2._x - _root.o_Arena._x)) / _root.o_Arena._width;
_local5 = (-1 * (_local2._y - _root.o_Arena._y)) / _root.o_Arena._height;
_local9 = (_local7 * _local4) + (_local5 * _local6);
_local8 = (_local5 * _local4) - (_local7 * _local6);
_local2.n_Strength = _root.o_ProjectileLevels[n_Type];
_local2.n_Timer = _root.n_ProjectileDistance;
_local2.n_XAngle = _local9 * 15;
_local2.n_YAngle = _local8 * 15;
_local2.b_Init = true;
_local2.gotoAndPlay("Projectile_" + n_Type.toString());
if (_root.o_Upgrades[6][0] == 1) {
_root.f_PlaySound("o_Sounds", "QuadDamage");
} else {
_root.f_PlaySound("o_Sounds", "Shoot");
}
_root.n_ProjectileRegen = _root.n_ProjectileRegenLimit;
return(true);
}
function f_UpWave() {
var _local3;
var _local2;
_root.n_VirusTimer = 0;
if (_root.n_GameLocation == "Game") {
_root.n_VirusTimerInterval = _root.n_VirusTimerInterval - ((_root.n_VirusTimerInterval / 100) * _root.n_VirusTimerIntervalWaveDec);
_root.n_Wave++;
_root.f_ShowMessage("Wave " + _root.n_Wave.toString());
_root.o_WaveNumber.text = "Currently " + _root.n_Wave.toString();
FlowPlayAPI.SetLevel(_root.n_Wave);
}
_root.n_VirusSCount = 0;
while (_root.n_VirusSCount <= 5) {
_local3 = 6 + Math.round(Math.random() * 6);
_local2 = 6 + Math.round(Math.random() * 6);
if (_root.o_VirusArray[_local3][_local2] < 400) {
_root.o_VirusArray[_local3][_local2] = 400;
}
_root.n_VirusSCount++;
}
}
function f_ShowScores() {
stopAllSounds();
_root.MenuOverlay.removeMovieClip();
_root.Messages.removeMovieClip();
this.onEnterFrame = undefined;
_root.gotoAndPlay("HighscoreView");
}
function f_StartGame() {
stopAllSounds();
_root.MenuOverlay.removeMovieClip();
_root.Messages.removeMovieClip();
_root.n_StatsShotsFired = 0;
_root.n_StatsBadSporesReleased = 0;
_root.n_StatsGoodSporesReleased = 0;
_root.n_StatsBlocksKilled = 0;
_root.n_StatsSporesKilled = 0;
_root.n_StatsWeaponsFired = 0;
_root.n_StatsCounter = 0;
_root.b_IsInit = undefined;
_root.b_PlayingEnd = undefined;
this.onEnterFrame = undefined;
_root.gotoAndPlay("Start");
}
function f_EndGame() {
var _local3;
_root.b_GameOver = true;
_root.n_SoundCounter = 0;
stopAllSounds();
_root.b_IsInit = undefined;
this.onEnterFrame = undefined;
_root.f_ReportStatistics();
_local3 = 0;
while (_local3 <= _root.n_SporeUpperLimit) {
if (_root["Spore_" + _local3.toString()] != undefined) {
_root["Spore_" + _local3.toString()].removeMovieClip();
}
_local3++;
}
_root.Messages.removeMovieClip();
_root.gotoAndPlay("EndGame");
}
function f_Initialise() {
var _local4;
var _local3;
var _local7 = SharedObject.getLocal("GameSettings");
var _local5;
var _local6 = 0;
_root.b_MainInstructionsShown = false;
this.o_MainInstructions.b_KillInstructions = false;
this.o_MainInstructions.gotoAndPlay(1);
_root.b_GameOver = false;
if (_local7.data.b_MusicOn != undefined) {
b_MusicOn = _local7.data.b_MusicOn;
} else {
b_MusicOn = true;
}
if (_local7.data.b_SoundsOn != undefined) {
b_SoundsOn = _local7.data.b_SoundsOn;
} else {
b_SoundsOn = true;
}
_root.n_SoundCounter = 0;
if (_local7.data.s_Quality != undefined) {
_root._quality = _local7.data.s_Quality;
} else {
_root._quality = "MEDIUM";
}
if (n_GameLocation == "Game") {
_root.o_WaveNumber.text = "Currently 0";
_root.n_GunXPos = 270;
_root.n_GunInertia = 0;
_root.n_ProjectilesCounter = 0;
_root.n_ProjectileRegenLimit = 10;
_root.n_ProjectileRegen = 0;
_root.n_ProjectileLevel = 0;
_root.n_ProjectileDistance = 35;
_root.b_AutoFire = false;
o_Upgrades = [[0, 0, 0, 300, 600, "Ghost Guns", _root.b_Debugging, 0, 10, 5], [0, 0, 0, 1, 1200, "Smartbomb", _root.b_Debugging, 0, 10, 5], [0, 0, 0, 200, 500, "Scatter Gun", _root.b_Debugging, 0, 10, 5], [0, 0, 0, 100, 400, "Area Of Effect", _root.b_Debugging, 0, 10, 5], [0, 0, 0, 20, 500, "Beam Laser", _root.b_Debugging, 0, 10, 5], [0, 0, 0, 100, 400, "Freeze Ray", _root.b_Debugging, 0, 10, 5], [0, 0, 0, 200, 400, "Quad Damage", _root.b_Debugging, 0, 10, 5], [0, 0, 0, 100, n_ProjectileRegenLimit, "Rate Of Fire", _root.b_Debugging, 0, 3, 10], [0, 0, 0, 100, 200, "Distance", _root.b_Debugging, 0, 3, 10], [0, 0, 0, 100, 200, "Damage", _root.b_Debugging, 0, 6, 1]];
_local6 = 0;
while (_local6 < _root.o_Upgrades.length) {
_root["o_Powerup_" + _local6.toString()].n_UpgradeNumber = _local6;
_local6++;
}
_root.n_SporeCount = 0;
_root.n_ShieldValue = _root.n_ShieldUpperLimit;
_root.o_ShieldBar.n_MaxValue = 1000;
_root.o_ShieldBar.n_CurrentValue = _root.n_ShieldValue;
n_Score = 0;
n_Wave = 0;
}
if (n_GameLocation == "Game") {
_root.n_VirusTimerIterations = 5;
_root.n_VirusTimerInterval = 250;
} else {
_root.n_VirusTimerIterations = 10;
_root.n_VirusTimerInterval = 50;
}
_root.n_VirusTimer = n_VirusTimerInterval - 1;
_root.o_VirusArray = new Array();
_local4 = 0;
while (_local4 < _root.n_VirusArrayWidth) {
_root.o_VirusArray[_local4] = new Array();
_local3 = 0;
while (_local3 < _root.n_VirusArrayHeight) {
_root.o_VirusArray[_local4][_local3] = -1;
if (o_PlayingFieldLoader[_local3].charAt(_local4) != "0") {
if (_root.n_GameLocation == "Game") {
_local5 = _root.attachMovie("Virus", (("Virus_" + _local4.toString()) + "_") + _local3.toString(), (1000 + (_local4 * 100)) + _local3);
} else {
_local5 = _root.attachMovie("MenuVirus", (("Virus_" + _local4.toString()) + "_") + _local3.toString(), (1000 + (_local4 * 100)) + _local3);
}
_local5._x = n_VirusArrayX + (_local4 * n_VirusWidth);
_local5._y = n_VirusArrayY + (_local3 * n_VirusWidth);
_local5.b_Die = false;
_root.f_InitialiseVirus(_local5, _local4, _local3, 0);
}
_local3++;
}
_local4++;
}
if (_root.b_MusicOn) {
_root.o_Sounds.gotoAndPlay("GameMusic");
}
_root.b_IsInit = true;
}
function f_ToggleAutoFire() {
var _local2 = new Date();
var _local3 = SharedObject.getLocal("GameSettings");
if (d_AutoFireToggle == undefined) {
d_AutoFireToggle = new Date(1999, 12, 31, 23, 59, 59, 0);
}
if (_root.f_OverTimeDiff(_root.d_AutoFireToggle, _local2, 100)) {
_root.b_AutoFire = !_root.b_AutoFire;
_local3.data.b_AutoFire = _root.b_AutoFire;
_root.d_AutoFireToggle = _local2;
}
}
function f_ToggleMusic() {
var _local2 = new Date();
var _local3 = SharedObject.getLocal("GameSettings");
if (d_MusicToggle == undefined) {
d_MusicToggle = new Date(1999, 12, 31, 23, 59, 59, 0);
}
if (_root.f_OverTimeDiff(_root.d_MusicToggle, _local2, 100)) {
if (_root.b_MusicOn == false) {
_root.o_Sounds.gotoAndPlay("GameMusic");
} else {
stopAllSounds();
}
_root.b_MusicOn = !_root.b_MusicOn;
_local3.data.b_MusicOn = _root.b_MusicOn;
_root.d_MusicToggle = _local2;
}
}
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;
_root.d_SoundsToggle = _local2;
}
}
function f_PlaySound(s_Group, s_Sound) {
if (_root.b_SoundsOn) {
if (_root.n_Wave < _root.n_SoundsCutLevel) {
_root[s_Group].gotoAndPlay(s_Sound);
} else if (_root.n_Wave >= _root.n_SoundsCutLevel) {
if ((s_Group == "o_Explosions") && (((s_Sound == "VirusHit") || (s_Sound == "SporeHit")) || (s_Sound == "VirusExplode"))) {
if (_root.n_SoundCounter == 0) {
_root[s_Group].gotoAndPlay(s_Sound);
}
} else {
_root[s_Group].gotoAndPlay(s_Sound);
}
}
}
}
function f_InitialiseVirus(o_Virus, n_XCoord, n_YCoord, n_InitialType) {
o_Virus.n_X = n_XCoord;
o_Virus.n_Y = n_YCoord;
o_Virus.n_Type = n_InitialType;
_root.o_VirusArray[n_XCoord][n_YCoord] = _root.o_VirusTransformLevels[n_InitialType];
if (_root.n_GameLocation == "Game") {
_root.f_CalculatePowerup(n_XCoord, n_YCoord);
}
o_Virus.b_Init = true;
o_Virus.gotoAndPlay("Virus_" + n_InitialType.toString());
}
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 _local3 = (d_DateFrom.getMilliseconds() + (d_DateFrom.getSeconds() * 1000)) + (d_DateFrom.getMinutes() * 60000);
var _local2 = (d_DateFrom.getMilliseconds() + (d_DateTo.getSeconds() * 1000)) + (d_DateTo.getMinutes() * 60000);
if (((_local3 + n_MillisecondsDiff) <= _local2) || (_local3 >= (_local2 + n_MillisecondsDiff))) {
return(true);
}
return(false);
}
var b_Debugging = 0;
var b_LockedSite;
var n_StatsShotsFired;
var n_StatsBadSporesReleased;
var n_StatsGoodSporesReleased;
var n_StatsBlocksKilled;
var n_StatsSporesKilled;
var n_StatsWeaponsFired;
var n_StatsCounter;
var n_StatsMaxCounter = 60;
var n_GameLocation;
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_GunRadians;
var n_GunAngle;
var n_Score;
var n_Wave;
var b_GameOver;
var b_PlayingEnd;
var b_MusicOn;
var d_MusicToggle;
var b_SoundsOn;
var d_SoundsToggle;
var n_InstructionTime = 100;
var b_MainInstructionsShown;
var n_SoundsCutLevel = 30;
var n_SoundCounter;
var n_SoundCounterMax = 4;
var b_AutoFire;
var d_b_AutoFireToggle;
var n_ProjectilesUpperLimit = 60;
var n_ProjectilesCounter;
var o_ProjectileLevels = [150, 175, 200, 225, 250, 275, 350];
var n_ProjectileLevel;
var n_ProjectileDistance;
var n_ProjectileDistanceAdd = 5;
var n_QuadMultiplier = 4;
var n_SplashDamagePerc = 50;
var n_ProjectileRegenLimit;
var n_ProjectileRegen;
var n_VirusArrayWidth = 16;
var n_VirusArrayHeight = 16;
var o_VirusArray;
var n_VirusArrayX = 120;
var n_VirusArrayY = 130;
var n_VirusWidth = 24;
var o_VirusTransformLevels = [0, 200, 300, 400, 500, 600, 900, 1200];
var o_VirusTransformChance = 0.15;
var o_VirusTransformMap = new Array();
var n_VirusGerminateBase = 5;
var n_VirusGerminateBoostPerc = 25;
var n_SporeUpperLimit = 20;
var n_SporeCount;
var n_SporeRotateVelocity = 4;
var n_SporeChancePerc = 10;
var n_SporeGoodChancePerc = 10;
var n_SporeDamageAmount = 100;
var n_SporeStartStrengthGood = 100;
var n_SporeStartStrengthBad = 100;
var n_SporePushBackAmount = 10;
var n_VirusTimer;
var n_VirusTimerIterations;
var n_VirusTimerInterval;
var n_VirusTimerIntervalWaveDec = 2.5;
var n_VirusX;
var n_VirusY;
var n_VirusSCount;
var n_SourceStrength;
var n_UCounter;
var o_Upgrades;
var n_UpgradeTimeBoostPerc = 5;
var n_UpgradeSmartbombMultiplier = 1;
var n_UpgradeRepowerPerc = 25;
var n_UpgradeInstructionTime = 25;
var n_ShieldUpperLimit = 3000;
var n_ShieldValue;
var n_PlayingFieldX = 300;
var n_PlayingFieldY = 300;
var o_PlayingFieldLoader = ["0000008888000000", "0000087777800000", "0008776666778000", "0087766556677800", "0877665445667780", "0776554334556770", "8766543223456678", "8765432112345678", "8765432112345678", "8766543223456678", "0776554334556770", "0877665445667780", "0087766556677800", "0008776666778000", "0000087777800000", "0000008888000000"];
var b_IsInit;
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);
}
__com_mochibot__("572eb371", this, 10301, true);
mochi.MochiServices.connect("670737e0b0137744");
_root.b_LockedSite = _root.f_LockedSite();
if (!_root.b_LockedSite) {
_root.kongregateServices.connect();
MochiAd.showPreGameAd({id:"670737e0b0137744", res:"600x600"});
} else {
o_Loader.gotoAndPlay(2);
}
stop();
Frame 2
if (!_root.b_LockedSite) {
stop();
} else {
this.gotoAndPlay("Menu");
}
Frame 5
_root.n_GameLocation = "Menu";
if (b_IsInit == null) {
if (_root.b_LockedSite) {
this.o_MoreGames._visible = false;
FlowPlayAPI.SetScoreVariable("_root.n_Score");
FlowPlayAPI.SetLevelVariable("_root.n_Wave");
FlowPlayAPI.StartReporting();
}
_root.f_Initialise();
}
if (_root.MenuOverlay == undefined) {
_root.attachMovie("MenuOverlay", "MenuOverlay", 20000000);
}
if (Key.isDown(57)) {
_root.f_ToggleMusic();
}
if (Key.isDown(48)) {
_root.f_ToggleSounds();
}
_root.n_VirusTimer++;
if (_root.n_VirusTimer > (Math.floor(_root.n_VirusTimerInterval) + _root.n_VirusTimerIterations)) {
_root.f_UpWave();
}
if ((_root.n_VirusTimer >= _root.n_VirusTimerInterval) and (_root.n_VirusTimer <= (_root.n_VirusTimerInterval + _root.n_VirusTimerIterations))) {
_root.n_VirusX = 0;
while (_root.n_VirusX < _root.n_VirusArrayWidth) {
_root.n_VirusY = 0;
while (_root.n_VirusY < _root.n_VirusArrayHeight) {
if (_root.o_VirusArray[_root.n_VirusX][_root.n_VirusY] >= _root.o_VirusTransformLevels[1]) {
_root.n_SourceStrength = _root.o_VirusArray[_root.n_VirusX][_root.n_VirusY];
} else {
_root.n_SourceStrength = 0;
}
_root.n_DirectionCounter = Math.floor(Math.random() * 8);
switch (_root.n_DirectionCounter) {
case 0 :
_root.f_Germinate(n_VirusX - 1, n_VirusY - 1, n_SourceStrength);
break;
case 1 :
_root.f_Germinate(n_VirusX - 1, n_VirusY, n_SourceStrength);
break;
case 2 :
_root.f_Germinate(n_VirusX - 1, n_VirusY + 1, n_SourceStrength);
break;
case 3 :
_root.f_Germinate(n_VirusX, n_VirusY - 1, n_SourceStrength);
break;
case 4 :
_root.f_Germinate(n_VirusX, n_VirusY + 1, n_SourceStrength);
break;
case 5 :
_root.f_Germinate(n_VirusX + 1, n_VirusY - 1, n_SourceStrength);
break;
case 6 :
_root.f_Germinate(n_VirusX + 1, n_VirusY, n_SourceStrength);
break;
case 7 :
_root.f_Germinate(n_VirusX + 1, n_VirusY + 1, n_SourceStrength);
}
_root.n_VirusY++;
}
_root.n_VirusX++;
}
}
Frame 6
gotoAndPlay ("Menu");
Frame 7
n_GameLocation = "Game";
if (b_IsInit == null) {
f_Initialise();
}
if (_root.b_MainInstructionsShown) {
_root.n_StatsCounter++;
if (_root.n_StatsCounter > _root.n_StatsMaxCounter) {
_root.f_ReportStatistics();
_root.n_StatsCounter = 0;
}
if (Key.isDown(49)) {
f_ActivateUpgrade(0);
}
if (Key.isDown(50)) {
f_ActivateUpgrade(1);
}
if (Key.isDown(51)) {
f_ActivateUpgrade(2);
}
if (Key.isDown(52)) {
f_ActivateUpgrade(3);
}
if (Key.isDown(53)) {
f_ActivateUpgrade(4);
}
if (Key.isDown(54)) {
f_ActivateUpgrade(5);
}
if (Key.isDown(55)) {
f_ActivateUpgrade(6);
}
if (Key.isDown(32)) {
_root.f_ToggleAutoFire();
}
if (Key.isDown(57)) {
_root.f_ToggleMusic();
}
if (Key.isDown(48)) {
_root.f_ToggleSounds();
}
if (Key.isDown(37) or Key.isDown(65)) {
if (n_GunInertia < n_GunInertiaUpperLimit) {
n_GunInertia = n_GunInertia + n_GunInertiaIncrementVal;
}
}
if (Key.isDown(39) or Key.isDown(68)) {
if (n_GunInertia > n_GunInertiaLowerLimit) {
n_GunInertia = n_GunInertia - n_GunInertiaIncrementVal;
}
}
if (_root.b_AutoFire) {
if ((_root.n_ProjectileRegen == 0) && (_root.o_Upgrades[4][0] == 0)) {
if ((_root.o_Upgrades[2][0] == 0) and (_root.o_Upgrades[0][0] == 0)) {
f_FireProjectile(n_ProjectileLevel, 0, 0);
} else if ((_root.o_Upgrades[0][0] == 1) and (_root.o_Upgrades[2][0] == 1)) {
f_FireProjectile(n_ProjectileLevel, -20 + (Math.random() * 40), 0);
f_FireProjectile(n_ProjectileLevel, -20 + (Math.random() * 40), 0);
f_FireProjectile(n_ProjectileLevel, -20 + (Math.random() * 40), 0);
f_FireProjectile(n_ProjectileLevel, 0, -120);
f_FireProjectile(n_ProjectileLevel, 0, -240);
} else if ((_root.o_Upgrades[0][0] == 0) and (_root.o_Upgrades[2][0] == 1)) {
f_FireProjectile(n_ProjectileLevel, -20 + (Math.random() * 40), 0);
f_FireProjectile(n_ProjectileLevel, -20 + (Math.random() * 40), 0);
f_FireProjectile(n_ProjectileLevel, -20 + (Math.random() * 40), 0);
} else if ((_root.o_Upgrades[0][0] == 1) and (_root.o_Upgrades[2][0] == 0)) {
f_FireProjectile(n_ProjectileLevel, 0, 0);
f_FireProjectile(n_ProjectileLevel, 0, -120);
f_FireProjectile(n_ProjectileLevel, 0, -240);
}
}
}
if (_root.n_ProjectileRegen > 0) {
_root.n_ProjectileRegen--;
}
_root.n_SoundCounter++;
if (_root.n_SoundCounter > _root.n_SoundCounterMax) {
_root.n_SoundCounter = 0;
}
n_VirusTimer++;
if (n_VirusTimer > (Math.floor(n_VirusTimerInterval) + n_VirusTimerIterations)) {
f_UpWave();
}
_root.o_SpawnBar.n_MaxValue = _root.n_VirusTimerInterval;
_root.o_SpawnBar.n_CurrentValue = _root.n_VirusTimer;
_root.o_ShieldBar.n_MaxValue = _root.n_ShieldUpperLimit;
_root.o_ShieldBar.n_CurrentValue = _root.n_ShieldValue;
if (_root.n_ShieldValue <= 0) {
f_EndGame();
}
if ((_root.n_VirusTimer >= _root.n_VirusTimerInterval) and (_root.n_VirusTimer <= (_root.n_VirusTimerInterval + _root.n_VirusTimerIterations))) {
n_VirusX = 0;
while (n_VirusX < n_VirusArrayWidth) {
n_VirusY = 0;
while (n_VirusY < n_VirusArrayHeight) {
if (_root.o_VirusArray[n_VirusX][n_VirusY] >= _root.o_VirusTransformLevels[1]) {
n_SourceStrength = _root.o_VirusArray[n_VirusX][n_VirusY];
} else {
n_SourceStrength = 0;
}
n_DirectionCounter = Math.floor(Math.random() * 8);
switch (n_DirectionCounter) {
case 0 :
_root.f_Germinate(n_VirusX - 1, n_VirusY - 1, n_SourceStrength);
break;
case 1 :
_root.f_Germinate(n_VirusX - 1, n_VirusY, n_SourceStrength);
break;
case 2 :
_root.f_Germinate(n_VirusX - 1, n_VirusY + 1, n_SourceStrength);
break;
case 3 :
_root.f_Germinate(n_VirusX, n_VirusY - 1, n_SourceStrength);
break;
case 4 :
_root.f_Germinate(n_VirusX, n_VirusY + 1, n_SourceStrength);
break;
case 5 :
_root.f_Germinate(n_VirusX + 1, n_VirusY - 1, n_SourceStrength);
break;
case 6 :
_root.f_Germinate(n_VirusX + 1, n_VirusY, n_SourceStrength);
break;
case 7 :
_root.f_Germinate(n_VirusX + 1, n_VirusY + 1, n_SourceStrength);
}
n_VirusY++;
}
n_VirusX++;
}
}
}
if (_root.o_Upgrades[4][0] == 0) {
if (((((n_GunInertia != 0) and (!Key.isDown(37))) and (!Key.isDown(65))) and (!Key.isDown(39))) and (!Key.isDown(68))) {
if (n_GunInertia > 0) {
n_GunInertia = n_GunInertia - n_GunInertiaDecrementVal;
} else if (n_GunInertia < 0) {
n_GunInertia = n_GunInertia + n_GunInertiaDecrementVal;
}
if (((n_GunInertia > 0) and (n_GunInertia <= n_GunInertiaDecrementVal)) or ((n_GunInertia < 0) and (n_GunInertia >= (n_GunInertiaDecrementVal * -1)))) {
n_GunInertia = 0;
}
}
n_GunXPos = f_DegreeTransform(n_GunXPos, n_GunInertia);
_root.o_Gun._rotation = n_GunXPos - 90;
n_GunRadians = n_GunXPos / 57.2957795130823;
_root.o_Gun._x = _root.n_PlayingFieldX + ((80 * (Math.cos(n_GunRadians) * Math.PI)) * -1);
_root.o_Gun._y = _root.n_PlayingFieldY + ((80 * Math.sin(n_GunRadians * -1)) * Math.PI);
if (_root.o_Upgrades[0][0] == 1) {
_root.o_Gun_120._rotation = n_GunXPos - 210;
n_GunRadians = (n_GunXPos - 120) / 57.2957795130823;
_root.o_Gun_120._x = _root.n_PlayingFieldX + ((80 * (Math.cos(n_GunRadians) * Math.PI)) * -1);
_root.o_Gun_120._y = _root.n_PlayingFieldY + ((80 * Math.sin(n_GunRadians * -1)) * Math.PI);
_root.o_Gun_240._rotation = n_GunXPos - 330;
n_GunRadians = (n_GunXPos - 240) / 57.2957795130823;
_root.o_Gun_240._x = _root.n_PlayingFieldX + ((80 * (Math.cos(n_GunRadians) * Math.PI)) * -1);
_root.o_Gun_240._y = _root.n_PlayingFieldY + ((80 * Math.sin(n_GunRadians * -1)) * Math.PI);
} else {
_root.o_Gun_120._x = -100;
_root.o_Gun_120._y = -100;
_root.o_Gun_240._x = -100;
_root.o_Gun_240._y = -100;
}
}
Frame 8
if (b_GameOver == false) {
gotoAndPlay ("Start");
}
Frame 9
if (_root.b_PlayingEnd == undefined) {
_root.b_PlayingEnd = true;
o_EndGameOverlay.gotoAndPlay("EndGameAnimation");
}
Frame 10
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;
}
if ((_root.n_Wave > Shared.data.n_Wave) || (o_Settings.data.n_Wave == undefined)) {
o_Settings.data.n_Wave = _root.n_Wave;
}
this.o_FinalScore.text = _root.n_Score.toString();
this.o_FinalWave.text = _root.n_Wave.toString();
if (!_root.b_LockedSite) {
o_LoadingScores._visible = true;
if (_root._url.toLowerCase().indexOf("kongregate.com") != -1) {
_root.kongregateScores.submit(_root.n_Score);
_root.kongregateStats.submit("Score", _root.n_Score);
_root.kongregateStats.submit("Wave", _root.n_Wave);
_root.kongregateStats.submit("ShotsFired", _root.n_StatsShotsFired);
_root.kongregateStats.submit("BadSporesReleased", _root.n_StatsBadSporesReleased);
_root.kongregateStats.submit("GoodSporesReleased", _root.n_StatsGoodSporesReleased);
_root.kongregateStats.submit("BlocksKilled", _root.n_StatsBlocksKilled);
_root.kongregateStats.submit("SporesKilled", _root.n_StatsSporesKilled);
_root.kongregateStats.submit("WeaponsFired", _root.n_StatsWeaponsFired);
}
mochi.MochiScores.showLeaderboard({boardID:"6081878d5be6f8d7", score:_root.n_Score});
} else {
o_LoadingScores._visible = false;
}
stop();
Frame 12
gotoAndPlay ("Menu");
Frame 13
mochi.MochiScores.showLeaderboard({boardID:"6081878d5be6f8d7", score:_root.n_Score});
Frame 14
gotoAndPlay ("Menu");
Symbol 4 MovieClip [SmartBomb] Frame 1
_root.f_PlaySound("o_Sounds", "Smartbomb");
Symbol 4 MovieClip [SmartBomb] Frame 3
_root.f_BombArea(9, _root.o_ProjectileLevels[_root.o_ProjectileLevels.length - 1]);
Symbol 4 MovieClip [SmartBomb] Frame 6
_root.f_BombArea(8, _root.o_ProjectileLevels[_root.o_ProjectileLevels.length - 1]);
Symbol 4 MovieClip [SmartBomb] Frame 9
_root.f_BombArea(7, _root.o_ProjectileLevels[_root.o_ProjectileLevels.length - 1]);
Symbol 4 MovieClip [SmartBomb] Frame 12
_root.f_BombArea(6, _root.o_ProjectileLevels[_root.o_ProjectileLevels.length - 1]);
Symbol 4 MovieClip [SmartBomb] Frame 15
_root.f_BombArea(5, _root.o_ProjectileLevels[_root.o_ProjectileLevels.length - 1]);
Symbol 4 MovieClip [SmartBomb] Frame 18
_root.f_BombArea(4, _root.o_ProjectileLevels[_root.o_ProjectileLevels.length - 1]);
Symbol 4 MovieClip [SmartBomb] Frame 21
_root.f_BombArea(3, _root.o_ProjectileLevels[_root.o_ProjectileLevels.length - 1]);
Symbol 4 MovieClip [SmartBomb] Frame 24
_root.f_BombArea(2, _root.o_ProjectileLevels[_root.o_ProjectileLevels.length - 1]);
Symbol 4 MovieClip [SmartBomb] Frame 26
_root.f_BombArea(1, _root.o_ProjectileLevels[_root.o_ProjectileLevels.length - 1]);
Symbol 4 MovieClip [SmartBomb] Frame 30
this.removeMovieClip();
Symbol 21 MovieClip [Powerups] Frame 2
this.stop();
Symbol 21 MovieClip [Powerups] Frame 4
this.stop();
Symbol 21 MovieClip [Powerups] Frame 6
this.stop();
Symbol 21 MovieClip [Powerups] Frame 8
this.stop();
Symbol 21 MovieClip [Powerups] Frame 10
this.stop();
Symbol 21 MovieClip [Powerups] Frame 12
this.stop();
Symbol 21 MovieClip [Powerups] Frame 14
this.stop();
Symbol 21 MovieClip [Powerups] Frame 16
this.stop();
Symbol 21 MovieClip [Powerups] Frame 18
this.stop();
Symbol 21 MovieClip [Powerups] Frame 20
this.stop();
Symbol 21 MovieClip [Powerups] Frame 22
this.stop();
Symbol 37 MovieClip [MenuVirus] Frame 1
function GotoFrame() {
if (!b_Die) {
gotoAndPlay("Virus_" + n_Type.toString());
} else {
gotoAndPlay ("Virus_Die");
}
}
var b_Init;
var n_Type;
var n_PowerupType;
var n_DirectionCounter;
var n_X;
var n_Y;
this.onEnterFrame = function () {
var _local2;
var _local3 = n_Type;
var _local4 = _root.o_VirusArray[n_X][n_Y];
var _local5 = Math.random() * 100;
if (b_Init and _root.b_IsInit) {
if (_local4 >= _root.o_VirusTransformLevels[_root.o_VirusTransformLevels.length - 1]) {
n_Type = 0;
_root.o_VirusArray[n_X][n_Y] = 0;
b_Die = true;
}
_local2 = 0;
while (_local2 < _root.o_VirusTransformLevels.length) {
if (_root.o_VirusTransformLevels[_local2] <= _local4) {
_local3 = _local2;
}
_local2++;
}
if (_local3 != n_Type) {
n_Type = _local3;
}
}
};
Symbol 37 MovieClip [MenuVirus] Frame 2
this.GotoFrame();
Symbol 37 MovieClip [MenuVirus] Frame 4
this.GotoFrame();
Symbol 37 MovieClip [MenuVirus] Frame 6
this.GotoFrame();
Symbol 37 MovieClip [MenuVirus] Frame 8
this.GotoFrame();
Symbol 37 MovieClip [MenuVirus] Frame 10
this.GotoFrame();
Symbol 37 MovieClip [MenuVirus] Frame 12
this.GotoFrame();
Symbol 37 MovieClip [MenuVirus] Frame 14
this.GotoFrame();
Symbol 37 MovieClip [MenuVirus] Frame 15
Symbol 37 MovieClip [MenuVirus] Frame 23
b_Die = false;
gotoAndPlay ("Virus_0");
Symbol 38 MovieClip [Virus] Frame 1
function GotoFrame() {
if (!b_Die) {
if (n_Type != 0) {
this.o_PowerUps._visible = true;
} else {
this.o_PowerUps._visible = false;
}
gotoAndPlay("Virus_" + n_Type.toString());
} else {
this.o_PowerUps.gotoAndPlay("Powerup_0");
gotoAndPlay ("Virus_Die");
}
}
var b_Init;
var n_Type;
var n_PowerupType;
var n_DirectionCounter;
var n_Strength;
var n_X;
var n_Y;
this.onEnterFrame = function () {
var _local2;
var _local3 = n_Type;
var _local4 = _root.o_VirusArray[n_X][n_Y];
var _local5 = Math.random() * 100;
if ((b_Init and _root.b_IsInit) and (_root.b_GameOver == false)) {
if (_local4 >= _root.o_VirusTransformLevels[_root.o_VirusTransformLevels.length - 1]) {
n_Type = 0;
_root.o_VirusArray[n_X][n_Y] = 0;
if (((_local5 >= 0) and (_local5 < _root.n_SporeChancePerc)) and (_root.b_GameOver == false)) {
_root.f_ShootSpore(n_X, n_Y, 0, 0);
}
b_Die = true;
}
_local2 = 0;
while (_local2 < _root.o_VirusTransformLevels.length) {
if (_root.o_VirusTransformLevels[_local2] <= _local4) {
_local3 = _local2;
}
_local2++;
}
if (_local3 != n_Type) {
n_Type = _local3;
}
}
};
Symbol 38 MovieClip [Virus] Frame 2
this.GotoFrame();
Symbol 38 MovieClip [Virus] Frame 4
this.GotoFrame();
Symbol 38 MovieClip [Virus] Frame 6
this.GotoFrame();
Symbol 38 MovieClip [Virus] Frame 8
this.GotoFrame();
Symbol 38 MovieClip [Virus] Frame 10
this.GotoFrame();
Symbol 38 MovieClip [Virus] Frame 12
this.GotoFrame();
Symbol 38 MovieClip [Virus] Frame 14
this.GotoFrame();
Symbol 38 MovieClip [Virus] Frame 15
_root.f_CalculatePowerup(n_X, n_Y);
_root.f_PlaySound("o_Explosions", "VirusExplode");
Symbol 38 MovieClip [Virus] Frame 23
b_Die = false;
if (_root.b_GameOver == true) {
this.stop();
} else {
n_Type = 0;
gotoAndPlay ("Virus_0");
}
Symbol 46 MovieClip [Projectile] Frame 1
function GotoFrame() {
if (_root.o_Upgrades[6][0] == 1) {
gotoAndPlay ("Projectile_Quad");
} else {
gotoAndPlay ("Projectile_Normal");
}
}
var n_XAngle;
var n_XAngle;
var n_VWidth;
var n_VX;
var n_VY;
var n_SporeCounter;
var o_Spore;
var n_SporeHalfWidth;
var n_Strength;
var n_Timer;
var b_Init;
this.onEnterFrame = function () {
var _local6;
var _local3;
var _local5;
var _local4;
if (b_Init != null) {
if (n_Timer > 0) {
this._x = this._x + n_XAngle;
this._y = this._y + n_YAngle;
this.n_Timer--;
} else {
this.removeMovieClip();
}
n_VWidth = _root.n_VirusArrayWidth * _root.n_VirusWidth;
}
n_SporeHalfWidth = _root.n_VirusWidth / 2;
n_SporeCounter = 0;
while (n_SporeCounter <= _root.n_SporeUpperLimit) {
o_Spore = _root["Spore_" + n_SporeCounter.toString()];
if (o_Spore != undefined) {
if (((((o_Spore._x - n_SporeHalfWidth) <= this._x) and ((o_Spore._x + n_SporeHalfWidth) >= this._x)) and ((o_Spore._y - n_SporeHalfWidth) <= this._y)) and ((o_Spore._y + n_SporeHalfWidth) >= this._y)) {
n_Strength = _root.f_DamageSpore(o_Spore, n_Strength);
if (n_Strength <= 0) {
this.removeMovieClip();
}
}
}
n_SporeCounter++;
}
if ((((this._x >= _root.n_VirusArrayX) and (this._x <= (n_VWidth + _root.n_VirusArrayX))) and (this._y >= _root.n_VirusArrayY)) and (this._y <= (n_VWidth + _root.n_VirusArrayY))) {
n_VX = Math.floor((this._x - _root.n_VirusArrayX) / _root.n_VirusWidth);
n_VY = Math.floor((this._y - _root.n_VirusArrayY) / _root.n_VirusWidth);
if (_root.o_PlayingFieldLoader[n_VY].charAt(n_VX) != "0") {
if (_root.o_VirusArray[n_VX][n_VY] >= _root.o_VirusTransformLevels[1]) {
if (_root.o_Upgrades[6][0] == 1) {
_local6 = _root.o_ProjectileLevels[_root.n_ProjectileLevel] * _root.n_QuadMultiplier;
} else {
_local6 = _root.o_ProjectileLevels[_root.n_ProjectileLevel];
}
n_Strength = _root.f_DamageVirus(n_VX, n_VY, _local6);
if (_root.o_Upgrades[3][0] == 1) {
_local4 = _root[(("Virus_" + n_VX.toString()) + "_") + n_VY.toString()];
_local5 = _root.attachMovie("AreaOfEffect", (("AreaOfEffect_" + n_VX.toString()) + "_") + n_VY.toString(), (100000 + (n_X * 100)) + n_Y);
_local5._x = _local4._x + (_local4._width / 2);
_local5._y = _local4._y + (_local4._height / 2);
_local5.gotoAndPlay(1);
_local3 = (_local6 / 100) * _root.n_SplashDamagePerc;
_root.f_DamageVirus(n_VX - 1, n_VY - 1, _local3);
_root.f_DamageVirus(n_VX, n_VY - 1, _local3);
_root.f_DamageVirus(n_VX + 1, n_VY - 1, _local3);
_root.f_DamageVirus(n_VX - 1, n_VY, _local3);
_root.f_DamageVirus(n_VX + 1, n_VY, _local3);
_root.f_DamageVirus(n_VX - 1, n_VY + 1, _local3);
_root.f_DamageVirus(n_VX - 1, n_VY + 1, _local3);
_root.f_DamageVirus(n_VX - 1, n_VY + 1, _local3);
}
if (n_Strength <= 0) {
this.removeMovieClip();
}
}
}
}
};
Symbol 46 MovieClip [Projectile] Frame 3
this.GotoFrame();
Symbol 46 MovieClip [Projectile] Frame 4
this.GotoFrame();
Symbol 56 MovieClip [Spore] Frame 1
var n_Angle;
var n_PowerupType;
var n_XVelocity;
var n_YVelocity;
var n_Type;
this.onEnterFrame = function () {
if (n_Strength <= 0) {
_root.n_StatsSporesKilled++;
if ((n_PowerupType > 0) && (n_PowerupType != undefined)) {
_root.f_CollectPowerup(n_PowerupType - 1);
}
this.removeMovieClip();
}
if (n_Angle == undefined) {
n_Angle = 0;
}
n_Angle = _root.f_DegreeTransform(n_Angle, _root.n_SporeRotateVelocity);
this._rotation = n_Angle;
this.o_Powerups._rotation = n_Angle * -1;
if (((n_XVelocity != undefined) && (n_YVelocity != undefined)) && (_root.o_Upgrades[5][0] == 0)) {
this._x = this._x + n_XVelocity;
this._y = this._y + n_YVelocity;
}
var _local4;
var _local3;
_local4 = this._x - _root.o_Arena._x;
_local3 = this._y - _root.o_Arena._y;
if (Math.sqrt((_local4 * _local4) + (_local3 * _local3)) > 250) {
if ((n_Type == 0) or (n_Type == undefined)) {
_root.f_DoDamageDisplay();
_root.n_ShieldValue = _root.n_ShieldValue - _root.n_SporeDamageAmount;
}
this.removeMovieClip();
}
};
Symbol 56 MovieClip [Spore] Frame 15
gotoAndPlay ("SporeStart_0");
Symbol 56 MovieClip [Spore] Frame 29
gotoAndPlay ("SporeStart_1");
Symbol 61 MovieClip [Messages] Frame 34
this.removeMovieClip();
Symbol 74 Button [Start Game]
on (release) {
_root.f_StartGame();
}
Symbol 83 Button [MusicOff]
on (release) {
_root.f_ToggleMusic();
this.gotoAndPlay("On");
}
Symbol 87 Button [MusicOn]
on (release) {
_root.f_ToggleMusic();
this.gotoAndPlay("Off");
}
Symbol 88 MovieClip [MusicOnOff] Frame 1
if (_root.b_MusicOn == false) {
this.gotoAndPlay("Off");
} else {
this.gotoAndPlay("On");
}
Symbol 88 MovieClip [MusicOnOff] Frame 3
if (_root.b_MusicOn) {
this.gotoAndPlay("On");
} else {
this.gotoAndPlay("Off");
}
Symbol 88 MovieClip [MusicOnOff] Frame 5
if (_root.b_MusicOn) {
this.gotoAndPlay("On");
} else {
this.gotoAndPlay("Off");
}
Symbol 92 Button [SoundsOff]
on (release) {
_root.f_ToggleSounds();
this.gotoAndPlay("On");
}
Symbol 96 Button [SoundsOn]
on (release) {
_root.f_ToggleSounds();
this.gotoAndPlay("Off");
}
Symbol 97 MovieClip [SoundsOnOff] Frame 1
if (_root.b_SoundsOn == false) {
this.gotoAndPlay("Off");
} else {
this.gotoAndPlay("On");
}
Symbol 97 MovieClip [SoundsOnOff] Frame 3
if (_root.b_SoundsOn) {
this.gotoAndPlay("On");
} else {
this.gotoAndPlay("Off");
}
Symbol 97 MovieClip [SoundsOnOff] Frame 5
if (_root.b_SoundsOn) {
this.gotoAndPlay("On");
} else {
this.gotoAndPlay("Off");
}
Symbol 100 Button [Highscores]
on (release) {
_root.f_ShowScores();
}
Symbol 101 MovieClip [MenuOverlay] Frame 1
var o_Settings = SharedObject.getLocal("GameSettings");
if (o_Settings.data.n_Score != undefined) {
this.o_BestScore.text = o_Settings.data.n_Score;
}
if (o_Settings.data.n_Wave != undefined) {
this.o_BestWave.text = o_Settings.data.n_Wave;
}
Symbol 101 MovieClip [MenuOverlay] Frame 2
stop();
Symbol 116 MovieClip [BeamLaser] Frame 1
var b_IsInit;
var o_LocalVirusArray;
this.onEnterFrame = function () {
var _local4;
var _local3;
var _local5;
var _local6;
var _local12;
var _local10;
var _local9;
var _local7;
var _local8;
var _local11;
if (_root.o_Upgrades[4][0] == 0) {
this.removeMovieClip();
}
if (b_IsInit == undefined) {
_local6 = 0;
this.o_LocalVirusArray = new Array();
_local4 = 0;
while (_local4 < _root.n_VirusArrayWidth) {
_local3 = 0;
while (_local3 < _root.n_VirusArrayHeight) {
if ((_root.o_PlayingFieldLoader[_local3].charAt(_local4) != "0") && (_root.o_VirusArray[_local4][_local3] >= _root.o_VirusTransformLevels[1])) {
_local5 = _root[(("Virus_" + _local4.toString()) + "_") + _local3.toString()];
_local10 = _local5._x;
_local9 = _local5._y;
_local7 = _local5._x + _root.n_VirusWidth;
_local8 = _local5._y + _root.n_VirusWidth;
if (((this.hitTest(_local10, _local9, true) || (this.hitTest(_local7, _local9, true))) || (this.hitTest(_local10, _local8, true))) || (this.hitTest(_local7, _local8, true))) {
this.o_LocalVirusArray[_local6] = (_local4.toString() + "|") + _local3.toString();
_local6++;
}
}
_local3++;
}
_local4++;
}
_local11 = 0;
while (_local11 <= _root.n_SporeUpperLimit) {
o_Spore = _root["Spore_" + _local11.toString()];
if (o_Spore != undefined) {
if (this.hitTest(o_Spore._x, o_Spore._y, true)) {
_root.f_DamageSpore(o_Spore, _root.o_ProjectileLevels[_root.n_ProjectileLevel]);
}
}
_local11++;
}
b_IsInit = false;
} else {
_local6 = 0;
while (_local6 < this.o_LocalVirusArray.length) {
_local12 = this.o_LocalVirusArray[_local6].split("|");
_local4 = _local12[0];
_local3 = _local12[1];
if (_root.o_VirusArray[_local4][_local3] >= _root.o_VirusTransformLevels[1]) {
if (_root.o_Upgrades[6][0] == 1) {
_root.f_DamageVirus(_local4, _local3, _root.o_ProjectileLevels[_root.n_ProjectileLevel] * _root.n_QuadMultiplier);
} else {
_root.f_DamageVirus(_local4, _local3, _root.o_ProjectileLevels[_root.n_ProjectileLevel]);
}
}
_local6++;
}
}
};
Symbol 116 MovieClip [BeamLaser] Frame 9
if (_root.o_Upgrades[4][0] == 1) {
gotoAndPlay ("BeamStart");
}
Symbol 116 MovieClip [BeamLaser] Frame 10
this.removeMovieClip();
Symbol 124 MovieClip [AreaOfEffect] Frame 8
this.removeMovieClip();
Symbol 132 MovieClip [Loader] Frame 1
Symbol 132 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 132 MovieClip [Loader] Frame 3
gotoAndPlay ("Looper");
Symbol 132 MovieClip [Loader] Frame 4
if (!_root.b_LockedSite) {
} else {
_root.gotoAndPlay("Menu");
}
stop();
Symbol 275 MovieClip [__Packages.FlowPlayAPI] Frame 0
class FlowPlayAPI
{
static var interval, score_path, score_var, level_path, level_var;
function FlowPlayAPI () {
}
static function StartReporting() {
if (interval) {
SendError("StartReporting() - Reporting is already on!");
} else {
interval = setInterval(SendUpdate, 1000);
trace("[FLOWPLAY API] Service started. Sending updates every second");
}
}
static function StopReporting() {
if (interval) {
clearInterval(interval);
interval = undefined;
trace("[FLOWPLAY API] Service Stopped.");
} else {
SendError("StopReporting() - Reporting wasn't started!");
}
}
static function SendUpdate() {
var _local1 = GetScore();
var _local2 = GetLevel();
flash.external.ExternalInterface.call("fpBroadcastScore", _local1);
flash.external.ExternalInterface.call("fpBroadcastLevel", _local2);
}
static function GetScore() {
if (score_var and score_path) {
return(score_path[score_var]);
}
if (score) {
return(score);
}
return(0);
}
static function GetLevel() {
if (level_var and level_path) {
return(level_path[level_var]);
}
if (level) {
return(level);
}
return(0);
}
static function SetScore(s) {
if (score_var) {
SendError("You cannot set scores once you have used the SetScoreVariable() function.");
} else {
score = s;
}
}
static function SetLevel(l) {
if (score_var) {
SendError("You cannot set levels once you have used the SetLevelVariable() function.");
} else {
level = l;
}
}
static function UpdateScore(s) {
if (score_var) {
SendError("You cannot update scores once you have used the SetScoreVariable() function.");
} else {
score = score + s;
}
}
static function UpdateLevel(l) {
if (score_var) {
SendError("You cannot update levels once you have used the SetLevelVariable() function.");
} else {
level = level + l;
}
}
static function SetScoreVariable(v) {
var _local1 = ValidatePath(v);
if (_local1) {
score_var = _local1.v;
score_path = _local1.p;
}
}
static function SetLevelVariable(v) {
var _local1 = ValidatePath(v);
if (_local1) {
level_var = _local1.v;
level_path = _local1.p;
}
}
static function ValidatePath(p) {
var _local3 = p.split(".");
if ((_local3[0] != "_root") and (_local3[0] != "_global")) {
SendError((("Invalid variable. Please define the full variable path, ie _root." + p) + " or _global.") + p);
return(null);
}
var _local4 = new Object();
_local4.v = _local3.pop();
var _local6 = _local3.unshift();
if (_local6 == "_global") {
_local4.p = ReadPath(_global, _local3);
} else {
_local4.p = ReadPath(_root, _local3);
}
if (_local4.p[_local4.v] == undefined) {
SendError(p + " does not exist!");
} else {
return(_local4);
}
}
static function ReadPath(object, path) {
var _local1 = path.shift();
if (path.length < 1) {
return(object[_local1]);
}
return(ReadPath(object[_local1], path));
}
static function SendError(err) {
trace("[FLOWPLAY API] Error: " + err);
}
static function ShowScores() {
trace((("[FLOWPLAY API] Current Score: " + GetScore()) + ", Current Level: ") + GetLevel());
}
static var level = 0;
static var score = 0;
static var loop = 0;
}
Symbol 276 MovieClip [__Packages.mochi.MochiServices] Frame 0
class mochi.MochiServices
{
static var _id, _container, _clip, _sendChannelName, _rcvChannelName, __get__comChannelName, onError, _listenChannel, _rcvChannel, _loader, _loaderListener, _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("1.2");
}
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";
_rcvChannelName = val;
initComChannels();
}
}
//return(__get__comChannelName());
}
static function get connected() {
return(_connected);
}
static function connect(id, clip, onError) {
if ((!_connected) && (_clip == undefined)) {
trace("MochiServices Connecting...");
_connecting = true;
init(id, clip);
}
if (onError != undefined) {
mochi.MochiServices.onError = onError;
} else if (mochi.MochiServices.onError == undefined) {
mochi.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();
_rcvChannel.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 _local2 = "_mochiservices_com_" + id;
if (_clip != null) {
return(_clip);
}
if (!isNetworkAvailable) {
return(null);
}
allowDomains(_gatewayURL);
_clip = clip.createEmptyMovieClip(_local2, 10336, false);
_loader = new MovieClipLoader();
if (_loaderListener.waitInterval != null) {
clearInterval(_loaderListener.waitInterval);
}
_loaderListener = {};
_loaderListener.onLoadError = function (target_mc, errorCode, httpStatus) {
trace("MochiServices could not load.");
mochi.MochiServices.disconnect();
mochi.MochiServices.onError.apply(null, [errorCode]);
};
_loaderListener.onLoadStart = function (target_mc) {
this.isLoading = true;
};
_loaderListener.startTime = getTimer();
_loaderListener.wait = function () {
if ((getTimer() - this.startTime) > 10000) {
if (!this.isLoading) {
mochi.MochiServices.disconnect();
mochi.MochiServices.onError.apply(null, ["IOError"]);
}
clearInterval(this.waitInterval);
}
};
_loaderListener.waitInterval = setInterval(_loaderListener, "wait", 1000);
_loader.addListener(_loaderListener);
_loader.loadClip(_gatewayURL, _clip);
_sendChannel = new LocalConnection();
_sendChannel._queue = [];
_rcvChannel = new LocalConnection();
_rcvChannel.allowDomain = function (d) {
return(true);
};
_rcvChannel.allowInsecureDomain = _rcvChannel.allowDomain;
_rcvChannel._nextcallbackID = 0;
_rcvChannel._callbacks = {};
listen();
return(_clip);
}
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.MochiServices.__set__comChannelName(args.newChannel);
};
_listenChannel.allowDomain = function (d) {
return(true);
};
_listenChannel.allowInsecureDomain = _listenChannel.allowDomain;
_listenChannel.connect(_listenChannelName);
trace("Waiting for MochiAds services to connect...");
}
static function initComChannels() {
if (!_connected) {
_sendChannel.onStatus = function (infoObject) {
mochi.MochiServices.onStatus(infoObject);
};
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"});
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"registerGame", id:_id, clip:_clip, version:getVersion()});
_rcvChannel.onStatus = function (infoObject) {
mochi.MochiServices.onStatus(infoObject);
};
_rcvChannel.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];
};
_rcvChannel.onError = function () {
mochi.MochiServices.onError.apply(null, ["IOError"]);
};
_rcvChannel.connect(_rcvChannelName);
trace("connected!");
_connecting = false;
_connected = true;
_listenChannel.close();
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 = _rcvChannel._callbacks[_local1.callbackID];
}
delete _rcvChannel._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 (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:_rcvChannel._nextcallbackID});
} else {
if ((_clip == undefined) || (!_connecting)) {
onError.apply(null, ["NotConnected"]);
handleError(args, callbackObject, callbackMethod);
flush(true);
return(undefined);
}
_sendChannel._queue.push({methodName:methodName, args:args, callbackID:_rcvChannel._nextcallbackID});
}
_rcvChannel._callbacks[_rcvChannel._nextcallbackID] = {callbackObject:callbackObject, callbackMethod:callbackMethod};
_rcvChannel._nextcallbackID++;
}
static var _gatewayURL = "http://www.mochiads.com/static/lib/services/services.swf";
static var _listenChannelName = "__mochiservices";
static var _connecting = false;
static var _connected = false;
}
Symbol 277 MovieClip [__Packages.MochiAd] Frame 0
class MochiAd
{
function MochiAd () {
}
static function getVersion() {
return("2.1");
}
static function showPreGameAd(options) {
var _local27 = {clip:_root, ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:16747008, background:16777161, outline:13994812, ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}};
options = _parseOptions(options, _local27);
var clip = options.clip;
var _local23 = 11000;
var _local26 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local14 = _getRes(options);
var _local4 = _local14[0];
var _local13 = _local14[1];
mc._x = _local4 * 0.5;
mc._y = _local13 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk._x = _local4 * -0.5;
chk._y = _local13 * -0.5;
var _local7 = chk.createEmptyMovieClip("_mochiad_bar", 4);
_local7._x = 10;
_local7._y = _local13 - 20;
var _local22 = options.color;
delete options.color;
var _local19 = options.background;
delete options.background;
var _local24 = options.outline;
delete options.outline;
var _local5 = _local7.createEmptyMovieClip("_outline", 1);
_local5.beginFill(_local19);
_local5.moveTo(0, 0);
_local5.lineTo(_local4 - 20, 0);
_local5.lineTo(_local4 - 20, 10);
_local5.lineTo(0, 10);
_local5.lineTo(0, 0);
_local5.endFill();
var _local3 = _local7.createEmptyMovieClip("_inside", 2);
_local3.beginFill(_local22);
_local3.moveTo(0, 0);
_local3.lineTo(_local4 - 20, 0);
_local3.lineTo(_local4 - 20, 10);
_local3.lineTo(0, 10);
_local3.lineTo(0, 0);
_local3.endFill();
_local3._xscale = 0;
var _local6 = _local7.createEmptyMovieClip("_outline", 3);
_local6.lineStyle(0, _local24, 100);
_local6.moveTo(0, 0);
_local6.lineTo(_local4 - 20, 0);
_local6.lineTo(_local4 - 20, 10);
_local6.lineTo(0, 10);
_local6.lineTo(0, 0);
chk.ad_msec = _local23;
chk.ad_timeout = _local26;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = function (width, height) {
};
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec;
};
chk.onEnterFrame = function () {
var _local6 = this._parent._parent;
var _local12 = this._parent._mochiad_ctr;
var _local5 = getTimer() - this.started;
var _local3 = false;
var _local4 = _local6.getBytesTotal();
var _local8 = _local6.getBytesLoaded();
var _local10 = (100 * _local8) / _local4;
var _local11 = (100 * _local5) / chk.ad_msec;
var _local9 = this._mochiad_bar._inside;
var _local2 = Math.min(100, Math.min(_local10 || 0, _local11));
_local2 = Math.max(this.last_pcnt, _local2);
this.last_pcnt = _local2;
_local9._xscale = _local2;
if (!chk.showing) {
var _local7 = _local12.getBytesTotal();
if ((_local7 > 0) || (typeof(_local7) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local5 > chk.ad_timeout) {
_local3 = true;
}
}
if (_local5 > chk.ad_msec) {
_local3 = true;
}
if (((_local4 > 0) && (_local8 >= _local4)) && (_local3)) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
}
}
};
}
static function showInterLevelAd(options) {
var _local13 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}};
options = _parseOptions(options, _local13);
var clip = options.clip;
var _local10 = 11000;
var _local12 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local5 = _getRes(options);
var _local14 = _local5[0];
var _local11 = _local5[1];
mc._x = _local14 * 0.5;
mc._y = _local11 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_msec = _local10;
chk.ad_timeout = _local12;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = function (width, height) {
};
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec - 250;
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
_local2 = true;
}
}
if (_local4 > chk.ad_msec) {
_local2 = true;
}
if (_local2) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
}
}
};
}
static function showTimedAd(options) {
showInterLevelAd(options);
}
static function showPreloaderAd(options) {
showPreGameAd(options);
}
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 _loadCommunicator(options) {
var _local26 = {clip:_root, com_server:"http://x.mochiads.com/com/1/", method:"loadCommunicator", depth:10337, id:"_UNKNOWN_"};
options = _parseOptions(options, _local26);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local18 = options.clip;
var _local20 = "_mochiad_com_" + options.id;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local18[_local20]) {
return(_local18[_local20].lc);
}
var _local21 = options.com_server + options.id;
_allowDomains(_local21);
delete options.id;
delete options.com_server;
var _local25 = options.depth;
delete options.depth;
var _local17 = _local18.createEmptyMovieClip(_local20, _local25);
var _local11 = _local17.createEmptyMovieClip("_mochiad_com", 1);
for (var _local15 in options) {
_local11[_local15] = options[_local15];
}
var _local6 = new LocalConnection();
var _local16 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local6.mc = _local17;
_local6.name = _local16;
_local6.allowDomain = function (d) {
return(true);
};
_local6.allowInsecureDomain = _local6.allowDomain;
_local6.connect(_local16);
_local17.lc = _local6;
_local11.lc = _local16;
_local6._id = 0;
_local6._queue = [];
_local6.rpcResult = function (cb_arg) {
var _local8 = parseInt(cb_arg);
var _local4 = this._callbacks[_local8];
if (!_local4) {
return(undefined);
}
delete this._callbacks[_local8];
var _local5 = [];
var _local3 = 2;
while (_local3 < _local4.length) {
_local5.push(_local4[_local3]);
_local3++;
}
_local3 = 1;
while (_local3 < arguments.length) {
_local5.push(arguments[_local3]);
_local3++;
}
var _local6 = _local4[1];
var _local7 = _local4[0];
if (_local7 && (typeof(_local6) == "string")) {
_local6 = _local7[_local6];
}
if (_local6) {
_local6.apply(_local7, _local5);
}
};
_local6._didConnect = function (endpoint) {
this._endpoint = endpoint;
var _local4 = this._queue;
delete this._queue;
var _local5 = this.doSend;
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = _local4[_local2];
_local5.apply(this, _local3);
_local2++;
}
};
_local6.doSend = function (args, cbobj, cbfn) {
if (this._endpoint == null) {
var _local4 = [];
var _local3 = 0;
while (_local3 < arguments.length) {
_local4.push(arguments[_local3]);
_local3++;
}
this._queue.push(_local4);
return(undefined);
}
this._id = this._id + 1;
var _local5 = this._id;
if ((cbfn === undefined) || (cbfn === null)) {
cbfn = cbobj;
}
this._callbacks[_local5] = [cbobj, cbfn];
var _local7 = new LocalConnection();
var _local9 = _local7.send(this._endpoint, "rpc", _local5, args);
};
_local6._callbacks = {};
_local6._callbacks[0] = [_local6, "_didConnect"];
_local11.st = getTimer();
_local11.loadMovie(_local21 + ".swf", "POST");
return(_local6);
}
static function fetchHighScores(options, callbackObj, callbackMethod) {
var _local1 = _loadCommunicator({id:options.id});
if (!_local1) {
return(false);
}
var _local4 = ["fetchHighScores", options];
_local1.doSend(["fetchHighScores", options], callbackObj, callbackMethod);
return(true);
}
static function sendHighScore(options, callbackObj, callbackMethod) {
var _local1 = _loadCommunicator({id:options.id});
if (!_local1) {
return(false);
}
var _local4 = ["sendHighScore", options];
_local1.doSend(["sendHighScore", options], callbackObj, callbackMethod);
return(true);
}
static function load(options) {
var _local13 = {clip:_root, server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = _parseOptions(options, _local13);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local9 = options.clip;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local9._mochiad_loaded) {
return(null);
}
var _local12 = options.depth;
delete options.depth;
var _local6 = _local9.createEmptyMovieClip("_mochiad", _local12);
var _local11 = _getRes(options);
options.res = (_local11[0] + "x") + _local11[1];
options.server = options.server + options.id;
delete options.id;
_local9._mochiad_loaded = true;
var _local4 = _local6.createEmptyMovieClip("_mochiad_ctr", 1);
for (var _local7 in options) {
_local4[_local7] = options[_local7];
}
var _local10 = _local4.server;
delete _local4.server;
var _local14 = _allowDomains(_local10);
_local6.onEnterFrame = function () {
if (this._mochiad_ctr._url != this._url) {
this.onEnterFrame = function () {
if (!this._mochiad_ctr) {
delete this.onEnterFrame;
MochiAd.unload(this._parent);
}
};
}
};
var _local5 = new LocalConnection();
var _local8 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local5.mc = _local6;
_local5.name = _local8;
_local5.hostname = _local14;
_local5.allowDomain = function (d) {
return(true);
};
_local5.allowInsecureDomain = _local5.allowDomain;
_local5.connect(_local8);
_local6.lc = _local5;
_local4.lc = _local8;
_local4.st = getTimer();
_local4.loadMovie(_local10 + ".swf", "POST");
return(_local6);
}
static function unload(clip) {
if (typeof(clip) == "undefined") {
clip = _root;
}
if (clip.clip && (clip.clip._mochiad)) {
clip = clip.clip;
}
if (!clip._mochiad) {
return(false);
}
clip._mochiad.removeMovieClip();
delete clip._mochiad_loaded;
delete clip._mochiad;
return(true);
}
static function _isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function _getRes(options) {
var _local3 = options.clip.getBounds();
var _local2 = 0;
var _local1 = 0;
if (typeof(options.res) != "undefined") {
var _local4 = options.res.split("x");
_local2 = parseFloat(_local4[0]);
_local1 = parseFloat(_local4[1]);
} else {
_local2 = _local3.xMax - _local3.xMin;
_local1 = _local3.yMax - _local3.yMin;
}
if ((_local2 == 0) || (_local1 == 0)) {
_local2 = Stage.width;
_local1 = Stage.height;
}
return([_local2, _local1]);
}
static function _parseOptions(options, defaults) {
var _local4 = {};
for (var _local8 in defaults) {
_local4[_local8] = defaults[_local8];
}
if (options) {
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
}
if (_root.mochiad_options) {
var _local5 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local5.length) {
var _local3 = _local5[_local2].split("=");
_local4[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
return(_local4);
}
}
Symbol 278 MovieClip [__Packages.mochi.MochiScores] Frame 0
class mochi.MochiScores
{
static var boardID, onClose, onError;
function MochiScores () {
}
static function setBoardID(boardID) {
mochi.MochiScores.boardID = boardID;
mochi.MochiServices.send("scores_setBoardID", {boardID:boardID});
}
static function showLeaderboard(options) {
if (options.clip != null) {
if (options.clip != mochi.MochiServices.__get__clip()) {
mochi.MochiServices.disconnect();
mochi.MochiServices.connect(mochi.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 (typeof(options.score) == "object") {
if (options.score.text != undefined) {
options.score = options.score.text;
}
}
}
if (options.onDisplay != null) {
options.onDisplay();
} else {
mochi.MochiServices.__get__clip().stop();
}
if (options.onClose != null) {
onClose = options.onClose;
} else {
onClose = function () {
mochi.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.MochiServices.send("scores_showLeaderboard", {options:options}, null, doClose);
}
static function closeLeaderboard() {
mochi.MochiServices.send("scores_closeLeaderboard");
}
static function getPlayerInfo(callbackObj, callbackMethod) {
mochi.MochiServices.send("scores_getPlayerInfo", null, callbackObj, callbackMethod);
}
static function submit(score, name, callbackObj, callbackMethod) {
mochi.MochiServices.send("scores_submit", {score:score, name:name}, callbackObj, callbackMethod);
}
static function requestList(callbackObj, callbackMethod) {
mochi.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 163 MovieClip [Splash] Frame 1
Symbol 163 MovieClip [Splash] Frame 157
_root.gotoAndPlay("Menu");
Symbol 164 Button [SplashContainer]
on (release) {
getURL ("http://www.ourworld.com/v11/tracking?source=game&id=fglinfection", "_blank");
}
Symbol 168 Button [MoreGames]
on (release) {
getURL ("http://www.ourworld.com/v11/tracking?source=game&id=fglinfection", "_blank");
}
Symbol 179 Button [MainLogoLink]
on (release) {
if (!_root.b_LockedSite) {
getURL ("http://www.thenakeddeveloper.com", "_blank");
}
}
Symbol 187 MovieClip [Sounds] Frame 2
gotoAndStop (1);
Symbol 187 MovieClip [Sounds] Frame 4
gotoAndStop (1);
Symbol 187 MovieClip [Sounds] Frame 6
gotoAndStop (1);
Symbol 187 MovieClip [Sounds] Frame 8
gotoAndStop (1);
Symbol 187 MovieClip [Sounds] Frame 10
gotoAndStop (1);
Symbol 187 MovieClip [Sounds] Frame 12
gotoAndStop (1);
Symbol 187 MovieClip [Sounds] Frame 14
gotoAndStop (1);
Symbol 191 MovieClip [ExplosionSounds] Frame 2
gotoAndStop (1);
Symbol 191 MovieClip [ExplosionSounds] Frame 4
this.stop();
Symbol 191 MovieClip [ExplosionSounds] Frame 6
this.stop();
Symbol 191 MovieClip [ExplosionSounds] Frame 8
this.stop();
Symbol 191 MovieClip [ExplosionSounds] Frame 10
this.stop();
Symbol 200 MovieClip [Blobs] Frame 1
xspeed = (Math.random() - Math.random()) * 3;
yspeed = (Math.random() - Math.random()) * 3;
this.onEnterFrame = function () {
_x = (_x + xspeed);
_y = (_y + yspeed);
if (_x < 0) {
_x = (_x + 600);
}
if (_y < 0) {
_y = (_y + 600);
}
if (Math.random() > 0.95) {
xspeed = (Math.random() - Math.random()) * 3;
yspeed = (Math.random() - Math.random()) * 3;
}
};
Symbol 203 MovieClip [Gun] Frame 1
Symbol 203 MovieClip [Gun] Frame 2
gotoAndPlay ("Start");
Symbol 213 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 213 MovieClip [Progress] Frame 2
this.f_showProgress();
Symbol 213 MovieClip [Progress] Frame 4
this.f_showProgress();
Symbol 216 MovieClip [Damage] Frame 6
this._x = -1000;
this._y = -1000;
this._width = 1;
this._height = 1;
Symbol 227 MovieClip [PowerupInstructions] Frame 1
function f_ShowInstruction() {
if ((n_Counter <= 0) || (n_Counter == undefined)) {
gotoAndPlay ("Instruction_0");
} else {
gotoAndPlay("Instruction_" + n_Type.toString());
}
}
var n_Counter;
var n_Type;
this.onEnterFrame = function () {
if (n_Counter == undefined) {
n_Counter == _root.n_InstructionTime;
} else if (n_Counter > 0) {
n_Counter--;
}
};
Symbol 227 MovieClip [PowerupInstructions] Frame 2
this.f_ShowInstruction();
Symbol 227 MovieClip [PowerupInstructions] Frame 4
this.f_ShowInstruction();
Symbol 227 MovieClip [PowerupInstructions] Frame 6
this.f_ShowInstruction();
Symbol 227 MovieClip [PowerupInstructions] Frame 8
this.f_ShowInstruction();
Symbol 227 MovieClip [PowerupInstructions] Frame 10
this.f_ShowInstruction();
Symbol 227 MovieClip [PowerupInstructions] Frame 12
this.f_ShowInstruction();
Symbol 227 MovieClip [PowerupInstructions] Frame 14
this.f_ShowInstruction();
Symbol 227 MovieClip [PowerupInstructions] Frame 16
this.f_ShowInstruction();
Symbol 228 MovieClip [PowerupControl] Frame 1
var n_UpgradeNumber;
var b_IsInit;
if ((b_IsInit != undefined) && (n_UpgradeNumber != undefined)) {
this.o_Graphic.gotoAndPlay("Powerup_" + (n_UpgradeNumber + 1).toString());
if (_root.o_Upgrades[n_UpgradeNumber][1] < _root.o_Upgrades[n_UpgradeNumber][4]) {
_root.o_Upgrades[n_UpgradeNumber][1]++;
}
if (_root.o_Upgrades[n_UpgradeNumber][0] == 1) {
if (_root.o_Upgrades[n_UpgradeNumber][2] < _root.o_Upgrades[n_UpgradeNumber][3]) {
_root.o_Upgrades[n_UpgradeNumber][2]++;
}
if (_root.o_Upgrades[n_UpgradeNumber][2] >= _root.o_Upgrades[n_UpgradeNumber][3]) {
_root.o_Upgrades[n_UpgradeNumber][2] = 0;
_root.o_Upgrades[n_UpgradeNumber][0] = 0;
}
}
this.o_Progress.n_MaxValue = _root.o_Upgrades[n_UpgradeNumber][4];
this.o_Progress.n_CurrentValue = _root.o_Upgrades[n_UpgradeNumber][1];
if (_root.o_Upgrades[n_UpgradeNumber][6] == 1) {
this._visible = true;
} else {
this._visible = false;
}
} else if ((b_IsInit == undefined) && (n_UpgradeNumber != undefined)) {
this._visible = false;
this.o_KeyCode.text = (n_UpgradeNumber + 1).toString();
b_IsInit = true;
} else {
this._visible = false;
}
Symbol 228 MovieClip [PowerupControl] Frame 2
gotoAndPlay (1);
Symbol 240 MovieClip [FreezeRay] Frame 1
stop();
Symbol 240 MovieClip [FreezeRay] Frame 2
_root.f_PlaySound("o_Explosions", "FreezeRay");
Symbol 240 MovieClip [FreezeRay] Frame 18
if (_root.o_Upgrades[5][0] == 0) {
this.gotoAndPlay("KillFreeze");
}
Symbol 240 MovieClip [FreezeRay] Frame 19
this.gotoAndPlay("FreezeStay");
Symbol 240 MovieClip [FreezeRay] Frame 20
gotoAndStop (1);
Symbol 242 MovieClip [Score] Frame 1
this.ScoreText.text = _root.n_Score.toString();
Symbol 242 MovieClip [Score] Frame 2
gotoAndPlay (1);
Symbol 250 MovieClip [MainInstructions] Frame 1
var b_KillInstructions;
this.onEnterFrame = function () {
if (Key.isDown(32)) {
b_KillInstructions = true;
}
};
Symbol 250 MovieClip [MainInstructions] Frame 2
if ((b_KillInstructions == undefined) || (b_KillInstructions == false)) {
gotoAndPlay (1);
}
Symbol 250 MovieClip [MainInstructions] Frame 3
this.onEnterFrame = undefined;
_root.b_MainInstructionsShown = true;
this.b_KillInstructions = false;
stop();
Symbol 264 MovieClip [EndGameOverlay] Frame 1
stop();
Symbol 264 MovieClip [EndGameOverlay] Frame 2
_root.f_BombArea(9, 10000000);
this.play();
Symbol 264 MovieClip [EndGameOverlay] Frame 3
_root.f_BombArea(8, 10000000);
Symbol 264 MovieClip [EndGameOverlay] Frame 4
_root.f_BombArea(7, 10000000);
Symbol 264 MovieClip [EndGameOverlay] Frame 5
_root.f_BombArea(6, 10000000);
Symbol 264 MovieClip [EndGameOverlay] Frame 6
_root.f_BombArea(5, 10000000);
Symbol 264 MovieClip [EndGameOverlay] Frame 7
_root.f_BombArea(4, 10000000);
Symbol 264 MovieClip [EndGameOverlay] Frame 8
_root.f_BombArea(3, 10000000);
Symbol 264 MovieClip [EndGameOverlay] Frame 9
_root.f_BombArea(2, 10000000);
Symbol 264 MovieClip [EndGameOverlay] Frame 10
_root.f_BombArea(1, 10000000);
Symbol 264 MovieClip [EndGameOverlay] Frame 49
_root.gotoAndPlay("HiScores");
Symbol 274 Button [BackToMenu]
on (release) {
this.gotoAndPlay("Menu");
}