# This is probably a simple fix...and I'm dumb :(

**URL:** <https://forum.kirupa.com/t/this-is-probably-a-simple-fix-and-im-dumb/213950>\
**Category:** flash\
**Created:** [January 24, 2007, 2:55pm UTC](https://forum.kirupa.com/t/this-is-probably-a-simple-fix-and-im-dumb/213950 "2007-01-24T14:55:53Z")\
**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, 2:55pm UTC](https://forum.kirupa.com/t/this-is-probably-a-simple-fix-and-im-dumb/213950/1 "2007-01-24T14:55:53Z")

</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???  
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
