Hi,
I have an Array Object called extData_arr, that contains data read from a database. Using this data, I’d like to populate my subMenu MovieClips appropriately. I can elaborate on the format of this array if required but basically the problem is this…
Now this line seems to work and displays correctly as I expect
status.text = status.text + n + " : " + i + "
"; //tracing
but for some reason, on the following line where I try to create empty Clips, flash just doesn’t recognize the value of i and therefore refuses to create the clips. Does anyone know why?
[size=1]function createSubButtons() {
for (n=0; n < extData_arr.length; n++)
{
for (i=0; i<extData_arr[n][0].length; i++)
{
status.text = status.text + n + " : " + i + "
"; //tracing
_root[“subMenu_mc”+(n+1)].createEmptyMovieClip(“sub_btn”+(i+1), getNextHighestDepth());
}
}
trace(_root.subMenu_mc1.sub_btn1); //yields undefined
trace(_root.subMenu_mc1) // yields _level0.subMenu_mc1
}[/size]