

/*
*************************************
code by vishnu ms flashhelp.110mb.com
*************************************
*/
//Creating
an empty movieclip to attach the clip from library
_root.createEmptyMovieClip("holder",this.getNextHighestDepth());
//settig variables
holder.maxdrops=600;//no of drops
var downspeed=500;//speed of the drops
var dropslop=30;//slop of the drops
//Part 1 attaching the clips with loop
for(i=0;i<holder.maxdrops;i++){
holder.attachMovie("circleclip","drop"+i,i+5);
focuseddrop=holder["drop"+i]
focuseddrop.cacheAsBitmap=true;
focuseddrop._x=random(Stage.width);
focuseddrop._y=random(Stage.height);
focuseddrop._yscale=random(100);
focuseddrop._rotation=-dropslop;
}
//part
2 setting an interval for motion of drops
var dropup=setInterval(movedrop,1)
//function to repeat in the interval
function movedrop(){
for(i=0;i<holder.maxdrops;i++){
focuseddrop=holder["drop"+i]
focuseddrop._rotation=-dropslop;
focuseddrop._y+=25+downspeed/focuseddrop._yscale;
focuseddrop.x+=Math.tan(dropslop);
if(focuseddrop._y>=Stage.height+20){
focuseddrop._y=random(30);
focuseddrop._x=random(Stage.width);
}
}
}
EXPLANATION
OF THE CODE NEXT PAGE >>