title: How to autosave (without dialog box) an image using as3 (Flash CS5)
body: <p>It looks like an easy question but I can't find the answer.</p>
  
  <p>I have this code:</p>
  
  <pre><code>import com.adobe.images.PNGEncoder;
  var fr:FileReference = new FileReference();
  
  var pngSource:BitmapData = new BitmapData (stage.width, stage.height);
  pngSource.draw(sketch_mc);
  
  var ba:ByteArray = PNGEncoder.encode(pngSource);
  fr.save(ba,'alon20.png');
  </code></pre>
  
  <p>which saves me an image. I want it to <strong>autosave</strong> it and not to open a dialog box as it does now. the reason I want that to happen is because I want to take picture of every frame in render time (to make a movie out of it).</p>
  
  <p>What am I missing?</p>