I have a loop which creates dynamic objects from a class (MenuBulletClass) and adds it into my container (menu_select_list_container:MovieClip). I’m having problems getting properties/variables back from a specific object for example below.
for (i=0; i < 8; i++) {
var menuBulletObject:MenuBulletClass = new MenuBulletClass();
menuBulletObject.name = "bullet" + i;
menuBulletObject.xml_selection = i;
menu_select_list_container.addChild(menuBulletObject);
}
trace(menu_select_list_container.getChildByName("bullet1").xml_selection);
It throws a “1119: Access of possibly undefined property xml_selection through a reference with static type flash.display:DisplayObject.” error. I’m really stumped on this and the answer will probably be laughable. Anyone? Thanks!