I'm having some problems with loading an external .txt file into Flash.
First a little info; I'm using Flash CS3 and ActionScript 3.0, and I'm using a Mac.
Anyway, I've tried a variety of methods and here's what I have going currently:
I have a movie clip inside of my main movie that basically holds a page of the website.
There are 3 layers within this movie clip.
The first layer is my Actions layer, where I have the following code:
loadVariables("bio.txt");//Loads Bio page text.
-
- loadVariables("bio.txt");//Loads Bio page text.
-
The second layer is the Content layer, where the dynamic text box is. The dynamic text box has "contentBio" in the var field (excluding the quotation marks).
The third layer simply contains an instance of my navigation menu, and the 4th layer contains background graphics and other images.
The text file referred to in the code on the first layer contains the following text:
contentBio=Biography test. Biography test. Biography test. Biography test. Biography test. Biography test. Biography test. Biography test. Biography test. Biography test. Biography test.
-
- contentBio=Biography test. Biography test. Biography test. Biography test. Biography test. Biography test. Biography test. Biography test. Biography test. Biography test. Biography test.
-
Whats got me scratching my head is that I've used this exact same code on a different website before, and it worked flawlessly. However the difference in my other site is that all of my variables were declared and used on the main stage, not inside a movie clip.
Therefore my first guess was that this is a path problem, so I tried adding _global. to the beginning of the code in the Actions layer, which didn't work. Could it be that the syntax is different in ActionScript 3.0 than 2.0? (since the website I used this code on before was designed in Flash MX)
I've tried manipulating the code in seemingly more ways than I can remember, which eventually led me to give up and ask the experts here, any ideas as to why this isn't working?