# Random text generator

**URL:** <https://forum.kirupa.com/t/random-text-generator/83790>\
**Category:** flash\
**Created:** [March 22, 2005, 6:01am UTC](https://forum.kirupa.com/t/random-text-generator/83790 "2005-03-22T06:01:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gt\_The\_Skull\_lt](https://avatars.discourse-cdn.com/v4/letter/g/4bbf92/32.png) [@gt\_The\_Skull\_lt](https://forum.kirupa.com/u/gt_The_Skull_lt)\
**Post date:** [March 22, 2005, 6:01am UTC](https://forum.kirupa.com/t/random-text-generator/83790/1 "2005-03-22T06:01:03Z")

</div>

hi all. i posted this over at the [http://laco.wz.cz/](http://laco.wz.cz/forum)

but i think these forums are move activite, so no one bite my head off for doing this. and i hope they dont mind. :puzzled:

BUT.

[http://laco.wz.cz/tween/?page=examples](http://laco.wz.cz/tween/?page=examples)

if you go here… the first example ([navigation like [yugop.com](http://yugop.com) v4 (without lmctween)](javascript:showswf(‘yugoplikemenu’,550,200))) is what my question is about, the fla download is next to it.

when you put ur mouse over a button, there is a niffty little random text effect before it goes into the proper name.

how do i do this on something totaly new!

> function startTextAnimation(oldId,newId){  
> //duration = 20  
> //printf(“//”,newId,items\_arr[newId].smallText);  
> items\_arr[oldId].mc.label = items\_arr[oldId].smallText  
> //items\_arr[newId].mc.label = items\_arr[newId].smallText +“:”+ items\_arr[newId].text  
> var strlen = items\_arr[newId].text.length  
> textanim\_mc.onEnterFrame = function(){  
> var rndstr = “”;  
> //  
> if ((textanimDuration - textanimTime) \< strlen){  
> rndstr += items\_arr[newId].text.substr(0, strlen - (textanimDuration - textanimTime))  
> for (var i = 0; i\<(textanimDuration - textanimTime); i++){  
> rndstr+= String.fromCharCode(random(50) + 20)  
> }

```
    } else {
    for (var i = 0; i&lt;strlen; i++){
        rndstr+= String.fromCharCode(random(50) + 20)
    }
    }
    items_arr[newId].mc.label = items_arr[newId].smallText +":"+ rndstr
    //            
    if (textanimTime++ &gt; textanimDuration){
        items_arr[newId].mc.label = items_arr[newId].smallText +":"+ items_arr[newId].text
        textanimTime = 0
        delete this.onEnterFrame
    }
}

```

i think it has something to do with this, but not sure.

i hope someone can help, and i hope im not doing anything illegal by posting here.

thanks.
