title: URLLoader data to BitmapData
body: <p>I'm trying to load an image file that's right next to the .SWF file. Something like this:</p>
  
  <pre><code>var loader:URLLoader = new URLLoader();
  loader.dataFormat = URLLoaderDataFormat.BINARY;
  loader.addEventListener(Event.COMPLETE, function(e:Event):void {
      trace(typeof(loader.data));
      graphic = spritemap = new Spritemap(loader.data, 32, 32);
      ...
  }
  </code></pre>
  
  <p>But this is the output I get:</p>
  
  <pre><code>object
  [Fault] exception, information=Error: Invalid source image.
  </code></pre>
  
  <p>The thing is loader.data has the image's bytes but is not a BitmapData instance and that's what Spritemap is expecting.</p>
  
  <p>How to convert to BitmapData?</p>
  
  <p>Thanks</p>