# Helop with the Kirupa Random Script

**URL:** <https://forum.kirupa.com/t/helop-with-the-kirupa-random-script/215516>\
**Category:** flash\
**Created:** [February 7, 2007, 9:32pm UTC](https://forum.kirupa.com/t/helop-with-the-kirupa-random-script/215516 "2007-02-07T21:32:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cecilia22](https://avatars.discourse-cdn.com/v4/letter/c/58956e/32.png) [@cecilia22](https://forum.kirupa.com/u/cecilia22)\
**Post date:** [February 7, 2007, 9:32pm UTC](https://forum.kirupa.com/t/helop-with-the-kirupa-random-script/215516/1 "2007-02-07T21:32:33Z")

</div>

HI, I tried to implement the random movie script into a site but the script is only showing one of the 5 animations over and over.

Can someone tell me what is wrong with my code? I just copied it from the tutorial and changed the files names and the path.

filename = [“1.swf”, “2.swf”, “3.swf”, “4.swf”, “5.swf”];  
path = “[http://www.callone.net/bluechip/images/](http://www.callone.net/bluechip/images/)”;  
i = filename.length;  
k = Math.floor(Math.random()\*i);  
loadMovie(path+filename[k], movieTarget);

thanks

Cecilia
