Frame 1
stop();
Instance of Symbol 76 MovieClip in Frame 1
onClipEvent (load) {
illegal_page_url = "http://www.mindchamber.com/legal.html";
your_website_url = "http://www.mindchamber.com";
enable_protection = 1;
acceptable_domain = new Array();
acceptable_domain.push({url:"www.mindchamber.com", icon:"mindchamber"});
acceptable_domain.push({url:"mindchamber.com", icon:"mindchamber"});
acceptable_domain.push({url:"www.psychogoldfish.com", icon:"psychogoldfish"});
acceptable_domain.push({url:"media1.psychogoldfish.com", icon:"psychogoldfish"});
acceptable_domain.push({url:"testing.psychogoldfish.com", icon:"psychogoldfish"});
acceptable_domain.push({url:"uploads.ungrounded.net", icon:"newgrounds"});
acceptable_domain.push({url:"newgrounds.com", icon:"newgrounds"});
acceptable_domain.push({url:"www.newgrounds.com", icon:"newgrounds"});
acceptable_domain.push({url:"2darcade.com", icon:"sess"});
acceptable_domain.push({url:"www.2darcade.com", icon:"sess"});
acceptable_domain.push({url:"www.sess.net", icon:"sess"});
acceptable_domain.push({url:"sess.net", icon:"sess"});
acceptable_domain.push({url:"www.txmafia.com", icon:"txmafia"});
acceptable_domain.push({url:"txmafia.com", icon:"txmafia"});
domain = _root._url.split("/");
domain = domain[2];
_root.gooddomain = 0;
i = 0;
while (i < acceptable_domain.length) {
domain2 = acceptable_domain[i].url;
if (domain == domain2) {
_root.gooddomain = 1;
_root.sicon = acceptable_domain[i].icon;
}
i++;
}
}
onClipEvent (enterFrame) {
PercentLoaded = int((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
gotoAndStop(int(PercentLoaded));
if (_root.gooddomain == 1) {
_root.icon.gotoAndStop(_root.sicon);
lag = ("This version of 'ChromaBlast' is licensed to '" + _root.sicon) + "'. This Legal copy has full functionality, and is being hosted with permission from the game's creator, Josh Tuttle.";
} else {
_root.icon.gotoAndStop("blank");
lag = "This version of 'ChromaBlast' is not licensed to the site hosting it. This game is operating in shareware mode and will not have full functionality.";
}
}
Frame 2
_root.players = 1;
gotoAndStop ("single");
Frame 3
function killuser() {
_root.gotoAndStop(55);
}
score = 0;
Frame 4
function newStart() {
var _local1 = _root;
if (_local1.connected != 1) {
_local1.connected = 1;
_local1.play();
}
}
function newXML(gameStream) {
var _local1 = _root;
if (_local1.ingame == 1) {
_local1.window2.readXML(gameStream);
} else {
_local1.lobby.readXML(gameStream);
}
}
_root.ingame = 0;
XML.prototype.ignoreWhite = true;
_root.hotSocket = new XMLSocket();
_root.hotSocket.connect("testing.psychogoldfish.com", 6744);
_root.hotSocket.onConnect = newStart;
_root.hotSocket.onXML = newXML;
stop();
Frame 5
if (ulevel < 1) {
ulevel = 1;
}
names = "";
wins = 3;
_root.userid = 0;
score = 0;
round = 0;
_root.hotSocket.send(("<command><name>register</name><nick>" + nick) + "</nick></command>");
stop();
Frame 6
play();
Frame 7
textout = "Level " + ulevel;
stopAllSounds();
Frame 37
stop();
Instance of Symbol 367 MovieClip "msg" in Frame 37
onClipEvent (enterFrame) {
if (_name != "msg") {
_y = (_y - 10);
y++;
if (y > 20) {
this.removeMovieClip();
} else if (y > 15) {
_alpha = (_alpha + 20);
}
} else {
msg = "";
}
}
Frame 38
if (_root.players > 1) {
if (_root.won >= _root.wins) {
gotoAndStop ("win");
} else if (_root.lost >= _root.wins) {
gotoAndStop ("lose");
} else {
gotoAndPlay ("newlevel");
}
} else if (ulevel > 30) {
gotoAndStop (45);
} else {
gotoAndPlay ("newlevel");
}
Frame 45
score2 = score;
stopAllSounds();
Frame 50
stopAllSounds();
Frame 55
getURL ("http://www.psychogoldfish.com", "_blank");
stopAllSounds();
Symbol 40 MovieClip [balls] Frame 1
mod = 1;
stop();
Symbol 40 MovieClip [balls] Frame 5
stop();
Symbol 40 MovieClip [balls] Frame 9
stop();
Symbol 40 MovieClip [balls] Frame 13
stop();
Symbol 75 Button
on (release) {
_root.play();
}
Symbol 76 MovieClip Frame 1
stop();
Symbol 79 MovieClip Frame 1
stop();
Symbol 83 Button
on (release) {
_root.players = 1;
gotoAndStop ("single");
}
Symbol 84 Button
on (release) {
_root.players = 2;
wins = 3;
ulevel = 1;
gotoAndStop ("multi");
}
Symbol 88 Button
on (release) {
players = 1;
lives = 3;
gotoAndPlay ("newlevel");
}
Symbol 92 Button
on (release) {
if (_root.gooddomain != 1) {
_root.share.play();
} else {
ulevel++;
if (ulevel > 30) {
ulevel = 1;
}
}
}
Symbol 93 Button
on (release) {
if (_root.gooddomain != 1) {
_root.share.play();
} else {
ulevel--;
if (ulevel < 1) {
ulevel = 30;
}
}
}
Symbol 100 Button
on (release) {
userid = 1;
players = 2;
_root.hotSocket.send(((("<command><name>setup</name><userid>1</userid><level>" + ulevel) + "</level><wins>") + wins) + "</wins><start>1</start></command>");
nextFrame();
}
Symbol 103 Button
on (release) {
ulevel++;
if (ulevel > 30) {
ulevel = 1;
}
_root.hotSocket.send(((("<command><name>setup</name><userid>3</userid><level>" + ulevel) + "</level><wins>") + wins) + "</wins></command>");
}
Symbol 104 Button
on (release) {
ulevel--;
if (ulevel < 1) {
ulevel = 30;
}
_root.hotSocket.send(((("<command><name>setup</name><userid>3</userid><level>" + ulevel) + "</level><wins>") + wins) + "</wins></command>");
}
Symbol 107 Button
on (release) {
wins = int(wins);
wins = wins + 2;
if (wins > 7) {
wins = 1;
}
_root.hotSocket.send(((("<command><name>setup</name><userid>3</userid><level>" + ulevel) + "</level><wins>") + wins) + "</wins></command>");
}
Symbol 108 Button
on (release) {
wins = int(wins);
wins = wins - 2;
if (wins < 1) {
wins = 5;
}
_root.hotSocket.send(((("<command><name>setup</name><userid>3</userid><level>" + ulevel) + "</level><wins>") + wins) + "</wins></command>");
}
Symbol 109 Button
on (release, keyPress "<Enter>") {
if (msg.length > 0) {
_root.hotSocket.send(((("<command><name>chat</name><nick>" + _root.nick) + "</nick><text>") + msg) + "</text></command>");
msg = "";
}
}
Symbol 113 MovieClip Frame 1
function readXML(gameStream) {
names = names + "recieved from lobby module\r";
_root.ingame = 1;
}
Symbol 155 MovieClip Frame 69
if (random(10) < 7) {
gotoAndPlay (1);
}
Symbol 192 MovieClip Frame 1
Symbol 192 MovieClip Frame 13
ufo.ufo.stop();
Symbol 192 MovieClip Frame 14
_parent.boss.gotoAndStop(2);
Symbol 201 MovieClip Frame 1
stop();
Symbol 202 MovieClip Frame 1
stop();
Symbol 205 MovieClip Frame 1
stop();
Symbol 205 MovieClip Frame 4
gotoAndPlay (3);
Symbol 205 MovieClip Frame 5
gotoAndStop (1);
Symbol 249 MovieClip Frame 1
_parent.v--;
Symbol 249 MovieClip Frame 2
if (_parent.v > 0) {
gotoAndPlay (1);
}
Symbol 249 MovieClip Frame 21
gotoAndPlay (3);
Symbol 250 MovieClip Frame 1
value = 100;
ecolor = "r";
Symbol 250 MovieClip Frame 2
ecolor = "g";
Symbol 250 MovieClip Frame 3
ecolor = "b";
Symbol 250 MovieClip Frame 4
ecolor = "y";
Symbol 250 MovieClip Frame 5
ecolor = "p";
Symbol 250 MovieClip Frame 7
ecolor = "";
value = 0;
Symbol 250 MovieClip Frame 10
v = random(30);
Symbol 255 MovieClip Frame 1
value = 25;
Symbol 255 MovieClip Frame 7
stop();
Symbol 260 MovieClip Frame 5
_parent.gotoAndPlay(8);
Symbol 265 MovieClip Frame 5
_parent.gotoAndPlay(8);
Symbol 270 MovieClip Frame 5
_parent.gotoAndPlay(8);
Symbol 275 MovieClip Frame 5
_parent.gotoAndPlay(8);
Symbol 280 MovieClip Frame 5
_parent.gotoAndPlay(8);
Symbol 285 MovieClip Frame 5
_parent.gotoAndPlay(8);
Symbol 286 MovieClip Frame 7
stop();
Symbol 286 MovieClip Frame 8
Set((("_parent.tank.x" + x) + "y") + y, 0);
mccolor = eval (((("_parent.tank.x" + x) + "y") + y) + "_color");
color_id = 9;
mi = 0;
while ((color_id == 9) and (mi < 10)) {
if (_parent.tank.colors[mi] == mccolor) {
color_id = mi;
trace("killed " + color_id);
_parent.tank.colors_basenum = _parent.tank.colors_basenum - 15;
}
mi++;
}
if (eval (((("_parent.tank.x" + x) + "y") + y) + "_enemy") > 0) {
_parent.tank.enemies--;
}
Set(((("_parent.tank.x" + x) + "y") + y) + "_enemy", 0);
Set(((("_parent.tank.x" + x) + "y") + y) + "_color", 0);
Set(((("_parent.tank.x" + x) + "y") + y) + "_name", null);
Set(((("_parent.tank.x" + x) + "y") + y) + "_long", null);
y++;
while ((eval ((("_parent.tank.x" + x) + "y") + y) == 1) and (eval (((("_parent.tank.x" + x) + "y") + y) + "_enemy") != 1)) {
mcname = eval (((("_parent.tank.x" + x) + "y") + y) + "_name");
_parent[mcname].comboc = combo;
_parent[mcname].combor = combo;
Set(((("_parent.tank.x" + x) + "y") + y) + "_float", 1);
Set(((("_parent.tank.x" + x) + "y") + y) + "_newfloat", 1);
y++;
}
this.removeMovieClip();
stop();
Symbol 322 MovieClip Frame 1
value = 300;
Symbol 322 MovieClip Frame 7
stop();
Symbol 335 MovieClip Frame 1
value = 300;
Symbol 335 MovieClip Frame 7
stop();
Instance of Symbol 208 MovieClip "tank" in Symbol 341 MovieClip Frame 1
onClipEvent (load) {
comboz = new Array();
formation = 0;
if (_root.ulevel == 1) {
colors = new Array();
colors[0] = 4;
colors[1] = 1;
colors[2] = 2;
colors[3] = 3;
colors[4] = 5;
droptimer = 900;
elevator = "off";
ceiling = 0;
bg_image = 1;
floor = 2;
etypes = 3;
tenemies = 6;
superodds = 0;
laser_timer = 5;
trows = 6;
indent = 0;
color_pad = 10;
red = 100;
green = 100;
blue = 100;
red2 = 100;
green2 = 100;
blue2 = 100;
} else if (_root.ulevel == 2) {
colors = new Array();
colors[0] = 1;
colors[1] = 5;
colors[2] = 4;
colors[3] = 3;
colors[4] = 3;
droptimer = 900;
elevator = "off";
ceiling = 0;
bg_image = 1;
floor = 2;
etypes = 3;
tenemies = 10;
superodds = 0;
laser_timer = 5;
trows = 8;
indent = 0;
color_pad = 10;
red = 100;
green = 100;
blue = 100;
red2 = 100;
green2 = 100;
blue2 = 100;
} else if (_root.ulevel == 3) {
colors = new Array();
colors[0] = 5;
colors[1] = 2;
colors[2] = 3;
colors[3] = 1;
colors[4] = 4;
droptimer = 120;
elevator = "off";
ceiling = 0;
bg_image = 1;
floor = 2;
etypes = 2;
tenemies = 8;
superodds = 0;
laser_timer = 5;
trows = 3;
indent = 0;
color_pad = 0;
red = 100;
green = 100;
blue = 100;
red2 = 100;
green2 = 100;
blue2 = 100;
} else if (_root.ulevel == 4) {
colors = new Array();
colors[0] = 2;
colors[1] = 5;
colors[2] = 3;
colors[3] = 1;
colors[4] = 4;
droptimer = 90;
elevator = "off";
ceiling = 0;
bg_image = 1;
floor = 2;
etypes = 1;
tenemies = 40;
superodds = 0;
laser_timer = 5;
trows = 6;
indent = 0;
color_pad = 0;
red = 100;
green = 100;
blue = 100;
red2 = 100;
green2 = 100;
blue2 = 100;
} else if (_root.ulevel == 5) {
colors = new Array();
colors[0] = 1;
colors[1] = 2;
colors[2] = 3;
colors[3] = 4;
colors[4] = 5;
droptimer = 300;
elevator = "on";
ceiling = 0;
bg_image = 1;
floor = 2;
etypes = 3;
tenemies = 16;
superodds = 0;
laser_timer = 5;
trows = 6;
indent = 0;
color_pad = 0;
red = 100;
green = 100;
blue = 100;
red2 = 100;
green2 = 100;
blue2 = 100;
} else if (_root.ulevel == 6) {
colors = new Array();
colors[0] = 1;
colors[1] = 5;
colors[2] = 3;
colors[3] = 4;
colors[4] = 2;
droptimer = 600;
elevator = "on";
ceiling = 1;
bg_image = 2;
floor = 2;
etypes = 3;
tenemies = 16;
superodds = 0;
laser_timer = 10;
trows = 10;
indent = 0;
color_pad = 5;
red = 20;
green = 20;
blue = 100;
red2 = 100;
green2 = 100;
blue2 = 0;
} else if (_root.ulevel == 7) {
colors = new Array();
colors[0] = 4;
colors[1] = 5;
colors[2] = 3;
colors[3] = 1;
colors[4] = 2;
droptimer = 700;
elevator = "off";
ceiling = 0;
bg_image = 4;
floor = 1;
etypes = 4;
tenemies = 20;
superodds = 0;
laser_timer = 10;
trows = 16;
indent = 0;
color_pad = 10;
red = 20;
green = 20;
blue = 100;
red2 = 100;
green2 = 100;
blue2 = 0;
} else if (_root.ulevel == 8) {
colors = new Array();
colors[0] = 5;
colors[1] = 4;
colors[2] = 2;
colors[3] = 1;
colors[4] = 3;
droptimer = 700;
elevator = "off";
ceiling = 0;
bg_image = 4;
floor = 1;
etypes = 3;
tenemies = 24;
superodds = 0;
laser_timer = 10;
trows = 3;
indent = 0;
color_pad = 10;
red = 20;
green = 20;
blue = 100;
red2 = 100;
green2 = 100;
blue2 = 0;
} else if (_root.ulevel == 9) {
colors = new Array();
colors[0] = 1;
colors[1] = 2;
colors[2] = 4;
colors[3] = 5;
colors[4] = 3;
droptimer = 200;
elevator = "off";
ceiling = 0;
bg_image = 4;
floor = 1;
etypes = 2;
tenemies = 18;
superodds = 30;
laser_timer = 10;
trows = 3;
indent = 0;
color_pad = 10;
red = 20;
green = 20;
blue = 100;
red2 = 100;
green2 = 100;
blue2 = 0;
} else if (_root.ulevel == 10) {
colors = new Array();
colors[0] = 3;
colors[1] = 2;
colors[2] = 5;
colors[3] = 4;
colors[4] = 1;
droptimer = 400;
elevator = "off";
ceiling = 0;
bg_image = 5;
floor = 1;
etypes = 3;
tenemies = 10;
superodds = 0;
laser_timer = 10;
trows = 8;
indent = 3;
tspace = 0;
color_pad = 0;
red = 100;
green = 30;
blue = 30;
red2 = 0;
green2 = 100;
blue2 = 40;
} else if (_root.ulevel == 11) {
colors = new Array();
colors[0] = 1;
colors[1] = 2;
colors[2] = 3;
colors[3] = 4;
colors[4] = 5;
droptimer = 300;
elevator = "off";
ceiling = 0;
bg_image = 5;
floor = 1;
etypes = 4;
tenemies = 16;
superodds = 0;
laser_timer = 10;
trows = 6;
indent = 3;
tspace = 0;
color_pad = 0;
red = 100;
green = 30;
blue = 30;
red2 = 0;
green2 = 100;
blue2 = 40;
} else if (_root.ulevel == 12) {
colors = new Array();
colors[0] = 3;
colors[1] = 2;
colors[2] = 5;
colors[3] = 4;
colors[4] = 1;
droptimer = 90;
elevator = "off";
ceiling = 0;
bg_image = 5;
floor = 1;
etypes = 2;
tenemies = 20;
superodds = 0;
laser_timer = 10;
trows = 3;
indent = 3;
tspace = 0;
color_pad = 0;
red = 100;
green = 30;
blue = 30;
red2 = 0;
green2 = 100;
blue2 = 40;
} else if (_root.ulevel == 13) {
colors = new Array();
colors[0] = 3;
colors[1] = 2;
colors[2] = 5;
colors[3] = 4;
colors[4] = 1;
droptimer = 90000000 /* 0x55D4A80 */;
elevator = "off";
ceiling = 1;
bg_image = 6;
floor = 1;
etypes = 4;
tenemies = 36;
superodds = 0;
laser_timer = 10;
trows = 8;
indent = 3;
tspace = 2;
color_pad = 0;
red = 100;
green = 30;
blue = 30;
red2 = 0;
green2 = 100;
blue2 = 40;
} else if (_root.ulevel == 14) {
colors = new Array();
colors[0] = 3;
colors[1] = 2;
colors[2] = 5;
colors[3] = 4;
colors[4] = 1;
droptimer = 90000000 /* 0x55D4A80 */;
elevator = "off";
ceiling = 1;
bg_image = 6;
floor = 1;
etypes = 4;
tenemies = 52;
superodds = 0;
laser_timer = 10;
trows = 12;
indent = 3;
tspace = 2;
color_pad = 0;
red = 100;
green = 30;
blue = 30;
red2 = 0;
green2 = 100;
blue2 = 40;
} else if (_root.ulevel == 15) {
colors = new Array();
colors[0] = 1;
colors[1] = 4;
colors[2] = 2;
colors[3] = 5;
colors[4] = 3;
droptimer = 300;
elevator = "on";
ceiling = 1;
bg_image = 7;
floor = 1;
etypes = 3;
tenemies = 26;
superodds = 10;
laser_timer = 10;
trows = 12;
indent = 3;
tspace = 2;
color_pad = 0;
red = 100;
green = 30;
blue = 30;
red2 = 0;
green2 = 100;
blue2 = 40;
} else if (_root.ulevel == 16) {
colors = new Array();
colors[0] = 6;
colors[1] = 9;
colors[2] = 8;
colors[3] = 7;
colors[4] = 10;
droptimer = 100;
elevator = "off";
ceiling = 0;
bg_image = 3;
floor = 1;
etypes = 2;
tenemies = 16;
superodds = 10;
laser_timer = 10;
trows = 8;
indent = 0;
tspace = 8;
color_pad = 0;
red = 50;
green = 50;
blue = 10;
red2 = 90;
green2 = 90;
blue2 = 40;
} else if (_root.ulevel == 17) {
colors = new Array();
colors[0] = 8;
colors[1] = 7;
colors[2] = 10;
colors[3] = 6;
colors[4] = 9;
droptimer = 100;
elevator = "off";
ceiling = 0;
bg_image = 3;
floor = 1;
etypes = 3;
tenemies = 20;
superodds = 10;
laser_timer = 10;
trows = 10;
indent = 0;
tspace = 3;
color_pad = 0;
red = 50;
green = 50;
blue = 10;
red2 = 90;
green2 = 90;
blue2 = 40;
} else if (_root.ulevel == 18) {
colors = new Array();
colors[0] = 4;
colors[1] = 3;
colors[2] = 1;
colors[3] = 5;
colors[4] = 2;
droptimer = 200;
elevator = "off";
ceiling = 0;
bg_image = 3;
floor = 1;
etypes = 3;
tenemies = 20;
superodds = 10;
laser_timer = 10;
trows = 10;
indent = 0;
tspace = 3;
color_pad = 0;
red = 50;
green = 50;
blue = 10;
red2 = 90;
green2 = 90;
blue2 = 40;
} else if (_root.ulevel == 19) {
colors = new Array();
colors[0] = 2;
colors[1] = 3;
colors[2] = 5;
colors[3] = 1;
colors[4] = 4;
droptimer = 200;
elevator = "off";
ceiling = 1;
bg_image = 8;
floor = 1;
etypes = 3;
tenemies = 20;
superodds = 20;
laser_timer = 10;
trows = 10;
indent = 0;
tspace = 3;
color_pad = 0;
red = 50;
green = 50;
blue = 10;
red2 = 90;
green2 = 90;
blue2 = 40;
} else if (_root.ulevel == 20) {
colors = new Array();
colors[0] = 6;
colors[1] = 7;
colors[2] = 8;
colors[3] = 9;
colors[4] = 10;
droptimer = 200;
elevator = "off";
ceiling = 1;
bg_image = 8;
floor = 1;
etypes = 5;
tenemies = 20;
superodds = 20;
laser_timer = 10;
trows = 16;
indent = 0;
tspace = 2;
color_pad = 0;
red = 50;
green = 50;
blue = 10;
red2 = 90;
green2 = 90;
blue2 = 40;
} else if (_root.ulevel == 21) {
colors = new Array();
colors[0] = 4;
colors[1] = 5;
colors[2] = 1;
colors[3] = 2;
colors[4] = 3;
droptimer = 200;
elevator = "off";
ceiling = 1;
bg_image = 8;
floor = 1;
etypes = 2;
tenemies = 30;
superodds = 20;
laser_timer = 10;
trows = 8;
indent = 0;
tspace = 3;
color_pad = 0;
red = 0;
green = 50;
blue = 30;
red2 = 100;
green2 = 100;
blue2 = 100;
} else if (_root.ulevel == 22) {
colors = new Array();
colors[0] = 6;
colors[1] = 7;
colors[2] = 8;
colors[3] = 1;
colors[4] = 2;
colors[5] = 3;
droptimer = 200;
elevator = "off";
ceiling = 2;
bg_image = 9;
floor = 1;
etypes = 6;
tenemies = 24;
superodds = 20;
laser_timer = 10;
trows = 8;
indent = 0;
tspace = 0;
color_pad = 0;
red = 0;
green = 50;
blue = 30;
red2 = 100;
green2 = 100;
blue2 = 100;
} else if (_root.ulevel == 23) {
colors = new Array();
colors[0] = 1;
colors[1] = 2;
colors[2] = 3;
colors[3] = 1;
colors[4] = 2;
colors[5] = 3;
droptimer = 300;
elevator = "off";
ceiling = 2;
bg_image = 9;
floor = 1;
etypes = 3;
tenemies = 30;
superodds = 20;
laser_timer = 10;
trows = 8;
indent = 0;
tspace = 0;
color_pad = 0;
red = 0;
green = 50;
blue = 30;
red2 = 100;
green2 = 100;
blue2 = 100;
} else if (_root.ulevel == 24) {
colors = new Array();
colors[0] = 5;
colors[1] = 4;
colors[2] = 3;
colors[3] = 10;
colors[4] = 9;
colors[5] = 8;
droptimer = 300;
elevator = "off";
ceiling = 2;
bg_image = 9;
floor = 1;
etypes = 6;
tenemies = 50;
superodds = 15;
laser_timer = 10;
trows = 12;
indent = 0;
tspace = 0;
color_pad = 0;
red = 0;
green = 50;
blue = 30;
red2 = 100;
green2 = 100;
blue2 = 100;
} else if (_root.ulevel == 25) {
formation = 1;
colors = new Array();
colors[0] = 9;
colors[1] = 2;
colors[2] = 3;
colors[3] = 4;
colors[4] = 5;
colors[5] = 8;
droptimer = 300;
elevator = "on";
ceiling = 0;
bg_image = 10;
floor = 3;
etypes = 5;
tenemies = 45;
superodds = 15;
laser_timer = 10;
trows = 12;
indent = 3;
tspace = 0;
color_pad = 0;
red = 0;
green = 50;
blue = 30;
red2 = 100;
green2 = 100;
blue2 = 100;
} else if (_root.ulevel == 26) {
formation = 1;
colors = new Array();
colors[0] = 6;
colors[1] = 2;
colors[2] = 8;
colors[3] = 1;
colors[4] = 9;
colors[5] = 8;
droptimer = 150;
elevator = "on";
ceiling = 0;
bg_image = 10;
floor = 3;
etypes = 3;
tenemies = 44;
superodds = 0;
laser_timer = 10;
trows = 12;
indent = 2;
tspace = 0;
color_pad = 0;
red = 0;
green = 50;
blue = 30;
red2 = 100;
green2 = 100;
blue2 = 100;
} else if (_root.ulevel == 27) {
colors = new Array();
colors[0] = 9;
colors[1] = 2;
colors[2] = 10;
colors[3] = 3;
colors[4] = 6;
colors[5] = 8;
droptimer = 150;
elevator = "on";
ceiling = 0;
bg_image = 10;
floor = 3;
etypes = 4;
tenemies = 34;
superodds = 0;
laser_timer = 10;
trows = 12;
indent = 2;
tspace = 0;
color_pad = 0;
red = 0;
green = 50;
blue = 30;
red2 = 100;
green2 = 100;
blue2 = 100;
} else if (_root.ulevel == 28) {
colors = new Array();
colors[0] = 1;
colors[1] = 4;
colors[2] = 3;
colors[3] = 5;
colors[4] = 9;
colors[5] = 8;
droptimer = 680;
elevator = "on";
ceiling = 1;
bg_image = 13;
floor = 3;
etypes = 4;
tenemies = 44;
superodds = 20;
laser_timer = 10;
trows = 6;
indent = 3;
tspace = 2;
color_pad = 0;
red = 0;
green = 50;
blue = 30;
red2 = 100;
green2 = 100;
blue2 = 100;
} else if (_root.ulevel == 29) {
colors = new Array();
colors[0] = 2;
colors[1] = 1;
colors[2] = 3;
colors[3] = 4;
colors[4] = 9;
colors[5] = 8;
droptimer = 800;
elevator = "on";
ceiling = 0;
bg_image = 13;
floor = 3;
etypes = 4;
tenemies = 60;
superodds = 20;
laser_timer = 10;
trows = 8;
indent = 3;
tspace = 3;
color_pad = 0;
red = 0;
green = 50;
blue = 30;
red2 = 100;
green2 = 100;
blue2 = 100;
} else if (_root.ulevel == 30) {
formation = 2;
colors = new Array();
colors[0] = 1;
colors[1] = 2;
colors[2] = 3;
colors[3] = 4;
colors[4] = 5;
droptimer = 800;
elevator = "on";
ceiling = 1;
bg_image = 14;
floor = 3;
etypes = 5;
superodds = 16;
laser_timer = 10;
trows = 9;
indent = 3;
tspace = 2;
color_pad = 0;
red = 0;
green = 50;
blue = 30;
red2 = 100;
green2 = 100;
blue2 = 100;
xsp = new Array();
ysp = new Array();
csp = new Array();
xsp.push(0);
ysp.push(1);
csp.push("no");
xsp.push(1);
ysp.push(1);
csp.push("no");
xsp.push(2);
ysp.push(1);
csp.push("no");
xsp.push(3);
ysp.push(1);
csp.push("no");
xsp.push(4);
ysp.push(1);
csp.push("no");
xsp.push(5);
ysp.push(1);
csp.push("no");
xsp.push(6);
ysp.push(1);
csp.push("no");
xsp.push(7);
ysp.push(1);
csp.push("no");
xsp.push(8);
ysp.push(1);
csp.push("no");
xsp.push(9);
ysp.push(1);
csp.push("no");
xsp.push(0);
ysp.push(2);
csp.push("no");
xsp.push(1);
ysp.push(2);
csp.push("no");
xsp.push(2);
ysp.push(2);
csp.push("b1");
xsp.push(3);
ysp.push(2);
csp.push("b2");
xsp.push(4);
ysp.push(2);
csp.push("no");
xsp.push(5);
ysp.push(2);
csp.push("no");
xsp.push(6);
ysp.push(2);
csp.push("b1");
xsp.push(7);
ysp.push(2);
csp.push("b2");
xsp.push(8);
ysp.push(2);
csp.push("no");
xsp.push(9);
ysp.push(2);
csp.push("no");
xsp.push(0);
ysp.push(3);
csp.push("no");
xsp.push(1);
ysp.push(3);
csp.push("b1");
xsp.push(2);
ysp.push(3);
csp.push("b2");
xsp.push(3);
ysp.push(3);
csp.push("b1");
xsp.push(4);
ysp.push(3);
csp.push("b2");
xsp.push(5);
ysp.push(3);
csp.push("b1");
xsp.push(6);
ysp.push(3);
csp.push("b2");
xsp.push(7);
ysp.push(3);
csp.push("b1");
xsp.push(8);
ysp.push(3);
csp.push("b2");
xsp.push(9);
ysp.push(3);
csp.push("no");
xsp.push(0);
ysp.push(4);
csp.push("no");
xsp.push(1);
ysp.push(4);
csp.push("b1");
xsp.push(2);
ysp.push(4);
csp.push("b2");
xsp.push(3);
ysp.push(4);
csp.push("b1");
xsp.push(4);
ysp.push(4);
csp.push("b2");
xsp.push(5);
ysp.push(4);
csp.push("b1");
xsp.push(6);
ysp.push(4);
csp.push("b2");
xsp.push(7);
ysp.push(4);
csp.push("b1");
xsp.push(8);
ysp.push(4);
csp.push("b2");
xsp.push(9);
ysp.push(4);
csp.push("no");
xsp.push(0);
ysp.push(5);
csp.push("b1");
xsp.push(1);
ysp.push(5);
csp.push("b2");
xsp.push(2);
ysp.push(5);
csp.push("b1");
xsp.push(3);
ysp.push(5);
csp.push("b2");
xsp.push(4);
ysp.push(5);
csp.push("b1");
xsp.push(5);
ysp.push(5);
csp.push("b2");
xsp.push(6);
ysp.push(5);
csp.push("b1");
xsp.push(7);
ysp.push(5);
csp.push("b2");
xsp.push(8);
ysp.push(5);
csp.push("b1");
xsp.push(9);
ysp.push(5);
csp.push("b2");
xsp.push(0);
ysp.push(6);
csp.push("b1");
xsp.push(1);
ysp.push(6);
csp.push("b2");
xsp.push(2);
ysp.push(6);
csp.push("b1");
xsp.push(3);
ysp.push(6);
csp.push("b2");
xsp.push(4);
ysp.push(6);
csp.push("b1");
xsp.push(5);
ysp.push(6);
csp.push("b2");
xsp.push(6);
ysp.push(6);
csp.push("b1");
xsp.push(7);
ysp.push(6);
csp.push("b2");
xsp.push(8);
ysp.push(6);
csp.push("b1");
xsp.push(9);
ysp.push(6);
csp.push("b2");
xsp.push(1);
ysp.push(7);
csp.push("b1");
xsp.push(2);
ysp.push(7);
csp.push("b2");
xsp.push(3);
ysp.push(7);
csp.push("b1");
xsp.push(4);
ysp.push(7);
csp.push("b2");
xsp.push(5);
ysp.push(7);
csp.push("b1");
xsp.push(6);
ysp.push(7);
csp.push("b2");
xsp.push(7);
ysp.push(7);
csp.push("b1");
xsp.push(8);
ysp.push(7);
csp.push("b2");
xsp.push(1);
ysp.push(8);
csp.push("b1");
xsp.push(2);
ysp.push(8);
csp.push("b2");
xsp.push(3);
ysp.push(8);
csp.push("b1");
xsp.push(4);
ysp.push(8);
csp.push("b2");
xsp.push(5);
ysp.push(8);
csp.push("b1");
xsp.push(6);
ysp.push(8);
csp.push("b2");
xsp.push(7);
ysp.push(8);
csp.push("b1");
xsp.push(8);
ysp.push(8);
csp.push("b2");
xsp.push(2);
ysp.push(9);
csp.push("b1");
xsp.push(3);
ysp.push(9);
csp.push("b2");
xsp.push(4);
ysp.push(9);
csp.push("b1");
xsp.push(5);
ysp.push(9);
csp.push("b2");
xsp.push(6);
ysp.push(9);
csp.push("b1");
xsp.push(7);
ysp.push(9);
csp.push("b2");
xsp.push(3);
ysp.push(10);
csp.push("b1");
xsp.push(4);
ysp.push(10);
csp.push("b2");
xsp.push(5);
ysp.push(10);
csp.push("b1");
xsp.push(6);
ysp.push(10);
csp.push("b2");
xsp.push(0);
ysp.push(7);
csp.push("t1");
xsp.push(0);
ysp.push(8);
csp.push("t1");
xsp.push(0);
ysp.push(9);
csp.push("t1");
xsp.push(0);
ysp.push(10);
csp.push("t2");
xsp.push(9);
ysp.push(7);
csp.push("t1");
xsp.push(9);
ysp.push(8);
csp.push("t1");
xsp.push(9);
ysp.push(9);
csp.push("t1");
xsp.push(9);
ysp.push(10);
csp.push("t2");
xsp.push(2);
ysp.push(10);
csp.push("t1");
xsp.push(2);
ysp.push(11);
csp.push("t1");
xsp.push(2);
ysp.push(12);
csp.push("t1");
xsp.push(2);
ysp.push(13);
csp.push("t1");
xsp.push(2);
ysp.push(14);
csp.push("t2");
xsp.push(3);
ysp.push(11);
csp.push("t2");
xsp.push(4);
ysp.push(11);
csp.push("t1");
xsp.push(5);
ysp.push(11);
csp.push("t1");
xsp.push(4);
ysp.push(12);
csp.push("t2");
xsp.push(5);
ysp.push(12);
csp.push("t2");
xsp.push(6);
ysp.push(11);
csp.push("t2");
xsp.push(7);
ysp.push(10);
csp.push("t1");
xsp.push(7);
ysp.push(11);
csp.push("t1");
xsp.push(7);
ysp.push(12);
csp.push("t1");
xsp.push(7);
ysp.push(13);
csp.push("t1");
xsp.push(7);
ysp.push(14);
csp.push("t2");
tenemies = xsp.length;
} else {
colors = new Array();
colors[0] = 1;
colors[1] = 2;
colors[2] = 3;
colors[3] = 4;
colors[4] = 5;
droptimer = 120;
elevator = "off";
ceiling = 2;
bg_image = 4;
floor = 1;
etypes = 5;
tenemies = 66;
superodds = 16;
laser_timer = 30;
trows = 16;
indent = 0;
color_pad = 30;
}
if ((_root.players > 1) and (superodds < 20)) {
superodds = 20;
}
myColor = new Color(_root.border);
myColorTransform = new Object();
myColorTransform = {ra:red, rb:"0", ga:green, gb:"0", ba:blue, bb:"0", aa:"100", ab:"0"};
myColor.setTransform(myColorTransform);
myColor = new Color(_root.border2);
myColorTransform = new Object();
myColorTransform = {ra:red2, rb:"0", ga:green2, gb:"0", ba:blue2, bb:"0", aa:"100", ab:"0"};
myColor.setTransform(myColorTransform);
_parent._parent.bgs.gotoAndStop(bg_image);
if (bg_image == 8) {
_parent.ship.gotoAndStop(2);
}
max_l = _parent._parent.m32_a._x + (indent * 16);
max_r = _parent._parent.m32_b._x - (indent * 16);
max_t = _parent._parent.m32_c._y;
max_b = 25;
mid = max_l + ((max_r - max_l) / 2);
dir = 1;
gemz = new Array();
gemz_float = new Array();
rotation = new Array();
rotation[0] = "tall";
rotation[1] = "wide";
rotation[2] = "tall";
rotation[3] = "wide";
g1xm = new Array();
g2xm = new Array();
g1ym = new Array();
g2ym = new Array();
g1xm[0] = 0;
g1xm[1] = -8;
g1xm[2] = 0;
g1xm[3] = 8;
g1ym[0] = -8;
g1ym[1] = 0;
g1ym[2] = 8;
g1ym[3] = 0;
g2xm[0] = 0;
g2xm[1] = 8;
g2xm[2] = 0;
g2xm[3] = -8;
g2ym[0] = 8;
g2ym[1] = 0;
g2ym[2] = -8;
g2ym[3] = 0;
cycle = 0;
depth = 100;
enemies = 0;
tcols = ((max_r - max_l) / 16) + 1;
lastrow = 25;
rw = 0;
while (rw <= lastrow) {
cl = 0;
while (cl <= tcols) {
bname = (("x" + cl) + "y") + rw;
Set(((("x" + cl) + "y") + rw) + "_x", cl);
Set(((("x" + cl) + "y") + rw) + "_y", rw);
cl++;
}
rw++;
}
_parent.floor.gotoAndStop(floor);
laser_time = lasertimer;
stop();
}
onClipEvent (enterFrame) {
if (dead < 1) {
_parent.enemies = enemies;
if ((enemies < 1) and (setlev > 0)) {
_parent._parent.play();
}
if (setlev < 1) {
droptime = droptimer;
setlev = 1;
xmlstring = ((((("<command><name>init</name><userid>" + _root.userid) + "</userid><bg>") + bg_image) + "</bg><floor>") + floor) + "</floor>";
if (ceiling > 0) {
yp = 0 + tspace;
xp = 0;
while (xp < tcols) {
depth++;
Set((("x" + xp) + "y") + yp, 1);
Set(((("x" + xp) + "y") + yp) + "_color", 10);
Set(((("x" + xp) + "y") + yp) + "_name", "s" + depth);
Set(((("x" + xp) + "y") + yp) + "_enemy", 0);
if (ceiling == 2) {
_parent.baddie._x = (xp * 16) + max_l;
_parent.baddie._y = (yp * 16) + max_t;
_parent.baddie.duplicateMovieClip("s" + depth, depth);
_parent["s" + depth].gotoAndStop(10);
xmlstring = xmlstring + (((((("<bug><name>s" + depth) + "</name><color>10</color><x>") + ((xp * 16) + max_l)) + "</x><y>") + ((yp * 16) + max_t)) + "</y></bug>");
}
xp++;
}
}
color_seed = new Array();
average = new Array();
maxl = 0;
maxr = 15 - (indent * 2);
yp = tspace;
xp = maxl - 1;
gemseed = 0;
boss = 0;
eadjust = 0;
while (enemies < tenemies) {
if (formation < 1) {
yp = random(trows) + tspace;
xp = random(tcols);
gemseed = random(etypes);
failsafe = 0;
while ((average[gemseed] > (tenemies / etypes)) and (failsafe < 10)) {
gemseed++;
if (gemseed >= etypes) {
gemseed = 0;
}
failsafe++;
}
average[gemseed]++;
ecolor = colors[gemseed];
} else if (formation == 1) {
if (yp < 1) {
yp = 4;
gap = (random((maxr - maxl) - 2) + maxl) + 1;
}
xp++;
if (xp == gap) {
xp++;
}
if (xp > maxr) {
xp = maxl;
gap = (random((maxr - maxl) - 2) + maxl) + 1;
yp = yp + 3;
if (colors[gemseed] > 5) {
yp = yp + 2;
}
gemseed++;
if (gemseed > etypes) {
gemseed = 0;
}
}
trace((("x" + xp) + " y") + yp);
ecolor = colors[gemseed];
} else if (formation == 2) {
xp = xsp[boss];
yp = ysp[boss];
type = csp[boss];
if (type == "b1") {
gemseed++;
if (gemseed > 6) {
gemseed = 1;
}
usprite = "brain1";
ecolor = gemseed * -1;
} else if (type == "b2") {
usprite = "brain2";
ecolor = gemseed * -1;
} else if (type == "t1") {
usprite = "tooth";
ecolor = -1;
} else if (type == "t2") {
usprite = "tooth";
ecolor = -2;
} else {
usprite = "baddie";
ecolor = -7;
}
boss++;
}
if ((formation == 2) or (((eval ((("x" + xp) + "y") + yp) != 1) and (ecolor < 6)) or ((((eval ((("x" + xp) + "y") + yp) != 1) and (eval ((("x" + xp) + "y") + (yp + 1)) != 1)) and (eval ((("x" + xp) + "y") + (yp + 2)) != 1)) and (eval ((("x" + xp) + "y") + (yp + 3)) != 1)))) {
if (ecolor < 0) {
eframe = ecolor * -1;
if (usprite == "tooth") {
ecol = 4;
} else {
ecol = eframe;
}
Set((("x" + xp) + "y") + yp, 1);
Set(((("x" + xp) + "y") + yp) + "_color", ecol);
if (eframe != 7) {
enname = "e" + enemies;
evalue = 100;
} else {
enname = "s" + enemies;
evalue = 0;
eadjust++;
}
Set(((("x" + xp) + "y") + yp) + "_name", enname);
Set(((("x" + xp) + "y") + yp) + "_enemy", 1);
depth++;
_parent[usprite]._x = (xp * 16) + max_l;
_parent[usprite]._y = (yp * 16) + max_t;
_parent[usprite].duplicateMovieClip(enname, depth);
_parent[enname].gotoAndStop(eframe);
color_seed[ecolor] = color_seed[ecolor] + 10;
_parent[ename].value = evalue;
if (usprite == "baddie") {
sprite = "none";
} else {
sprite = usprite;
}
} else if (ecolor < 6) {
Set((("x" + xp) + "y") + yp, 1);
Set(((("x" + xp) + "y") + yp) + "_color", ecolor);
Set(((("x" + xp) + "y") + yp) + "_name", "e" + enemies);
Set(((("x" + xp) + "y") + yp) + "_enemy", 1);
depth++;
_parent.baddie._x = (xp * 16) + max_l;
_parent.baddie._y = (yp * 16) + max_t;
_parent.baddie.duplicateMovieClip("e" + enemies, depth);
_parent["e" + enemies].gotoAndStop(ecolor);
color_seed[ecolor] = color_seed[ecolor] + 10;
_parent["e" + enemies].value = 100;
sprite = "baddie";
eframe = ecolor;
} else {
sprite = "baddie2";
yp = yp + 3;
Set((("x" + xp) + "y") + yp, 1);
Set(((("x" + xp) + "y") + yp) + "_color", ecolor - 5);
Set(((("x" + xp) + "y") + yp) + "_name", "e" + enemies);
Set(((("x" + xp) + "y") + yp) + "_enemy", 1);
Set(((("x" + xp) + "y") + yp) + "_long", 1);
depth++;
_parent.baddie2._x = (xp * 16) + max_l;
_parent.baddie2._y = (yp * 16) + max_t;
_parent.baddie2.duplicateMovieClip("e" + enemies, depth);
_parent["e" + enemies].gotoAndStop(ecolor - 5);
color_seed[ecolor - 5] = color_seed[ecolor - 5] + 16;
_parent["e" + enemies].value = 200;
yp = yp - 3;
yyy = 0;
while (yyy < 3) {
gems++;
Set((("x" + xp) + "y") + (yp + yyy), 1);
Set(((("x" + xp) + "y") + (yp + yyy)) + "_color", ecolor - 5);
Set(((("x" + xp) + "y") + (yp + yyy)) + "_name", "gem" + gems);
Set(((("x" + xp) + "y") + (yp + yyy)) + "_enemy", 0);
Set(((("x" + xp) + "y") + (yp + yyy)) + "_long", 1);
depth++;
_parent.baddie._x = (xp * 16) + max_l;
_parent.baddie._y = ((yp + yyy) * 16) + max_t;
_parent.baddie.duplicateMovieClip("gem" + gems, depth);
_parent["gem" + gems].gotoAndStop(7);
_parent["gem" + gems].value = 0;
yyy++;
}
eframe = ecolor - 5;
}
if (sprite != "none") {
xmlstring = xmlstring + (((((((((("<bug><name>e" + enemies) + "</name><color>") + eframe) + "</color><x>") + ((xp * 16) + max_l)) + "</x><y>") + ((yp * 16) + max_t)) + "</y><sprite>") + sprite) + "</sprite></bug>");
}
enemies++;
}
}
enemies = enemies - eadjust;
tenemies = tenemies - eadjust;
colors_basenum = 0;
ec = 0;
while (ec < etypes) {
color_seed[colors[ec]] = color_seed[colors[ec]] + color_pad;
colors_basenum = colors_basenum + color_seed[ec];
ec++;
}
xmlstring = xmlstring + "</command>";
if (_root.players != 1) {
_root.hotSocket.send(xmlstring);
}
_parent.baddie._x = -999;
_parent.baddie2._x = -999;
_parent.brain1._x = -999;
_parent.brain2._x = -999;
_parent.tooth._x = -999;
}
if (rotation[cycle] == "wide") {
mx_mod = 8;
} else {
mx_mod = 0;
}
if (int(gems_loaded) < 1) {
if (gem3 > 0) {
gem1 = gem3;
gem2 = gem4;
} else {
gem1 = colors[random(etypes)];
if (gem1 > 5) {
gem1 = gem1 - 5;
}
gem2 = colors[random(etypes)];
if (gem2 > 5) {
gem2 = gem2 - 5;
}
}
gem_set = 0;
gem_seed = random(colors_basenum);
gem_place = 0;
gem3 = colors[random(etypes)];
if (gem3 > 5) {
gem3 = gem3 - 5;
}
randomized = random(150);
comto = 0;
gs = 0;
while (gs < etypes) {
gcol = colors[gs];
if (gcol > 5) {
gcol = gcol - 5;
}
theseed = color_seed[gcol];
if (theseed > 100) {
theseed = 100;
}
comto = random(theseed);
if (comto > randomized) {
gem3 = gcol;
randomized = comto;
}
gs++;
}
gem4 = colors[random(etypes)];
if (gem4 > 5) {
gem4 = gem4 - 5;
}
randomized = random(150);
comto = 0;
gs = 0;
while (gs < etypes) {
gcol = colors[gs];
if (gcol > 5) {
gcol = gcol - 5;
}
theseed = color_seed[gcol];
if (theseed > 100) {
theseed = 100;
}
comto = random(theseed);
if (comto > randomized) {
gem4 = gcol;
randomized = comto;
}
gs++;
}
if (random(100) < superodds) {
gem3 = 6;
}
if (random(100) < superodds) {
gem4 = 6;
}
gems_loaded = 1;
_parent.missile.ball1.gotoAndStop(gem1);
_parent.missile.ball2.gotoAndStop(gem2);
xmlstring = ((((("<command><name>gems</name><userid>" + _root.userid) + "</userid><gem1>") + gem1) + "</gem1><gem2>") + gem2) + "</gem2></command>";
if (_root.players != 1) {
_root.hotSocket.send(xmlstring);
}
_parent._parent._parent.ball1.gotoAndStop(gem3);
_parent._parent._parent.ball2.gotoAndStop(gem4);
}
if (((key.isDown(37) and (move_time < 1)) and ((_parent.missile._x - mx_mod) > max_l)) and (spin_time < 1)) {
dir = -1;
move = -1;
move_time = 4;
} else if (((key.isDown(39) and (move_time < 1)) and ((_parent.missile._x + mx_mod) < max_r)) and (spin_time < 1)) {
dir = 1;
move = 1;
move_time = 4;
} else if ((key.isDown(key.Down) and (spin_time < 1)) and (move_time < 1)) {
_parent.missile.play();
if ((_root.sound = 1)) {
sndfx = new Sound();
sndfx.attachSound("sfx_rotate");
sndfx.start();
}
cycle++;
if (cycle == rotation.length) {
cycle = 0;
}
spin_time = 4;
} else if ((((key.isDown(38) and (imp_time < 1)) and (move_time < 1)) and (spin_time < 1)) and (floaterz < 1)) {
shootgem = 1;
imp_time = 10;
if (cycle == 0) {
gcy1 = -8;
gcy2 = 8;
gcx1 = 0;
gcx2 = 0;
} else if (cycle == 1) {
gcy1 = -8;
gcy2 = -8;
gcx1 = -8;
gcx2 = 8;
} else if (cycle == 2) {
gcy1 = 8;
gcy2 = -8;
gcx1 = 0;
gcx2 = 0;
} else if (cycle == 3) {
gcy1 = -8;
gcy2 = -8;
gcx1 = 8;
gcx2 = -8;
}
mmix = int(((_parent.missile._x + gcx1) - max_l) / 16);
mmiy = int(((_parent.missile._y + gcy1) - max_t) / 16);
mmjx = int(((_parent.missile._x + gcx2) - max_l) / 16);
mmjy = int(((_parent.missile._y + gcy2) - max_t) / 16);
gem1a = gem1;
gem2a = gem2;
}
if ((_root.attack > 0) and (shootgem < 1)) {
_root.attack = _root.attack - 2;
mmix1 = int(((_parent.missile._x + gcx1) - max_l) / 16);
mmiy = int(((_parent.missile._y + gcy1) - max_t) / 16);
mmjx1 = int(((_parent.missile._x + gcx2) - max_l) / 16);
mmjy = mmiy;
mmix = mmix1;
mmjx = mmjx1;
gem1a = gem1;
gem2a = gem2;
while ((((mmix == mmix1) or (mmix == mmjx1)) or (mmjx == mmix1)) or (mmjx == mmjx1)) {
mmix = random(15 - indent) + indent;
mmjx = mmix + 1;
}
rn1 = random(etypes + 1);
rn2 = random(etypes + 1);
if (rn1 >= etypes) {
gem1a = 6;
} else {
gem1a = colors[rn1];
if (gem1a > 5) {
gem1a = gem1a - 5;
}
}
if (rn2 >= etypes) {
gem2a = 6;
} else {
gem2a = colors[rn2];
if (gem2a > 5) {
gem2a = gem2a - 5;
}
}
shootgem = 2;
}
if (shootgem > 0) {
trace("shoot");
depth++;
gems++;
xmlstring = ("<command><name>fire</name><userid>" + _root.userid) + "</userid><gem>";
_parent.gem.duplicateMovieClip("gem" + gems, depth);
_parent["gem" + gems].value = 25;
_parent["gem" + gems].x = mmix;
_parent["gem" + gems].y = mmiy;
_parent["gem" + gems]._x = max_l + (_parent["gem" + gems].x * 16);
_parent["gem" + gems]._y = max_t + (_parent["gem" + gems].y * 16);
Set(((("x" + _parent["gem" + gems].x) + "y") + _parent["gem" + gems].y) + "_name", "gem" + gems);
Set(((("x" + _parent["gem" + gems].x) + "y") + _parent["gem" + gems].y) + "_float", 1);
Set(((("x" + _parent["gem" + gems].x) + "y") + _parent["gem" + gems].y) + "_color", gem1a);
_parent["gem" + gems].gotoAndStop(gem1a);
color_seed[gem1a] = color_seed[gem1a] + 2;
combo++;
Set("_parent.combo" + combo, 0);
_parent["gem" + gems].comboc = combo;
_parent["gem" + gems].combor = combo;
xmlstring = xmlstring + (("<name>gem" + gems) + "</name>");
xmlstring = xmlstring + (("<x>" + (max_l + (_parent["gem" + gems].x * 16))) + "</x>");
xmlstring = xmlstring + (("<y>" + (max_t + (_parent["gem" + gems].y * 16))) + "</y>");
xmlstring = xmlstring + (("<color>" + gem1a) + "</color>");
depth++;
gems++;
xmlstring = xmlstring + "</gem><gem>";
_parent.gem.duplicateMovieClip("gem" + gems, depth);
_parent["gem" + gems].value = 25;
_parent["gem" + gems].x = mmjx;
_parent["gem" + gems].y = mmjy;
_parent["gem" + gems]._x = max_l + (_parent["gem" + gems].x * 16);
_parent["gem" + gems]._y = max_t + (_parent["gem" + gems].y * 16);
Set(((("x" + _parent["gem" + gems].x) + "y") + _parent["gem" + gems].y) + "_name", "gem" + gems);
Set(((("x" + _parent["gem" + gems].x) + "y") + _parent["gem" + gems].y) + "_float", 1);
Set(((("x" + _parent["gem" + gems].x) + "y") + _parent["gem" + gems].y) + "_color", gem2a);
_parent["gem" + gems].gotoAndStop(gem2a);
color_seed[gem2a] = color_seed[gem2a] + 2;
_parent["gem" + gems].comboc = combo;
_parent["gem" + gems].combor = combo;
xmlstring = xmlstring + (("<name>gem" + gems) + "</name>");
xmlstring = xmlstring + (("<x>" + (max_l + (_parent["gem" + gems].x * 16))) + "</x>");
xmlstring = xmlstring + (("<y>" + (max_t + (_parent["gem" + gems].y * 16))) + "</y>");
xmlstring = xmlstring + (("<color>" + gem2a) + "</color>");
xmlstring = xmlstring + "</gem></command>";
if (_root.players != 1) {
_root.hotSocket.send(xmlstring);
}
if (shootgem == 1) {
gem1 = 7;
gem2 = 7;
_parent.missile.ball1.gotoAndStop(gem1);
_parent.missile.ball2.gotoAndStop(gem2);
gems_loaded = 0;
}
shootgem = 0;
}
if (((imp_time < 1) and (move_time < 1)) and (spin_time < 1)) {
if (laser_time < 1) {
_parent.missile.laser.play();
} else {
_parent.missile.laser.gotoAndStop(1);
laser_time--;
}
} else {
laser_time = laser_timer;
_parent.missile.laser.gotoAndStop(1);
}
if ((imp_time > 0) and (floaterz < 1)) {
imp_time--;
}
if (spin_time > 0) {
if (rotation[cycle] != "tall") {
if (_parent.missile._x > _x) {
_parent.missile._x = _parent.missile._x - 2;
} else {
_parent.missile._x = _parent.missile._x + 2;
}
} else {
_parent.missile._x = _parent.missile._x + (2 * dir);
}
spin_time--;
if (spin_time < 1) {
xmlstring = ((((("<command><name>spin</name><userid>" + _root.userid) + "</userid><cycle>") + cycle) + "</cycle><x>") + _parent.missile._x) + "</x></command>";
if (_root.players != 1) {
_root.hotSocket.send(xmlstring);
}
}
} else {
_parent.missile.gotoAndStop("c" + (cycle + 1));
rot_mode = rotation[cycle];
if (rot_mode == "wide") {
_parent.missile._x = _x;
}
}
if (move_time > 0) {
if (_root.tsnd < 1) {
_root.tsnd = 1;
if ((_root.sound = 1)) {
tsfx.play();
}
}
if ((rot_mode == "tall") and (((_parent.missile._x <= (_x + 4)) and (move == 1)) or ((_parent.missile._x >= (_x - 4)) and (move == -1)))) {
_parent.missile._x = _parent.missile._x + (4 * move);
stop();
} else {
_x = (_x + (4 * move));
_parent.missile._x = _parent.missile._x + (4 * move);
play();
}
move_time--;
if (move_time < 1) {
xmlstring = ((((("<command><name>move</name><userid>" + _root.userid) + "</userid><x>") + _x) + "</x><x2>") + _parent.missile._x) + "</x2></command>";
if (_root.players != 1) {
_root.hotSocket.send(xmlstring);
}
}
} else {
if (_root.tsnd == 1) {
if ((_root.sound = 1)) {
tsfx.gotoAndPlay("stopped");
}
_root.tsnd = 0;
}
stop();
}
checkhits = null;
checkhits = new Array();
droptime--;
fldet = floaterz;
floaterz = 0;
newfloats = "";
rw = -y_offset;
while (rw <= (lastrow - y_offset)) {
cl = 0;
while (cl <= tcols) {
bname = (("x" + cl) + "y") + rw;
if (eval (bname + "_newfloat") == 1) {
Set(bname + "_newfloat", 0);
newfloats = newfloats + (((("<gem><name>" + eval (bname + "_name")) + "</name><y>") + (max_t + (rw * 16))) + "</y><mod>-1</mod></gem>");
}
if (eval (bname + "_float") == 1) {
Set(bname + "_stuck", 0);
mcname = eval (bname + "_name");
if (eval (((("x" + cl) + "y") + (rw - 1)) + "_color") < 1) {
Set((("x" + cl) + "y") + (rw - 1), 0);
}
if ((eval ((("x" + cl) + "y") + (rw - 1)) == 1) and (eval (((("x" + cl) + "y") + (rw - 1)) + "_color") > 0)) {
color_id = 9;
mi = 0;
while ((color_id == 9) and (mi < 10)) {
if (colors[mi] == eval (((("x" + cl) + "y") + rw) + "_color")) {
color_id = mi;
colors_basenum = colors_basenum + 15;
}
mi++;
}
Set(((("x" + cl) + "y") + rw) + "_float", 0);
if ((_root.sound = 1)) {
sndfx = new Sound();
sndfx.attachSound("sfx_land");
sndfx.start();
}
Set((("x" + cl) + "y") + rw, 1);
checkhits.push((("x" + cl) + "y") + rw);
newfloats = newfloats + (((("<gem><name>" + mcname) + "</name><y>") + (max_t + (rw * 16))) + "</y><mod>0</mod></gem>");
} else {
_parent[mcname]._y = _parent[mcname]._y - 16;
if (rw <= (-y_offset)) {
_parent[mcname].removeMovieClip();
color_seed[eval (((("x" + cl) + "y") + rw) + "_color")] = color_seed[eval (((("x" + cl) + "y") + rw) + "_color")] - 2;
} else {
Set((("x" + cl) + "y") + (rw - 1), 1);
Set(((("x" + cl) + "y") + (rw - 1)) + "_name", eval (((("x" + cl) + "y") + rw) + "_name"));
Set(((("x" + cl) + "y") + (rw - 1)) + "_float", 1);
Set(((("x" + cl) + "y") + (rw - 1)) + "_color", eval (((("x" + cl) + "y") + rw) + "_color"));
Set(((("x" + cl) + "y") + (rw - 1)) + "_enemy", eval (((("x" + cl) + "y") + rw) + "_enemy"));
}
Set((("x" + cl) + "y") + rw, 0);
Set(((("x" + cl) + "y") + rw) + "_name", null);
Set(((("x" + cl) + "y") + rw) + "_float", 0);
Set(((("x" + cl) + "y") + rw) + "_color", 0);
Set(((("x" + cl) + "y") + rw) + "_enemy", 0);
}
} else if (eval (bname) == 1) {
Set(bname + "_stuck", eval (bname + "_stuck") + 1);
if ((rw > (23 - y_offset)) and (eval (bname + "_stuck") > 7)) {
dead = 1;
}
}
cl++;
}
rw++;
}
if (newfloats.length > 0) {
xmlstring = ((("<command><name>rows</name><userid>" + _root.userid) + "</userid>") + newfloats) + "</command>";
if (_root.players != 1) {
_root.hotSocket.send(xmlstring);
}
}
if (droptime < 1) {
xmlstring = ("<command><name>shift</name><userid>" + _root.userid) + "</userid>";
if ((_root.sound = 1)) {
sndfx = new Sound();
sndfx.attachSound("sfx_pass");
sndfx.start();
}
_parent.missile._y = _parent.missile._y - 16;
_y = (_y - 16);
_parent.floor._y = _parent.floor._y - 16;
if (elevator != "on") {
_parent._y = _parent._y + 16;
xmlstring = xmlstring + "<shift>up</shift>";
} else {
xmlstring = xmlstring + "<shift>down</shift>";
}
y_offset++;
droptime = droptimer;
xmlstring = xmlstring + "</command>";
if (_root.players != 1) {
_root.hotSocket.send(xmlstring);
}
}
killrows = 0;
killcols = 0;
dfdf = 0;
while (dfdf < checkhits.length) {
terminate = 0;
dt_xx = eval (checkhits[dfdf] + "_x");
dt_yy = eval (checkhits[dfdf] + "_y");
dt_color = eval (checkhits[dfdf] + "_color");
outc = new Array();
outc[0] = "";
outc[1] = "red";
outc[2] = "green";
outc[3] = "blue";
outc[4] = "yellow";
outc[5] = "purple";
outc[6] = "super";
climb = 0;
if (dt_color == 60) {
superball_l = 0;
while (eval (((("x" + (dt_xx - superball_l)) + "y") + dt_yy) + "_color") == 6) {
superball_l++;
}
superball_l--;
superball_r = 0;
while (eval (((("x" + (dt_xx + superball_r)) + "y") + dt_yy) + "_color") == 6) {
superball_r++;
}
superball_r--;
superball_u = 0;
while (eval (((("x" + dt_xx) + "y") + (dt_yy - superball_u)) + "_color") == 6) {
superball_u++;
}
superball_u--;
superball_d = 0;
while (eval (((("x" + dt_xx) + "y") + (dt_yy + superball_d)) + "_color") == 6) {
superball_d++;
}
superball_d--;
look = 1;
series_l = 0;
wildc_l = 0;
wildc_r = 0;
wildc_u = 0;
wildc_d = 0;
if (eval ((("x" + ((dt_xx - superball_l) - look)) + "y") + dt_yy) == 1) {
wildc_l = eval (((("x" + ((dt_xx - superball_l) - look)) + "y") + dt_yy) + "_color");
while ((eval (((("x" + ((dt_xx - superball_l) - look)) + "y") + dt_yy) + "_color") == wildc_l) or (eval (((("x" + ((dt_xx - superball_l) - look)) + "y") + dt_yy) + "_color") == 6)) {
series_l++;
look++;
}
}
look = 1;
series_r = 0;
if (eval ((("x" + ((dt_xx + superball_r) + look)) + "y") + dt_yy) == 1) {
wildc_r = eval (((("x" + ((dt_xx + superball_r) + look)) + "y") + dt_yy) + "_color");
while ((eval (((("x" + ((dt_xx + superball_r) + look)) + "y") + dt_yy) + "_color") == wildc_r) or (eval (((("x" + ((dt_xx - superball_r) + look)) + "y") + dt_yy) + "_color") == 6)) {
series_r++;
look++;
}
}
look = 1;
series_u = 0;
if (eval ((("x" + dt_xx) + "y") + ((dt_yy - superball_u) - look)) == 1) {
wildc_u = eval (((("x" + dt_xx) + "y") + ((dt_yy - superball_u) - look)) + "_color");
while ((eval (((("x" + dt_xx) + "y") + ((dt_yy - superball_u) - look)) + "_color") == wildc_u) or (eval (((("x" + dt_xx) + "y") + ((dt_yy - superball_u) - look)) + "_color") == 6)) {
series_u++;
look++;
}
}
look = 1;
series_d = 0;
if (eval ((("x" + dt_xx) + "y") + ((dt_yy + superball_d) + look)) == 1) {
wildc_d = eval (((("x" + dt_xx) + "y") + ((dt_yy + superball_d) + look)) + "_color");
while ((eval (((("x" + dt_xx) + "y") + ((dt_yy + superball_d) + look)) + "_color") == wildc_d) or (eval (((("x" + dt_xx) + "y") + ((dt_yy + superball_d) + look)) + "_color") == 6)) {
series_d++;
look++;
}
}
if (wildc_l == 0) {
wildc_l = wildc_r;
}
if (wildc_r == 0) {
wildc_r = wildc_l;
}
if (wildc_u == 0) {
wildc_u = wildc_d;
}
if (wildc_d == 0) {
wildc_d = wildc_u;
}
if (eval (((("x" + dt_xx) + "y") + dt_yy) + "_incol") != 1) {
if (wildc_u == wildc_d) {
sequence = ((series_u + superball_u) + superball_d) + series_d;
if (sequence >= 3) {
seq_up = (dt_yy - superball_u) - series_u;
seq_down = (dt_yy + superball_d) + series_d;
killcols++;
Set("kill_col" + killcols, dt_xx);
Set("kill_u" + killcols, seq_up);
Set("kill_d" + killcols, sequence);
kl = 0;
while (kl <= sequence) {
Set(((("x" + dt_xx) + "y") + (dt_yy + kl)) + "_incol", 1);
kl++;
}
}
} else {
sequence = (series_u + superball_u) + superball_d;
if (sequence >= 3) {
seq_up = (dt_yy - superball_u) - series_u;
killcols++;
Set("kill_col" + killcols, dt_xx);
Set("kill_u" + killcols, seq_up);
Set("kill_d" + killcols, sequence);
kl = 0;
while (kl <= sequence) {
Set(((("x" + dt_xx) + "y") + (dt_yy + kl)) + "_incol", 1);
kl++;
}
}
sequence = (superball_u + superball_d) + series_d;
if (sequence >= 3) {
seq_up = (dt_yy - superball_u) - series_u;
killcols++;
Set("kill_col" + killcols, dt_xx);
Set("kill_u" + killcols, seq_up);
Set("kill_d" + killcols, sequence);
kl = 0;
while (kl <= sequence) {
Set(((("x" + dt_xx) + "y") + (dt_yy + kl)) + "_incol", 1);
kl++;
}
}
}
}
if (eval (((("x" + dt_xx) + "y") + dt_yy) + "_inrow") != 1) {
if (wildc_l == wildc_r) {
sequence = ((series_l + superball_l) + superball_r) + series_r;
if (sequence >= 3) {
seq_left = (dt_xx - superball_l) - series_l;
seq_right = (dt_xx + superball_r) + series_r;
killrows++;
Set("kill_row" + killrows, dt_yy);
Set("kill_l" + killrows, seq_left);
Set("kill_r" + killrows, sequence);
kl = 0;
while (kl <= sequence) {
Set(((("x" + (seq_left + kl)) + "y") + dt_yy) + "_inrow", 1);
kl++;
}
}
} else {
sequence = (series_l + superball_l) + superball_r;
if (sequence >= 3) {
seq_left = (dt_xx - superball_l) - series_l;
killrows++;
Set("kill_row" + killrows, dt_yy);
Set("kill_l" + killrows, seq_left);
Set("kill_r" + killrows, sequence);
kl = 0;
while (kl <= sequence) {
Set(((("x" + (seq_left + kl)) + "y") + dt_yy) + "_inrow", 1);
kl++;
}
}
sequence = (superball_l + superball_r) + series_r;
if (sequence >= 3) {
seq_left = dt_xx - superball_l;
killrows++;
Set("kill_row" + killrows, dt_yy);
Set("kill_l" + killrows, seq_left);
Set("kill_r" + killrows, sequence);
kl = 0;
while (kl <= sequence) {
Set(((("x" + (seq_left + kl)) + "y") + dt_yy) + "_inrow", 1);
kl++;
}
}
}
}
} else {
seq_up = 1;
while ((eval ((("x" + dt_xx) + "y") + (dt_yy - seq_up)) == 1) and ((eval (((("x" + dt_xx) + "y") + (dt_yy - seq_up)) + "_color") == dt_color) or (eval (((("x" + dt_xx) + "y") + (dt_yy - seq_up)) + "_color") == dt_color))) {
seq_up++;
}
seq_up--;
seq_down = 1;
while ((eval ((("x" + dt_xx) + "y") + (dt_yy + seq_down)) == 1) and ((eval (((("x" + dt_xx) + "y") + (dt_yy + seq_down)) + "_color") == dt_color) or (eval (((("x" + dt_xx) + "y") + (dt_yy + seq_down)) + "_color") == dt_color))) {
seq_down++;
}
seq_down--;
sequence = seq_up + seq_down;
if (sequence >= 3) {
seq_up = dt_yy - seq_up;
killcols++;
Set("kill_col" + killcols, dt_xx);
Set("kill_u" + killcols, seq_up);
Set("kill_d" + killcols, sequence);
kl = 0;
while (kl <= sequence) {
Set(((("x" + dt_xx) + "y") + (dt_yy + kl)) + "_incol", 1);
kl++;
}
}
seq_left = 1;
mcidn = 0;
while (((eval ((("x" + (dt_xx - seq_left)) + "y") + dt_yy) == 1) and (eval (((("x" + (dt_xx - seq_left)) + "y") + dt_yy) + "_long") != 1)) and ((eval (((("x" + (dt_xx - seq_left)) + "y") + dt_yy) + "_color") == dt_color) or (eval (((("x" + (dt_xx - seq_left)) + "y") + dt_yy) + "_color") == dt_color))) {
seq_left++;
}
seq_left--;
seq_right = 1;
while (((eval ((("x" + (dt_xx + seq_right)) + "y") + dt_yy) == 1) and (eval (((("x" + (dt_xx + seq_right)) + "y") + dt_yy) + "_long") != 1)) and ((eval (((("x" + (dt_xx + seq_right)) + "y") + dt_yy) + "_color") == dt_color) or (eval (((("x" + (dt_xx + seq_right)) + "y") + dt_yy) + "_color") == dt_color))) {
seq_right++;
}
seq_right--;
sequence = seq_left + seq_right;
if (sequence >= 3) {
seq_left = dt_xx - seq_left;
killrows++;
Set("kill_row" + killrows, dt_yy);
Set("kill_l" + killrows, seq_left);
Set("kill_r" + killrows, sequence);
kl = 0;
while (kl <= sequence) {
Set(((("x" + (seq_left + kl)) + "y") + dt_yy) + "_inrow", 1);
kl++;
}
}
}
dfdf++;
}
killxml = "";
killpoints = 0;
rowbonus = 0;
combobonus = 0;
klr = 1;
while (klr <= killrows) {
kyy = eval ("kill_row" + klr);
kxx = eval ("kill_l" + klr);
ksq = eval ("kill_r" + klr);
killz = 0;
incombo = 0;
killit = 0;
while (killit <= ksq) {
mcname = eval (((("x" + (kxx + killit)) + "y") + kyy) + "_name");
if (eval (((("x" + (kxx + killit)) + "y") + kyy) + "_long") != 1) {
mccolor = eval (((("x" + (kxx + killit)) + "y") + kyy) + "_color");
depth++;
_parent.boom.duplicateMovieClip("boom" + depth, depth);
_parent["boom" + depth]._x = _parent[mcname]._x;
_parent["boom" + depth]._y = _parent[mcname]._y;
gotrow = 1;
Set(("_parent.boom" + depth) + ".color_id", 6);
_parent["boom" + depth].gotoAndStop(mccolor);
_parent["boom" + depth].x = kxx + killit;
_parent["boom" + depth].y = kyy;
if (_parent[mcname].combor > 0) {
if (_parent[mcname].combor > incombo) {
incombo = _parent[mcname].combor;
}
_parent[mcname].combor = 0;
_parent["boom" + depth].combo = incombo;
}
killpoints = killpoints + _parent[mcname].value;
if (_parent[mcname].value == 25) {
color_seed[mccolor] = color_seed[mccolor] - 2;
trace("r-2 from " + mcname);
} else if (_parent[mcname].value == 100) {
color_seed[mccolor] = color_seed[mccolor] - 10;
trace("r-10 from " + mcname);
} else if (_parent[mcname].value == 200) {
color_seed[mccolor] = color_seed[mccolor] - 16;
trace("r-30 from " + mcname);
}
_parent[mcname].value = 0;
_parent[mcname].removeMovieClip();
killxml = killxml + (("<kill>" + mcname) + "</kill>");
}
killit++;
}
trace("vert #" + incombo);
rowbonus = rowbonus + 500;
combobonus = combobonus + (int(comboz[incombo]) * 500);
comboz[incombo]++;
rcombo = rcombo + comboz[incombo];
klr++;
}
klr = 1;
while (klr <= killcols) {
kxx = eval ("kill_col" + klr);
kyy = eval ("kill_u" + klr);
ksq = eval ("kill_d" + klr);
floaters = 0;
incombo = 0;
killit = 0;
while (killit <= ksq) {
mcname = eval (((("x" + kxx) + "y") + (kyy + killit)) + "_name");
mccolor = eval (((("x" + kxx) + "y") + (kyy + killit)) + "_color");
depth++;
gotrow = 1;
if (_parent[mcname].comboc > 0) {
if (_parent[mcname].comboc > incombo) {
incombo = _parent[mcname].comboc;
}
_parent[mcname].comboc = 0;
_parent["boom" + depth].combo = incombo;
}
_parent.boom.duplicateMovieClip("boom" + depth, depth);
_parent["boom" + depth]._x = _parent[mcname]._x;
_parent["boom" + depth]._y = _parent[mcname]._y;
_parent["boom" + depth].gotoAndStop(mccolor);
_parent["boom" + depth].x = kxx;
_parent["boom" + depth].y = kyy + killit;
killpoints = killpoints + _parent[mcname].value;
if (_parent[mcname].value == 25) {
color_seed[mccolor] = color_seed[mccolor] - 2;
trace("c-2 from " + mcname);
} else if (_parent[mcname].value == 100) {
color_seed[mccolor] = color_seed[mccolor] - 10;
trace("c-10 from " + mcname);
} else if (_parent[mcname].value == 200) {
color_seed[mccolor] = color_seed[mccolor] - 30;
trace("c-30 from " + mcname);
}
_parent[mcname].removeMovieClip();
_parent["boom" + depth].combo = incombo;
killxml = killxml + (("<kill>" + mcname) + "</kill>");
killit++;
}
trace("horiz #" + incombo);
combobonus = combobonus + (int(comboz[incombo]) * 500);
comboz[incombo]++;
ccombo = ccombo + comboz[incombo];
klr++;
}
if (killpoints >= 200) {
xcombo = 1;
} else {
xcombo = 0;
}
if (killpoints > 0) {
_root.score = _root.score + killpoints;
_root.depth++;
_root.msg.duplicateMovieClip("ms" + _root.depth, _root.depth + 100);
_root["ms" + _root.depth].msg = killpoints + " points";
_root["ms" + _root.depth].normal = 1;
}
if (combobonus > 0) {
_root.score = _root.score + combobonus;
_root.depth++;
_root.msg.duplicateMovieClip("ms" + _root.depth, _root.depth + 100);
_root["ms" + _root.depth]._y = _root["ms" + _root.depth]._y + 32;
_root["ms" + _root.depth].msg = ("Combo Bonus: " + combobonus) + " points";
xcombo++;
}
bcombo = 0;
if (rowbonus > 0) {
_root.score = _root.score + rowbonus;
_root.depth++;
_root.msg.duplicateMovieClip("ms" + _root.depth, _root.depth + 100);
_root["ms" + _root.depth]._y = _root["ms" + _root.depth]._y + 64;
_root["ms" + _root.depth].msg = ("Row Bonus: " + rowbonus) + " points";
xcombo++;
}
if (killxml.length > 0) {
xmlstring = ((((("<command><name>kill</name><userid>" + _root.userid) + "</userid><combo>") + xcombo) + "</combo>") + killxml) + "</command>";
if (_root.players != 1) {
_root.hotSocket.send(xmlstring);
}
}
} else if (dead == 1) {
if (_root.players > 1) {
_root.ulevel++;
}
_parent._parent.gotoAndPlay(10);
dead = 2;
}
if (gotrow == 1) {
if ((_root.sound = 1)) {
sndfx = new Sound();
sndfx.attachSound("sfx_clear");
sndfx.start();
}
gotrow = 0;
}
d = 0;
while (d < etypes) {
gcd = colors[d];
if (gcd > 5) {
gcd = gcd - 5;
}
if (color_seed[gcd] < 5) {
color_seed[gcd] = 5;
}
d++;
}
}
Symbol 359 MovieClip Frame 1
stop();
Symbol 361 MovieClip Frame 1
stop();
Symbol 361 MovieClip Frame 7
if (_root.players > 1) {
_root.won++;
xmlstring = ("<command><name>round</name><userid>" + _root.userid) + "</userid><result>win</result></command>";
_root.hotSocket.send(xmlstring);
_root.window2.play();
}
_parent.ulevel++;
_parent.play();
Symbol 361 MovieClip Frame 21
if (_root.players > 1) {
_root.lost++;
xmlstring = ("<command><name>round</name><userid>" + _root.userid) + "</userid><result>lose</result></command>";
_root.hotSocket.send(xmlstring);
_root.window2.play();
_parent.play();
} else {
_parent.gotoAndStop(45);
}
Symbol 369 Button
on (release) {
_root.won = 0;
_root.lost = 0;
_root.player = 0;
_root.score = 0;
_root.ulevel = 1;
gotoAndStop (5);
}
Symbol 380 Button
on (release) {
if ((_root.gooddomain == 1) and (pname.length > 0)) {
encryptdata = (((random(300) + "&") + escape(score)) + "&") + escape(pname);
ekey = "YouLike2EatTEHd0gP00Pd0NtY0u";
encryptchars = "724xw?!@$-{A609By%^()DE8Q1TgabYcdSUVW&*XZf5ehijkl_+mnoFGHIJKLN=:;~OCMRPpqrsz.,/3tuv}'";
chars = encryptchars.split("");
ki = ekey.split("");
keylength = ekey.length;
echars = encryptchars.length;
convert = new Array();
c2 = 0;
line = 0;
while (line < ki.length) {
fr = "";
bk = "";
c2 = c2 + ord(ki[line]);
while (c2 > echars) {
c2 = c2 - echars;
}
c = 0;
while (c < echars) {
if (c < c2) {
bk = bk + chars[c];
} else {
fr = fr + chars[c];
}
c++;
}
convert[line] = fr + bk;
trace((convert[line] + " ---") + c2);
line++;
}
if (encryptdata.length > 0) {
score = "";
trace("Encrypting 'encryptdata'");
boggle = encryptdata.split("");
matrix = 0;
out = 0;
while (out < encryptdata.length) {
c = 0;
while (c < echars) {
if (boggle[out] == chars[c]) {
replace = convert[matrix].split("");
boggle[out] = replace[c];
c = echars + 10;
matrix++;
if (matrix >= keylength) {
matrix = 0;
}
}
c++;
}
score = score + boggle[out];
out++;
}
}
convert = undefined;
encryptdata = undefined;
ekey = undefined;
encryptchars = undefined;
chars = undefined;
boggle = undefined;
replace = undefined;
fr = undefined;
bk = undefined;
ki = undefined;
_root.player = undefined;
_root.wall = undefined;
getURL ("http://www.psychogoldfish.com/chroma/scores.php", "_blank", "POST");
score = 0;
_root.gotoAndPlay(1);
}
if (_root.gooddomain != 1) {
_root.share.play();
}
}
Symbol 382 Button
on (release) {
gotoAndPlay (1);
}
Symbol 384 Button
on (release) {
if (_root.gooddomain != 1) {
_root.share.play();
} else {
score = 0;
gotoAndPlay ("newlevel");
}
}