Solved

Loading variables from a text file

Posted on 2000-04-13
8
148 Views
Last Modified: 2010-04-03
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
0
Comment
Question by:SuperMario
8 Comments
 
LVL 4

Expert Comment

by:RoyKruyshaar
ID: 2718601
Hi SuperMario,

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

Roy
0
 
LVL 3

Author Comment

by:SuperMario
ID: 2719202
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
 
LVL 4

Accepted Solution

by:
RoyKruyshaar earned 50 total points
ID: 2719229
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
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 
LVL 3

Author Comment

by:SuperMario
ID: 2719238
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
 
LVL 7

Expert Comment

by:ssdesign
ID: 2723585
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
 
LVL 3

Author Comment

by:SuperMario
ID: 2724541
Actually...
I already fixed it, see the above comment?

Sorry... this question should be closed.
0
 
LVL 3

Expert Comment

by:davlun20080
ID: 2758248
You will have to ask that this question be deleted from the folks in the customer service area of this site.
0
 
LVL 3

Author Comment

by:SuperMario
ID: 2802745
Thanks for the level tip, Roy. =)

-D
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I come across a lot of question about how to access things in the document class from a movieclip, or accessing something from a movieclip in the document class. It took me a while to figure this out but once I did it makes life so much easier. …
Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question