I’ve been searching around the web and have tried numerous soloutions, none of which have worked.
I have an SWF on “domain1”
I have an FLV and a skin (SWF) on “domain2”
My video loads, but my skin will not.
This is my error:
Error #2044: Unhandled skinError:. text=Error #2121: Security sandbox violation: Loader.content: http://domain1.com/comp.swf cannot access http://domain2.com/flv/skin.swf. This may be worked around by calling Security.allowDomain.
Here’s my code from my SWF on “domain1”:
import fl.video.*;
import flash.events.MouseEvent;
var vidplay = new FLVPlayback();
addChild(vidplay);
vidplay.source = "http://domain2.com/flv/movie.flv";
vidplay.skin = "http://domain2.com/flv/skin.swf";
I’ve tried adding these security lines, but they don’t work:
Security.loadPolicyFile("http://domain2.com/crossdomain.xml");
Security.allowDomain("http://domain2.com");
Here’s the code from crossdomain.xml on domain2:
<?xml version="1.0"?>
<cross-domain-policy>
<allow-access-from domain="*" />
</cross-domain-policy>
Here’s the strange part: If I use a content Loader to load the skin SWF, it loads perfectly (athough its worthless, because I don’t know if its possible to attach a skin from the stage to a FLVPlayback component). Nevertheless, I know its capable of communicating across the domain. Here’s the code that I had for that:
var request:URLRequest = new URLRequest("http://domain2.com/flv/skin.swf");
var loader:Loader = new Loader();
var context:LoaderContext = new LoaderContext();
context.checkPolicyFile = true;
loader.load(request, context);
addChild(loader);
Any ideas? I’ve read through Adobe’s chapter on Flash security, but I can’t get anything to work.