Posted By

tuffstudio on 01/06/11


Tagged


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

nyong15
janitha


Custom Random number within range


 / Published in: ActionScript 3
 

  1. trace( randRange( 1, 10 ));
  2.  
  3.  
  4. function randRange( minNum:Number, maxNum:Number ) : Number
  5. {
  6. return (Math.floor(Math.random() * (maxNum - minNum + 1)) + minNum);
  7. }

Report this snippet  

You need to login to post a comment.