# Question about the Random Letter generator

**URL:** <https://forum.kirupa.com/t/question-about-the-random-letter-generator/183895>\
**Category:** web dev\
**Created:** [March 31, 2006, 12:24am UTC](https://forum.kirupa.com/t/question-about-the-random-letter-generator/183895 "2006-03-31T00:24:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jbautista18](https://avatars.discourse-cdn.com/v4/letter/j/a5b964/32.png) [@jbautista18](https://forum.kirupa.com/u/jbautista18)\
**Post date:** [March 31, 2006, 12:24am UTC](https://forum.kirupa.com/t/question-about-the-random-letter-generator/183895/1 "2006-03-31T00:24:57Z")

</div>

I’ve gotten it to work. Now I wanna know something that wasn’t mentioned in the tutorial. If I were to have more than one button on a page, how do I go about getting each button to change the same set of random letters?

Right now, the code for the random letters starts off with “onClipEvent (load)” I’m thinking that if I change this to something that registers when one of the buttons is clicked on that I can just reuse the code for each button. I just can’t figure out how to get the button to control this.

Help would be appreciated.

---

<div class="post-metadata">

**Author:** ![simplistik](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/simplistik/32/7747_2.png) [@simplistik](https://forum.kirupa.com/u/simplistik)\
**Post date:** [March 31, 2006, 2:18pm UTC](https://forum.kirupa.com/t/question-about-the-random-letter-generator/183895/2 "2006-03-31T14:18:11Z")

</div>

? link the tutorial, would make it much easie for someone to help you

---

<div class="post-metadata">

**Author:** ![JoshuaJonah](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/joshuajonah/32/1775_2.png) [@JoshuaJonah](https://forum.kirupa.com/u/JoshuaJonah)\
**Post date:** [March 31, 2006, 2:31pm UTC](https://forum.kirupa.com/t/question-about-the-random-letter-generator/183895/3 "2006-03-31T14:31:58Z")

</div>

You could probably make it a function, then call it from each button.
