Frame 1
function f_FireProjectile(o_Source, n_TypeID, n_TeamID, n_ShotGroupID, n_AngleOffset, n_StartOffSet, n_Strength) {
var _local2;
var _local3 = 0;
var _local4;
var _local8 = _root.n_ShotTime;
while ((_local3 <= _root.n_ProjectilesUpperLimit) && (_local4 == undefined)) {
_local2 = _root.o_ObjectContainer["Projectile_" + _local3.toString()];
if (_local2 == undefined) {
_local4 = _local3;
}
_local3++;
}
if (((_local4 != undefined) && (_root.n_Ammo > 0)) && ((_root.d_LastShot == undefined) || (_root.f_OverTimeDiff(_root.d_LastShot, new Date(), _local8)))) {
_local2 = _root.o_ObjectContainer.attachMovie("Projectile", "Projectile_" + _local4.toString(), _root.o_ObjectContainer.getNextHighestDepth());
_local2._x = o_Source._x;
_local2._y = o_Source._y;
if (n_TeamID == 1) {
if (_root.o_Upgrades[7][0] == 1) {
_local2.o_Graphic.gotoAndStop("Type_" + _root.n_QuadDamageProjectileNumber.toString());
_local2.n_Strength = _root.n_ProjectileBaseDamage * _root.n_QuadDamageMultiplier;
} else {
_local2.o_Graphic.gotoAndStop("Type_" + n_TypeID.toString());
_local2.n_Strength = _root.n_ProjectileBaseDamage;
}
} else {
_local2.o_Graphic.gotoAndStop("Type_" + n_TypeID.toString());
_local2.n_Strength = n_Strength;
}
_local2.n_TypeID = n_TypeID;
_local2.n_TeamID = n_TeamID;
_local2.n_Timer = _root.n_ProjectileDistance;
_local2.d_Created = new Date();
_local2.b_Init = true;
if (n_TeamID == 1) {
_local2.n_Angle = (o_Source.o_TurretPoint._rotation + n_AngleOffset) + n_StartOffSet;
_local2.n_FireSpeed = _root.n_ProjectileVelocity + ((_root.n_ProjectileVelocity / 100) * (_root.n_ProjectileRandomPerc * Math.random()));
_root.n_ProjectileRegen = _root.n_ProjectileRegenLimit;
_root.LastShot = new Date();
_local2.n_ShotGroupID = n_ShotGroupID;
_root.a_ShotGrouping[_root.n_ShotGroupCurrent]++;
} else {
_local2.n_Angle = (o_Source._rotation + n_AngleOffset) + 180;
_local2.n_FireSpeed = _root.n_ProjectileVelocity / 4;
_root.f_ProjectObject(_local2, _local2.n_Angle, 40);
_root.f_PlaySound("o_Sounds", "AlienFire");
_local2.n_ShotGroupID = -1;
}
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_EndShotGrouping(n_ShotGroupID) {
var _local6 = _root.o_LevelProgress.n_MaxValue;
var _local4;
var _local3;
var _local2;
if (_root.a_ShotGroupingKillCounts[n_ShotGroupID] > 0) {
_local2 = _root.a_ShotGroupingKillCounts[n_ShotGroupID] - 1;
if (_local2 > (o_ScoreMultiplierArray.length - 1)) {
_local2 = o_ScoreMultiplierArray.length - 1;
}
_local4 = Math.round(_root.a_ShotGroupingKillPoints[n_ShotGroupID] * _root.o_ScoreMultiplierArray[_local2][0]);
if (!isNaN(_local4)) {
_root.o_LevelProgress.n_CurrentValue = _root.o_LevelProgress.n_CurrentValue + _local4;
_root.n_Score = _root.n_Score + _local4;
}
_local3 = _root.o_ScoreMultiplierArray[_local2][1] + " Kill";
if (_root.a_ShotGroupingKillCounts[n_ShotGroupID] != 1) {
_local3 = _local3 + ((" (x" + _root.o_ScoreMultiplierArray[_local2][0]) + " bonus)");
}
if (_root.o_LevelProgress.n_CurrentValue >= _local6) {
_root.f_SetLevel(_root.n_Level + 1);
}
}
if ((_local3 != undefined) && (_local3 != "")) {
_root.f_ShowMessage(_local3);
}
}
function f_FireObject() {
var _local2;
var _local5;
var _local6 = _root.o_LevelArray[_root.n_Level - 1][3];
var _local3 = 0;
var _local4;
if ((_root.d_LastObject == undefined) || (_root.f_OverTimeDiff(_root.d_LastObject, new Date(), _local6))) {
_local5 = _root.n_NextObject;
_root.f_ChooseNextObject();
while ((_local3 <= _root.n_ObjectsUpperLimit) && (_local4 == undefined)) {
_local2 = _root.o_ObjectContainer["Object_" + _local3.toString()];
if (_local2 == undefined) {
_local4 = _local3;
}
_local3++;
}
if (_local4 != undefined) {
_local2 = _root.o_ObjectContainer.attachMovie("Object", "Object_" + _local4.toString(), _root.o_ObjectContainer.getNextHighestDepth());
_local2._y = _root.n_ObjectCreateXUpper + (Math.random() * _root.n_ObjectCreateXLower);
_local2.n_Direction = (((Math.random() * 100) < 50) ? 1 : -1);
if (_local2.n_Direction == 1) {
_local2._x = -100;
} else {
_local2._x = _root.n_GameWidth + 100;
}
_local2.n_TypeID = _local5;
_local2.b_Init = true;
_local2.n_Strength = _root.o_ObjectArray[_local5 - 1][10];
_local2.o_Strength.n_MaxValue = _root.o_ObjectArray[_local5 - 1][10];
_local2.o_Strength.n_CurrentValue = _local2.o_Strength.n_MaxValue;
_local2.n_ShotStrength = _root.o_ObjectArray[_local5 - 1][9];
_local2.n_Speed = 100 * (_root.o_ObjectArray[_local5 - 1][1] / ((100 - (_root.n_ObjectSpeedVar / 2)) + (Math.random() * _root.n_ObjectSpeedVar)));
_local2.n_X = _local2._x;
_local2.n_Y = _local2._y;
_local2.n_Points = _root.o_ObjectArray[_local5 - 1][8];
_local2.b_Dead = false;
_local2.n_SinMulti = _root.o_ObjectArray[_local5 - 1][3] + Math.random(_root.o_ObjectArray[_local5 - 1][3]);
_local2.n_SinStep = _root.o_ObjectArray[_local5 - 1][2];
_local2.n_SinPos = Math.round(Math.random(360));
_local2.n_CosMulti = _root.o_ObjectArray[_local5 - 1][5] + Math.random(_root.o_ObjectArray[_local5 - 1][5]);
_local2.n_CosStep = _root.o_ObjectArray[_local5 - 1][4];
_local2.n_CosPos = Math.round(Math.random(360));
_local2.o_Graphics.gotoAndStop("Type_" + _local5.toString());
_root.d_LastObject = new Date();
return(true);
}
return(false);
}
return(false);
}
function f_ChooseNextObject() {
if ((_root.n_NextObject == undefined) && (_root.n_ThenObject == undefined)) {
if (_root.n_LevelAlienLevel == _root.n_LevelAlienLevelLower) {
_root.n_NextObject = _root.n_LevelAlienLevelLower;
} else {
_root.n_NextObject = _root.n_LevelAlienLevelLower + Math.round(Math.random() * (_root.n_LevelAlienLevel - _root.n_LevelAlienLevelLower));
}
} else {
_root.n_NextObject = _root.n_ThenObject;
}
if (_root.n_LevelAlienLevel == _root.n_LevelAlienLevelLower) {
_root.n_ThenObject = _root.n_LevelAlienLevelLower;
} else {
_root.n_ThenObject = _root.n_LevelAlienLevelLower + Math.round(Math.random() * (_root.n_LevelAlienLevel - _root.n_LevelAlienLevelLower));
}
}
function f_PopObject(o_Object, b_GetScore) {
var _local4;
var _local3 = o_Object._name.toString().split("_");
var _local5 = "Explosion_" + _local3[_local3.length - 1];
if (b_GetScore) {
if (!o_Object.b_Dead) {
_local4 = _root.o_ObjectContainer.attachMovie("Explosions", _local5, _root.o_ObjectContainer.getNextHighestDepth(), {_x:o_Object._x, _y:o_Object._y});
_local4.gotoAndPlay("Type_2");
n_Counter = 1;
while (n_Counter <= _root.n_PickupsPerObject) {
_root.f_FirePickup(1, 1, o_Object._x, o_Object._y, _root.o_ObjectArray[o_Object.n_TypeID - 1][11]);
n_Counter++;
}
if (!_root.f_IsPowerupActive(_root.o_LevelArray[_root.n_Level][4])) {
_root.f_FirePickup(2, _root.o_LevelArray[_root.n_Level][4], o_Object._x, o_Object._y, _root.o_ObjectArray[o_Object.n_TypeID - 1][11]);
}
if (isNaN(_root.a_ShotGroupingKillCounts[o_Object.n_ShotGroupID])) {
_root.a_ShotGroupingKillCounts[o_Object.n_ShotGroupID] = 0;
_root.a_ShotGroupingKillPoints[o_Object.n_ShotGroupID] = 0;
}
_root.a_ShotGroupingKillCounts[o_Object.n_ShotGroupID]++;
_root.a_ShotGroupingKillPoints[o_Object.n_ShotGroupID] = _root.a_ShotGroupingKillPoints[o_Object.n_ShotGroupID] + o_Object.n_Points;
o_Object.b_Dead = true;
_root.f_PlaySound("o_Explosions", "PopSmall");
}
}
o_Object.removeMovieClip();
}
function f_FirePickup(n_TypeID, n_SubTypeID, n_X, n_Y, n_AmmoMultiplier) {
var _local3;
var _local4;
var _local2 = 0;
while ((_local2 <= _root.n_ObjectsUpperLimit) && (_local4 == undefined)) {
_local3 = _root.o_ObjectContainer["Pickup_" + _local2.toString()];
if (_local3 == undefined) {
_local4 = _local2;
}
_local2++;
}
if (_local4 != undefined) {
_local3 = _root.o_ObjectContainer.attachMovie("Pickup", "Pickup_" + _local4.toString(), _root.o_ObjectContainer.getNextHighestDepth(), {_x:n_X, _y:n_Y});
_root.n_PickupCounter++;
if (_root.n_PickupCounter > _root.n_PickupsUpperLimit) {
_root.n_PickupCounter = 0;
}
_local3.n_XVelocity = Math.random() * _root.n_PickupMaxXVelocity;
_local3.n_YVelocity = (Math.random() * _root.n_PickupMaxYVelocity) * -1;
_local3.n_Direction = (((Math.random() * 100) < 50) ? 1 : -1);
_local3.b_Moving = true;
_local3.n_TypeID = n_TypeID;
_local3.n_SubTypeID = n_SubTypeID;
_local3.n_AmmoMultiplier = n_AmmoMultiplier;
_local3.o_Graphics.gotoAndStop((("" + n_TypeID.toString()) + "_") + n_SubTypeID.toString());
_local3.b_Init = true;
}
return(true);
}
function f_ApplyFall(o_Object) {
o_Object._x = o_Object._x + (o_Object.n_XVelocity * o_Object.n_Direction);
if (o_Object._x > _root.n_GameWidth) {
o_Object._x = _root.n_GameWidth;
} else if (o_Object._x < 0) {
o_Object._x = 0;
}
o_Object.n_YVelocity = o_Object.n_YVelocity + _root.n_PickupGravity;
if (o_Object.n_YVelocity > _root.n_PickupMaxYVelocity) {
o_Object.n_YVelocity = _root.n_PickupMaxYVelocity;
}
o_Object._y = o_Object._y + o_Object.n_YVelocity;
if (o_Object._y > _root.n_Floor) {
o_Object._y = _root.n_Floor;
o_Object.b_Moving = false;
_root.f_PlaySound("o_Explosions", "ItemHitFloor");
}
}
function f_SetLevel(n_NewLevel) {
_root.n_Level = n_NewLevel;
if (_root.n_Level > (_root.o_LevelArray.length - 1)) {
_root.f_EndGame(true);
} else {
_root.o_LevelText.text = (_root.n_Level.toString() + " of ") + (_root.o_LevelArray.length - 1).toString();
_root.o_LevelProgress.n_CurrentValue = 0;
_root.o_LevelProgress.n_MaxValue = _root.o_LevelArray[_root.n_Level][0];
_root.n_Level = n_NewLevel;
_root.n_LevelAlienLevel = _root.o_LevelArray[_root.n_Level][2];
_root.n_LevelAlienLevelLower = _root.o_LevelArray[_root.n_Level][1];
_root.f_SaveLevel();
_root.f_ShowMessage("Level " + _root.n_Level);
}
}
function f_ShowScores(b_ClearScores) {
if (b_ClearScores) {
_root.n_Score = 0;
}
_root.gotoAndPlay("HiScores");
}
function f_StartGame() {
var _local4;
var _local5 = new Date(new Date().getTime() - 100000);
var _local3;
if (!_root.b_GameInit) {
Mouse.hide();
_root.n_Score = 0;
n_Ammo = _root.n_AmmoAtStart;
_root.d_LastPause = undefined;
_root.b_Paused = false;
_root.n_CurrentWeapon = 0;
_root.n_TurretHealth = _root.n_TurretHealthStart;
this.o_ObjectContainer.o_Turret.o_TurretHealth.n_MaxValue = _root.n_TurretHealth;
this.o_ObjectContainer.o_Turret.o_TurretHealth.n_CurrentValue = _root.n_TurretHealth;
_root.o_Upgrades = [[0, _local5, _local5, 0, 1000, "Standard Shot", true, 1, 10, 5, 10, _local5], [0, _local5, _local5, 0, 10000, "Health Pack", _root.b_Debugging, 1, 10, 5, 25, _local5], [0, _local5, _local5, 20000, 50000, "Scatter Shot", _root.b_Debugging, 1, 10, 5, 10, _local5], [0, _local5, _local5, 30000, 50000, "Mirror Turret", _root.b_Debugging, 1, 10, 5, 25, _local5], [0, _local5, _local5, 10000, 40000, "Freeze Ray", _root.b_Debugging, 1, 10, 5, 25, _local5], [0, _local5, _local5, 0, 40000, "Smartbomb", _root.b_Debugging, 1, 10, 5, 100, _local5], [0, _local5, _local5, 20000, 60000, "Invulnerability", _root.b_Debugging, 1, 10, 5, 100, _local5], [0, _local5, _local5, 20000, 50000, "Quad Damage", _root.b_Debugging, 1, 10, 5, 75, _local5]];
_local4 = 0;
while (_local4 < _root.o_Upgrades.length) {
_root["o_Powerup_" + _local4.toString()].n_UpgradeNumber = _local4;
_local4++;
}
_root.n_TurretVelocity = 0;
_root.n_ShotGroupCurrent = 0;
_root.n_NextObject = undefined;
_root.n_ThenObject = undefined;
_root.n_ProjectilesCounter = 0;
_root.n_PickupCounter = 0;
o_Turret._x = _root._width / 2;
_root.b_GameInit = true;
if ((_root.b_StartFromLast && (_root.n_LastScore != undefined)) && (_root.n_LastLevel != (_root.o_LevelArray.length - 1))) {
_root.f_GetLevel();
_root.n_Score = _root.n_LastScore;
_root.n_TurretHealth = _root.n_LastHealth;
_root.n_Ammo = _root.n_LastAmmo;
_root.f_SetLevel(_root.n_LastLevel);
if (_root.n_LastTechLevel <= _root.o_LevelArray[_root.n_LastLevel][4]) {
_root.n_LastTechLevel = _root.o_LevelArray[_root.n_LastLevel][4];
}
_local3 = 0;
while (_local3 <= _root.o_Upgrades.length) {
if (_local3 <= _root.n_LastTechLevel) {
_root.f_EnablePowerup(_local3);
}
_local3++;
}
} else {
_root.f_ResetLevel();
_root.f_SetLevel(1);
}
_root.f_ChooseNextObject();
_root.a_MessageArray = new Array();
_root.d_MessageLast = undefined;
}
}
function f_EndGame(b_Win) {
Mouse.show();
this.onEnterFrame = undefined;
_root.b_GameInit = false;
if (b_Win) {
_root.o_WinFlash.gotoAndPlay("Effect");
_root.n_Score = _root.n_Score + _root.n_ScoreBonusForFinishing;
_root.gotoAndPlay("Win");
} else {
_root.o_ObjectContainer.o_Turret.gotoAndPlay("Death");
_root.n_TurretHealth = 0;
_root.stop();
}
}
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_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) {
return((n_CurrentPosition + n_ChangeVal) % 360);
}
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((-1 * _local2) + 90, 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_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.pop();
_local2._x = _root.n_GameWidth / 2;
_local2._y = _root.n_GameHeight / 2;
_local2.o_InnerText.o_Text.text = _local3;
_local2.gotoAndPlay(0);
_root.d_MessageLast = new Date();
}
}
}
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_ActivateUpgrade(n_UpgradeID) {
var _local3;
var _local12;
var _local9;
var _local10;
var _local11;
var _local13;
var _local6 = false;
var _local5;
var _local7 = _root.o_Upgrades[_root.n_MirrorTurretID][0];
var _local8;
var _local4;
if ((_root.o_Upgrades[n_UpgradeID][6] == 1) && (_root.f_IsPowerupReady(n_UpgradeID))) {
_root.n_StatsWeaponsFired++;
_local13 = _root.f_UpgradeActivationTime(n_UpgradeID);
if (_root.o_Upgrades[_root.n_ScatterShotID][0]) {
_local4 = _root.n_ProjectilesVarianceScatter;
} else {
_local4 = _root.n_ProjectilesVariance;
}
if (n_UpgradeID == 0) {
if (_root.n_Ammo > 0) {
_root.n_ShotGroupCurrent++;
if (_root.n_ShotGroupCurrent >= _root.n_ShotGroupMax) {
_root.n_ShotGroupCurrent = 0;
}
_root.a_ShotGrouping[_root.n_ShotGroupCurrent] = 0;
_root.a_ShotGroupingKillCounts[_root.n_ShotGroupCurrent] = 0;
_root.a_ShotGroupingKillPoints[_root.n_ShotGroupCurrent] = 0;
if (_local7) {
_local8 = _root.o_ObjectContainer.o_Turret.o_TurretPointCopy._rotation - _root.o_ObjectContainer.o_Turret.o_TurretPoint._rotation;
}
n_ShotCounter = 1;
while (n_ShotCounter <= _root.o_Upgrades[n_UpgradeID][10]) {
if (_root.n_Ammo > 0) {
_root.f_FireProjectile(_root.o_ObjectContainer.o_Turret, 1, 1, _root.n_ShotGroupCurrent, (Math.random() * _local4) - (_local4 / 2), 0, _local3.n_ShotStrength);
_root.n_Ammo--;
if (_local7) {
_root.f_FireProjectile(_root.o_ObjectContainer.o_Turret, 1, 1, _root.n_ShotGroupCurrent, (Math.random() * _local4) - (_local4 / 2), _local8, _local3.n_ShotStrength);
}
}
n_ShotCounter++;
}
_local12 = _root.o_ObjectContainer.attachMovie("SmokeWhisp", "o_Smoke", _root.o_ObjectContainer.getNextHighestDepth(), {_x:_root.o_ObjectContainer.o_Turret._x, _y:_root.o_ObjectContainer.o_Turret._y});
_local12._rotation = _root.o_ObjectContainer.o_Turret.o_TurretPoint._rotation - 90;
_local9 = _root.o_ObjectContainer.attachMovie("SmokeWhisp", "o_Smoke", _root.o_ObjectContainer.getNextHighestDepth(), {_x:_root.o_ObjectContainer.o_Turret._x, _y:_root.o_ObjectContainer.o_Turret._y});
_local9._rotation = _root.o_ObjectContainer.o_Turret.o_TurretPoint._rotation + 90;
_root.f_ProjectObject(_local12, _root.o_ObjectContainer.o_Turret.o_TurretPoint._rotation, 35);
_root.f_ProjectObject(_local9, _root.o_ObjectContainer.o_Turret.o_TurretPoint._rotation, 35);
_root.o_ObjectContainer.o_Turret.o_TurretPoint.gotoAndPlay("Fire");
if (_local7) {
_local10 = _root.o_ObjectContainer.attachMovie("SmokeWhisp", "o_Smoke", _root.o_ObjectContainer.getNextHighestDepth(), {_x:_root.o_ObjectContainer.o_Turret._x, _y:_root.o_ObjectContainer.o_Turret._y});
_local10._rotation = _root.o_ObjectContainer.o_Turret.o_TurretPointCopy._rotation - 90;
_local11 = _root.o_ObjectContainer.attachMovie("SmokeWhisp", "o_Smoke", _root.o_ObjectContainer.getNextHighestDepth(), {_x:_root.o_ObjectContainer.o_Turret._x, _y:_root.o_ObjectContainer.o_Turret._y});
_local11._rotation = _root.o_ObjectContainer.o_Turret.o_TurretPointCopy._rotation + 90;
_root.f_ProjectObject(_local10, _root.o_ObjectContainer.o_Turret.o_TurretPointCopy._rotation, 35);
_root.f_ProjectObject(_local11, _root.o_ObjectContainer.o_Turret.o_TurretPointCopy._rotation, 35);
_root.o_ObjectContainer.o_Turret.o_TurretPointCopy.gotoAndPlay("Fire");
}
if (_root.o_Upgrades[7][0] == 1) {
_root.f_PlaySound("o_Sounds", "Quad");
} else {
_root.f_PlaySound("o_Sounds", "Shot");
}
_local6 = true;
}
} else if (n_UpgradeID == 4) {
if (_root.n_Ammo >= _root.o_Upgrades[n_UpgradeID][10]) {
_root.o_FreezeRay.gotoAndPlay("FreezeAnimation");
_root.n_Ammo = _root.n_Ammo - _root.o_Upgrades[n_UpgradeID][10];
_local5 = 0;
while (_local5 <= _root.n_ObjectsUpperLimit) {
_local3 = _root.o_ObjectContainer["Object_" + _local5.toString()];
if (_local3 != undefined) {
_local3.b_Frozen = true;
_local3.d_FrozenFrom = new Date();
_local3.n_FrozenLength = _root.o_Upgrades[n_UpgradeID][3];
}
_local5++;
}
_root.f_PlaySound("o_Sounds", "Electric");
_local6 = true;
} else {
_root.f_ShowMessage(("Not Enough Ammo (" + _root.o_Upgrades[n_UpgradeID][10]) + " needed)");
}
} else if (n_UpgradeID == 3) {
if (_root.n_Ammo >= _root.o_Upgrades[n_UpgradeID][10]) {
_root.f_PlaySound("o_Sounds", "Spawn");
_root.f_ShowMessage("Mirror Turret Activated");
_local6 = true;
} else {
_root.f_ShowMessage(("Not Enough Ammo (" + _root.o_Upgrades[n_UpgradeID][10]) + " needed)");
}
} else if (n_UpgradeID == 5) {
if (_root.n_Ammo >= _root.o_Upgrades[n_UpgradeID][10]) {
_root.o_Smartbomb.gotoAndPlay("SmartbombAnimation");
_root.n_Ammo = _root.n_Ammo - _root.o_Upgrades[n_UpgradeID][10];
_root.f_PlaySound("o_Explosions", "Smartbomb");
_local6 = true;
} else {
_root.f_ShowMessage(("Not Enough Ammo (" + _root.o_Upgrades[n_UpgradeID][10]) + " needed)");
}
} else if (n_UpgradeID == 1) {
if (_root.n_Ammo >= _root.o_Upgrades[n_UpgradeID][10]) {
_root.n_Ammo = _root.n_Ammo - _root.o_Upgrades[n_UpgradeID][10];
_root.n_TurretHealth = _root.n_TurretHealth + ((_root.n_TurretHealthStart / 100) * _root.n_TurretHealthUpPerc);
if (_root.n_TurretHealth > _root.n_TurretHealthStart) {
_root.n_TurretHealth = _root.n_TurretHealthStart;
}
_root.o_ObjectContainer.o_Turret.o_Recharge.gotoAndPlay("Recharge");
_root.f_PlaySound("o_Sounds", "Spawn");
_root.f_ShowMessage(("+" + _root.n_TurretHealthUpPerc.toString()) + "% Health");
_local6 = true;
} else {
_root.f_ShowMessage(("Not Enough Ammo (" + _root.o_Upgrades[n_UpgradeID][10]) + " needed)");
}
} else if (n_UpgradeID == _root.n_ScatterShotID) {
if (_root.n_Ammo >= _root.o_Upgrades[n_UpgradeID][10]) {
_root.n_Ammo = _root.n_Ammo - _root.o_Upgrades[n_UpgradeID][10];
_root.f_PlaySound("o_Sounds", "Spawn");
_root.f_ShowMessage("Scattershot Active");
_local6 = true;
} else {
_root.f_ShowMessage(("Not Enough Ammo (" + _root.o_Upgrades[n_UpgradeID][10]) + " needed)");
}
} else if (n_UpgradeID == 6) {
if (_root.n_Ammo >= _root.o_Upgrades[n_UpgradeID][10]) {
_root.n_Ammo = _root.n_Ammo - _root.o_Upgrades[n_UpgradeID][10];
_root.f_ShowMessage("Invulnerability Active");
_root.o_ObjectContainer.o_Turret.o_Invul.gotoAndPlay("Invul");
_local6 = true;
} else {
_root.f_ShowMessage(("Not Enough Ammo (" + _root.o_Upgrades[n_UpgradeID][10]) + " needed)");
}
} else if (n_UpgradeID == 7) {
if (_root.n_Ammo >= _root.o_Upgrades[n_UpgradeID][10]) {
_root.n_Ammo = _root.n_Ammo - _root.o_Upgrades[n_UpgradeID][10];
_root.f_ShowMessage("Quad Damage Active");
_root.f_PlaySound("o_Sounds", "Spawn");
_local6 = true;
} else {
_root.f_ShowMessage(("Not Enough Ammo (" + _root.o_Upgrades[n_UpgradeID][10]) + " needed)");
}
}
if (_local6) {
_root.o_Upgrades[n_UpgradeID][1] = new Date();
_root.o_Upgrades[n_UpgradeID][2] = new Date();
return(true);
}
return(false);
}
return(false);
}
function f_UpgradeActivationTime(n_UpgradeID) {
return(_root.o_Upgrades[n_UpgradeID][3]);
}
function f_CollectPowerup(n_PowerupType) {
if ((_root.o_Upgrades[n_PowerupType][6] == undefined) || (_root.o_Upgrades[n_PowerupType][6] == 0)) {
_root.f_EnablePowerup(n_PowerupType);
} else {
_root.f_UpgradePowerup(n_PowerupType);
}
}
function f_UpgradePowerup(n_PowerupType) {
if (_root.o_Upgrades[n_PowerupType][7] < _root.o_Upgrades[n_PowerupType][8]) {
_root.o_Upgrades[n_PowerupType][7]++;
} 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_IsPowerupActive(n_PowerupType) {
return(_root.o_Upgrades[n_PowerupType][6] == 1);
}
function f_IsPowerupReady(n_PowerupType) {
var _local4 = _root.o_Upgrades[n_PowerupType][1].getTime() + _root.o_Upgrades[n_PowerupType][4];
var _local2 = new Date().getTime();
var _local3 = _local2 - _local4;
if (_local3 >= 0) {
_local4 = _root.o_Upgrades[n_PowerupType][2].getTime() + _root.o_Upgrades[n_PowerupType][3];
_local2 = new Date().getTime();
_local3 = _local2 - _local4;
return(_local3 >= 0);
}
return(false);
}
function f_CycleUpgrade(n_Direction) {
var _local2 = false;
if (_root.d_LastWeaponCycle == undefined) {
_root.d_LastWeaponCycle = new Date();
}
if (_root.f_TimeDiff(_root.d_LastWeaponCycle, new Date()) >= _root.n_WeaponCycleDelay) {
while (!_local2) {
_root.n_CurrentWeapon = _root.n_CurrentWeapon + n_Direction;
_root.n_CurrentWeapon = _root.n_CurrentWeapon % _root.o_Upgrades.length;
_root.n_CurrentWeapon = ((_root.n_CurrentWeapon < 0) ? (_root.o_Upgrades.length - 1) : (_root.n_CurrentWeapon));
_local2 = f_SelectUpgrade(_root.n_CurrentWeapon);
}
_root.d_LastWeaponCycle = new Date();
}
}
function f_SelectUpgrade(n_Item) {
if (_root.f_IsPowerupActive(n_Item)) {
_root.n_CurrentWeapon = n_Item;
_root.o_UpgradeSelected._x = _root["o_Powerup_" + _root.n_CurrentWeapon]._x;
_root.o_UpgradeSelected._y = _root["o_Powerup_" + _root.n_CurrentWeapon]._y;
return(true);
}
return(false);
}
function f_SaveLevel() {
var _local4;
var _local2;
var _local3 = SharedObject.getLocal("TCFS");
_local2 = 0;
while (_local2 <= _root.o_Upgrades.length) {
if (_root.o_Upgrades[_local2][6] == 1) {
_local4 = _local2;
}
_local2++;
}
if (((_root.n_Level >= _local3.data.n_LastLevel) || (_local3.data.n_LastLevel == undefined)) || (_local3.data.n_LastLevel == 0)) {
_local3.data.n_LastScore = _root.n_Score;
_local3.data.n_LastHealth = _root.n_TurretHealth;
_local3.data.n_LastAmmo = _root.n_Ammo;
_local3.data.n_LastTechLevel = _local4;
_local3.data.n_LastLevel = _root.n_Level;
}
}
function f_GetLevel() {
var _local2 = SharedObject.getLocal("TCFS");
if (_local2.data.n_LastLevel != undefined) {
_root.n_LastScore = _local2.data.n_LastScore;
_root.n_LastHealth = _local2.data.n_LastHealth;
_root.n_LastAmmo = _local2.data.n_LastAmmo;
_root.n_LastTechLevel = _local2.data.n_LastTechLevel;
_root.n_LastLevel = _local2.data.n_LastLevel;
}
}
function f_ResetLevel() {
var _local2 = SharedObject.getLocal("TCFS");
_local2.data.n_LastScore = 0;
_local2.data.n_LastHealth = 0;
_local2.data.n_LastAmmo = 0;
_local2.data.n_LastTechLevel = 0;
_local2.data.n_LastLevel = 0;
_root.f_GetLevel();
}
var CPMStarContentSpotID = "431QD7302D5C";
var s_GameAds = "cpmstar";
var d_AdvertStartTime;
var n_CPMWaitTime = 5000;
var b_Debugging = false;
var a_MessageArray;
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 b_GameInit;
var n_Level;
var o_LevelArray = [[0, 1, 1, 2750, 0], [100, 1, 2, 2750, 0], [300, 1, 3, 2750, 0], [600, 2, 4, 3000, 1], [1000, 3, 4, 3000, 2], [2000, 4, 5, 3000, 2], [3000, 4, 6, 3000, 3], [5000, 5, 6, 3000, 3], [8000, 5, 7, 2750, 4], [10000, 6, 7, 2750, 4], [13000, 6, 8, 2750, 5], [16000, 7, 8, 2750, 5], [20000, 7, 9, 2750, 5], [24000, 8, 9, 2750, 6], [28000, 8, 10, 2750, 6], [32000, 9, 10, 2750, 6], [36000, 9, 11, 2750, 7], [40000, 10, 11, 2750, 7], [45000, 10, 11, 2750, 7], [70000, 10, 12, 2750, 7], [100000, 11, 12, 3000, 7]];
var n_LevelAlienLevel;
var n_LevelAlienLevelLower;
var n_CurrentWeapon;
var d_LastWeaponCycle;
var n_WeaponCycleDelay = 100;
var n_TurretDegree;
var n_TurretVelocity;
var n_TurretMoveAmount = 1;
var n_TurretDecelAmount = 3;
var n_TurretMaxVelocity = 12;
var n_TurretTurnSpeed = 5;
var n_TurretHealth;
var n_TurretHealthUpPerc = 25;
var n_TurretHealthStart = 1000;
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 = 32;
var n_ProjectileRandomPerc = 100;
var n_ShotGroupMax = 5;
var n_ShotGroupCurrent;
var n_ShotsInGroup = 10;
var a_ShotGrouping = new Array(_root.n_ShotGroupMax);
var a_ShotGroupingKillCounts = new Array(_root.n_ShotGroupMax);
var a_ShotGroupingKillPoints = new Array(_root.n_ShotGroupMax);
var n_ObjectsUpperLimit = 40;
var n_ObjectRotateValue = 5;
var d_LastObject;
var n_NextObject;
var n_ThenObject;
var n_ObjectSpeedVar = 50;
var o_ObjectArray = [["Drone 1", 3, 2, 15, 2, 20, 0, 0, 10, 0, 100, 2], ["Drone 2", 1, 5, 20, 10, 10, 0, 0, 30, 0, 100, 2], ["Drone 3", 1, 10, 20, 5, 10, 0, 0, 80, 0, 100, 2], ["Drone 4", 2, 6, 20, 6, 20, 0, 0, 150, 0, 100, 2], ["Drone 5", 3, 2, 15, 2, 20, 5000, 2, 200, 20, 500, 3], ["Drone 6", 1, 5, 20, 10, 10, 5000, 3, 250, 20, 1000, 3], ["Drone 7", 1, 10, 20, 5, 10, 5000, 2, 300, 20, 1000, 3], ["Drone 8", 2, 6, 20, 6, 20, 5000, 3, 400, 20, 2000, 4], ["Drone 9", 1, 2, 45, 2, 20, 4000, 4, 600, 20, 4000, 4], ["Drone 10", 1, 5, 20, 10, 10, 3000, 4, 1000, 50, 5000, 4], ["Drone 11", 1, 10, 20, 5, 10, 3000, 3, 1500, 125, 7500, 5], ["Drone 12", 1, 6, 15, 6, 10, 3000, 4, 1750, 150, 10000, 6]];
var n_PickupsUpperLimit = 100;
var n_PickupsPerObject = 5;
var n_PickupMaxXVelocity = 10;
var n_PickupMaxYVelocity = 35;
var n_PickupGravity = 2.5;
var n_PickupLifeTime = 8000;
var n_UCounter;
var o_Upgrades;
var n_UpgradeTimeBoostPerc = 5;
var n_UpgradeSmartbombPower = 4000;
var n_UpgradeRepowerPerc = 25;
var n_UpgradeInstructionTime = 25;
var n_QuadDamageMultiplier = 4;
var n_QuadDamageProjectileNumber = 5;
var n_ScatterShotID = 2;
var n_MirrorTurretID = 3;
var n_FreezeRayID = 4;
var n_InvulID = 6;
var n_Ammo;
var n_AmmoAtStart = 100;
var n_AmmoPerPickUp = 1;
var n_AmmoRechargeAmount = 1;
var n_AmmoRechargeSpeed = 500;
var d_AmmoRechargeLast;
var n_AmmoRechargeLimit = 20;
var n_GameWidth = 550;
var n_GameHeight = 500;
var n_GameCheckBorder = 30;
var n_Floor = 440;
var n_ObjectCreateXUpper = 50;
var n_ObjectCreateXLower = 350;
var b_SoundsOn;
var d_SoundsToggle;
var b_Paused;
var b_PausedMusic;
var d_LastPause;
var b_StartFromLast = false;
var n_LastScore;
var n_LastHealth;
var n_LastAmmo;
var n_LastTechLevel;
var n_LastLevel;
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__("05b8e102", this, 10301, true);
_lockroot = true;
_root.kongregateServices.connect();
mochi.MochiServices.connect("ed3e54f820b6b254");
_root.b_LockedSite = _root.f_LockedSite();
if (_root.s_GameAds == "mochiads") {
MochiAd.showPreGameAd({id:"ed3e54f820b6b254", res:"550x500"});
stop();
} else if (_root.s_GameAds == "cpmstar") {
_root.d_AdvertStartTime = new Date();
System.security.allowDomain("server.cpmstar.com");
this.adBox.loadMovie("http://server.cpmstar.com/adviewas2.swf?contentspotid=" + _root.CPMStarContentSpotID);
o_Loader.gotoAndPlay(2);
stop();
}
Frame 2
stop();
Frame 3
_root.f_GetLevel();
this.stop();
Frame 4
this.onEnterFrame = function () {
var _local8 = false;
var _local7 = false;
var _local4 = false;
var _local5 = false;
var _local3;
var _local6 = _root.o_Upgrades[_root.n_MirrorTurretID][0];
var _local11;
if (!_root.b_GameInit) {
_root.f_StartGame();
OList = Object();
MList = Object();
MList.onMouseDown = function () {
if ((!_root.b_Paused) && (_root.b_GameInit)) {
if (_root.f_ActivateUpgrade(_root.n_CurrentWeapon)) {
}
}
};
MList.onMouseUp = function () {
};
MList.onMouseMove = function () {
if (_root.b_GameInit) {
_root.o_Crosshair._x = _root._xmouse;
_root.o_Crosshair._y = _root._ymouse;
}
};
Mouse.addListener(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.n_Score = _root.n_Score - Math.floor((_root.n_Score / 100) * 20);
_root.f_ShowMessage("-20% Score For Quitting");
_root.f_DoMessages();
_root.f_SaveLevel();
_root.f_EndGame(false);
}
if (_local6) {
_root.o_CrosshairCopy._x = _root.o_ObjectContainer.o_Turret._x + (_root.o_ObjectContainer.o_Turret._x - _root._xmouse);
_root.o_CrosshairCopy._y = _root._ymouse;
} else {
_root.o_CrosshairCopy._x = -50;
_root.o_CrosshairCopy._y = -50;
}
if (!_root.b_Paused) {
if ((_root.n_TurretHealth <= 0) && (_root.b_GameInit)) {
_root.f_EndGame(false);
} else {
_root.f_FireObject();
if (Key.isDown(49)) {
_root.f_ActivateUpgrade(0);
}
if (Key.isDown(50)) {
_root.f_ActivateUpgrade(1);
}
if (Key.isDown(51)) {
_root.f_ActivateUpgrade(2);
}
if (Key.isDown(52)) {
_root.f_ActivateUpgrade(3);
}
if (Key.isDown(53)) {
_root.f_ActivateUpgrade(4);
}
if (Key.isDown(54)) {
_root.f_ActivateUpgrade(5);
}
if (Key.isDown(55)) {
_root.f_ActivateUpgrade(6);
}
if (Key.isDown(56)) {
_root.f_ActivateUpgrade(7);
}
if ((Key.isDown(37) || (Key.isDown(65))) || (Key.isDown(97))) {
_local4 = true;
}
if ((Key.isDown(39) || (Key.isDown(68))) || (Key.isDown(100))) {
_local5 = true;
}
if ((Key.isDown(38) || (Key.isDown(87))) || (Key.isDown(119))) {
_local8 = true;
}
if ((Key.isDown(40) || (Key.isDown(83))) || (Key.isDown(115))) {
_local7 = true;
}
if (_local4) {
_root.n_TurretVelocity = _root.n_TurretVelocity - _root.n_TurretMoveAmount;
}
if (_local5) {
_root.n_TurretVelocity = _root.n_TurretVelocity + _root.n_TurretMoveAmount;
}
if ((!_local4) && (!_local5)) {
if (_root.n_TurretVelocity > 0) {
_root.n_TurretVelocity = _root.n_TurretVelocity - n_TurretDecelAmount;
if (_root.n_TurretVelocity < 0) {
_root.n_TurretVelocity = 0;
}
} else if (_root.n_TurretVelocity < 0) {
_root.n_TurretVelocity = _root.n_TurretVelocity + n_TurretDecelAmount;
if (_root.n_TurretVelocity > 0) {
_root.n_TurretVelocity = 0;
}
}
}
if (_root.n_TurretVelocity > _root.n_TurretMaxVelocity) {
_root.n_TurretVelocity = _root.n_TurretMaxVelocity;
} else if (_root.n_TurretVelocity < (_root.n_TurretMaxVelocity * -1)) {
_root.n_TurretVelocity = _root.n_TurretMaxVelocity * -1;
}
_root.o_ObjectContainer.o_Turret._x = _root.o_ObjectContainer.o_Turret._x + _root.n_TurretVelocity;
if (this.o_ObjectContainer.o_Turret._x > (_root.n_GameWidth - (_root.o_ObjectContainer.o_Turret.o_Body._width / 2))) {
this.o_ObjectContainer.o_Turret._x = _root.n_GameWidth - (_root.o_ObjectContainer.o_Turret.o_Body._width / 2);
_root.n_TurretVelocity = 0;
} else if (this.o_ObjectContainer.o_Turret._x < (_root.o_ObjectContainer.o_Turret.o_Body._width / 2)) {
this.o_ObjectContainer.o_Turret._x = _root.o_ObjectContainer.o_Turret.o_Body._width / 2;
_root.n_TurretVelocity = 0;
}
_root.o_CityScape._x = (_root.n_GameWidth / 2) + (((_root.n_GameWidth / 2) - _root.o_ObjectContainer.o_Turret._x) / 10);
_local3 = 90 + _root.f_AngleToObject(_root.o_ObjectContainer.o_Turret, new Object({_x:_root._xmouse, _y:_root._ymouse}));
if ((_local3 < 0) || (_local3 > 270)) {
_local3 = 0;
} else if ((_local3 > 180) && (_local3 < 270)) {
_local3 = 180;
}
_root.o_ObjectContainer.o_Turret.o_TurretPoint._rotation = _local3 - 90;
if (_local6) {
_root.o_ObjectContainer.o_Turret.o_TurretPointCopy._rotation = 90 - _local3;
_root.o_ObjectContainer.o_Turret.o_TurretPointCopy._visible = true;
} else {
_root.o_ObjectContainer.o_Turret.o_TurretPointCopy._visible = false;
}
}
if ((_root.n_AmmoRechargeAmount > 0) && (_root.n_Ammo < _root.n_AmmoRechargeLimit)) {
if ((_root.d_AmmoRechargeLast == undefined) || (_root.f_TimeDiff(_root.d_AmmoRechargeLast, new Date()) >= _root.n_AmmoRechargeSpeed)) {
_root.n_Ammo = _root.n_Ammo + _root.n_AmmoRechargeAmount;
_root.d_AmmoRechargeLast = new Date();
}
}
} else {
_root.d_AmmoRechargeLast = new Date();
}
}
};
Frame 5
if (_root.b_GameInit) {
_root.gotoAndPlay("Game");
}
Frame 6
mochi.MochiScores.showLeaderboard({boardID:"87f745cbb17f2a1e", score:_root.n_Score});
stop();
Frame 7
gotoAndPlay ("Menu");
Frame 8
this.stop();
Frame 9
this.stop();
Symbol 4 MovieClip [Messages] Frame 34
this.removeMovieClip();
Symbol 38 MovieClip [ObjectGraphics] Frame 1
this.stop();
Symbol 38 MovieClip [ObjectGraphics] Frame 2
this.stop();
Symbol 38 MovieClip [ObjectGraphics] Frame 3
this.stop();
Symbol 38 MovieClip [ObjectGraphics] Frame 4
this.stop();
Symbol 38 MovieClip [ObjectGraphics] Frame 5
this.stop();
Symbol 38 MovieClip [ObjectGraphics] Frame 6
this.stop();
Symbol 38 MovieClip [ObjectGraphics] Frame 7
this.stop();
Symbol 38 MovieClip [ObjectGraphics] Frame 8
this.stop();
Symbol 38 MovieClip [ObjectGraphics] Frame 9
this.stop();
Symbol 38 MovieClip [ObjectGraphics] Frame 10
this.stop();
Symbol 38 MovieClip [ObjectGraphics] Frame 11
this.stop();
Symbol 38 MovieClip [ObjectGraphics] Frame 12
this.stop();
Symbol 38 MovieClip [ObjectGraphics] Frame 13
this.stop();
Symbol 47 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) && (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 47 MovieClip [Progress] Frame 2
this.f_showProgress();
Symbol 47 MovieClip [Progress] Frame 4
this.f_showProgress();
Symbol 48 MovieClip [Object] Frame 1
var n_TypeID;
var b_Init;
var n_Strength;
var n_ShotStrength;
var n_Points;
var b_Dead;
var n_Speed;
var n_Direction;
var n_X;
var n_Y;
var n_SinMulti;
var n_SinStep;
var n_SinPos;
var n_CosMulti;
var n_CosStep;
var n_CosPos;
var b_Frozen;
var d_FrozenFrom;
var n_FrozenLength;
var d_LastFire;
var n_ShotGroupID;
this.onEnterFrame = function () {
var _local5;
var _local4;
var _local6;
var _local3;
var _local7;
if (!_root.b_Paused) {
if (this.n_Strength <= 0) {
_root.f_PopObject(this, true);
} else {
this.o_Strength.n_CurrentValue = this.n_Strength;
if (!b_Frozen) {
n_X = n_X + (n_Speed * n_Direction);
n_SinPos = _root.f_DegreeTransform(n_SinPos, n_SinStep);
n_CosPos = _root.f_DegreeTransform(n_CosPos, n_CosStep);
_local5 = n_CosPos / 57.2957795130823;
_local4 = n_SinPos / 57.2957795130823;
_local3 = n_X + ((n_CosMulti * (Math.cos(_local5) * Math.PI)) * -1);
_local7 = n_Y + ((n_SinMulti * Math.sin(_local4 * -1)) * Math.PI);
_local6 = (_local3 - this._x) * 5;
this._x = _local3;
this._y = _local7;
if (this._y < 0) {
this._y = 0;
}
if (this._y > _root.n_ObjectCreateXLower) {
this._y = _root.n_ObjectCreateXLower;
}
if ((((n_Direction == 1) && (this._x > _root.n_GameWidth)) && (n_X > _root.n_GameWidth)) || (((n_Direction == -1) && (this._x < 0)) && (n_X < 0))) {
_root.f_PopObject(this, false);
} else {
this.o_Graphics._rotation = 0 + _local6;
if (_root.o_ObjectArray[n_TypeID - 1][6] > 0) {
if (d_LastFire == undefined) {
d_LastFire = new Date();
}
if (_root.f_TimeDiff(this.d_LastFire, new Date()) >= _root.o_ObjectArray[n_TypeID - 1][6]) {
_root.f_FireProjectile(this, _root.o_ObjectArray[n_TypeID - 1][7], 2, 0, (Math.random() * _root.n_ProjectilesVariance) - (_root.n_ProjectilesVariance / 2), 0, n_ShotStrength);
this.d_LastFire = new Date();
}
}
}
} else if (_root.f_TimeDiff(this.d_FrozenFrom, new Date()) >= n_FrozenLength) {
b_Frozen = false;
}
}
}
};
Symbol 48 MovieClip [Object] Frame 2
this.gotoAndPlay("Loop");
Symbol 69 MovieClip [Pickup] Frame 1
var b_Init;
var n_XVelocity;
var n_YVelocity;
var n_Direction;
var b_Moving;
var n_AmmoMultiplier;
var n_TypeID;
var n_SubTypeID;
var d_BeginRemove;
this.onEnterFrame = function () {
var _local3;
if (b_Init) {
if (this.b_Moving) {
_root.f_ApplyFall(this);
} else {
if (d_BeginRemove == undefined) {
d_BeginRemove = new Date();
}
_local3 = _root.o_ObjectContainer.o_Turret.o_Body._width / 2;
if ((_root.o_ObjectContainer.o_Turret._x >= (this._x - _local3)) && (_root.o_ObjectContainer.o_Turret._x <= (this._x + _local3))) {
if (n_TypeID == 1) {
_root.n_Ammo = _root.n_Ammo + (_root.n_AmmoPerPickUp * n_AmmoMultiplier);
} else if (n_TypeID == 2) {
_root.f_CollectPowerup(n_SubTypeID);
}
this.removeMovieClip();
} else if (_root.f_OverTimeDiff(d_BeginRemove, new Date(), _root.n_PickupLifeTime)) {
this.removeMovieClip();
}
}
}
};
Symbol 69 MovieClip [Pickup] Frame 2
this.gotoAndPlay(1);
Symbol 76 MovieClip [ProjectileGraphic] Frame 1
stop();
Symbol 76 MovieClip [ProjectileGraphic] Frame 2
stop();
Symbol 76 MovieClip [ProjectileGraphic] Frame 3
stop();
Symbol 76 MovieClip [ProjectileGraphic] Frame 4
stop();
Symbol 76 MovieClip [ProjectileGraphic] Frame 5
stop();
Symbol 76 MovieClip [ProjectileGraphic] Frame 6
stop();
Symbol 76 MovieClip [ProjectileGraphic] Frame 7
stop();
Symbol 76 MovieClip [ProjectileGraphic] Frame 8
stop();
Symbol 76 MovieClip [ProjectileGraphic] Frame 9
stop();
Symbol 76 MovieClip [ProjectileGraphic] Frame 10
stop();
Symbol 77 MovieClip [Projectile] Frame 1
var n_Strength;
var b_Init;
var d_Created;
var n_FireSpeed;
var n_Angle;
var n_TypeID;
var n_TeamID;
var n_ShotGroupID;
this.onEnterFrame = function () {
var _local3;
var _local4;
var _local5;
var _local6 = false;
var _local7 = _root.o_Upgrades[_root.n_InvulID][0];
if ((b_Init != null) && (!_root.b_Paused)) {
if (n_TeamID == 1) {
_local4 = 0;
while (_local4 <= _root.n_ObjectsUpperLimit) {
_local3 = _root.o_ObjectContainer["Object_" + _local4.toString()];
if (_local3 != undefined) {
if (this.hitTest(_local3.o_Graphics)) {
if (_local3.n_Strength != undefined) {
_local5 = this.n_Strength - _local3.n_Strength;
_local3.n_ShotGroupID = this.n_ShotGroupID;
this.n_Strength = _local5;
if (_local5 < 0) {
_local3.n_Strength = _local5 * -1;
} else {
_local3.n_Strength = 0;
}
}
}
}
_local4++;
}
} else {
_local3 = _root.o_ObjectContainer.o_Turret;
if (_local3 != undefined) {
if (_local3.hitTest(this._x, this._y, true)) {
_root.o_ObjectContainer.o_Turret.o_Shield.gotoAndPlay("ShieldHit");
if (!_local7) {
_root.n_TurretHealth = _root.n_TurretHealth - this.n_Strength;
}
_root.f_PlaySound("o_Explosions", "ShieldHit");
_local6 = true;
}
}
}
if (this.n_Strength > 0) {
_root.f_MoveProjectile(this);
if ((((this._x < (_root.n_GameCheckBorder * -1)) || (this._x > (_root.n_GameWidth + _root.n_GameCheckBorder))) || (this._y < (_root.n_GameCheckBorder * -1))) || (this._y > (_root.n_GameHeight + _root.n_GameCheckBorder))) {
_local6 = true;
}
} else {
_local6 = true;
}
}
if (_local6) {
_root.a_ShotGrouping[n_ShotGroupID]--;
if ((_root.a_ShotGrouping[n_ShotGroupID] <= 0) && (n_ShotGroupID >= 0)) {
_root.f_EndShotGrouping(n_ShotGroupID);
}
this.removeMovieClip();
}
};
Symbol 77 MovieClip [Projectile] Frame 2
this.gotoAndPlay(1);
Symbol 80 MovieClip [SmokeWhisp] Frame 16
this.removeMovieClip();
Symbol 88 MovieClip [Explosions] Frame 22
this.removeMovieClip();
Symbol 88 MovieClip [Explosions] Frame 35
this.removeMovieClip();
Symbol 90 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 90 MovieClip [Score] Frame 2
gotoAndPlay (1);
Symbol 106 Button [ClickToPlayGame]
on (release) {
trace("here");
_root.gotoAndPlay("Splash");
}
Symbol 107 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 107 MovieClip [Loader] Frame 3
gotoAndPlay ("Looper");
Symbol 107 MovieClip [Loader] Frame 4
if (_root.s_GameAds == "cpmstar") {
if (_root.f_TimeDiff(_root.d_AdvertStartTime, new Date()) >= _root.n_CPMWaitTime) {
this.gotoAndPlay("PlayGame");
}
} else {
this.stop();
}
Symbol 107 MovieClip [Loader] Frame 5
this.gotoAndPlay("End");
Symbol 107 MovieClip [Loader] Frame 6
this.stop();
Symbol 112 Button [NakedDevBigLogo]
on (release) {
getURL ("http://www.thenakeddeveloper.com", "_blank");
}
Symbol 314 MovieClip [__Packages.mochi.MochiServices] Frame 0
class mochi.MochiServices
{
static var _id, _container, _clip, _sendChannelName, __get__comChannelName, onError, _listenChannel, _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.43");
}
static function allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function get isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function set comChannelName(val) {
if (val != undefined) {
if (val.length > 3) {
_sendChannelName = val + "_fromgame";
initComChannels();
}
}
//return(__get__comChannelName());
}
static function get connected() {
return(_connected);
}
static function connect(id, clip, onError) {
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();
}
}
static function init(id, clip) {
_id = id;
if (clip != undefined) {
_container = clip;
} else {
_container = _root;
}
loadCommunicator(id, _container);
}
static function loadCommunicator(id, clip) {
var _local3 = "_mochiservices_com_" + id;
if (_clip != null) {
return(_clip);
}
if (!isNetworkAvailable) {
return(null);
}
if (urlOptions().servicesURL != undefined) {
_servicesURL = urlOptions().servicesURL;
}
allowDomains(_servicesURL);
_clip = clip.createEmptyMovieClip(_local3, 10336, false);
_listenChannelName = _listenChannelName + ((Math.floor(new Date().getTime()) + "_") + Math.floor(Math.random() * 99999));
_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((((_servicesURL + "?listenLC=") + _listenChannelName) + "&mochiad_options=") + escape(_root.mochiad_options), _clip);
_sendChannel = new LocalConnection();
_sendChannel._queue = [];
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._nextcallbackID = 0;
_listenChannel._callbacks = {};
_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()});
_listenChannel.onStatus = function (infoObject) {
mochi.MochiServices.onStatus(infoObject);
};
_listenChannel.onReceive = function (pkg) {
var _local5 = pkg.callbackID;
var _local4 = this._callbacks[_local5];
if (!_local4) {
return(undefined);
}
var _local2 = _local4.callbackMethod;
var _local3 = _local4.callbackObject;
if (_local3 && (typeof(_local2) == "string")) {
_local2 = _local3[_local2];
}
if (_local2 != undefined) {
_local2.apply(_local3, pkg.args);
}
delete this._callbacks[_local5];
};
_listenChannel.onError = function () {
mochi.MochiServices.onError.apply(null, ["IOError"]);
};
trace("connected!");
_connecting = false;
_connected = true;
while (_sendChannel._queue.length > 0) {
_sendChannel.send(_sendChannelName, "onReceive", _sendChannel._queue.shift());
}
}
}
static function flush(error) {
var _local1;
var _local2;
while (_sendChannel._queue.length > 0) {
_local1 = _sendChannel._queue.shift();
if (_local1.callbackID != null) {
_local2 = _listenChannel._callbacks[_local1.callbackID];
}
delete _listenChannel._callbacks[_local1.callbackID];
if (error) {
handleError(_local1.args, _local2.callbackObject, _local2.callbackMethod);
}
}
}
static function handleError(args, callbackObject, callbackMethod) {
if (args != null) {
if (args.onError != null) {
args.onError.apply(null, ["NotConnected"]);
}
if ((args.options != null) && (args.options.onError != null)) {
args.options.onError.apply(null, ["NotConnected"]);
}
}
if (callbackMethod != null) {
args = {};
args.error = true;
args.errorCode = "NotConnected";
if ((callbackObject != null) && (typeof(callbackMethod) == "string")) {
callbackObject[callbackMethod](args);
} else if (callbackMethod != null) {
callbackMethod.apply(args);
}
}
}
static function send(methodName, args, callbackObject, callbackMethod) {
if (_connected) {
_sendChannel.send(_sendChannelName, "onReceive", {methodName:methodName, args:args, callbackID:_listenChannel._nextcallbackID});
} else {
if ((_clip == undefined) || (!_connecting)) {
onError.apply(null, ["NotConnected"]);
handleError(args, callbackObject, callbackMethod);
flush(true);
return(undefined);
}
_sendChannel._queue.push({methodName:methodName, args:args, callbackID:_listenChannel._nextcallbackID});
}
_listenChannel._callbacks[_listenChannel._nextcallbackID] = {callbackObject:callbackObject, callbackMethod:callbackMethod};
_listenChannel._nextcallbackID++;
}
static function urlOptions() {
var _local5 = {};
if (_root.mochiad_options) {
var _local4 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = _local4[_local2].split("=");
_local5[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
return(_local5);
}
static function addLinkEvent(url, burl, btn, onClick) {
var timeout = 1500;
var t0 = getTimer();
var _local2 = new Object();
_local2.mav = getVersion();
_local2.swfv = btn.getSWFVersion() || 6;
_local2.swfurl = btn._url;
_local2.fv = System.capabilities.version;
_local2.os = System.capabilities.os;
_local2.lang = System.capabilities.language;
_local2.scres = (System.capabilities.screenResolutionX + "x") + System.capabilities.screenResolutionY;
var s = "?";
var _local3 = 0;
for (var _local6 in _local2) {
if (_local3 != 0) {
s = s + "&";
}
_local3++;
s = ((s + _local6) + "=") + escape(_local2[_local6]);
}
if (!(netupAttempted || (_connected))) {
var ping = btn.createEmptyMovieClip("ping", 777);
var _local7 = btn.createEmptyMovieClip("nettest", 778);
netupAttempted = true;
ping.loadMovie("http://x.mochiads.com/linkping.swf?t=" + getTimer());
_local7.onEnterFrame = function () {
if ((ping._totalframes > 0) && (ping._totalframes == ping._framesloaded)) {
delete this.onEnterFrame;
} else if ((getTimer() - t0) > timeout) {
delete this.onEnterFrame;
mochi.MochiServices.netup = false;
}
};
}
var _local4 = btn.createEmptyMovieClip("clk", 1001);
_local4._alpha = 0;
_local4.beginFill(1044735);
_local4.moveTo(0, 0);
_local4.lineTo(0, btn._height);
_local4.lineTo(btn._width, btn._height);
_local4.lineTo(btn._width, 0);
_local4.lineTo(0, 0);
_local4.endFill();
_local4.onRelease = function () {
if (mochi.MochiServices.netup) {
getURL (url + s, "_blank");
} else {
getURL (burl, "_blank");
}
if (onClick != undefined) {
onClick();
}
};
}
static var _servicesURL = "http://www.mochiads.com/static/lib/services/services.swf";
static var _listenChannelName = "__ms_";
static var _connecting = false;
static var _connected = false;
static var netup = true;
static var netupAttempted = false;
}
Symbol 315 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 316 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) || (options.clip == undefined)) {
options.clip = mochi.MochiServices.clip;
}
if ((options.clip != mochi.MochiServices.__get__clip()) || (mochi.MochiServices.__get__childClip()._target == undefined)) {
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 (options.score instanceof TextField) {
if (options.score.text != undefined) {
options.score = options.score.text;
}
} else if (options.score instanceof mochi.MochiDigits) {
options.score = options.score.value;
}
var _local1 = Number(options.score);
if (isNaN(_local1)) {
trace(("ERROR: Submitted score '" + options.score) + "' will be rejected, score is 'Not a Number'");
} else if ((_local1 == Number.NEGATIVE_INFINITY) || (_local1 == Number.POSITIVE_INFINITY)) {
trace(("ERROR: Submitted score '" + options.score) + "' will be rejected, score is an infinite");
} else {
if (Math.floor(_local1) != _local1) {
trace(("WARNING: Submitted score '" + options.score) + "' will be truncated");
}
options.score = _local1;
}
}
if (options.onDisplay != null) {
options.onDisplay();
} else {
mochi.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) {
score = Number(score);
if (isNaN(score)) {
trace(("ERROR: Submitted score '" + String(score)) + "' will be rejected, score is 'Not a Number'");
} else if ((score == Number.NEGATIVE_INFINITY) || (score == Number.POSITIVE_INFINITY)) {
trace(("ERROR: Submitted score '" + String(score)) + "' will be rejected, score is an infinite");
} else {
if (Math.floor(score) != score) {
trace(("WARNING: Submitted score '" + String(score)) + "' will be truncated");
}
score = Number(score);
}
mochi.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 317 MovieClip [__Packages.mochi.MochiDigits] Frame 0
class mochi.MochiDigits
{
var Encoder, Fragment, Sibling;
function MochiDigits (digit, index) {
Encoder = 0;
setValue(digit, index);
}
function get value() {
return(Number(toString()));
}
function set value(v) {
setValue(v);
//return(value);
}
function addValue(v) {
value = value + v;
}
function setValue(digit, index) {
var _local3 = digit.toString();
if ((index == undefined) || (isNaN(index))) {
index = 0;
}
Fragment = _local3.charCodeAt(index++) ^ Encoder;
if (index < _local3.length) {
Sibling = new mochi.MochiDigits(digit, index);
} else {
Sibling = null;
}
reencode();
}
function reencode() {
var _local2 = int(2147483647 * Math.random());
Fragment = Fragment ^ (_local2 ^ Encoder);
Encoder = _local2;
}
function toString() {
var _local2 = String.fromCharCode(Fragment ^ Encoder);
return(((Sibling != null) ? (_local2.concat(Sibling.toString())) : (_local2)));
}
}
Symbol 115 Button [SplashButton]
on (release) {
getURL ("www.thenakeddeveloper.com", "_blank");
}
Symbol 116 MovieClip [SplashGraphics] Frame 73
_root.b_SoundsOn = true;
_root.f_PlaySound("o_Sounds", "GameMusic");
_root.play();
Symbol 126 MovieClip [Sounds] Frame 2
gotoAndStop (1);
Symbol 126 MovieClip [Sounds] Frame 4
gotoAndStop (1);
Symbol 126 MovieClip [Sounds] Frame 6
gotoAndStop (1);
Symbol 126 MovieClip [Sounds] Frame 8
gotoAndStop (1);
Symbol 126 MovieClip [Sounds] Frame 10
gotoAndStop (1);
Symbol 126 MovieClip [Sounds] Frame 12
gotoAndStop (1);
Symbol 126 MovieClip [Sounds] Frame 14
gotoAndStop (1);
Symbol 126 MovieClip [Sounds] Frame 16
gotoAndStop (1);
Symbol 126 MovieClip [Sounds] Frame 18
gotoAndStop (1);
Symbol 131 MovieClip [ExplosionSounds] Frame 2
gotoAndStop (1);
Symbol 131 MovieClip [ExplosionSounds] Frame 4
this.stop();
Symbol 131 MovieClip [ExplosionSounds] Frame 6
this.stop();
Symbol 131 MovieClip [ExplosionSounds] Frame 8
this.stop();
Symbol 131 MovieClip [ExplosionSounds] Frame 10
this.stop();
Symbol 131 MovieClip [ExplosionSounds] Frame 12
this.stop();
Symbol 152 Button [StartGame]
on (release) {
_root.gotoAndPlay("Instructions");
}
Symbol 160 Button
on (release) {
_root.f_ShowScores(true);
}
Symbol 167 Button [SoundsOff]
on (release) {
_root.f_ToggleSounds();
}
Symbol 170 Button [SoundsOn]
on (release) {
_root.f_ToggleSounds();
}
Symbol 171 MovieClip [SoundsOnOff] Frame 1
if (_root.b_SoundsOn == false) {
this.gotoAndPlay("Off");
} else {
this.gotoAndPlay("On");
}
Symbol 171 MovieClip [SoundsOnOff] Frame 3
if (_root.b_SoundsOn) {
this.gotoAndPlay("On");
} else {
this.gotoAndPlay("Off");
}
Symbol 171 MovieClip [SoundsOnOff] Frame 5
if (_root.b_SoundsOn) {
this.gotoAndPlay("On");
} else {
this.gotoAndPlay("Off");
}
Symbol 175 Button [StartGameFromLastLevel]
on (release) {
_root.b_StartFromLast = true;
_root.b_GameInit = undefined;
_root.gotoAndPlay("Game");
}
Symbol 179 Button [Instructions]
on (release) {
this.gotoAndPlay("Instructions");
}
Symbol 181 MovieClip Frame 91
this.stop();
Symbol 182 MovieClip Frame 35
this.stop();
Symbol 185 MovieClip [Ammo] Frame 1
var s_AmmoString = ("00000" + _root.n_Ammo.toString()).toString();
if (_root.n_Ammo != undefined) {
this.AmmoText.text = s_AmmoString.substring(s_AmmoString.length - 5, s_AmmoString.length);
} else {
this.AmmoText.text = "00000";
}
Symbol 185 MovieClip [Ammo] Frame 2
gotoAndPlay (1);
Symbol 194 MovieClip [ObjectGraphicsSmall] Frame 1
this.stop();
Symbol 194 MovieClip [ObjectGraphicsSmall] Frame 2
this.stop();
Symbol 194 MovieClip [ObjectGraphicsSmall] Frame 3
this.stop();
Symbol 194 MovieClip [ObjectGraphicsSmall] Frame 4
this.stop();
Symbol 194 MovieClip [ObjectGraphicsSmall] Frame 5
this.stop();
Symbol 199 MovieClip [Powerups] Frame 2
this.stop();
Symbol 199 MovieClip [Powerups] Frame 4
this.stop();
Symbol 199 MovieClip [Powerups] Frame 6
this.stop();
Symbol 199 MovieClip [Powerups] Frame 8
this.stop();
Symbol 199 MovieClip [Powerups] Frame 10
this.stop();
Symbol 199 MovieClip [Powerups] Frame 12
this.stop();
Symbol 199 MovieClip [Powerups] Frame 14
this.stop();
Symbol 199 MovieClip [Powerups] Frame 16
this.stop();
Symbol 199 MovieClip [Powerups] Frame 18
this.stop();
Symbol 199 MovieClip [Powerups] Frame 20
this.stop();
Symbol 199 MovieClip [Powerups] Frame 22
this.stop();
Symbol 211 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 211 MovieClip [PowerupInstructions] Frame 2
this.f_ShowInstruction();
Symbol 211 MovieClip [PowerupInstructions] Frame 4
this.f_ShowInstruction();
Symbol 211 MovieClip [PowerupInstructions] Frame 6
this.f_ShowInstruction();
Symbol 211 MovieClip [PowerupInstructions] Frame 8
this.f_ShowInstruction();
Symbol 211 MovieClip [PowerupInstructions] Frame 10
this.f_ShowInstruction();
Symbol 211 MovieClip [PowerupInstructions] Frame 12
this.f_ShowInstruction();
Symbol 211 MovieClip [PowerupInstructions] Frame 14
this.f_ShowInstruction();
Symbol 211 MovieClip [PowerupInstructions] Frame 16
this.f_ShowInstruction();
Symbol 212 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());
var n_FromMSecs = (_root.o_Upgrades[n_UpgradeNumber][1].getTime() + _root.o_Upgrades[n_UpgradeNumber][4]);
var n_ToMSecs = new Date().getTime();
var n_Diff = (n_ToMSecs - n_FromMSecs);
this.o_Progress.n_MaxValue = _root.o_Upgrades[n_UpgradeNumber][4];
if (n_Diff > 0) {
this.o_Progress.n_CurrentValue = _root.o_Upgrades[n_UpgradeNumber][4];
} else {
this.o_Progress.n_CurrentValue = _root.o_Upgrades[n_UpgradeNumber][4] + n_Diff;
}
n_FromMSecs = _root.o_Upgrades[n_UpgradeNumber][2].getTime() + _root.o_Upgrades[n_UpgradeNumber][3];
n_Diff = n_ToMSecs - n_FromMSecs;
this.o_ActiveProgress.n_MaxValue = _root.o_Upgrades[n_UpgradeNumber][3];
if (n_Diff > 0) {
this.o_ActiveProgress.n_CurrentValue = _root.o_Upgrades[n_UpgradeNumber][3];
_root.o_Upgrades[n_UpgradeNumber][0] = 0;
} else {
this.o_ActiveProgress.n_CurrentValue = _root.o_Upgrades[n_UpgradeNumber][3] + n_Diff;
_root.o_Upgrades[n_UpgradeNumber][0] = 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 212 MovieClip [PowerupControl] Frame 2
gotoAndPlay (1);
Symbol 226 MovieClip [TurretInvulEffect] Frame 1
this.stop();
Symbol 226 MovieClip [TurretInvulEffect] Frame 2
_root.f_PlaySound("o_Sounds", "Pulse");
Symbol 226 MovieClip [TurretInvulEffect] Frame 10
if (_root.o_Upgrades[_root.n_InvulID][0]) {
this.gotoAndPlay("Invul");
} else {
this.gotoAndStop("NoInvul");
}
Symbol 229 MovieClip [TurretRechargeEffect] Frame 1
this.stop();
Symbol 229 MovieClip [TurretRechargeEffect] Frame 2
Symbol 229 MovieClip [TurretRechargeEffect] Frame 10
this.gotoAndStop("NoRecharge");
Symbol 230 MovieClip [TurretShieldEffect] Frame 1
this.stop();
Symbol 230 MovieClip [TurretShieldEffect] Frame 2
Symbol 230 MovieClip [TurretShieldEffect] Frame 10
this.gotoAndStop("NoShield");
Symbol 233 MovieClip [Turret_Point] Frame 1
stop();
Symbol 233 MovieClip [Turret_Point] Frame 8
this.gotoAndPlay("Static");
Symbol 241 MovieClip [Turret] Frame 1
this.onEnterFrame = function () {
this.o_TurretHealth.n_CurrentValue = _root.n_TurretHealth;
};
Symbol 241 MovieClip [Turret] Frame 2
if ((_root.n_TurretHealth > 0) || (!_root.b_GameInit)) {
this.gotoAndPlay("Movement");
}
Symbol 241 MovieClip [Turret] Frame 6
_root.f_PlaySound("o_Explosions", "Die");
Symbol 241 MovieClip [Turret] Frame 26
_root.f_PlaySound("o_Explosions", "Die");
Symbol 241 MovieClip [Turret] Frame 46
_root.f_PlaySound("o_Explosions", "Die");
Symbol 241 MovieClip [Turret] Frame 70
_root.gotoAndPlay("HiScores");
Symbol 255 MovieClip [FreezeRay] Frame 1
stop();
Symbol 255 MovieClip [FreezeRay] Frame 2
_root.f_PlaySound("o_Explosions", "FreezeRay");
Symbol 255 MovieClip [FreezeRay] Frame 18
if (_root.o_Upgrades[_root.n_FreezeRayID][0] == 0) {
this.gotoAndPlay("KillFreeze");
}
Symbol 255 MovieClip [FreezeRay] Frame 19
this.gotoAndPlay("FreezeStay");
Symbol 255 MovieClip [FreezeRay] Frame 20
gotoAndStop (1);
Symbol 267 MovieClip Frame 1
stop();
Symbol 267 MovieClip Frame 2
_root.f_PlaySound("o_Explosions", "Smartbomb");
Symbol 267 MovieClip Frame 18
var n_Counter;
var o_Object;
_root.n_ShotGroupCurrent++;
if (_root.n_ShotGroupCurrent >= _root.n_ShotGroupMax) {
_root.n_ShotGroupCurrent = 0;
}
_root.a_ShotGrouping[_root.n_ShotGroupCurrent] = 0;
_root.a_ShotGroupingKillCounts[_root.n_ShotGroupCurrent] = 0;
_root.a_ShotGroupingKillPoints[_root.n_ShotGroupCurrent] = 0;
n_Counter = 0;
while (n_Counter <= _root.n_ObjectsUpperLimit) {
o_Object = _root.o_ObjectContainer["Object_" + n_Counter.toString()];
if (o_Object != undefined) {
o_Object.n_Strength = o_Object.n_Strength - _root.n_UpgradeSmartbombPower;
o_Object.n_ShotGroupID = _root.n_ShotGroupCurrent;
if (o_Object.n_Strength <= 0) {
_root.a_ShotGroupingKillCounts[_root.n_ShotGroupCurrent]++;
_root.a_ShotGroupingKillPoints[_root.n_ShotGroupCurrent] = _root.a_ShotGroupingKillPoints[_root.n_ShotGroupCurrent] + o_Object.n_Points;
}
}
n_Counter++;
}
_root.f_EndShotGrouping(_root.n_ShotGroupCurrent);
gotoAndStop (1);
Symbol 270 MovieClip [WinFlash] Frame 1
this.stop();
Symbol 270 MovieClip [WinFlash] Frame 45
this.gotoAndStop("Normal");
Symbol 281 Button
on (release) {
trace("here");
_root.gotoAndPlay("Menu");
}
Symbol 284 Button [Highscores_ClickFor]
on (release) {
_root.f_ShowScores(false);
}
Symbol 308 Button [StarGameFromInstructions]
on (release) {
_root.b_StartFromLast = false;
_root.b_GameInit = undefined;
_root.gotoAndPlay("Game");
}
Symbol 313 Button [ReturnToMenu]
on (release) {
this.gotoAndPlay("Menu");
}