# Load random movieClips from the library

**URL:** <https://forum.kirupa.com/t/load-random-movieclips-from-the-library/249010>\
**Category:** Uncategorized\
**Created:** [January 14, 2008, 5:22pm UTC](https://forum.kirupa.com/t/load-random-movieclips-from-the-library/249010 "2008-01-14T17:22:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lolomedia](https://avatars.discourse-cdn.com/v4/letter/l/ebca7d/32.png) [@lolomedia](https://forum.kirupa.com/u/lolomedia)\
**Post date:** [January 14, 2008, 5:22pm UTC](https://forum.kirupa.com/t/load-random-movieclips-from-the-library/249010/1 "2008-01-14T17:22:14Z")

</div>

Hello,

I need to load random movieClips from the library to a middleStage container on my stage.  
I already have this.

```auto

for (i=1; i<7; i++) {
 this["btn"+i].iD = i;
 this["btn"+i].onRelease = function() {
    _root.currentItem1.swapDepths(300);
      _root.currentItem1.removeMovieClip();
      _root.currentItem1 = _root.middleStage.attachMovie("Animation"+this.iD, "Animation"+this.iD, 1);
 };
}

```

I just need to add to that random loading to the middleStage this will only work when the user is not interacting with buttons = btn’s.

please some advice.

thanks. I:-)
