I have an array that looks like:
var navArray:Array = new Array();
navArray.push({name:"hi", file:"file0.swf", num:"0"});
navArray.push({name:"test", file:"file1.swf", num:"1"});
navArray.push({name:"sweet", file:"file2.swf", num:"2"});
I have my fla setup, so that each “name” gets pushed into a movieclip onto the stage. Everything works correctly and all my mc’s show up on the stage with the correct “name” inside of them.
var newNav = _root.attachMovie("mcNavigation", "mcNav_" + navArray*.name, _root.getNextHighestDepth(), {_x:xPos, _y:yPos});
newNav.mcNavigationText.htmlText = navArray*.name;
I have a button that when clicked it will sortOn(“name”). This works fine, but now I want to make another button that will sortOn(“num”). I think the problem is when I first attach the mc to the stage, I am referncing navArray*.name. Is there a way to reference two objects so that I can sort both of them with different buttons?
Thanks