//creating
a new empty movieclip
this.createEmptyMovieClip("holder",
this.getNextHighestDepth());
//intializing
variables within the new empty holder
holder.maxnos =75;
holder.dropspeed=1;
var txt:MovieClip;
/*|||||||loop
to attach movieclips with diffrnt instance name to stage
||||||||*/
for (i=0; i<holder.maxnos;
i++) {
holder.attachMovie("textholder",
"textholder"+i, holder.getNextHighestDepth());
//setting
properities of the attached clip
txt = holder["textholder"+i];
txt._x =random(Stage.width);
txt._y =random(Stage.height);
txt._xscale = txt._yscale=random(60);
//making
a string containing the letters to be attached
var txtsel:String="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrtuvwxyz";
ranvalue=random(54);
/*adding
a letter at random index of the string to dynamic text field
inside the attached clip*/
txt.txt_char.text=txtsel.substr(ranvalue,1);
}
/*||||||||||function
to add movement to the attached clips||||||||||||||*/
holder.onEnterFrame = function()
{
for (i=0; i<this.maxnos;
i++) {
txt = this["textholder"+i];
txt._y += txt._xscale*(this.dropspeed/100);
txt._x += Math.sin((txt._y)/5);
if (txt._y>Stage.height)
{
txt._y = 0;
}
}
};
EXPLANATION
OF THE CODE NEXT PAGE