Undefined Text Field Error

Hiya guys,

I’ve just changed over from using Flash 6 to Flash 7 and am having some teething problems. I have a lot of information being read from text files and brought into flash. This all worked fine when it was published as flash 6 but now I’ve changed it to flash 7 all I get in my text fields is the word UNDEFINED?

Here’s the code I’m using…

on (release){
_root.field1.html = true;
_root.field1.htmlText = “Please Wait Loading…”;
myLoadVar = new LoadVars();
myLoadVar.load(“news.txt”);
myLoadVar.onLoad = function(success) {
if (success == true) {
_root.field1.htmlText = myLoadVar.myText;
}
}
}

Any bright ideas?

HI Dude

Well I have am not an EXPERT but i did tried your example:

and afraind was getting the same ERROR…
but what i didnt get from your code is…:

_root.field1.htmlText = myLoadVar.myText

Here what is myText ??

Anyways just check by putting only myLoadVar

_root.field1.htmlText = myLoadVar

Still out is not perfect…anything u get better that this pls let me know…

ashish

Not sure, but try

on (release) {
	_root.field1.html = true;
	_root.field1.htmlText = "Please Wait Loading...";
	myLoadVar = new LoadVars();
	myLoadVar.load("news.txt");
	myLoadVar.onLoad = function(success) {
		if (success == true) {
			_root.field1.htmlText = this.myText;
		}
	};
}

scotty(-: