title: Inherit stage background from a child SWF and set the parent's to match
body: <p>I have a wrapper flash file that loads an external SWF based on the contents of a file entry. The wrapper has no interface of its own and only used as a middleman to load the proper child. The issue I have is the children can have varying different stage background colors and I need the parent to inherit this from the child when loaded.</p>
  
  <pre><code>if (ActiveSlide == null)
  {
      var ActiveSlide = "";
  }
  
  if (myLoader == null)
  {
      var myLoader:Loader = new Loader();  
  }
  
  var myTextLoader:URLLoader = new URLLoader();
  myTextLoader.addEventListener(Event.COMPLETE, onLoaded);
  
  function onLoaded(e:Event):void {
      if (e.target.data != ActiveSlide)
      {
          var Incoming:Loader = myLoader;
          ActiveSlide = e.target.data;
  
          var url:URLRequest = new URLRequest(ActiveSlide);
          Incoming.load(url);
  
          addChild(Incoming);
          stage.color = Incoming.stage.color;
          myLoader.unloadAndStop();
      }
  }
  
  myTextLoader.load(new URLRequest("CurrentSlide.txt?time=" + new Date().getTime()));
  </code></pre>
  
  <p>You can see the line where I have <code>stage.color = Incoming.stage.color;</code> does not work as I had hoped.</p>