title: Actionscript 3.0 Creating bitmapData from Loaded URL
body: <p>I want to load an image and then use its bitmapData. The program worked when I ran it from flash, but not when I uploaded it online. There seem to be a bunch of weird problems. The
  <code>addChild(myLoader)</code> works online but <code>addChild(loadedPic)</code> does not, and the myLoader doesn't seem to have bitmapData I can access.
  For some reason the <code>urlInput.text = "Done."</code> will work online but not the <code>urlInput.text = ...</code> that I added to see what's going on. When I run this on my computer I get the urlInput saying "[object Bitmap] hi" like it should, but online it just says "Loading..." still</p>
  
  <pre><code>var myLoader:Loader = new Loader();
  
  submitButton.addEventListener(MouseEvent.CLICK, buttonRelease);
  function buttonRelease(event:MouseEvent){
      var fileRequest:URLRequest = new URLRequest(urlInput.text);
      urlInput.text = "Loading...";
      myLoader.load(fileRequest);
  }
  
  myLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onComplete);
  function onComplete(e:Event){
      urlInput.text = "Done.";
      //addChild(myLoader);
  
      //var loadedBitmap = new BitmapData(myLoader.width, myLoader.height);
      //loadedBitmap.draw(myLoader);
      //var loadedPic = e.target.content;
      //loadedPic.width = 300;
      //loadedPic.height = 300;
      //addChild(loadedPic);
      urlInput.text = e.target.content.toString() + " hi";
      //usedPic = loadedPic;
  }
  </code></pre>