# setInterval with an AS2 Class?

**URL:** <https://forum.kirupa.com/t/setinterval-with-an-as2-class/124850>\
**Category:** Uncategorized\
**Created:** [October 7, 2004, 9:52am UTC](https://forum.kirupa.com/t/setinterval-with-an-as2-class/124850 "2004-10-07T09:52:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![daheroes](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@daheroes](https://forum.kirupa.com/u/daheroes)\
**Post date:** [October 7, 2004, 9:52am UTC](https://forum.kirupa.com/t/setinterval-with-an-as2-class/124850/1 "2004-10-07T09:52:26Z")

</div>

Hello all.

I was wondering why my current code for calling a setInterval on a function doesn’t work inside my class.

I have this code inside one function, calling a second function.

intID = setInterval(selfReferential, dupe, 30, 0x000000);

The selfReferential keyword refers to the current class, but was defined previously. (selfReferential = this; )

I get no errors, but the dupe() function is never called. Oh, and I had the selfReferential variable replaced with the this keyword at one point as well.

Anybody have any idea why this is?

Thanks for all your help.

-Brekk
