# Countdown timer that triggers random movie clip load

**URL:** <https://forum.kirupa.com/t/countdown-timer-that-triggers-random-movie-clip-load/248498>\
**Category:** Uncategorized\
**Created:** [January 8, 2008, 8:48pm UTC](https://forum.kirupa.com/t/countdown-timer-that-triggers-random-movie-clip-load/248498 "2008-01-08T20:48:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![michmons](https://avatars.discourse-cdn.com/v4/letter/m/b4bc9f/32.png) [@michmons](https://forum.kirupa.com/u/michmons)\
**Post date:** [January 8, 2008, 8:48pm UTC](https://forum.kirupa.com/t/countdown-timer-that-triggers-random-movie-clip-load/248498/1 "2008-01-08T20:48:57Z")

</div>

I need help. I have this code here to count down every 10 seconds and load an external random movie clip. It works once, but I would like to have it start the timer again–can anyone help me to achieve this?

code:

displayTime = 5;  
function countDown() {  
displayTime–;  
if (displayTime == 0) {  
clearInterval(timer);  
trace(“Times Up”);  
container1\_mc.loadMovie(“ball”+(Math.floor(Math.random()\*3)+1)+".swf", “\_root.movieclip”);

```
}

```

};  
timer = setInterval(countDown, 1000);
