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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Load Text from txt file into Multiple Textboxes 1

Status
Not open for further replies.

alokwww

Technical User
Dec 25, 2002
86
Hi everyone,
I was trying to follow this thread:
thread250-563510 I'm having some troubles doing this. This is the script I'm using:


mydata = new loadvars();
mydata.onload = function() {
instanceAbout.text = mydata.variableAbout;
instanceOffer.text = mydata.variableOffer;
instanceContact.text = mydata.variableContact;
};
mydata.load("text.txt");
sk8hardan dlong: mydata = new loadvars();
mydata.onload = function() {
instanceAbout.text = mydata.variableAbout;
instanceOffer.text = mydata.variableOffer;
instanceContact.text = mydata.variableContact;
};
mydata.load("text.txt");


I've also tried using:


loadVarsText = new loadVars();
loadVarsText.load("text.txt");
loadVarsText.onLoad = function(success) {
if (success) {
trace("done loading");
instanceAbout.text = this.variableAbout;
instanceOffer.text = this.variableOffer;
instanceContact.text = this.variableContact;
} else {
trace("not loaded");
}
};
instanceAbout.text = loadVarsText.variableAbout;
instanceOffer.text = loadVarsText.variableOffer;
instanceContact.text = loadVarsText.variableContact;


My instance names are instanceAbout, instanceOffer, and instanceContact. My variable names are variableAbout, variableOffer, and variableContact. I've tried placing them in different places like the first frame of the movie and also a frame inside the movie clip that the text boxes I want to load into are in. I have a feeling I may not be putting it in the right place or maybe need to add something, because theyre in a wierd place. You can find two different versions of what I did here:

 
What would we do without you Bill? Thanks so much! It works great!
-Alok
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top