# FLV skinError - Security sandbox violation

**URL:** <https://forum.kirupa.com/t/flv-skinerror-security-sandbox-violation/261071>\
**Category:** flash\
**Created:** [May 22, 2008, 8:39pm UTC](https://forum.kirupa.com/t/flv-skinerror-security-sandbox-violation/261071 "2008-05-22T20:39:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![johnsona](https://avatars.discourse-cdn.com/v4/letter/j/51bf81/32.png) [@johnsona](https://forum.kirupa.com/u/johnsona)\
**Post date:** [May 22, 2008, 8:39pm UTC](https://forum.kirupa.com/t/flv-skinerror-security-sandbox-violation/261071/1 "2008-05-22T20:39:42Z")

</div>

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](http://domain1.com/comp.swf) cannot access [http://domain2.com/flv/skin.swf](http://domain2.com/flv/skin.swf). This may be worked around by calling Security.allowDomain.  
> Here’s my code from my SWF on “domain1”:

```auto
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:

```auto
Security.loadPolicyFile("http://domain2.com/crossdomain.xml");
Security.allowDomain("http://domain2.com");

```

Here’s the code from crossdomain.xml on domain2:

```auto
<?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:

```auto
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.

---

<div class="post-metadata">

**Author:** ![johnsona](https://avatars.discourse-cdn.com/v4/letter/j/51bf81/32.png) [@johnsona](https://forum.kirupa.com/u/johnsona)\
**Post date:** [May 28, 2008, 12:09pm UTC](https://forum.kirupa.com/t/flv-skinerror-security-sandbox-violation/261071/2 "2008-05-28T12:09:53Z")

</div>

bump

---

<div class="post-metadata">

**Author:** ![johnsona](https://avatars.discourse-cdn.com/v4/letter/j/51bf81/32.png) [@johnsona](https://forum.kirupa.com/u/johnsona)\
**Post date:** [May 29, 2008, 12:04pm UTC](https://forum.kirupa.com/t/flv-skinerror-security-sandbox-violation/261071/3 "2008-05-29T12:04:42Z")

</div>

bump
