Seems like a bug. I added a simpler test case and some ideas for workarounds in the bug report. The player team doesn't like working with Flex-based test cases.
I think the simplest thing to do for now (besides setting loadForCompatibility=true) is to find a way to inject common classes into the main applicationDomain before loading any child SWF that uses those classes. I listed one of my blog posts in the bug report that show how to do that. Alex Harui Flex SDK Developer Adobe Systems Inc.<http://www.adobe.com/> Blog: http://blogs.adobe.com/aharui From: [email protected] [mailto:[email protected]] On Behalf Of Gordon Hirsch Sent: Friday, May 22, 2009 10:01 AM To: [email protected] Subject: [flexcoders] Vector issues when using child application domains If I use a SWFLoader to load two sub-applications in child application domains (loadForCompatibility=false), and if each sub-application defines a type of the same name, "Thing", then it doesn't seem possible to use the type Vector.<Thing> in both sub-applications. (The Thing type is *not* known to the parent application.) The first sub-application can declare a Vector.<Thing> and add Thing objects to it, but if the second sub-app tries to do the same, a type error is thrown. Is this a known limitation of Vector/sub-applications? Are there any known workarounds? There's some code that demonstrates the problem attached to https://bugs.adobe.com/jira/browse/FP-1986. Here's an example of the stack trace I get: TypeError: Error #1034: Type Coercion failed: cannot convert th...@3786461 to Thing. at Vector$object/http://adobe.com/AS3/2006/builtin::push() at VectorBugSubapp/onCreationComplete()[C:\workspace\x\VectorBugSubapp\src\VectorBugSubapp.mxml:9] at VectorBugSubapp/___VectorBugSubapp_Application1_creationComplete()[C:\workspace\x\VectorBugSubapp\src\VectorBugSubapp.mxml:2] at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.core::UIComponent/dispatchEvent()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\UIComponent.as:9298] at mx.core::UIComponent/set initialized()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\UIComponent.as:1169] at mx.managers::LayoutManager/doPhasedInstantiation()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\managers\LayoutManager.as:718] at Function/http://adobe.com/AS3/2006/builtin::apply() at mx.core::UIComponent/callLaterDispatcher2()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\UIComponent.as:8628] at mx.core::UIComponent/callLaterDispatcher()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\UIComponent.as:8568]

