After it works so nicely on Mike Chambers' site I'll also give Sean Voisen's MTCodeBeautifier a try.
As an example here's a little prototype that helps you to draw eggs:
MovieClip.prototype.drawEgg = function(x, y, r) {
var rx = r/1.618;
var ry = r;
var ry1 = 2*ry*.618;
var ry2 = 2*ry*.382;
this.moveTo(x+rx, y);
this.curveTo(rx+x, -0.4142*ry1+y, 0.7071*rx+x, -0.7071*ry1+y);
this.curveTo(0.4142*rx+x, -ry1+y, x, -ry1+y);
this.curveTo(-0.4142*rx+x, -ry1+y, -0.7071*rx+x, -0.7071*ry1+y);
this.curveTo(-rx+x, -0.4142*ry1+y, -rx+x, y);
this.curveTo(-rx+x, 0.4142*ry2+y, -0.7071*rx+x, 0.7071*ry2+y);
this.curveTo(-0.4142*rx+x, ry2+y, x, ry2+y);
this.curveTo(0.4142*rx+x, ry2+y, 0.7071*rx+x, 0.7071*ry2+y);
this.curveTo(rx+x, 0.4142*ry2+y, rx+x, y);
};
And this is how it's used:
this.clear();
for (var i = 0; i<100; i++) {
this.lineStyle(0, 0);
this.beginFill(0xffffff);
var y = 100+Math.random()*300;
this.drawEgg(100+Math.random()*500, y, y/10);
this.endFill();
}



