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:

?Name=Dan

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?

-D
LVL 3
SuperMarioAsked:
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?
0
 
RoyKruyshaarCommented:
Hi SuperMario,

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

Roy
0
 
SuperMarioAuthor Commented:
Oops...

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.

-D
0
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!

-Dan
0
 
ssdesignCommented:
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

LoadVariables("name.txt",0)

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

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

-D
0
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.