I’m creating a couple menus complied from arrays, a main menu and a sub menu. I created a container clip to dump the menu items into. The function runs fine when creating the initial main menu from _root. However, when running it from the individual menu item - calling the same build function in another instance of the container in the parent clip - it causes flash to lock up. I’ve run out of ideas, can anyone help?
Here’s the build function for the main menu:
function buildMainMenu(menuArray) {
arrayLength = menuArray.length;
yPos = 10;
for (a=0; a<=arrayLength-1; a++) {
this.attachMovie(“menuItem”, “item”+a, a);
this[“item”+a].linkText.text = menuArray[a];
this[“item”+a]._y = yPos;
yPos = yPos+(this[“item”+a]._height+10);
this[“item”+a].menuButton.onRelease = function() {
_parent.targetFrame = 20;
// this freezes flash
_parent.menuContainer02.buildMainMenu(mainArray);
};
}
}
I’ve also attached the .fla …any help is truly appreciated.