I have a flash file that reads variable from a text files(eg. myhobby.txt). That is easy.
&myHobbies=swimming
Now here is the complicated/difficult part
Using the same and only flash file how do I read from different sever/database?
e.g.
there is 3 website sharing the same and only flash files.
-if website ‘A’ load the flash files it will load ‘A’ hobbies
-if website ‘B’ load the flash files it will load ‘B’ hobbies
-if website ‘C’ load the flash files it will load ‘C’ hobbies
that means there is 3 myhobby.txt files altogether in 3 different sever/database.
<embed src=“myMovie.swf?server=1”…for your 1st server
<embed src=“myMovie.swf?server=2”…for your 2nd server
<embed src=“myMovie.swf?server=3”…for your 3rd server
and in your movie use an if statement to declare which txt file to load:
if (server == 1) {
this.loadVariables(“myhobby1.txt”);
} else if (server == 2) {
this.loadVariables(“myhobby2.txt”);
} else if (server == 3) {
this.loadVariables(“myhobby3.txt”);
}
I know what you mean but there is 3 domain that call up the flash, and the indiviuals txt files are stored in each of these domain, so the questions is:
How how the flash know which domain call it up, so that it will load the collect text file.
Example,
Domain A loads the flash file, then the flash file will know its domain A, so it will .[COLOR=red]load the txt file from domain A[/COLOR] that is meant for Domain A.
you use the question mark to start giving the variables and the “&” symbol to separate them.
As I told you above, you must insert “?domain=1” to both places.
Flash loads the txt file from where the page is and not from where the swf is.
As long as you load the swf in your page it’s part of it.
So if your txt is in another folder from the page, you have to target it.