PDA

View Full Version : Dusty Bubble Line


jerez_z
01-17-2006, 05:37 PM
Its a bubling line that blows away in the wind.. like dust.


onMouseDown = function () {
old = new Array(_root._xmouse, _root._ymouse, true, Math.random()*0xFFFFFF, Math.round(5*Math.random()));
};
onMouseUp = function () {
old = new Array(_root._xmouse, _root._ymouse, false, Math.random()*0xFFFFFF, Math.round(5*Math.random()));
};
onMouseMove = function () {
if (old[2]) {
dist = {tot:Math.sqrt(Math.pow(_root._xmouse-old[0], 2)+Math.pow(_root._ymouse-old[1], 2)), x:_root._xmouse-old[0], y:_root._ymouse-old[1], pieces:1, d:_root.getNextHighestDepth(), maxLength:5};
while (dist.tot>dist.maxLength) {
dist.pieces++;
dist.tot -= dist.maxLength;
}
for (i=1; i<=dist.pieces; i++) {
clip = _root.createEmptyMovieClip("clip"+dist.d, dist.d);
clip._x = old[0];
clip._y = old[1];
clip.lineStyle(old[4], old[3], 100);
clip.lineTo((dist.x/dist.pieces)*i, (dist.y/dist.pieces)*i);
clip.stats = {age:0, yv:0, xv:0, rv:0};
clip.onEnterFrame = function() {
(this.stats.age>40) ? this.stats.yv += .7 : this.stats.age++;
(this.stats.age>40) ? this.stats.xv += Math.random() : null;
(this._y>400) ? this.removeMovieClip() : this._y += this.stats.yv;
(this._x>550) ? this.removeMovieClip() : this._x += this.stats.xv;
};
}
(old[5]) ? old[4] += .3 : old[4] -= .3;
(old[4] >= 8 || old[4] < 0) ? (old[5]) ? old[5] = false : old[5] = true : null;
old = new Array(_root._xmouse, _root._ymouse, true, old[3], old[4], old[5]);
}
};

Seb Hughes
01-17-2006, 05:48 PM
Intresting Jeremy :D

ElectricGrandpa
01-17-2006, 05:48 PM
Sweet. I forgot how nice it looks to have lines with variable thicknesses... I like clicking a lot and seeing the different colours, although I wish there was some way you could make it so that it ONLY does the dust thing when you have a certain button pressed.

NiñoScript
01-17-2006, 07:13 PM
very good :)

jerez_z
01-17-2006, 09:02 PM
Sweet. I forgot how nice it looks to have lines with variable thicknesses... I like clicking a lot and seeing the different colours, although I wish there was some way you could make it so that it ONLY does the dust thing when you have a certain button pressed.then it would slow down.. if you never did the dust:alien:

kdd
01-17-2006, 09:17 PM
that's really good. :)

ElectricGrandpa
01-18-2006, 12:02 AM
then it would slow down.. if you never did the dust

True, true.

3d Nirvana
01-18-2006, 12:23 AM
nice!

hybrid101
01-18-2006, 08:07 AM
cool! i like that dust effect too!

fluid_tw0
04-18-2006, 07:48 AM
i love it!

alijumcepa
05-30-2006, 08:04 AM
nice really nice

vega
07-14-2006, 08:37 AM
Love it.(-:

Btw, are you the guy who submitted it at FFfiles ?

jerez_z
07-15-2006, 04:49 AM
ya thats me

pedromau
09-05-2006, 10:12 AM
It would be awsome if that thing work as a preloader....

imagine drawing an horizontal line... and when the 100% are reached it blows ... can it be done?!

Nice work! :)

notsocoolxp
08-06-2007, 09:21 PM
cool