I have a dynamic array. This is my code thus far.
I am trying to hurry and do this for a school project, but can't get the nested arrays to work. Anybody know what I am doing wrong?Code:add_student = function () { var gender = _root.gender_text.text; var Name = _root.name_text.text; if(gender == "Male") { var length = _root.boys.length; _root.boys[length] = (Name); //Is this not possible? _root.boys[length][0] = "test"; _root.boys[length][1] = "test2"; //traces undefined trace(_root.boys[length][1]); } }




Reply With Quote