# setInterval with MC

**URL:** <https://forum.kirupa.com/t/setinterval-with-mc/212046>\
**Category:** flash\
**Created:** [January 8, 2007, 1:17am UTC](https://forum.kirupa.com/t/setinterval-with-mc/212046 "2007-01-08T01:17:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![qpixo](https://avatars.discourse-cdn.com/v4/letter/q/c4cdca/32.png) [@qpixo](https://forum.kirupa.com/u/qpixo)\
**Post date:** [January 8, 2007, 1:17am UTC](https://forum.kirupa.com/t/setinterval-with-mc/212046/1 "2007-01-08T01:17:33Z")

</div>

Hi all,

I have 3 movie clips and I’m using keyframes to animate them. I want them to show as slideshow and assign a time to each slide to display. How can I do that? I put all those 3 mc’s in first keyframe and assign them with different instance name.

Here what I got but it doesn’t work. Those MC’s don’t play at all. Please does anyone know how to do the rigth way??

I’m using an array to store them:

var duration = 1000;  
var tab\_slide = [slideA\_mc, slideB\_mc, slideC\_mc];

function add\_fx() {  
var monInterval = setInterval(play\_fx, duration);  
function play\_fx() {  
clearInterval(monInterval);  
this.onLoad = function() {  
for(i=0;i\<tab\_slide.length;i++) {  
tab\_mc\*.gotoAndPlay(2); \<-- begin to play in 2 frame, first frame is STOP();  
}  
};  
}  
}

add\_fx();
