title: AS3 - Clone an object
body: <p>I have a game with a variety of ship types. My <code>Ship</code> class has a static array holding one of each of the types in it. Whenever I make a new <code>Ship</code> (other than when initializing this array), I want to make it a clone of one of the existing <code>Ship</code> objects in my prototype array.</p>
  
  <p>1 - How can I run through all the properties in one <code>Ship</code> object and assign them to a second <code>Ship</code> object?</p>
  
  <p>2 - How can I see if a property is an object or a basic type like <code>String</code> or <code>int</code>? Some of the objects in my <code>Ship</code> class need to be cloned, and some are just references that need to stay the same.</p>