May 25, 2009 6:42 AM
resource manager - loadResourceModule()
-
Like (0)
Hi,
I am trying to load resource bundles at run time via resourceManager.loadResourceModule().
When I locate *.swf file into bin-debug everything is just fine, but when I move it to module/ I get this error
Error: Unable to load resource module from module/Resources_de_DE.swf
code snippet:
...
resourceManager.loadResourceModule("module/Resources_" + newLocale + ".swf");
...
where newLocale is de_DE or en_US depending on selected language
swf files are Resources_de_DE.swf and Resources_en_US.swf
Thanks for help
----
LN
Hi,
in loadResourceModule() the first parameter should be a full url to your module.
Is "module/Resources_de_DE.swf" full URL?
No, it isn't.
Now it is working on http://localhost/, just "module/Resources_de_DE.swf"
So you have a problem:
in debug "module/Resources_de_DE.swf" is a full url to your module.
Then it run on server full url should be "http:\\localhost\module\Resources_de_DE.swf"
To unify you can create a compoment to set localhost then runs on server.
I had the same error while trying to load resource modules from a remote domain. If you had the same problem as I, it boils down to a problem with the security features of Flex.
I was able to solve it by always running and debuggging from localhost. As long as you follow the steps listed here: http://www.flexafterdark.com/docs/Flex-Modules Look at the section titled: "Loading Modules across domain"
But if you don't want to always load from localhost, there is another way to get around this error. See the blog post I made on this subject. http://blog.mediarain.com/2009/08/flex-loading-remote-modules-throws-t he-followi ng-error-unable-to-load-resource-module-from/
Either of these approaches should hopefully solve your problem.
Copyright © 2011 Adobe Systems Incorporated. All rights reserved.
Use of this website signifies your agreement to the Terms of Use and Online Privacy Policy (updated 07-14-2009).