# setInterval function

**URL:** <https://forum.kirupa.com/t/setinterval-function/222215>\
**Category:** flash\
**Created:** [April 11, 2007, 5:25pm UTC](https://forum.kirupa.com/t/setinterval-function/222215 "2007-04-11T17:25:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![theonlycarmire](https://avatars.discourse-cdn.com/v4/letter/t/a183cd/32.png) [@theonlycarmire](https://forum.kirupa.com/u/theonlycarmire)\
**Post date:** [April 11, 2007, 5:25pm UTC](https://forum.kirupa.com/t/setinterval-function/222215/1 "2007-04-11T17:25:16Z")

</div>

Hey guys,

I have a pretty simple question about the setInterval function (at least, I think it’s simple). I am having a bit of a problem using it… I’ve never really used it before, and I’d much rather use it than do a frame count like I am usually doing.

Anyway, here’s the code.

```auto

var ID:Number; 
function tweenText() {
        trace("pass");
        var t1 = new Tween(this["cat"+i], "_alpha", Strong.easeOut, 0, 100, 50, false);
}
ID = setInterval(this, "tweenText", 2000);

```

basically, I want to run tweenText after 2000 milliseconds… Am I correc that this is what will happen? Am I using the correct structure?

-theonlycarmire
