# Checking if a certain item from txt file is loaded

**URL:** <https://forum.kirupa.com/t/checking-if-a-certain-item-from-txt-file-is-loaded/233539>\
**Category:** Uncategorized\
**Created:** [July 24, 2007, 8:00pm UTC](https://forum.kirupa.com/t/checking-if-a-certain-item-from-txt-file-is-loaded/233539 "2007-07-24T20:00:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mehmet22](https://avatars.discourse-cdn.com/v4/letter/m/779978/32.png) [@mehmet22](https://forum.kirupa.com/u/mehmet22)\
**Post date:** [July 24, 2007, 8:00pm UTC](https://forum.kirupa.com/t/checking-if-a-certain-item-from-txt-file-is-loaded/233539/1 "2007-07-24T20:00:36Z")

</div>

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
