Frame 1
Stage.showMenu = false;
Instance of Symbol 1 MovieClip "lactions" in Frame 1
onClipEvent (load) {
function loadgame() {
var _local1 = this;
_local1.gameloadedg._visible = 1;
bloaded = _root.getbytesloaded();
if (bloaded >= btotal) {
gameloaded = 1;
_local1.gameloadedg.per = "100%";
_local1.gameloadedg._visible = 0;
message = "Game Loaded: OK\r";
} else {
per = bloaded / btotal;
per = per * 100;
per = int(per);
_local1.gameloadedg.per = per + "%";
}
}
function loadad() {
adplay = 0;
adbox.loadMovie(adurl);
adtotal = adbox.getbytestotal();
if (0 < adframes) {
adframes = adframes;
} else {
adframes = 150;
}
adbox.gotoAndStop(1);
}
function runad() {
var _local1 = this;
adloaded = adbox.getbytesloaded();
_local1.gameloadg._visible = 1;
if (adloaded >= adtotal) {
adframes--;
if (adplay == 0) {
adplay = 1;
adbox.play();
}
if (adframes < 10) {
adbox._alpha = adbox._alpha - 10;
}
_local1.gameloadedg._visible = 0;
if (adframes == 0) {
adbox._visible = 0;
}
} else {
per = adloaded / adtotal;
per = per * 100;
per = int(per);
_local1.gameloadedg.per = per + "%";
}
}
function checkflash() {
framecount++;
if (playerVersion.length == 0) {
return(0);
}
i = 0;
while (playerVersion.length >= i) {
i = i + 1;
temp = substring(playerVersion, i, 1);
if (temp eq " ") {
platform = substring(playerVersion, 1, i - 1);
majorVersion = substring(playerVersion, i + 1, 1);
secondHalf = substring(playerVersion, i + 1, myLength - i);
minorVersion = substring(secondHalf, 5, 2);
}
}
trace(majorversion);
if (majorVersion >= 5) {
message = message + "Game Player: OK\r";
framecount = 0;
flashcheck = 1;
} else {
flashcheck = 3;
}
}
function checkdate() {
framecount++;
trace("Checking Date");
if ((datecheck == 0) && (fyear.length != 0)) {
dc = 0;
fdshow = (((fyear + "") + fmonth) + "") + fday;
good = 0;
edate = (((eyear + "") + emonth) + "") + eday;
edate = edate.toString();
fdshow = fdshow.toString();
dc = (edate + "-") + fdshow;
showdatecode = dc;
if ((fdshow lt edate) && (fdshow.length == 8)) {
good = 1;
} else {
good = 0;
}
if ((good == 1) || (lifetime == 1)) {
message = message + "DC: OK\r";
framecount = 0;
datecheck = 1;
}
}
trace("Date Checked: " + datecheck);
}
function checkdomain() {
framecount++;
domaincheck = 1;
message = message + "DOC: OK\r";
}
function allclear() {
allclearvar = 1;
}
domain1 = "";
domain2 = "";
domain3 = "";
domain4 = "";
eyear = 2000;
emonth = 10;
eday = 0;
lifetime = 1;
gameloaded = 0;
flashcheck = 0;
domaincheck = 0;
datecheck = 0;
framecount = 0;
gamefailed = 0;
adurl = _root.adurl;
adframes = _root.adframes;
allclearvar = 0;
this.failedg._visible = 0;
this.gameloadedg._visible = 0;
if (0 < adurl.length) {
loadad();
} else {
adframes = 0;
}
btotal = _root.getbytestotal();
dday = new Date();
fday = dday.getDate();
if (fday < 10) {
fday = "0" + fday;
}
dmonth = new Date();
fmonth = dmonth.getMonth() + 1;
if (fmonth < 10) {
fmonth = "0" + fmonth;
}
dyear = new Date();
fyear = dyear.getFullYear();
playerVersion = getVersion();
thisurl = this._url;
}
onClipEvent (enterFrame) {
if (gamefailed == 0) {
if (gameloaded == 0) {
loadgame();
}
if ((gameloaded == 1) && (flashcheck == 0)) {
checkflash();
}
if (((gameloaded == 1) && (flashcheck == 1)) && (domaincheck == 0)) {
checkdomain();
}
if ((((gameloaded == 1) && (flashcheck == 1)) && (domaincheck == 1)) && (datecheck == 0)) {
checkdate();
}
if ((((gameloaded == 1) && (flashcheck == 1)) && (domaincheck == 1)) && (0 < adframes)) {
runad();
}
if (((((gameloaded == 1) && (flashcheck == 1)) && (domaincheck == 1)) && (adframes == 0)) && (datecheck == 1)) {
allclear();
}
}
if ((framecount == 10) && (gamefailed == 0)) {
gamefailed = 1;
msg = "1";
if ((gameloaded != 1) && (msg.length == 1)) {
msg = "Failed on Loading";
}
if ((flashcheck != 1) && (msg.length == 1)) {
msg = "Failed on Flash Version. Please visit www.macromedia.com to download the latest Flash Player";
}
if ((domaincheck != 1) && (msg.length == 1)) {
msg = "Failed on Loading area. Please contact the site admin and let them know that game didn't load and the error code is E2033";
}
if ((datecheck != 1) && (msg.length == 1)) {
msg = "Please notify site admin of a Error E2002";
}
message = message + msg;
this.failedg.message = message;
this.failedg._visible = 1;
this.gameloadedg._visible = 0;
}
}
Frame 2
if (this.lactions.allclearvar == 0) {
prevFrame();
play();
}
Frame 35
stop();
Frame 37
getURL ("");
Frame 44
_root.menubar.swapDepths(10000);
function setup() {
_root.clickstofill = -1;
eval (9110)._visible = 0;
setupcolorbuttons();
_root.ownlist = new Array(700);
_root.ol = 0;
_root.framecounter = 0;
_root.gameover = 0;
_root.clicked = 0;
_root.control = 1;
_root.cellsize = 17;
_root.ballsize = 17;
_root.ballwidth = int(ballsize * 1.2857) + 1;
_root.totalcells = _root.row * _root.col;
_root.screencenterh = 233;
_root.screencenterv = 161;
_root.offsetx = (_root.screencenterh - ((cellsize * row) / 2)) - cellsize;
_root.offsety = _root.screencenterv - ((cellsize * col) / 2);
_root.currentcolor = 0;
z = 0;
while (640 >= z) {
removeMovieClip(eval (z));
z++;
}
fillobjects();
fillcells();
}
function computerpick() {
var _local1 = _root;
_local1.cp = 0;
while (cp == 0) {
while (cp != _local1.lastcolor) {
cp = random(maxcolors) + 1;
}
}
return(cp);
}
function changplayers() {
var _local1 = _root;
_local1.currentplayer++;
if (_local1.maxplayers < _local1.currentplayer) {
_local1.currentplayer = 1;
}
}
function setupcolorbuttons() {
z = 1;
while (10 >= z) {
eval ("_root.hexb" + z)._visible = 0;
eval ("_root.hexb" + z)._alpha = 100;
z++;
}
z = 1;
while (maxcolors >= z) {
eval ("_root.hexb" + z)._visible = 1;
z++;
}
eval ("_root.hexb" + _root.lastcolor)._alpha = 0;
}
function cellobject(filled, owned) {
this.filled = filled;
this.owned = owned;
}
function fillobjects() {
q = 0;
while (640 >= q) {
qq = q;
Set("c" + qq, new cellobject(0, 0));
q++;
}
}
function checkboardforclear() {
z = 1;
while (_root.totalcells >= z) {
if (0 < eval ("c" + z).filled) {
return(0);
}
z++;
}
return(1);
}
function fillcells() {
_root.rowcount = 0;
_root.colcount = 0;
q = 1;
while (_root.totalcells >= q) {
_root.rowcount++;
_root.tempx = _root.rowcount * _root.cellsize;
_root.tempy = _root.colcount * _root.cellsize;
_root.qq = q;
_root.makecolor = random(_root.maxcolors) + 1;
duplicateMovieClip (eval ("_root.hex" + _root.makecolor), qq, qq);
eval ("c" + qq).filled = makecolor;
eval (qq)._x = _root.tempx + _root.offsetx;
if ((qq % 2) == 0) {
_root.minioff = _root.cellsize / 2;
} else {
_root.minioff = 0;
}
eval (qq)._y = (_root.tempy + _root.offsety) + _root.minioff;
eval (qq)._height = _root.cellsize;
eval (qq)._width = _root.ballwidth;
if (_root.rowcount == _root.row) {
_root.colcount++;
_root.rowcount = 0;
}
q++;
}
firstcell = (_root.row * (_root.col - 1)) + 1;
returnxyofcell(firstcell);
_root.showg = 15000;
removeMovieClip(_root.showg);
duplicateMovieClip ("_root.sg", _root.showg, _root.showg);
eval (_root.showg)._x = _root.setx;
eval (_root.showg)._y = _root.sety;
eval (_root.showg)._width = _root.ballwidth;
eval (_root.showg)._height = _root.cellsize;
eval (_root.showg).gotoAndPlay(2);
addtoown(firstcell);
_root.clickstofill = 0;
_root.clicked = eval ("c" + firstcell).filled + 9000;
_root.currentcolor = 0;
}
function startupdate() {
var _local1 = _root;
_local1.templist = new Array(641);
_local1.tl = 0;
cz = 1;
_local1.checklist1 = new Array(641);
_local1.cl1 = 0;
while (_local1.ol >= cz) {
if (0 < _local1.ownlist[cz]) {
updatearound1(_local1.ownlist[cz]);
changecellcolor(_local1.ownlist[cz]);
}
cz++;
}
keepgoing = 1;
while (keepgoing == 1) {
done = 0;
rz = 1;
_local1.checklist2 = new Array(641);
_local1.cl2 = 0;
while (_local1.cl1 >= rz) {
rz++;
done++;
}
_local1.checklist1 = new Array(641);
_local1.cl1 = 0;
tz = 1;
while (_local1.cl2 >= tz) {
updatearound1(_local1.clearlist2[tz]);
tz++;
done++;
}
if (_local1.cl1 == 0) {
keepgoing = 0;
}
}
}
function changecellcolor(zz) {
score++;
tx = eval (zz)._x;
ty = eval (zz)._y;
removeMovieClip(zz);
duplicateMovieClip (eval ("_root.hex" + _root.currentcolor), zz, zz);
eval (zz)._x = tx;
eval (zz)._y = ty;
eval (zz)._width = ballwidth;
eval (zz)._height = ballsize;
}
function topedge(query) {
if (_root.row >= query) {
return(0);
}
return(1);
}
function rightedge(query) {
var _local1 = query;
var _local2 = _root;
while (_local2.row < _local1) {
_local1 = _local1 - _local2.row;
}
if (_local1 == _local2.row) {
return(0);
}
_local2.rightisgood++;
return(1);
}
function bottomedge(query) {
if (query >= (_root.row * (_root.col - 1))) {
return(0);
}
return(1);
}
function leftedge(query) {
var _local1 = query;
var _local2 = _root;
while (_local2.row < _local1) {
_local1 = _local1 - _local2.row;
}
if (_local1 == 1) {
return(0);
}
return(1);
}
function addtoown(query) {
_root.ol++;
_root.ownlist[_root.ol] = query;
eval ("c" + query).owned = 1;
}
function addtotemp(query) {
_root.ol++;
_root.ownlist[_root.ol] = query;
eval ("c" + query).owned = 1;
}
function updatearound2(query) {
if (topedge(query)) {
if ((eval ("c" + (query - _root.row)).filled == _root.currentcolor) && (eval ("c" + (query - _root.row)).owned == 0)) {
_root.cl2++;
_root.checklist2[_root.cl2] = (query = _root.row);
addtotemp(query - _root.row);
}
}
if (rightedge(query) && ((query % 2) == 0)) {
if ((eval ("c" + (query + 1)).filled == _root.currentcolor) && (eval ("c" + (query + 1)).owned == 0)) {
_root.cl2++;
_root.checklist2[_root.cl2] = query + 1;
addtotemp(query + 1);
}
if ((eval ("c" + ((query + 1) + _root.row)).filled == _root.currentcolor) && (eval ("c" + ((query + 1) + _root.row)).owned == 0)) {
_root.cl2++;
_root.checklist2[_root.cl2] = (query + 1) + _root.row;
addtotemp((query + 1) + _root.row);
}
}
if (rightedge(query) && ((query % 2) == 1)) {
if ((eval ("c" + (query + 1)).filled == _root.currentcolor) && (eval ("c" + (query + 1)).owned == 0)) {
_root.cl2++;
_root.checklist2[_root.cl2] = query + 1;
addtotemp(query + 1);
}
if ((eval ("c" + ((query + 1) - _root.row)).filled == _root.currentcolor) && (eval ("c" + ((query + 1) - _root.row)).owned == 0)) {
_root.cl2++;
_root.checklist2[_root.cl2] = (query + 1) - _root.row;
addtotemp((query + 1) - _root.row);
}
}
if (bottomedge(query)) {
if ((eval ("c" + (query + _root.row)).filled == _root.currentcolor) && (eval ("c" + (query + _root.row)).owned == 0)) {
_root.cl2++;
_root.checklist2[_root.cl2] = query + _root.row;
addtotemp(query + _root.row);
}
}
if (leftedge(query) && ((query % 2) == 1)) {
if ((eval ("c" + (query - 1)).filled == _root.currentcolor) && (eval ("c" + (query - 1)).owned == 0)) {
_root.cl2++;
_root.checklist2[_root.cl2] = query - 1;
addtotemp(query - 1);
}
if ((eval ("c" + ((query - 1) - _root.row)).filled == _root.currentcolor) && (eval ("c" + ((query - 1) - _root.row)).owned == 0)) {
_root.cl2++;
_root.checklist2[_root.cl2] = (query - 1) - _root.row;
addtotemp((query - 1) - _root.row);
}
}
if (leftedge(query) && ((query % 2) == 0)) {
if ((eval ("c" + (query - 1)).filled == _root.currentcolor) && (eval ("c" + (query - 1)).owned == 0)) {
_root.cl2++;
_root.checklist2[_root.cl2] = query - 1;
addtotemp(query - 1);
}
if ((eval ("c" + ((query - 1) + _root.row)).filled == _root.currentcolor) && (eval ("c" + ((query - 1) + _root.row)).owned == 0)) {
_root.cl2++;
_root.checklist2[_root.cl2] = (query - 1) + _root.row;
addtotemp((query - 1) + _root.row);
}
}
}
function updatearound1(query) {
if (topedge(query)) {
if ((eval ("c" + (query - _root.row)).filled == _root.currentcolor) && (eval ("c" + (query - _root.row)).owned == 0)) {
flag++;
_root.cl1++;
_root.checklist1[_root.cl1] = query - _root.row;
addtotemp(query - _root.row);
}
}
if (rightedge(query)) {
if ((eval ("c" + (query + 1)).filled == _root.currentcolor) && (eval ("c" + (query + 1)).owned == 0)) {
flag++;
_root.cl1++;
_root.checklist1[_root.cl1] = query + 1;
addtotemp(query + 1);
}
if ((eval ("c" + ((query + 1) + _root.row)).filled == _root.currentcolor) && (eval ("c" + ((query + 1) + _root.row)).owned == 0)) {
flag++;
_root.cl1++;
_root.checklist1[_root.cl1] = (query + 1) + _root.row;
addtotemp((query + 1) + _root.row);
}
}
if (rightedge(query) && ((query % 2) == 1)) {
if ((eval ("c" + (query + 1)).filled == _root.currentcolor) && (eval ("c" + (query + 1)).owned == 0)) {
_root.cl1++;
_root.checklist1[_root.cl1] = query + 1;
addtotemp(query + 1);
}
if ((eval ("c" + ((query + 1) - _root.row)).filled == _root.currentcolor) && (eval ("c" + ((query + 1) - _root.row)).owned == 0)) {
_root.cl1++;
_root.checklist1[_root.cl1] = (query + 1) - _root.row;
addtotemp((query + 1) - _root.row);
}
}
if (bottomedge(query)) {
if ((eval ("c" + (query + _root.row)).filled == _root.currentcolor) && (eval ("c" + (query + _root.row)).owned == 0)) {
flag++;
_root.cl1++;
_root.checklist1[_root.cl1] = query + _root.row;
addtotemp(query + _root.row);
}
}
if (leftedge(query) && ((query % 2) == 1)) {
if ((eval ("c" + (query - 1)).filled == _root.currentcolor) && (eval ("c" + (query - 1)).owned == 0)) {
flag++;
_root.cl1++;
_root.checklist1[_root.cl1] = query - 1;
addtotemp(query - 1);
}
if ((eval ("c" + ((query - 1) - _root.row)).filled == _root.currentcolor) && (eval ("c" + ((query - 1) - _root.row)).owned == 0)) {
flag++;
_root.cl1++;
_root.checklist1[_root.cl1] = (query - 1) - _root.row;
addtotemp((query - 1) - _root.row);
}
}
if (leftedge(query) && ((query % 2) == 0)) {
if ((eval ("c" + (query - 1)).filled == _root.currentcolor) && (eval ("c" + (query - 1)).owned == 0)) {
flag++;
_root.cl1++;
_root.checklist1[_root.cl1] = query - 1;
addtotemp(query - 1);
}
if ((eval ("c" + ((query - 1) + _root.row)).filled == _root.currentcolor) && (eval ("c" + ((query - 1) + _root.row)).owned == 0)) {
flag++;
_root.cl1++;
_root.checklist1[_root.cl1] = (query - 1) + _root.row;
addtotemp((query - 1) + _root.row);
}
}
}
function returnxyofcell(query) {
var _local1 = _root;
var _local2 = query;
_local1.county = 0;
while (_local1.row < _local2) {
_local2 = _local2 - _local1.row;
_local1.county++;
}
_local2 - 1;
_local1.setx = (_local2 * _local1.cellsize) + _local1.offsetx;
if ((_local2 % 2) == 0) {
_local1.minioff = 7;
} else {
_local1.minioff = 0;
}
_local1.sety = ((_local1.county * _local1.cellsize) + _local1.offsety) + _local1.minioff;
}
function setxyofcell(query) {
returnxyofcell(query);
eval (query)._x = _root.setx;
eval (query)._y = _root.sety;
eval (query)._height = _root.ballsize;
eval (query)._width = _root.ballsize;
eval (query).gotoAndStop(5);
}
_root.maxcolors = 7;
_root.maxplayers = 1;
_root.lowesta = 35;
_root.computerworking = 0;
_root.currentplayer = 1;
_root.score = 0;
_root.needtobeat = 35;
_root.soundon = 1;
_root.delay = 0;
_root.delay2 = 0;
_root.control = 1;
duplicateMovieClip ("_root.nextlevel", 9110, 9110);
_root.nextlevel._visible = 0;
duplicateMovieClip ("_root.gameoverg", 9111, 9111);
_root.row = 20;
_root.col = 16;
_root.bigger = 1.2;
_root.setlevel = 2;
setup();
Frame 45
_root.showscore = "Score: " + _root.score;
_root.showntb = "Max Attempts: " + _root.needtobeat;
_root.showattempts = "Attempts: " + _root.clickstofill;
if ((((0 < _root.clicked) && (_root.currentcolor == 0)) && (_root.control == 1)) && (_root.currentplayer == 1)) {
_root.clicked = int(_root.clicked);
_root.currentcolor = _root.clicked - 9000;
if ((_root.maxcolors >= _root.currentcolor) && (_root.currentcolor != _root.lastcolor)) {
if (_root.soundon) {
_root.clicksound.gotoAndPlay(2);
}
_root.lastcolor = _root.currentcolor;
setupcolorbuttons();
startupdate();
_root.clicked = 0;
_root.currentcolor = 0;
_root.clickstofill++;
}
if ((_root.clickstofill == _root.needtobeat) && (_root.ol < _root.totalcells)) {
_root.control = 0;
_root.gameover = 1;
}
_root.clicked = 0;
_root.currentcolor = 0;
}
if ((1 < _root.currentplayer) && (computerworking == 0)) {
_root.computerworking = 1;
_root.lastcolor = computerpick();
_root.currentcolor = cp;
setupcolorbuttons();
runcomputer();
}
if ((_root.ol == _root.totalcells) && (delay == 0)) {
_root.ol = 0;
_root.control = 0;
_root.score = _root.score + (100 + ((_root.needtobeat - _root.clickstofill) * 10));
if (soundon) {
completesound.gotoAndPlay(2);
}
_root.delay = 70;
eval (9110)._visible = 1;
if (_root.clickstofill < _root.lowesta) {
_root.lowesta = _root.clickstofill;
}
}
if (0 < _root.delay) {
_root.delay--;
}
if (_root.delay == 1) {
_root.needtobeat--;
setup();
_root.delay = 0;
}
if ((_root.gameover == 1) && (delay2 == 0)) {
_root.gameover = 0;
if (soundon) {
virusfailsound.gotoAndPlay(2);
}
eval (9111).gotoAndPlay(2);
eval (9111).fscore = "Final Score: " + score;
eval (9111).fround = "Fastest Growth: " + lowesta;
}
if (0 < _root.delay2) {
_root.delay2--;
}
if (_root.delay2 == 1) {
_root.delay2 = 0;
_root.gameover = 0;
setup();
}
Frame 46
prevFrame();
play();
Symbol 16 MovieClip Frame 1
if (this.sessionstarted != 1) {
this.arcade = new LoadVars();
this.sessionvars = new LoadVars();
this.arcade.gamename = "virus2";
this.arcade.sessdo = "sessionstart";
this.arcade.sendAndLoad("arcade.php", sessionvars, "POST");
this.sessionstarted = 1;
}
if (_root.endgame == 1) {
if ((this.askpermission != 1) && (this.sessionvars.connStatus == 1)) {
this.prequestvars = new LoadVars();
this.pranswer = new LoadVars();
this.prequestvars.gametime = this.sessionvars.gametime;
this.prequestvars.fakekey = this.sessionvars.initbar;
if (_root.score == 0) {
this.prequestvars.score = -1;
} else {
this.prequestvars.score = _root.score;
}
this.prequestvars.id = this.sessionvars.lastid;
this.prequestvars.sessdo = "permrequest";
this.prequestvars.note = (this.prequestvars.id * this.prequestvars.score) * this.prequestvars.fakekey;
this.prequestvars.sendAndLoad("./arcade.php", this.pranswer, "POST");
this.askpermission = 1;
}
if ((this.pranswer.validate == 1) && (this.finalsent != 1)) {
this.burnscore = new LoadVars();
this.burnscore.microone = this.pranswer.microone;
this.burnscore.gametime = this.prequestvars.gametime;
this.burnscore.id = this.prequestvars.id;
if (_root.score == 0) {
this.burnscore.noscore = 1;
}
this.burnscore.sessdo = "burn";
this.burnscore.send("./arcade.php", "_self", "POST");
this.finalsent = 1;
}
}
Symbol 38 Button
on (release) {
gotoAndPlay (44);
}
Symbol 44 Button
on (release) {
_root.clicked = _name;
}
Symbol 50 MovieClip Frame 1
stop();
Symbol 52 MovieClip Frame 48
stop();
Symbol 65 MovieClip Frame 1
stop();
Symbol 67 MovieClip Frame 1
stop();
Symbol 70 Button
on (release) {
_root.clicked = _name;
}
Symbol 78 Button
on (rollOver) {
gotoAndStop (1);
}
Symbol 80 Button
on (release) {
gotoAndStop (1);
}
Symbol 81 Button
on (release) {
_root.menurestart();
gotoAndStop (1);
}
Symbol 75 MovieClip Frame 1
stop();
Symbol 75 MovieClip Frame 10
stop();
Symbol 114 Button
on (release) {
gotoAndStop (10);
}
Symbol 117 Button
on (rollOver) {
gotoAndStop (1);
}
Symbol 118 Button
on (release) {
gotoAndStop (1);
}
Symbol 119 Button
on (release) {
if (_root.soundon == 1) {
_root.soundon = 0;
} else {
_root.soundon = 1;
}
gotoAndStop (1);
}
Symbol 113 MovieClip Frame 1
stop();
Symbol 113 MovieClip Frame 10
stop();
Symbol 147 Button
on (release) {
gotoAndStop (10);
}
Symbol 150 Button
on (rollOver) {
gotoAndStop (1);
}
Symbol 151 Button
on (release) {
gotoAndStop (1);
}
Symbol 146 MovieClip Frame 1
stop();
Symbol 146 MovieClip Frame 10
stop();
Symbol 192 MovieClip Frame 1
stop();
Symbol 192 MovieClip Frame 5
stop();
_root.endgame = 1;
Symbol 192 MovieClip Frame 10
stop();