If you have those 16 buttons already added on the stage, I'll assume the parent of the buttons is the stage, you can do
That'll only work if the first 16 children of your stage are the buttons. But you can set their instance names using the .name property in AS3.PHP Code:for (var i = 0; i < 16; i++) {
var btt:* = stage.getChildAt (i);
var string:String = "btn_" + i;
btt.name = string;
}




Reply With Quote
