Domain and LoadMovie
When we use relative path in "LoadVar()", "loadMovie()", the basic path is the "domain url". The Domain url is not necessarily the same as url of this swf.
It is confusing, that when I say loadMovie("/subdir/second.swf",1); Flash does not search "second.swf" in the subdirectory "subdir" of this swf.
I made a movie "intro.swf". In the same directory, I have a text file "data.txt". I do mc.loadVariables("data.txt"). Every thing works fine.
Then I decide to reconstruct my site. I have a "main.swf" as the starting movie. Then I create a subdirectory "/intro". and put intro.swf and data.txt all into this "/intro" subdirectory. So, my main.swf would loadMovieNum("intro/intro.swf",1);
The swf "intro.swf" is loaded well but, the variables in the data.txt seems not loaded ?!
The concepts of domain is somewhat confusing. In the condition described above, the "domain url" is the main.swf. Although the command "loadVariables" comes from "intro.swf", it still search in the domain for that data file.
Here is a condtion:
If there is a web page swf about game. In that game, the movie use loadVariables to update the score.
We like it and we embed it to my html page, or we have a Flash swf, there we would like to load it to _level0.
If our "main.swf" has a script: loadMovieNum("http://www.others.game.swf",0); What will happen about the loadVariable ?
Well, the game will search the variable file in our server, not the original url of the game.swf.