# Pausing Randomly Loading SWFs

**URL:** <https://forum.kirupa.com/t/pausing-randomly-loading-swfs/190643>\
**Category:** flash\
**Created:** [June 13, 2006, 6:04pm UTC](https://forum.kirupa.com/t/pausing-randomly-loading-swfs/190643 "2006-06-13T18:04:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![MiddleFingerMan](https://avatars.discourse-cdn.com/v4/letter/m/bbce88/32.png) [@MiddleFingerMan](https://forum.kirupa.com/u/MiddleFingerMan)\
**Post date:** [June 13, 2006, 6:04pm UTC](https://forum.kirupa.com/t/pausing-randomly-loading-swfs/190643/1 "2006-06-13T18:04:34Z")

</div>

I’ve got a small script that loads up a random SWF, displays it for 10 seconds, then loads up another. This is a header to a web page and below the header (right below) is the main menu.

When the menu is activated it pops up submenus over the randomly loading SWFs and I would like to fade out the SWFs and pause the random loading script while the menu is active, then go back to normal once the menu is inactive.

Here is the ActionScript used to randomly load the SWFs:

```auto
var movieArray:Array = ["header001.swf", "header002.swf", "header003.swf", "header004.swf", "header005.swf", "header006.swf", "header007.swf"];

function loadSwf(){
    swf_mc.loadMovie(movieArray[Math.floor(Math.random() * (movieArray.length - 0))]);
}
setInterval(loadSwf, 10000);

```

Any suggestions will be greatly appreciated!
