# setInterval not working in AS2 Class

**URL:** <https://forum.kirupa.com/t/setinterval-not-working-in-as2-class/251343>\
**Category:** flash\
**Created:** [February 7, 2008, 4:08pm UTC](https://forum.kirupa.com/t/setinterval-not-working-in-as2-class/251343 "2008-02-07T16:08:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![uifimage](https://avatars.discourse-cdn.com/v4/letter/u/85e7bf/32.png) [@uifimage](https://forum.kirupa.com/u/uifimage)\
**Post date:** [February 7, 2008, 4:08pm UTC](https://forum.kirupa.com/t/setinterval-not-working-in-as2-class/251343/1 "2008-02-07T16:08:36Z")

</div>

Hi I have the following strange problem…

```
public function showImageAt(num:Number):Void 
{	
	var interval:Number = setInterval(
	  function():Void {
	trace("WORKING"); // works
	test(); // doesnt work
	    clearInterval(interval);
	  },
	  500
	);
}

```

private function test():Void  
{  
trace(“test”);  
}

so the test function never gets called… anyone could help me on this one?
