title: ActionScript 3.0 Randomize array, display number, and splice that number
body: <p>So I am building a deck of cards.  I have them blocked out, and appearing correctly on the screen.  Now I need to build an array with numbers 1-16, and display them randomly on the cards without duplicating any numbers.  My main problem is I can't figure out how to display the random numbers on the cards.  I have filled the array, got the cards displaying correctly, I can even display the numbers in order, but can't figure out the code to display the numbers randomly.  Thanks in advance.</p>
  
  <p>Below is the code I have so far, which displays the cards with numerically ordered numbers.</p>
  
  <pre><code>var numberOfColumns=8;
  var cardNumber:Array = new Array();
  
  
  
          //---"for" function to display card columns---\\
  
  for(var i:int = 1; i &lt; 17; i++) {
  var card = new Card(); 
  cardNumber[i]= i;
  
  card.x = ((i-1) % numberOfColumns) * 70; 
  card.y = (Math.floor ((i-1)/numberOfColumns) * 80);
  
   card.cardTxt.text = i;
  
  trace(i);//trace card count in Output
  
  addChild(card);//add object to display list
  }
  
  trace(cardNumber);
  </code></pre>