Checking if a certain item from txt file is loaded

Hey guys,

I have been searching the forums and had no luck. Here is my problem I am loading an external text file. What I want to be able achieve is see if a certain dynamic text box has text/image loaded in to it. Here is the code I have so far.

loadVarshtmlText = new LoadVars();
loadVarshtmlText.load(“test.txt”);
loadVarshtmlText.onLoad = function(success) {
if (success) {
trace(“Doc Loaded”);
loadingTextField.htmlText = this.loadingTextField;
} else {
trace(“not loaded”);
}
};

if (loadingTextField == undefined){
trace(“no image”);
}
else{
trace(“image is here”);

}; 

I am also trying to achieve the same effect in XML but I am also getting nowhere.

var xml:XML = new XML();
xml.ignoreWhite = true;
xml.onLoad = function() {

var nodes = this.firstChild.childNodes;

numOfItems = nodes.length;

for (var i = 0; i<numOfItems; i++) {

imageTest.loadMovie(nodes*.attributes.image);

myText.text = nodes*.attributes.caption;
}
};

xml.load(“images.xml”);

this.onEnterFrame = function() {
filesize = imageTest.getBytesTotal();
loaded = imageTest.getBytesLoaded();
if (loaded != filesize) {
imageTest._alpha=25;
trace(hello);

} else {
	gotoAndStop('10');
}

};

stop();

Thank You