# Having a code issue (umm hence being on this forum)

**URL:** <https://forum.kirupa.com/t/having-a-code-issue-umm-hence-being-on-this-forum/213969>\
**Category:** Uncategorized\
**Created:** [January 24, 2007, 5:59pm UTC](https://forum.kirupa.com/t/having-a-code-issue-umm-hence-being-on-this-forum/213969 "2007-01-24T17:59:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![htrain26](https://avatars.discourse-cdn.com/v4/letter/h/d07c76/32.png) [@htrain26](https://forum.kirupa.com/u/htrain26)\
**Post date:** [January 24, 2007, 5:59pm UTC](https://forum.kirupa.com/t/having-a-code-issue-umm-hence-being-on-this-forum/213969/1 "2007-01-24T17:59:45Z")

</div>

I have this swf with three different movie clips that each load a random image. I have this code and it works when I just use the code for one movie clip. I fugure I’m doing something wrong with the code. Any suggestions???(also, I am controlling this swf with another—swf\_01 has btns and when you rollover the btns swf\_02 loads random images into the empty mc’s. The problem isn’t with the LocalConnection jazz (i think). I beleive it’s something with this code)  
Here’s the code:

stop();

pic\_arr = [“images2/comm\_pic1”, “images2/comm\_pic2”, “images2/comm\_pic3”, “images2/comm\_pic4”, “images2/comm\_pic5”, “images2/comm\_pic6”, “images2/comm\_pic7”];  
holder\_mc.onEnterFrame = function() {  
ranNum = Math.floor(Math.random()\*pic\_arr.length);  
holder\_mc.loadMovie(pic\_arr[ranNum]+".jpg");  
};

pic\_arr = [“images2/comm\_pic1”, “images2/comm\_pic2”, “images2/comm\_pic3”, “images2/comm\_pic4”, “images2/comm\_pic5”, “images2/comm\_pic6”, “images2/comm\_pic7”];  
holder\_mc2.onEnterFrame = function() {  
ranNum = Math.floor(Math.random()\*pic\_arr.length);  
holder\_mc.loadMovie(pic\_arr[ranNum]+".jpg");  
};

pic\_arr = [“images2/comm\_pic1”, “images2/comm\_pic2”, “images2/comm\_pic3”, “images2/comm\_pic4”, “images2/comm\_pic5”, “images2/comm\_pic6”, “images2/comm\_pic7”];  
holder\_mc3.onEnterFrame = function() {  
ranNum = Math.floor(Math.random()\*pic\_arr.length);  
holder\_mc.loadMovie(pic\_arr[ranNum]+".jpg");  
};

thanks,  
hutch
