PDA

View Full Version : [AS3] How to solve this ApplicationDomain Problem?


Oscar07
01-13-2007, 03:48 PM
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?