I'm trying to create array of arrays (like a 2d array) however I'm getting error:
TypeError: Error #1006: value is not a function.
Here's my code:
I'm using Flash Professional CC 2015. How can I fix this error?
EDIT: Here's the full function:
function CreateMainMenu(xPos:Number, yPos:Number, depth:int, menu_xml:XML):void {
// Generate menu list
var arr:Array = new Array();
addChild(mainmenu_mc);
mainmenu_mc.x = xPos;
mainmenu_mc.y = yPos;
setChildIndex(mainmenu_mc, depth);
var num:int = 0;
for each (var tempNode:XML in menu_xml.elements()) {
var arr2:Array = new Array();
arr2.push(tempNode);
arr2.push("menu");
arr[num].push(arr2); // It gives error
num++;
}
trace (arr);
// GenerateMenu(this, "mainmenu_mc", xPos, yPos, depth, arr);
}
The first line number is 58, the last one is 79.
I'm getting this error:
TypeError: Error #1010: A term is undefined and has no properties. at xmlmenu_05_fla::MainTimeline/CreateMainMenu()[xmlmenu_05_fla.MainTimeline::frame1:72] at xmlmenu_05_fla::MainTimeline/processXML()[xmlmenu_05_fla.MainTimeline::frame1:118] at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at flash.net::URLLoader/onComplete()
numandarr. Also explain what line causes the error.