title: as3: Loading XML into a my class' property doesn't seem to do what I would expect
body: <p>This seems like it should be an easy one but I can't figure it out.</p>
  
  <p>I'm trying out a very simple class that, when created, loads and XML file into the class's property. I must be getting a basic concept tangled up here because I can see the XML coming in just fine in the handleComplete function, but the class property _result remains empty.</p>
  
  <p>What concept am I missing here?</p>
  
  <p>Thanks in advance.</p>
  
  <pre><code>public class MyClass
  {
      private var _result;
  
      public function MyClass()
      {
          var url:String = 'myFile.xml';
          var loader:URLLoader = new URLLoader();
          loader.addEventListener( Event.COMPLETE, handleComplete );
          loader.load( new URLRequest( url ) );
  
          trace(_result); //returns nothing... didn't I just load it?
      }
  
      private function handleComplete( event:Event ) : void
      {
          try
          {
              var res:XML = new XML( event.target.data );
              _result = res;
  
              trace(_result); // this writes the myFile.xml to command line as I would expect.
          }
          catch ( e:TypeError )
          {
              // some error handling code
          }
      }
  }
  </code></pre>
  
  <p>}</p>