Frame 1
stop();
var plays = new Sound();
plays.attachSound("s1");
_root.playbutton._visible = false;
_root.onEnterFrame = function () {
_root.loader._xscale = (_root.getBytesLoaded() / _root.getBytesTotal()) * 500;
_root.please.lcount.text = Math.round((_root.getBytesLoaded() / _root.getBytesTotal()) * 100) + "%";
if (_root.getBytesLoaded() >= _root.getBytesTotal()) {
_root.onEnterFrame = null;
_root.please._visible = false;
_root.playbutton._visible = true;
}
};
Frame 2
function setvol(vol) {
_root.sound.setVolume(vol);
}
function happyend() {
_root.reinit();
_global.tmp = 4;
_root.onEnterFrame = function () {
_global.tmp--;
if (_global.tmp == 0) {
_global.tmp = 120;
_root.onEnterFrame = function () {
_global.tmp--;
if (_global.tmp == 0) {
_root.onEnterFrame = null;
if (_global.lev < 12) {
var _local3 = 1;
while (_local3 < 13) {
var _local4 = new Color(_root.colorer[_local3]);
_local4.setRGB(0);
_local3++;
}
var _local5 = new Color("_root.b" + (_global.lev + 1));
_local5.setRGB(11141120);
_root.exe.starter(_global.lev + 1);
} else {
_root.exe.starter(12);
}
}
};
_root.congratulations._visible = true;
_root.congratulations.gotoAndPlay(2);
}
};
}
function reinit() {
_root.congratulations._visible = false;
_global.spherecounter = 0;
var _local4 = 1;
while (_local4 <= 9) {
var _local3 = 1;
while (_local3 <= 9) {
_root.quadros[_local4 + (10 * _local3)].gotoAndPlay("die");
_root.links[_local4 + (10 * _local3)] = null;
_root.bools[_local4 + (10 * _local3)] = 0;
_root.spheres[_local4 + (10 * _local3)].gotoAndPlay("die");
_local3++;
}
_local4++;
}
_root.quadros = new Array();
_root.spheres = new Array();
}
function initerOnPress() {
this.startDrag(false);
this.onMouseUp = _root.initerOnMouseUp;
}
function initerOnMouseUp() {
this.stopDrag();
var _local5 = 1;
while (_local5 <= i) {
var _local4 = 1;
while (_local4 <= j) {
if ((((((_root.bools[_local5 + (10 * _local4)] == 0) && ((this._x + 12.5) >= (28 * (_local5 - 1)))) && ((this._x + 12.5) <= (28 * _local5))) && ((this._y + 12.5) >= (28 * (_local4 - 1)))) && ((this._y + 12.5) <= (28 * _local4))) && (((this.c1 == _local5) && (Math.abs(this.c2 - _local4) == 2)) || ((this.c2 == _local4) && (Math.abs(this.c1 - _local5) == 2)))) {
if (((this.c1 == _local5) && (_root.bools[_local5 + (5 * (_local4 + this.c2))] == 1)) || ((this.c2 == _local4) && (_root.bools[((_local5 + this.c1) / 2) + (10 * _local4)] == 1))) {
_root.bools[this.c1 + (10 * this.c2)] = 0;
_root.links[this.c1 + (10 * this.c2)] = null;
_root.bools[_local5 + (10 * _local4)] = 1;
_root.bools[((_local5 + this.c1) / 2) + (5 * (_local4 + this.c2))] = 0;
_root.s[0].start();
_root.links[((_local5 + this.c1) / 2) + (5 * (_local4 + this.c2))].gotoAndPlay("die");
_global.spherecounter--;
_global.spherescore++;
_root.links[_local5 + (10 * _local4)] = this;
this._x = 29 * (_local5 - 1);
this._y = 29 * (_local4 - 1);
this.ok = true;
this.c1 = _local5;
this.c2 = _local4;
if (_global.spherecounter == 1) {
_root.s[2].start();
_root.happyend();
}
}
}
_local4++;
}
_local5++;
}
if (!this.ok) {
_root.s[3].start();
this._x = 29 * (this.c1 - 1);
this._y = 29 * (this.c2 - 1);
}
_root.scores.scores_box.text = _global.spherescore;
this.ok = false;
this.onMouseUp = null;
}
function h1(smth) {
_root.s[5].start();
var _local5 = this._name;
_local5 = _local5.substr(1);
var _local3 = 1;
while (_local3 < 13) {
var _local4 = new Color(_root.colorer[_local3]);
_local4.setRGB(0);
_local3++;
}
var _local6 = new Color(this);
_local6.setRGB(11141120);
_root.exe.starter(Number(_local5));
}
stop();
_root.soundoff._visible = false;
var sound = new Sound();
var s = new Array(new Sound(), new Sound(), new Sound(), new Sound(), new Sound(), new Sound());
var t1 = 0;
while (t1 < 6) {
s[t1].attachSound("s" + (t1 + 1));
s[t1].setVolume(50);
t1++;
}
_root.volsontrol.roller._y = 35;
var colorer = new Array();
colorer[1] = _root.b1;
colorer[2] = _root.b2;
colorer[3] = _root.b3;
colorer[4] = _root.b4;
colorer[5] = _root.b5;
colorer[6] = _root.b6;
colorer[7] = _root.b7;
colorer[8] = _root.b8;
colorer[9] = _root.b9;
colorer[10] = _root.b10;
colorer[11] = _root.b11;
colorer[12] = _root.b12;
_root.congratulations._visible = false;
var tmpbool;
var drag = false;
_global.spherecounter;
_global.spherescore = 0;
_global.tmp = 3;
_global.lev = 1;
_global.i = 0;
_global.j = 0;
var mydef = new arrdefine();
var exe = new Object();
var initer = new Object();
var quadros = new Array();
var spheres = new Array();
var bools = new Array();
var links = new Array();
initer.onMouseUp = initerOnMouseUp;
initer.onPress = initerOnPress;
exe.setPfieldSize = function () {
_root.pfield._x = (330 - (29 * j)) / 2;
_root.pfield._y = (300 - (29 * (i - 1))) / 2;
var _local4 = 1;
while (_local4 <= _global.i) {
var _local3 = 1;
while (_local3 <= _global.j) {
_root.initer._x = 29 * (_local4 - 1);
_root.initer._y = 29 * (_local3 - 1);
_root.quadros[_local4 + (10 * _local3)] = _root.pfield.attachMovie("quadro", ("quadro" + _local4) + _local3, _local4 - (1000 * _local3), _root.initer);
_root.quadros[_local4 + (10 * _local3)].onPress = null;
_root.quadros[_local4 + (10 * _local3)].onMouseUp = null;
if (_root.mydef.net[_global.lev - 1][(_local4 + (_global.i * (_local3 - 1))) - 1]) {
_root.bools[_local4 + (10 * _local3)] = 1;
_root.spheres[_local4 + (10 * _local3)] = new Object();
_global.spherecounter++;
_root.spheres[_local4 + (10 * _local3)] = _root.pfield.attachMovie("sphere", ("sphere" + _local4) + _local3, (20 + _local4) + (_local3 * 10), _root.initer);
_root.links[_local4 + (10 * _local3)] = _root.spheres[_local4 + (10 * _local3)];
_root.spheres[_local4 + (10 * _local3)].onMouseUp = null;
_root.spheres[_local4 + (10 * _local3)].c1 = _local4;
_root.spheres[_local4 + (10 * _local3)].c2 = _local3;
_root.spheres[_local4 + (10 * _local3)].ok = false;
}
_local3++;
}
_local4++;
}
_root.scores.scores_box.text = _global.spherescore;
};
exe.starter = function (lev) {
_global.spherescore = 0;
_root.scores.scores_box.text = _global.spherescore;
_root.reinit();
_global.lev = lev;
_global.tmp = 4;
_root.onEnterFrame = function () {
if (_global.tmp > 0) {
_global.tmp--;
} else {
_root.onEnterFrame = null;
_root.mydef.setlevel(lev);
_root.exe.setPfieldSize();
}
};
};
with (_root) {
b1.onRelease = h1;
b2.onRelease = h1;
b3.onRelease = h1;
b4.onRelease = h1;
b5.onRelease = h1;
b6.onRelease = h1;
b7.onRelease = h1;
b8.onRelease = h1;
b9.onRelease = h1;
b10.onRelease = h1;
b11.onRelease = h1;
b12.onRelease = h1;
b13.onRelease = h1;
}
var mycolor = new Color(_root.b1);
mycolor.setRGB(11141120);
_root.exe.starter(1);
Instance of Symbol 102 MovieClip "volcontrol" in Frame 2
on (press) {
_root.volcontrol.roller.startDrag(true, 0, 5, 0, 75);
this.onEnterFrame = function () {
_root.setvol(100 - (_root.volcontrol.roller._y * 1.32));
};
}
on (releaseOutside) {
this.onEnterFrame = null;
_root.volcontrol.roller.stopDrag();
}
Symbol 18 Button [Symbol 2]
on (release) {
_root.s[0].start();
getURL ("http://www.gamefalls.com", _blank);
}
Symbol 21 MovieClip [theend] Frame 1
stop();
Symbol 21 MovieClip [theend] Frame 7
stop();
Symbol 23 Button [quit]
on (press) {
_root.s[3].start();
_global.spherescore = 0;
_root.scores.scores_box.text = _global.spherescore;
_root.reinit();
_global.tmp = 4;
_root.onEnterFrame = function () {
if (_global.tmp > 0) {
_global.tmp--;
} else {
_root.onEnterFrame = null;
_root.mydef.setlevel(_global.lev);
_root.exe.setPfieldSize();
}
};
}
Symbol 25 MovieClip [sphere] Frame 1
stop();
Symbol 25 MovieClip [sphere] Frame 5
this.unloadMovie();
Symbol 30 MovieClip [quadro] Frame 7
stop();
Symbol 30 MovieClip [quadro] Frame 10
this.unloadMovie();
Symbol 43 Button
on (release) {
gotoAndPlay (2);
_root.plays.start();
}
Symbol 113 MovieClip [__Packages.arrdefine] Frame 0
class arrdefine
{
function arrdefine () {
}
function setlevel(lev) {
_global.i = (_global.j = Math.round(Math.sqrt(net[lev - 1].length)));
}
var levelNet1 = new Array(1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0);
var levelNet2 = new Array(0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0);
var levelNet3 = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
var levelNet4 = new Array(1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1);
var levelNet5 = new Array(0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1);
var levelNet6 = new Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1);
var levelNet7 = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
var levelNet8 = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
var levelNet9 = new Array(0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
var levelNet10 = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
var levelNet11 = new Array(0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0);
var levelNet12 = new Array(0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
var net = new Array(arrdefine.prototype.levelNet1, arrdefine.prototype.levelNet2, arrdefine.prototype.levelNet3, arrdefine.prototype.levelNet4, arrdefine.prototype.levelNet5, arrdefine.prototype.levelNet6, arrdefine.prototype.levelNet7, arrdefine.prototype.levelNet8, arrdefine.prototype.levelNet9, arrdefine.prototype.levelNet10, arrdefine.prototype.levelNet11, arrdefine.prototype.levelNet12);
var f = new Array();
}
Symbol 107 Button
on (release) {
_root.setvol(100 - (_root.volcontrol.roller._y * 1.32));
_root.soundoff._visible = false;
_root.soundon._visible = true;
}
Symbol 112 Button
on (release) {
_root.setvol(0);
_root.soundon._visible = false;
_root.soundoff._visible = true;
}