I have a Trivia game that uses a .txt file to load the question and answers from.
This .swf game is placed inside a GUI.swf which is inside a player.swf. The player lives in a directory called player while all the .swfs live in the media directory all in the same root. The game shows but won’t load the .txt file.
When I play the game from the root of my machine it works fine, however when I play this game online it doesn’t seem to load the .txt file. Can anyone help me with this issue?
Here is my current code:
stop();
if (this == _root) {
media_path = “”;
} else {
media_path = _root.media;
}
questions_text = “flashtrivia.txt”;
// get the questions
loadQuestions = new LoadVars();
loadQuestions.load(_root.media_path+questions_text);
//loadQuestions.load(“flashtrivia.txt”);//[COLOR=red]this was the local testing code. Now commented out the game still works locally[/COLOR]//
loadQuestions.onLoad = initQuestions;