Frame 1
stop();
Frame 2
function newlevel() {
barray = [];
cont = _root.createEmptyMovieClip("cont", 100);
i = 0;
while (i < eval ("level" + l).length) {
c = cont.attachMovie("b", "b" + i, cont.getNextHighestDepth());
c.tx = eval ("level" + l)[i][0];
c.ty = eval ("level" + l)[i][1];
var rd = random(360);
var rr = (rd * (Math.PI/180));
c._x = (Math.cos(rr) * 300) + 200;
c._y = (Math.sin(rr) * 300) + 200;
c.s = eval ("level" + l)[i][2];
c.f = 1;
c.r = 10;
c.p = false;
c.fg = 0;
c.cnc = false;
c.gotoAndStop(c.f);
c._alpha = 20;
barray.push(c);
i++;
}
r = _root.attachMovie("res", "res", 1200);
r._x = 45;
r._y = 310;
r.onRollOver = respres;
r.onRollOut = resles;
r.onPress = resanimgo;
n = _root.attachMovie("next", "next", 1300);
n._x = 10;
n._y = 350;
n.levtext.text = l + " / 18";
fsm = animnext;
}
function respres() {
this._xscale = this._xscale - 10;
this._yscale = this._yscale - 10;
}
function resles() {
this._xscale = this._xscale + 10;
this._yscale = this._yscale + 10;
}
function addlines() {
if ((this.p == false) && (this.cnc == false)) {
if (this.f < 4) {
li = cont.attachMovie("lines", "lines", _root.getNextHighestDepth());
li._x = this._x;
li._y = this._y;
li.gotoAndStop(this.f);
}
}
}
function remlines() {
li.removeMovieClip();
}
function grow() {
lastp = this;
if (this.p == false) {
var _local8 = false;
var _local9 = false;
p = 0;
while (p < barray.length) {
if (!(this === barray[p])) {
if (((((((barray[p].hitTest((this._x - this.r) - 1, this._y, true) || (barray[p].hitTest((this._x + this.r) + 1, this._y, true))) || (barray[p].hitTest(this._x, (this._y - this.r) - 1, true))) || (barray[p].hitTest(this._x, (this._y + this.r) + 1, true))) || (this.hitTest((barray[p]._x - barray[p].r) - 1, barray[p]._y, true))) || (this.hitTest((barray[p]._x + barray[p].r) + 1, barray[p]._y, true))) || (this.hitTest(barray[p]._x, (barray[p]._y - barray[p].r) - 1, true))) || (this.hitTest(barray[p]._x, (barray[p]._y + barray[p].r) + 1, true))) {
_local8 = true;
}
}
p++;
}
p = 0;
while (p < barray.length) {
if (_local8 == false) {
var _local3 = barray[p]._x - this._x;
var _local2 = barray[p]._y - this._y;
var _local7 = Math.sqrt((_local3 * _local3) + (_local2 * _local2));
if (((_local7 == ((this.r + barray[p].r) + 10)) && (this.fg == 0)) && (!(this.f === 4))) {
_local9 = true;
barray[p].fg = 1;
var _local6 = Math.atan2(_local2, _local3);
var _local5 = (Math.cos(_local6) * (this.r + 10)) + this._x;
var _local4 = (Math.sin(_local6) * (this.r + 10)) + this._y;
if ((_local5 - this._x) == 0) {
con = cont.attachMovie("connect", "connect", cont.getNextHighestDepth());
con._x = _local5;
con._y = _local4;
con.gotoAndStop(2);
this.cnc = true;
barray[p].cnc = true;
}
if ((_local4 - this._y) == 0) {
con = cont.attachMovie("connect", "connect", cont.getNextHighestDepth());
con._x = _local5;
con._y = _local4;
con.gotoAndStop(1);
this.cnc = true;
barray[p].cnc = true;
}
}
}
p++;
}
if (_local8 == false) {
this.f = this.f + 1;
this.r = this.r + 10;
if (this.f == 4) {
this.fg = 1;
}
if (this.r == 50) {
this.r = 40;
this.f = 4;
this.nos = 1;
}
if (!(this.nos === 1)) {
p = 0;
while (p < barray.length) {
barray[p].p = false;
if (barray[p].fg == 0) {
barray[p]._alpha = 20;
} else {
barray[p]._alpha = 100;
}
p++;
}
this.gotoAndStop(this.f);
this.p = true;
this._alpha = 100;
clicksound.start(0, 1);
}
checksol();
}
}
if (_local9 == true) {
this.fg = 1;
}
remlines();
}
function checksol() {
var _local3 = 0;
var _local2 = 0;
i = 0;
while (i < barray.length) {
if (barray[i].f == barray[i].s) {
_local3++;
}
if (barray[i]._alpha == 100) {
_local2++;
}
i++;
}
if (_local3 == barray.length) {
mask = _root.attachMovie("mask", "mask", 300);
mask.onEnterFrame = maskmove;
var _local4 = new flash.display.BitmapData(Stage.width, Stage.height, true, 0);
_local4.draw(cont);
bdcont.attachBitmap(_local4, 200);
var _local6 = [1, 0, 0, 0, 100, 0, 1, 0, 0, 100, 0, 0, 1, 0, 100, 0, 0, 0, 1, 0];
var _local5 = new flash.filters.ColorMatrixFilter(_local6);
bdcont.filters = [_local5];
bdcont._alpha = 100;
bdcont.setMask(mask);
solvesound.start(0, 1);
r.onPress = noth;
gc = 0;
fsm = glower;
} else if (_local2 == barray.length) {
}
}
function nextlevel() {
newlevel();
}
function animnext() {
i = 0;
while (i < barray.length) {
var _local2 = barray[i].tx - barray[i]._x;
var _local1 = barray[i].ty - barray[i]._y;
var _local3 = Math.sqrt((_local2 * _local2) + (_local1 * _local1));
barray[i]._x = barray[i]._x + (_local2 / 5);
barray[i]._y = barray[i]._y + (_local1 / 5);
if (_local3 < 1) {
barray[i]._x = barray[i].tx;
barray[i]._y = barray[i].ty;
barray[i].onPress = grow;
barray[i].onRollOver = addlines;
barray[i].onRollOut = remlines;
}
i++;
}
}
function origin() {
var _local1 = cont.getBounds(cont._parent);
return({x:(_local1.xMin + _local1.xMax) / 2, y:(_local1.yMin + _local1.yMax) / 2});
}
function endanim() {
cont._alpha = cont._alpha - (cont._alpha / 10);
if (cont._alpha < 1) {
nextlevel();
}
}
function resanim() {
cont._xscale = cont._xscale - 5;
cont._yscale = cont._yscale - 5;
cont._alpha = cont._alpha - 5;
var _local1 = origin();
cont._x = cont._x + (cont.rotation_origin.x - _local1.x);
cont._y = cont._y + (cont.rotation_origin.y - _local1.y);
if (cont._xscale < 1) {
newlevel();
}
}
function resanimgo() {
i = 0;
while (i < barray.length) {
barray[i].onRollOver = noth;
i++;
}
cont.rotation_origin = origin();
fsm = resanim;
}
function endanimgo() {
}
function maskmove() {
this._x = this._x + 15;
if (this._x > 600) {
delete this.onEnterFrame;
mask.removeMovieClip();
dripc = 0;
gameo();
}
}
function glower() {
gc++;
var _local2 = new flash.filters.GlowFilter(0, 100, 1.5, 1.5, gc, 10, false, false);
var _local1 = new Array();
_local1.push(_local2);
cont.filters = _local1;
if (gc == 20) {
fsm = noth;
}
}
function gameo() {
point = new Array();
i = 0;
while (i < 12) {
point[i] = _root.attachMovie("point", "p" + i, _root.getNextHighestDepth() + i);
point[i]._x = (i * 40) - 20;
point[i]._y = random(100) - 100;
point[i].vy = (Math.random() * 6) + 6;
point[i].end = false;
i++;
}
_root.createEmptyMovieClip("line", _root.getNextHighestDepth());
fsm = drip;
}
function drip() {
with (line) {
clear();
}
i = 0;
while (i < point.length) {
point[i]._y = point[i]._y + point[i].vy;
if ((point[i].end == false) && (point[i]._y > 400)) {
dripc++;
point[i].end = true;
point[i].vy = 0;
if (dripc == 12) {
if (l < 18) {
l++;
n.levtext.text = l + " / 18";
cont.removeMovieClip();
fsm = drip2;
} else {
fin = _root.attachMovie("fin", "fin", _root.getNextHighestDepth());
fin._y = 400;
fsm = ender;
}
}
}
i++;
}
i = 0;
while (i < 10) {
var pdx1 = ((point[i]._x + point[i + 1]._x) / 2);
var pdy1 = ((point[i]._y + point[i + 1]._y) / 2);
var pdx2 = ((point[i + 1]._x + point[i + 2]._x) / 2);
var pdy2 = ((point[i + 1]._y + point[i + 2]._y) / 2);
var ax = ((pdx1 + pdx2) / 2);
var ay = ((pdy1 + pdy2) / 2);
ax = ax + (point[i + 1]._x - ax);
ay = ay + (point[i + 1]._y - ay);
with (line) {
beginFill(10027008, 100);
moveTo(pdx1, 0);
lineTo(pdx1, pdy1);
curveTo(ax, ay, pdx2, pdy2);
lineTo(pdx2, 0);
}
i = i + 1;
}
}
function drip2() {
var _local2 = 430 - line._y;
line._y = line._y + (_local2 / 5);
if (_local2 < 1) {
_root.line.removeMovieClip();
fsm = noth;
nextlevel();
}
}
function ender() {
var _local1 = fin._y - 100;
fin._y = fin._y - (_local1 / 20);
}
stop();
var bd = (new flash.display.BitmapData(Stage.width, Stage.height, true, 0));
bdcont = _root.createEmptyMovieClip("cont", 200);
clicksound = new Sound(this);
clicksound.attachSound("sound1");
solvesound = new Sound(this);
solvesound.attachSound("sound2");
_root.createEmptyMovieClip("grid", 1);
var y = 0;
var dripc = 0;
x = 0;
while (x <= 400) {
with (grid) {
lineStyle(1, 14082814, 100);
moveTo(x, 0);
lineTo(0, y);
moveTo(400, x);
lineTo(y, 400);
moveTo(x, 0);
lineTo(400, 400 - y);
moveTo(0, y);
lineTo(400 - x, 400);
}
y = y + 10;
x = x + 10;
}
grid.cacheAsBitmap = true;
MovieClip.prototype.useHandCursor = false;
fsm = noth;
level1 = [[170, 160, 3], [220, 160, 2], [250, 160, 1]];
level2 = [[220, 90, 2], [220, 120, 1], [220, 150, 2], [220, 200, 3], [160, 150, 4]];
level3 = [[210, 220, 2], [210, 250, 1], [170, 220, 2], [120, 220, 3], [210, 160, 4], [120, 160, 3], [270, 220, 4], [210, 90, 3]];
level4 = [[200, 120, 4], [200, 60, 2], [140, 120, 2], [110, 120, 1], [250, 120, 1], [290, 120, 3], [200, 190, 3], [240, 190, 1], [150, 190, 2], [100, 190, 3], [100, 240, 2], [130, 240, 1], [200, 240, 2]];
level5 = [[110, 150, 1], [140, 150, 2], [140, 200, 3], [190, 200, 2], [220, 200, 1], [250, 200, 2], [250, 150, 3], [200, 150, 2], [200, 90, 4], [310, 150, 3]];
level6 = [[90, 190, 2], [90, 140, 3], [140, 140, 2], [180, 140, 2], [140, 170, 1], [180, 110, 1], [180, 60, 4], [250, 60, 3], [250, 120, 3], [290, 120, 1], [320, 120, 2], [250, 190, 4], [310, 190, 2], [180, 190, 3], [180, 240, 2], [150, 240, 1], [110, 240, 3]];
level7 = [[70, 210, 4], [130, 210, 2], [160, 210, 1], [130, 150, 4], [180, 150, 1], [210, 150, 2], [210, 90, 4], [210, 200, 3], [260, 200, 2], [300, 200, 2], [300, 150, 3], [350, 150, 2], [350, 190, 2]];
level8 = [[120, 120, 1], [120, 90, 2], [170, 90, 3], [170, 130, 1], [170, 170, 3], [130, 170, 1], [100, 170, 2], [220, 170, 2], [250, 170, 1], [220, 200, 1], [220, 230, 2], [220, 140, 1], [220, 110, 2], [220, 70, 2], [270, 110, 3], [310, 110, 1]];
level9 = [[270, 100, 2], [270, 140, 2], [210, 140, 4], [210, 70, 3], [170, 70, 1], [140, 140, 3], [210, 210, 3]];
level10 = [[200, 150, 4], [200, 230, 4], [200, 70, 4], [270, 150, 3], [270, 100, 2], [270, 70, 1], [130, 150, 3], [130, 110, 1], [130, 80, 2], [270, 200, 2], [130, 230, 3]];
level11 = [[100, 150, 4], [100, 220, 3], [180, 150, 4], [240, 150, 2], [300, 150, 4], [300, 100, 1], [180, 80, 3], [100, 80, 3], [140, 80, 1], [240, 210, 4], [180, 210, 2]];
level12 = [[200, 140, 4], [150, 140, 1], [200, 220, 4], [200, 70, 3], [160, 70, 1], [250, 220, 1]];
level13 = [[125, 95, 4], [125, 175, 4], [205, 175, 4], [55, 175, 3], [195, 95, 3], [205, 235, 2], [265, 235, 4], [265, 185, 1], [265, 95, 4], [125, 235, 2], [295, 185, 2], [345, 185, 3], [195, 45, 2], [55, 95, 3], [165, 45, 1], [55, 135, 1]];
level14 = [[105, 115, 3], [155, 115, 2], [105, 185, 4], [65, 115, 1], [155, 65, 3], [225, 65, 4], [225, 115, 1], [155, 155, 2], [225, 165, 4], [305, 65, 4], [305, 115, 1], [225, 235, 3], [305, 165, 4], [155, 185, 1], [155, 235, 4], [335, 115, 2]];
level15 = [[165, 235, 1], [215, 235, 4], [215, 165, 3], [165, 165, 2], [105, 165, 4], [105, 245, 4], [285, 165, 4], [285, 115, 1], [215, 115, 2], [215, 55, 4], [295, 55, 4]];
level16 = [[195, 165, 4], [195, 115, 1], [225, 115, 2], [275, 115, 3], [245, 165, 1], [245, 195, 2], [245, 245, 3], [145, 165, 1], [145, 135, 2], [145, 205, 3], [145, 245, 1], [305, 195, 4], [185, 245, 3], [195, 65, 4], [145, 65, 1], [95, 165, 4]];
level17 = [[100, 170, 3], [140, 170, 1], [180, 170, 3], [140, 140, 2], [140, 220, 4], [140, 80, 4], [210, 80, 3], [270, 80, 3], [270, 130, 2], [270, 170, 2], [270, 230, 4], [70, 220, 3], [100, 130, 1], [210, 40, 1], [210, 130, 2], [240, 130, 1], [220, 230, 1], [320, 170, 3], [320, 80, 2], [270, 40, 1]];
level18 = [[215, 135, 2], [215, 195, 4], [265, 135, 3], [265, 65, 4], [215, 65, 1], [155, 135, 4], [325, 135, 3], [155, 55, 4], [85, 135, 3], [85, 205, 4], [85, 265, 2]];
var barray = new Array();
var l = 1;
var lastp = new Object();
t = _root.attachMovie("title", "title", 1000);
t._x = 200;
t._y = 200;
var gc = 0;
_root.onEnterFrame = function () {
fsm();
};
Symbol 10 Button
on (release) {
getURL ("http://www.arcadetown.com/index.asp?gameid=planned", "_blank");
}
Symbol 12 Button
on (release) {
getURL ("http://www.arcadetown.com/index.asp?gameid=planned", "_blank");
}
Symbol 14 Button
on (release) {
getURL ("http://www.arcadetown.com/free_content/index.asp", "_blank");
}
Symbol 24 MovieClip [title] Frame 1
stop();
Instance of Symbol 22 MovieClip [st] in Symbol 24 MovieClip [title] Frame 1
on (press) {
_root.title.gotoAndPlay(2);
}
Symbol 24 MovieClip [title] Frame 26
stop();
_root.newlevel();
Symbol 65 MovieClip Frame 80
_root.gotoAndStop(2);