# Another set interval problem

**URL:** <https://forum.kirupa.com/t/another-set-interval-problem/68826>\
**Category:** flash\
**Created:** [October 29, 2004, 9:54am UTC](https://forum.kirupa.com/t/another-set-interval-problem/68826 "2004-10-29T09:54:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![NovemberRain](https://avatars.discourse-cdn.com/v4/letter/n/73ab20/32.png) [@NovemberRain](https://forum.kirupa.com/u/NovemberRain)\
**Post date:** [October 29, 2004, 9:54am UTC](https://forum.kirupa.com/t/another-set-interval-problem/68826/1 "2004-10-29T09:54:04Z")

</div>

I’ve a function in the root of the main movie. The problem comes when i tried to call the function from a button inside another mc in the \_root the function call doesn’t work . It seems no response from the function . I can’t even trace the value of a variable in the function.

My objective is to execute the function (we tried to call from inside the mc) for a specific interval and the user will lead to the rest of the game process .

This is the source code

```auto

on (release) {
intID = setInterval (_root.showClips, 1000);
}

```

I’ve also tried

```auto

on (release) {
_root.intID = setInterval (_root.showClips, 1000);
}

```

This is the function being called

```auto

function showClips() {
 // -------------------------------Show the clips in the initial time 
 for (i=1; i<17; i++) {
  _root["b" add i]._visible = true;
  _root["b" add i].gotoAndStop(2);
 }
 
 
 _root.showCounter +=1;
 trace(_root.showCounter);
 if (_root.showCounter == 4){
  for (i=1; i<17; i++) {
   _root["b" add i].gotoAndStop(1);
  }
  clearInterval (intID); // Clear the interval that calls from Splash Screen
  _root.showCounter = 0; // Reset the counter 
 }
 
}

```

What is wrong with this… .☹
