-
I have been trying to fix this problem for a day now and i am getting pissed off.
Problem
I am using .txt files to make it easy to update the text in my website and on my system it works fine the Dynamic text boxes load the variables perfectly but when i upload my .html, .SWF, .txt files to my server nothing appears in the text boxes.
loadVariablesNum ("file.txt", root, "POST");
I have double checked all my variables both in the .swf and the text files and i just can't see why it isn't working
e-mail me dansvoodosoup@hotmail.com
-
loadVariablesNum("file.txt", 0)
this.loadVariables("file.txt")
-
Senior Member
on (release) {
loadVariables ("filename.txt", "_root.textField");
}
__________________
try that. I just copied it from a similiar dynamic text setup I have in a site I'm working on. I've used that code before, it works. It uses one text field, and all buttons to open different text files open it in a single text field. It's from the Friends of Ed book, Flash 5 Studio.
Hope that helps.
mg33
-
Are you preloading your text?
You may already be doing this, so for other peoples' benefit...
Thing is, when you run it locally, the LoadVariablesNum command calls the text file from your C: drive - and it loads almost instantaneously. So it usually works.
When uploaded, though, the movie is downloaded to the user's PC, but when the LoadVariables action is issued, the text file is on a server somewhere connected usually by a dodgy dial-up connection
So what happens is that the movie calls the text file and then tries to use the variables before they are downloaded to the user's PC.
It is easy to get around. Put a final variable in your text file like eof=1.
In the frame where you loadVariables, also set eof=0. Assume frame 1 for this example.
Now, in frame 3 do an if eof == 0 gotoAndPlay(2) else carry on code sequence.
It will wait for a few seconds while the text loads, then as soon as eof==1, it continues (and works).
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|