That would imply a timing issue assuming you do have crossdomain.xml privileges.
________________________________ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Dan Sent: Monday, March 10, 2008 11:39 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: SWF is not a loadable module / crossdomain.xml woes But what if I get that error only on the first time the application being loaded, after all the module-swfs are downloaded in the cache, the next time the application runs, the error doesn't come up and the application run fine? Any idea? Regards, Dan --- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> , "Alex Harui" <[EMAIL PROTECTED]> wrote: > > BTW, I don't think the local/remote case is documented, but it falls out > of the fact that Modules require a shared application domain topology, > and local swfs cannot do "import" loads by specifying a securitydomain. > The remote swf must have a separate securitydomain, which means it has a > separate applicationdomain and thus modules won't work. > > > > I don't know of any workaround other than loading the remote swf into a > bytearray and calling loadbytes. > > > > ________________________________ > > From: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> [mailto:flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> ] On > Behalf Of Alex Harui > Sent: Thursday, January 31, 2008 11:01 AM > To: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> > Subject: RE: [flexcoders] Re: SWF is not a loadable module / > crossdomain.xml woes > > > > Of both are local, do not fiddle with appdomain or securitydomain and it > should work. > > > > ________________________________ > > From: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> [mailto:flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> ] On > Behalf Of innovativecode > Sent: Thursday, January 31, 2008 7:23 AM > To: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> > Subject: [flexcoders] Re: SWF is not a loadable module / crossdomain.xml > woes > > > > Thanks! I had not done that. But, after I did, I still get the same > problem. I'll keep working on it.... > > --- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> <mailto:flexcoders% 40yahoogroups.com> > , Dave Glasser <dglasser@> wrote: > > > > Mine works when both SWFs are local, or both are from the server. > For local, > > however, your main application will have to be in a trusted > directory, or > > the file itself will need to be trusted, via the Global Security > Settings > > app: > > > > > http://www.macromedia.com/support/documentation/en/flashplayer/help/s <http://www.macromedia.com/support/documentation/en/flashplayer/help/s> e > <http://www.macromedia.com/support/documentation/en/flashplayer/help/ <http://www.macromedia.com/support/documentation/en/flashplayer/help/> se> > > ttings_manager04.html > > > > Have you done that? > > > > Also, I'm using ModuleBase as the base class for my module (it's a > > non-DisplayObject class) instead of Module, and everything is done > through > > ActionScript rather than MXML, and I don't know what the > implications of > > that are. > > > > --- innovativecode <innovativecode@> wrote: > > > > > Dave, have you solved this yet? I'm having the exact same > problem > > > and error message. My thread is: > > > http://tech.groups.yahoo.com/group/flexcoders/message/100770 <http://tech.groups.yahoo.com/group/flexcoders/message/100770> > <http://tech.groups.yahoo.com/group/flexcoders/message/100770 <http://tech.groups.yahoo.com/group/flexcoders/message/100770> > > > > > > > One thing to ensure is that the module you are loading is > compiled > > > with a root tag of mx:Module and not mx:Application or something > > > else. I found that you get the "SWF is not loadable > > > module" "theoretically" when the loaded SWF does not expose one > of > > > the IFlexModule interfaces, I think it's IFlexFactoryBlah... or > > > something like that. However, I know my module is a true > mx:Module > > > rooted SWF and it still won't load when BOTH of the SWFs are > local. > > > > > > And like me, you're probably doing it correctly and are in fact > > > trying to load a true "module" swf. And, like you, I can verify > that > > > the module.swf is in fact being downloaded by the Flash player. > > > However, when Flex tries to load the module, it fails. > > > > > > I've seen some posts spread around the net about the ModuleLoader > > > being GC'd *before* the call to access the IFlexFactoryModule (?) > > > interface on your module and thus even though the module was > > > downloaded, the moduleLoader is gone by the time you try to > actually > > > communicate with the module. Why this is, I'm not clear > > > yet. And, I'm not entirely sure this is the cause of our problem. > > > > > > But, I've been banging my head on the wall for a few days trying > > > every possible solution too to get it to load my module (WITH > BOTH > > > SWFS BEING LOCAL Alex): tweaking the > > > applicationDomain property before it's loaded, etc etc. > > > > > > The thing is, we're both initially attempting (and fully expect) > to > > > be able to load BOTH the host and the module SWF from the LOCAL > > > machine. This would be logical since that's where we fcking > develop > > > our code. So, it's very odd to me that you can't build your > project > > > and load both the host and the module from the local filesystem. > If > > > there's an extra deployment step in there that we need to be > > > following in order to build and debug our apps, I certainly have > not > > > found it in the Flex docs yet.... > > > > > > Anyway, please let me know if you come up with the solution. > I'll > > > definitely do the same... > > > > > > Thanks, > > > Chris > > > > > > > > > --- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> > <mailto:flexcoders%40yahoogroups.com> , Dave Glasser <dglasser@> wrote: > > > > > > > > I'm running a Flex app in my local Flash player (not in a > browser) > > > from my > > > > local disk, and I'm trying to load a module from a Tomcat > server > > > running on > > > > localhost. My Flex app is trusted and is already communicating > with > > > that > > > > server for other things, but when I try to load the module, I > get > > > the error > > > > described by Alex Harui in this blog post: > > > > > > > > > > > > http://blogs.adobe.com/aharui/2007/03/swf_is_not_a_loadable_module.ht <http://blogs.adobe.com/aharui/2007/03/swf_is_not_a_loadable_module.ht> m > <http://blogs.adobe.com/aharui/2007/03/swf_is_not_a_loadable_module.h <http://blogs.adobe.com/aharui/2007/03/swf_is_not_a_loadable_module.h> tm> > > > > l > > > > > > > > I've put the following crossdomain.xml file in the root > document > > > directory > > > > of the Tomcat server: > > > > > > > > <?xml version="1.0"?> > > > > <!DOCTYPE cross-domain-policy SYSTEM > > > > "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd <http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd> > <http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd <http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd> > "> > > > > <cross-domain-policy> > > > > <allow-access-from domain="*" /> > > > > </cross-domain-policy> > > > > > > > > > > > > and I still get the error. I can load the crossdomain.xml file > in a > > > browser > > > > with the URL http://localhost/crossdomain.xml. <http://localhost/crossdomain.xml.> > <http://localhost/crossdomain.xml. <http://localhost/crossdomain.xml.> > The weird thing > is > > > that the > > > > Tomcat access logs do not indicate that the Flash player > running my > > > Flex app > > > > is requesting that crossdomain.xml file at all. Does anyone > have > > > any idea > > > > what I'm doing wrong? > > > > > > > > > > > > > > > >