title: AS3 Creating an array of objects
body: <p>I would like to add a bunch of cars to the stage, and store them in an array as objects.  The problem is I hate using external AS files and would like to keep it as simple as possible.</p>
  
  <p>I tried doing :</p>
  
  <pre><code>var car:Object = {carcolor:String,carscale:Number,carpower:Number};
  var test:Array = new Array()
  for (var i:Number=0; i&lt;10; i++) {
      test.push(car)
  }
  </code></pre>
  
  <p>The problem is if I try to set a value of one object in the  like 
  <code>test[1].carscale = 5</code></p>
  
  <p>Every object in the array gets their attribute carscale set to 5.</p>
  
  <p>Is there any way I can do this without using external class files?</p>