External XML loads but content variable remains undefined

Ok after searching through most of this forum I couldn’t find an answer to my question.

what i have got is an external XML file that loads the news data into flash where it is there parsed and assigned to a dynamic text box and styled with a style sheet. Through trace() if found the xml gets loaded properly but when i upload it to a webserver it does not always load. Many times the variable just reads out undefined. If i refresh it a few times it will eventually load. This is not acceptable of course. It needs to try until it loads. I thought i had the code to make this happen but Im afraid im mistaken.
here is the code, its inside the first frame of a simple swf with only the dynamic text box.


stop();
trace("1");

content_txt.htmlText = "Loading...";
var xmlData = new XML(this);
xmlData.ignoreWhite = true;
trace("commence loading of XML");


xmlData.onLoad = function(sucess) {
	if(sucess) {
		for (var n = 0; n<this.firstChild.childNodes.length; n++) {
			trace("inside the for loop" + n);
			_root.date = this.firstChild.childNodes[n].childNodes[0].firstChild.nodeValue;
			_root.venue = this.firstChild.childNodes[n].childNodes[1].firstChild.nodeValue;
			_root.city = this.firstChild.childNodes[n].childNodes[2].firstChild.nodeValue;
			_root.info = this.firstChild.childNodes[n].childNodes[3].firstChild.nodeValue;
			if (n<1) {
				trace("im here inside the parser");
		 	contentData = "<p><span class='head'>"+_root.date+"</span><br><span class='venue'>"+_root.venue+" -- "+_root.city+"</span><br><span class='info'><a href='showdate.php?showid="+_root.info+"' target='_blank'>Click Here For More Info</a></span></p><br>";
			} else {
		 	contentData += "<p><span class='head'>"+_root.date+"</span><br><span class='venue'>"+_root.venue+" -- "+_root.city+"</span><br><span class='info'><a href='showdate.php?showid="+_root.info+"' target='_blank'>Click Here For More Info</a></span></p><br>";
			}
		}
	} else {
		trace("XML no load");
		content_txt.text = "Error";
	}
};
xmlData.load("shows.xml");
var myCSS = new TextField.StyleSheet();
var cssURL = "shows.css";
myCSS.load(cssURL);
myCSS.onLoad = function(success) {
	if (success) {
		content_txt.styleSheet = myCSS;
		content_txt.htmlText = contentData;
	} else {
		content_txt.text = "Error";
	}
};
trace(contentData);
trace("done");

any thoughts?