title: AS3: Getting values of objects by referencing their name
body: <p>I'm reading XML and attaching values to objects in two seperate movieclips. Like this</p>
  
  <pre><code>Map01:
  Marker01.name = hello there
  Marker01.short = hel
  Marker01.value = 12
  
  Map02:
  Marker02.name = hello there
  Marker02.short = hel
  Marker02.value = 99
  </code></pre>
  
  <p>Now I'm clicking on Marker01 in Map01 and get its name and value. I want to compare its value to that of Marker01 in Map02, using the name, or better yet .short because the names are long and use special characters/spaces. How do I do this? I've pretty much tried everything that seemed logical!</p>
  
  <hr>
  
  <p>EDIT: sample code for clarification</p>
  
  <pre><code>var marker01:mc_marker = new mc_marker();
  marker01.name="hello there";
  marker01.short="abc";
  marker01.val="99";
  marker01.x=10;
  marker01.y=10;
  this.mc_map01.addChild(marker01);
  
  var marker02:mc_marker = new mc_marker();
  marker02.name="hello there";
  marker02.short="abc";
  marker02.val="20";
  marker02.x=10;
  marker02.y=10;
  this.mc_map02.addChild(marker02);
  
  marker01.addEventListener(MouseEvent.MOUSE_UP, showMarkerInfo);
  marker02.addEventListener(MouseEvent.MOUSE_UP, showMarkerInfo);
  
  function showMarkerInfo(event:MouseEvent):void {
      txt_ms.text=event.target.short;
      txt_mv.text=event.target.val;
      if (event.target.short==mc_map02.marker02.short){
          txt_mvi.text="here should be the marker02 value";
      }
  }
  </code></pre>