# External text and setInterval

**URL:** https://forum.kirupa.com/t/external-text-and-setinterval/168680
**Category:** flash
**Created:** [November 9, 2005, 7:56am UTC](https://forum.kirupa.com/t/external-text-and-setinterval/168680 "2005-11-09T07:56:53Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![misterpatrick](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@misterpatrick](https://forum.kirupa.com/u/misterpatrick)
#### Post date: [November 9, 2005, 7:56am UTC](https://forum.kirupa.com/t/external-text-and-setinterval/168680/1 "2005-11-09T07:56:53Z")

</div>

Hello all,

I have been messing around with this for awhile this evening and can’t figure it out. How can I replace text loaded from an external file with text from another external file? Using setInterval and calling the .load from a function or something?

In the example below I’m calling an external text file, could this also work with an .xml file with cycling through the children?

[AS]  
var loadText:LoadVars = new LoadVars();  
loadText.load(“file1”); //I’ve tried changing the file name to a variable  
//various text stuff here

loadText.onData = function(src:String) {   
if (src != undefined) {  
testText.text = src;

```
} else {
	trace("Could not load text file.");
}

```

};  
[/AS]
