Random math

Hey Kirupa, Thanks for the help on the random math tutorials, but I’m having a problem displaying the actual number. Would I make a variable of it?

Here’s the code I got from the tut:

Math.floor(Math.random()*(25-15))+7;

How do I display it in a text box now, or make it variable or… :q:

Thanks,
KoRRupt

You don’t have to make it a variable but it’s better that way!

yourvariable = Math.floor(Math.random()*(25-15))+7;
yourtextbox = yourvariable;

change yourvariable to whatever you like and yourtextbox to the variable name of the tetbox you want the text to be displayed!
But without the variable the code should look like this:

yourtextbox = Math.floor(Math.random()*(25-15))+7;

yourtextbx = your variable name of da textbox

:bounce:

Thanks Skyo for the fast response! That helped answer everything I was looking for. I’m new to actionscripting, I just started taking tutorials yesterday… Thanks fro clearing things up!

Happy Animating!
-KoRRupt