View Full Version : random math
korrupt
January 26th, 2003, 03:58 AM
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
andr.in
January 26th, 2003, 04:23 AM
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:
korrupt
January 26th, 2003, 04:29 AM
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
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.