I’m creating an application were you are able to take snapshots of a video, but have ran into a security error " Error #2123: Security sandbox violation: BitmapData.draw".
So I have done the follow,
- Tried playing a file locally- FAILED
- Used the following crossdomain.xml
<?xml version="1.0" encoding="UTF-8"?>
<cross-domain-policy xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.adobe.com/xml/schemas/PolicyFileHttp.xsd">
<allow-access-from domain="*" />
<site-control permitted-cross-domain-policies="all"/>
</cross-domain-policy>
I did find that flash wasn’t requesting this file on first load , so i did Security.loadPolicy, but this FAILED also.
3) Tried using netstream.checkPolicyFile=true - FAILED
4) Tried the following hack:
video.attachNetStream(null)
bmp.draw(videoContainer) // A sprite
video.attachNetStream(netStream)
also tried drawing from the video object directly.
So now neither a video played locally or a video delivered from my server will allow me to take snapshots. After debugging some more I found that my netStream is dispatching “NetStream.Play.Start” twice, I think this might be the problem but I don’t see how or why it would be dispatching it twice for a file played locally.
The strange this is that this application was working fine for 2 weeks, Decided to open it up today to do some work and now it wont function like it’s suppose to. If anyone has any guidance to this problem it would greatly appreciated.
Thanks