# Large amount of textfields should be animated and random without xml file

**URL:** <https://forum.kirupa.com/t/large-amount-of-textfields-should-be-animated-and-random-without-xml-file/285242>\
**Category:** flash\
**Created:** [March 29, 2009, 11:15am UTC](https://forum.kirupa.com/t/large-amount-of-textfields-should-be-animated-and-random-without-xml-file/285242 "2009-03-29T11:15:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Silverfisken](https://avatars.discourse-cdn.com/v4/letter/s/ed655f/32.png) [@Silverfisken](https://forum.kirupa.com/u/Silverfisken)\
**Post date:** [March 29, 2009, 11:15am UTC](https://forum.kirupa.com/t/large-amount-of-textfields-should-be-animated-and-random-without-xml-file/285242/1 "2009-03-29T11:15:06Z")

</div>

Please help, I’m lost. **Is this an impossible problem to solve without external files?**

I have 100 names. I want to have it animated like the genname.fla I attached.  
And it should show these names when I mouseover it, in completely random order.  
Like the namebanner.fla I attached.  
I don’t want the flash swf to get too large in filesize or the animation playing choppy.

**How do I implement all these names**  
**(with animation) with coding in AS2 instead of timeline and labels?**  
**W** _ **ithout using external files xml, swf, txt.** _  
My solution I chosen is to have Labels (label1, label2…) in my timeline and I have now 30 labels, 30 movieclips+30MC:s in every with the name animation. It is so hard work to copy label, motion, convert new movieclip and do this for 100 names. Maybe I need 200 names… This is impossible to sort out.

**Every name must have the same:**

- animation: movement, speed, blurfilter
- font

**I need to be able to change:**

- the name (firstname, lastname)
- animation (blurfilter, where it should start animate and stop, how fast…)  
And I need to be able to change the font so It changes in every name so I don’t need  
to go into every movieclip and change.

I have following code:

```auto

 
//random
function fncShuffle()
{ return Math.floor(Math.random()*5)-1; }
 
 
//function for every label on the timeline
//the array contains the labels and the array shuffles to random
//return is an array with the labels in random order
function mysortinArrar()
{
 
// all the labels
_loc1 = new Array("label1","label2","label3","label4","label5","label6","label7","label8","label9","label10","label11","label12","label13","label14","label15","label16","label17","label18","label19","label20","label21","label22","label23","label24","label25","label26","label27","label28","label29","label30");
tempar=new Array();
qtySort = 3;
rraRange = [1, 4];
nbrLen = 1+rraRange[1]-rraRange[4];
rraValues = _loc1;
for (nbrI=0; nbrI<nbrLen; nbrI++) { rraValues[nbrI] = nbrI+rraRange[0];}
rraValues.sort(fncShuffle);
rraSort = rraValues.slice(0, qtySort);
//my own kind of testing so that 2 names doesn't show after eachother
//this doesn't work
if(rraSort[0]==rraSort[1]){
 tempar[0]=rraSort[rraSort.length];
 rraSort[0]=rraSort[rraSort.length];
 rraSort[1]=tempar[0];
}
return (rraSort[0]);
}
this.gotoAndPlay(mysortinArrar());

```

See the attached \*flas.
