Textbox problem

i have a little problem with loading text from external files… have added to a simple

preloader some conditions to make it go to the first actaul frame of the scene only when the

variables have been loaded from the text files… this works just fine and one of the text boxes

is fed correctly… the 2nd textbox however gets no content and it really makes no sense to

me… this is my code:

bytes_loaded = Math.round(this.getBytesLoaded());
bytes_total = Math.round(this.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
this.loadbar._xscale =getPercent*100;
_root.text.animtext.loadText ="loaded"+ Math.round(getPercent*100)+"% of 60kb";
if (bytes_loaded == bytes_total) {
	loadText = new LoadVars();
    loadText.load("hulagus.txt");
    loadText.onLoad = function(success) {
        if (success) {
			 _root._level0.clipu.maintext.html = true;
			 _root._level0.clipu.maintext.htmlText = this.myText;
	
    loadText.load("news.txt");
    loadText.onLoad = function(success) {
        if (success) {
			 _root._level0.stiri.newsbox.html = true;
			 _root._level0.stiri.newsbox.htmlText = this.myNews;
			 _root.gotoAndPlay(3)
}}}}}

the newsbox just prints “_level0.stiri.newsbox” so the path is correct… my text files are also

ok… both textboxes are dynamic, and have the “render text as html” option activated…
can anyone help?

I think you’re overwriting your LoadVars.
Try this:


if (bytes_loaded == bytes_total) {
	loadText1 = new LoadVars();
	loadText1.load("hulagus.txt");
	loadText1.onLoad = function(success) {
		if (success) {
			_root._level0.clipu.maintext.html = true;
			_root._level0.clipu.maintext.htmlText = this.myText;
                 loadText2 = new LoadVars();
			loadText2.load("news.txt");
			loadText2.onLoad = function(success) {
				if (success) {
					_root._level0.stiri.newsbox.html = true;
					_root._level0.stiri.newsbox.htmlText = this.myNews;
					_root.gotoAndPlay(3);
				}
			};
		}
	};
}

scotty(-: