Whoah, you’re at our level cap. Good job, you rock! Here, have some cake.
Community Get activity updates from around Kongregate.
Explore Kongregate & earn 10 kreds Here are your 10 free kreds Explore Kongregate & earn a trophy Here’s a shiny trophy for you 15%
Keep exploring Kongregate with more badges and games!
Hide the progress bar forever? Yes No
5 posts
Sign in to reply
what is equivalent of random (in as2) in as3?
by this i mean in as2 an example would be i said random(10) than it would choose a random number between 0 and 10.
Please read the manual: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/Math.html
‘random()’ generates a number in the range 0 <= n < 1, so if you want a random number between 0 and 10, you would multiply the result by 10, as such:
Math.random() * 10;
I found this tutorial helpful actually when i was learning. And Math.random() is in as2 and as3
0 <= n <= 1 ain’t it?
Nope, it will never generate 1.
X
Loading