Posted By

tuffstudio on 01/06/11


Tagged


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

mitien
nyong15
dstrystudio


[AS3] Create a random number within a range


 / Published in: ActionScript 3
 

  1. var rand:Number = Math.random();
  2. var max:Number = 10;
  3. var randInRange:Number = Math.round(rand * max);
  4. trace(randInRange);

Report this snippet  

You need to login to post a comment.