# Problem with setInterval and load(external.txt);

**URL:** <https://forum.kirupa.com/t/problem-with-setinterval-and-load-external-txt/203180>\
**Category:** Uncategorized\
**Created:** [October 8, 2006, 9:04pm UTC](https://forum.kirupa.com/t/problem-with-setinterval-and-load-external-txt/203180 "2006-10-08T21:04:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![yodalr](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/yodalr/32/1816_2.png) [@yodalr](https://forum.kirupa.com/u/yodalr)\
**Post date:** [October 8, 2006, 9:04pm UTC](https://forum.kirupa.com/t/problem-with-setinterval-and-load-external-txt/203180/1 "2006-10-08T21:04:07Z")

</div>

K, im making a game and made a code, for loading external files and making buttons out of them… Altough it acts stable. I’m kind of worried, tht the slow connection users might get a little messed up list.

Here’s the link to the game(It’s in estonian, so click on “Küsimused” to see the list:  
[http://www.eurorscg4d.ee/Lenny/promiljon2r\_0.20.html](http://www.eurorscg4d.ee/Lenny/promiljon2r_0.20.html)

Here’s the list code  
[AS]  
i = 1;  
interval = setInterval(uuenda, 50);  
function uuenda() {  
var loader:LoadVars = new LoadVars();  
loader.onLoad = function(success:Boolean):Void {  
if (!success) {  
trace(“the file failed to load”);  
clearInterval(interval);  
} else {  
nupp.duplicateMovieClip(“nupp”+i, i);  
eval(“nupp”+i).\_y = eval(“nupp”+(i-1)).\_y+17;  
eval(“nupp”+i).\_x = numbernumber  
if (eval(“nupp”+i).\_y\>=310) {  
eval(“nupp”+i).\_y = 2  
numbernumber = eval(“nupp”+i).\_x = eval(“nupp”+(i-1)).\_x+106;  
}  
eval(“nupp”+i).kiri.text = loader.pealkiri;  
trace(\_root.ring.kysimused.kast.nupp.kiri.text);  
}  
};  
loader.load(“kysimused/kysimused”+i+".txt");  
i = Number(i)+1;  
}  
uuenda;  
[/AS]
