I’m trying to make a “random phrase builder” program, where you click a button and it puts two words together. What I want to do is, when you click a button, it goes thru a little animation and then two random words are put together (ex. blobby toe). But I can’t really get the randomization to work. The method I’m trying is that the first frame is a button that says “make phrase” and then that starts the animation. after the last frame of the animation and it displays the word, the action script is
x = random(10)
y= random(10)
If (x=1)
Text = Text add “word”
If (x=2)
Text = Text add “word2”
etc. up to 9 and same thing with y
But when I do this, the phrase is always the last varible
ex.
the line
If (x=9)
Text = Text add “word9”
and
If (y=9)
Text = Text add " anotherword9"
and then the text box always is “word9 anotherword9”
can someone help me fix the script so the words are actually random? Or if you have a suggetstion that can do what I need?