[flexcoders] Security sandbox violation and BitmapDraw

2010-03-24 Thread jcastel...@ymail.com
Hi all, 

I'm having an Security error with a Flex application ...

I'm currently using the Open Source Media Framework to display two videos 
loaded from a website. I added a crossdomain file at the root of the website 
that I load with 

Security.loadPolicyFile('http://mydomain.tld/crossdomain.xml') 
Security.allowDomain('mydomain.tld');

Displaying the videos isn't the problem, but if I try to render one of the 
videos using a flash.display.Bitmap instance I get the famous error :

SecurityError: Error #2122: Security sandbox violation: BitmapData.draw: ... . 
A policy file is required, but the checkPolicyFile flag was not set when this 
media was loaded...

The thing I don't understand is that I'm just using a Bitmap and a BitmapData 
instance that re draws the video loaded in my app by the ParallelElement ... 
how can I set the checkPolicyFile to true in that case ? 

Must I use theloadTrait of my ParallelElement and set a LoaderContext on that 
object?

Any help would be appreciated,
Thanks

Julien



Re: [flexcoders] Security sandbox violation and BitmapDraw

2010-03-24 Thread Oleg Sivokon
Detach the NetStream from the video, draw it, attach the stream again - this
bug exists ever since there was this security limitation, my forecast it's
not going to be fixed in the upcoming year, so, you ought to be safe using
that :D

Best.

Oleg