# Help With Randomness

**URL:** <https://forum.kirupa.com/t/help-with-randomness/12286>\
**Category:** flash\
**Created:** [January 29, 2003, 7:12am UTC](https://forum.kirupa.com/t/help-with-randomness/12286 "2003-01-29T07:12:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Qwerty](https://avatars.discourse-cdn.com/v4/letter/q/4491bb/32.png) [@Qwerty](https://forum.kirupa.com/u/Qwerty)\
**Post date:** [January 29, 2003, 7:12am UTC](https://forum.kirupa.com/t/help-with-randomness/12286/1 "2003-01-29T07:12:05Z")

</div>

Hey,

I really need to know how i can make some flash so when i click a button, it will show a random word from a list of words i have.  
Even better if you no how to do it so flash reads a .txt (like the headlab newsflasher) file for the words so i can update it easily.

This is very important.

Thnx.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [January 29, 2003, 7:36am UTC](https://forum.kirupa.com/t/help-with-randomness/12286/2 "2003-01-29T07:36:05Z")

</div>

use Math.random()\*a where set of a is {a | a is whateverAmountOfText} in MX.  
random in math is between 0 and 1 so \*5 puts it tween 1 and 5.  
then maybe an if then else chain.  
Just a thought…
