Loading variables from a text file

I have done this many times over but this time I can't seem to get it to work.

Here's what I have...

I have a file called test.txt with the contents below:


In the first frame of the movie the actionscript reads

Load Variables ("test.txt", 1)

I would figure that the text field called Name I have in my movie would then be filled with the name "Dan".

Can anybody give me a clue here?

Who is Participating?
RoyKruyshaarConnect With a Mentor Commented:
When you use more variables, you should use a '&' between them.
Do you have more questions about this, because your question is still standing in de question area?
Hi SuperMario,

The 1 must be a 0, unless you work with several levels.
Good Luck

SuperMarioAuthor Commented:

My bad, Roy, I should have left out the question mark. It still works for me when I use a 1 because the variable itself is within a movie clip.

Sorry mon, fixed it myself.

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

SuperMarioAuthor Commented:
Well, I've done this many times before and it's always been through a query string in a script which starts with ? but from a text file it shouldn't have a ? there.

Thanks anyway, Roy, I appreciate it!

Edit you movie in the following manner

Name the text field box ..... name

rename the text file as ...... name.txt

In the action to load variable write


In the text file named name.txt begin the text you want to load with name=yourtext
SuperMarioAuthor Commented:
I already fixed it, see the above comment?

Sorry... this question should be closed.
You will have to ask that this question be deleted from the folks in the customer service area of this site.
SuperMarioAuthor Commented:
Thanks for the level tip, Roy. =)

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.