Building menu + submenu, with 2 arrays

Hello,

I’m building a menu with action script, the menu has an interval, so the items follow after each other. This is not a real problem. But the submenu is. I want to build it the same way, with the interval.

But the menu array contains, some years, and with a loop a go trough this array and flash builds it with the items of the array.

The submenu array, contains the quantity of the year, so the quantity of subbuttons…
But i can’t fix it to use the number in the array as quantity of subitems…

here is the code:

menuYearItems = [0, 4, 6, 5, 9];
 menuYear = ["2004", "2003", "2002", "2001", "2000", "INFO"];
 i = -1;
 function func_menua() {
 	i++;
 	mcIntsetInterval([menuYear*], 1000*i);
 	if (i>=menuYear.length-1) {
 		clearInterval(mcInt);
 	}
 	var menua = _root.attachMovie("buttonyear", menuYear*, 10+i);
 	menua.year.year = menuYear*;
 	trace(menua);
 	menua._x = 50;
 	menua._y = 55+24*i;
 	menua.year.hit.onPress = function() {
 		untVar = menuYearItems*;
 		trace ("unt"+untVar);
 		mcInt2 = setInterval(func_menub, 150);
 		u = -1;
 	};
 	function func_menub() {
 		u++;
 		mcIntsetInterval([menuYearItems[u]], 1000*i);
 		if (u>=menuYearItems.length-1) {
 			clearInterval(mcInt2);
 		}
 		var menub = _root.attachMovie("buttonunt", menuYearItems[u], 20+u);
 		menub.unt.unt = "unt"+menuYearItems[u]+".";
 		trace(menub);
 		menub._x = 115;
 		menub._y = 55+24.7*u;
 	}
 }
 mcInt = setInterval(func_menua, 150);
 stop();
 

hope somebody can help me a little bit…

Maarten

Is a 2d array maybe a good alternative? i have no experience with that, but maybe its an option?