Posted By

ypmits on 08/13/06


Viewed 641 times
Favorited by 4 user(s)


/ 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


RSS Icon Subscribe to comments

You need to login to post a comment.