Loading an image into a MovieClip, then into BitmapData [renamed]

Hello,

I am trying to load an image into a movieclip and then draw the contents of the movieclip to a bitmapData object. Below is some sample code.

target.jpg_mc.loadMovie(url);
 target.createEmptyMovieClip("loader_mc", 100);
 target.loader_mc.bmc = target.jpg_mc; // movieclip where to load original image
 target.loader_mc.tmc = target.bmp_mc; // movieclip with smoothed image
 target.loader_mc.onEnterFrame = function(){
 
  bl = this.bmc.getBytesLoaded();
  bt = this.bmc.getBytesTotal();
  if (bl >= bt && bt > 4 && this.bmc._width > 0 && this.bmc._height > 0){
   //target._parent._visible = true;
 
   this.bmc._visible = false;
 
   var bitmap = new BitmapData(this.bmc._width, this.bmc._height, true);
   this.tmc.attachBitmap(bitmap, 100,"auto", true);
   bitmap.draw(this.bmc);
 
   Stage.addListener(target);
 
   target.gotoAndPlay("in");
   this.removeMovieClip();
  }
 }

For some reason it always draws a white box rather than the image. Has anyone ever seen this happen with the bitmapData class?

Thanks for any help!

Wade