# \[AS3\] How to solve this ApplicationDomain Problem?

**URL:** <https://forum.kirupa.com/t/as3-how-to-solve-this-applicationdomain-problem/212738>\
**Category:** flash\
**Created:** [January 13, 2007, 7:48pm UTC](https://forum.kirupa.com/t/as3-how-to-solve-this-applicationdomain-problem/212738 "2007-01-13T19:48:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Oscar07](https://avatars.discourse-cdn.com/v4/letter/o/d9b06d/32.png) [@Oscar07](https://forum.kirupa.com/u/Oscar07)\
**Post date:** [January 13, 2007, 7:48pm UTC](https://forum.kirupa.com/t/as3-how-to-solve-this-applicationdomain-problem/212738/1 "2007-01-13T19:48:57Z")

</div>

Hi,

when you load a .swf into another .swf, and the loaded .swf uses a own Class-Type that`s also used in the loader .swf, the Compiler throws a RefernceError:

> ReferenceError: Error #1074: Illegal write to read-only property com.MyPackage::TestClass on global.  
> at global$init()  
> That`s because the loader .swf already imported this Class, now when you load a .swf into where also uses this Class, it will try to overwrite the Class-Definition. And this is forbidden.

Please look at this [example](http://img212.imageshack.us/img212/8876/swf2jn6.jpg), it will explaind it better.

It`s curios in AS2 it makes no problem but in AS3.

Is there a solution for this?
