# Dusty Bubble Line

**URL:** https://forum.kirupa.com/t/dusty-bubble-line/175796
**Category:** contests
**Created:** [January 17, 2006, 9:37pm UTC](https://forum.kirupa.com/t/dusty-bubble-line/175796 "2006-01-17T21:37:29Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![jerez\_z](https://avatars.discourse-cdn.com/v4/letter/j/bc79bd/32.png) [@jerez\_z](https://forum.kirupa.com/u/jerez_z)
#### Post date: [January 17, 2006, 9:37pm UTC](https://forum.kirupa.com/t/dusty-bubble-line/175796/1 "2006-01-17T21:37:29Z")

</div>

Its a bubling line that blows away in the wind… like dust.

```auto

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]);
    }
};

```

---

<div class="post-metadata">

### Author: ![fluid\_tw0](https://avatars.discourse-cdn.com/v4/letter/f/48db29/32.png) [@fluid\_tw0](https://forum.kirupa.com/u/fluid_tw0)
#### Post date: [April 18, 2006, 10:48am UTC](https://forum.kirupa.com/t/dusty-bubble-line/175796/2 "2006-04-18T10:48:45Z")

</div>

i love it!
