# "Clip changing with "onEnterFrame" event now not changing with "setInterval.”

**URL:** <https://forum.kirupa.com/t/clip-changing-with-onenterframe-event-now-not-changing-with-setinterval/212601>\
**Category:** flash\
**Created:** [January 12, 2007, 12:59pm UTC](https://forum.kirupa.com/t/clip-changing-with-onenterframe-event-now-not-changing-with-setinterval/212601 "2007-01-12T12:59:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pup\_100](https://avatars.discourse-cdn.com/v4/letter/p/da6949/32.png) [@Pup\_100](https://forum.kirupa.com/u/Pup_100)\
**Post date:** [January 12, 2007, 12:59pm UTC](https://forum.kirupa.com/t/clip-changing-with-onenterframe-event-now-not-changing-with-setinterval/212601/1 "2007-01-12T12:59:55Z")

</div>

Hi,

I have built a simple site where the logo at the top of the page has been constructed as a masked grid, the idea being that the logo is revealed as each cell in the logo has it’s color changed.

The color is changed via a tween in each individual cell & I originally triggered this to happen with the following “onEnterFrame” script (newHold\_array[k] being the array that holds the clips);

[AS]k = 0;  
\_root.onEnterFrame = function() {  
thisOne = newHold\_array[k];  
this.holdit\_mc.nhold\_mc[thisOne].play();  
k++;  
if (k\>=353) {  
break;  
}  
};[/AS]

The above code works fine but I wanted to speed up the rate of change so put a similar function in to a “setInterval” fired script

[AS]function lightUp(){  
thisOne = newHold\_array[k];  
trace(thisOne);  
this.holdit\_mc.nhold\_mc[thisOne].play();  
k++;  
if (k\>=353) {  
clearInterval(lightInt)  
}  
}[/AS]

which although firing ok & able to trace out the correct cell with “trace(thisOne);” will not get the correct or any cell to play?

Fla attached.
