Loading movies using an array

hi all,

im having some trouble and i need your help. basically i have my movie which has 18 MCs being used as buttons. each MC has an instance name of “hole0”,“hole1”, “hole2”, “hole3” so on and so fourth all the way up to “hole18”. then for each of those MCs i want to write a loop that will assign a corresponding array index to each MC. in that array are my movie names (“one.swf”, “two.swf”, “three.swf”… “eighteen.swf”). basically i want “hole0” onRelease to load the array’s index of 0. and “hole1” onRelease to load the array’s index of 1… all the way up to 18. does that make sense? i hope so.

heres my code, please dont laugh at me :slight_smile:

[AS]
holeArray = new Array();
holeArray = [“one.swf”, “two.swf”, “three.swf”, “four.swf”, “five.swf”, “six.swf”, “seven.swf”, “eight.swf”, “nine.swf”, “ten.swf”, “eleven.swf”, “twelve.swf”, “thirteen.swf”, “fourteen.swf”, “fifteen.swf”, “sixteen.swf”, “seventeen.swf”, “eighteen.swf”];
//
for (g=0; g<18; g++) {
_root[“hole”+g].onRelease = function() {
for (h=0; h<holeArray.length; h++) {

		trace(holeArray[h]);
	}
	
};

}
[/AS]

the part with my trace command is where (im assuming) i’d put my load movie command, only when i release any MC the entire array is traced rather than the corresponding index…

if you can make any sense of this and can help, you are awesome.

thanks!!!