1 Reply Latest reply on Jun 22, 2010 1:55 PM by cyber0897

    i get a security sandbox error #2122 when i try to use ImageSnapshot on video player


      hey guys... so all my application does is... it has a video player... and when i initiate the component it loads the flv from a different server, and plays the video... now while its playing the video i have a button called capture, and whe you hit that button the user is able to take snapshots of the current frame.


      this seems to work perfectly locally, but as soon as i uploaded it to the server i get problems...


      the error states:

      SecurityError: Error #2122: Security sandbox violation: BitmapData.draw: http://website1.com/Content/swf/oneStopImageVersion.swf cannot access http://website2.com/videos/originals/Grand_Opening.flv. A policy file is required, but the checkPolicyFile flag was not set when this media was loaded.
           at flash.display::BitmapData/draw()
           at mx.graphics::ImageSnapshot$/captureBitmapData()
           at modules.videoHandler::videoHandler/captureVideo()
           at modules.videoHandler::videoHandler/___videoHandler_LinkButton3_click()


      i have the crossdomain file in the root directory of website2.com, and i have the folloing line of code in there

      <?xml version="1.0"?>
           <site-control permitted-cross-domain-policies="all" />
           <allow-access-from domain="website1.com"/>
           <allow-access-from domain="*.website1.com"/>
               <allow-http-request-headers-from domain="*.website1.com" headers="SOAPAction"/>



      any ideas on how to fix this problem???


      my actionscript code is as follows



      public function captureVideo():void{
           var snapshot:BitmapData = ImageSnapshot.captureBitmapData(videoPlayer.videoDisplay);
           initialThumbnail.source = new Bitmap(snapshot); //this is the image tag in my mxml



      any help is greatly appretiated!!!!

      thanks in advance!