AS random Number


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

Get a random Number in AS3


Copy this code and paste it in your HTML
  1. function randRange(min:Number, max:Number):Number {
  2. var randomNum:Number = Math.floor(Math.random() * (max - min + 1)) + min;
  3. return randomNum;
  4. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.