Frame 1
if (started != true) {
toggleHighQuality();
started = true;
}
attachMovie("whole2", "whole", 5);
whole._x = 0;
whole._y = 0;
whole._xscale = 100;
whole._yscale = 100;
Frame 2
stop();
Symbol 2 Button
on (press) {
_parent.colorPreview(test);
_parent.colorSelected(test);
}
Symbol 5 MovieClip [extraline2] Frame 1
xsign = 1 - (random(2) * 2);
ysign = 1 - (random(2) * 2);
rndnum = 1 - (random(2) * 2);
jump = 10 + random(10);
numlines = 1;
xadd = 5;
yadd = 5;
choice = random(4);
halflife = 50 + random(40);
this.onEnterFrame = function () {
if (_parent.scribbling == true) {
if (over != false) {
if (count < halflife) {
if (!found) {
rover();
} else {
count++;
jump = _parent.tolerance + random(10);
if (_parent.randomtransparency) {
alpha = random(_parent.mainalpha);
} else {
alpha = _parent.mainalpha;
}
if (_parent.randomweight) {
weight = random(_parent.mainweight);
} else {
weight = _parent.mainweight;
}
if (choice < 2) {
scribble();
} else {
newedgeline();
}
}
} else {
trace("dead");
over = false;
_parent.n++;
var obj = ("extraline" + _parent.n);
_parent.attachMovie("extraline2", obj, _parent.n);
_parent[obj]._x = _parent.leftmost + random(_parent.circle._width);
_parent[obj]._y = _parent.topmost + random(_parent.circle._height);
}
}
}
};
stop();
function rover() {
if (_parent.circle.hitTest(_parent._x + ((this._x * _parent._xscale) / 100), _parent._y + ((this._y * _parent._yscale) / 100), true)) {
found = true;
} else {
this._x = this._x + (15 * xsign);
if (this._x > _parent.circwidth) {
xsign = xsign * -1;
this._y = this._y + (random(50) * ysign);
this._x = _parent.circwidth + (random(20) * xsign);
} else if (this._x < _parent.leftmost) {
xsign = xsign * -1;
this._y = this._y + (random(50) * ysign);
this._x = _parent.leftmost + (random(20) * xsign);
}
if (this._y > _parent.circheight) {
ysign = ysign * -1;
this._y = _parent.circheight + (20 * ysign);
} else if (this._y < _parent.topmost) {
ysign = ysign * -1;
this._y = _parent.topmost + (20 * ysign);
}
}
}
function newedgeline() {
line.lineStyle(weight, _parent.maincolor, alpha);
done = false;
while (done == false) {
angle = vectorangle - range;
while (angle < (vectorangle + range)) {
xadd = radius * Math.cos((angle * Math.PI) / 180);
yadd = radius * Math.sin((angle * Math.PI) / 180);
if (_parent.circle.hitTest(_parent._x + (((((this._x + line._x) + x) + xadd) * _parent._xscale) / 100), _parent._y + (((((this._y + line._y) + y) + yadd) * _parent._xscale) / 100), true)) {
x = x + xadd;
y = y + yadd;
line.lineTo(x, y);
done = true;
vectorangle = angle;
radius = resetradius + random(20);
range = resetrange;
break;
}
angle = angle + 5;
}
if (!done) {
range = range + 10;
rnd = random(rndnum);
if (rnd > 0) {
vectorangle = vectorangle - (range * 2);
} else {
vectorangle = vectorangle + (range * 2);
}
radius = radius + 2;
}
if (range > 350) {
done = true;
}
if (vectorangle > 360) {
vectorangle = vectorangle - 360;
}
if (angle > 360) {
angle = angle - 360;
}
}
}
function watercolor() {
line.lineStyle(weight, _parent.maincolor, alpha);
n = 1;
while (n <= numlines) {
done = false;
donecount = 0;
while (done == false) {
donecount++;
rnd = random(2);
if (rnd == 0) {
rnd--;
}
if (_parent.circle.hitTest(_parent._x + (((((this._x + line._x) + x) + xadd) * _parent._xscale) / 100), _parent._y + (((((this._y + line._y) + y) + yadd) * _parent._xscale) / 100), true)) {
x = x + xadd;
y = y + yadd;
line.lineTo(x, y);
done = true;
xadd = xadd - 10;
yadd = yadd - 50;
} else {
xadd = random(jump) * rnd;
rnd = random(2);
if (rnd == 0) {
rnd--;
}
yadd = random(jump) * rnd;
}
if (donecount > 100) {
done = true;
}
}
n++;
}
}
function edgeline() {
line.lineStyle(weight, _parent.maincolor, alpha);
n = 1;
while (n <= numlines) {
done = false;
while (done == false) {
angle = vectorangle - range;
while (angle < (vectorangle + range)) {
xadd = radius * Math.cos((angle * Math.PI) / 180);
yadd = radius * Math.sin((angle * Math.PI) / 180);
if (_parent.circle.hitTest(_parent._x + (((((this._x + line._x) + x) + xadd) * _parent._xscale) / 100), _parent._y + (((((this._y + line._y) + y) + yadd) * _parent._xscale) / 100), true)) {
x = x + xadd;
y = y + yadd;
line.lineTo(x, y);
done = true;
vectorangle = angle;
radius = resetradius + random(20);
range = resetrange;
break;
}
angle = angle + 5;
}
if (!done) {
range = range + 10;
rnd = random(rndnum);
if (rnd > 0) {
vectorangle = vectorangle - (range * 2);
} else {
vectorangle = vectorangle + (range * 2);
}
radius = radius + 2;
}
if (range > 350) {
done = true;
}
if (vectorangle > 360) {
vectorangle = vectorangle - 360;
}
if (angle > 360) {
angle = angle - 360;
}
}
n++;
}
}
function scribble() {
line.lineStyle(weight, _parent.maincolor, alpha);
n = 1;
while (n <= numlines) {
done = false;
while (done == false) {
rnd = random(2);
if (rnd == 0) {
rnd--;
}
if (_parent.circle.hitTest(_parent._x + (((((this._x + line._x) + x) + xadd) * _parent._xscale) / 100), _parent._y + (((((this._y + line._y) + y) + yadd) * _parent._xscale) / 100), true)) {
x = x + xadd;
y = y + yadd;
line.lineTo(x, y);
done = true;
xadd = xadd - (2 * rnd);
yadd = yadd - (2 * rnd);
} else {
xadd = random(jump) * rnd;
rnd = random(2);
if (rnd == 0) {
rnd--;
}
yadd = (-random(jump)) * rnd;
}
if (scrib_check > 350) {
done = true;
} else {
scrib_check++;
}
}
n++;
}
}
Symbol 9 MovieClip Frame 1
stop();
Instance of Symbol 8 MovieClip "container" in Symbol 9 MovieClip Frame 1
onClipEvent (load) {
function endrawing() {
if (_parent._parent.draw == true) {
_parent._parent.draw = false;
howwide = leftmost + _parent._parent.circle._width;
if (howwide > _parent._parent.circwidth) {
_parent._parent.circwidth = howwide;
trace("wide" + howwide);
}
howtall = topmost + _parent._parent.circle._height;
if (howtall > _parent._parent.circheight) {
_parent._parent.circheight = howtall;
}
if (count == 1) {
_parent._parent.leftmost = leftmost;
_parent._parent.topmost = topmost;
} else {
if (leftmost < _parent._parent.leftmost) {
_parent._parent.leftmost = leftmost;
}
if (topmost < _parent._parent.topmost) {
_parent._parent.topmost = topmost;
}
}
}
}
count = 0;
_parent._parent.pointGroup = new Array();
leftmost = 10000;
topmost = 10000;
}
onClipEvent (enterFrame) {
if (_parent._parent.drawbg.hitTest(_root._xmouse, _root._ymouse, true)) {
if (_parent._parent.draw) {
var xmouse = (_root._xmouse - this[obj]._x);
var ymouse = (_root._ymouse - this[obj]._y);
if ((xp != _root._xmouse) && (yp != _root._ymouse)) {
tester++;
this[obj].lineTo(xmouse, ymouse);
if (_root._xmouse < leftmost) {
leftmost = _root._xmouse;
trace(leftmost);
}
if (_root._ymouse < topmost) {
topmost = _root._ymouse;
}
xp = _root.xmouse;
yp = _root.ymouse;
}
}
} else {
endrawing();
}
}
onClipEvent (mouseDown) {
if (_parent._parent.drawbg.hitTest(_root._xmouse, _root._ymouse, true)) {
_parent._parent.drawingexists = true;
_parent._parent.draw = true;
_parent._parent.circle._alpha = 100;
count++;
tester = 0;
var obj = ("shell" + count);
this.createEmptyMovieClip(obj, count);
this[obj].lineStyle(2, 16711680, 100);
this[obj]._x = _root._xmouse;
this[obj]._y = _root._ymouse;
}
start = false;
}
onClipEvent (mouseUp) {
endrawing();
}
Symbol 14 Button
on (press) {
if (_currentframe == 1) {
this.gotoAndStop(2);
_parent.nav(true);
} else {
_parent.nav(false);
this.gotoAndStop(1);
}
}
Symbol 16 MovieClip Frame 1
stop();
Symbol 16 MovieClip Frame 2
Symbol 20 Button
on (press) {
attachMovie("howtosend", "send", 10000);
}
Symbol 23 Button
on (press) {
getURL ("http://www.zefrank.com/scribbler/gallery/", _blank);
}
Symbol 26 Button
on (press) {
toggleHighQuality();
}
Symbol 29 Button
on (press) {
attachMovie("instructions", "help", 10000);
}
Symbol 32 Button
on (press) {
getURL ("http://www.zefrank.com/scribbler/about.html", _blank);
}
Symbol 38 Button
on (press) {
if (drawingexists) {
nextFrame();
} else {
makesomething.play();
}
}
Symbol 41 MovieClip Frame 1
stop();
Symbol 46 Button
on (press) {
getURL ("http://www.zefrank.com", _blank);
}
Symbol 51 Button
on (press) {
nextFrame();
_parent._parent.randomtransparency = true;
}
Symbol 53 Button
on (press) {
prevFrame();
_parent._parent.randomtransparency = false;
}
Symbol 54 MovieClip Frame 1
_parent.randomtransparency = false;
Symbol 54 MovieClip Frame 2
stop();
Symbol 59 Button
on (press) {
this.startDrag(false, _parent.bar._x - (_parent.bar._width / 2), this._y, _parent.bar._x + (_parent.bar._width / 2), this._y);
_parent.drag = true;
}
on (release, releaseOutside) {
_parent.drag = false;
stopDrag();
}
Instance of Symbol 54 MovieClip in Symbol 64 MovieClip Frame 1
/* no clip actions */
Instance of Symbol 63 MovieClip in Symbol 64 MovieClip Frame 1
onClipEvent (mouseMove) {
if (_parent.drag) {
percent = (_parent.nub._x - (_parent.bar._x - (_parent.bar._width / 2))) / _parent.bar._width;
alpha = Math.floor(percent * 100);
if (alpha == 99) {
alpha = 100;
}
_parent._parent.mainalpha = alpha;
trace(alpha);
}
}
Symbol 68 Button
on (press) {
nextFrame();
_parent._parent.randomweight = true;
}
Symbol 69 Button
on (press) {
prevFrame();
_parent._parent.randomweight = false;
}
Symbol 70 MovieClip Frame 1
_parent.randomweight = false;
Symbol 70 MovieClip Frame 2
stop();
Instance of Symbol 63 MovieClip in Symbol 73 MovieClip Frame 1
onClipEvent (mouseMove) {
if (_parent.drag) {
percent = (_parent.nub._x - (_parent.bar._x - (_parent.bar._width / 2))) / _parent.bar._width;
alpha = Math.floor(percent * 40) + 1;
if (alpha == 99) {
alpha = 100;
}
_parent._parent.mainweight = alpha;
}
}
onClipEvent (load) {
alpha = 1;
}
Instance of Symbol 63 MovieClip in Symbol 80 MovieClip Frame 1
onClipEvent (mouseMove) {
if (_parent.drag) {
percent = (_parent.nub._x - (_parent.bar._x - (_parent.bar._width / 2))) / _parent.bar._width;
alpha = Math.floor(percent * 100) + 1;
_parent._parent.tolerance = alpha;
}
}
onClipEvent (load) {
alpha = 10;
_parent._parent.tolerance = alpha;
}
Symbol 83 Button
on (press) {
erase();
}
Symbol 85 Button
on (press) {
_parent.scribbling = true;
_parent.addpoints();
this.nextFrame();
_parent.pause.gotoAndStop(1);
}
Symbol 86 MovieClip Frame 1
stop();
Symbol 88 Button
on (press) {
_parent.scribbling = false;
this.nextFrame();
_parent.start.gotoAndStop(1);
}
Symbol 89 MovieClip Frame 1
stop();
Symbol 91 Button
on (press) {
erase();
attached = false;
start.gotoAndStop(1);
pause.gotoAndStop(1);
}
Symbol 93 Button
on (press) {
_root.play();
}
Symbol 95 Button
on (press) {
if (circle._alpha < 50) {
circle._alpha = 100;
} else {
circle._alpha = 0;
}
}
Symbol 105 MovieClip Frame 1
function colorPreview(colorIn) {
this.testswatch.color.setRGB(colorIn);
}
function colorSelected(colorIn) {
_parent.maincolor = colorIn;
}
hexArray = new Array("F", "E", "D", "C", "B", "A", "9", "8", "7", "6", "5", "4", "3", "2", "1", "0");
colorCount = 0;
colorCount2 = 0;
colorCount3 = 0;
ylevel = 0;
xlevel = 0;
this.testswatch.color = new Color(this.testswatch);
i = 1;
while (i <= 216) {
this.attachMovie("colorsquare", "cs" + i, i);
this["cs" + i].color = new Color(this["cs" + i]);
this["cs" + i]._x = xlevel * this["cs" + i]._width;
this["cs" + i]._y = ylevel * this["cs" + i]._height;
if (xlevel <= 4) {
xlevel++;
} else {
xlevel = 0;
ylevel++;
}
test = ((((("0x" + hexArray[colorCount3]) + hexArray[colorCount3]) + hexArray[colorCount2]) + hexArray[colorCount2]) + hexArray[colorCount]) + hexArray[colorCount];
colorCount = colorCount + 3;
if (colorCount >= 16) {
colorCount = 0;
colorCount2 = colorCount2 + 3;
}
if (colorCount2 >= 16) {
colorCount2 = 0;
colorCount3 = colorCount3 + 3;
}
this["cs" + i].test = test;
this["cs" + i].color.setRGB(test);
i++;
}
stop();
Symbol 106 MovieClip [whole2] Frame 1
function erase() {
while (n >= 0) {
var obj = ("extraline" + n);
this[obj].removeMovieClip();
n--;
}
}
function init() {
if (initial != true) {
mainalpha = 50;
mainweight = 0;
initial = true;
}
}
function nav(hidden) {
if (hidden) {
alpha._visible = true;
stroker._visible = true;
colorpallette._visible = true;
tolerancepallette._visible = true;
} else {
alpha._visible = false;
stroker._visible = false;
colorpallette._visible = false;
tolerancepallette._visible = false;
}
}
function addpoints() {
circle._alpha = 0;
if (attached != true) {
n = 0;
while (n <= 20) {
var obj = ("extraline" + n);
this.attachMovie("extraline2", obj, n);
this[obj]._x = leftmost + random(circle._width);
this[obj]._y = topmost + random(circle._height);
attached = true;
n++;
}
}
}
init();
stop();
Instance of Symbol 16 MovieClip in Symbol 106 MovieClip [whole2] Frame 2
/* no clip actions */
Instance of Symbol 64 MovieClip "alpha" in Symbol 106 MovieClip [whole2] Frame 2
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 73 MovieClip "stroker" in Symbol 106 MovieClip [whole2] Frame 2
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 80 MovieClip "tolerancepallette" in Symbol 106 MovieClip [whole2] Frame 2
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 105 MovieClip "colorpallette" in Symbol 106 MovieClip [whole2] Frame 2
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 111 MovieClip in Symbol 115 MovieClip [howtosend] Frame 1
onClipEvent (mouseDown) {
_parent.removeMovieClip();
}
Instance of Symbol 111 MovieClip in Symbol 120 MovieClip [instructions] Frame 1
onClipEvent (mouseDown) {
_parent.removeMovieClip();
}