addChild(new button()) - How to add a name to this new created button
Hello,
Lost my old nickname, i was Pluda, now exPluda?.
well, tring to use a loop to add some buttons to my work, but need to reference their names so I can have diferent x positions for each. How to do that?
for ( var sm:uint = 0; sm < sub_menus.length; sm ++ ) {
hsm.addChild(new bt_sub_menus());
hsm.bt_sub_menus.x -= hsm.x-10;
hsm.bt_sub_menus.y = hsm.bt_sub_menus.height+sm*15;
}
this does not work, i just get one button placed where I want.
Thanks!