Comparing / searching arrays

Greetings. Let me first say this is my first post, and I did search the forum and I found a great explenation on how to find a value in an array, but my problem is a little different and I’m not smart enough to figure it out on my own.

I have a random picture-script that, not surprisingly, shows random pictures.

Basically I have one array with all the imagenames which i shuffle every time the image is going to change.

pic_arr = ["images/1", "images/2", "images/3", "images/4", "images/5", (.....)  "images/55", "images/56", "images/57"];

And one array that keeps track of every image that has been displayed.

function shuffle(a,b){
return random(2);
} 
pic_arr.sort(shuffle);
holder_mc1.loadMovie(pic_arr[0]+".jpg");


i = folder.length;
folder* = pic_arr[0]; 

So after the image has changed a three times, the folderarray looks something like this.

folder = ["images/21", "images/12", "images/43"];

Now I need a script that will select a value from pic_arr that ISN’T a value in folder. I’ve tried for a few days now but I’ve gotten nowhere.

Please help?

Thank you in advance. :slight_smile: