Dynamic text cache

ok so i have 4 dynamic text fields in data.txt. imagine that they are…

menu1=blah…
&menu2=blah…
&facts=blah…
&otherinfo=blah…

say in frame 5 i want to load the two menu items. so i execute the code
[AS]loadText = new loadVars();
loadText.load(“data.txt”);
loadText.onLoad = function() {
menu1.text = this.menu1;
menu2.text = this.menu2;
};[/AS]

now in frame 10 i want to load the other two fields. isnt the text file in memory, so is there a way to load those fields without opening the text field again? a way to do it other than:
[AS]
loadText = new loadVars();
loadText.load(“data.txt”);
loadText.onLoad = function() {
facts.text = this.facts;
otherinfo.text = this.otherinfo;
};[/AS]

thanks

Yes, you’d only need this code in frame 10:
[AS]facts.text = loadText.facts;
otherinfo.text = loadText.otherinfo;[/AS]

oh ok… i kept trying to insert the whole function into frame 10:
[AS]
loadText.onLoad = function() {
facts.text = this.facts;
otherinfo.text = this.otherinfo;
};
[/AS]

silly me

thanks kode

Hehe - You’re welcome. :beam: