# Loading one external SWF into another SWF across subdomains

**URL:** <https://forum.kirupa.com/t/loading-one-external-swf-into-another-swf-across-subdomains/321185>\
**Category:** flash\
**Created:** [April 12, 2011, 9:35pm UTC](https://forum.kirupa.com/t/loading-one-external-swf-into-another-swf-across-subdomains/321185 "2011-04-12T21:35:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lefthandedpath](https://avatars.discourse-cdn.com/v4/letter/l/b487fb/32.png) [@lefthandedpath](https://forum.kirupa.com/u/lefthandedpath)\
**Post date:** [April 12, 2011, 9:35pm UTC](https://forum.kirupa.com/t/loading-one-external-swf-into-another-swf-across-subdomains/321185/1 "2011-04-12T21:35:54Z")

</div>

I have a.swf, which is the SWF file for my main application, and it’s trying to load in b.swf, which contains some additional resources as well as some Actionscript. a.swf lives on [sub1.my.domain.com](http://sub1.my.domain.com) and b.swf lives on [sub2.my.domain.com](http://sub2.my.domain.com) (both on the same domain, just different subdomains.) In a.swf, I’ve loaded the crossdomain.xml from [domain.com](http://domain.com) and also added the following code into both a.swf and b.swf:

```auto

Security.allowDomain("*");
Security.allowInsecureDomain("*");

```

Do I need to load the crossdomain.xml in b.swf as well to prevent a security error or is having allowDomain/allowInsecureDomain enough?

Further info:

- Using Flash Player 9
- Using AS3
