Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Flash 5 LoadVariables

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi.

In action script in flash5 (also 4) there is a function LoadVariables. The function loads variable from a txt file with a certain format.
I did a program to read variables from a txt file in flash4.
When the program run from the hard drive, it works 100%.
However, when the program is loaded from the web and need to read a txt file from the web, it sometimes works and sometimes doesn't (when it don't work because it never gets to read the txt file).
Is this problem is known to you? Is it fixed in flash5?
Do I need to do something with the txt file, like defining it as a text file?

Waiting for reply.
Thanks in advance.
 
I'm using 5 and have no problems ever with loading variables from text files. Make sure your text files are tagged .txt and that when you load the variables that refer to the text file in full (including the .txt extension). I'd like to know why it sometimes DOES work more than how it sometime doesn't. That's curious. Is it always the same files?

Blended
 
I am sorry, but I didn't understand: "when you load the variables that refer to the text file in full (including the .txt extension"
Do you mean that I need to write a full URL path and not relative?
 
Make sure the text files are in the same folder as your movie, on the server. Don't need to use full url if that's the case.
Have a look at this:
This reads two .txt files depending on which button you hit.
And I haven't used full url.

You can download & have a look at the fla and txt files.

X-) "If nothing else, I can always serve as a bad example!”
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top