# Banner rotation (timed event)

**URL:** https://forum.kirupa.com/t/banner-rotation-timed-event/227748
**Category:** flash
**Created:** [June 1, 2007, 6:23pm UTC](https://forum.kirupa.com/t/banner-rotation-timed-event/227748 "2007-06-01T18:23:58Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![pokermagic](https://avatars.discourse-cdn.com/v4/letter/p/dec6dc/32.png) [@pokermagic](https://forum.kirupa.com/u/pokermagic)
#### Post date: [June 1, 2007, 6:23pm UTC](https://forum.kirupa.com/t/banner-rotation-timed-event/227748/1 "2007-06-01T18:23:58Z")

</div>

I’m trying to do a simple banner section which will change every 10 seconds.

I created a blank scene in which has and empty movie clip and then the actions below should rotate the loaded swf’s. But for some reason it doesnt’ work… I have included my code below.

Thanks for your help.

I’m wondering if it’s on the loaded movie timeline and not on the main timeline anymore.

```auto

// load the first movieloadMovie("swf/featured.swf", 0);// array of moviesvar myArrayName = new Array();myArrayName[0] = "swf/featured.swf";myArrayName[1] = "swf/featured1.swf";myArrayName[2] = "swf/featured2.swf";var counter:Number = 0;// play for 10 secondsfunction wait() { //clearInterval(myTimer); //stops the function being called again.	//test to see if the counter is greater than 2, if so reset to 0;	if(counter > 2) { counter == 0;	} //unload the current movie and load the next	trace("unloadmovie");	unloadMovie(myArrayName[counter]);	//load the next movie	counter++;	trace("counter is " + counter);	trace("load next movie");	loadMovie(myArrayName[counter], 0);	}myTimer = setInterval(wait, 10000); // calls the function wait after 10 seconds

```
