dinop
1
Probably a stupid question - Way too many coffees today and cannot get this to work… ok…
this is what I dont know how to do… [MX 2004]
When [onrelease] of button 1 I want button1.txt to be displayed within my dynamic text field [box]
the same would go if user hit button 2…
any advice/ideas
thanks kindly:ogre:
system
2
gotta use loadVars baby, works like a charm. Check the tutorials.
I’m not sure if I remember it perfectly, but it will go something like this.
getText = new.loadVars();
getText.load("yourFile.txt");
button1.onRelease(yourField.text = getText.txtVar);
Where you text file looks like:
txtVar=This is all of your writting
This question has been answered about 2.3 million times - about .4 million on this site alone.
system
3
That didnt work… 
I’ve tried looking for an MX 2004 tutorial but cannot…
Do you have any off hand? Thanks again - Your efforts are apreciated on this end!
Dino
system
4
This works flawlessly for me in MX04:
loadText = new LoadVars();
loadText.load("data.txt");
loadText.onLoad = function() {
name.text = this.name;
email.text = this.email;
location.text = this.location;
};
It’s cut and pasted from the Kirupa tutorial, except the capital “L” on LoadVars().
system
5
It should be:
lv = new LoadVars();
lv.load("button1.txt");
lv.onLoad = function(ok){
var ref = this;
if(ok){
button1.onRelease = function(){
textField.text = ref.yourVar
}
} else {
trace("File could not be loaded.");
}
}
Where yourvar is the variable from the textfile:
yourvar=yourvalue&anothervar=anothervalue&…
system
6
hehe yup.
By the way V, your footer pic looks like one I took a while back:
http://www.redscreen.net/photolog/archives/000181.html