Frame 1
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
var pv;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
pv = ((fv == 5) ? (getVersion()) : (System.capabilities.version));
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=8&fv=") + fv) + "&v=") + escape(pv)) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
function onEnterFrame() {
urlStart = _url.indexOf("://") + 3;
urlEnd = _url.indexOf("/", urlStart);
domain = _url.substring(urlStart, urlEnd);
LastDot = domain.lastIndexOf(".") - 1;
domEnd = domain.lastIndexOf(".", LastDot) + 1;
domain = domain.substring(domEnd, domain.length);
if (domain != "flashgamelicense.com") {
}
}
function itemHandler1(obj, item) {
getURL ("http://freegamesonline.com");
}
function itemHandler2(obj, item) {
getURL ("http://portalstrike.com");
}
stop();
__com_mochibot__("f6748f42", this, 10301, true);
on_frame = 1;
mochi.MochiServices.connect("89db28dbf8b4a93c");
var myMenu = new ContextMenu();
myMenu.hideBuiltInItems();
item1 = new ContextMenuItem("Play More Games", itemHandler1);
item2 = new ContextMenuItem("Developers Site", itemHandler2);
myMenu.customItems.push(item1);
myMenu.customItems.push(item2);
_root.menu = myMenu;
Instance of Symbol 313 MovieClip "main" in Frame 1
//component parameters
onClipEvent (construct) {
xin_motion_val = "Toward";
xin_alphatype_val = "No";
xout_motion_val = "None";
xout_alphatype_val = "No";
perc_req_val = 100;
show_perc_val = "Yes";
slow_factor_val = 0.2;
init_action_val = "_root.stop();";
play_action_val = "_root.play();";
}
Instance of Symbol 265 MovieClip [portalstrike] in Frame 1
on (release) {
getURL ("http://www.portalstrike.com/", "_blank");
}
Frame 2
stop();
Frame 3
function countBadges() {
i = 0;
while (i < awardsRecieved.length) {
if (awardsRecieved[i] == 1) {
counter = counter + 1;
}
i++;
}
awardsTotal = counter;
}
function onEnterFrame() {
var _local2 = _xmouse - aim._x;
var _local1 = _ymouse - aim._y;
aim._x = aim._x + (_local2 / 2);
aim._y = aim._y + (_local1 / 2);
}
function createHover(movie, a) {
movie.onRollOver = function () {
movie.bb._alpha = 20;
bName = bnames[a];
bInfo = descriptions[a];
};
movie.onRollOut = function () {
movie.bb._alpha = 10;
};
movie.onReleaseOutside = function () {
movie.bb._alpha = 10;
};
}
function badgeCounter(array1) {
var _local4 = array1.length;
var _local2 = 0;
var _local3 = 0;
b = array1.length;
while (b >= 0) {
if (awardsRecieved[array1[b]] == 1) {
_local2 = _local2 + 1;
}
b--;
}
_local3 = (_local2 / _local4) * 100;
if (_local3 >= 25) {
badges = badges + 1;
}
if (_local3 >= 50) {
badges = badges + 1;
}
if (_local3 >= 75) {
badges = badges + 1;
}
if (_local3 >= 100) {
badges = badges + 1;
}
}
stop();
on_frame = 2;
Mouse.hide();
sObject = SharedObject.getLocal("objectName");
if (sObject.data.insanemode > 0) {
insaneMode = sObject.data.insanemode;
} else {
insaneMode = false;
}
bnames = new Array("Standard Legion", "Survival Mode", "Badges", "Credits", "More Games", "Instructions", "HighScores");
descriptions = new Array("In Standard Legion you have the option to choose between a small, medium, and large legion of enemies to battle. This is the main mode of the game.", "In Survival Mode the goal of the game is simply to kill as many enemies as possible without dying yourself. This mode is needed to unlock some of the time achievements.", "This is the page where you can see which badges you've unlocked, and which achievements you need to obtain for each badge.", "Here you will find everyone that contributed to this game, and their websites.", "Do you like this game? Find more great games at freegamesonline.com!", "Learn how to play the game.", "Think you're an expert at this game? Think again! Compete with millions of others and try to achieve the number 1 Highscore");
bName = bnames[0];
bInfo = descriptions[0];
seconds = 0;
minutes = 0;
hours = 0;
if (sObject.data.second > 0) {
seconds = sObject.data.second;
}
if (sObject.data.minute > 0) {
minutes = sObject.data.minute;
}
if (sObject.data.hour > 0) {
hours = sObject.data.hour;
}
personalHighScore = 0;
if (sObject.data.phs > 0) {
personalHighScore = sObject.data.phs;
}
awardsRecieved = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
awards = new Array("Start the game", "First Kill", "P.C. Killed", "N.C. Killed", "Repliclone Killed", "DeathRupture Killed", "Giga Cell Killed", "N.C.+ Killed", "Charger Killed", "Swinger Killed", "Ghost Cell Killed", "All Cells Killed", "10 Kills", "100 Kills", "500 Kills", "2000 Kills", "10000 Kills", "Completed Small Legion", "Completed Medium Legion", "Completed Large Legion", "Completed Insane Legion", "Play for 5 minutes", "Play for 15 minutes", "Play for 30 minutes", "Play for 60 minutes", "Play for 120 minutes", "Last 1 minute in survival", "Last 2 minutes in survival", "Last 3 minutes in survival", "Last 5 minutes in survival", "10 Minute Survival Run", "Die", "5 Deaths", "10 Deaths", "25 Deaths", "100 Deaths", "ExtraLife", "FasterShot", "TripleShot", "Die from P.C.", "Die from N.C.", "Die from Repliclone", "Die from DeathRupture", "Die from Giga Cell", "Die from N.C.+", "Die from Charger", "Die from Swinger", "Die from Ghost Cell", "Die from Black OOZE", "Untouchable", "Coward", "Beyond", "Speed Devil", "Going Stale", "Maniac", "Gimme a Break", "Close One", "So Close", "The Devil", "Double Shot", "Newbie", "Beginner", "High Beginner", "Low Intermediate", "Intermediate", "High Intermediate", "Low Veteran", "Veteran", "High Veteran", "Elite", "Unlock 10 Awards", "Unlock 20 Awards", "Unlock 30 Awards", "Unlock 40 Awards", "Unlock 50 Awards", "Unlock 60 Awards", "Unlock 70 Awards", "All Awards Unlocked!");
i = 0;
while (i <= 100) {
if (sObject.data.completed_levels[i] == 1) {
awardsRecieved[i] = 1;
}
i++;
}
attachMovie("aim", "aim", 100000);
counter = 0;
awardsTotal = 0;
countBadges();
if (firster == undefined) {
firster = 0;
oldBadges = awardsTotal;
}
if (oldBadges == undefined) {
oldBadges = 0;
}
mg.onPress = function () {
getURL ("http://www.freegamesonline.com/", "_blank");
};
mg3.onPress = function () {
getURL ("http://www.freegamesonline.com/", "_blank");
};
sl.onPress = function () {
if (options._alpha <= 0) {
options._alpha = 100;
t1._x = t1._x - 25;
t2._x = t2._x + 25;
if (!insaneMode) {
options.il1._alpha = 0;
}
} else {
t1._x = t1._x + 25;
t2._x = t2._x - 25;
options._alpha = 0;
}
};
options.sl1.onRelease = function () {
if (options._alpha > 10) {
gotoAndStop (4);
enemiesLeft = 500;
lSize = 1;
}
};
hs.onRelease = function () {
Mouse.show();
mochi.MochiScores.showLeaderboard({boardID:"89db28dbf8b4a93c", onClose:function () {
gotoAndStop (3);
Mouse.hide();
}});
};
options.ml1.onRelease = function () {
if (options._alpha > 10) {
gotoAndStop (4);
enemiesLeft = 750;
lSize = 2;
}
};
options.ll1.onRelease = function () {
if (options._alpha > 10) {
gotoAndStop (4);
enemiesLeft = 1000;
lSize = 3;
}
};
options.il1.onRelease = function () {
if (options.il1._alpha > 10) {
gotoAndStop (4);
enemiesLeft = 1500;
lSize = 4;
}
};
sur.onRelease = function () {
gotoAndStop (4);
lSize = 0;
enemiesLeft = 100000 /* 0x0186A0 */;
};
ins.onRelease = function () {
gotoAndStop (6);
};
awa.onRelease = function () {
countBadges();
gotoAndStop (7);
};
bes2.onRelease = function () {
};
if (insaneMode) {
options.ll1._x = options.ll1._x - 118;
}
bes2.onPress = function () {
gotoAndStop (15);
};
a = 0;
createHover(sl, 0);
createHover(options.il1, 0);
createHover(sur, 1);
createHover(awa, 2);
createHover(bes2, 3);
createHover(mg, 4);
createHover(ins, 5);
createHover(hs, 6);
createHover(options.sl1, 0);
createHover(options.ml1, 0);
createHover(options.ll1, 0);
groupArray1 = new Array(49, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69);
groupArray2 = new Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11);
groupArray3 = new Array(0, 36, 37, 38, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59);
groupArray4 = new Array(70, 71, 72, 73, 74, 75, 76, 77);
groupArray5 = new Array(21, 22, 23, 24, 25, 26, 27, 28, 29, 30);
groupArray6 = new Array(31, 32, 33, 34, 35, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48);
groupArray7 = new Array(12, 13, 14, 15, 16, 17, 18, 19, 20);
badges = 0;
badgeCounter(groupArray1);
badgeCounter(groupArray2);
badgeCounter(groupArray3);
badgeCounter(groupArray4);
badgeCounter(groupArray5);
badgeCounter(groupArray6);
badgeCounter(groupArray7);
if (badges > oldBadges) {
awa.newBadge._alpha = 100;
} else {
awa.newBadge._alpha = 0;
}
badges = 0;
Frame 4
function upTime() {
seconds = seconds + 1;
secondsThisGame = secondsThisGame + 1;
mDownSeconds = mDownSeconds + 1;
if (mouseIsDown == 1) {
mDownSeconds = 0;
}
if (mDownSeconds == 20) {
giveAward(50);
}
if (stale == 0) {
staleSeconds = staleSeconds + 1;
if (staleSeconds == 10) {
giveAward(53);
}
} else {
staleSeconds == 0;
}
if (seconds == 60) {
seconds = 0;
minutes = minutes + 1;
if (minutes == 5) {
giveAward(21);
}
if (minutes == 15) {
giveAward(22);
}
if (minutes == 30) {
giveAward(23);
}
if (minutes == 60) {
giveAward(24);
minutes = 0;
hours = hours + 1;
if (hours == 2) {
giveAward(25);
}
}
}
sObject.data.second = seconds;
sObject.flush();
sObject.data.minute = minutes;
sObject.flush();
sObject.data.hour = hours;
sObject.flush();
}
function upTimes() {
if ((!gamepause) && (lSize == 0)) {
seconds2 = seconds2 + 1;
if (seconds2 == 60) {
seconds2 = 0;
minutes2 = minutes2 + 1;
if (minutes2 == 1) {
giveAward(26);
}
if (minutes2 == 2) {
giveAward(27);
}
if (minutes2 == 3) {
giveAward(28);
}
if (minutes2 == 5) {
giveAward(29);
}
if (minutes2 == 10) {
giveAward(30);
}
}
}
}
function giveAward(awardnum) {
if (award._currentframe == 1) {
if (awardsRecieved[awardnum] != 1) {
awardsTotal = awardsTotal + 1;
award.aname.awardName = awards[awardnum];
awardsRecieved[awardnum] = 1;
award.gotoAndPlay(2);
sObject.data.completed_levels = awardsRecieved;
sObject.flush();
if (awardsTotal >= 10) {
giveAward(70);
}
if (awardsTotal >= 20) {
giveAward(71);
if (awardsTotal == 20) {
np = attachMovie("np1", "np1" + depth, depth);
depth++;
np._x = Stage.width / 2;
np._y = 75;
}
}
if (awardsTotal >= 30) {
giveAward(72);
}
if (awardsTotal >= 40) {
giveAward(73);
if (awardsTotal == 40) {
np = attachMovie("np2", "np1" + depth, depth);
depth++;
np._x = Stage.width / 2;
np._y = 75;
}
}
if (awardsTotal >= 50) {
giveAward(74);
}
if (awardsTotal >= 60) {
giveAward(75);
if (awardsTotal == 60) {
np = attachMovie("np3", "np1" + depth, depth);
depth++;
np._x = Stage.width / 2;
np._y = 75;
}
}
if (awardsTotal >= 70) {
giveAward(76);
}
if (awardsTotal >= 77) {
giveAward(77);
np = attachMovie("np4", "np1" + depth, depth);
depth++;
np._x = Stage.width / 2;
np._y = 75;
}
}
} else {
awardqueue.push(awardnum);
}
}
function awardWait() {
if (award._currentframe == 1) {
if (awardqueue.length != 0) {
giveAward(awardqueue[0]);
awardqueue.splice(0, 1);
}
}
}
function enemyFunc() {
doit = false;
var _local2 = randRange(1, enemyAmount);
if (_local2 >= 3) {
_local2 = _local2 + 1;
}
if (_local2 == 1) {
createEnemy1();
}
if (_local2 == 2) {
var _local5 = randRange(1, 2);
if (_local5 == 1) {
createEnemy2();
} else {
_local2 = 1;
createEnemy1();
}
}
if (_local2 == 4) {
var _local5 = randRange(1, 3);
if (_local5 == 1) {
createEnemy4();
} else {
_local2 = 1;
createEnemy1();
}
}
if (_local2 == 5) {
createEnemy5();
_local2 = 8;
} else if (_local2 == 6) {
var _local5 = randRange(1, 2);
if (_local5 == 1) {
createEnemy6();
} else {
_local2 = 1;
createEnemy1();
}
} else if (_local2 == 7) {
var _local5 = randRange(1, 2);
if (_local5 == 1) {
createEnemy7();
} else {
_local2 = 1;
createEnemy1();
}
} else if (_local2 == 8) {
var _local5 = randRange(1, 2);
if (_local5 == 1) {
createEnemy8();
_local2 = 9;
doit = true;
} else {
_local2 = 1;
createEnemy1();
}
} else if (_local2 == 9) {
var _local5 = randRange(1, 2);
if (_local5 == 1) {
createEnemy10();
_local2 = 11;
} else {
_local2 = 1;
createEnemy1();
}
}
enemyType.push(_local2);
var _local6 = randRange(1, 2);
if (_local6 == 1) {
var _local4 = randRange(1, 2);
en._y = randRange(0, Stage.height);
} else {
var _local3 = randRange(1, 2);
en._x = randRange(0, Stage.width);
}
if (_local4 == 1) {
en._x = (-en._width) / 2;
if (((_local2 == 1) || (_local2 == 2)) || (_local2 == 8)) {
enemyX.push(randRange(2, 4));
} else {
enemyX.push(0);
}
enemyY.push(0);
}
if (_local4 == 2) {
en._x = Stage.width + (en._width / 2);
if (((_local2 == 1) || (_local2 == 2)) || (_local2 == 8)) {
enemyX.push(randRange(-2, -4));
} else {
enemyX.push(0);
}
enemyY.push(0);
}
if (_local3 == 1) {
en._y = (-en._height) / 2;
if (((_local2 == 1) || (_local2 == 2)) || (_local2 == 8)) {
enemyY.push(randRange(2, 4));
} else {
enemyY.push(0);
}
enemyX.push(0);
}
if (_local3 == 2) {
en._y = Stage.height + (en._height / 2);
if (((_local2 == 1) || (_local2 == 2)) || (_local2 == 8)) {
enemyY.push(randRange(-2, -4));
} else {
enemyY.push(0);
}
enemyX.push(0);
}
enemies.push(en);
if (doit == true) {
createEnemy9(enemies.length - 2);
}
var oldyX = 1;
var oldyY = 1;
var told = 0;
en.onEnterFrame = function () {
if (!gamepause) {
if ((((oldyX - this._x) == 0) && ((oldyY - this._y) == 0)) && (told <= 5)) {
told = told + 1;
if (told == 6) {
this.inside.gotoAndPlay(2);
}
}
oldyX = this._x;
oldyY = this._y;
}
};
}
function MouseDownCounter() {
mouseDownTime = mouseDownTime - 1;
if ((mouseDownTime <= 0) && (mouseIsDown == 1)) {
if (shotCount == 1) {
shotHow(0);
}
if (shotCount == 2) {
shotHow(5);
shotHow(-5);
}
if (shotCount == 3) {
shotHow(10);
shotHow(1);
shotHow(-10);
}
}
}
function shotHow(angle) {
mouseDownTime = delayTime;
if (angle == 0) {
if (awardsTotal == 78) {
sp = attachMovie("spike2", "spike" + depth, depth);
sp.gotoAndStop(2);
} else {
sp = attachMovie("spike2", "spike" + depth, depth);
}
}
if ((angle == 5) || (angle == -5)) {
sp = attachMovie("spike3", "spike" + depth, depth);
}
if (((angle == 10) || (angle == -10)) || (angle == 1)) {
sp = attachMovie("spike", "spike" + depth, depth);
if (angle == 1) {
angle = 0;
}
}
depth++;
sp._x = ball1._x;
sp._y = ball2._y;
sp._rotation = topRotation;
sp._rotation = sp._rotation + angle;
var _local3 = Math.cos((sp._rotation * Math.PI) / 180) * 20;
var _local2 = Math.sin((sp._rotation * Math.PI) / 180) * 20;
bullets.push(sp);
bulletX.push(_local3);
bulletY.push(_local2);
}
function bulletMovement() {
shaker();
i = bullets.length - 1;
while (i >= 0) {
bullets[i]._x = bullets[i]._x + bulletX[i];
bullets[i]._y = bullets[i]._y + bulletY[i];
if ((((bullets[i]._x > 640) || (bullets[i]._x < 0)) || (bullets[i]._y > 480)) || (bullets[i]._y < 0)) {
removeBullet();
}
b = enemies.length - 1;
while (b >= 0) {
if (bullets[i].hitTest(enemies[b]) && (enemyType[b] != 5)) {
if ((enemyType[b] == 11) && (enemies[b]._alpha >= 75)) {
enemyHealth[b] = enemyHealth[b] - 1;
if (awardsTotal == 78) {
enemyHealth[b] = enemyHealth[b] - 1;
}
removeBullet();
}
if (enemyType[b] != 11) {
enemyHealth[b] = enemyHealth[b] - 1;
if (awardsTotal == 78) {
enemyHealth[b] = enemyHealth[b] - 1;
}
removeBullet();
}
if (enemyHealth[b] <= 0) {
if (shake == 0) {
shake = 1;
}
kills = kills + 1;
tKiller = tKiller + 1;
if (tKiller == 250) {
bg.play();
}
if (tKiller == 500) {
bg.play();
}
if (tKiller == 750) {
bg.play();
}
enemiesLeft = enemiesLeft - 1;
textHolder.enemiestxt = enemiesLeft;
sObject.data.kill = kills;
sObject.flush();
if (kills == 10000) {
giveAward(16);
} else if (kills == 2000) {
giveAward(15);
} else if (kills == 500) {
giveAward(14);
} else if (kills == 100) {
giveAward(13);
} else if (kills == 10) {
giveAward(12);
} else if (kills == 1) {
giveAward(1);
}
grow();
removeEnemy(b);
textHolder.scoretxt = score;
if (score >= 10000) {
giveAward(69);
} else if (score >= 7500) {
giveAward(68);
} else if (score >= 6250) {
giveAward(67);
} else if (score >= 5000) {
giveAward(66);
} else if (score >= 4000) {
giveAward(65);
} else if (score >= 3000) {
giveAward(64);
} else if (score >= 2000) {
giveAward(63);
} else if (score >= 1000) {
giveAward(62);
} else if (score >= 500) {
giveAward(61);
} else if (score >= 100) {
giveAward(60);
}
}
}
b--;
}
i--;
}
}
function removeBullet() {
bullets[i].removeMovieClip();
bulletX.splice(i, 1);
bulletY.splice(i, 1);
bullets.splice(i, 1);
}
function enemyMovement() {
i = enemies.length - 1;
while (i >= 0) {
if ((enemyType[i] == 1) || (enemyType[i] == 8)) {
if (enemies[i].hitTest(ball1) && (timer2 <= 0)) {
if (shieldOn == 1) {
shieldOn = 0;
shield.removeMovieClip();
removeEnemy(i);
} else if (shieldOn == 0) {
lives = lives - 1;
timer2 = 60;
textHolder.hFill._xscale = lives * 20;
if (textHolder.hFill._xscale > 100) {
textHolder.hFill._xscale = 100;
lives = 5;
}
untouched = false;
if (lives <= 0) {
giveAward(31);
if (enemyType[i] == 1) {
if (enemies[i]._currentframe == 1) {
giveAward(40);
}
if (enemies[i]._currentframe == 2) {
giveAward(39);
}
} else if (enemyType[i] == 8) {
giveAward(44);
}
if (enemiesLeft <= 5) {
giveAward(57);
}
gameover = 1;
gamepause = 1;
deaths = deaths + 1;
sObject.data.death = deaths;
sObject.flush();
if (deaths >= 5) {
giveAward(32);
}
if (deaths >= 10) {
giveAward(33);
}
if (deaths >= 25) {
giveAward(34);
}
if (deaths >= 100) {
giveAward(35);
}
}
textHolder.livestxt = lives;
quickRemove();
attachMovie("redFlash", "redFlash", 100824);
b = enemies.length - 1;
while (b >= 0) {
if (enemyType[b] == 1) {
if (enemies[b]._xscale < ball1._xscale) {
enemies[b].gotoAndStop(2);
} else if (enemies[b]._xscale == ball1._xscale) {
enemies[b].gotoAndStop(3);
}
}
b--;
}
}
}
} else if (((enemyType[i] != 1) && (enemyType[i] != 5)) && (enemyType[i] != 8)) {
if (enemies[i].hitTest(ball1) && (timer2 <= 0)) {
if (shieldOn == 1) {
shieldOn = 0;
shield.removeMovieClip();
quickRemove();
} else {
attachMovie("redFlash", "redFlash", 100824);
lives = lives - 1;
timer2 = 60;
textHolder.hFill._xscale = lives * 20;
if (textHolder.hFill._xscale > 100) {
textHolder.hFill._xscale = 100;
lives = 5;
}
untouched = false;
if (lives <= 0) {
giveAward(31);
if ((enemyType[i] == 2) || (enemyType[i] == 3)) {
giveAward(41);
}
if (enemyType[i] == 4) {
giveAward(42);
}
if (enemyType[i] == 5) {
giveAward(48);
}
if (enemyType[i] == 8) {
giveAward(44);
}
if (enemyType[i] == 6) {
giveAward(43);
}
if (enemyType[i] == 7) {
giveAward(45);
}
if ((enemyType[i] == 9) || (enemyType[i] == 10)) {
giveAward(46);
}
if (enemyType[i] == 11) {
giveAward(47);
}
if (enemiesLeft <= 5) {
giveAward(57);
}
gameover = 1;
gamepause = 1;
deaths = deaths + 1;
sObject.data.death = deaths;
sObject.flush();
if (deaths == 5) {
giveAward(32);
}
if (deaths == 10) {
giveAward(33);
}
if (deaths == 25) {
giveAward(34);
}
if (deaths == 100) {
giveAward(35);
}
}
textHolder.livestxt = lives;
quickRemove();
}
}
}
if (enemyType[i] == 4) {
var _local3 = ball1._x - enemies[i]._x;
var _local2 = ball1._y - enemies[i]._y;
var _local1 = Math.atan2(_local2, _local3);
enemyX[i] = Math.cos(_local1) * 2;
enemyY[i] = Math.sin(_local1) * 2;
} else if (enemyType[i] == 5) {
b = enemies.length - 1;
while (b >= 0) {
if (enemies[b].hitTest(enemies[i].inanother) && (enemyType[b] != 5)) {
removeEnemy(b);
}
b--;
}
if (ball1.hitTest(enemies[i].inanother) && (timer2 <= 0)) {
if (shieldOn == 1) {
shieldOn = 0;
shield.removeMovieClip();
quickRemove();
} else {
trace("3");
lives = lives - 1;
attachMovie("redFlash", "redFlash", 100824);
timer2 = 60;
textHolder.hFill._xscale = lives * 20;
if (textHolder.hFill._xscale > 100) {
textHolder.hFill._xscale = 100;
lives = 5;
}
untouched = false;
if (lives <= 0) {
giveAward(31);
giveAward(48);
if (enemiesLeft <= 5) {
giveAward(57);
}
gameover = 1;
gamepause = 1;
deaths = deaths + 1;
sObject.data.death = deaths;
sObject.flush();
if (deaths == 5) {
giveAward(32);
}
if (deaths == 10) {
giveAward(33);
}
if (deaths == 25) {
giveAward(34);
}
if (deaths == 100) {
giveAward(35);
}
}
textHolder.livestxt = lives;
quickRemove();
}
}
if (spikes[i] >= 1000) {
spikes[i] = 100;
}
spikes[i] = spikes[i] - 1;
if (spikes[i] <= 0) {
enemies[i]._alpha = enemies[i]._alpha - 2;
if (enemies[i]._alpha <= 0) {
removeEnemy(i);
}
}
if (enemies[i]._xscale <= 75) {
removeEnemy(i);
}
} else if (enemyType[i] == 6) {
var _local3 = ball1._x - enemies[i]._x;
var _local2 = ball1._y - enemies[i]._y;
var _local1 = Math.atan2(_local2, _local3);
enemyX[i] = Math.cos(_local1) * 2;
enemyY[i] = Math.sin(_local1) * 2;
} else if (enemyType[i] == 7) {
var _local3 = ball1._x - enemies[i]._x;
var _local2 = ball1._y - enemies[i]._y;
var _local1 = Math.atan2(_local2, _local3);
enemyX[i] = Math.cos(_local1) * 7;
enemyY[i] = Math.sin(_local1) * 7;
} else if (enemyType[i] == 9) {
var _local3 = ball1._x - enemies[i]._x;
var _local2 = ball1._y - enemies[i]._y;
var _local1 = Math.atan2(_local2, _local3);
enemyX[i] = Math.cos(_local1) * 3;
enemyY[i] = Math.sin(_local1) * 3;
} else if (enemyType[i] == 10) {
enemies[i]._x = enemies[i - 1]._x;
enemies[i]._y = enemies[i - 1]._y;
enemies[i]._rotation = enemies[i]._rotation + 3;
} else if (enemyType[i] == 11) {
var _local3 = ball1._x - enemies[i]._x;
var _local2 = ball1._y - enemies[i]._y;
var _local1 = Math.atan2(_local2, _local3);
enemyX[i] = Math.cos(_local1) * 3;
enemyY[i] = Math.sin(_local1) * 3;
if (enemies[i]._alpha < 75) {
var _local4 = randRange(1, 60);
} else {
var _local4 = randRange(1, 45);
}
if (_local4 == 1) {
if (enemies[i]._alpha > 75) {
enemies[i]._alpha = 50;
} else if (enemies[i]._alpha < 75) {
enemies[i]._alpha = 100;
}
}
}
enemies[i]._x = enemies[i]._x - initialX;
enemies[i]._y = enemies[i]._y - initialY;
enemies[i]._x = enemies[i]._x + enemyX[i];
enemies[i]._y = enemies[i]._y + enemyY[i];
if ((enemies[i]._x > (bg._x + bg._width)) && (enemyX[i] > 0)) {
if (enemyType[i] == 2) {
enemyType[i] = 3;
}
enemies[i]._x = enemies[i]._x - 100;
quickRemove();
}
if ((enemies[i]._x < (bg._x - bg._width)) && (enemyX[i] < 0)) {
if (enemyType[i] == 2) {
enemyType[i] = 3;
}
enemies[i]._x = enemies[i]._x + 100;
quickRemove();
}
if ((enemies[i]._y > (bg._y + bg._height)) && (enemyY[i] > 0)) {
if (enemyType[i] == 2) {
enemyType[i] = 3;
}
enemies[i]._y = enemies[i]._y - 100;
quickRemove();
}
shield.removeMovieClip();
if ((enemies[i]._y < (bg._y - (bg._height / 2))) && (enemyY[i] < 0)) {
if (enemyType[i] == 2) {
enemyType[i] = 3;
}
enemies[i]._y = enemies[i]._y + 100;
quickRemove();
}
i--;
}
}
function grow() {
ball1._xscale = ball1._xscale + 1;
ball1._yscale = ball1._xscale;
ball2._xscale = ball2._xscale + 1;
ball2._yscale = ball2._xscale;
ball3._xscale = ball3._xscale + 1;
ball3._yscale = ball3._xscale;
ball4._xscale = ball4._xscale + 1;
ball4._yscale = ball4._xscale;
ball5._xscale = ball5._xscale + 1;
ball5._yscale = ball5._xscale;
}
function createEnemy1() {
en = attachMovie("enemy", "enemy" + depth, depth);
depth++;
en._xscale = (en._yscale = randRange(100, 150));
enemyHealth.push(1);
if (level >= 3) {
var _local1 = randRange(1, 2);
if (_local1 == 1) {
spikes.push(10000);
}
} else {
spikes.push(10000);
}
if (en._xscale < ball1._xscale) {
en.gotoAndStop(2);
}
if (en._xscale == ball1._xscale) {
en.gotoAndStop(3);
}
}
function createEnemy2() {
enemyHealth.push(1);
spikes.push(10000);
en = attachMovie("enemy2", "enemy" + depth, depth);
en._xscale = (en._yscale = 150);
depth++;
}
function createEnemy3(vari, xed, yed) {
en = attachMovie("enemy2", "enemy" + depth, depth);
depth++;
enemies.push(en);
enemyHealth.push(1);
enemyX.push(xed);
enemyY.push(yed);
spikes.push(10000);
en._x = enemies[vari]._x;
en._y = enemies[vari]._y;
enemyType.push(3);
}
function createEnemy4() {
enemyHealth.push(3);
spikes.push(10000);
en = attachMovie("enemy3", "enemy" + depth, depth);
en._xscale = (en._yscale = 150);
depth++;
}
function createEnemy5() {
en = attachMovie("enemy7", "enemy" + depth, depth);
depth++;
en._xscale = (en._yscale = randRange(50, 150));
enemyHealth.push(3);
spikes.push(10000);
if (en._xscale < ball1._xscale) {
en.gotoAndStop(2);
}
if (en._xscale == ball1._xscale) {
en.gotoAndStop(3);
}
}
function createEnemy6() {
enemyHealth.push(5);
spikes.push(10000);
en = attachMovie("enemy5", "enemy" + depth, depth);
en._xscale = (en._yscale = 100);
depth++;
}
function createEnemy7() {
enemyHealth.push(1);
spikes.push(10000);
en = attachMovie("enemy8", "enemy" + depth, depth);
en._xscale = (en._yscale = 100);
depth++;
}
function createEnemy8() {
enemyHealth.push(3);
spikes.push(10000);
en = attachMovie("enemy9", "enemy" + depth, depth);
depth++;
}
function createEnemy9(vari) {
en2 = attachMovie("enemy10", "enemy" + depth, depth);
depth++;
enemies.push(en2);
enemyHealth.push(2);
enemyX.push(0);
enemyY.push(0);
spikes.push(10000);
en2._x = enemies[vari]._x;
en2._y = enemies[vari]._y;
enemyType.push(10);
var oldyX = 0;
var oldyY = 0;
var told = 0;
en2.onEnterFrame = function () {
if (!gamepause) {
if ((((oldyX - this._x) == 0) && ((oldyY - this._y) == 0)) && (told <= 5)) {
told = told + 1;
if (told == 6) {
this.inside.gotoAndPlay(2);
}
}
oldyX = this._x;
oldyY = this._y;
}
};
}
function createEnemy10() {
enemyHealth.push(3);
spikes.push(10000);
en = attachMovie("enemy11", "enemy" + depth, depth);
en._xscale = (en._yscale = 100);
depth++;
}
function powerDoes() {
dtn = dtn - 1;
stn = stn - 1;
if ((t1 == "Double Shot:") || (t1 == "Triple Shot:")) {
v1._xscale = stn / 3;
}
if (t1 == "Faster Shot:") {
v1._xscale = dtn / 3;
}
if ((t2 == "Double Shot:") || (t2 == "Triple Shot:")) {
v2._xscale = stn / 3;
}
if (t2 == "Faster Shot:") {
v2._xscale = dtn / 3;
}
if (dtn <= 0) {
delayTime = 5;
if (t1 == "Faster Shot:") {
tt1._alpha = tt1._alpha - 10;
o1._alpha = o1._alpha - 10;
v1._alpha = v1._alpha - 10;
if (tt1._alpha <= 0) {
tt1._alpha = 0;
o1._alpha = 0;
v1._alpha = 0;
if (tt2._alpha >= 5) {
tt2._alpha = 0;
v2._alpha = 0;
o2._alpha = 0;
tt1._alpha = 100;
v1._alpha = 100;
o1._alpha = 100;
t1 = t2;
}
}
}
if (t2 == "Faster Shot:") {
tt2._alpha = tt2._alpha - 10;
o2._alpha = o2._alpha - 10;
v2._alpha = v2._alpha - 10;
if (tt2._alpha <= 0) {
tt2._alpha = 0;
o2._alpha = 0;
v2._alpha = 0;
}
}
}
if (stn <= 0) {
shotCount = 1;
if ((t1 == "Double Shot:") || (t1 == "Triple Shot:")) {
tt1._alpha = tt1._alpha - 10;
o1._alpha = o1._alpha - 10;
v1._alpha = v1._alpha - 10;
if (tt1._alpha <= 0) {
tt1._alpha = 0;
o1._alpha = 0;
v1._alpha = 0;
if (tt2._alpha >= 5) {
tt2._alpha = 0;
v2._alpha = 0;
o2._alpha = 0;
tt1._alpha = 100;
v1._alpha = 100;
o1._alpha = 100;
t1 = t2;
}
}
}
if ((t2 == "Double Shot:") || (t2 == "Triple Shot:")) {
tt2._alpha = tt2._alpha - 10;
o2._alpha = o2._alpha - 10;
v2._alpha = v2._alpha - 10;
if (tt2._alpha <= 0) {
tt2._alpha = 0;
o2._alpha = 0;
v2._alpha = 0;
}
}
}
i = pus.length;
while (i >= 0) {
ttv[i] = ttv[i] - 1;
if (ttv[i] <= 0) {
pus[i]._alpha = pus[i]._alpha - 1;
if (pus[i]._alpha <= 0) {
pus[i].removeMovieClip();
powernum.splice(i, 1);
pus.splice(i, 1);
ttv.splice(i, 1);
}
}
if (pus[i].hitTest(ball1)) {
pus[i].removeMovieClip();
particleEffect2(i);
if (powernum[i] == 1) {
giveAward(36);
lives = lives + 1;
textHolder.hFill._xscale = lives * 20;
if (textHolder.hFill._xscale > 100) {
textHolder.hFill._xscale = 100;
lives = 5;
}
textHolder.livestxt = lives;
upText = attachMovie("up1", "up" + depth, depth);
depth++;
upText._x = (Stage.width / 2) + randRange(-200, 200);
upText._y = 50 + randRange(-10, 30);
}
if (powernum[i] == 2) {
giveAward(37);
delayTime = 3;
dtn = 300;
if ((o1._alpha <= 5) || (t1 == "Faster Shot:")) {
o1._alpha = 100;
v1._alpha = 100;
tt1._alpha = 100;
t1 = "Faster Shot:";
} else {
o2._alpha = 100;
v2._alpha = 100;
tt2._alpha = 100;
t2 = "Faster Shot:";
}
upText = attachMovie("up4", "up" + depth, depth);
depth++;
upText._x = (Stage.width / 2) + randRange(-200, 200);
upText._y = 50 + randRange(-10, 30);
}
if (powernum[i] == 3) {
giveAward(38);
shotCount = 3;
stn = 300;
if (((o1._alpha <= 5) || (t1 == "Double Shot:")) || (t1 == "Triple Shot:")) {
o1._alpha = 100;
v1._alpha = 100;
tt1._alpha = 100;
t1 = "Triple Shot:";
} else {
o2._alpha = 100;
v2._alpha = 100;
tt2._alpha = 100;
t2 = "Triple Shot:";
}
upText = attachMovie("up3", "up" + depth, depth);
depth++;
upText._x = (Stage.width / 2) + randRange(-200, 200);
upText._y = 50 + randRange(-10, 30);
}
if (powernum[i] == 4) {
giveAward(59);
if (shotCount != 3) {
shotCount = 2;
}
if (((o1._alpha <= 5) || (t1 == "Double Shot:")) || (t1 == "Triple Shot:")) {
o1._alpha = 100;
v1._alpha = 100;
tt1._alpha = 100;
if ((t1 != "Triple Shot:") || (stn <= 0)) {
t1 = "Double Shot:";
}
} else {
o2._alpha = 100;
v2._alpha = 100;
tt2._alpha = 100;
t2 = "Double Shot:";
}
stn = 300;
upText = attachMovie("up2", "up" + depth, depth);
depth++;
upText._x = (Stage.width / 2) + randRange(-200, 200);
upText._y = 50 + randRange(-10, 30);
}
if (powernum[i] == 5) {
if (shieldOn == 0) {
shieldOn = 1;
upText = attachMovie("up5", "up" + depth, depth);
depth++;
upText._x = (Stage.width / 2) + randRange(-200, 200);
upText._y = 50 + randRange(-10, 30);
attachMovie("shield", "shield", depth);
depth++;
}
}
if (powernum[i] == 6) {
upText = attachMovie("up6", "up" + depth, depth);
depth++;
upText._x = (Stage.width / 2) + randRange(-200, 200);
upText._y = 50 + randRange(-10, 30);
s = enemies.length;
while (s >= 0) {
remove = 0;
removeEnemy(s);
s--;
}
}
powernum.splice(i, 1);
pus.splice(i, 1);
ttv.splice(i, 1);
}
pus[i]._x = pus[i]._x - initialX;
pus[i]._y = pus[i]._y - initialY;
i--;
}
}
function quickRemove() {
enemies[i].removeMovieClip();
enemies.splice(i, 1);
enemyHealth.splice(i, 1);
enemyX.splice(i, 1);
enemyType.splice(i, 1);
enemyY.splice(i, 1);
spikes.splice(i, 1);
}
function removeEnemy(vari) {
if (gamepause) {
remove = 0;
}
if (remove == 0) {
if ((enemyType[vari] != 5) && (_quality == "HIGH")) {
particleEffect(vari);
}
var _local5 = randRange(1, 100);
if ((lives + pus.length) >= 5) {
_local5 = 2;
}
var _local8 = randRange(1, 100);
var _local11 = randRange(1, 200);
var _local9 = randRange(1, 50);
var _local3 = randRange(1, 250);
var _local4 = randRange(1, 500);
if (awardsTotal < 20) {
_local4 = 2;
}
if (awardsTotal < 40) {
trace("yes");
_local3 = 2;
}
if (shieldOn == 1) {
trace("yes");
_local3 = 2;
}
if (_local5 == 1) {
pu1 = attachMovie("powerup", "powerup" + depth, depth);
depth++;
pu1._x = enemies[vari]._x;
pu1._y = enemies[vari]._y;
ttv.push(250);
pus.push(pu1);
powernum.push(1);
} else if (_local8 == 1) {
pu1 = attachMovie("powerup2", "powerup" + depth, depth);
depth++;
pu1._x = enemies[vari]._x;
pu1._y = enemies[vari]._y;
ttv.push(250);
pus.push(pu1);
powernum.push(2);
} else if (_local11 == 1) {
pu1 = attachMovie("powerup3", "powerup" + depth, depth);
depth++;
pu1._x = enemies[vari]._x;
pu1._y = enemies[vari]._y;
ttv.push(250);
pus.push(pu1);
powernum.push(3);
} else if (_local9 == 1) {
pu1 = attachMovie("powerup4", "powerup" + depth, depth);
depth++;
pu1._x = enemies[vari]._x;
pu1._y = enemies[vari]._y;
ttv.push(250);
pus.push(pu1);
powernum.push(4);
} else if (_local3 == 1) {
pu1 = attachMovie("powerup5", "powerup" + depth, depth);
depth++;
pu1._x = enemies[vari]._x;
pu1._y = enemies[vari]._y;
ttv.push(250);
pus.push(pu1);
powernum.push(5);
} else if (_local4 == 1) {
pu1 = attachMovie("powerup6", "powerup" + depth, depth);
depth++;
pu1._x = enemies[vari]._x;
pu1._y = enemies[vari]._y;
ttv.push(250);
pus.push(pu1);
powernum.push(6);
}
if (enemyType[vari] == 1) {
banger.start();
score = score + 5;
sm = attachMovie("scoreMovie", "scoreMovie" + depth, depth);
depth++;
sm.inside.inside.inside = "5";
sm._x = enemies[vari]._x;
sm._y = enemies[vari]._y;
ep = ep + 1;
textHolder.eptxt = ep;
if (enemies[vari]._currentframe == 1) {
giveAward(3);
} else {
giveAward(2);
}
enemies[vari].removeMovieClip();
} else if (enemyType[vari] == 8) {
banger.start();
score = score + 10;
sm = attachMovie("scoreMovie", "scoreMovie" + depth, depth);
depth++;
sm.inside.inside.inside = "10";
sm._x = enemies[vari]._x;
sm._y = enemies[vari]._y;
ep = ep + 1;
textHolder.eptxt = ep;
if (enemies[vari]._currentframe == 1) {
giveAward(7);
} else {
giveAward(2);
}
enemies[vari].removeMovieClip();
} else if (enemyType[vari] == 2) {
banger.start();
score = score + 7;
sm = attachMovie("scoreMovie", "scoreMovie" + depth, depth);
depth++;
sm.inside.inside.inside = "7";
sm._x = enemies[vari]._x;
sm._y = enemies[vari]._y;
if (gamepause == 0) {
createEnemy3(vari, 0, 3);
createEnemy3(vari, 0, -3);
createEnemy3(vari, -3, 0);
createEnemy3(vari, 3, 0);
ep = ep + 3;
textHolder.eptxt = ep;
}
giveAward(4);
enemies[vari].removeMovieClip();
} else if (enemyType[vari] == 3) {
banger.start();
score = score + 3;
sm = attachMovie("scoreMovie", "scoreMovie" + depth, depth);
depth++;
sm.inside.inside.inside = "3";
sm._x = enemies[vari]._x;
sm._y = enemies[vari]._y;
ep = ep + 2;
textHolder.eptxt = ep;
enemies[vari].removeMovieClip();
} else if (enemyType[vari] == 4) {
banger.start();
score = score + 12;
sm = attachMovie("scoreMovie", "scoreMovie" + depth, depth);
depth++;
sm.inside.inside.inside = "12";
sm._x = enemies[vari]._x;
sm._y = enemies[vari]._y;
ep = ep + 5;
giveAward(5);
textHolder.eptxt = ep;
enemies[vari].inside.gotoAndPlay(2);
deser = attachMovie("orangedes", "orangedes" + depth, depth);
var _local7 = ball1._x - enemies[vari]._x;
var _local6 = ball1._y - enemies[vari]._y;
var _local10 = Math.atan2(_local6, _local7);
deser._rotation = ((_local10 * 180) / Math.PI) + 180;
depth++;
deser._x = enemies[vari]._x;
deser._y = enemies[vari]._y;
enemies.push(deser);
enemyHealth.push(1);
enemyX.push(0);
enemyY.push(0);
enemyType.push(5);
spikes.push(60);
deser.onEnterFrame = function () {
if (gameover) {
this.removeMovieClip();
}
};
} else if (enemyType[vari] == 5) {
enemies[vari].removeMovieClip();
} else if (enemyType[vari] == 6) {
banger.start();
score = score + 15;
sm = attachMovie("scoreMovie", "scoreMovie" + depth, depth);
depth++;
sm.inside.inside.inside = "15";
sm._x = enemies[vari]._x;
sm._y = enemies[vari]._y;
giveAward(6);
enemies[vari].inside.gotoAndPlay(2);
} else if (enemyType[vari] == 7) {
banger.start();
score = score + 18;
sm = attachMovie("scoreMovie", "scoreMovie" + depth, depth);
depth++;
sm.inside.inside.inside = "18";
sm._x = enemies[vari]._x;
sm._y = enemies[vari]._y;
giveAward(8);
enemies[vari].inside.gotoAndPlay(2);
} else if (enemyType[vari] == 9) {
banger.start();
score = score + 21;
sm = attachMovie("scoreMovie", "scoreMovie" + depth, depth);
depth++;
sm.inside.inside.inside = "21";
sm._x = enemies[vari]._x;
sm._y = enemies[vari]._y;
giveAward(9);
enemies[vari].inside.gotoAndPlay(2);
if (enemyType[vari - 1] == 10) {
enemies[vari - 1].inside.gotoAndPlay(2);
enemies.splice(vari - 1, 1);
enemyHealth.splice(vari - 1, 1);
enemyX.splice(vari - 1, 1);
enemyType.splice(vari - 1, 1);
enemyY.splice(vari - 1, 1);
spikes.splice(vari - 1, 1);
}
} else if (enemyType[vari] == 10) {
banger.start();
score = score + 10;
sm = attachMovie("scoreMovie", "scoreMovie" + depth, depth);
depth++;
sm.inside.inside.inside = "10";
sm._x = enemies[vari]._x;
sm._y = enemies[vari]._y;
enemies[vari].inside.gotoAndPlay(2);
} else if (enemyType[vari] == 11) {
banger.start();
score = score + 30;
sm = attachMovie("scoreMovie", "scoreMovie" + depth, depth);
depth++;
sm.inside.inside.inside = "30";
sm._x = enemies[vari]._x;
sm._y = enemies[vari]._y;
enemies[vari].inside.gotoAndPlay(2);
giveAward(10);
if (((awardsRecieved[9] == 1) && (awardsRecieved[8] == 1)) && (awardsRecieved[7] == 1)) {
giveAward(11);
}
}
textHolder.scoretxt = score;
enemies.splice(vari, 1);
enemyHealth.splice(vari, 1);
enemyX.splice(vari, 1);
enemyType.splice(vari, 1);
enemyY.splice(vari, 1);
spikes.splice(vari, 1);
sm.selectable = false;
}
remove = 1;
}
function onEnterFrame() {
if ((Math.abs(initialX) + Math.abs(initialY)) >= 17) {
trace(Math.abs(initialX) + Math.abs(initialY));
giveAward(52);
}
if (enemiesLeft >= 90000) {
enemiesLeft = 100000 /* 0x0186A0 */;
textHolder.el._alpha = 0;
textHolder.el2._alpha = 0;
}
awardWait();
var _local4 = _xmouse - aim._x;
var _local3 = _ymouse - aim._y;
aim._x = aim._x + (_local4 / 2);
aim._y = aim._y + (_local3 / 2);
if (enemiesLeft <= 0) {
gameover = 1;
gamepause = 1;
}
if (gameover) {
i = enemies.length;
while (i >= 0) {
enemies[i]._alpha = enemies[i]._alpha - 2.2;
if (enemies[i]._alpha <= 0) {
enemies[i].removeMovieClip();
enemies.splice(vari, 1);
enemyHealth.splice(vari, 1);
enemyX.splice(vari, 1);
enemyType.splice(vari, 1);
enemyY.splice(vari, 1);
spikes.splice(vari, 1);
}
i--;
}
i = bullets.length;
while (i >= 0) {
bullets[i]._alpha = bullets[i]._alpha - 2.2;
if (bullets[i]._alpha <= 0) {
bullets[i].removeMovieClip();
bulletX.splice(i, 1);
bulletY.splice(i, 1);
bullets.splice(i, 1);
}
i--;
}
ball1._alpha = ball1._alpha - 1;
ball2._alpha = ball2._alpha - 1;
ball3._alpha = ball3._alpha - 1;
ball4._alpha = ball4._alpha - 1;
ball5._alpha = ball5._alpha - 1;
i = explosions.length;
while (i >= 0) {
explosions[i].removeMovieClip();
explosions.splice(i, 1);
exX.splice(i, 1);
exY.splice(i, 1);
i--;
}
i = explosions2.length;
while (i >= 0) {
explosions2[i].removeMovieClip();
explosions2.splice(i, 1);
exX2.splice(i, 1);
exY2.splice(i, 1);
howFast.splice(i, 1);
i--;
}
i = pus.length;
while (i >= 0) {
pus[i].removeMovieClip();
powernum.splice(i, 1);
pus.splice(i, 1);
ttv.splice(i, 1);
i--;
}
if (ball1._alpha <= 0) {
ball1.removeMovieClip();
ball2.removeMovieClip();
ball3.removeMovieClip();
ball4.removeMovieClip();
ball5.removeMovieClip();
gotoAndStop (5);
}
}
if (menu._x == (Stage.width / 2)) {
if (menu._alpha < 100) {
menu._alpha = menu._alpha + 2;
}
}
if (!gamepause) {
if (awardsTotal >= 60) {
lives = lives + 0.001;
textHolder.hFill._xscale = lives * 20;
if (textHolder.hFill._xscale > 100) {
textHolder.hFill._xscale = 100;
lives = 5;
}
}
particleMovement();
particleMovement2();
stale = 0;
if (Key.isDown(39) || (Key.isDown(68))) {
velocityX = velocityX + acceleration;
stale = 1;
}
if (Key.isDown(37) || (Key.isDown(65))) {
velocityX = velocityX - acceleration;
stale = 1;
}
if (Key.isDown(40) || (Key.isDown(83))) {
velocityY = velocityY + acceleration;
stale = 1;
}
if (Key.isDown(38) || (Key.isDown(87))) {
velocityY = velocityY - acceleration;
stale = 1;
}
velocityX = velocityX * friction;
velocityY = velocityY * friction;
ball1._x = ball1._x + velocityX;
ball1._y = ball1._y + velocityY;
if ((ball1._x + (ball1._width / 2)) > Stage.width) {
ball1._x = Stage.width - (ball1._width / 2);
velocityX = 0;
giveAward(51);
}
if ((ball1._x - (ball1._width / 2)) < 0) {
ball1._x = ball1._width / 2;
velocityX = 0;
giveAward(51);
}
if ((ball1._y + (ball1._height / 2)) > Stage.height) {
ball1._y = Stage.height - (ball1._height / 2);
velocityY = 0;
giveAward(51);
}
if ((ball1._y - (ball1._height / 2)) < 0) {
ball1._y = ball1._height / 2;
velocityY = 0;
giveAward(51);
}
aimer._x = ball1._x;
aimer._y = ball1._y;
aimer._rotation = topRotation;
remove = 0;
toNextLevel._xscale = 100 - (2 * (150 - ball1._xscale));
if (toNextLevel._xscale < 0) {
toNextLevel._xscale = 0;
}
if (ball1._xscale > 150) {
startShrink = 1;
level = level + 1;
textHolder.leveltxt = level;
chance = chance * 0.97;
if (level == 2) {
attachMovie("newEnemies3", "newEnemies" + depth, depth);
depth++;
enemyAmount = 2;
} else if (level == 3) {
attachMovie("newEnemies3", "newEnemies" + depth, depth);
depth++;
enemyAmount = 3;
} else if (level == 4) {
attachMovie("newEnemies3", "newEnemies" + depth, depth);
depth++;
enemyAmount = 4;
} else if (level == 6) {
attachMovie("newEnemies3", "newEnemies" + depth, depth);
depth++;
enemyAmount = 5;
} else if (level == 9) {
attachMovie("newEnemies3", "newEnemies" + depth, depth);
depth++;
enemyAmount = 6;
} else if (level == 11) {
attachMovie("newEnemies3", "newEnemies" + depth, depth);
depth++;
enemyAmount = 7;
} else if (level == 14) {
attachMovie("newEnemies3", "newEnemies" + depth, depth);
depth++;
enemyAmount = 8;
} else {
levelUp.gotoAndPlay(1);
}
}
if (startShrink == 1) {
ball1._xscale = ball1._xscale * 0.95;
ball1._yscale = ball1._xscale;
ball2._xscale = ball2._xscale * 0.95;
ball2._yscale = ball1._xscale;
ball3._xscale = ball3._xscale * 0.95;
ball3._yscale = ball1._xscale;
ball4._xscale = ball4._xscale * 0.95;
ball4._yscale = ball1._xscale;
ball5._xscale = ball5._xscale * 0.95;
ball5._yscale = ball1._xscale;
if (ball1._xscale <= 100) {
startShrink = 0;
}
}
var _local2 = _xmouse - ball1._x;
var _local1 = _ymouse - ball1._y;
if ((_local2 != 0) || (_local1 != 0)) {
var _local6 = Math.atan2(_local1, _local2);
topRotation = (_local6 * 180) / Math.PI;
}
initialX = bg._x;
initialY = bg._y;
bg._x = -ball1._x;
bg._y = -ball1._y;
initialX = initialX - bg._x;
initialY = initialY - bg._y;
ball2._x = ball2._x + ((ball1._x - ball2._x) / 3);
ball2._y = ball2._y + ((ball1._y - ball2._y) / 3);
ball3._x = ball3._x + ((ball2._x - ball3._x) / 3);
ball3._y = ball3._y + ((ball2._y - ball3._y) / 3);
ball4._x = ball4._x + ((ball3._x - ball4._x) / 3);
ball4._y = ball4._y + ((ball3._y - ball4._y) / 3);
ball5._x = ball5._x + ((ball4._x - ball5._x) / 3);
ball5._y = ball5._y + ((ball4._y - ball5._y) / 3);
var _local5 = randRange(1, chance);
if (_local5 == 1) {
enemyFunc();
}
if (timer2 > 0) {
timer2 = timer2 - 1;
ball1._alpha = 30;
ball2._alpha = 30;
ball3._alpha = 30;
ball4._alpha = 30;
ball5._alpha = 30;
} else {
ball1._alpha = 100;
ball2._alpha = 100;
ball3._alpha = 100;
ball4._alpha = 100;
ball5._alpha = 100;
}
MouseDownCounter();
bulletMovement();
enemyMovement();
powerDoes();
tAchs = (awardsTotal + "/") + "78";
if (shield != undefined) {
shield._x = ball1._x;
shield._y = ball1._y;
shield._xscale = (shield._yscale = ball1._xscale);
}
}
}
function randRange(smallNum, bigNum) {
return(Math.floor(Math.random() * ((bigNum - smallNum) + 1)) + smallNum);
}
function menuCreate() {
attachMovie("menu", "menu", 100342);
gamepause = true;
menu._alpha = 0;
menu._x = Stage.width / 2;
menu._y = Stage.height / 2;
menu.finished.onPress = function () {
menu.removeMovieClip();
gamepause = false;
};
menu.p1._alpha = 10;
menu.p1.onRollOver = function () {
menu.p1._alpha = 25;
};
menu.p1.onRollOut = function () {
menu.p1._alpha = 10;
};
menu.p1.onPress = function () {
if ((ep >= 500) && (shotCount <= 2)) {
ep = ep - 500;
textHolder.eptxt = ep;
shotCount = shotCount + 1;
menu.buy.gotoAndPlay(2);
}
};
menu.p2._alpha = 10;
menu.p2.onRollOver = function () {
menu.p2._alpha = 25;
};
menu.p2.onRollOut = function () {
menu.p2._alpha = 10;
};
menu.p2.onPress = function () {
if ((ep >= 300) && (delayTime > 4)) {
ep = ep - 300;
delayTime = delayTime - 1;
textHolder.eptxt = ep;
menu.buy.gotoAndPlay(2);
}
};
menu.p3._alpha = 10;
menu.p3.onRollOver = function () {
menu.p3._alpha = 25;
};
menu.p3.onRollOut = function () {
menu.p3._alpha = 10;
};
menu.p3.onPress = function () {
if (ep >= 100) {
ep = ep - 100;
lives = lives + 1;
textHolder.hFill._xscale = lives * 20;
if (textHolder.hFill._xscale > 100) {
textHolder.hFill._xscale = 100;
lives = 5;
}
textHolder.eptxt = ep;
textHolder.livestxt = lives;
menu.buy.gotoAndPlay(2);
}
};
menu.p4._alpha = 10;
menu.p4.onRollOver = function () {
menu.p4._alpha = 25;
};
menu.p4.onRollOut = function () {
menu.p4._alpha = 10;
};
menu.p4.onPress = function () {
if (ep >= 300) {
ep = ep - 300;
damage = damage + 1;
textHolder.eptxt = ep;
menu.buy.gotoAndPlay(2);
}
};
menu.p5._alpha = 10;
menu.p5.onRollOver = function () {
menu.p5._alpha = 25;
};
menu.p5.onRollOut = function () {
menu.p5._alpha = 10;
};
menu.p5.onPress = function () {
if ((ep >= 100) && (aimer._alpha == 0)) {
ep = ep - 100;
aimer._alpha = 100;
textHolder.eptxt = ep;
menu.buy.gotoAndPlay(2);
}
};
}
function particleEffect2(vari) {
q = 25;
while (q > 0) {
exp = attachMovie("explosion", "explosion" + depth, depth);
exp._xscale = (exp._yscale = randRange(10, 100));
exp._x = ball1._x + ((Math.random() * 600) - 300);
exp._y = ball1._y + ((Math.random() * 600) - 300);
depth++;
var _local4 = exp._x - ball1._x;
var _local3 = exp._y - ball1._y;
var _local5 = Math.atan2(_local3, _local4);
var _local2 = (_local5 * 180) / Math.PI;
exp._alpha = 0;
xDir = Math.cos(_local2);
yDir = Math.sin(_local2);
explosions2.push(exp);
exX2.push(xDir);
exY2.push(yDir);
howFast.push(1);
blah = new Color(exp);
if (powernum[vari] == 1) {
blah.setRGB(255);
}
if (powernum[vari] == 2) {
blah.setRGB(65280);
}
if (powernum[vari] == 3) {
blah.setRGB(16711680);
}
if (powernum[vari] == 4) {
blah.setRGB(12085813);
}
if (powernum[vari] == 5) {
blah.setRGB(10027161);
}
if (powernum[vari] == 6) {
blah.setRGB(16776960);
}
q--;
}
}
function particleMovement2() {
i = explosions2.length;
while (i >= 0) {
var _local3 = explosions2[i]._x - ball1._x;
var _local2 = explosions2[i]._y - ball1._y;
var _local1 = Math.atan2(_local2, _local3);
exX2[i] = Math.cos(_local1) * 5;
exY2[i] = Math.sin(_local1) * 5;
howFast[i] = howFast[i] + 0.05;
exX2[i] = exX2[i] * howFast[i];
exY2[i] = exY2[i] * howFast[i];
explosions2[i]._x = explosions2[i]._x - exX2[i];
explosions2[i]._y = explosions2[i]._y - exY2[i];
explosions2[i]._alpha = explosions2[i]._alpha + 2;
if ((explosions2[i]._alpha <= 0) || (explosions2[i].hitTest(ball1))) {
explosions2[i].removeMovieClip();
explosions2.splice(i, 1);
exX2.splice(i, 1);
exY2.splice(i, 1);
howFast.splice(i, 1);
}
i--;
}
}
function particleEffect(vari) {
q = 7;
while (q > 0) {
exp = this.createEmptyMovieClip("exp" + depth, depth);
drawCircle(exp, 100, 10092288, 100);
exp._xscale = (exp._yscale = randRange(1, 10));
exp._x = enemies[vari]._x;
exp._y = enemies[vari]._y;
depth++;
xDir = (Math.random() * 20) - 10;
yDir = (Math.random() * 20) - 10;
explosions.push(exp);
exX.push(xDir);
exY.push(yDir);
blah = new Color(exp);
if (enemyType[vari] == 1) {
if (enemies[vari]._currentframe == 2) {
blah.setRGB(65280);
}
if (enemies[vari]._currentframe == 3) {
blah.setRGB(255);
}
if (enemies[vari]._currentframe == 1) {
blah.setRGB(16711680);
}
} else if ((enemyType[vari] == 2) || (enemyType[vari] == 3)) {
blah.setRGB(10027161);
} else if ((enemyType[vari] == 4) || (enemyType[vari] == 5)) {
blah.setRGB(0);
} else if (enemyType[vari] == 6) {
blah.setRGB(12085813);
} else if (enemyType[vari] == 7) {
blah.setRGB(13484544);
} else if (enemyType[vari] == 8) {
if (enemies[vari]._currentframe == 2) {
blah.setRGB(65280);
}
if (enemies[vari]._currentframe == 3) {
blah.setRGB(255);
}
if (enemies[vari]._currentframe == 1) {
blah.setRGB(10027008);
}
} else if ((enemyType[vari] == 9) || (enemyType[vari] == 10)) {
blah.setRGB(16776960);
} else if (enemyType[vari] == 11) {
blah.setRGB(0);
}
q--;
}
}
function particleMovement() {
i = explosions.length;
while (i >= 0) {
explosions[i]._x = explosions[i]._x + exX[i];
explosions[i]._y = explosions[i]._y + exY[i];
exX[i] = exX[i] * 0.95;
exY[i] = exY[i] * 0.95;
explosions[i]._alpha = explosions[i]._alpha - 5;
if (explosions[i]._alpha <= 0) {
explosions[i].removeMovieClip();
explosions.splice(i, 1);
exX.splice(i, 1);
exY.splice(i, 1);
}
i--;
}
}
function shaker() {
if (shake == 0) {
_root._x = 0;
_root._y = 0;
} else if (shake == 1) {
shake = shake + 1;
_root._x = _root._x + 3;
_root._y = _root._y + 3;
} else if (shake == 2) {
shake = shake + 1;
_root._y = _root._y - 5;
_root._x = _root._x - 5;
} else if (shake == 3) {
shake = 0;
_root._x = _root._x + 2;
_root._y = _root._y + 2;
}
}
function drawCircle(target_mc, radius, fillColor, fillAlpha) {
var x = radius;
var y = radius;
with (target_mc) {
beginFill(fillColor, fillAlpha);
moveTo(x + radius, y);
curveTo(radius + x, (0.414213562373095 * radius) + y, (0.707106781186547 * radius) + x, (0.707106781186547 * radius) + y);
curveTo((0.414213562373095 * radius) + x, radius + y, x, radius + y);
curveTo((-0.414213562373095 * radius) + x, radius + y, (-0.707106781186547 * radius) + x, (0.707106781186547 * radius) + y);
curveTo((-radius) + x, (0.414213562373095 * radius) + y, (-radius) + x, y);
curveTo((-radius) + x, (-0.414213562373095 * radius) + y, (-0.707106781186547 * radius) + x, (-0.707106781186547 * radius) + y);
curveTo((-0.414213562373095 * radius) + x, (-radius) + y, x, (-radius) + y);
curveTo((0.414213562373095 * radius) + x, (-radius) + y, (0.707106781186547 * radius) + x, (-0.707106781186547 * radius) + y);
curveTo(radius + x, (-0.414213562373095 * radius) + y, radius + x, y);
endFill();
}
}
var my_sound = new Sound();
my_sound.attachSound("song.mp3");
my_sound.start(0, 100);
var banger = new Sound();
banger.attachSound("bang");
tt1._alpha = 0;
o1._alpha = 0;
v1._alpha = 0;
tt2._alpha = 0;
o2._alpha = 0;
v2._alpha = 0;
tt1.selectable = false;
tt2.selectable = false;
stale = 0;
shake = 0;
var dx = 0;
var dy = 0;
var dist = 0;
depth = 5;
initialX = 0;
initialY = 0;
level = 1;
lives = 5;
score = 0;
ep = 1;
enemyEvolution = 0;
levelUp.gotoAndStop(50);
spike = new Array();
sdir = new Array();
topRotation = 0;
remove = 0;
shotCount = 1;
chance = 15;
Mouse.hide();
ball1.swapDepths(100020);
ball2.swapDepths(100015);
ball3.swapDepths(100014);
ball4.swapDepths(100013);
ball5.swapDepths(100012);
headbar.swapDepths(100021);
textHolder.swapDepths(100022);
Mouse.hide();
enemies = new Array();
enemyX = new Array();
enemyY = new Array();
enemyType = new Array();
spikes = new Array();
enemyHealth = new Array();
bullets = new Array();
bulletX = new Array();
bulletY = new Array();
enemyAmount = 1;
kills = 0;
deaths = 0;
gamepause = false;
gameover = false;
timer = setInterval(upTime, 1000);
mDownSeconds = 0;
staleSeconds = 0;
secondsThisGame = 0;
seconds2 = 0;
minutes2 = 0;
hours2 = 0;
timers = setInterval(upTimes, 1000);
if (sObject.data.kill > 0) {
kills = sObject.data.kill;
}
if (sObject.data.death > 0) {
deaths = sObject.data.death;
}
award.aname.awardName = awards[0];
award.gotoAndStop(1);
awardqueue = new Array();
untouched = true;
if (awardsTotal >= 10) {
giveAward(70);
}
if (awardsTotal >= 20) {
giveAward(71);
}
if (awardsTotal >= 30) {
giveAward(72);
}
if (awardsTotal >= 40) {
giveAward(73);
}
if (awardsTotal >= 50) {
giveAward(74);
}
if (awardsTotal >= 60) {
giveAward(75);
}
if (awardsTotal >= 70) {
giveAward(76);
}
if (awardsTotal >= 77) {
giveAward(77);
}
if (kills >= 10000) {
giveAward(16);
}
if (kills >= 2000) {
giveAward(15);
}
if (kills >= 500) {
giveAward(14);
}
if (kills >= 100) {
giveAward(13);
}
if (kills >= 10) {
giveAward(12);
}
if (kills >= 1) {
giveAward(1);
}
qbtn.onPress = function () {
if (_quality == "HIGH") {
_quality = "MEDIUM";
} else if (_quality == "LOW") {
_quality = "HIGH";
} else if (_quality == "MEDIUM") {
_quality = "LOW";
}
};
giveAward(0);
keyListener = new Object();
music_frame = 1;
keyListener.onKeyDown = function () {
num = Key.getAscii();
if (((num == 112) && (!gamepause)) && (!gameover)) {
giveAward(55);
gamepause = true;
attachMovie("paused2", "paused2", 100122);
createHover(paused2.btm);
paused2.btm.onPress = function () {
gameover = true;
paused2.removeMovieClip();
};
paused2._x = Stage.width / 2;
paused2._y = (Stage.height / 2) - 20;
} else if (((num == 112) && (gamepause)) && (!gameover)) {
gamepause = false;
paused2.removeMovieClip();
}
if (((num == 32) && (!gamepause)) && (!gameover)) {
giveAward(55);
gamepause = true;
attachMovie("paused2", "paused2", 100122);
paused2.btm.onPress = function () {
gameover = true;
paused2.removeMovieClip();
};
createHover(paused2.btm);
paused2._x = Stage.width / 2;
paused2._y = (Stage.height / 2) - 20;
} else if (((num == 32) && (gamepause)) && (!gameover)) {
gamepause = false;
paused2.removeMovieClip();
}
if (num == 109) {
if (music_frame == 1) {
music.gotoAndStop(2);
music_frame = 2;
my_sound.stop();
} else if (music_frame == 2) {
music.gotoAndStop(1);
music_frame = 1;
my_sound.start(0, 9999);
}
}
};
music.onPress = function () {
if (music_frame == 1) {
music.gotoAndStop(2);
music_frame = 2;
} else if (music_frame == 2) {
music.gotoAndStop(1);
music_frame = 1;
}
if (music_frame == 1) {
my_sound.start(0, 9999);
}
if (music_frame == 2) {
my_sound.stop();
}
};
Key.addListener(keyListener);
damage = 1;
doit = false;
mouseDownTime = 0;
mouseIsDown = 0;
onMouseDown = function () {
Mouse.hide();
mouseIsDown = 1;
};
onMouseUp = function () {
mouseIsDown = 0;
};
delayTime = 5;
tKiller = 0;
pus = new Array();
ttv = new Array();
powernum = new Array();
dtn = 0;
stn = 0;
shieldOn = 0;
startShrink = 0;
textHolder.enemiestxt = enemiesLeft;
textHolder.scoretxt = score;
textHolder.livestxt = lives;
textHolder.eptxt = ep;
textHolder.leveltxt = level;
attachMovie("aimer", "aimer", 99949);
aimer._alpha = 0;
velocityX = 0;
velocityY = 0;
acceleration = 0.5;
friction = 0.95;
explosions = new Array();
exX = new Array();
exY = new Array();
explosions2 = new Array();
exX2 = new Array();
exY2 = new Array();
howFast = new Array();
Frame 5
function onEnterFrame() {
var _local2 = _xmouse - aim._x;
var _local1 = _ymouse - aim._y;
aim._x = aim._x + (_local2 / 2);
aim._y = aim._y + (_local1 / 2);
awardWait();
}
scoreMovie.scoretext = score;
headbar.removeMovieClip();
textHolder.removeMovieClip();
award.gotoAndStop(1);
clearInterval(timer);
clearInterval(timers);
scoreMovie._x = Stage.width / 2;
my_sound.stop();
createHover(btm);
createHover(ss);
createHover(ta);
createHover(mg2);
if (score > personalHighScore) {
personalHighScore = score;
sObject.data.phs = personalHighScore;
sObject.flush();
} else {
npb._alpha = 0;
}
ss.onRelease = function () {
Mouse.show();
mochi.MochiScores.showLeaderboard({boardID:"89db28dbf8b4a93c", score:personalHighScore, onClose:function () {
gotoAndStop (3);
Mouse.hide();
}});
};
pbtxt = personalHighScore;
btm.onRelease = function () {
gotoAndStop (3);
};
ta.onRelease = function () {
gotoAndStop (3);
};
mg2.onRelease = function () {
getURL ("http://www.freegamesonline.com/", "_blank");
};
Key.removeListener(keyListener);
gameover = false;
gamepause = false;
if (secondsThisGame <= 10) {
giveAward(54);
}
if (score == 666) {
giveAward(58);
}
if (enemiesLeft > 0) {
gc.gotoAndStop(1);
} else {
insaneMode = true;
sObject.data.insanemode = true;
sObject.flush();
gc.gotoAndStop(2);
if (lives <= 1) {
giveAward(56);
}
if (untouched) {
giveAward(49);
}
if (lSize == 1) {
giveAward(17);
}
if (lSize == 2) {
giveAward(18);
}
if (lSize == 3) {
giveAward(19);
}
if (lSize == 4) {
giveAward(20);
}
}
_root.gamename = "Cell Warfare";
scoretxt = personalHighScore;
Frame 6
createHover(btm);
btm.onRelease = function () {
gotoAndStop (3);
};
Frame 7
function badgeAlphas(array1, array2) {
var _local5 = array1.length;
var _local2 = 0;
var _local4 = 0;
b = array1.length;
while (b >= 0) {
if (awardsRecieved[array1[b]] == 1) {
_local2 = _local2 + 1;
}
b--;
}
_local4 = (_local2 / _local5) * 100;
if (_local4 >= 25) {
array2[0]._alpha = 100;
oldBadges = oldBadges + 1;
} else {
blah = new Color(array2[0]);
blah.setRGB(0);
}
if (_local4 >= 50) {
array2[1]._alpha = 100;
oldBadges = oldBadges + 1;
} else {
blah = new Color(array2[1]);
blah.setRGB(0);
}
if (_local4 >= 75) {
array2[2]._alpha = 100;
oldBadges = oldBadges + 1;
} else {
blah = new Color(array2[2]);
blah.setRGB(0);
}
if (_local4 >= 100) {
array2[3]._alpha = 100;
oldBadges = oldBadges + 1;
} else {
blah = new Color(array2[3]);
blah.setRGB(0);
}
}
function bMake(item, frame) {
item.onRollOver = function () {
item._alpha = 30;
};
item.onRollOut = function () {
item._alpha = 10;
};
item.onReleaseOutside = function () {
item._alpha = 10;
};
item.onRelease = function () {
gotoAndStop(frame);
};
}
createHover(btm);
btm.onRelease = function () {
gotoAndStop (3);
};
oldBadges = 0;
bMake(g1, 8);
bMake(g2, 9);
bMake(g3, 10);
bMake(g4, 11);
bMake(g5, 12);
bMake(g6, 13);
bMake(g7, 14);
hText = hours;
mText = minutes;
sText = seconds;
badgeArray1 = new Array(a1g1, a1g2, a1g3, a1g4);
badgeArray2 = new Array(a2g1, a2g2, a2g3, a2g4);
badgeArray3 = new Array(a3g1, a3g2, a3g3, a3g4);
badgeArray4 = new Array(a4g1, a4g2, a4g3, a4g4);
badgeArray5 = new Array(a5g1, a5g2, a5g3, a5g4);
badgeArray6 = new Array(a6g1, a6g2, a6g3, a6g4);
badgeArray7 = new Array(a7g1, a7g2, a7g3, a7g4);
badgeAlphas(groupArray1, badgeArray1);
badgeAlphas(groupArray2, badgeArray2);
badgeAlphas(groupArray3, badgeArray3);
badgeAlphas(groupArray4, badgeArray4);
badgeAlphas(groupArray5, badgeArray5);
badgeAlphas(groupArray6, badgeArray6);
badgeAlphas(groupArray7, badgeArray7);
Frame 8
function allRollOvers(t1, t2) {
i = t1.length - 1;
while (i >= 0) {
rollOvers(i, t2, t1);
i--;
}
}
function checkAlphas(firstArray, secondArray) {
i = firstArray.length - 1;
while (i >= 0) {
if (awardsRecieved[firstArray[i]] == 1) {
secondArray[i]._alpha = 100;
} else {
secondArray[i]._alpha = 0;
}
i--;
}
}
function rollOvers(i, blurber, bray) {
bray[i].onRollOver = function () {
var _local1 = 0;
b = bray.length - 1;
while (b >= 0) {
if (bray[b]._alpha >= 22) {
_local1 = 1;
}
b--;
}
if (bray[i]._alpha <= 32) {
bray[i]._alpha = 30;
}
if (_local1 == 0) {
infotxt = blurber[i];
}
};
bray[i].onRollOut = function () {
if (bray[i]._alpha <= 32) {
bray[i]._alpha = 15;
}
};
bray[i].onReleaseOutside = function () {
if (bray[i]._alpha <= 32) {
bray[i]._alpha = 15;
}
};
bray[i].onPress = function () {
b = bray.length - 1;
while (b >= 0) {
if (b != i) {
bray[b]._alpha = 15;
}
b--;
}
infotxt = blurber[i];
if (bray[i]._alpha <= 32) {
bray[i]._alpha = 35;
} else {
bray[i]._alpha = 30;
}
};
}
createHover(rtb);
rtb.onRelease = function () {
gotoAndStop (7);
};
aArray1 = new Array(a11, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10);
bArray1 = new Array(b11, b1, b2, b3, b4, b5, b6, b7, b8, b9, b10);
blurbs1 = new Array("Complete a legion without ever losing a life.", "Achieve a score of 100 during a single game", "Achieve a score of 500 during a single game", "Achieve a score of 1000 during a single game", "Achieve a score of 2000 during a single game", "Achieve a score of 3000 during a single game", "Achieve a score of 4000 during a single game", "Achieve a score of 5000 during a single game", "Achieve a score of 6250 during a single game", "Achieve a score of 7500 during a single game", "Achieve a score of 10000 during a single game");
checkAlphas(groupArray1, aArray1);
allRollOvers(bArray1, blurbs1);
badgeAlphas(groupArray1, badgeArray1);
Frame 9
function allRollOvers(t1, t2) {
i = t1.length - 1;
while (i >= 0) {
rollOvers(i, t2, t1);
i--;
}
}
function checkAlphas(firstArray, secondArray) {
i = firstArray.length - 1;
while (i >= 0) {
if (awardsRecieved[firstArray[i]] == 1) {
secondArray[i]._alpha = 100;
} else {
secondArray[i]._alpha = 0;
}
i--;
}
}
function rollOvers(i, blurber, bray) {
bray[i].onRollOver = function () {
var _local1 = 0;
b = bray.length - 1;
while (b >= 0) {
if (bray[b]._alpha >= 22) {
_local1 = 1;
}
b--;
}
if (bray[i]._alpha <= 32) {
bray[i]._alpha = 30;
}
if (_local1 == 0) {
infotxt = blurber[i];
}
};
bray[i].onRollOut = function () {
if (bray[i]._alpha <= 32) {
bray[i]._alpha = 15;
}
};
bray[i].onReleaseOutside = function () {
if (bray[i]._alpha <= 32) {
bray[i]._alpha = 15;
}
};
bray[i].onPress = function () {
b = bray.length - 1;
while (b >= 0) {
if (b != i) {
bray[b]._alpha = 15;
}
b--;
}
infotxt = blurber[i];
if (bray[i]._alpha <= 32) {
bray[i]._alpha = 35;
} else {
bray[i]._alpha = 30;
}
};
}
createHover(rtb);
rtb.onRelease = function () {
gotoAndStop (7);
};
aArray2 = new Array(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11);
bArray2 = new Array(b1, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11);
blurbs2 = new Array("Kill a cell.", "Kill a P.C. cell.", "Kill an N.C. cell.", "Kill a Repliclone cell.", "Kill a DeathRupture cell.", "Kill a Giga Cell.", "Kill a N.C.+ cell.", "Kill a Charger cell.", "Kill a Swinger cell.", "Kill a Ghost Cell", "Kill every type of cell.");
checkAlphas(groupArray2, aArray2);
allRollOvers(bArray2, blurbs2);
badgeAlphas(groupArray2, badgeArray2);
Frame 10
function allRollOvers(t1, t2) {
i = t1.length - 1;
while (i >= 0) {
rollOvers(i, t2, t1);
i--;
}
}
function checkAlphas(firstArray, secondArray) {
i = firstArray.length - 1;
while (i >= 0) {
if (awardsRecieved[firstArray[i]] == 1) {
secondArray[i]._alpha = 100;
} else {
secondArray[i]._alpha = 0;
}
i--;
}
}
function rollOvers(i, blurber, bray) {
bray[i].onRollOver = function () {
var _local1 = 0;
b = bray.length - 1;
while (b >= 0) {
if (bray[b]._alpha >= 22) {
_local1 = 1;
}
b--;
}
if (bray[i]._alpha <= 32) {
bray[i]._alpha = 30;
}
if (_local1 == 0) {
infotxt = blurber[i];
}
};
bray[i].onRollOut = function () {
if (bray[i]._alpha <= 32) {
bray[i]._alpha = 15;
}
};
bray[i].onReleaseOutside = function () {
if (bray[i]._alpha <= 32) {
bray[i]._alpha = 15;
}
};
bray[i].onPress = function () {
b = bray.length - 1;
while (b >= 0) {
if (b != i) {
bray[b]._alpha = 15;
}
b--;
}
infotxt = blurber[i];
if (bray[i]._alpha <= 32) {
bray[i]._alpha = 35;
} else {
bray[i]._alpha = 30;
}
};
}
createHover(rtb);
rtb.onRelease = function () {
gotoAndStop (7);
};
aArray3 = new Array(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14);
bArray3 = new Array(b1, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13, b14);
blurbs3 = new Array("Click on any size legion or survival mode, if you're having trouble with this one don't bother playing.", "Collect the blue upgrade that gives you an extra life.", "Collect the green upgrade that makes you shoot faster.", "Collect the red upgrade that makes you shoot three bullets a shot.", "Don't shoot for 20 seconds.", "Touch the outside of the screen.", "Move Really fast.", "Don't move for 10 seconds.", "Kill yourself within 10 seconds of the game.", "Pause the game.", "Kill a nest with 20% health left.", "Die right before you complete a nest (within 5 kills).", "Get a score of 666", "Collect the orange upgrade that gives you two bullets a shot.");
checkAlphas(groupArray3, aArray3);
allRollOvers(bArray3, blurbs3);
badgeAlphas(groupArray3, badgeArray3);
Frame 11
function allRollOvers(t1, t2) {
i = t1.length - 1;
while (i >= 0) {
rollOvers(i, t2, t1);
i--;
}
}
function checkAlphas(firstArray, secondArray) {
i = firstArray.length - 1;
while (i >= 0) {
if (awardsRecieved[firstArray[i]] == 1) {
secondArray[i]._alpha = 100;
} else {
secondArray[i]._alpha = 0;
}
i--;
}
}
function rollOvers(i, blurber, bray) {
bray[i].onRollOver = function () {
var _local1 = 0;
b = bray.length - 1;
while (b >= 0) {
if (bray[b]._alpha >= 22) {
_local1 = 1;
}
b--;
}
if (bray[i]._alpha <= 32) {
bray[i]._alpha = 30;
}
if (_local1 == 0) {
infotxt = blurber[i];
}
};
bray[i].onRollOut = function () {
if (bray[i]._alpha <= 32) {
bray[i]._alpha = 15;
}
};
bray[i].onReleaseOutside = function () {
if (bray[i]._alpha <= 32) {
bray[i]._alpha = 15;
}
};
bray[i].onPress = function () {
b = bray.length - 1;
while (b >= 0) {
if (b != i) {
bray[b]._alpha = 15;
}
b--;
}
infotxt = blurber[i];
if (bray[i]._alpha <= 32) {
bray[i]._alpha = 35;
} else {
bray[i]._alpha = 30;
}
};
}
createHover(rtb);
rtb.onRelease = function () {
gotoAndStop (7);
};
aArray4 = new Array(a1, a2, a3, a4, a5, a6, a7, a8);
bArray4 = new Array(b1, b2, b3, b4, b5, b6, b7, b8);
blurbs4 = new Array("Unlock 10 achievements.", "Unlock 20 achievements. This unlocks a new powerup that kills all enemies on the field.", "Unlock 30 achievements.", "Unlock 40 achievements. This unlocks a new powerup that gives you a shield.", "Unlock 50 achievements.", "Unlock 60 achievements. This unlocks an ability that gradually regenerates your health.", "Unlock 70 achievements.", "Complete all 77 achievements in the game, if you have obtained this award you have truely beaten this game. (Gold Bullets)");
checkAlphas(groupArray4, aArray4);
allRollOvers(bArray4, blurbs4);
badgeAlphas(groupArray4, badgeArray4);
Frame 12
function allRollOvers(t1, t2) {
i = t1.length - 1;
while (i >= 0) {
rollOvers(i, t2, t1);
i--;
}
}
function checkAlphas(firstArray, secondArray) {
i = firstArray.length - 1;
while (i >= 0) {
if (awardsRecieved[firstArray[i]] == 1) {
secondArray[i]._alpha = 100;
} else {
secondArray[i]._alpha = 0;
}
i--;
}
}
function rollOvers(i, blurber, bray) {
bray[i].onRollOver = function () {
var _local1 = 0;
b = bray.length - 1;
while (b >= 0) {
if (bray[b]._alpha >= 22) {
_local1 = 1;
}
b--;
}
if (bray[i]._alpha <= 32) {
bray[i]._alpha = 30;
}
if (_local1 == 0) {
infotxt = blurber[i];
}
};
bray[i].onRollOut = function () {
if (bray[i]._alpha <= 32) {
bray[i]._alpha = 15;
}
};
bray[i].onReleaseOutside = function () {
if (bray[i]._alpha <= 32) {
bray[i]._alpha = 15;
}
};
bray[i].onPress = function () {
b = bray.length - 1;
while (b >= 0) {
if (b != i) {
bray[b]._alpha = 15;
}
b--;
}
infotxt = blurber[i];
if (bray[i]._alpha <= 32) {
bray[i]._alpha = 35;
} else {
bray[i]._alpha = 30;
}
};
}
createHover(rtb);
rtb.onRelease = function () {
gotoAndStop (7);
};
aArray5 = new Array(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10);
bArray5 = new Array(b1, b2, b3, b4, b5, b6, b7, b8, b9, b10);
blurbs5 = new Array("Play this game for 5 minutes.", "Play this game for 15 minutes.", "Play this game for 30 minutes.", "Play this game for 60 minutes.", "Play this game for 120 minutes.", "In survival mode, play at least 1 minute without dying.", "In survival mode, play at least 2 minute without dying.", "In survival mode, play at least 3 minute without dying.", "In survival mode, play at least 5 minute without dying.", "In survival mode, play at least 10 minute without dying.");
checkAlphas(groupArray5, aArray5);
allRollOvers(bArray5, blurbs5);
badgeAlphas(groupArray5, badgeArray5);
Frame 13
function allRollOvers(t1, t2) {
i = t1.length - 1;
while (i >= 0) {
rollOvers(i, t2, t1);
i--;
}
}
function checkAlphas(firstArray, secondArray) {
i = firstArray.length - 1;
while (i >= 0) {
if (awardsRecieved[firstArray[i]] == 1) {
secondArray[i]._alpha = 100;
} else {
secondArray[i]._alpha = 0;
}
i--;
}
}
function rollOvers(i, blurber, bray) {
bray[i].onRollOver = function () {
var _local1 = 0;
b = bray.length - 1;
while (b >= 0) {
if (bray[b]._alpha >= 22) {
_local1 = 1;
}
b--;
}
if (bray[i]._alpha <= 32) {
bray[i]._alpha = 30;
}
if (_local1 == 0) {
infotxt = blurber[i];
}
};
bray[i].onRollOut = function () {
if (bray[i]._alpha <= 32) {
bray[i]._alpha = 15;
}
};
bray[i].onReleaseOutside = function () {
if (bray[i]._alpha <= 32) {
bray[i]._alpha = 15;
}
};
bray[i].onPress = function () {
b = bray.length - 1;
while (b >= 0) {
if (b != i) {
bray[b]._alpha = 15;
}
b--;
}
infotxt = blurber[i];
if (bray[i]._alpha <= 32) {
bray[i]._alpha = 35;
} else {
bray[i]._alpha = 30;
}
};
}
createHover(rtb);
rtb.onRelease = function () {
gotoAndStop (7);
};
aArray6 = new Array(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15);
bArray6 = new Array(b1, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13, b14, b15);
blurbs6 = new Array("Die.", "Die 5 times.", "Die 10 times.", "Die 25 times.", "Die 100 times.", "Get Killed by a P.C.", "Get Killed by a N.C.", "Get Killed by a Repliclone.", "Get Killed by a DeathRupture.", "Get Killed by a Giga Cell.", "Get Killed by a N.C.+", "Get Killed by a Charger.", "Get Killed by a Swinger.", "Get Killed by a Ghost Cell.", "Get Killed by Black OOZE.");
checkAlphas(groupArray6, aArray6);
allRollOvers(bArray6, blurbs6);
badgeAlphas(groupArray6, badgeArray6);
Frame 14
function allRollOvers(t1, t2) {
i = t1.length - 1;
while (i >= 0) {
rollOvers(i, t2, t1);
i--;
}
}
function checkAlphas(firstArray, secondArray) {
i = firstArray.length - 1;
while (i >= 0) {
if (awardsRecieved[firstArray[i]] == 1) {
secondArray[i]._alpha = 100;
} else {
secondArray[i]._alpha = 0;
}
i--;
}
}
function rollOvers(i, blurber, bray) {
bray[i].onRollOver = function () {
var _local1 = 0;
b = bray.length - 1;
while (b >= 0) {
if (bray[b]._alpha >= 22) {
_local1 = 1;
}
b--;
}
if (bray[i]._alpha <= 32) {
bray[i]._alpha = 30;
}
if (_local1 == 0) {
infotxt = blurber[i];
}
};
bray[i].onRollOut = function () {
if (bray[i]._alpha <= 32) {
bray[i]._alpha = 15;
}
};
bray[i].onReleaseOutside = function () {
if (bray[i]._alpha <= 32) {
bray[i]._alpha = 15;
}
};
bray[i].onPress = function () {
b = bray.length - 1;
while (b >= 0) {
if (b != i) {
bray[b]._alpha = 15;
}
b--;
}
infotxt = blurber[i];
if (bray[i]._alpha <= 32) {
bray[i]._alpha = 35;
} else {
bray[i]._alpha = 30;
}
};
}
createHover(rtb);
rtb.onRelease = function () {
gotoAndStop (7);
};
aArray7 = new Array(a1, a2, a3, a4, a5, a6, a7, a8, a9);
bArray7 = new Array(b1, b2, b3, b4, b5, b6, b7, b8, b9);
blurbs7 = new Array("Kill 10 enemy cells.", "Kill 100 enemy cells.", "Kill 500 enemy cells.", "Kill 2000 enemy cells.", "Kill 10000 enemy cells.", "Kill all the enemies in the mode \"Small Legion\".", "Kill all the enemies in the mode \"Medium Legion\".", "Kill all the enemies in the mode \"Large Legion\".", "Kill all the enemies in the mode \"Insane Legion\".");
checkAlphas(groupArray7, aArray7);
allRollOvers(bArray7, blurbs7);
badgeAlphas(groupArray7, badgeArray7);
Frame 15
createHover(btm);
btm.onRelease = function () {
gotoAndStop (3);
};
mg.onPress = function () {
getURL ("http://www.freegamesonline.com/", "_blank");
};
ef.onPress = function () {
getURL ("http://eliteferrex.newgrounds.com/audio/", "_blank");
};
xd.onPress = function () {
getURL ("http://portalstrike.com/", "_blank");
};
Symbol 18 MovieClip Frame 1
stop();
Symbol 18 MovieClip Frame 2
stop();
Symbol 22 MovieClip [pauseMC] Frame 1
btn_powered.onRelease = function () {
getURL ("http://www.ad4game.com", "_blank", "POST");
};
Symbol 29 MovieClip Frame 1
stop();
Symbol 29 MovieClip Frame 10
_parent.removeMovieClip();
Symbol 33 MovieClip [aim] Frame 1
stop();
Symbol 37 MovieClip Frame 1
stop();
Symbol 37 MovieClip Frame 10
_parent.removeMovieClip();
Symbol 42 MovieClip Frame 1
stop();
Symbol 42 MovieClip Frame 10
_parent.removeMovieClip();
Symbol 45 MovieClip Frame 1
stop();
Symbol 45 MovieClip Frame 10
_parent.removeMovieClip();
Symbol 49 MovieClip Frame 1
stop();
Symbol 49 MovieClip Frame 10
_parent.removeMovieClip();
Symbol 50 MovieClip [enemy7] Frame 1
stop();
Symbol 59 MovieClip [newEnemies] Frame 100
stop();
Symbol 64 MovieClip [spike2] Frame 1
stop();
Symbol 71 MovieClip [newEnemies2] Frame 200
stop();
Symbol 75 MovieClip Frame 1
stop();
Symbol 75 MovieClip Frame 10
_parent.removeMovieClip();
Symbol 79 MovieClip [newEnemies3] Frame 100
stop();
Symbol 83 MovieClip Frame 1
stop();
Symbol 83 MovieClip Frame 2
_parent.removeMovieClip();
Symbol 117 MovieClip Frame 1
stop();
Symbol 135 MovieClip [redFlash] Frame 10
this.removeMovieClip();
Symbol 139 MovieClip Frame 1
stop();
Symbol 139 MovieClip Frame 10
_parent.removeMovieClip();
Symbol 142 MovieClip [orangedes] Frame 4
stop();
Symbol 145 MovieClip Frame 1
stop();
Symbol 145 MovieClip Frame 10
_parent.removeMovieClip();
Symbol 150 MovieClip Frame 1
stop();
Symbol 150 MovieClip Frame 10
_parent.removeMovieClip();
Symbol 155 MovieClip Frame 1
stop();
Symbol 155 MovieClip Frame 10
_parent.removeMovieClip();
Symbol 160 MovieClip Frame 20
_parent.removeMovieClip();
Symbol 167 MovieClip [up1] Frame 100
stop();
Symbol 170 MovieClip [up2] Frame 100
stop();
Symbol 173 MovieClip [up3] Frame 100
stop();
Symbol 176 MovieClip [up4] Frame 100
stop();
Symbol 191 MovieClip [up5] Frame 100
stop();
Symbol 197 MovieClip [up6] Frame 100
stop();
Symbol 201 MovieClip [np1] Frame 100
stop();
Symbol 204 MovieClip [np2] Frame 100
stop();
Symbol 208 MovieClip [np3] Frame 100
stop();
Symbol 211 MovieClip [np4] Frame 100
stop();
Symbol 234 MovieClip [music] Frame 1
stop();
Symbol 247 MovieClip Frame 1
stop();
Symbol 247 MovieClip Frame 10
_parent.removeMovieClip();
Symbol 250 MovieClip Frame 1
stop();
Symbol 250 MovieClip Frame 10
_parent.removeMovieClip();
Symbol 251 MovieClip [enemy] Frame 1
stop();
Symbol 258 MovieClip [moreGames] Frame 35
stop();
Symbol 285 MovieClip Frame 100
stop();
btn_continue.onPress = function () {
trace("this._parent._parent = " + this._parent._parent._parent);
this._parent._parent._parent.play();
};
Symbol 288 MovieClip Frame 1
isDemo = false;
iDemoCount = 0;
Symbol 288 MovieClip Frame 2
if (isDemo == false) {
iFileLoaded = _root.getBytesLoaded();
iFileSize = _root.getBytesTotal();
}
if (isDemo == false) {
iPercentLoaded = Math.round((iFileLoaded / iFileSize) * 100);
} else {
iPercentLoaded = iDemoCount;
iDemoCount++;
}
this._parent.anim.gotoAndStop(iPercentLoaded);
this._parent.perc.per.text = iPercentLoaded + " %";
Symbol 288 MovieClip Frame 3
if (iPercentLoaded == 100) {
gotoAndPlay(_currentframe + 1);
} else {
gotoAndPlay(_currentframe - 1);
}
Symbol 288 MovieClip Frame 4
stop();
Symbol 292 MovieClip Frame 1
btn_sponsor.onRelease = function () {
getURL ("http://www.ad4game.com", "_blank", "POST");
};
Symbol 306 MovieClip Frame 1
stop();
Symbol 306 MovieClip Frame 55
stop();
Symbol 313 MovieClip Frame 1
function runBorder() {
borderAnim.gotoAndPlay(2);
clearInterval(runInterval);
}
function checkParamsLoaded() {
if (content_mc.txt.text == "") {
trace("not yet.");
for (i in content_mc) {
if (i == "btn") {
} else if (i == "txt") {
} else if (i == "holder") {
} else if (i == "bg") {
} else if (i == "mcLoader1") {
} else if (i != "") {
content_mc.txt.text = content_mc[i];
}
}
} else {
for (i in content_mc) {
str = str + content_mc[i];
}
clearInterval(param_interval);
display(str);
}
}
function display(s) {
trace("s = " + s);
var _local5;
_local5 = s.indexOf(".swf", 0);
trace("flag = " + _local5);
flag1 = s.indexOf(".gif", 0);
if ((_local5 == -1) && (flag1 != -1)) {
trace("111");
var _local4;
_local4 = s.indexOf("http", 0);
var _local7;
_local7 = s.indexOf("target", 0);
var str1;
str1 = substring(s, _local4 + 1, _local7 - 3);
var _local3;
_local3 = s.indexOf("http", _local7);
var _local6;
_local6 = s.indexOf("gif", _local7);
var str2;
str2 = substring(s, _local3 + 1, (_local6 - _local3) + 3);
content_mc.holder.loadMovie(str2);
this.onEnterFrame = function () {
trace("this._width = " + content_mc.holder._width);
if (content_mc.holder._width <= 0) {
} else {
flagtoolTip = true;
content_mc.mcLoader1._visible = false;
loadFlag = 1;
runInterval = setInterval(runBorder, 3000);
delete this.onEnterFrame;
}
};
content_mc.btn.onRelease = function () {
pauseMC_Display();
getURL (str1, "_blank", "POST");
};
content_mc.btn.onRollOver = function () {
trace("roll");
if (flagtoolTip == true) {
adToolTip._visible = true;
}
};
content_mc.btn.onRollOut = function () {
adToolTip._visible = false;
content_mc.btn.onEnterFrame = null;
};
} else if ((_local5 == -1) && (flag1 == -1)) {
trace("222");
var _local4 = s.indexOf("http", 0);
var _local7 = s.indexOf("target", 0);
var str1;
str1 = substring(s, _local4 + 1, _local7 - 3);
var _local3 = s.indexOf("http", _local7);
var _local6 = s.indexOf("jpg", _local7);
var str2;
str2 = substring(s, _local3 + 1, (_local6 - _local3) + 3);
content_mc.holder.loadMovie(str2);
this.onEnterFrame = function () {
trace("this._width = " + content_mc.holder._width);
if (content_mc.holder._width <= 0) {
} else {
flagtoolTip = true;
loadFlag = 1;
content_mc.mcLoader1._visible = false;
runInterval = setInterval(runBorder, 3000);
delete this.onEnterFrame;
}
};
content_mc.btn.onRelease = function () {
pauseMC_Display();
getURL (str1, "_blank", "POST");
};
content_mc.btn.onRollOver = function () {
trace("roll");
if (flagtoolTip == true) {
adToolTip._visible = true;
}
};
content_mc.btn.onRollOut = function () {
adToolTip._visible = false;
content_mc.btn.onEnterFrame = null;
};
} else {
trace("333");
var _local4 = s.indexOf("FILE1", 0);
trace("c1 = " + _local4);
var _local7 = s.indexOf(".swf", _local4);
trace("c2 = " + _local7);
var str1;
str1 = substring(s, _local4 + 7, (_local7 - _local4) - 2);
trace("str1 = " + str1);
var _local3 = s.indexOf("clickTAG", 0);
trace("c3 = " + _local3);
var _local6 = s.indexOf("\"", _local3);
trace("c4 = " + _local6);
var str2;
str2 = substring(s, _local3, (_local6 - _local3) - 1);
trace("str2 = " + str2);
content_mc.holder.loadMovie(str1);
this.onEnterFrame = function () {
trace("this._width = " + content_mc.holder._width);
if (content_mc.holder._width <= 0) {
} else {
loadFlag = 1;
flagtoolTip = true;
content_mc.mcLoader1._visible = false;
runInterval = setInterval(runBorder, 3000);
delete this.onEnterFrame;
}
};
content_mc.btn.onRelease = function () {
pauseMC_Display();
getURL (str2, "_blank", "POST");
};
content_mc.btn.onRollOver = function () {
trace("roll");
if (flagtoolTip == true) {
adToolTip._visible = true;
}
};
content_mc.btn.onRollOut = function () {
adToolTip._visible = false;
content_mc.btn.onEnterFrame = null;
};
}
}
function pauseMC_Display() {
content_mc._visible = false;
sponsorBy._visible = false;
btn_powered._visible = false;
borderAnim._visible = false;
var cover = this.createEmptyMovieClip("cover", 2);
var coverBG = this.createEmptyMovieClip("coverBG", 1);
coverBG.onRelease = function () {
this.removeMovieClip();
cover.removeMovieClip();
};
coverBG._x = -300;
coverBG._y = -420;
cover.attachMovie("pauseMC", "pauseMC", 3);
cover.pauseMC._x = -38;
cover.pauseMC._y = -240;
trace("cover._x = " + cover._x);
trace("cover._y = " + cover._y);
cover.pauseMC.playPause.onRollOver = function () {
if (loadFlag == 1) {
cover.pauseMC.playPause.gotoAndStop(2);
}
trace("rollOver");
};
cover.pauseMC.playPause.onRollOut = function () {
if (loadFlag == 1) {
cover.pauseMC.playPause.gotoAndStop(1);
}
trace("rollOut");
};
cover.pauseMC.playPause.onRelease = function () {
if (loadFlag == 1) {
pt._parent.play();
}
};
cover.pauseMC.btn.onRelease = function () {
this._parent.removeMovieClip();
coverBG.removeMovieClip();
};
}
stop();
var str;
str = "";
var pt;
pt = this;
var loadFlag;
loadFlag = 0;
System.security.allowDomain("http://ads.ad4game.com/");
loadVariables ("http://ads.ad4game.com/servlet/ajrotator/561851/0/vh?z=ad4game&dim=389637", content_mc);
var runInterval;
var param_interval = setInterval(checkParamsLoaded, 100);
content_mc.txt._visible = false;
content_mc.mcLoader1._visible = true;
adToolTip._visible = false;
var flagtoolTip;
flagtoolTip = false;
btn_powered.onRelease = function () {
getURL ("http://www.ad4game.com", "_blank", "POST");
};
Symbol 758 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.32");
}
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 ((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:_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 759 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.__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 (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 330 Button
on (release) {
getURL ("http://www.freegamesonline.com", "_blank");
}
Symbol 341 MovieClip Frame 150
stop();
_root.gotoAndStop(3);
Symbol 342 Button
on (release) {
getURL ("http://www.freegamesonline.com", "_blank");
}
Symbol 346 MovieClip Frame 60
stop();
Symbol 353 MovieClip Frame 20
stop();
Symbol 359 MovieClip Frame 25
stop();
Symbol 362 MovieClip Frame 30
stop();
Symbol 366 MovieClip Frame 40
stop();
Symbol 370 MovieClip Frame 45
stop();
Symbol 383 MovieClip Frame 60
stop();
Symbol 386 MovieClip Frame 60
stop();
Symbol 410 MovieClip Frame 1
stop();
Symbol 430 MovieClip Frame 1
stop();
Symbol 430 MovieClip Frame 10
stop();
Symbol 430 MovieClip Frame 20
stop();
Symbol 430 MovieClip Frame 30
stop();
Symbol 463 MovieClip Frame 50
stop();
Symbol 478 MovieClip Frame 100
gotoAndStop (1);
Symbol 498 MovieClip Frame 350
stop();