Only the last one shows up!?

Anyone know why only the last mainNav button shows up on stage? Tell me if you need more info.


function createMainMenu() {
	var a = 1;
	var total = mm_array.length;
	while (a<=total) {
		ypos = ((a-1)*homm)+1;
		container_mc.attachMovie("mainnav_mc", "mainnav"+a+"_mc", this.getNextHighestDepth()+100, {_x:0, _y:ypos});	// attach the movieClip
		var nc = container_mc["mainnav"+a+"_mc"];
		nc.menutext = mm_array[(a-1)];	// set the title text for each button
		nc.itemnum = a;	// set the menu #
		a++;
	}
}