title: ActionScript3 dictionaries
body: <p>In AS3, i want to have an associative array of type [Point] ---> [Shape], that associates various shapes with points in space. I would like to have this behaviour:</p>
  
  <pre><code>var dict : Dictionary = new Dictionary();
  var pos : Point = new Point(10, 10);
  dict[pos] = new Shape();
  var equalPos : Point = new Point (pos.X, pos.Y);
  dict[equalPos]  // &lt;-- returns undefined and not the shape i created before because equalPos reference is different from pos.
  </code></pre>
  
  <p>I'd like to have <code>dict[equalPos]</code> to return the same as <code>dict[pos]</code> because the points, while different in references, are equal as coordinates (equal as class members).</p>
  
  <p>Is there any way i can achieve this?</p>