Skip navigation
lukasnemecek
Currently Being Moderated

resource manager - loadResourceModule()

May 25, 2009 6:42 AM

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

  • Currently Being Moderated
    Community Member
    May 25, 2009 6:57 AM

    Hi,

    in loadResourceModule() the first parameter should be a full url to your module.

    Is "module/Resources_de_DE.swf" full URL?

    |
    Mark as:
  • Currently Being Moderated
    Community Member
    May 25, 2009 7:31 AM

    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.

    |
    Mark as:
  • Currently Being Moderated
    Community Member
    Aug 7, 2009 11:00 PM

    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.

    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points