Posted By


ypmits on 08/13/06

Statistics


Viewed 813 times
Favorited by 4 user(s)

getRandomNumber


/ Published in: ActionScript
Save to your folder(s)

This will return a random number between two given numbers.


Copy this code and paste it in your HTML
  1. public function getRandomNumber(minNum:Number,maxNum:Number):Number{
  2. return(minNum+Math.floor(Math.random()*(maxNum+1-minNum)));
  3. };

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.