Frame 1
hsURL = "http://www.tntfireworks.com/images/games/scores.swf";
gameid = 556623 /* 0x087E4F */;
loadMovieNum (hsURL, 1);
_level0.handleClose = function () {
};
function showMenu() {
_quality = "HIGH";
title._visible = true;
title.swirly.restartme();
}
function quitGame() {
field.onEnterFrame = null;
summary.onEnterFrame = null;
drawup.onEnterFrame = null;
_root.onEnterFrame = null;
ball.removeMovieClip();
clearInterval(titleTimer);
clearInterval(goTimer);
mainframe.levelstatbox._visible = false;
mainframe.levelsummary.text = "";
mainframe.continuebutton._visible = false;
theclaw._visible = false;
mainframe.boxback._visible = false;
wsoundobj.warningslow.stop();
wsoundobj.warning.stop();
stopcursong();
_root.soundobj.spacedrone.start(0, 9991);
if (mousehide) {
Mouse.show();
}
}
function levelclearup() {
var _local1 = this;
if (Math.floor(_local1.nyc) == _local1.nyc) {
nm = "ball" + _local1.nyc;
if (field[nm]._currentframe > 1) {
field[nm].gotoAndStop(1);
field[nm].fademe.play();
soundobj.popone.start(0, 1);
_local1.nyc = _local1.nyc + 0.5;
} else {
_local1.nyc = _local1.nyc + 1;
}
} else {
_local1.nyc = _local1.nyc + 0.5;
}
if (_local1.nyc == (gwid * (ghei + 2))) {
field.dests = 1700;
field.destr = 170;
field.onEnterFrame = zoomto;
field.zoomrate = 0.05;
_local1.onEnterFrame = null;
}
}
function leveldrawup() {
var _local1 = this;
if (field.dests == field._xscale) {
if (Math.floor(_local1.nyc) == _local1.nyc) {
var _local2 = _local1.nyc % gwid;
var _local3 = Math.floor(_local1.nyc / gwid);
if (gamegrid[_local3][_local2] > 1) {
nm = "ball" + _local1.nyc;
field[nm].gotoAndStop(gamegrid[_local3][_local2]);
soundobj.popone.start(0, 1);
field[nm].fademe.stop();
field[nm].fademe._visible = false;
_local1.nyc = _local1.nyc + 0.5;
} else {
_local1.nyc = _local1.nyc + 1;
}
} else {
_local1.nyc = _local1.nyc + 0.5;
}
if (_local1.nyc == (gwid * (ghei + 2))) {
_local1.onEnterFrame = null;
timedtitle();
}
}
}
function summarizeGame() {
_root.createEmptyMovieClip("summary", 344);
summary.nyc = 0;
summary.onEnterFrame = levelclearup;
mainframe.continuebutton._visible = true;
mainframe.levelstatbox._visible = true;
mainframe.levelsummary.text = ((("\uCE94\uB514\uC0F7 \uB808\uBCA8 " + level) + " \uC784\uBB34 \uC131\uACF5") + newline) + "\uB2E4\uC74C \uB808\uBCA8\uB85C~!!";
}
function handleGameOver() {
clearInterval(gotimer);
mainframe.boxback._visible = false;
ball.removeMovieClip();
if (mousehide) {
Mouse.show();
}
showMenu();
}
function handleprogresslevel() {
mainframe.levelstatbox._visible = false;
mainframe.levelsummary.text = "";
mainframe.continuebutton._visible = false;
mainframe.boxback._visible = false;
clearInterval(goltimer);
goltimer = null;
ball.removeMovieClip();
level++;
startgame();
}
System.useCodepage = true;
loader.swapDepths(90000);
goltimer = null;
mainframe.boxback._visible = false;
mainframe.pausebutton._visible = false;
mainframe.pauseback._visible = false;
mainframe.levelstatbox._visible = false;
mainframe.gameover._visible = false;
mainframe.continuebutton._visible = false;
instructions.swapDepths(10002);
instructions._visible = false;
_root.createEmptyMovieClip("soundobj", 8960);
soundobj.drop = new Sound(soundobj);
soundobj.drop.attachSound("drop");
soundobj.beep1 = new Sound(soundobj);
soundobj.beep1.attachSound("beep1");
soundobj.autodrop = new Sound(soundobj);
soundobj.autodrop.attachSound("autodrop");
soundobj.novasfx = new Sound(soundobj);
soundobj.novasfx.attachSound("novasfx");
soundobj.spacedrone = new Sound(soundobj);
soundobj.spacedrone.attachSound("spacedrone");
soundobj.movement = new Sound(soundobj);
soundobj.movement.attachSound("movement");
soundobj.descend = new Sound(soundobj);
soundobj.descend.attachSound("descend");
soundobj.gameover = new Sound(soundobj);
soundobj.gameover.attachSound("gameover");
soundobj.autodrop = new Sound(soundobj);
soundobj.autodrop.attachSound("autodrop");
soundobj.clear1 = new Sound(soundobj);
soundobj.clear1.attachSound("clear1");
soundobj.clear2 = new Sound(soundobj);
soundobj.clear2.attachSound("clear2");
soundobj.clear5 = new Sound(soundobj);
soundobj.clear5.attachSound("clear5");
soundobj.addrow = new Sound(soundobj);
soundobj.addrow.attachSound("addrow");
soundobj.popone = new Sound(soundobj);
soundobj.popone.attachSound("popone");
_root.createEmptyMovieClip("wsoundobj", 8961);
wsoundobj.warning = new Sound(wsoundobj);
wsoundobj.warning.attachSound("warning");
wsoundobj.warningslow = new Sound(wsoundobj);
wsoundobj.warningslow.attachSound("warningslow");
_root.createEmptyMovieClip("msoundobj", 9988);
loadMovieNum ("songpack.swf", 6);
msoundobj.internalsong = new Sound(msoundobj);
msoundobj.internalsong.attachSound("internalsong");
moveoff = 0;
numsteps = 3;
startlevel = 1;
cursong = 0;
numsongs = 7;
musicon = true;
mousehide = false;
_root.qual = "medium";
_quality = _root.qual;
req = 3;
cx = 263;
cy = 275;
gwid = (nump = 8);
da = (Math.PI*2) / nump;
ghei = (rows = 9);
rad = 40;
oc = 0;
rowrads = new Array();
gamegrid = new Array();
matchg = new Array();
gridpos = new Array();
r360 = (Math.PI*2);
finals = new Array(2, 3, 4, 5, 6, 7, 8);
_root.createEmptyMovieClip("field", 1);
field.c = new Color(field);
field._x = cx;
field._y = cy;
field.dests = 100;
_root.attachMovie("theclaw", "theclaw", 104);
theclaw._y = -2000;
theclaw.tbeam.gotoAndStop(1);
surrounder.swapDepths(10000);
mainframe.swapDepths(101);
mainframe.nextball.tbeam.stop();
mainframe.nextball.vKatras.gotoAndStop(2);
stopcursong = function () {
msoundobj.internalsong.stop();
var _local1 = "song" add (Math.floor(cursong) + 1);
_level6[_local1].stop();
};
startcursong = function () {
if (musicon) {
if (_level6.getBytesLoaded() != _level6.getBytesTotal()) {
msoundobj.internalsong.start(0, 9999);
} else {
var _local1 = "song" add (Math.floor(cursong) + 1);
_level6[_local1].setVolume(70);
_level6[_local1].start(0, 9999);
}
}
};
title.swapDepths(102);
title.playButton.onRelease = function () {
title._visible = false;
score = 0;
level = 1;
displayScore();
startgame();
};
mainframe.quitButton.onRelease = function () {
showMenu();
quitGame();
};
paused = false;
mainframe.pausebutton.onPress = function () {
if (paused == false) {
if (mousehide) {
Mouse.show();
}
doTitle("PAUSED");
mainframe.pauseback._visible = true;
paused = true;
ball.onMouseUp = null;
ball.onEnterFrame = null;
} else {
if (mousehide) {
Mouse.hide();
}
clearTitle();
mainframe.pauseback._visible = false;
paused = false;
ball.onEnterFrame = moveball;
ball.onMouseUp = startfallmouse;
}
};
doTitle = function (message) {
mainframe.supertitle.text = message;
mainframe.supertitleb.text = message;
mainframe.boxback._visible = true;
};
cleartitle = function () {
mainframe.supertitle.text = "";
mainframe.supertitleb.text = "";
mainframe.boxback._visible = false;
};
timedtitle = function () {
cleartitle();
clearmatchg();
createBall();
clearInterval(titleTimer);
};
startgame = function () {
var _local1 = _root;
if (mousehide) {
Mouse.hide();
}
_level5.clear_screen();
mainframe.leveltext.text = level;
need = Math.floor(level * 5) + 15;
if (need > 60) {
need = 60;
}
_local1.MainFrame.gameover._visible = false;
theclaw._visible = true;
clearsince = 1;
playmove = 0;
inANova = false;
mainframe.needtext.text = need;
stopcursong();
startcursong();
cursong = cursong + 0.5;
cursong = cursong % numsongs;
_local1.soundobj.spacedrone.stop();
field._x = cx;
field._y = cy;
if (level < 4) {
field.dests = 170;
field.destr = 0;
field.onEnterFrame = zoomto;
field.zoomrate = 0.3;
field._xscale = (field._yscale = 1);
field._rotation = 40;
} else {
field.dests = 100;
field.destr = 0;
field.onEnterFrame = zoomto;
field.zoomrate = 0.3;
field._xscale = (field._yscale = 1);
field._rotation = 40;
}
if (level < 4) {
dropwarns = 4;
mainframe.dropwarning1._visible = false;
mainframe.dropwarning2._visible = false;
mainframe.dropwarning._visible = true;
} else if (level < 7) {
dropwarns = 3;
mainframe.dropwarning1._visible = false;
mainframe.dropwarning2._visible = true;
mainframe.dropwarning._visible = false;
} else {
dropwarns = 2;
mainframe.dropwarning1._visible = true;
mainframe.dropwarning2._visible = false;
mainframe.dropwarning._visible = false;
}
theclaw._y = -2000;
theclaw.tbeam.gotoAndStop(1);
moveoff = 0;
numsteps = 6;
_quality = _local1.qual;
req = 3;
cx = 263;
cy = 275;
gwid = (nump = 8);
da = (Math.PI*2) / nump;
ghei = (rows = 9);
rad = 40;
oc = 0;
maxdiffpieces = Math.ceil(level) + 3;
var dv = level;
_local1.devil.stop();
_local1.devil._xscale = need * 4;
_local1.devil._yscale = need * 4;
_local1.bgimg.gotoAndStop(level);
if (maxdiffpieces > 7) {
maxdiffpieces = 7;
}
maxrows = Math.ceil(level) + 2;
if (maxrows > 6) {
maxrows = 6;
}
i = 0;
while (i < (rows + 2)) {
rowrads[i] = rad;
gamegrid[i] = new Array();
matchg[i] = new Array();
gridpos[i] = new Array();
da = (Math.PI*2) / nump;
angoff = ((i % 2) * da) / 2;
j = 0;
while (j < nump) {
nm2 = "grid" + oc;
if (i <= 8) {
field.attachMovie("gridunit", nm2, oc);
field[nm2]._x = Math.cos((j * da) + angoff) * rad;
field[nm2]._y = Math.sin((j * da) + angoff) * rad;
field[nm2]._yscale = (field[nm2]._xscale = rad / 2.63999382654604);
field[nm2]._rotation = ((j * da) + angoff) * 57.2957795130823;
rs = (random(5) + 2) * 16;
if (i == 8) {
field[nm2].grid.gotoAndStop(2);
} else {
u = 0;
while (u < 8) {
if (j == u) {
field[nm2].grid.gotoAndStop(1);
field[nm2].grid._xscale = rs;
field[nm2].grid._yscale = rs;
}
u++;
}
}
}
nm = "ball" + oc;
field.attachMovie("ball", nm, oc + 900);
gridpos[i][j] = oc;
field[nm]._x = Math.cos((j * da) + angoff) * rad;
field[nm]._y = Math.sin((j * da) + angoff) * rad;
field[nm]._yscale = (field[nm]._xscale = rad / 2.63999382654604);
field[nm]._rotation = ((j * da) + angoff) * 57.2957795130823;
field[nm].arrow._visible = false;
field[nm].tbeam.stop();
field[nm].tbeam._visible = false;
if (i < maxrows) {
gamegrid[i][j] = random(maxdiffpieces) + 2;
} else {
gamegrid[i][j] = 1;
}
oc++;
j++;
}
rad = rad + (rad * 0.2);
i++;
}
rowrads[i] = rad;
nextp = random(maxdiffpieces) + 2;
mainframe.nextball.vKatras.gotoAndStop(nextp);
centx = 263;
centy = 275;
var da = ((Math.PI*2) / nump);
dropspeed = 0;
shimmy = 0;
doTitle(level);
_local1.createEmptyMovieClip("drawup", 344);
drawup.nyc = 0;
drawup.onEnterFrame = leveldrawup;
};
moveball = function () {
var _local1 = this;
_root.devil.play();
var _local2 = level / 1.7;
if (_local2 < 1) {
_local2 = 1;
}
if (_local2 > 6) {
_local2 = 6;
}
if (dropspeed == 0) {
shimmy = shimmy + (_local2 * 0.03);
} else {
shimmy = 0;
}
_local1.rowi = Math.floor(_local1.rad / 30);
_local1.actrow = rowrads[_local1.rowi];
_local1.offang = (_local1.rowi % 2) * (da / 2);
_local1.angi = (Math.floor((_local1.ang + _local1.offang) / da) + 32) % nump;
_local1.actang = _local1.angi * da;
var rowdiff = (rowrads[_local1.rowi + 1] - _local1.actrow);
var _local3 = ((_local1.rad / 30) - _local1.rowi) * rowdiff;
if (dropspeed == 0) {
scc = 1;
} else {
scc = field._xscale / 100;
}
_local1._x = centx + ((Math.cos(_local1.ang) * (_local1.actrow + _local3)) * scc);
_local1._y = centy + ((Math.sin(_local1.ang) * (_local1.actrow + _local3)) * scc);
_local1._yscale = (_local1._xscale = ((_local1.actrow + _local3) / 2.63999382654604) * scc);
_local1._rotation = (_local1.ang / Math.PI) * 180;
if (dropspeed == 0) {
theclaw._x = _local1._x;
theclaw._y = _local1._y;
theclaw._rotation = _local1._rotation;
var diffx = (_root._xmouse - cx);
var diffy = (_root._ymouse - cy);
var ta = Math.atan2(diffy, diffx);
if ((ta < -1) && (_local1.ang > 1)) {
_local1.ang = _local1.ang - r360;
} else if ((ta > 1) && (_local1.ang < -1)) {
_local1.ang = _local1.ang + r360;
}
diffa = ta - _local1.ang;
diffa = diffa * 0.5;
if (((diffa > 0.3) || (diffa < -0.3)) && (playmove == 0)) {
soundobj.movement.start(0, 1);
playmove = 40;
}
if (playmove > 0) {
playmove--;
}
if (diffa > 0.25) {
diffa = 0.25;
}
if (diffa < -0.25) {
diffa = -0.25;
}
_local1.ang = _local1.ang + diffa;
}
_local1.rad = _local1.rad - dropspeed;
mainframe.tbeam.powerbar.gotoAndStop(Math.floor(shimmy * 2.5));
if (shimmy > 10) {
soundobj.autodrop.start(0, 1);
startfall();
}
if (_local1.rad <= 1) {
ball.dostuff();
}
if ((gamegrid[_local1.rowi - 1][_local1.angi] > 1) && (dropspeed > 0)) {
ball.dostuff();
}
_root.devil._xscale = need * 4;
_root.devil._yscale = need * 4;
};
startfall = function () {
if (field.dests == 170) {
ball.rad = 180;
}
ball.gameball.arrow._visible = false;
theclaw.tbeam.gotoAndStop(2);
ball.onMouseUp = null;
shimmy = 0;
dropspeed = 14;
soundobj.drop.start(0, 1);
mainframe.pausebutton._visible = false;
};
startfallmouse = function () {
if (_root._xmouse < 515) {
if (field.dests == 170) {
this.rad = 180;
}
ball.gameball.arrow._visible = false;
theclaw.tbeam.gotoAndStop(2);
ball.onMouseUp = null;
shimmy = 0;
dropspeed = 14;
soundobj.drop.start(0, 1);
mainframe.pausebutton._visible = false;
}
};
releasemouse = function () {
var _local1 = this;
var _local2 = false;
_local1.rowi = Math.floor(_local1.rad / 30);
if (_local1.rowi < 0) {
_local1.rowi = 0;
}
_local1.actrow = rowrads[_local1.rowi];
_local1.offang = (_local1.rowi % 2) * (da / 2);
_local1.angi = (Math.round((_local1.ang - _local1.offang) / da) + 32) % nump;
mnum1 = (_local1.rowi * 8) + _local1.angi;
p1 = gamegrid[_local1.rowi][_local1.angi];
mnum2 = ((_local1.rowi - 1) * 8) + _local1.angi;
p2 = gamegrid[_local1.rowi - 1][_local1.angi];
mnum3 = (_local1.rowi * 8) + (((_local1.angi - 1) + 8) % 8);
p3 = gamegrid[_local1.rowi][((_local1.angi - 1) + 8) % 8];
if (_local2 == false) {
gamegrid[_local1.rowi][_local1.angi] = _local1.gameball.vKatras._currentframe;
var _local3 = gridpos[_local1.rowi][_local1.angi];
field["ball" + _local3].gotoAndStop(_local1.gameball.vKatras._currentframe);
}
ga = ball.ang;
moveoff = 0;
_local1._visible = false;
_local1.onEnterFrame = null;
falliterations = 0;
addingrow = false;
activerow = _local1.rowi;
activeang = _local1.angi;
_root.onEnterFrame = fallcall;
};
fallcall = function () {
var _local2 = true;
if (moveoff == 0) {
_local2 = fallboard();
}
if (_local2 == false) {
var _local1 = findActiveMatch();
if (_local1 == 0) {
this.onEnterFrame = null;
_root.gamedover = false;
gonova = false;
applyboard();
if ((((!addingrow) && (!gamedover)) && (!gonova)) && (!inANova)) {
createBall();
}
} else {
if (_local1 == 3) {
soundobj.clear2.start(0, 1);
} else if (_local1 == 4) {
soundobj.clear1.start(0, 1);
} else {
soundobj.clear5.start(0, 1);
}
need = need - _local1;
if (need < 0) {
need = 0;
}
mainframe.needtext.text = need;
falliterations++;
var _local3 = _local1 - 2;
score = score + (((_local3 * _local3) * 10) * falliterations);
displayScore();
}
}
moveoff++;
moveoff = moveoff % numsteps;
};
displayScore = function () {
mainFrame.scoretext.text = score;
};
createBall = function () {
dropspeed = 0;
_root.createEmptyMovieClip("ball", 105);
_root.ball.attachMovie("ball", "gameball", 1);
ball.gameball.vKatras.gotoAndStop(nextp);
ball.gameball.grid._visible = false;
ball.gameball.fademe._visible = false;
ball.gameball.fademe.stop();
ball.gameball.tbeam.stop();
oldp = nextp;
nextp = finals[random(finals.length - 1)];
if (nextp == oldp) {
nextp = finals[random(finals.length - 1)];
}
if (random(20) == 2) {
nextp = 9;
}
if (Key.isDown(38)) {
nextp = 9;
}
mainframe.nextball.vKatras.gotoAndStop(nextp);
ball.gameball.arrow._visible = false;
ball.rad = ((rows + 1) * 30) - 1;
ball.ang = ga;
ball._x = -100;
ball._y = -100;
ball.onEnterFrame = moveball;
ball.onMouseUp = startfallmouse;
ball.dostuff = releasemouse;
theclaw.tbeam.gotoAndStop(1);
mainframe.pausebutton._visible = true;
if (clearsince > dropwarns) {
addrowtobottom();
clearsince = 1;
}
};
moveto = function () {
var _local1 = this;
var _local3 = ((_local1.destx - _local1.startx) / numsteps) * moveoff;
var _local2 = ((_local1.desty - _local1.starty) / numsteps) * moveoff;
var ds = (((_local1.dests - _local1.starts) / numsteps) * moveoff);
_local1._x = _local1.startx + _local3;
_local1._y = _local1.starty + _local2;
_local1._yscale = (_local1._xscale = _local1.starts + ds);
if (moveoff == (numsteps - 1)) {
field["ball" + _local1.oc2].gotoAndStop(_local1._currentframe);
_local1.gotoAndStop(1);
if (raising != true) {
applyboard();
}
_local1._x = _local1.startx;
_local1._y = _local1.starty;
_local1._xscale = (_local1._yscale = _local1.starts);
_local1.onEnterFrame = null;
}
};
fallboard = function () {
var fell = false;
var rowtype;
var _local3 = 1;
while (_local3 < (rows + 2)) {
rowtype = _local3 % 2;
var _local2 = 0;
while (_local2 < nump) {
if (gamegrid[_local3][_local2] > 1) {
if (rowtype == 0) {
ioff = -1;
}
if (rowtype == 1) {
ioff = 1;
}
var _local1 = gridpos[_local3][_local2];
if (gamegrid[_local3 - 2][_local2] == 1) {
if ((activerow == _local3) && (activeang == _local2)) {
activerow = _local3 - 2;
}
var oc2 = gridpos[_local3 - 2][_local2];
field["ball" + oc2].makeme = gamegrid[_local3][_local2];
gamegrid[_local3 - 2][_local2] = gamegrid[_local3][_local2];
gamegrid[_local3][_local2] = 1;
field["ball" + _local1].oc2 = oc2;
field["ball" + _local1].oc = _local1;
field["ball" + _local1].startx = field["ball" + _local1]._x;
field["ball" + _local1].starty = field["ball" + _local1]._y;
field["ball" + _local1].destx = field["ball" + oc2]._x;
field["ball" + _local1].desty = field["ball" + oc2]._y;
field["ball" + _local1].starts = field["ball" + _local1]._xscale;
field["ball" + _local1].dests = field["ball" + oc2]._xscale;
field["ball" + _local1].onEnterFrame = moveto;
fell = true;
}
}
_local2++;
}
_local3++;
}
return(fell);
};
findActiveMatch = function () {
clearmatchg();
cn = 0;
i = activerow;
j = activeang;
if ((gamegrid[i][j] > 1) && (!matchg[i][j])) {
pcnt = 0;
findmatch(i, j);
if (pcnt < req) {
pcnt = 0;
unfindmatch(i, j);
} else {
cn = cn + pcnt;
}
}
applyMatches();
if (cn > 0) {
clearsince = 0;
} else {
clearsince++;
}
mainframe.dropwarning.gotoAndStop(clearsince);
mainframe.dropwarning1.gotoAndStop(clearsince);
mainframe.dropwarning2.gotoAndStop(clearsince);
if (clearsince == 3) {
wsoundobj.warning.stop();
wsoundobj.warningslow.start(0, 9999);
} else if (clearsince == 4) {
wsoundobj.warningslow.stop();
wsoundobj.warning.start(0, 9999);
} else {
wsoundobj.warningslow.stop();
wsoundobj.warning.stop();
}
return(cn);
};
findAllMatches = function () {
clearmatchg();
cn = 0;
var _local2 = 0;
while (_local2 < (rows + 2)) {
var _local1 = 0;
while (_local1 < nump) {
if ((gamegrid[_local2][_local1] > 1) && (!matchg[_local2][_local1])) {
pcnt = 0;
findmatch(_local2, _local1);
if (pcnt < req) {
pcnt = 0;
unfindmatch(_local2, _local1);
} else {
cn = cn + pcnt;
}
}
_local1++;
}
_local2++;
}
applyMatches();
if (cn > 0) {
clearsince = 0;
} else {
clearsince++;
}
mainframe.dropwarning.gotoAndStop(clearsince);
mainframe.dropwarning1.gotoAndStop(clearsince);
mainframe.dropwarning2.gotoAndStop(clearsince);
return(cn);
};
clearmatchg = function () {
i = 0;
while (i < (ghei + 2)) {
j = 0;
while (j < gwid) {
matchg[i][j] = false;
j++;
}
i++;
}
};
findmatch = function (i, j) {
var _local1 = i;
var _local2 = j;
var num = gamegrid[_local1][_local2];
var rowtype = (_local1 % 2);
matchg[_local1][_local2] = true;
pcnt++;
var _local3;
if (rowtype == 0) {
_local3 = -1;
}
if (rowtype == 1) {
_local3 = 1;
}
if ((gamegrid[_local1 + 2][_local2] == num) && (!matchg[_local1 + 2][_local2])) {
findmatch(_local1 + 2, _local2);
}
if ((_local1 > 1) && ((gamegrid[_local1 - 2][_local2] == num) && (!matchg[_local1 - 2][_local2]))) {
findmatch(_local1 - 2, _local2);
}
if ((gamegrid[_local1 + 1][_local2] == num) && (!matchg[_local1 + 1][_local2])) {
findmatch(_local1 + 1, _local2);
}
if ((_local1 > 0) && ((gamegrid[_local1 - 1][_local2] == num) && (!matchg[_local1 - 1][_local2]))) {
findmatch(_local1 - 1, _local2);
}
if ((gamegrid[_local1 + 1][((_local2 + _local3) + nump) % nump] == num) && (!matchg[_local1 + 1][((_local2 + _local3) + nump) % nump])) {
findmatch(_local1 + 1, ((_local2 + _local3) + nump) % nump);
}
if ((_local1 > 0) && ((gamegrid[_local1 - 1][((_local2 + _local3) + nump) % nump] == num) && (!matchg[_local1 - 1][((_local2 + _local3) + nump) % nump]))) {
findmatch(_local1 - 1, ((_local2 + _local3) + nump) % nump);
}
};
unfindmatch = function (i, j) {
var _local1 = i;
var _local2 = j;
var num = gamegrid[_local1][_local2];
matchg[_local1][_local2] = false;
pcnt--;
var _local3;
var rowtype = (_local1 % 2);
if (rowtype == 0) {
_local3 = -1;
}
if (rowtype == 1) {
_local3 = 1;
}
if ((gamegrid[_local1 + 2][_local2] == num) && (matchg[_local1 + 2][_local2])) {
unfindmatch(_local1 + 2, _local2);
}
if ((_local1 > 1) && ((gamegrid[_local1 - 2][_local2] == num) && (matchg[_local1 - 2][_local2]))) {
unfindmatch(_local1 - 2, _local2);
}
if ((gamegrid[_local1 + 1][_local2] == num) && (matchg[_local1 + 1][_local2])) {
unfindmatch(_local1 + 1, _local2);
}
if ((_local1 > 0) && ((gamegrid[_local1 - 1][_local2] == num) && (matchg[_local1 - 1][_local2]))) {
unfindmatch(_local1 - 1, _local2);
}
if ((gamegrid[_local1 + 1][((_local2 + _local3) + nump) % nump] == num) && (matchg[_local1 + 1][((_local2 + _local3) + nump) % nump])) {
unfindmatch(_local1 + 1, ((_local2 + _local3) + nump) % nump);
}
if ((_local1 > 0) && ((gamegrid[_local1 - 1][((_local2 + _local3) + nump) % nump] == num) && (matchg[_local1 - 1][((_local2 + _local3) + nump) % nump]))) {
unfindmatch(_local1 - 1, ((_local2 + _local3) + nump) % nump);
}
};
applyMatches = function () {
var nyc = 0;
var foundabomb = false;
var _local2 = 0;
while (_local2 < (ghei + 2)) {
var _local1 = 0;
while (_local1 < gwid) {
nm = "ball" + nyc;
if (matchg[_local2][_local1]) {
gamegrid[_local2][_local1] = 1;
field[nm].gotoAndStop(1);
field[nm].fademe.play();
}
if ((field[nm]._currentframe == 9) && (_local2 > 1)) {
gamegrid[_local2][_local1] = 1;
field[nm].gotoAndStop(1);
field[nm].fademe.play();
foundabomb = true;
cn = cn + 5;
var _local3;
var rowtype = (_local2 % 2);
if (rowtype == 0) {
_local3 = -1;
}
if (rowtype == 1) {
_local3 = 1;
}
matchg[_local2 + 2][_local1] = 1;
matchg[_local2 - 2][_local1] = 1;
matchg[_local2 + 1][_local1] = 1;
matchg[_local2 - 1][_local1] = 1;
matchg[_local2 + 1][((_local1 + _local3) + nump) % nump] = 1;
matchg[_local2 - 1][((_local1 + _local3) + nump) % nump] = 1;
}
nyc++;
_local1++;
}
_local2++;
}
if (foundabomb) {
applyMatches();
}
};
addrowtobottom = function () {
var _local3 = ghei - 1;
while (_local3 > 2) {
var _local1 = 0;
while (_local1 < gwid) {
gamegrid[_local3][_local1] = gamegrid[_local3 - 2][_local1];
gamegrid[_local3 - 1][_local1] = gamegrid[_local3 - 3][_local1];
_local1++;
}
_local3--;
}
var _local1 = 0;
while (_local1 < gwid) {
gamegrid[0][_local1] = random(maxdiffpieces) + 2;
gamegrid[1][_local1] = random(maxdiffpieces) + 2;
_local1++;
}
var _local2 = 0;
_local3 = 0;
while (_local3 < 2) {
_local1 = 0;
while (_local1 < gwid) {
nm = "ball" + _local2;
field[nm].doanim = true;
_local2++;
_local1++;
}
_local3++;
}
raising = true;
mainframe.dropwarning.gotoAndStop(1);
mainframe.dropwarning1.gotoAndStop(1);
mainframe.dropwarning2.gotoAndStop(1);
wsoundobj.warning.stop();
wsoundobj.warningslow.stop();
soundobj.addrow.start(0, 1);
applyboard();
};
raisecall = function () {
var _local1 = true;
if (moveoff == 0) {
_local1 = fallboard();
}
if (_local1 == false) {
this.onEnterFrame = null;
raising = false;
applyboard();
}
moveoff++;
moveoff = moveoff % numsteps;
};
addrowtotop = function () {
var _local1 = 0;
while (_local1 < gwid) {
if (gamegrid[7][_local1] == 1) {
gamegrid[7][_local1] = random(maxdiffpieces) + 2;
}
_local1++;
}
addingrow = true;
applyboard();
_root.onEnterFrame = fallcall;
};
applyboard = function () {
var _local3 = 0;
highest = 0;
var hasSomePieces = false;
valids = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
var _local1 = 0;
while (_local1 < (ghei + 2)) {
var _local2 = 0;
while (_local2 < gwid) {
nm = "ball" + _local3;
field[nm].gotoAndStop(gamegrid[_local1][_local2]);
if (field[nm].doanim) {
field[nm].fademe.play();
field[nm].doanim = false;
}
valids[gamegrid[_local1][_local2]]++;
if (gamegrid[_local1][_local2] > 1) {
hasSomePieces = true;
highest = _local1;
}
if (field[nm]._currentframe == 9) {
if ((_local1 == 1) || (_local1 == 0)) {
gamegrid[_local1][_local2] = 1;
field[nm].destx = 0;
field[nm].desty = 0;
field[nm].dests = 10;
field[nm].startx = field[nm]._x;
field[nm].starty = field[nm]._y;
field[nm].starts = field[nm]._xscale;
field[nm].zoomrate = 0.025;
field[nm].nova = true;
gonova = true;
clearsince = 0;
mainframe.dropwarning.gotoAndStop(1);
mainframe.dropwarning1.gotoAndStop(1);
mainframe.dropwarning2.gotoAndStop(1);
wsoundobj.warningslow.stop();
wsoundobj.warning.stop();
novaanim.play();
field[nm].onEnterFrame = zoommoveto;
inANova = true;
shimmy = 0;
mainframe.tbeam.powerbar.gotoAndStop(Math.floor(shimmy * 2.5));
}
}
_local3++;
_local2++;
}
_local1++;
}
if ((!hasSomePieces) || (need == 0)) {
addingrow = true;
theclaw._x = 900;
theclaw._y = 900;
ball.removeMovieClip();
if (mousehide) {
Mouse.show();
}
summarizeGame();
return(false);
}
if (highest >= 9) {
_root.MainFrame.gameover._visible = true;
addingrow = true;
theclaw._x = 900;
theclaw._y = 900;
stopcursong();
_root.soundobj.spacedrone.start(0, 9991);
soundobj.gameover.start(0, 1);
wsoundobj.warningslow.stop();
wsoundobj.warning.stop();
ball.onEnterFrame = null;
ball.removeMovieClip();
_root.gamedover = true;
return(false);
}
finals = new Array();
stg = "";
_local1 = 2;
while (_local1 < 9) {
if (valids[_local1] > 0) {
stg = stg + (_local1 + ",");
}
_local1++;
}
finals = stg.split(",");
if ((oldhighest != highest) && (!applyingpiece)) {
if (highest < 5) {
field.dests = 170;
field.zoomrate = 0.8;
field.onEnterFrame = zoomto;
} else {
field.dests = 100;
field.zoomrate = 0.8;
field.onEnterFrame = zoomto;
}
}
oldhighest = highest;
if (foundabomb) {
applyMatches();
}
return(undefined);
};
zoomto = function () {
var _local1 = this;
var _local2 = (_local1.dests - _local1._xscale) * _local1.zoomrate;
_local1._xscale = _local1._xscale + _local2;
_local1._yscale = _local1._xscale;
var _local3 = (_local1.destr - _local1._rotation) * _local1.zoomrate;
_local1._rotation = _local1._rotation + _local3;
if (Math.abs(_local2) < 0.5) {
_local1._xscale = (_local1._yscale = _local1.dests);
_local1._rotation = _local1.destr;
_local1.onEnterFrame = null;
}
};
zoommoveto = function () {
var _local1 = this;
var dsc = ((_local1.dests - _local1._xscale) * _local1.zoomrate);
_local1._xscale = _local1._xscale + dsc;
_local1._yscale = _local1._xscale;
var dsr = ((_local1.destr - _local1._rotation) * _local1.zoomrate);
_local1._rotation = _local1._rotation + dsr;
var _local3 = (_local1.destx - _local1._x) * _local1.zoomrate;
_local1._x = _local1._x + _local3;
var _local2 = (_local1.desty - _local1._y) * _local1.zoomrate;
_local1._y = _local1._y + _local2;
_local1.gotoAndStop(9);
if ((Math.abs(_local3) < 0.01) && (Math.abs(_local2) < 0.01)) {
if (_local1.nova) {
_local1.nova = false;
_local1.gotoAndStop(1);
_local1.fademe.play();
cn = cn + 8;
matchg[0][0] = 1;
matchg[0][1] = 1;
matchg[0][2] = 1;
matchg[0][3] = 1;
matchg[0][4] = 1;
matchg[0][5] = 1;
matchg[0][6] = 1;
matchg[0][7] = 1;
matchg[1][0] = 1;
matchg[1][1] = 1;
matchg[1][2] = 1;
matchg[1][3] = 1;
matchg[1][4] = 1;
matchg[1][5] = 1;
matchg[1][6] = 1;
matchg[1][7] = 1;
_local1._x = _local1.startx;
_local1._y = _local1.starty;
_local1._xscale = _local1.starts;
_local1._yscale = _local1.starts;
applyMatches();
_root.onEnterFrame = fallcall;
need = need - 16;
if (need < 0) {
need = 0;
}
mainframe.needtext.text = need;
score = score + 500;
displayScore();
clearsince = 0;
mainframe.dropwarning.gotoAndStop(1);
mainframe.dropwarning1.gotoAndStop(1);
mainframe.dropwarning2.gotoAndStop(1);
inANova = false;
_local1.onEnterFrame = null;
} else {
_local1._xscale = (_local1._yscale = _local1.dests);
_local1._x = _local1.destx;
_local1._y = _local1.desty;
_local1._rotation = _local1.destr;
_local1.onEnterFrame = null;
}
}
};
mainframe.continuebutton.onRelease = function () {
handleprogresslevel();
};
title.hsbutton.onRelease = function () {
_level5._x = 100;
_level5._y = 100;
_level5.doGetScores(3);
};
stop();
Instance of Symbol 269 MovieClip "loader" in Frame 1
onClipEvent (load) {
l_targ = "_root";
}
Symbol 35 Button
on (release) {
_root.restartSuperdudesGame();
_parent.clearScreen();
}
Symbol 38 Button
on (release) {
getURL (_parent.urlLink + _parent.game_id, "_blank");
}
Symbol 64 MovieClip Frame 25
gotoAndPlay ("superdudes");
Symbol 96 MovieClip Frame 1
stop();
Symbol 103 MovieClip Frame 1
stop();
Symbol 105 MovieClip [ball] Frame 1
stop();
Symbol 107 MovieClip Frame 1
stop();
Symbol 114 Button
on (release) {
_level0.hsMod.showSubmit(_root.score, _root.gameid);
_root.handlegameover();
}
Symbol 157 MovieClip Frame 1
stop();
Symbol 158 MovieClip Frame 1
stop();
Symbol 182 MovieClip Frame 1
stop();
Symbol 186 MovieClip Frame 1
stop();
Symbol 187 MovieClip Frame 1
invisibut.tabEnabled = false;
quitButton.tabEnabled = false;
invisibut.onRollOver = function () {
var _local1 = _root;
if (((!_local1.title._visible) && (_local1.need > 0)) && (_local1.mousehide)) {
Mouse.hide();
}
};
invisibut.onRollOut = function () {
var _local1 = _root;
if (((!_local1.title._visible) && (_local1.need > 0)) && (_local1.mousehide)) {
Mouse.show();
}
};
Symbol 193 MovieClip Frame 1
stop();
Symbol 207 Button
on (release) {
_level1.hsMod.showScores(gameid);
}
Symbol 208 MovieClip Frame 50
playButton.tabEnabled = false;
hsButton.tabEnabled = false;
inst.tabEnabled = false;
options.tabEnabled = false;
_root.soundobj.descend.start(0, 1);
_root.soundobj.spacedrone.start(0, 9991);
playButton.onRelease = function () {
var _local1 = _root;
_visible = false;
_local1.score = 0;
_local1.level = _local1.startlevel;
_local1.displayScore();
_local1.startgame();
swirly.stopme();
_local1.soundobj.beep1.start(0, 1);
back._visible = false;
};
hsbutton.onRelease = function () {
var _local1 = _root;
_level5._x = 100;
_level5._y = 100;
_level5.doGetScores(3);
_local1.soundobj.beep1.start(0, 1);
_local1.instructions.gotoAndStop(3);
_local1.instructions._visible = true;
};
inst.onRelease = function () {
var _local1 = _root;
_local1.instructions.gotoAndStop(1);
_local1.instructions._visible = true;
_local1.soundobj.beep1.start(0, 1);
};
options.onRelease = function () {
var _local1 = _root;
_local1.instructions.gotoAndStop(2);
_local1.instructions._visible = true;
_local1.soundobj.beep1.start(0, 1);
};
playbutton.onPress = function () {
_root.soundobj.drop.start(0, 1);
};
hsbutton.onPress = function () {
_root.soundobj.drop.start(0, 1);
};
inst.onPress = function () {
_root.soundobj.drop.start(0, 1);
};
options.onPress = function () {
_root.soundobj.drop.start(0, 1);
};
stop();
Symbol 241 MovieClip Frame 1
stop();
nxt_bt.onRelease = function () {
gotoAndPlay (2);
};
Symbol 241 MovieClip Frame 2
stop();
cont.onRelease = function () {
_root.instructions._visible = false;
gotoAndStop (1);
};
Symbol 248 MovieClip Frame 1
stop();
claw.stop();
dropwarning.gotoAndStop(3);
invisibut.tabEnabled = false;
Symbol 248 MovieClip Frame 2
cont.tabEnabled = false;
high.tabEnabled = false;
med.tabEnabled = false;
low.tabEnabled = false;
soundon.tabEnabled = false;
soundoff.tabEnabled = false;
muson.tabEnabled = false;
musoff.tabEnabled = false;
high.onRelease = function () {
var _local1 = _root;
_local1.qual = "HIGH";
_local1._quality = _local1.qual;
qualind._y = this._y + 8;
};
med.onRelease = function () {
var _local1 = _root;
_local1.qual = "MEDIUM";
_local1._quality = _local1.qual;
qualind._y = this._y + 8;
};
low.onRelease = function () {
var _local1 = _root;
_local1.qual = "LOW";
_local1._quality = _local1.qual;
qualind._y = this._y + 8;
};
soundon.onRelease = function () {
soundind._y = this._y + 8;
_root.soundobj.drop.setVolume(100);
_root.wsoundobj.warning.setVolume(0);
};
soundoff.onRelease = function () {
soundind._y = this._y + 8;
_root.soundobj.drop.setVolume(0);
_root.wsoundobj.warning.setVolume(0);
};
muson.onRelease = function () {
musind._y = this._y + 8;
_root.musicon = true;
};
musoff.onRelease = function () {
musind._y = this._y + 8;
_root.musicon = false;
};
Symbol 248 MovieClip Frame 3
cont.tabEnabled = false;
cont.onRelease = function () {
_visible = false;
};
Symbol 250 MovieClip Frame 1
this.onPress = function () {
};
this.useHandCursor = false;
Symbol 254 Button
on (release) {
getURL ("http://www.saydesign.com", "_blank");
}
Symbol 255 Button
on (release) {
getURL ("http://www.sayarcade.com", "_blank");
}
Symbol 260 MovieClip Frame 148
stop();
_parent.play();
Symbol 269 MovieClip Frame 1
_quality = "LOW";
_quality = "HIGH";
Symbol 269 MovieClip Frame 77
onMouseDown = function () {
gotoAndPlay ("logo2");
delete onMouseDown;
};
Symbol 269 MovieClip Frame 140
loadedBytes = _root.getBytesLoaded();
totalBytes = _root.getBytesTotal();
if (loadedBytes < totalBytes) {
perc = int((loadedBytes / totalBytes) * 100);
loaderBar._xscale = perc;
gotoAndPlay ("next");
perctext = perc + "% LOADED";
} else {
gotoAndPlay ("close");
}
Symbol 269 MovieClip Frame 145
gotoAndPlay ("loop");
Symbol 269 MovieClip Frame 176
onMouseDown = function () {
gotoAndPlay ("end");
delete onMouseDown;
};
Symbol 269 MovieClip Frame 289
_visible = false;
stop();