About Paths

So I got this Flash project of mine. It imports dynamically other flash files that can be found at other places (on the same domain). And those other flash files load XML files using relative paths.

The problem is: when I just load one of those other flash files, then they treat their relative paths from the location of the flash file that loaded them on, and not from their own directory on.

Is there any way I can simply tell the loaded swf file to keep following it’s relative path orders from it’s own directory on, and not from the directory of the file that imported it on?

Or are there really just two ways to fix this:

  • place the xml files at the location the loaded swf files expect them to be (though this would get quite messy)
  • change the ways all the loaded swf files import their xml stuff (this would take quite a long time)

Example:
I got a file “peter.swf” in it’s folder “project_peter”.
Location: “project_peter/peter.swf

I also got another swf file, called “basket” (for example).
Location: “project_peter/importedstuff/basket/basket.swf

And basked would want to load an xml file.
Location: “xml_files/basket_config.xml

So the true location of the xml file would be:
project_peter/importedstuff/xml_files/basket_config.xml

However, the basket file would try to load:
project_peter/xml_files/basket_config.xml

Any help? :slight_smile: