title: Converting MovieClip to Bitmap with Dispose()
body: <p>I am working on a mobile game using Flash CS6 with AIR. also design and coding on same platform (not using starling etc.).</p>
  
  <p>I am converting movieClips (static, not animated) to bitmap dynamically and its working fine. But i realize with this process bitmapData caching on memory and with big shapes it takes a lot of memory. Then i decide to after added to stage clear to bitmapData by dispose(). But its removes from stage and anywhere its shown.</p>
  
  <p>My code;</p>
  
  <pre><code>var target:MovieClip = new Ex_mc2();
  target.x=100;
  target.y=300;
  addChild(target);
  
  var bounds:Rectangle = target.getBounds(this);
  var bmpData:BitmapData = new BitmapData(Math.floor(bounds.width), Math.floor(bounds.height), true, 0);
  var bmpMatrix:Matrix = target.transform.matrix;
  bmpMatrix.translate(-bounds.x, -bounds.y); // Draw bitmap
  bmpData.draw(target, bmpMatrix);
  
  var bmp:Bitmap = new Bitmap(bmpData);
  bmp.x=100;
  bmp.y=300;
  addChild(bmp);
  
  removeChild(target);
  //bmpData.dispose(); I want to use this and i dont want my bmp disappear 
  </code></pre>
  
  <p>Searching to solution for one week but i cant figure it out.
  So my question is;</p>
  
  <p>Can i converting movieClips to bitmap with freeing to memory? Like adding stage a static png file?</p>