Note that there are some explanatory texts on larger screens.

plurals
  1. POActionScript 2 load another SWF that loads other files - relative path/url problem
    text
    copied!<p>Few facts first:<br> 1. I can only use ActionScript 2.<br> 2. All files are within the same domain (i.e "http://www.example.com").</p> <p>I have a loader SWF which acts as a selection tool ("<strong>auto_magic.swf</strong>") <strong>located at "/"</strong> in the website (the root folder).<br> A User selects the tool he needs (it's a mechanical diagnostic system) and the main movie loads it (currently I use loadMovie() - suggest else if needed).<br> That tool is located at "<strong>/tools/[tools_name]/tool_main.swf</strong>".</p> <p>Now, the "tool_main.swf" is loading just fine.<br> The problem is that <strong>"tool_main.swf" needs to load other files located in its folder</strong>, so for example it tries to load "config.xml", BUT Flash isn't looking for "config.xml" in the tool's dedicated folder - instead it's looking for this file at the root folder "/" where "auto_magic.swf" is located, probably because the movie's main swf is coming from there.</p> <p>To make it even worst I cannot modify the tool's SWF ("tool_main.swf") because it's coming from a third party.</p> <p>Is there any solution? As far as I see this I need one of these solutions;<br> <strong>1.</strong> Be able to <strong>set the base url of the loaded swf</strong>.<br> <strong>2.</strong> *<em>Change</em>* the whole <strong>movie's base url at run-time</strong> because it needs to load several tools from different folders.</p> <p>Trying to solve this for several good hours. Help will be highly appriciated!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload