//
//ActionScritp PubicHair // Rafael Puyana · 2006
//download source file from www.rafaelpuyana.com
function neg() {
return Math.pow(-1, Math.round(Math.random()*1));
}
MovieClip.prototype.pubicHair = function() {
this.lineStyle(1, 0x000000, 100);
ini = 0;
anx1 = ini+((Math.random()*100)*neg());
any1 = Math.random()*100;
crtlx1 = ((Math.random()*30)*neg())+ini;
ctrly1 = (Math.random()*any1);
this.moveTo(ini, 0);
this.curveTo(crtlx1, ctrly1, anx1, any1);
this.lineStyle(1, 0x000000, 80);
ini = anx1;
anx2 = ini+(Math.random()*30*neg());
any2 = (Math.random()*50)+any1;
crtlx2 = ((Math.random()*30)*neg())+ini;
ctrly2 = (Math.random()*80)+any1;
this.curveTo(crtlx2, ctrly2, anx2, any2);
this.lineStyle(1, 0x000000, 60);
ini = anx2;
anx3 = ini+(Math.random()*30*neg());
any3 = (Math.random()*100)+any2;
crtlx3 = ((Math.random()*30)*neg())+ini;
ctrly3 = (Math.random()*80)+any2;
this.curveTo(crtlx3, ctrly3, anx3, any3);
this.lineStyle(0, 0x000000, 45);
ini = anx3;
anx4 = ini+(Math.random()*30*neg());
any4 = (Math.random()*50)+any3;
crtlx4 = ((Math.random()*30)*neg())+ini;
ctrly4 = (Math.random()*80)+any3;
this.curveTo(crtlx4, ctrly4, anx4, any4);
fle(crtlx4, ctrly4);
};
function createHair() {
var level = hair.getNextHighestDepth();
hair.createEmptyMovieClip("p"+level, level);
var pelo = eval("hair."+"p"+level);
pelo.pubicHair();
pelo._x = Math.random()*Stage.width;
}
function beginPubicHair () {
_root.createEmptyMovieClip("hair", 1);
for (a=1; a<=1000; a++) {
createHair();
}
hair._rotation = 180;
hair._x = Stage.width;
hair._y = Stage.height;
}
beginPubicHair()