# Loading more than one random clip?

**URL:** <https://forum.kirupa.com/t/loading-more-than-one-random-clip/63648>\
**Category:** Uncategorized\
**Created:** [September 8, 2004, 8:35pm UTC](https://forum.kirupa.com/t/loading-more-than-one-random-clip/63648 "2004-09-08T20:35:12Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![azithinkibe](https://avatars.discourse-cdn.com/v4/letter/a/a88e4f/32.png) [@azithinkibe](https://forum.kirupa.com/u/azithinkibe)\
**Post date:** [September 8, 2004, 8:35pm UTC](https://forum.kirupa.com/t/loading-more-than-one-random-clip/63648/1 "2004-09-08T20:35:12Z")

</div>

Heres the deal. I’ve found tutorials that show how to randomly load from a selection of movie clips. My problem is, I have two clips that load on top of each other. Ones a blurred image, the other is a clear, and when you move a mask over the image, it goes from blurry to clear. Right?

But I want a different image to load everytime. Problem is that I need both the random blurry and clear pictures to be the same! No point moving your mouse over a blurred picture of a mountain only to find a clear river underneath, right?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 9, 2004, 6:21pm UTC](https://forum.kirupa.com/t/loading-more-than-one-random-clip/63648/2 "2004-09-09T18:21:13Z")

</div>

If you give the code that randomly selects mc’s, we can addapt it more easily :).

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 9, 2004, 8:42pm UTC](https://forum.kirupa.com/t/loading-more-than-one-random-clip/63648/3 "2004-09-09T20:42:18Z")

</div>

This is the code I found…

[size=2]filename = [“circular.swf”, “vibration.swf”, “random\_movement.swf”]; path = “[http://www.kirupa.com/developer/actionscript/animation/](http://www.kirupa.com/developer/actionscript/animation/)”; i = filename.length; k = Math.floor(Math.random()\*i); loadMovie(path+filename[k], movieTarget);[/size]

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 9, 2004, 8:53pm UTC](https://forum.kirupa.com/t/loading-more-than-one-random-clip/63648/4 "2004-09-09T20:53:23Z")

</div>

Try this:

```auto
filename = [["circular.swf", "circular2.swf"], ["vibration.swf", "vibration2.swf"], ["random_movement.swf", "random_movement2.swf"]];
path = "http://www.kirupa.com/developer/actionscript/animation/";
i = filename.length;
k = Math.floor(Math.random()*i);
loadMovie(path+filename[k][0], movieTarget);// this load the first
loadMovie(path+filename[k][1], movieTarget2);// this load the first

```

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 10, 2004, 10:48am UTC](https://forum.kirupa.com/t/loading-more-than-one-random-clip/63648/5 "2004-09-10T10:48:18Z")

</div>

[http://www.kirupaforum.com/forums/showthread.php?t=69275](http://www.kirupaforum.com/forums/showthread.php?t=69275)

scotty(-:
