Mouse Lightning (kinda)

A kinda lightning effect. It’s definatley been done before, but here is mine.

Mouse Lightning (16 lines):

Stage.scaleMode = "noScale";
_root.attachBitmap((all=new flash.display.BitmapData(550, 400, true)), 1);
_root.onEnterFrame = function() {
    _root.clear();
    num = Math.random()*4+4;
    for (var i = 0; i<num; i++) {
        _root.lineStyle(Math.random()*3, 0x0066CC, Math.random()*100);
        inum = Math.random()*6+5;
        (down) ? _root.moveTo(_root._xmouse, _root._ymouse) : _root.moveTo(550/2, 400/2);
        (down) ? poi = new flash.geom.Point(Math.random()*550, Math.random()*400) : null;
        for (var c = 1; c<=inum; c++) {
                (down) ? _root.lineTo(flash.geom.Point.interpolate(new flash.geom.Point(poi.x, poi.y), new flash.geom.Point(_root._xmouse, _root._ymouse), (1/inum)*c).x+Math.random()*20-10, flash.geom.Point.interpolate(new flash.geom.Point(poi.x, poi.y), new flash.geom.Point(_root._xmouse, _root._ymouse), (1/inum)*c).y+Math.random()*20-10) : _root.lineTo(flash.geom.Point.interpolate(new flash.geom.Point(_root._xmouse, _root._ymouse), new flash.geom.Point(550/2, 400/2), (1/inum)*c).x+Math.random()*20-10, flash.geom.Point.interpolate(new flash.geom.Point(_root._xmouse, _root._ymouse), new flash.geom.Point(550/2, 400/2), (1/inum)*c).y+Math.random()*20-10);
        }
    }
    all.draw(new flash.display.BitmapData(550, 400, true, 0x11FFFFFF));
    all.draw(all);
    all.draw(_root);
};
onMouseDown = function() {
    down = true;
}
onMouseUp = function() {
    down = false;
}

[FONT=Courier New][/FONT]