0 Replies Latest reply on Jun 22, 2007 7:36 AM by bradchoate

    Locale and addXMLPath

      I've got a web app that runs from "/app", and my Flash control loads from "/flash". This control is localized and the language files are stored in "/flash/en", "/flash/ja", etc. However, the Flash app attempts to load it's resources from "/app/en", "/app/ja", etc. I was surprised by this-- I thought these files would load relative to the Flash object, not the URL of the host document.

      I'd like to control the full path to the language files, and I believe it is possible, but I'm having trouble. The "Locale.addXMLPath" method is (I think) the method I'm looking for, but so far I haven't gotten it to work.

      First of all, am I suppose to give it the path to the directory where the XML files live, or the path to the XML file itself?

      // Like this?
      Locale.addXMLPath("en", "/flash/en");

      // or...
      Locale.addXMLPath("en", "/flash/en/flash_obj_en.xml");

      Second, how should I configure the Flash control so that it delays the loading of the XML file until these paths are assigned? Configure for string replacement "automatically at runtime" or "via ActionScript at runtime"? I just don't want avoid having to invoke a method for every localized text field in the Flash control.

      I haven't found much on Google about "addXMLPath"-- the Flash documentation has an example, but the example doesn't actually *call* addXMLPath. And most user-written pages about it aren't in English. :)