title: Random based on a given number?
body: <p>I'm recoding in AS3 an old project done with AS2. I have this line in AS2:</p>
  
  <pre><code> randNum = random(quizQuestions.length);
  </code></pre>
  
  <p>How can I do the same with AS3?</p>
  
  <p>Note: quizQuestions.length is the number of Questions.</p>
  
  <p>Thanks in advance,</p>
  
  <p>Sergio</p>
  
  <hr>
  
  <p>Update:</p>
  
  <pre><code>var randNum:Number = Math.round(1 + (quizQuestions.length - 1) * Math.random());
  </code></pre>
  
  <p>This wors like a charm.</p>
  
  <p>Thanks a lot guys!</p>