# setInterval + dynamic txtfields = don't work!

**URL:** <https://forum.kirupa.com/t/setinterval-dynamic-txtfields-dont-work/207956>\
**Category:** Uncategorized\
**Created:** [November 23, 2006, 3:19am UTC](https://forum.kirupa.com/t/setinterval-dynamic-txtfields-dont-work/207956 "2006-11-23T03:19:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kredd](https://avatars.discourse-cdn.com/v4/letter/k/848f3c/32.png) [@kredd](https://forum.kirupa.com/u/kredd)\
**Post date:** [November 23, 2006, 3:19am UTC](https://forum.kirupa.com/t/setinterval-dynamic-txtfields-dont-work/207956/1 "2006-11-23T03:19:54Z")

</div>

hello all,  
i’m having trouble using setInterval() to delay some textfields. they textfields are dynamically generated and i can animate the just fine using a for loop or an if statement…i just can’t figure out how to get setInterval() to delay the iteration…

```auto
 
anim = function(a){
for(a=0; a< _global.bldgFacts; a++){
     this.holder_anim["facts" + a]["factstxt" + a]._x +=(400-this.holder_anim["facts" + a]["factstxt" + a]._x)/20;
   }
}
 
this.onEnterFrame {
a=0;var myInterval(anim, 5000);
}

```

i’ve tried a billion different things a billion different ways and haven’t done anything but confuse myself!

thanks!
