title: Splice then re-index array in ActionScript 3
body: <p>I want to remove the first four indexes from the array using <code>splice()</code>, then rebuild the array starting at index 0. How do I do this?</p>
  
  <pre><code>Array.index[0] = 'one';
  Array.index[1] = 'two';
  Array.index[2] = 'three';
  Array.index[3] = 'four';
  Array.index[4] = 'five';
  Array.index[5] = 'six';
  Array.index[6] = 'seven';
  Array.index[7] = 'eight';
  
  Array.splice(0, 4);
  
  Array.index[0] = 'five';
  Array.index[1] = 'six';
  Array.index[2] = 'seven';
  Array.index[3] = 'eight';
  </code></pre>
  
  <p>I am accessing the array via a timer, on each iteration I want to remove the first four indexes of the array. I assumed <code>splice()</code> would remove the indexes then rebuild the array starting at 0 index. it doesn't, so instead what I have done is created a 'deleteIndex' variable, on each iteration a +4 is added to deleteIndex.</p>
  
  <pre><code>var deleteIndex:int = 4;
  function updateTimer(event:TimerEvent):void
  {
      Array.splice(0,deleteIndex);
      deleteIndex = deleteIndex + 4;
  }
  </code></pre>