title: Add Child immediately in Flex 3
body: <p>I'm having a problem similar to <a href="https://stackoverflow.com/questions/1410398/flex-dialog-not-display-immediately">FLEX: dialog not display immediately</a> . Code follows:</p>
  
  <pre><code>private function saveBitmap(event:ContextMenuEvent):void
  {
      loadingScreen.visible = true;
      loadingScreen.appLoadingText.text = "Preparing bitmap...";
      addChild(loadingScreen);
  
      validateNow();
  
      var bmpd:BitmapData = new BitmapData(canv.width, canv.height);
      bmpd.draw(canv);
  
      var fr:FileReference = new FileReference();
      fr.addEventListener(DataEvent.UPLOAD_COMPLETE_DATA, removeLoadingScreen);
      fr.addEventListener(Event.CANCEL, removeLoadingScreen);
      var png:PNGEncoder = new PNGEncoder();
      var iba:ByteArray = png.encode(bmpd);
      fr.save(iba, "export.png"); 
  }
  </code></pre>
  
  <p>Basically, bmpd.draw and/or png.encode are dog slow, so I'd like to have a nice "please hold while we prepare your png" dialog to appear. I can't use callLater() because of the FileReference.</p>
  
  <p>And just for good measure, the loading screen appears at the same time the save dialog appears from the call to fr.save().</p>
  
  <p>Any ideas?</p>
  
  <p>Cheers!</p>