# ApplicationDomain for imported SWF

**URL:** <https://forum.kirupa.com/t/applicationdomain-for-imported-swf/331771>\
**Category:** flash\
**Created:** [October 16, 2013, 4:38pm UTC](https://forum.kirupa.com/t/applicationdomain-for-imported-swf/331771 "2013-10-16T16:38:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![GiGaGiG](https://avatars.discourse-cdn.com/v4/letter/g/a88e57/32.png) [@GiGaGiG](https://forum.kirupa.com/u/GiGaGiG)\
**Post date:** [October 16, 2013, 4:38pm UTC](https://forum.kirupa.com/t/applicationdomain-for-imported-swf/331771/1 "2013-10-16T16:38:43Z")

</div>

Hi,  
I am having a few problem with an imported SWF: the imported SWF is importing a few of the classes already imported by the main SWF, but they are more recent and I need to use them without recompiling the main SWF.  
Can I fix this problem by setting up a different application domain for the imported SWF? If this is the correct way to proceed, can I create the new domain from inside the imported SWF or I am obligued to create it in the main SWF?

---

<div class="post-metadata">

**Author:** ![GiGaGiG](https://avatars.discourse-cdn.com/v4/letter/g/a88e57/32.png) [@GiGaGiG](https://forum.kirupa.com/u/GiGaGiG)\
**Post date:** [October 29, 2014, 4:55pm UTC](https://forum.kirupa.com/t/applicationdomain-for-imported-swf/331771/2 "2014-10-29T16:55:00Z")

</div>

Hi Senocular!  
I am back after 11 months, I am sorry, but here at work I can’t experiment as much as I would like.  
Maybe I have a small time window to retry implementing this solution: external SWF with shared classes.

I am creating an SWF containing the shared classes that will be inherited by child SWFs.  
Then you wrote “[COLOR=#333333]When compiling the child SWFs, they can reference the shared classes as an external library so that they’re not compiled within the SWF. You don’t have to, but it reduces that redundancy (note that the SWFs will also no work on their own when doing this).[/COLOR]”: how do I reference the shared classes as an external library without compiling them within the child SWF?

---

<div class="post-metadata">

**Author:** ![senocular](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/senocular/32/7217_2.png) [@senocular](https://forum.kirupa.com/u/senocular)\
**Post date:** [October 29, 2014, 5:03pm UTC](https://forum.kirupa.com/t/applicationdomain-for-imported-swf/331771/3 "2014-10-29T17:03:19Z")

</div>

You reference them as external libraries. I forget exactly the process, and its different depending on what you’re compiling with (builder, or pro). Doing a docs/google search on external libraries should point you in the right direction

---

<div class="post-metadata">

**Author:** ![senocular](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/senocular/32/7217_2.png) [@senocular](https://forum.kirupa.com/u/senocular)\
**Post date:** [October 29, 2014, 5:13pm UTC](https://forum.kirupa.com/t/applicationdomain-for-imported-swf/331771/4 "2014-10-29T17:13:10Z")

</div>

I did it in pro (2014) just to get the process:

File \> ActionScript Settings… \> [Tab] Library path

Add/select the library path with the code you wish to not to be included in the SWF when its compiled

[Icon] Set linkage options for library (looks like an info “i” icon) \> [Dropdown] Link Type: External
