Is there any way to create new array instances inside loops, that would be responsive for commands / functions?
ActionScript Code:
for(var i:int = 1; i <= 2; i ++) {
var subMenuBASE:Array = this["subMenu" + i] as Array;
this[subMenuBASE] = new Array();
this.subMenu[i] = "hello";
this.subMenu[i].push("world");
}
trace(this.subMenu1);
trace(this.subMenu2);
This way i get an error
Quote:
|
TypeError: Error #1010: A term is undefined and has no properties. at Untitled_fla::MainTimeline/frame1()
|
Any ideas?
Please, i'm stuck for days on this, have no luck with google / as3 manual either...