PDA

View Full Version : Drawing thing



Gelatine Cow
January 13th, 2006, 09:10 AM
I dunno what to call this, but it's the first idea I had when i saw this comp

_global.colour = (Math.random()*0x888888)+0x888888;
_global.numlines = 0;
_root.createEmptyMovieClip("slate_mc", 1000).onEnterFrame = function() {
this.lineStyle(5, (_global.colour), 100);
this.i--;
if (this.i<=0) {
this.i = _global.numberClips;
}
this.duplicateMovieClip("copy"+this.i, Math.max(this.i, 1)).onEnterFrame = function() {
this._alpha = this._xscale=this._yscale -= 100/_global.numberClips;
if (this._xscale<=1) {
this.removeMovieClip();
}
};
};
_root.slate_mc.i = _global.numberClips=20;
_root.slate_mc._x = _root.slate_mc._y=Stage.width/2;
_root.onMouseMove = function() {
if (_global.numlines*_global.numberClips>=3250) {
clearDraw();
}
slate_mc.lineTo(_root.slate_mc._xmouse, _root.slate_mc._ymouse);
_global.numlines++;
};
_root.onMouseDown = function() {
_global.colour = (Math.random()*0x888888)+0x888888;
clearDraw();
slate_mc.moveTo(_root.slate_mc._xmouse, _root.slate_mc._ymouse);
};
function clearDraw() {
_root.slate_mc.clear();
_global.numlines = 0;
}
32540
nowhere near as cool as everyone else's but anyway...

Stratification
January 13th, 2006, 09:53 AM
Not bad at all, I spent a little bit playing with it, it's at the very least a different sort of entry. Pretty enjoyable.

Gelatine Cow
January 13th, 2006, 10:05 AM
Thanks.
After I finished that I saw Aussie Devil's hypocloidage v2 and was inspired to create this:

Jacobs Ladder:

_root.createEmptyMovieClip("slate_mc", 999).onEnterFrame = function() {
if (!loaded) {
this.clear();
varib = ((Math.random()*0xA)+0x6).toString(16);
this.lineStyle(3, parseInt("0x"+varib+varib+varib+varib+"00")+0x0000FF, 100, false, "none", "none", "miter");
//vars = [x, y, length, height, randomness, currentx, currenty]
vars = [125, 300, 200, 400, 10, 0, 0];
this._x = vars[0];
this._y = vars[1];
this.moveTo(0, 0);
loaded = true;
}
while (vars[5]<(this._x+vars[2]) && vars[6]<(this._y+vars[3])) {
vars[5] += ((Math.random()*vars[4]))/2;
vars[6] += ((Math.random()*vars[4])-(vars[4]/2));
this.lineTo(vars[5], vars[6]);
}
this._yscale = this._y -= 5;
loaded = !(this._y<=vars[3]-vars[1]);
};
_root.createEmptyMovieClip("ladder_mc", 1000).onEnterFrame = function() {
if (!drawn) {
xpoints = [50, 125, 125, 450, 450, 525, 525, 50];
ypoints = [50, 50, 375, 375, 50, 50, 425, 425];
this.beginFill(0xBBBBBB, 100);
this.moveTo(xpoints[0], ypoints[0]);
for (i=0; i<xpoints.length; i++) {
this.lineTo(xpoints[i], ypoints[i]);
}
drawn = true;
}
};

32541

hybrid101
January 13th, 2006, 10:14 AM
i like the first one! was fun playing with it.

NiñoScript
January 13th, 2006, 11:00 AM
yeah, i agree. i like the first one :)
the second is.. not-interactive, that's not fun :P

Seb Hughes
January 14th, 2006, 01:40 PM
Wow very intresting, man im gonna have a hard time judging.