title: How to capture a streaming video display and save it to disk in Flex Builder 3?
body: <p>I've been looking for a solution to my problem for a while and didn't get the answer.
  I have a page with a <strong>VideoDisplay</strong> object and a "Take screenshot" button. I would like to get the screenshot from the streaming video and save it but I'm getting an error:</p>
  
  <blockquote>
    <p>Security sandbox violation: BitmapData.draw: <a href="http://xxx/xxx.swf" rel="nofollow">http://xxx/xxx.swf</a> cannot access rtmp://xxx/xx/xx/. No policy files granted access.</p>
  </blockquote>
  
  <p>The domain of the website from which I'm capturing the image and the rtmp is the same.</p>
  
  <p>I'm using <strong>ImageSnapshot</strong> class to capture the screenshot. This is the function responsible for taking the screenshot:</p>
  
  <pre><code>function takeSnapshot()
      {
          var imageSnap:ImageSnapshot=ImageSnapshot.captureImage(mainPlayer);
          var imageByteArray:ByteArray=imageSnap.data as ByteArray;
          var fileRef:FileReference=new FileReference();
          fileRef.save(imageByteArray, "screenshot.png");
      }
  </code></pre>
  
  <p>I've got also a cross-domain policy file with a lin:</p>
  
  <pre><code>&lt;allow-access-from domain="*" /&gt;
  </code></pre>
  
  <p>I'd be grateful for your help.</p>