title: air writeObject() not writing arrays properly
body: <p>When creating an array and assigning a value to element 32 or 36 or 40 or 44 or .... before assigning a value to element 0 causes writeObject() to behave very strange. The following code should be sufficient to reproduce it:</p>
  
  <pre><code>var array:Array = new Array();
  //array[0]=0;
  array[32]=1;
  array[0]=0;
  var  byteArray:ByteArray = new ByteArray();
  byteArray.writeObject(array);
  byteArray.position=0;
  array = byteArray.readObject();
  trace(array)              //1
  trace(array[0])           //1
  </code></pre>
  
  <p>This is clearly not what is expected from this code and stangely if the line that is now a comment is added it does work normally. Also changing the 32 into a lower number or something that is not a mutiple of 4 removes the problem too. </p>
  
  <p>My question: Can anyone confirm to have the same problem and how do I fix it?
  I am currently using flash builder 4.7 and had the same problem with flash professional 5.5 but not with the debugger of flash 5.5. Also I did not have this problem with an action script file in flash 5.5 but only with air.</p>