Frame 1
ArrayX = (_global.ArrayX = function () {
var a = ((this.a = new Array()));
this.o = new Object();
this.auc = 0;
this.ac = 0;
this.sce = false;
this.pos = 0;
this.pa = 100;
this.start = function () {
this.pos = -1;
};
this.next = function () {
var _local3 = this.a;
var _local4 = _local3.length;
this.pos++;
var _local2 = this.pos;
while (_local2 < _local4) {
if (_local3[_local2] != undefined) {
this.pos = _local2;
return(_local3[_local2]);
}
_local2++;
}
return(undefined);
};
this.erase = function (i) {
if (i >= 0) {
this.a[i].x_pos = -1;
this.a[i] = undefined;
this.ac--;
this.auc++;
if ((this.auc > this.pa) && (!this.sce)) {
this.sce = true;
this.scv = setInterval(this, "purge", 0);
}
}
};
this.add = function (e) {
var _local2 = new Object();
_local2.o = e;
_local2.x_pos = this.a.length;
this.a.push(_local2);
this.ac++;
return(_local2);
};
this.purge = function () {
var _local3 = this.a;
var _local6 = 0;
var _local2 = _local3.length - 1;
while (_local2 >= 0) {
if (_local3[_local2] == undefined) {
_local6++;
}
_local2--;
}
if (_local6 > 0) {
var _local5 = new Array(_local3.length - _local6);
var _local4 = _local5.length - 1;
_local2 = _local3.length - 1;
while (_local2 >= 0) {
if (_local3[_local2] != undefined) {
_local5[_local4] = _local3[_local2];
_local5[_local4].x_pos = _local4;
_local4--;
}
_local2--;
}
this.ac = _local5.length;
this.auc = 0;
this.a = _local5;
}
clearInterval(this.scv);
this.sce = false;
};
this.clear = function () {
this.a = new Array();
this.pos = 0;
this.ac = 0;
this.auc = 0;
};
});
arrayPurgeUndefined = (_global.arrayPurgeUndefined = function (a) {
var _local5 = 0;
var _local1 = a.length - 1;
while (_local1 >= 0) {
if (a[_local1] == undefined) {
_local5++;
}
_local1--;
}
if (_local5 > 0) {
var _local4 = new Array(a.length - _local5);
var _local3 = _local4.length - 1;
_local1 = a.length - 1;
while (_local1 >= 0) {
if (a[_local1] != undefined) {
_local4[_local3] = a[_local1];
_local3--;
}
_local1--;
}
return(_local4);
}
return(a);
});
dm = "drawball.com";
var dmp = _url.split("/");
var di = 0;
while (di < dmp.length) {
if (dmp[di].indexOf(dm) >= 0) {
dm = dmp[di];
break;
}
di++;
}
System.security.allowDomain(dm);
i2s = (_global.i2s = function (v, len) {
var _local6 = "";
var _local3;
var _local4 = v;
var _local2 = Math.pow(127, len - 1);
var _local1 = 1;
while (_local1 <= len) {
_local3 = Math.floor(_local4 / _local2);
_local4 = _local4 - (_local3 * _local2);
_local6 = _local6 + String.fromCharCode(_local3 + 1);
if (_local1 != len) {
_local2 = _local2 / 127;
}
_local1++;
}
return(_local6);
});
s2i = (_global.s2i = function (s) {
var _local4 = 0;
var _local2 = 1;
var _local1 = s.length - 1;
while (_local1 >= 0) {
_local4 = _local4 + ((s.charCodeAt(_local1) - 1) * _local2);
_local2 = _local2 * 127;
_local1--;
}
return(_local4);
});
bcr = 0;
lcrb = 0;
lcr = 1;
lcrt = getTimer();
flcrd = 25;
setLcrFPS = function (v) {
this.flcrd = 1000 / v;
};
lfo = function (frac) {
var _local3 = new Array();
var _local2 = 0;
var _local1 = 0;
while (_local1 <= 500) {
_local3[_local1] = _local2;
_local2 = _local2 + ((1 - _local2) * frac);
_local1++;
}
return(_local3);
};
lcrTicker.removeMovieClip();
createEmptyMovieClip("lcrTicker", 412092);
lcrTicker.onEnterFrame = function () {
var _local3 = getTimer();
var _local2 = this._parent;
_local2.lcr = (_local3 - _local2.lcrt) / _local2.flcrd;
_local2.bcr = _local2.bcr + _local2.lcr;
_local2.lcrb = Math.floor(_local2.bcr);
_local2.bcr = _local2.bcr - _local2.lcrb;
_local2.lcrt = _local3;
};
win._alpha = 0;
var css = undefined;
System.security.loadPolicyFile("http://www.drawball.com/crossdomain.xml");
if ((_root._url.toLowerCase().indexOf("discord.") >= 0) || (_root._url.toLowerCase().indexOf("chaos.") >= 0)) {
System.security.loadPolicyFile("http://discord.drawball.com/crossdomain.xml");
}
if (true || (_root._url.toLowerCase().indexOf("two.") >= 0)) {
css = new Sound();
var sax_mode = false;
if (sax_mode) {
css.attachSound("epicsax");
css.setVolume(20);
css.start(0, 31337);
} else {
css.checkPolicyFile = true;
if (_root._url.toLowerCase().indexOf("chaos.") >= 0) {
css.loadSound("http://discord.drawball.com/poal.mp3", true);
css.setVolume(20);
} else {
css.loadSound("http://www.drawball.com/pole.mp3", true);
css.setVolume(20);
}
css.play();
}
}
Symbol 21 MovieClip Frame 1
Symbol 22 MovieClip [rules] Frame 1
bg.onPress = function () {
};
bg.useHandCursor = false;
dep = 0;
tdt = 0;
this.attachMovie("bevelButton", "agreeBtn", ++dep);
this.attachMovie("bevelButton", "disagreeBtn", ++dep);
agreeBtn.setSize(46, 20);
agreeBtn.graphics.attachMovie("agreeGraphic", "g", 1);
disagreeBtn.setSize(58, 20);
disagreeBtn.graphics.attachMovie("disagreeGraphic", "g", 1);
agreeBtn._x = -37;
disagreeBtn._x = 27;
agreeBtn._y = 200;
disagreeBtn._y = 200;
var so = SharedObject.getLocal("drawball", "/");
t = Number(so.data.ruletm);
if (t > 0) {
ct = Math.floor(new Date().getTime() / 1000);
if ((ct - t) < 60) {
tdt = getTimer() + ((60 - (ct - t)) * 1000);
agreeBtn.setEnabled(false);
disagreeBtn.setEnabled(false);
}
}
agreeBtn.clicked = function () {
var _local1 = SharedObject.getLocal("drawball", "/");
_local1.data.ruletm = Math.floor(new Date().getTime() / 1000);
tdt = getTimer() + 60000;
agreeBtn.setEnabled(false);
disagreeBtn.setEnabled(false);
};
accepted = false;
disagreeBtn.clicked = function () {
var _local1 = SharedObject.getLocal("drawball", "/");
_local1.data.ruleac = 1;
accepted = true;
agreeBtn.setEnabled(false);
disagreeBtn.setEnabled(false);
};
time.box.text = " ";
tca = 255;
this.onEnterFrame = function () {
tt = getTimer();
if (tdt > tt) {
time.box.text = Math.floor((tdt - tt) / 1000);
} else if (time.box.text != "") {
time.box.text = "";
agreeBtn.setEnabled(true);
disagreeBtn.setEnabled(true);
}
if (accepted) {
if (tca > 0) {
tca = tca - (_root.lcrb * 4);
if (tca <= 0) {
tca = 0;
th._visible = false;
}
trace(tca);
new Color(th).setRGB(((tca * 65536) + (tca * 256)) + tca);
}
}
};
Symbol 44 MovieClip [hpcv] Frame 1
function gq() {
if (cgq) {
var _local1 = qs[qap][qav];
qav++;
if (qav >= qls[qap]) {
qav = 0;
qap++;
if (qap >= qc) {
cgq = false;
}
}
aqp++;
return(_local1);
}
return(null);
}
this.createEmptyMovieClip("mc", 1);
mc.loadMovie((((("http://" + _root.dm) + "/i/hpcv.swf?hp=") + Math.random()) + "&cv=") + Math.random());
dlhp = false;
this.onEnterFrame = function () {
if (dgq) {
var _local8 = "";
qs = new Array();
qls = new Array();
aqp = 0;
ql = 0;
var _local3 = 1;
while (_local3 <= qc) {
var _local5 = mc._parent["qq" + _local3];
qs.push(_local5);
var _local6 = _local5.length;
qls.push(_local6);
ql = ql + _local6;
_local3++;
}
qav = 0;
qap = 0;
cgq = true;
var _local9 = 0;
var _local10;
var _local7 = new Array();
while (cgq) {
_local7.push(gq());
}
var _local4 = _local7.splice(_local7.length - 6, 6);
trace((_local4.length + " ") + _local7.length);
_local3 = 0;
while (_local3 < _local4.length) {
_local4[_local3] = _local4[_local3] / 100;
_local3++;
}
_local3 = 0;
while (_local3 < _local7.length) {
if ((_local3 % 7) == 0) {
_local8 = _local8 + String.fromCharCode((_local7[_local3] - _local4[Math.floor(_local3 / 7) % 5]) / _local4[Math.floor(_local3 / 7) % 6]);
}
_local3++;
}
_parent.cnc2 = _local8;
trace("s: " + _local8);
this.removeMovieClip();
}
if (!dlhp) {
if ((mc.getBytesLoaded() / mc.getBytesTotal()) == 1) {
dlhp = true;
q = new Array();
qc = Number(mc._parent.qc);
dgq = true;
}
}
};
Symbol 47 MovieClip [hofg] Frame 1
new Color(h2).setRGB(0);
h2._alpha = 100;
Symbol 55 MovieClip Frame 1
function cftw() {
var _local12 = 1;
while (_local12 <= 6) {
var _local11 = this["d" + _local12];
var _local8;
var _local4;
if (_local12 == 1) {
_local8 = 4;
_local4 = [2, 3, 4, 6];
} else if (_local12 == 2) {
_local8 = 2;
_local4 = [1, 3];
} else if (_local12 == 3) {
_local8 = 4;
_local4 = [1, 2, 5, 6];
} else if (_local12 == 4) {
_local8 = 3;
_local4 = [1, 5, 6];
} else if (_local12 == 5) {
_local8 = 3;
_local4 = [3, 4, 6];
} else if (_local12 == 6) {
_local8 = 4;
_local4 = [1, 3, 4, 5];
}
var _local13 = 0;
var _local10 = 0;
while (_local10 < _local11.cns.length) {
var _local6 = _local11.cns[_local10];
var _local5 = 0;
while (_local5 < _local6.c.length) {
if (_local6.c[_local5] != _local11) {
var _local9 = _local6.c[_local5].p;
var _local7 = false;
var _local3 = 0;
while (_local3 < _local4.length) {
if (_local4[_local3] == _local9) {
_local4[_local3] = -1;
_local8--;
_local7 = true;
}
_local3++;
}
if (!_local7) {
return(false);
}
}
_local5++;
}
_local10++;
}
_local10 = 0;
while (_local10 < _local4.length) {
if (_local4[_local10] != -1) {
return(false);
}
_local10++;
}
if (_local8 != 0) {
return(false);
}
_local12++;
}
_local12 = 1;
while (_local12 <= 6) {
delete this["d" + _local12].onRollOver;
ending = true;
over = true;
_parent.callback();
tld = undefined;
tl.removeMovieClip();
_local12++;
}
}
this._x = -50;
this._y = -25;
dep = 0;
this.createEmptyMovieClip("ht", ++dep);
this.createEmptyMovieClip("ls2", ++dep);
ls2._y = 0.5;
this.createEmptyMovieClip("ls", ++dep);
ls2.lineStyle(5, 0);
ls.lineStyle(2, 16777215);
this.createEmptyMovieClip("tl", ++dep);
var i = 1;
while (i <= 6) {
d = this.attachMovie("edot", "d" + i, ++dep);
d.p = i;
d.cns = new Array();
d.onRollOver = function () {
if (tld != this) {
if (sl) {
var _local3;
var _local4 = 0;
while (_local4 < tld.cns.length) {
_local3 = tld.cns[_local4];
var _local2 = 0;
while (_local2 < _local3.c.length) {
if (_local3.c[_local2] == this) {
return(undefined);
}
_local2++;
}
_local4++;
}
ls2.lineTo(this._x, this._y);
ls.lineTo(this._x, this._y);
_local3 = new Object();
_local3.c = new Array();
_local3.c.push(this);
_local3.c.push(tld);
this.cns.push(_local3);
tld.cns.push(_local3);
this.cc++;
tld.cc++;
} else {
ls2.moveTo(this._x, this._y);
ls.moveTo(this._x, this._y);
sl = true;
}
tld = this;
tldt = getTimer();
cftw();
}
};
i++;
}
d2._x = 50;
d2._y = -25;
d3._x = 100;
d4._y = 70;
d5._x = 100;
d5._y = 70;
d6._x = 50;
d6._y = 25;
ht.lineStyle(8, 0, 20);
vs = [4, 5, 3, 2, 1, 3, 6, 1, 4, 6, 5];
var i = 0;
while (i < vs.length) {
var v = vs[i];
if (i == 0) {
ht.moveTo(this["d" + v]._x, this["d" + v]._y);
} else {
ht.lineTo(this["d" + v]._x, this["d" + v]._y);
}
i++;
}
yv = 0;
tldt = 0;
this.onEnterFrame = function () {
if ((tld != undefined) && (!over)) {
if ((getTimer() - tldt) > 5000) {
tld = undefined;
ls.clear();
ls2.clear();
ls2.lineStyle(5, 0);
ls.lineStyle(2, 16777215);
tl.clear();
sl = false;
var _local5 = 1;
while (_local5 <= 6) {
var _local4 = this["d" + _local5];
_local4.cns = new Array();
_local4.cc = 0;
_local5++;
}
}
}
if (ending) {
var _local6 = 0;
var _local5 = 1;
while (_local5 <= 6) {
var _local4 = this["d" + _local5];
if (_local4 != undefined) {
_local4._xscale = _local4._xscale - (_root.lcrb * 4);
_local4._yscale = _local4._xscale;
if (_local4._xscale <= 0) {
_local4.removeMovieClip();
}
} else {
_local6++;
}
_local5++;
}
yv = yv + (_root.lcrb * 0.05);
_yscale = (_yscale - (yv * _root.lcrb));
_parent._alpha = _yscale;
if ((_local6 == 6) && (_yscale <= 0)) {
ending = false;
_parent.removeMovieClip();
}
} else if (_parent._alpha < 100) {
_parent._alpha = _parent._alpha + (_root.lcrb * 2);
if (_parent._alpha >= 100) {
_parent._alpha = 100;
}
}
if ((tld != undefined) && (tl != undefined)) {
tl.clear();
var _local7 = _xmouse;
var _local8 = _ymouse;
tl.lineStyle(4, 0);
tl.moveTo(tld._x, tld._y);
tl.lineTo(_local7, _local8);
tl.lineStyle(2, 16777215);
tl.moveTo(tld._x, tld._y);
tl.lineTo(_local7, _local8);
tl._alpha = 100 - ((100 * (getTimer() - tldt)) / 5000);
}
};
Symbol 83 MovieClip [url] Frame 1
b = this.createEmptyMovieClip("boxBtn", ++dep);
bx = box;
bx.b = b;
bx.type = "dynamic";
bx.selectable = false;
b.bx = bx;
b._x = bx._x;
b._y = bx._y;
b.beginFill(0);
b._alpha = 0.1;
b.lineTo(bx._width, 0);
b.lineTo(bx._width, bx._height);
b.lineTo(0, bx._height);
b.lineTo(0, 0);
b.endFill();
b.onPress = function () {
ds = true;
this.bx.selectable = true;
this._visible = false;
Selection.setFocus(this.bx);
Selection.setSelection(0, 999999);
};
this.onEnterFrame = function () {
if (ds) {
var _local1 = Selection.getFocus() + "";
if (_local1 != ("" + bx)) {
ds = false;
bx.selectable = false;
b._visible = true;
} else {
Selection.setSelection(0, 999999);
}
}
};
Symbol 88 MovieClip [bevelButton] Frame 1
#initclip 1
var ccv = new Object();
ccv.bevelButton = function () {
this.init();
};
var tp = ((ccv.bevelButton.prototype = new MovieClip()));
Object.registerClass("bevelButton", ccv.bevelButton);
tp.setColor = function (c) {
var _local2 = Math.floor(c / 65536);
var _local3 = Math.floor(c / 256) - (_local2 * 256);
var _local4 = (c - (_local2 * 65536)) - (_local3 * 256);
if (((this.r != _local2) or (this.g != _local3)) or (this.b != _local4)) {
this.r = _local2;
this.g = _local3;
this.b = _local4;
this.redraw();
}
};
tp.setAngle = function (a) {
if (this.rad != a) {
this.rad = a;
this.redraw();
}
};
tp.setWidth = function (w) {
if (this.ww != w) {
this.setSize(w, this.hh);
}
};
tp.setHeight = function (h) {
if (this.hh != h) {
this.setSize(this.ww, h);
}
};
tp.setBrightness = function (b) {
if (this.bv != b) {
this.bv = b;
this.oefPush();
}
};
tp.setRadio = function (r) {
if (this.isRadio != r) {
var _local2 = this.ww;
this.ww = _local2 - 1;
this.isRadio = r;
this.setSize(_local2, this.hh);
}
};
tp.setSize = function (w, h) {
if ((this.ww != w) or (this.hh != h)) {
this.ww = w;
this.hh = h;
var _local5 = this.ww / 2;
var _local4 = this.hh / 2;
this.bg3.clear();
this.bg3.beginFill(0);
if (this.isRadio) {
var _local2 = 6;
var _local3 = 0;
while (_local3 <= _local2) {
var _local10 = (_local5 / Math.cos(3.1415926 / _local2)) * Math.cos(-1.5707963 + ((6.2831852 / _local2) * _local3));
var _local9 = (_local4 / Math.cos(3.1415926 / _local2)) * Math.sin(-1.5707963 + ((6.2831852 / _local2) * _local3));
var _local8 = _local5 * Math.cos((-1.5707963 + ((6.2831852 / _local2) * _local3)) + (3.1415926 / _local2));
var _local7 = _local4 * Math.sin((-1.5707963 + ((6.2831852 / _local2) * _local3)) + (3.1415926 / _local2));
if (_local3 == 0) {
this.bg3.moveTo(_local8, _local7);
} else {
this.bg3.curveTo(_local10, _local9, _local8, _local7);
}
_local3++;
}
} else {
this.bg3.moveTo(-_local5, -_local4);
this.bg3.lineTo(_local5, -_local4);
this.bg3.lineTo(_local5, _local4);
this.bg3.lineTo(-_local5, _local4);
this.bg3.lineTo(-_local5, -_local4);
}
this.bg3.endFill();
this.bg3.c = new Color(this.bg3);
var _local6 = this.br;
_local6.clear();
_local6.beginFill(0);
if (this.isRadio) {
var _local2 = 6;
var _local3 = 0;
while (_local3 <= _local2) {
var _local10 = (_local5 / Math.cos(3.1415926 / _local2)) * Math.cos(-1.5707963 + ((6.2831852 / _local2) * _local3));
var _local9 = (_local4 / Math.cos(3.1415926 / _local2)) * Math.sin(-1.5707963 + ((6.2831852 / _local2) * _local3));
var _local8 = _local5 * Math.cos((-1.5707963 + ((6.2831852 / _local2) * _local3)) + (3.1415926 / _local2));
var _local7 = _local4 * Math.sin((-1.5707963 + ((6.2831852 / _local2) * _local3)) + (3.1415926 / _local2));
if (_local3 == 0) {
_local6.moveTo(_local8, _local7);
} else {
_local6.curveTo(_local10, _local9, _local8, _local7);
}
_local3++;
}
_local3 = 0;
while (_local3 <= _local2) {
var _local10 = ((_local5 + 1) / Math.cos(3.1415926 / _local2)) * Math.cos(-1.5707963 + ((6.2831852 / _local2) * _local3));
var _local9 = ((_local4 + 1) / Math.cos(3.1415926 / _local2)) * Math.sin(-1.5707963 + ((6.2831852 / _local2) * _local3));
var _local8 = (_local5 + 1) * Math.cos((-1.5707963 + ((6.2831852 / _local2) * _local3)) + (3.1415926 / _local2));
var _local7 = (_local4 + 1) * Math.sin((-1.5707963 + ((6.2831852 / _local2) * _local3)) + (3.1415926 / _local2));
if (_local3 == 0) {
_local6.lineTo(_local8, _local7);
} else {
_local6.curveTo(_local10, _local9, _local8, _local7);
}
_local3++;
}
} else {
_local6.moveTo((-_local5) - 1, (-_local4) - 1);
_local6.lineTo(_local5 + 1, (-_local4) - 1);
_local6.lineTo(_local5 + 1, _local4 + 1);
_local6.lineTo((-_local5) - 1, _local4 + 1);
_local6.lineTo((-_local5) - 1, (-_local4) - 1);
_local6.lineTo(-_local5, -_local4);
_local6.lineTo(_local5, -_local4);
_local6.lineTo(_local5, _local4);
_local6.lineTo(-_local5, _local4);
_local6.lineTo(-_local5, -_local4);
}
_local6.endFill();
this.redraw();
}
};
tp.setBevel = function (b) {
if (this.bevel != b) {
this.bevel = b;
this.oefPush();
}
};
tp.redraw = function () {
with (this) {
var rad = this.rad;
var bv = this.bv;
var r = this.r;
var g = this.g;
var b = this.b;
var ww = this.ww;
var hh = this.hh;
var w2 = (ww / 2);
var h2 = (hh / 2);
var uc = 16777215;
var w2h = Math.sqrt((2 * Math.max(ww, hh)) * Math.max(ww, hh));
var il = (w2h + Math.pow((0.6 - Math.abs(this.downAmount - 0.6)) * 30, 2));
var mv = (1 - (this.downAmount * this.darkenAmount));
var c = ((((Math.min(255, Math.floor(r * mv)) * 256) * 256) + (Math.min(255, Math.floor(g * mv)) * 256)) + Math.min(255, Math.floor(b * mv)));
var urad = ((this.downAmount > 0.5) ? (rad + 3.1415926) : (rad));
bg1.clear();
bg1.beginGradientFill("linear", [uc, c, 0], [100, 100, 100], [0, 127.5, 255], {matrixType:"box", x:(-il) / 2, y:(-il) / 2, w:il, h:il, r:urad});
if (this.isRadio) {
var sides = 6;
var i = 0;
while (i <= sides) {
var x = ((w2 / Math.cos(3.1415926 / sides)) * Math.cos(-1.5707963 + ((6.2831852 / sides) * i)));
var y = ((h2 / Math.cos(3.1415926 / sides)) * Math.sin(-1.5707963 + ((6.2831852 / sides) * i)));
var mx = (w2 * Math.cos((-1.5707963 + ((6.2831852 / sides) * i)) + (3.1415926 / sides)));
var my = (h2 * Math.sin((-1.5707963 + ((6.2831852 / sides) * i)) + (3.1415926 / sides)));
if (i == 0) {
bg1.moveTo(mx, my);
} else {
bg1.curveTo(x, y, mx, my);
}
i++;
}
} else {
bg1.moveTo(-w2, -h2);
bg1.lineTo(w2, -h2);
bg1.lineTo(w2, h2);
bg1.lineTo(-w2, h2);
bg1.lineTo(-w2, -h2);
}
bg1.endFill();
bg3.c.setRGB(c);
bg3._alpha = 100 - bv;
il = w2h + ((this.downAmount * (Math.max(ww, hh) / 20)) * 8);
bg2.clear();
if (this.noGraphicsDown) {
graphics._y = 0;
} else {
graphics._y = this.downAmount;
}
bg2.beginGradientFill("radial", [uc, c], [(this.isRadio ? 65 : 75), (this.isRadio ? 75 : 80)], [0, 255], {matrixType:"box", x:(1 + (((Math.cos(rad) * (0.5 - this.downAmount)) * w2h) / 4)) - (il / 2), y:(1 + (((Math.sin(rad) * (0.5 - this.downAmount)) * w2h) / 4)) - (il / 2), w:il, h:il, r:0});
if (this.isRadio) {
var sides = 6;
var i = 0;
while (i <= sides) {
var x = (((w2 - this.bevel) / Math.cos(3.1415926 / sides)) * Math.cos(-1.5707963 + ((6.2831852 / sides) * i)));
var y = (((h2 - this.bevel) / Math.cos(3.1415926 / sides)) * Math.sin(-1.5707963 + ((6.2831852 / sides) * i)));
var mx = ((w2 - this.bevel) * Math.cos((-1.5707963 + ((6.2831852 / sides) * i)) + (3.1415926 / sides)));
var my = ((h2 - this.bevel) * Math.sin((-1.5707963 + ((6.2831852 / sides) * i)) + (3.1415926 / sides)));
if (i == 0) {
bg2.moveTo(mx, my);
} else {
bg2.curveTo(x, y, mx, my);
}
i++;
}
} else {
bg2.moveTo(this.bevel - w2, this.bevel - h2);
bg2.lineTo(w2 - this.bevel, this.bevel - h2);
bg2.lineTo(w2 - this.bevel, h2 - this.bevel);
bg2.lineTo(this.bevel - w2, h2 - this.bevel);
bg2.lineTo(this.bevel - w2, h2 - this.bevel);
}
bg2.endFill();
}
};
tp.stick = function () {
if (!this.stuckDown) {
this.stuckDown = true;
this.downFr = 7 - this.downFr;
this.oefPush();
}
};
tp.unstick = function () {
if (this.stuckDown) {
this.stuckDown = false;
this.downFr = 7 - this.downFr;
this.oefPush();
}
};
tp.setFunctional = function (f) {
if (this.functional != f) {
this.functional = f;
var _local2 = this.m;
if (f) {
_local2.onPress = _local2.PH_onPress;
_local2.onRollOver = _local2.PH_onRollOver;
_local2.onRollOut = _local2.PH_onRollOut;
_local2.onDragOver = _local2.PH_onDragOver;
_local2.onDragOut = _local2.PH_onDragOut;
_local2.onRelease = _local2.PH_onRelease;
_local2.onReleaseOutside = _local2.PH_onReleaseOutside;
} else {
delete _local2.onPress;
delete _local2.onRollOver;
delete _local2.onRollOut;
delete _local2.onDragOver;
delete _local2.onDragOut;
delete _local2.onRelease;
delete _local2.onReleaseOutside;
}
}
};
tp.setEnabled = function (e) {
with (this) {
setFunctional(e);
if (disabled == e) {
disabled = !e;
if (m.useHandCursor == disabled) {
m.useHandCursor = !disabled;
}
oefPush();
}
}
};
tp.init = function () {
if (_root.lcr == undefined) {
_root.lcr = 1;
}
this.dep = 0;
var m = this.createEmptyMovieClip("m", ++this.dep);
m.dep = 0;
var ww = this._width;
var hh = this._height;
var w2 = (ww / 2);
var h2 = (hh / 2);
this._xscale = (this._yscale = 100);
this.rad = 1.5707963;
this.bv = 70;
this.r = 255;
this.g = 255;
this.b = 255;
this.bevel = 1;
this.darkenAmount = 0.3;
this.downFr = 0;
this.downAmount = 0;
this.bg1 = m.createEmptyMovieClip("bg1", ++m.dep);
this.bg2 = m.createEmptyMovieClip("bg2", ++m.dep);
this.bg3 = m.createEmptyMovieClip("bg3", ++m.dep);
this.br = m.createEmptyMovieClip("br", ++m.dep);
this.setSize(ww, hh);
this.graphics = m.createEmptyMovieClip("graphics", ++m.dep);
this.oefOn = false;
this.oef = function () {
var _local3 = 0;
if ((!this.noDown) and (((this.md and this.mo) and (this.downFr < 7)) or (this.md and this.ultraDown))) {
this.downFr = Math.min(7, this.downFr + _root.lcr);
} else if ((!(this.md and this.mo)) and (this.downFr > 0)) {
this.downFr = Math.max(0, this.downFr - _root.lcr);
} else {
_local3++;
}
if (this.stuckDown) {
this.downAmount = 1 - ((Math.cos(3.1415926 * (1 + (this.downFr / 7))) * 0.5) + 0.5);
} else {
this.downAmount = (Math.cos(3.1415926 * (1 + (this.downFr / 7))) * 0.5) + 0.5;
}
if (this.disabled and (this.disableFr < 10)) {
this.disableFr = Math.min(10, this.disableFr + _root.lcr);
} else if ((!this.disabled) and (this.disableFr > 0)) {
this.disableFr = Math.max(0, this.disableFr - _root.lcr);
} else {
_local3++;
}
this.m._alpha = 100 - ((80 * this.disableFr) / 10);
this.redraw();
if (_local3 == 2) {
this.oefOn = false;
delete this.onEnterFrame;
}
};
this.oefPush = function () {
if (!this.oefOn) {
this.oefOn = true;
this.onEnterFrame = this.oef;
}
};
this.disabled = (this.mo = (this.md = (this.mp = (this.sticky = (this.stuckDown = false)))));
this.click = function () {
with (this) {
if (!disabled) {
downFr = 7;
if (sticky) {
stuckDown = !stuckDown;
downFr = 7 - downFr;
}
clicked();
oefPush();
}
}
};
m.PH_onPress = function () {
_root.bvbDown = true;
with (this._parent) {
mo = true;
if (!disabled) {
md = true;
}
mp = true;
oefPush();
mouseStatus();
}
};
m.PH_onDragOver = function () {
with (this._parent) {
mo = true;
mp = true;
oefPush();
mouseStatus();
}
};
m.PH_onDragOut = function () {
with (this._parent) {
mo = false;
mp = false;
oefPush();
mouseStatus();
}
};
m.PH_onRollOver = function () {
with (this._parent) {
mo = true;
oefPush();
mouseStatus();
}
};
m.PH_onRollOut = function () {
with (this._parent) {
mo = false;
oefPush();
mouseStatus();
}
};
m.PH_onRelease = function () {
_root.bvbDown = false;
with (this._parent) {
if (md and mo) {
click();
}
mo = true;
md = false;
mp = false;
oefPush();
mouseStatus();
}
};
m.PH_onReleaseOutside = function () {
_root.bvbDown = false;
with (this._parent) {
mo = false;
md = false;
mp = false;
oefPush();
mouseStatus();
}
};
this.tabChildren = false;
m._focusrect = false;
this.setEnabled(true);
this.redraw();
};
delete cn;
delete ccv;
delete tp;
#endinitclip
Symbol 96 MovieClip [wheel] Frame 1
function getColorObj() {
return(gca(cc.x, cc.y, cc.bv, true));
}
function setColor(o) {
if (o.c == null) {
forceColor(o);
} else {
cc = gca(o.x, o.y, o.bv, true);
mk._x = o.x + 42;
mk._y = o.y + 42;
this._parent.forceUpdate();
this._parent.colorSet(cc.c, cc);
}
}
function forceColor(c) {
var _local10 = Math.floor(c / 65536);
var _local11 = Math.floor((c - (_local10 * 65536)) / 256);
var _local12 = c - ((_local10 * 65536) + (_local11 * 256));
var _local21 = _local10;
var _local20 = _local11;
var _local19 = _local12;
var _local26 = 0;
var _local23 = Math.min(Math.min(_local21, _local20), _local19);
_local21 = _local21 - _local23;
_local20 = _local20 - _local23;
_local19 = _local19 - _local23;
var _local24 = 256 / Math.max(1, Math.max(Math.max(_local21, _local20), _local19));
_local21 = _local21 * _local24;
_local20 = _local20 * _local24;
_local19 = _local19 * _local24;
_local21 = Math.round(_local21);
_local20 = Math.round(_local20);
_local19 = Math.round(_local19);
var _local22 = 0;
if ((_local21 == 256) && (_local19 == 0)) {
_local22 = (_local20 * 60) / 256;
} else if ((_local20 == 256) && (_local19 == 0)) {
_local22 = 60 + (((256 - _local21) * 60) / 256);
} else if ((_local21 == 0) && (_local20 == 256)) {
_local22 = 120 + ((_local19 * 60) / 256);
} else if ((_local19 == 256) && (_local21 == 0)) {
_local22 = 180 + (((256 - _local20) * 60) / 256);
} else if ((_local20 == 0) && (_local19 == 256)) {
_local22 = 240 + ((_local21 * 60) / 256);
} else if ((_local21 == 256) && (_local20 == 0)) {
_local22 = 300 + (((256 - _local19) * 60) / 256);
}
_local22 = 360 - _local22;
_local22 = _local22 * 0.0174532922222222;
var _local16 = (Math.cos(_local22) * s) / 2;
var _local15 = (Math.sin(_local22) * s) / 2;
var _local4;
var _local27;
var _local17 = 1;
var _local18 = 0;
var _local13 = 1;
var _local14 = -1;
mp = 1;
while (mp > 0.001) {
var _local2 = new Object();
_local2.r = _local10;
_local2.g = _local11;
_local2.b = _local12;
var _local9 = mp / 4;
var _local8 = mp / 4;
_local4 = _local17;
while (_local4 >= _local18) {
lb = _local13;
while (lb >= _local14) {
var _local7 = _local16 * _local4;
var _local6 = _local15 * _local4;
var _local3 = gca(_local7, _local6, lb);
var _local5 = (Math.abs(_local3.r - _local10) + Math.abs(_local3.g - _local11)) + Math.abs(_local3.b - _local12);
if ((_local5 < _local2.da) or (!_local2.hda)) {
_local2 = _local3;
_local2.hda = true;
_local2.da = _local5;
_local2.lv = _local4;
_local2.lb = lb;
}
lb = lb - _local8;
}
_local4 = _local4 - _local9;
}
_local17 = Math.min(1, _local2.lv + (_local9 / 2));
_local18 = Math.max(0, _local2.lv - (_local9 / 2));
_local13 = Math.min(1, _local2.lb + (_local8 / 2));
_local14 = Math.max(-1, _local2.lb - (_local8 / 2));
mp = mp * 0.2;
}
trace((((("cc get: " + _local2.x) + ", ") + _local2.y) + ", ") + _local2.bv);
cc = gca(_local2.x, _local2.y, _local2.bv, true);
this._parent.forceUpdate();
mk._x = _local2.x + 42;
mk._y = _local2.y + 42;
trace("sup? " + cc.c);
this._parent.colorSet(cc.c, cc);
}
function gca(x, y, lb, wcc) {
var _local1 = new Object();
_local1.bv = lb;
var _local2 = Math.max(0, Math.sqrt((x * x) + (y * y)) - (s / 20)) * ((s / 2) / ((s / 2) - (s / 20)));
if (_local2 > (s / 2)) {
x = x * ((s / 2) / _local2);
y = y * ((s / 2) / _local2);
_local2 = s / 2;
}
var _local7 = _local2 / (s / 2);
_local2 = Math.atan2(y, x);
var _local10;
var _local5;
var _local11;
var _local6;
var _local12;
var _local4;
_local10 = (_local7 * Math.max(-addVal, Math.min(256 - addVal, Math.cos(_local2) * mixVal))) + addVal;
_local5 = _local10;
_local11 = (_local7 * Math.max(-addVal, Math.min(256 - addVal, Math.cos(_local2 + 2.09439506666667) * mixVal))) + addVal;
_local6 = _local11;
_local12 = (_local7 * Math.max(-addVal, Math.min(256 - addVal, Math.cos(_local2 + 4.18879013333333) * mixVal))) + addVal;
_local4 = _local12;
if (lb < 0) {
_local5 = _local5 + ((255 - _local5) * Math.abs(lb));
_local6 = _local6 + ((255 - _local6) * Math.abs(lb));
_local4 = _local4 + ((255 - _local4) * Math.abs(lb));
} else {
_local5 = _local5 + ((-_local5) * lb);
_local6 = _local6 + ((-_local6) * lb);
_local4 = _local4 + ((-_local4) * lb);
}
_local1.r = Math.max(0, Math.min(255, Math.round(_local5)));
_local1.g = Math.max(0, Math.min(255, Math.round(_local6)));
_local1.b = Math.max(0, Math.min(255, Math.round(_local4)));
_local1.nr = Math.max(0, Math.min(255, Math.round(_local10)));
_local1.ng = Math.max(0, Math.min(255, Math.round(_local11)));
_local1.nb = Math.max(0, Math.min(255, Math.round(_local12)));
_local1.x = x;
_local1.y = y;
if (wcc) {
_local1.c = (256 * ((256 * _local1.r) + _local1.g)) + _local1.b;
_local1.nc = (256 * ((256 * _local1.nr) + _local1.ng)) + _local1.nb;
}
return(_local1);
}
function updateColor(ignoreMouse) {
if (!ignoreMouse) {
cc = gca(_xmouse - (s / 2), _ymouse - (s / 2), cc.bv, true);
} else {
cc = gca(cc.x, cc.y, cc.bv, true);
}
mk._x = cc.x + 42;
mk._y = cc.y + 42;
this._parent.forceUpdate();
this._parent.colorSet(cc.c, cc);
}
mixVal = 255;
addVal = 127;
s = 84;
x = 0;
y = 0;
dep = 0;
mk = this.createEmptyMovieClip("mk", ++dep);
mk.lineStyle(4, 16777215);
mk.moveTo(-5, 0);
mk.lineTo(5, 0);
mk.moveTo(0, -5);
mk.lineTo(0, 5);
mk.lineStyle(2, 0);
mk.moveTo(-5, 0);
mk.lineTo(5, 0);
mk.moveTo(0, -5);
mk.lineTo(0, 5);
mk._rotation = 45;
this.setBrightness = function (a) {
this.cc.bv = (a - 50) / 50;
var _local2 = this.shade;
if (a >= 50) {
_local2.black = true;
new Color(_local2).setRGB(0);
} else {
_local2.black = false;
new Color(_local2).setRGB(16777215);
}
_local2._visible = false;
_local2._alpha = Math.abs(a - 50) * 2;
this.updateColor(true);
};
cc = gca(0, 0, 0, true);
updateColor(true);
this.onPress = function () {
this.mouseOver = true;
this.clicked = true;
_root.cbDown = true;
updateColor();
};
this.onRollOver = function () {
this.mouseOver = true;
this.clicked = false;
};
this.onRollOut = function () {
this.mouseOver = false;
this.clicked = false;
};
this.onDragOver = function () {
this.mouseOver = true;
this.clicked = true;
updateColor();
};
this.onMouseMove = function () {
if (this.clicked) {
updateColor();
}
};
this.onDragOut = function () {
this.mouseOver = false;
this.clicked = true;
updateColor();
};
this.onRelease = function () {
this.mouseOver = true;
this.clicked = false;
_root.cbDown = false;
updateColor();
};
this.onReleaseOutside = function () {
this.mouseOver = false;
this.clicked = false;
_root.cbDown = false;
};
Symbol 99 MovieClip Frame 1
function updateBrightness(ignoreMouse) {
if (!ignoreMouse) {
brightness = (100 * Math.min(111, Math.max(0, this._ymouse))) / 111;
}
redraw();
brightnessSet(brightness);
}
function redraw() {
mk._y = (111 * brightness) / 100;
}
dep = 0;
brightness = 50;
a = this.createEmptyMovieClip("colorClip", ++dep);
a.beginFill(8421504);
a.lineTo(24, 0);
a.lineTo(24, 111);
a.lineTo(0, 111);
a.lineTo(0, 0);
a.endFill();
ac.swapDepths(++dep);
a = this.createEmptyMovieClip("lines", ++dep);
a.lineStyle(0);
a.lineTo(24, 0);
a.lineTo(24, 111);
a.lineTo(0, 111);
a.lineTo(0, 0);
mk = this.createEmptyMovieClip("mk", ++dep);
mk.dep = 0;
this.mkf = (f = mk.createEmptyMovieClip("mkf", ++mk.dep));
f.beginFill(0);
f.moveTo(-2, -5);
f.lineTo(26, -5);
f.lineTo(26, 5);
f.lineTo(-2, 5);
f.lineTo(-2, -5);
f.endFill();
f = mk.createEmptyMovieClip("mkl", ++mk.dep);
f.lineStyle(1, 0);
f.moveTo(-2, -5);
f.lineTo(26, -5);
f.lineTo(26, 5);
f.lineTo(-2, 5);
f.lineTo(-2, -5);
this.onPress = function () {
this.mouseOver = true;
this.clicked = true;
_root.cbDown = true;
updateBrightness();
};
this.onRollOver = function () {
this.mouseOver = true;
this.clicked = false;
};
this.onRollOut = function () {
this.mouseOver = false;
this.clicked = false;
};
this.onDragOver = function () {
this.mouseOver = true;
this.clicked = true;
updateBrightness();
};
this.onMouseMove = function () {
if (this.clicked) {
updateBrightness();
}
};
this.onDragOut = function () {
this.mouseOver = false;
this.clicked = true;
updateBrightness();
};
this.onRelease = function () {
this.mouseOver = true;
this.clicked = false;
_root.cbDown = false;
updateBrightness();
};
this.onReleaseOutside = function () {
this.mouseOver = false;
this.clicked = false;
_root.cbDown = false;
};
Symbol 100 MovieClip [Selector] Frame 1
function setColor(c, o) {
cw.setColor(c, o);
}
function setWhite() {
cw.setColor({x:0, y:0, bv:-1, r:255, g:255, b:255, nr:127, ng:127, nb:127, c:16777215});
}
function setBlack() {
cw.setColor({x:0, y:0, bv:1, r:0, g:0, b:0, nr:127, ng:127, nb:127, c:0});
}
function getColorObj() {
return(cw.getColorObj());
}
function forceUpdate() {
bb.brightness = (cw.cc.bv * 50) + 50;
new Color(bb.mkf).setRGB(cw.cc.c);
new Color(bb.colorClip).setRGB(cw.cc.nc);
bb.redraw();
}
bb.brightnessSet = function (a) {
cw.setBrightness(a);
};
this.onEnterFrame = function () {
bb.updateBrightness(true);
this.onEnterFrame = null;
};
Symbol 108 MovieClip Frame 1
function setInk(iii, mmm) {
ih = (((sh + 0.9) * iii) / mmm) - 0.9;
inko.clear();
var _local8 = ih;
if (_local8 < 0) {
_local8 = _local8 * 10;
}
if (_local8 < -30) {
_local8 = -30;
}
var _local10 = 20 + (_local8 * 2);
if (_local10 < 0) {
_local10 = 0;
}
inko.beginFill(0, _local10);
var _local6 = 30;
h1 = 12;
h2 = 24;
var _local5;
if ((ih >= h1) && (ih <= h2)) {
_local5 = 30 - (lfra[Math.floor((500 * (ih - h1)) / (h2 - h1))] * 10);
if (_local5 < 20) {
_local5 = 20;
}
if (_local5 > 30) {
_local5 = 30;
}
} else if (ih < h1) {
_local5 = 30;
} else if (ih > h2) {
_local5 = 20;
}
var _local7 = ih;
var _local2 = 0;
if (_local7 < 0) {
_local7 = 0;
}
var _local1 = 0;
while (_local1 < _local6) {
var _local4 = (Math.cos(Math.PI * (1 + (_local1 / _local6))) * (_local5 + 1)) / 2;
_local2 = 0.25 + ((0.25 * (sh - ih)) / sh);
if (_local2 > 0.5) {
_local2 = 0.5;
}
var _local3 = (((Math.sin(Math.PI * (1 + (_local1 / _local6))) * ((_local5 * _local2) + 1)) / 2) + 7) - _local7;
if (_local1 == 0) {
inko.moveTo(_local4, _local3);
} else {
inko.lineTo(_local4, _local3);
}
_local1++;
}
inko.lineTo(_local4 + 60, _local3);
inko.lineTo(15, 20);
inko.lineTo(-15, 20);
inko.lineTo(_local4 - 60, _local3);
inko.endFill();
inko.h._x = 0;
inko.h._y = _local3;
var _local9 = 1;
if (_local8 < 0) {
_local9 = 1 + (_local8 / 10);
}
if (_local9 < 0) {
_local9 = 0;
}
inko.h._width = (_local9 * _local5) + 1;
inko.h._height = ((_local9 * _local5) * _local2) + 1;
_local10 = (10 + _local8) * 2;
if (_local10 < 0) {
_local10 = 0;
}
inko.h._alpha = _local10;
if (ih < -0.9) {
ih = -0.9;
}
}
p2 = _root.lfo(0.2);
p1 = _root.lfo(0.1);
p08 = _root.lfo(0.08);
p05 = _root.lfo(0.05);
p02 = _root.lfo(0.02);
p01 = _root.lfo(0.01);
ww = Math.floor(Stage.width);
hh = Math.floor(Stage.height);
w2 = Math.round(ww / 2);
h2 = Math.round(hh / 2);
lfra = new Array();
var l = 500;
var v = 0;
var mv = 0;
var i = 0;
while (i < l) {
v = v + Math.sin((Math.PI * i) / l);
nv = v + 1;
lfra[i] = nv;
if (nv > mv) {
mv = nv;
}
i++;
}
var i = 0;
while (i < l) {
lfra[i] = lfra[i] / mv;
i++;
}
lfra[0] = 0;
inko.setMask(inkm);
ih = 28;
sh = ih;
setInk(0, 1);
Symbol 117 MovieClip Frame 1
function checkDuane() {
if ((((duane.d && (duane.u)) && (duane.a)) && (duane.n)) && (duane.e)) {
duane.good = true;
}
}
function setPen(p) {
ctx = -1;
cty = -1;
if (penis != p) {
pcc.c._visible = false;
pcc.ft._visible = false;
if (penis_clip != undefined) {
penis_clip.removeMovieClip();
penis_clip = undefined;
}
penis = p;
if (penis == "pen") {
pcc.c._visible = true;
pcc.ft._visible = true;
} else if (penis == "eyedropper") {
penis_clip = pcc.attachMovie("eyedropper", "eyedropper", 69);
} else if (penis == "textg") {
penis_clip = pcc.attachMovie("textg", "textg", 69);
penis_clip._xscale = (penis_clip._yscale = 100 + ((450 * this.ps) / 120));
}
}
}
function updateLj() {
if (history_mode) {
lj = 2;
} else if ((f_dm == "discord") || (f_dm == "two")) {
if (draw_level == 0) {
if (Key.isDown(16)) {
lj = 6;
} else {
lj = 3;
}
} else if (draw_level == 3) {
lj = 3;
}
} else if (draw_level == 0) {
if (Key.isDown(16)) {
lj = 6;
} else {
lj = 2;
}
} else if (draw_level == 2) {
if (Key.isDown(16)) {
lj = 4;
} else {
lj = 2;
}
} else if (draw_level == 4) {
lj = 2;
}
}
function updateLj2() {
if (history_mode) {
lj = 2;
} else if ((f_dm == "discord") || (f_dm == "two")) {
if (draw_level == 6) {
if (Key.isDown(16)) {
lj = 6;
} else {
lj = 3;
}
} else if (draw_level == 3) {
lj = 3;
} else {
lj = 0;
}
} else if (draw_level == 6) {
if (Key.isDown(16)) {
lj = 6;
} else {
lj = 2;
}
} else if (draw_level == 4) {
if (Key.isDown(16)) {
lj = 4;
} else {
lj = 2;
}
} else if (draw_level == 2) {
lj = 2;
} else {
lj = 0;
}
}
function rsld() {
psx = (lpx = px);
psy = (lpy = py);
var _local2 = cs[0];
_local2.lc++;
if (_local2.lc > 2000000) {
_local2.lc = 1;
}
_local2.createEmptyMovieClip("l" + _local2.lc, ++_local2.dep);
if (_local2.dep > 80000) {
_local2.dep = 420;
}
ld = new Array();
ld.push(_root.i2s(_local2.lc, 3));
ld.push(_root.i2s(ps, 1));
ld.push(_root.i2s(pc, 4));
ld.push(_root.i2s(px, 3));
ld.push(_root.i2s(py, 3));
ldpc = 1;
cpl = _local2["l" + _local2.lc];
cpl.dep = 0;
tail = cpl.createEmptyMovieClip("tail", ++cpl.dep);
cpl.lineStyle(ps, pc);
cpl.moveTo(px - 0.5, py - 0.5);
iap = true;
}
function ttlm(mc, u) {
if (niq) {
mc.unloadMovie();
var _local1 = mtl.length - 1;
while (_local1 >= 0) {
if (mtl[_local1] == mc) {
mtl.splice(_local1, 1);
utl.splice(_local1, 1);
}
_local1--;
}
mtl.push(mc);
utl.push(u);
}
}
function setLevel(l, chl) {
if (l < 0) {
level = 0;
} else {
level = l;
}
if (chl == undefined) {
draw_level = Math.floor(l);
} else {
draw_level = Math.floor(l) + chl;
}
polc = true;
if (draw_level > 0) {
pcc._alpha = (pcc.da = (pcc.a = 0));
}
tn.box.text = Math.floor((100 * (max_level - level)) / max_level) + "%";
}
function zc() {
var _local10;
var _local7 = cs[draw_level];
ixMin = Math.floor((xx - (pow2[draw_level] * s2)) / (pow2[draw_level] * cell_size));
iyMin = Math.floor((yy - (pow2[draw_level] * s2)) / (pow2[draw_level] * cell_size));
ixMax = Math.floor((xx + (pow2[draw_level] * s2)) / (pow2[draw_level] * cell_size));
iyMax = Math.floor((yy + (pow2[draw_level] * s2)) / (pow2[draw_level] * cell_size));
if (ixMin < 0) {
ixMin = 0;
}
if (iyMin < 0) {
iyMin = 0;
}
if (ixMax >= pow2[max_level - draw_level]) {
ixMax = pow2[max_level - draw_level] - 1;
}
if (iyMax >= pow2[max_level - draw_level]) {
iyMax = pow2[max_level - draw_level] - 1;
}
var _local5 = new Array();
var _local11 = ccc.length - 1;
while (_local11 >= 0) {
_local10 = ccc[_local11];
if ((((((((!_local10.history_mode) || (_local10.history_mode && (_local10.chlHtm == chlHtm))) && (history_mode == _local10.history_mode)) && (_local10.il == draw_level)) && (_local10.ix >= ixMin)) && (_local10.ix <= ixMax)) && (_local10.iy >= iyMin)) && (_local10.iy <= iyMax)) {
} else {
if (_local10.connected) {
if (!_local10.history_mode) {
x.send((("x" + _root.i2s(_local10.ix, 2)) + _root.i2s(_local10.iy, 2)) + _root.i2s(_local10.draw_level, 1));
}
_local10.connected = false;
}
ccc.splice(_local11, 1);
_local5.push(_local10);
}
_local11--;
}
var _local12 = false;
var _local4 = iyMin;
while (_local4 <= iyMax) {
var _local2 = ixMin;
while (_local2 <= ixMax) {
var _local6 = (("i" + _local2) + "_") + _local4;
_local10 = _local7[_local6];
if (_local10 == undefined) {
_local7.createEmptyMovieClip(_local6, ++_local7.dep);
_local10 = _local7[_local6];
_local10._x = _local2 * cell_size;
_local10._y = _local4 * cell_size;
_local10.ix = _local2;
_local10.iy = _local4;
_local10.il = draw_level;
_local10.draw_level = draw_level;
_local10.attachMovie("im", "mm", 1);
_local10.setMask(_local10.mm);
_local10.createEmptyMovieClip("img", 2);
_local10.img.dep = 0;
_local10.img.c = 0;
_local10.img.iua = new Array();
_local10.v = 15500;
}
if (!_local10.connected) {
if (ccc.length < 4) {
trace("pushing " + _local6);
_local12 = true;
_local11 = lvmcs.length - 1;
while (_local11 >= 0) {
if (lvmcs[_local11] == _local10) {
lvmcs.splice(_local11, 1);
break;
}
_local11--;
}
lvmcs.push(_local10);
if (history_mode) {
if (chlHtm < 0) {
chlHtm = 0;
}
_local10.chlHtm = chlHtm;
_local10.v = -1;
var _local8 = ((("h" + _root.i2s(_local2, 2)) + _root.i2s(_local4, 2)) + _root.i2s(draw_level, 1)) + _root.i2s(chlHtm, 5);
} else {
_local10.tm = -1;
var _local8 = (("b" + _root.i2s(_local2, 2)) + _root.i2s(_local4, 2)) + _root.i2s(draw_level, 1);
}
_local10.history_mode = history_mode;
_local10.connected = true;
if (connected) {
x.send(_local8);
} else {
xca.push(_local8);
}
_local10.img["i" + _local10.img.c]._alpha = 100;
_local11 = _local5.length - 1;
while (_local11 >= 0) {
if (_local5[_local11] == _local10) {
_local5.splice(_local11, 1);
}
_local11--;
}
ccc.push(_local10);
trace("PuSHeD " + _local10);
b_s++;
cal(history_mode);
if (lvmcs.length > 20) {
var _local3 = lvmcs.shift();
_local11 = _local3.img.iua.length - 1;
while (_local11 >= 0) {
_local3.img.iua[_local11].unloadMovie();
_local11--;
}
_local3.img["i" + _local3.img.c].unloadMovie();
_local3.removeMovieClip();
}
}
}
_local2++;
}
_local4++;
}
if ((draw_level == level) && (draw_level == 0)) {
_local11 = _local5.length - 1;
while (_local11 >= 0) {
_local10 = _local5[_local11];
if (_local10.draw_level == 0) {
var _local9 = _local10.img["i" + _local10.img.c];
if (_local9.l != undefined) {
_local9.l.removeMovieClip();
delete _local9.l;
_local9.bm.dispose();
trace("BYE SON TWO");
}
}
_local11--;
}
}
if (_local12) {
bdl = (btl = 0);
lba = (lb._alpha = 100);
lb.b.w = (lb.b._width = 0);
tdl = draw_level;
}
}
function cal(a) {
dnlac = true;
if (a) {
alnl = true;
}
}
function loading() {
return((((dnlac && (alnl)) || (dnlac && (history_mode))) || (j_limbo)) || (connecting));
}
function sbf(force) {
var _local2 = !((loading() || (level != draw_level)) || (!dgtnl));
var _local1 = all;
if (((_local1.sbfm != _local2) || (_local1.sbfl != level)) || (force)) {
_local1.sbfm = _local2;
_local1.sbfl = level;
zoBtn.setEnabled(false);
delete _local1.onPress;
delete _local1.onRelease;
delete _local1.onReleaseOutside;
delete _local1.onDragOver;
delete _local1.onDragOut;
delete _local1.onRollOver;
delete _local1.onRollOut;
_local1.useHandCursor = true;
Mouse.show();
if (_local2) {
zb._alpha = 0;
if (history_mode && (draw_level == 3)) {
} else if (level > 0) {
_local1.onPress = cop;
} else if (!history_mode) {
_local1.onPress = cop_d;
_local1.onRelease = cor_d;
_local1.onReleaseOutside = coro_d;
_local1.onDragOver = coDragOver_d;
_local1.onDragOut = coDragOut_d;
_local1.onRollOver = coRollOver_d;
_local1.onRollOut = coRollOut_d;
_local1.onReleaseOutside = coro_d;
_local1.useHandCursor = false;
pcc._x = (pcc._y = -31337);
}
zoBtn.setEnabled(draw_level < max_level);
}
}
}
function adjustSize() {
this._x = 0;
this._y = 0;
url._y = hh - 20;
allh._x = Math.floor((ww / 2) - s2);
allh._y = Math.floor((hh / 2) - s2);
bg._x = allh._x + s2;
bg._y = allh._y + s2;
cw._x = (ww / 2) + 348;
cw._y = (hh / 2) + 212;
eyedropperBtn._x = (ww / 2) + 305;
eyedropperBtn._y = (hh / 2) + 273;
textgBtn._x = (ww / 2) + 335;
textgBtn._y = (hh / 2) - 302;
penBtn._x = (ww / 2) + 420;
penBtn._y = (hh / 2) - 302;
ih._x = (ww / 2) + 317;
ih._y = (hh / 2) + 114;
hofBtn._x = ww - 108;
hofBtn._y = 26;
iih._x = (ww / 2) + 317;
iih._y = (hh / 2) + 124;
lb._x = ((ww / 2) + 50) - 305;
lb._y = (hh / 2) + 290;
olderBtn._x = (ogs._x = (ww / 2) - 320);
newerBtn._x = (ngs._x = (ww / 2) - 300);
olderBtn._y = 32;
ogs._y = 33;
newerBtn._y = 32;
bht._x = (ww / 2) - 310;
bht._y = 52;
ngs._y = 33;
zh._x = (ww / 2) - 315;
zh._y = (hh / 2) + 221;
i = 1;
while (i < psb.length) {
var _local2 = psb[i];
_local2._x = (((ww / 2) + 401) + _local2.tx) - 100;
_local2._y = (((hh / 2) + 254) + _local2.ty) + 20;
i++;
}
bst._x = (ww / 2) + 325;
bst._y = (hh / 2) + 304;
}
function setInk(l) {
dil = l;
var _local1 = Math.floor((9000 * (l - mil)) / (max_ink - mil));
if (_local1 > 9000) {
inkt.box.text = "over 9000%";
} else {
inkt.box.text = Math.max(0, Math.min(9000, _local1)) + "%";
}
}
function setHistoryMode(b) {
if (history_mode != b) {
polc = true;
history_mode = b;
}
var _local2 = lvmcs.length - 1;
while (_local2 >= 0) {
var _local1 = lvmcs[_local2];
if (!_local1.connected) {
_local1.img["i" + _local1.img.c]._visible = _local1.history_mode == b;
}
_local2--;
}
}
dep = 0;
f_dm = "two";
port1 = 8009;
port2 = 8009;
if (_root.dm.substr(_root.dm.length - 13) != ".drawball.com") {
return(undefined);
}
if (_root.dm.indexOf("chaos") >= 0) {
f_dm = "discord";
} else if (_root.dm.indexOf("discord") >= 0) {
f_dm = "choas";
}
var sk_dm = "data";
if (f_dm == "discord") {
sk_dm = "discord";
}
var cil = ((dil = 0));
b_r = 0;
b_s = 0;
itt = 0;
bgbr = 0;
bgbg = 0;
bgbb = 0;
lfr = 0;
fdl = 0;
tdl = 0;
xof = 0;
yof = 0;
cldm = 0;
sv = 0;
lpt = 0;
lit = 0;
lba = 0;
lb.b._width = 0;
lb.b.w = 0;
lb.b.dw = 0;
lbta = 0;
bdl = 0;
btl = 0;
b_tm = (f_tm = (t_tm = (lutm = 0)));
b_ls = new Array();
duane = new Object();
if (f_dm == "discord") {
_root.l = "ayylmao";
cnc = "ayylmao";
cnc2 = "top kek";
} else {
cnc = _root.l;
cnc2 = "";
}
var so = SharedObject.getLocal("drawball", "/");
_root.cpid = so.data.cpid;
if (_root.cpid.length != 128) {
_root.cpid = " ";
}
_root.l = so.data.l;
so.data.l = "";
lvmcs = new Array();
setHistoryMode(false);
System.security.loadPolicyFile((("xmlsocket://" + sk_dm) + ".drawball.com:") + port1);
cell_size = 660;
cs2 = cell_size / 2;
d21 = Math.pow(cs2 - 15, 2);
d22 = Math.pow(cs2 + 15, 2);
niq = false;
max_level = 6;
ss = cell_size;
s2 = ss / 2;
scsc = 100 / (cell_size / (cell_size + 1));
chz = _root.l.split("-");
chlt = chz[0].toLowerCase();
chlHtm = chz[1];
if (chlHtm.length > 0) {
chlHtm = Number(chlHtm);
} else {
chlHtm = 0;
}
delete _root.l;
var ntf = bst.box.getNewTextFormat();
ntf.align = "center";
bst.box.setNewTextFormat(ntf);
var ps = 6;
trace("ps iz " + ps);
bst.box.text = ps;
var tsb;
psb = new Array();
tx = 0;
ty = 0;
var i = 1;
while (i <= 1) {
var j = i;
if (j > 8) {
j = j + (j - 8);
}
if (j > 15) {
j = j + ((j - 15) * 2);
}
j = 30;
var b = this.attachMovie("bevelButton", ("ps" + i) + "Btn", ++dep);
b.setRadio(true);
b.setSize(9 + j, 9 + j);
b.setColor(16772829);
var g = b.graphics.attachMovie("circle", "g", 1);
g._width = (g._height = (b.ps = this.ps));
tx = tx + (20 + j);
if (tx >= 200) {
tx = 0;
ty = ty + 20;
}
b.tx = tx;
b.ty = ty;
b.bg1._alpha = (b.bg2._alpha = (b.obga = (30 * (j + 1)) / 8));
b.br._alpha = 50;
psb[i] = b;
b.clicked = function () {
};
b.ultraDown = true;
tsb = b;
i++;
}
this.createEmptyMovieClip("txh", ++dep);
txh._alpha = 0;
txh._visible = false;
var tf = txh.createTextField("taxt", 3, 0, 0, 500, 500);
var tft = tf.getNewTextFormat();
tft.font = "Arial Black";
tft.size = 25;
tft.color = 0;
tf.antiAliasType = "none";
tf.setTextFormat(tft);
tf.setNewTextFormat(tft);
var ctx;
var cty;
var btx;
var bty;
ctx = -1;
var penis = "pen";
var penis_clip = undefined;
var b = this.attachMovie("bevelButton", "eyedropperBtn", ++dep);
b.setSize(30, 30);
b.setColor(16772829);
b.setRadio(true);
var g = b.graphics.attachMovie("eyedropper", "g", 1);
g._xscale = (g._yscale = 25);
g._x = -6;
g._y = 10;
b.clicked = function () {
setPen("eyedropper");
};
var b = this.attachMovie("bevelButton", "textgBtn", ++dep);
b.setSize(60, 47);
b.setColor(9474192);
var g = b.graphics.attachMovie("textg", "g", 1);
b.clicked = function () {
setPen("textg");
};
var b = this.attachMovie("bevelButton", "penBtn", ++dep);
b.setSize(60, 47);
b.setColor(9474192);
var g = b.graphics.attachMovie("ft", "g", 1);
g._xscale = (g._yscale = 55);
g._x = -5;
g._y = 17;
b.clicked = function () {
setPen("pen");
};
penis_btnz = [textgBtn, penBtn];
var i = (penis_btnz.length - 1);
while (i >= 0) {
penis_btnz[i]._visible = false;
penis_btnz[i]._alpha = 0;
penis_btnz[i].setEnabled(false);
i--;
}
penises_visible = false;
penises_enabled = false;
penises_alpha = 0;
if (f_dm == "discord") {
this.attachMovie("chaosbg", "bg", ++dep);
} else {
this.attachMovie("bg", "bg", ++dep);
}
bg.b.hm = -1000;
this.createEmptyMovieClip("allh", ++dep);
allh.dep = 0;
allh.createEmptyMovieClip("all", ++allh.dep);
all = allh.all;
all.dep = 0;
pow2 = new Array();
var i = -1;
while (i <= max_level) {
pow2[i] = Math.pow(2, i);
i++;
}
if (f_dm == "one") {
php = ("http://" + f_dm) + ".drawball.com/i/img.php";
} else if (f_dm == "two") {
php = ("http://" + f_dm) + ".drawball.com/i2/img.php";
} else if (f_dm == "discord") {
php = ("http://" + f_dm) + ".drawball.com/i2/img.php";
}
p01 = _root.lfo(0.01);
p02 = _root.lfo(0.02);
p03 = _root.lfo(0.03);
p04 = _root.lfo(0.04);
p05 = _root.lfo(0.05);
p08 = _root.lfo(0.08);
p1 = _root.lfo(0.1);
p2 = _root.lfo(0.2);
p3 = _root.lfo(0.3);
p4 = _root.lfo(0.4);
p5 = _root.lfo(0.5);
hdv = 2;
polch = "23456789abcdefghijkLmnopqrstuvwxyz";
lpolch = polch.toLowerCase();
if (chlt.length > 0) {
var mv = Math.pow(polch.length, chlt.length);
var v = 0;
var i = 0;
while (i < chlt.length) {
mv = mv / polch.length;
v = v + (lpolch.indexOf(chlt.charAt(i)) * mv);
i++;
}
start_level = Math.floor(v / (((cell_size * 64) * cell_size) * 64));
v = v - ((((start_level * cell_size) * 64) * cell_size) * 64);
xx = Math.floor(v / (cell_size * 64));
v = v - ((xx * cell_size) * 64);
yy = v;
if (xx <= 0) {
xx = 0;
}
if (yy <= 0) {
yy = 0;
}
if (start_level <= 0) {
start_level = 0;
}
if (((start_level > 6) || (xx > (66 * cell_size))) || (yy > (66 * cell_size))) {
xx = Math.round(cell_size / 2);
yy = Math.round(cell_size / 2);
start_level = 6;
}
var l2 = pow2[start_level];
var ax = (s2 - (xx / l2));
var ay = (s2 - (yy / l2));
all._x = (all.x = Math.floor(ax));
all._y = (all.y = Math.floor(ay));
setHistoryMode(chlHtm > 0);
if (history_mode) {
lj = 3;
} else if (start_level == 6) {
lj = 3;
} else if (start_level == 3) {
lj = 3;
} else {
lj = 0;
}
}
ww = Math.ceil(Stage.width);
hh = Math.ceil(Stage.height);
if (lj == undefined) {
lj = 3;
}
zlj = lj;
if (start_level == undefined) {
start_level = max_level;
}
cpp = cell_size * 32;
if (xx == undefined) {
xx = cpp;
}
if (yy == undefined) {
yy = cpp;
}
ox = (dxx = xx);
oy = (dyy = yy);
polc = true;
polct = 0;
msdafs = cell_size + 32;
cw.colorSet = function (c, o) {
pc = c;
if (penis != "textg") {
setPen("pen");
}
};
iih._visible = false;
new Color(iih).setRGB(0);
new Color(ih.ilft).setRGB(0);
new Color(ih.inkt).setRGB(0);
new Color(url).setRGB(0);
var hsmb = false;
this.attachMovie("bevelButton", "stopMusicBtn", 81337);
stopMusicBtn.graphics.attachMovie("stopMusicGraphic", "g", 1);
stopMusicBtn._alpha = 0;
stopMusicBtn.setEnabled(true);
stopMusicBtn.setRadio(true);
stopMusicBtn.setColor(16756832);
stopMusicBtn.setSize(45, 45);
stopMusicBtn._x = (stopMusicBtn.dx = 64);
stopMusicBtn._y = (stopMusicBtn.dy = 64);
stopMusicBtn.clicked = function () {
if (_parent.css != undefined) {
_parent.css.stop();
}
this.setEnabled(false);
hsmb = true;
};
zoBtn = zh.zoBtn;
zoBtn._alpha = (zoa = 0);
zoBtn.setEnabled(false);
zoBtn.setRadio(true);
tn = zh.tn;
zoBtn.graphics.attachMovie("zoGraphic", "g", 1);
zoBtn.setColor(16772829);
zoBtn.clicked = function () {
if (draw_level < max_level) {
ox = xx;
oy = yy;
zb.ox = (zb.x = s2);
zb.oy = (zb.y = s2);
zo = true;
dgtnl = false;
cal(true);
fdl = draw_level;
updateLj();
zlj = lj;
if (history_mode) {
lj = 3;
} else if (draw_level == 0) {
lj = 3;
} else if (draw_level == 3) {
lj = 3;
}
zlj = lj;
setLevel(level, lj);
tdl = draw_level;
zb._alpha = 0;
if (tdl == max_level) {
xx = (yy = (dxx = (dyy = cpp)));
polc = true;
} else {
dx = xx - cpp;
dy = yy - cpp;
var _local2 = Math.sqrt((dx * dx) + (dy * dy));
var _local1 = cpp - (ss * pow2[tdl - 1]);
if (duane.good) {
_local1 = _local1 * 2;
_local1 = _local1 + 10560;
}
if (_local2 > _local1) {
xx = (dxx = cpp + Math.round((dx * _local1) / _local2));
yy = (dyy = cpp + Math.round((dy * _local1) / _local2));
}
}
zc();
}
};
ccc = new Array();
lua = new Array();
lfra = new Array();
var l = 80;
var v = 0;
var mv = 0;
var i = 0;
while (i < l) {
v = v + Math.sin((Math.PI * i) / l);
nv = v + 1;
lfra[i] = nv;
if (nv > mv) {
mv = nv;
}
i++;
}
var i = 0;
while (i < l) {
lfra[i] = lfra[i] / mv;
i++;
}
lfra[0] = 0;
allh.attachMovie("circle", "allm", ++allh.dep);
allm = allh.allm;
allm._width = ss;
allm._x = s2;
allm._height = ss;
allm._y = s2;
all._alpha = 0;
allh.setMask(allm);
cs = new Array();
var i = max_level;
while (i >= 0) {
all.createEmptyMovieClip("c" + i, ++all.dep);
cs[i] = all["c" + i];
var c = cs[i];
c.lc = 0;
c.draw_level = i;
c.dep = 420;
i--;
}
ink = ih.ink;
inkt = ih.inkt;
allh.createEmptyMovieClip("zb", ++allh.dep);
zb = allh.zb;
zb.sc = 0;
zb.dsc = 0;
zb.dr = 0;
zb.dep = 0;
zb.attachMovie("zoom", "zoom", ++zb.dep);
zb._alpha = 0;
allh.createEmptyMovieClip("mic", ++allh.dep);
mic._x = s2;
mic._y = s2;
mic = allh.mic;
ruleac = 1;
this.createEmptyMovieClip("pcc", ++this.dep);
pcc.dep = 0;
pcc._alpha = (pcc.da = (pcc.a = 0));
pcc.attachMovie("c", "c", 888);
pcc.c._alpha = 50;
pcc.attachMovie("ft", "ft", 999);
this.attachMovie("lb", "lb", ++dep);
piq = true;
this.cop = function () {
if (!loading()) {
dgtnl = false;
cal(true);
ox = xx;
oy = yy;
xx = Math.floor((zb.x - all.x) * Math.pow(2, draw_level));
yy = Math.floor((zb.y - all.y) * Math.pow(2, draw_level));
dxx = xx;
dyy = yy;
fdl = draw_level;
zlj = lj;
setLevel(level, -lj);
updateLj2();
if (history_mode) {
lj = 3;
} else if (draw_level == 6) {
lj = 3;
} else if (draw_level == 3) {
lj = 3;
} else {
lj = 0;
}
polc = true;
zb.ox = (zb.x = zb._x);
zb.oy = (zb.y = zb._y);
zc();
}
};
var dfcpl = undefined;
var rnz = [];
var rnt = [];
var penises = [];
this.cop_d = function () {
if (!piq) {
if (allh.envelope == undefined) {
allh.attachMovie("envelope", "envelope", ++allh.dep);
allh.envelope._x = 333;
allh.envelope._y = 333;
allh.envelope._alpha = 0;
allh.envelope.callback = function () {
piq = true;
};
}
return(undefined);
}
if (penis_clip != undefined) {
if (penis == "pen") {
trace("FUCK FUCK FUCK");
}
if (penis == "eyedropper") {
var _local7 = new flash.display.BitmapData(32, 32, true, 0);
trace((("bm size " + _local7.width) + " ") + _local7.height);
var _local19;
var _local20;
var _local18;
var _local2;
var _local3;
var _local8;
var _local22;
var _local21;
var _local11 = Math.floor(pmx - all.x) - 16;
var _local10 = Math.floor(pmy - all.y) - 16;
var _local9 = -1;
while (_local9 <= 2) {
var _local4 = -1;
while (_local4 <= 2) {
ix = Math.floor(_local11 / 660) + _local9;
iy = Math.floor(_local10 / 660) + _local4;
_local2 = cs[0][(("i" + ix) + "_") + iy];
_local3 = _local2.img["i" + _local2.img.c].i;
_local8 = _local2.img["i" + _local2.img.c].bm;
trace((((((("found at " + ix) + ",") + iy) + " ") + typeof(_local3)) + " ") + _local3._width);
if (_local3 != undefined) {
var _local16 = new flash.geom.Matrix();
var _local6 = (ix * 660) - _local11;
var _local5 = (iy * 660) - _local10;
_local16.translate(_local6, _local5);
trace(((" translate to " + _local6) + ",") + _local5);
_local7.draw(_local3, _local16);
if (_local8 != undefined) {
_local7.draw(_local8, _local16);
}
}
_local4++;
}
_local9++;
}
cw.setColor(_local7.getPixel(16, 16));
return(undefined);
}
if (penis == "textg") {
ctx = Math.floor(pmx - all.x);
cty = Math.floor(pmy - all.y);
btx = ctx;
bty = cty;
return(undefined);
}
var _local7 = new flash.display.BitmapData(400, 400, true, 0);
trace((("bm size " + _local7.width) + " ") + _local7.height);
var _local12 = new Object();
_local12.done = 0;
_local12.tx = _local7.width;
_local12.ty = _local7.height - 1;
_local12.gx = Math.floor(pmx - all.x) - 200;
_local12.gy = Math.floor(pmy - all.y) - 200;
trace((("clip size " + penis_clip._width) + " ") + penis_clip._height);
var _local11 = _local12.gx;
var _local10 = _local12.gy;
var _local9 = -1;
while (_local9 <= 2) {
var _local4 = -1;
while (_local4 <= 2) {
ix = Math.floor(_local11 / 660) + _local9;
iy = Math.floor(_local10 / 660) + _local4;
var _local2 = cs[0][(("i" + ix) + "_") + iy];
var _local3 = _local2.img["i" + _local2.img.c].i;
var _local8 = _local2.img["i" + _local2.img.c].bm;
trace((((((("found at " + ix) + ",") + iy) + " ") + typeof(_local3)) + " ") + _local3._width);
if (_local3 != undefined) {
var _local16 = new flash.geom.Matrix();
var _local6 = (ix * 660) - _local11;
var _local5 = (iy * 660) - _local10;
_local16.translate(_local6, _local5);
trace(((" translate to " + _local6) + ",") + _local5);
_local7.draw(_local3, _local16);
if (_local8 != undefined) {
_local7.draw(_local8, _local16);
}
}
_local4++;
}
_local9++;
}
var _local17 = _local7.clone();
var _local16 = new flash.geom.Matrix();
_local16.scale(ps / 120, ps / 120);
_local16.translate(200, 200);
var _local14 = _root._quality;
if (_local14 != "BEST") {
_root._quality = "BEST";
}
_local7.draw(penis_clip, _local16);
if (_local14 != "BEST") {
_root._quality = _local14;
}
var _local15 = _local7.compare(_local17);
if (_local15 == 0) {
_local7.dispose();
_local17.dispose();
return(undefined);
}
var _local13 = _local7.clone();
_local13.fillRect(_local13.rectangle, 4294967295);
_local13.threshold(_local15, _local15.rectangle, new flash.geom.Point(), "==", 0, 4278321666, 4278190080, false);
_local7.copyChannel(_local13, _local13.rectangle, new flash.geom.Point(), 1, 8);
_local12.bm = _local7;
_local12.area = _local7.width * _local7.height;
penises.push(_local12);
return(undefined);
}
trace("penis: " + penis);
trace((("ps: " + ps) + " ") + drawing);
if ((ps >= 0) && (!drawing)) {
px = Math.floor(allh._xmouse - all.x);
py = Math.floor(allh._ymouse - all.y);
lst = getTimer();
drawing = true;
dxx = xx;
dyy = yy;
sv = 0;
rsld();
}
};
this.coDragOut_d = (this.coRollOut_d = function () {
Mouse.show();
pcc.da = 0;
});
this.coDragOver_d = (this.coRollOver_d = function () {
if (piq) {
Mouse.hide();
pcc.da = 100;
}
});
this.cor_d = (this.coro_d = function () {
if (drawing) {
drawing = false;
if (iap) {
ld.push(_root.i2s(px + 1, 3));
ld.push(_root.i2s(py, 3));
cpl.lineTo((px + 1) - 0.5, py - 0.5);
ldpc++;
}
x.send("a" + ld.join(""));
}
});
mtl = new Array();
utl = new Array();
lrt = getTimer();
spx = -1;
spy = 0;
spd = false;
spc = 0;
this.attachMovie("rpg", "rpg", ++dep);
var rpbm = (new flash.display.BitmapData(660, 660, true, 0));
var mx = (new flash.geom.Matrix());
rpbm.draw(rpg, mx);
rpg.removeMovieClip();
spt = 0;
var lrpmt = 0;
var lrpmx = 0;
var lrpmy = 0;
var rpmx = 0;
var rpmy = 0;
var tmx = 0;
var tmy = 0;
var micfr = 0;
var tla = 0.01;
var hba = 0;
var cmx = 0;
var cmy = 0;
this.onEnterFrame = function () {
if (!hsmb) {
if (stopMusicBtn._visible) {
var _local50 = _xmouse;
var _local51 = _ymouse;
var _local4 = stopMusicBtn._x;
var _local5 = stopMusicBtn._y;
var _local46 = Math.sqrt(((_local50 - _local4) * (_local50 - _local4)) + ((_local51 - _local5) * (_local51 - _local5)));
if (_local46 < 64) {
var _local63 = Math.atan2(_local51 - _local5, _local50 - _local4);
stopMusicBtn.dx = stopMusicBtn.dx + ((-Math.cos(_local63)) * (64 - _local46));
stopMusicBtn.dy = stopMusicBtn.dy + ((-Math.sin(_local63)) * (64 - _local46));
} else {
stopMusicBtn.dx = 64;
stopMusicBtn.dy = 64;
}
stopMusicBtn._x = stopMusicBtn._x + ((stopMusicBtn.dx - stopMusicBtn._x) * p01[_root.lcrb]);
stopMusicBtn._y = stopMusicBtn._y + ((stopMusicBtn.dy - stopMusicBtn._y) * p01[_root.lcrb]);
}
}
if (penises.length > 0) {
var _local17;
var _local15;
var _local16;
var _local14;
var _local60 = Math.floor(Math.random() * penises.length);
var _local26 = penises[_local60];
var _local8 = _local26.gx;
var _local7 = _local26.gy;
var _local19 = _local26.bm;
var _local4 = 0;
var _local5 = 0;
var _local66;
var _local65;
var _local31 = _local26.area;
var _local67 = _local31 / 2;
var _local3 = _root.i2s;
var _local6 = -1;
var _local10 = -1;
var _local9 = -1;
var _local13 = ("a" + _local3(31337, 3)) + _local3(2, 1);
_local4 = _local26.tx;
_local5 = _local26.ty;
var _local18 = 0;
while (_local18 < 300) {
var _local23 = _local31 - 1;
if (_local23 >= 0) {
_local4--;
if (_local4 < 0) {
_local4 = _local19.width - 1;
_local5--;
if (_local5 < 0) {
_local5 = _local19.height - 1;
}
}
a = (_local19.getPixel32(_local4, _local5) >> 24) & 255;
v = _local19.getPixel(_local4, _local5);
if (a <= 3) {
v = -1;
}
if (_local9 != _local5) {
_local10 = _local4;
_local9 = _local5;
_local6 = v;
} else if (_local4 == 0) {
if (v != _local6) {
if (_local6 != -1) {
if (_local10 == (_local4 + 1)) {
_local66 = _local10 + _local8;
_local65 = _local5 + _local7;
x.send(((((_local13 + _local3(_local6, 4)) + _local3(_local66, 3)) + _local3(_local65, 3)) + _local3(_local66 + 1, 3)) + _local3(_local65, 3));
} else {
_local17 = _local10 + _local8;
_local15 = _local9 + _local7;
_local16 = (_local4 + 1) + _local8;
_local14 = _local9 + _local7;
x.send(((((_local13 + _local3(_local6, 4)) + _local3(_local17, 3)) + _local3(_local15, 3)) + _local3(_local16, 3)) + _local3(_local14, 3));
}
}
if (v != -1) {
_local66 = _local4 + _local8;
_local65 = _local5 + _local7;
x.send(((((_local13 + _local3(v, 4)) + _local3(_local66, 3)) + _local3(_local65, 3)) + _local3(_local66 + 1, 3)) + _local3(_local65, 3));
}
} else if (v != -1) {
_local17 = _local10 + _local8;
_local15 = _local9 + _local7;
_local16 = _local4 + _local8;
_local14 = _local9 + _local7;
x.send(((((_local13 + _local3(v, 4)) + _local3(_local17, 3)) + _local3(_local15, 3)) + _local3(_local16, 3)) + _local3(_local14, 3));
}
_local6 = -1;
} else if (v != _local6) {
if (_local6 != -1) {
if (_local10 == (_local4 + 1)) {
_local66 = _local10 + _local8;
_local65 = _local5 + _local7;
x.send(((((_local13 + _local3(_local6, 4)) + _local3(_local66, 3)) + _local3(_local65, 3)) + _local3(_local66 + 1, 3)) + _local3(_local65, 3));
} else {
_local17 = _local10 + _local8;
_local15 = _local9 + _local7;
_local16 = (_local4 + 1) + _local8;
_local14 = _local9 + _local7;
x.send(((((_local13 + _local3(_local6, 4)) + _local3(_local17, 3)) + _local3(_local15, 3)) + _local3(_local16, 3)) + _local3(_local14, 3));
}
}
_local6 = v;
_local10 = _local4;
_local9 = _local5;
}
_local19.setPixel32(_local4, _local5, 0);
_local26.done++;
if (_local26.done >= _local31) {
_local18 = 999999 /* 0x0F423F */;
}
}
_local18++;
}
_local26.tx = _local4;
_local26.ty = _local5;
if (_local26.done == _local31) {
trace("dun");
_local26.bm.dispose();
penises.splice(_local60, 1);
}
}
var v = (dgtnl && (draw_level == 6));
mic._visible = v;
if (v) {
micfr = micfr + 1;
mic._alpha = Math.max(0, Math.min(100, (Math.cos(micfr) * 60) + 40));
if (micfr > 1000000) {
micfr = 0;
}
}
var v = (dgtnl && (draw_level == 0));
if (v) {
if ((!penises_visible) || (!penises_enabled)) {
penises_visible = true;
penises_enabled = true;
var _local30 = penis_btnz.length - 1;
while (_local30 >= 0) {
var _local38 = penis_btnz[_local30];
_local30--;
}
}
if (penises_alpha != 100) {
penises_alpha = penises_alpha + 10;
if (penises_alpha >= 100) {
penises_alpha = 100;
}
var _local30 = penis_btnz.length - 1;
while (_local30 >= 0) {
var _local38 = penis_btnz[_local30];
_local38._alpha = penises_alpha;
_local30--;
}
}
} else {
if (penises_enabled) {
setPen("pen");
penises_enabled = false;
var _local30 = penis_btnz.length - 1;
while (_local30 >= 0) {
var _local38 = penis_btnz[_local30];
_local38.setEnabled(false);
_local30--;
}
}
if (penises_alpha != 0) {
penises_alpha = penises_alpha - 10;
if (penises_alpha <= 0) {
penises_alpha = 0;
if (penises_visible) {
penises_visible = false;
var _local30 = penis_btnz.length - 1;
while (_local30 >= 0) {
var _local38 = penis_btnz[_local30];
_local38._visible = false;
_local30--;
}
}
}
var _local30 = penis_btnz.length - 1;
while (_local30 >= 0) {
var _local38 = penis_btnz[_local30];
_local38._alpha = penises_alpha;
_local30--;
}
}
}
if (tsb.md) {
if (!tsb.mwd) {
tsb.mwd = true;
tsb.sps = this.ps;
tsb.spsd = -tsb._ymouse;
trace("sps = " + tsb.sps);
trace("spsd = " + tsb.spsd);
}
this.ps = Math.floor(Math.max(1, Math.min(30, tsb.sps + (0.5 * ((-tsb._ymouse) - tsb.spsd)))));
bst.box.text = this.ps;
if ((this.ps == 30) || (this.ps == 1)) {
tsb.sps = this.ps;
tsb.spsd = -tsb._ymouse;
}
if (penis_clip != undefined) {
if (penis == "eyedropper") {
} else if (penis == "textg") {
penis_clip._xscale = (penis_clip._yscale = 100 + ((450 * this.ps) / 30));
} else {
penis_clip._xscale = (penis_clip._yscale = (100 * this.ps) / 30);
}
}
tsb.graphics.g._width = (tsb.graphics.g._height = (tsb.ps = this.ps));
} else {
tsb.mwd = false;
}
if (spd && (connected)) {
tt = getTimer();
if ((tt - spt) > 500) {
spt = getTimer();
if (niq) {
var _local32 = 0;
while (_local32 < 1000) {
var _local33 = (Math.random() * 660) * 64;
var _local34 = (Math.random() * 660) * 64;
spx = 0 + _local33;
spy = 0 + _local34;
var _local36 = spx;
var _local35 = spy;
var _local20 = (Math.random() * 8) - 4;
var _local27 = (Math.random() * 0.4) - 0.2;
var _local11 = 4 + (Math.random() * 8);
ld = new Array();
ld.push(_root.i2s(31337, 3));
ld.push(_root.i2s(30, 1));
pc = rpbm.getPixel32(Math.floor(_local33 / 64), Math.floor(_local34 / 64));
pa = (pc >> 24) & 255;
pc = pc & 16777215;
if (pa > 128) {
ld.push(_root.i2s(pc, 4));
var _local21 = 8 + Math.floor(Math.random() * 20);
var _local22 = new Array();
var _local25 = 0;
var _local24 = 0;
var _local30 = 1;
while (_local30 <= _local21) {
_local22.push(spx);
_local22.push(spy);
spx = spx + (Math.cos(_local20) * _local11);
spy = spy + (Math.sin(_local20) * _local11);
_local20 = _local20 + _local27;
_local27 = _local27 + ((Math.random() * 0.08) - 0.04);
_local11 = _local11 + ((Math.random() * 4) - 2);
if (Math.random() < 0.06) {
_local20 = (Math.random() * Math.PI) * 2;
}
if (Math.random() < 0.006) {
_local11 = 8 + (Math.random() * 8);
_local21 = _local30 + 1;
}
if (_local11 < 1) {
_local11 = 1;
}
_local25 = _local25 + spx;
_local24 = _local24 + spy;
_local30++;
}
_local25 = _local25 / _local21;
_local24 = _local24 / _local21;
_local30 = 0;
while (_local30 < _local21) {
ld.push(_root.i2s(Math.round(Math.max(0, Math.min(42623, (_local36 + _local22[_local30 * 2]) - _local25))), 3));
ld.push(_root.i2s(Math.round(Math.max(0, Math.min(42623, (_local35 + _local22[(_local30 * 2) + 1]) - _local24))), 3));
_local30++;
}
x.send("a" + ld.join(""));
} else {
qq = qq - 0.9;
}
_local32++;
}
}
}
}
if (htatr || (rso)) {
if (rules.accepted) {
htatr = false;
rso = true;
rules.y = rules.y - (((rules.oy + 10) - rules.y) * p1[_root.lcrb]);
rules._y = rules.y;
if (rules._y < (-cs2)) {
rules.removeMovieClip();
rso = false;
}
}
}
var _local39;
if (zoBtn.disabled) {
_local39 = 10;
} else {
_local39 = 100;
}
if (zoa != _local39) {
zoa = zoa + ((_local39 - zoa) * p1[_root.lcrb]);
if (Math.abs(zoa - _local39) < 0.5) {
zoa = _local39;
}
zoBtn._alpha = zoa;
}
if ((level == 3) || (level == max_level)) {
_local39 = 100;
} else {
_local39 = 0;
}
if (hba != _local39) {
hba = hba + ((_local39 - hba) * p1[_root.lcrb]);
if (Math.abs(hba - _local39) < 0.5) {
hba = _local39;
}
olderBtn._alpha = hba;
ogs._alpha = hba / 2;
newerBtn._alpha = hba;
ngs._alpha = hba / 2;
bht._alpha = hba;
if (!hsmb) {
stopMusicBtn._alpha = hba;
}
}
if (hsmb) {
stopMusicBtn._alpha = stopMusicBtn._alpha - 2;
if (stopMusicBtn._alpha <= 0.05) {
hsmb = false;
stopMusicBtn._visible = false;
}
}
if (bg.b.hm != history_mode) {
bg.b.hm = history_mode;
abc = true;
if (f_dm == "discord") {
dbgbr = 255;
dbgbg = 48;
dbgbb = 64;
} else if (history_mode) {
dbgbr = 255;
dbgbg = 153;
dbgbb = 51;
} else {
dbgbr = 153;
dbgbg = 204;
dbgbb = 255;
}
}
if (abc) {
var _local48 = 0;
bgbr = bgbr + ((dbgbr - bgbr) * p1[_root.lcrb]);
if (Math.abs(dbgbr - bgbr) < 0.5) {
bgbr = dbgbr;
_local48++;
}
bgbg = bgbg + ((dbgbg - bgbg) * p1[_root.lcrb]);
if (Math.abs(dbgbg - bgbg) < 0.5) {
bgbg = dbgbg;
_local48++;
}
bgbb = bgbb + ((dbgbb - bgbb) * p1[_root.lcrb]);
if (Math.abs(dbgbb - bgbb) < 0.5) {
bgbb = dbgbb;
_local48++;
}
new Color(bg.b).setRGB(((Math.floor(bgbr) * 65536) + (Math.floor(bgbg) * 256)) + Math.floor(bgbb));
if (_local48 == 3) {
abc = false;
}
}
if (!gfa) {
_alpha = (_alpha + (_root.lcrb * 2));
if (_alpha >= 100) {
_alpha = 100;
gfa = true;
}
}
if (!connected) {
if (!gad) {
if (!connecting) {
if (!htatr) {
if ((getTimer() - lcat) > 5000) {
lcat = getTimer();
txc();
}
}
}
}
}
var a = false;
if ((draw_level == 0) && (level == 0)) {
if (tla != 100) {
tla = tla + ((100 - tla) * p1[_root.lcrb]);
if (Math.abs(tla - 100) < 0.5) {
tla = 100;
}
a = true;
}
} else if (tla != 0) {
tla = tla + ((-tla) * p05[_root.lcrb]);
if (Math.abs(tla - 0) < 0.5) {
tla = 0;
}
a = true;
}
if (a) {
eyedropperBtn._alpha = tla;
cw._alpha = tla;
ih._alpha = tla;
tsb._alpha = tla;
bst._alpha = tla;
var v = true;
if (tla <= 0) {
v = false;
}
eyedropperBtn._visible = (cw._visible = (tsb._visible = (bst._visible = v)));
}
if (aww < ww) {
this._x = Math.min(0, Math.max(aww - ww, (-(_root._xmouse / aww)) * (ww - aww)));
}
if (ahh < hh) {
this._y = Math.min(0, Math.max(ahh - hh, (-(_root._ymouse / ahh)) * (hh - ahh)));
}
if (polc && (dgtnl)) {
if ((getTimer() - polct) > 700) {
polct = getTimer();
polc = false;
if ((((xx == cpp) && (yy == cpp)) && (draw_level == max_level)) && (!history_mode)) {
url.box.text = "http://www.drawball.com/";
} else {
var v = 0;
v = v + ((((cell_size * 64) * cell_size) * 64) * draw_level);
v = v + ((cell_size * 64) * xx);
v = v + yy;
var _local61 = 1;
var _local40 = "";
var _local37;
while (_local61 < v) {
_local61 = _local61 * polch.length;
}
while (v > 0) {
_local61 = _local61 / polch.length;
_local37 = Math.floor(v / _local61);
_local40 = _local40 + polch.charAt(_local37);
v = v - (_local37 * _local61);
}
if (history_mode) {
_local40 = _local40 + ("-" + chlHtm);
}
url.box.text = "http://www.drawball.com/" + _local40;
}
}
}
var _local45 = Math.ceil(Stage.width);
aww = _local45;
if (_local45 < 780) {
_local45 = 780;
}
var _local44 = Math.ceil(Stage.height);
ahh = _local44;
if (_local44 < 680) {
_local44 = 680;
}
if ((_local45 != ww) || (_local44 != hh)) {
ww = _local45;
hh = _local44;
trace((("size: " + ww) + ",") + hh);
adjustSize();
}
if (cil != dil) {
cil = cil + ((dil - cil) * p02[_root.lcrb]);
if (Math.abs(cil - dil) < 0.5) {
cil = dil;
}
ink.setInk(cil, max_ink + 10000);
}
if (pcc.a != pcc.da) {
pcc.a = pcc.a + ((pcc.da - pcc.a) * p2[_root.lcrb]);
if (Math.abs(pcc.da - pcc.a) < 0.5) {
pcc.a = pcc.da;
}
pcc._alpha = pcc.a;
}
if (draw_level == 0) {
pmx = allh._xmouse;
pmy = allh._ymouse;
pcc._x = pmx + allh._x;
pcc._y = pmy + allh._y;
cldm = (cldm + _root.lcrb) % 40;
new Color(pcc.c).setRGB(Math.ceil((Math.abs(20 - cldm) * 255) / 40) * 65793);
pcc.c._width = (pcc.c._height = this.ps);
}
if (((sal && (dgtnl)) && (!dnlac)) && (!drawing)) {
var _local53 = allh._xmouse - cs2;
var _local52 = allh._ymouse - cs2;
var _local62 = (_local53 * _local53) + (_local52 * _local52);
if ((_local62 > d21) && (_local62 < d22)) {
cmx = _local53;
cmy = _local52;
sv = sv + (_root.lcrb * 0.33);
if (sv > 13.5) {
sv = 13.5;
}
} else if (sv > 0) {
sv = sv + ((-sv) * p08[_root.lcrb]);
sv = sv - (_root.lcrb * 0.23);
if (sv < 0) {
sv = 0;
}
}
var _local61 = ((sv * _root.lcrb) * pow2[draw_level]) / cs2;
xof = xof + (cmx * _local61);
yof = yof + (cmy * _local61);
var _local57 = Math.round(xof);
var _local58 = Math.round(yof);
xof = xof - _local57;
yof = yof - _local58;
ox = xx;
oy = yy;
xx = xx + _local57;
yy = yy + _local58;
var _local42 = xx - cpp;
var _local41 = yy - cpp;
var _local46 = Math.sqrt((_local42 * _local42) + (_local41 * _local41));
var _local43 = cpp - (ss * pow2[draw_level - 1]);
if (duane.good) {
_local43 = _local43 * 2;
_local43 = _local43 + 10560;
}
if (_local46 > _local43) {
xx = cpp + Math.round((_local42 * _local43) / _local46);
yy = cpp + Math.round((_local41 * _local43) / _local46);
}
if ((dxx != ox) || (dyy != oy)) {
polc = true;
zc();
var _local47 = pow2[draw_level];
if (Math.abs(dxx - xx) < 0.5) {
dxx = xx;
} else {
dxx = dxx + ((xx - dxx) * p1[_root.lcrb]);
}
if (Math.abs(dyy - yy) < 0.5) {
dyy = yy;
} else {
dyy = dyy + ((yy - dyy) * p1[_root.lcrb]);
}
var _local66 = s2 - (dxx / _local47);
var _local65 = s2 - (dyy / _local47);
all._x = (all.x = Math.floor(_local66));
all._y = (all.y = Math.floor(_local65));
}
}
var _local55 = getTimer();
if ((_local55 - lrpmt) > 1000) {
lrpmt = _local55;
lrpmx = rpmx;
lrpmy = rpmy;
if (dgtnl && (draw_level == 0)) {
tmx = Math.max(0, Math.min(cell_size * 64, pmx - all.x));
tmy = Math.max(0, Math.min(cell_size * 64, pmy - all.y));
rpmx = Math.round(tmx / 3);
rpmy = Math.round(tmy / 3);
} else {
rpmx = 0;
rpmy = 0;
}
if ((lrpmx != rpmx) || (lrpmy != rpmy)) {
x.send(("q" + _root.i2s(rpmx, 2)) + _root.i2s(rpmy, 2));
}
}
if (drawing) {
px = Math.floor(pmx - all.x);
py = Math.floor(pmy - all.y);
if ((px - psx) > msdafs) {
px = psx + msdafs;
} else if ((px - psx) < (-msdafs)) {
px = psx - msdafs;
}
if ((py - psy) > msdafs) {
py = psy + msdafs;
} else if ((py - psy) < (-msdafs)) {
py = psy - msdafs;
}
var _local42 = px - lpx;
var _local41 = py - lpy;
var _local62 = (_local42 * _local42) + (_local41 * _local41);
_local55 = getTimer();
if (((_local62 >= 9) || ((_local55 - lst) > 80)) && ((_local55 - lst) > 40)) {
tail.clear();
tail.lineStyle(ps, pc);
tail.moveTo(lpx, lpy);
if (iap && (_local62 == 0)) {
tail.lineTo((px + 1) - 0.5, py - 0.5);
} else {
tail.lineTo(px - 0.5, py - 0.5);
}
if ((px != lpx) || (py != lpy)) {
iap = false;
lst = _local55;
ld.push(_root.i2s(px, 3));
ld.push(_root.i2s(py, 3));
ldpc++;
if (ldpc > 25) {
x.send("a" + ld.join(""));
rsld();
}
cpl.lineTo(px - 0.5, py - 0.5);
lpx = px;
lpy = py;
}
}
}
if ((((!sal) && (b_s == b_r)) && (b_s > 0)) && (cla.length == 0)) {
gsal = true;
}
if (gsal) {
all._alpha = all._alpha + (_root.lcrb * 8);
if (all._alpha >= 100) {
all._alpha = 100;
sal = true;
gsal = false;
}
}
if (niq) {
sbf(false);
}
if (loading()) {
lba = (lb._alpha = 100);
if (ccc.length == 0) {
bdl = btl;
} else {
bdl = 0;
var _local30 = ccc.length - 1;
while (_local30 >= 0) {
var _local12 = ccc[_local30].img;
var _local28 = _local12["i" + _local12.c];
var v = _local28.i.getBytesLoaded();
if (v > 0) {
bdl = bdl + v;
}
_local30--;
}
}
} else if ((lba > 0) && (Math.abs(lb.b.dw - lb.b.w) < 2)) {
lba = lba - (_root.lcrb * 4);
if (lba <= 0) {
lba = 0;
}
lb._alpha = lba;
}
if (lba > 0) {
if (lbtd) {
lbta = lbta - (_root.lcrb * 7);
if (lbta < 50) {
lbta = 50;
lbtd = !lbtd;
}
} else {
lbta = lbta + (_root.lcrb * 7);
if (lbta > 100) {
lbta = 100;
lbtd = !lbtd;
}
}
lb.t._alpha = lbta;
if (btl > 0) {
lb.b.dw = 100 * Math.min(1, bdl / btl);
lb.b.w = lb.b.w + ((lb.b.dw - lb.b.w) * p1[_root.lcrb]);
lb.b._width = lb.b.w;
} else {
lb.b._width = (lb.b.w = (lb.b.dw = 0));
}
}
if ((dnlac && (b_s == b_r)) && (cla.length == 0)) {
if (!dgtnl) {
var _local30 = 0;
while (_local30 < ccc.length) {
ccc[_local30]._xscale = (ccc[_local30]._yscale = scsc);
_local30++;
}
}
dnlac = false;
alnl = false;
} else {
var _local30 = cla.length - 1;
while (_local30 >= 0) {
var _local12 = cla[_local30];
var _local28 = _local12["i" + _local12.c];
var _local29 = _local28.i.getBytesLoaded();
if (_local12.lbl != _local29) {
_local12.lbl = _local29;
_local12.stlt = getTimer();
}
tb = _local28.i.getBytesTotal();
if (((_local29 / tb) == 1) && (_local28.i._width > 0)) {
trace("loaded! " + _local28.i);
fia.push(_local28);
_local28.iua = _local12.iua;
_local12.iua = new Array();
cla.splice(_local30, 1);
} else if ((getTimer() - _local12.stlt) > 14000) {
_local12.stlt = getTimer();
_local12.lbl = 0;
ttlm(_local28.i, _local12.curl);
}
_local30--;
}
}
var tt = getTimer();
if (connected) {
if ((tt - lpt) > 3000) {
x.send("");
lpt = tt;
}
if ((tt - lit) > 15000) {
if (gfp) {
x.send("i");
}
lit = tt;
}
}
if (fia.length > 0) {
var _local30 = fia.length - 1;
while (_local30 >= 0) {
var _local28 = fia[_local30];
if (_local28 == undefined) {
fia.splice(_local30, 1);
} else {
_local28.alpha = _local28.alpha + (_root.lcrb * 5);
if (_local28.alpha >= 100) {
_local28.alpha = 100;
fia.splice(_local30, 1);
var _local18 = _local28.iua.length - 1;
while (_local18 >= 0) {
_local28.iua[_local18].i.unloadMovie();
_local28.iua[_local18].removeMovieClip();
_local18--;
}
}
_local28._alpha = _local28.alpha;
}
_local30--;
}
}
if (!dgtnl) {
if (!zo) {
if ((draw_level < max_level) && (zb._alpha < 100)) {
zb._alpha = zb._alpha + (_root.lcrb * 4);
if (zb._alpha > 100) {
zb._alpha = 100;
}
}
}
}
if ((!dgtnl) && (!alnl)) {
lfr = lfr + (_root.lcrb * 3);
if (lfr < 1) {
lfr = 1;
}
if (lfr >= lfra.length) {
lfr = lfra.length - 1;
}
setLevel(tdl + ((fdl - tdl) * (1 - lfra[lfr])));
if (zo) {
cond = level >= tdl;
} else {
cond = level <= tdl;
}
var _local56 = zo;
if (cond) {
if (!zo) {
if (!pfflj) {
pfflj = true;
}
}
lfr = 0;
zo = false;
setLevel(draw_level);
if (draw_level > 0) {
var _local30 = lvmcs.length - 1;
while (_local30 >= 0) {
var _local64 = lvmcs[_local30];
if (_local64.draw_level == 0) {
var _local28 = _local64.img["i" + _local64.img.c];
if (_local28.l != undefined) {
_local28.l.removeMovieClip();
delete _local28.l;
_local28.bm.dispose();
trace("BYE SON");
}
}
_local30--;
}
}
var _local30 = 0;
while (_local30 < ccc.length) {
ccc[_local30]._xscale = (ccc[_local30]._yscale = 100);
_local30++;
}
if (dfcpl != undefined) {
dfcpl.removeMovieClip();
dfcpl = undefined;
}
dgtnl = true;
zb._alpha = 0;
if (draw_level > 0) {
_local30 = lua.length - 1;
while (_local30 >= 0) {
if (lua[_local30] != undefined) {
lua[_local30].removeMovieClip();
}
_local30--;
}
lua = new Array();
}
}
if (_local56) {
var _local59 = Math.pow(2, level - fdl);
cxx = ox + ((xx - ox) * (1 - ((pow2[zlj] - _local59) / (pow2[zlj] - 1))));
cyy = oy + ((yy - oy) * (1 - ((pow2[zlj] - _local59) / (pow2[zlj] - 1))));
} else {
var _local59 = Math.pow(2, level - tdl);
cxx = ox + ((xx - ox) * ((pow2[zlj] - _local59) / (pow2[zlj] - 1)));
cyy = oy + ((yy - oy) * ((pow2[zlj] - _local59) / (pow2[zlj] - 1)));
}
var _local47 = Math.pow(2, level);
var _local66 = s2 - (cxx / _local47);
var _local65 = s2 - (cyy / _local47);
all._x = (all.x = Math.floor(_local66));
all._y = (all.y = Math.floor(_local65));
zb._x = (zb.x = s2 + ((xx - cxx) / _local47));
zb._y = (zb.y = s2 + ((yy - cyy) / _local47));
zb.dsc = 200 / Math.pow(2, level - tdl);
zb.dr = 3;
var _local30 = max_level;
while (_local30 >= 0) {
cs[_local30]._visible = false;
_local30--;
}
cs[fdl]._visible = true;
cs[tdl]._visible = true;
cs[fdl]._xscale = (cs[fdl]._yscale = 100 / Math.pow(2, level - fdl));
cs[tdl]._xscale = (cs[tdl]._yscale = 100 / Math.pow(2, level - tdl));
if (_local56) {
cs[fdl]._alpha = (100 * (tdl - level)) / (tdl - fdl);
cs[tdl]._alpha = 100;
} else {
cs[fdl]._alpha = 100;
cs[tdl]._alpha = 100 * (1 - ((level - tdl) / (fdl - tdl)));
}
}
zbad = false;
if (dgtnl) {
if (draw_level > 0) {
updateLj2();
zb.dsc = 100 / pow2[lj - 1];
zb.dr = 3;
if ((zb.d <= s2) && (niq)) {
if (zb._alpha < 55) {
zbad = true;
zb._alpha = zb._alpha + (_root.lcrb * 4);
if (zb._alpha >= 55) {
zb._alpha = 55;
}
}
}
zb.x = allh._xmouse;
zb.y = allh._ymouse;
var _local42 = zb.x - s2;
var _local41 = zb.y - s2;
var _local46 = Math.sqrt((_local42 * _local42) + (_local41 * _local41));
zb.d = _local46;
var _local49 = s2 - (s2 / pow2[lj]);
if (_local46 > _local49) {
zb.x = s2 + ((_local42 * _local49) / _local46);
zb.y = s2 + ((_local41 * _local49) / _local46);
}
zb._x = zb.x;
zb._y = zb.y;
}
}
if (zb.sc != zb.dsc) {
zb.sc = zb.sc + ((zb.dsc - zb.sc) * this["p" + zb.dr][_root.lcrb]);
if (Math.abs(zb.sc - zb.dsc) < 0.5) {
zb.sc = zb.dsc;
}
zb._xscale = (zb._yscale = zb.sc);
}
if (!zbad) {
if (zb._alpha > 0) {
zb._alpha = zb._alpha - _root.lcrb;
if (zb._alpha <= 0) {
zb._alpha = 0;
}
}
}
if (mtl.length > 0) {
_local55 = getTimer();
if ((_local55 - lrt) > 50) {
lrt = _local55;
var _local64 = mtl.shift();
var _local54 = utl.shift();
_local64.loadMovie(_local54);
trace("loading " + _local54);
}
}
if (!pff) {
pff = true;
cw.setWhite();
cw.cw.setBrightness(25);
}
};
x = new XMLSocket();
xca = new Array();
x.onConnect = function (s) {
connecting = false;
trace("ahh");
if (s) {
connected = true;
gfp = false;
if (f_dm == "www") {
this.send("-" + _root.cpid);
}
this.send(cnc);
} else {
txca();
}
};
cla = new Array();
fia = new Array();
x.onClose = function () {
trace("ok bye");
if (gad) {
if (allh.disc == undefined) {
allh.attachMovie("disc", "disc", ++allh.dep);
allh.disc._x = cs2;
allh.disc._y = cs2;
allh.disc.onPress = function () {
};
}
connected = false;
} else {
txca();
}
};
txc = function () {
if (cnc2.length > 0) {
lcat = getTimer();
connecting = true;
txcm = !txcm;
if (txcm) {
if (!x.connect(sk_dm + ".drawball.com", port1)) {
trace("bummer");
txca();
}
trace("443... " + sk_dm);
} else {
if (!x.connect(sk_dm + ".drawball.com", port2)) {
trace("bumma");
txca();
}
trace("8009...");
}
}
};
txca = function () {
connected = false;
connecting = false;
confc++;
if (confc == 1) {
lcat = -100000;
}
};
lcat = -4000;
x.onData = function (d) {
if (!gfp) {
gfp = true;
trace("gfp!");
var _local13 = "";
var _local6 = 0;
while (_local6 < 7) {
_local13 = _local13 + String.fromCharCode(cnc.charCodeAt(_local6) - (d.charCodeAt(_local6 * 2) - 65));
_local6++;
}
cnc3 = _local13;
trace("cnc3 = " + _local13);
x.send(cnc3);
x.send("e");
x.send("i");
cal(true);
_local6 = 0;
while (_local6 < xca.length) {
x.send(xca[_local6]);
_local6++;
}
return(undefined);
}
var _local10 = d.charAt(0);
var _local2 = d.substr(1);
gad = true;
if (_local10 == "/") {
getURL ("http://two.drawball.com/");
} else if (_local10 == "j") {
j_limbo = false;
if (_local2.length > 0) {
setHistoryMode(true);
lj = 3;
if (_local2.length > 1) {
chlHtm = _root.s2i(_local2);
trace("zc'ing for j");
zc();
}
} else {
setHistoryMode(false);
if (draw_level == 1) {
lj = 1;
} else {
lj = 3;
}
trace("zc'ing (2) for j");
zc();
}
} else if (_local10 == "k") {
if (allh.banned == undefined) {
allh.attachMovie("banned", "banned", ++allh.dep);
}
allh.banned._x = cs2;
allh.banned._y = cs2;
if ((f_dm == "discord") || (f_dm == "two")) {
allh.banned.bg._width = (allh.banned.bg._height = 670);
new Color(allh.banned.bg.b).setRGB(16728064);
}
allh.banned.onPress = function () {
};
var _local31 = _local2.substr(0, _local2.length - 4);
var _local18 = s2i(_local2.substr(_local2.length - 4, 4));
var _local20 = "you are banned for another ";
var _local19 = Math.floor(_local18 / 60);
_local18 = _local18 - (_local19 * 60);
if (_local19 > 0) {
_local20 = _local20 + ((_local19 + " hour") + ((_local19 > 1) ? "s" : ""));
}
if ((_local19 > 0) && (_local18 > 0)) {
_local20 = _local20 + " and";
}
if (_local18 > 0) {
_local20 = _local20 + ((_local18 + " minute") + ((_local18 > 1) ? "s" : ""));
}
allh.banned.banText.text = _local31;
allh.banned.subText.text = _local20;
} else if (_local10 == "h") {
var _local29 = _root.s2i(_local2.substr(0, 2));
var _local28 = _root.s2i(_local2.substr(2, 2));
var _local15 = (-_local29) * cell_size;
var _local14 = (-_local28) * cell_size;
var _local22 = _root.s2i(_local2.substr(4, 1));
var _local17 = _root.s2i(_local2.substr(5, 5));
btl = btl + _root.s2i(_local2.substr(10, 4));
if (_local17 == 0) {
setHistoryMode(false);
trace("zc'ing for h");
zc();
return(undefined);
}
if (_local22 == max_level) {
chlHtm = _local17;
trace(_local17);
}
var _local21 = cs[_local22];
var _local33 = (("i" + _local29) + "_") + _local28;
var _local4 = _local21[_local33];
b_r++;
if (_local4 != undefined) {
if (_local4.tm != _local17) {
_local4.tm = _local17;
var _local23 = _local4.img["i" + _local4.img.c];
if (_local23 != undefined) {
_local4.img.iua.push(_local23);
lua.push(_local23.l);
}
_local4.img.c++;
if (_local4.img.c > 2000000) {
_local4.img.c = 1;
}
_local4.img.createEmptyMovieClip("i" + _local4.img.c, ++_local4.img.dep);
var _local26 = _local4.img["i" + _local4.img.c];
_local26.dep = 0;
_local26.createEmptyMovieClip("i", ++_local26.dep);
_local26.i._x = (_local26.i._y = -1);
_local26._alpha = (_local26.alpha = 0);
cal(false);
var _local25 = (((((((php + "?x=") + _local29) + "&y=") + _local28) + "&l=") + _local22) + "&tm=") + _local17;
_local4.img.curl = _local25;
ttlm(_local26.i, _local25);
_local4.img.stlt = getTimer();
_local4.img.lbl = 0;
cla.push(_local4.img);
}
}
} else if ((_local10 == "b") || (_local10 == "c")) {
var _local29 = _root.s2i(_local2.substr(0, 2));
var _local28 = _root.s2i(_local2.substr(2, 2));
var _local15 = (-_local29) * cell_size;
var _local14 = (-_local28) * cell_size;
var _local22 = _root.s2i(_local2.substr(4, 1));
var _local24 = _root.s2i(_local2.substr(5, 2));
var _local21 = cs[_local22];
var _local33 = (("i" + _local29) + "_") + _local28;
var _local4 = _local21[_local33];
if (_local10 == "b") {
b_r++;
}
if (_local4 != undefined) {
if (_local4.v != _local24) {
_local4.v = _local24;
var _local23 = _local4.img["i" + _local4.img.c];
if (_local23 != undefined) {
_local4.img.iua.push(_local23);
lua.push(_local23.l);
}
_local4.img.c++;
if (_local4.img.c > 2000000) {
_local4.img.c = 1;
}
_local4.img.createEmptyMovieClip("i" + _local4.img.c, ++_local4.img.dep);
var _local26 = _local4.img["i" + _local4.img.c];
_local26.dep = 0;
_local26.createEmptyMovieClip("i", ++_local26.dep);
_local26.i._x = (_local26.i._y = -1);
if (((_local10 == "c") && (_local4.img.c > 1)) && (_local22 > 0)) {
_local26._alpha = (_local26.alpha = 0);
} else {
_local26.alpha = 100;
}
cal(false);
itt++;
var _local25 = (((((((((php + "?x=") + _local29) + "&y=") + _local28) + "&l=") + _local22) + "&t=") + itt) + "&r=") + Math.floor(Math.random() * 1000);
if (itt > 25000000) {
itt = 0;
}
_local4.img.curl = _local25;
ttlm(_local26.i, _local25);
_local4.img.stlt = getTimer();
_local4.img.lbl = 0;
cla.push(_local4.img);
} else {
var _local26 = _local4.img["i" + _local4.img.c];
trace("ci iz " + _local26);
}
if (_local4.draw_level == 0) {
var _local11;
if (_local26.l == undefined) {
_local26.createEmptyMovieClip("l", ++_local26.dep);
trace("ci.l is " + _local26.l);
_local26.l.dep = 0;
_local11 = new flash.display.BitmapData(660, 660, true, 0);
_local26.bm = _local11;
_local26.l.createEmptyMovieClip("bmh", ++_local26.l.dep);
_local26.l.bmh.attachBitmap(_local11, 1, "always", false);
_local26.l.createEmptyMovieClip("l1", ++_local26.l.dep);
trace((((((((("NEW BM onto " + _local26.l.bmh) + " on ") + _local26.l) + " on ") + _local26) + " at ") + _local26.l.dep) + " at ") + _local26.dep);
} else {
_local11 = _local26.bm;
trace(("bm is " + _local11) + "...");
_local11.fillRect(_local11.rectangle, 0);
}
var _local30 = _local26.l;
var _local7 = 7;
while (_local7 < _local2.length) {
var _local9 = _root.s2i(_local2.substr(_local7, 1)) - 1;
_local7++;
var _local32 = _root.s2i(_local2.substr(_local7, 1));
_local7++;
var _local34 = _root.s2i(_local2.substr(_local7, 4));
_local7 = _local7 + 4;
var _local12 = _local30.l1;
_local12.dep = 0;
_local12.lineStyle(_local32, _local34);
_local12.moveTo((_root.s2i(_local2.substr(_local7, 3)) + _local15) - 0.5, (_root.s2i(_local2.substr(_local7 + 3, 3)) + _local14) - 0.5);
_local7 = _local7 + 6;
var _local6 = 0;
while (_local6 < _local9) {
_local12.lineTo((_root.s2i(_local2.substr(_local7, 3)) + _local15) - 0.5, (_root.s2i(_local2.substr(_local7 + 3, 3)) + _local14) - 0.5);
_local7 = _local7 + 6;
_local6++;
}
_local11.draw(_local12);
_local12.clear();
}
}
}
} else if (_local10 == "e") {
var _local24 = _root.s2i(_local2);
if ((_local2.length == 0) || (_local24 == 0)) {
allh.queue.removeMovieClip();
niq = true;
} else {
if (allh.queue == undefined) {
allh.attachMovie("queue", "queue", ++allh.dep);
allh.queue._x = cs2;
allh.queue._y = cs2;
allh.queue.onPress = function () {
};
}
allh.queue.numbox.text = "" + _local24;
}
} else if (_local10 == "i") {
if (_local2.length > 0) {
setInk(_root.s2i(_local2));
ih._visible = true;
iih._visible = false;
} else {
setInk(max_ink);
ih._visible = false;
iih._visible = true;
}
} else if (_local10 == "l") {
var _local29 = _root.s2i(_local2.substr(0, 2));
var _local28 = _root.s2i(_local2.substr(2, 2));
var _local15 = (-_local29) * cell_size;
var _local14 = (-_local28) * cell_size;
var _local32 = _root.s2i(_local2.substr(4, 1));
var _local34 = _root.s2i(_local2.substr(5, 4));
var _local7 = 9;
var _local4 = cs[0][(("i" + _local29) + "_") + _local28];
var _local26 = _local4.img["i" + _local4.img.c];
var _local30 = _local26.l;
var _local12 = _local30.l1;
_local12.lineStyle(_local32, _local34);
_local12.moveTo((_root.s2i(_local2.substr(_local7, 3)) + _local15) - 0.5, (_root.s2i(_local2.substr(_local7 + 3, 3)) + _local14) - 0.5);
_local7 = _local7 + 6;
while (_local7 < _local2.length) {
_local12.lineTo((_root.s2i(_local2.substr(_local7, 3)) + _local15) - 0.5, (_root.s2i(_local2.substr(_local7 + 3, 3)) + _local14) - 0.5);
_local7 = _local7 + 6;
}
_local26.bm.draw(_local12);
_local12.clear();
} else if (_local10 == "q") {
} else if (_local10 == "r") {
setInk(_root.s2i(_local2.substr(0, 4)));
var _local27 = _root.s2i(_local2.substr(4, 3));
var _local4 = cs[0]["l" + _local27];
if (_local4 == undefined) {
if (_local27 != 31337) {
trace("OH NO!");
}
} else {
_local4.removeMovieClip();
}
} else if (_local10 == "s") {
btl = btl + _root.s2i(_local2);
} else if (_local10 == "p") {
var _local21 = cs[0];
_local21.prs.removeMovieClip();
_local21.createEmptyMovieClip("prs", 82000);
var _local8 = _local21.prs;
_local8.dep = 0;
var _local5 = 0;
while (_local5 < 40) {
var _local3 = 0;
while (_local3 < 40) {
if ((_local2.charCodeAt((_local5 * 40) + _local3) - 1) > 0) {
var _local4 = _local8.attachMovie("prsc", (("c" + _local3) + "_") + _local5, ++_local8.dep);
_local4._alpha = 25;
_local4._x = ((rpx + _local3) - 20) * 37;
_local4._y = ((rpy + _local5) - 20) * 37;
}
_local3++;
}
_local5++;
}
}
};
lfr = 1234567 /* 0x12D687 */;
mil = 1000;
max_ink = 1000000 /* 0x0F4240 */;
max_ink = 2000000 /* 0x1E8480 */;
inkt.box.text = "...";
aww = ww;
ahh = hh;
adjustSize();
trace(cs);
setLevel(start_level);
trace("zc1");
zc();
trace("zc2");
trace(cs);
Key.addListener(this);
f_tm = 0;
t_tm = 0;
start_tm = 0;
end_tm = 0;
ltd = new ArrayX();
this.onKeyDown = function () {
var _local13 = Key.getCode();
trace("key = " + _local13);
if (_local13 == 65) {
duane.a = true;
checkDuane();
} else if (_local13 == 68) {
duane.d = true;
wd55.d = true;
checkDuane();
} else if (_local13 == 69) {
duane.e = true;
checkDuane();
} else if (_local13 == 78) {
duane.n = true;
checkDuane();
} else if (_local13 == 85) {
duane.u = true;
checkDuane();
} else if (!duane.good) {
duane = new Object();
}
if (penis == "textg") {
if (((_local13 == 13) || (_local13 == 10)) || (_local13 == 3)) {
tf.text = "Q";
ctx = btx;
cty = cty + tf.textHeight;
} else if (_local13 == 8) {
tf.text = "Q";
ctx = ctx - tf.textWidth;
} else {
_local13 = Key.getAscii();
if ((_local13 == 0) || (ctx < 0)) {
return(undefined);
}
trace("ascii is " + _local13);
tf.width = (tf.height = 500);
tft.size = 25 + ps;
tft.color = pc;
tf.setTextFormat(tft);
tf.setNewTextFormat(tft);
tf.text = String.fromCharCode(_local13);
var _local19 = tf.textWidth;
var _local20 = tf.textHeight;
var _local8 = new flash.display.BitmapData(tf.textWidth + 22, tf.textHeight + 22, true, 0);
trace((("oh my... " + _local8.width) + " ") + _local8.height);
var _local14 = new Object();
_local14.done = 0;
_local14.tx = _local8.width;
_local14.ty = _local8.height - 1;
_local14.gx = ctx;
_local14.gy = cty;
ctx = ctx + _local19;
var _local22;
var _local23;
var _local21;
var _local2;
var _local3;
var _local9;
var _local25;
var _local24;
var _local12 = _local14.gx;
var _local11 = _local14.gy;
var _local10 = -1;
while (_local10 <= 2) {
var _local4 = -1;
while (_local4 <= 2) {
ix = Math.floor(_local12 / 660) + _local10;
iy = Math.floor(_local11 / 660) + _local4;
_local2 = cs[0][(("i" + ix) + "_") + iy];
_local3 = _local2.img["i" + _local2.img.c].i;
_local9 = _local2.img["i" + _local2.img.c].bm;
trace((((((("found at " + ix) + ",") + iy) + " ") + typeof(_local3)) + " ") + _local3._width);
if (_local3 != undefined) {
var _local5 = new flash.geom.Matrix();
var _local7 = ((ix * 660) - _local12) - 1;
var _local6 = ((iy * 660) - _local11) - 1;
_local5.translate(_local7, _local6);
trace(((" translate to " + _local7) + ",") + _local6);
_local8.draw(_local3, _local5);
if (_local9 != undefined) {
_local8.draw(_local9, _local5);
}
}
_local4++;
}
_local10++;
}
var _local18 = _local8.clone();
var _local17 = _root._quality;
if (_local17 != "BEST") {
_root._quality = "BEST";
}
_local8.draw(txh);
if (_local17 != "BEST") {
_root._quality = _local17;
}
var _local16 = _local8.compare(_local18);
if (_local16 == 0) {
_local8.dispose();
_local18.dispose();
return(undefined);
}
var _local15 = _local8.clone();
_local15.fillRect(_local15.rectangle, 4294967295);
_local15.threshold(_local16, _local16.rectangle, new flash.geom.Point(), "==", 0, 4278321666, 4278190080, false);
_local8.copyChannel(_local15, _local15.rectangle, new flash.geom.Point(), 1, 8);
_local14.bm = _local8;
_local14.area = _local8.width * _local8.height;
_local18.dispose();
_local16.dispose();
_local15.dispose();
penises.push(_local14);
}
return(undefined);
}
if (_local13 == 82) {
if (Key.isDown(16)) {
rpx = Math.floor(xx / 37);
rpy = Math.floor(yy / 37);
x.send(("p" + _root.i2s(rpx, 2)) + _root.i2s(rpy, 2));
}
}
};
if (f_dm != "discord") {
this.attachMovie("hpcv", "hpcv", ++dep);
}