Что-то вроде ниже может помочь вам. но вы должны проверять синтаксические ошибки, у вас нет времени на проверки ... Задайте любой вопрос, если вы не можете разобраться.
function findMyButton(doc:DisplayObjectContainer , n:String):void{
for(var i:int=0; i<doc.numChildren; i++)
{
var btn:DisplayObjectContainer = this.getChildAt(i) as DisplayObjectContainer;
if(btn && btn.numChildren > 0){
findMyButton(btn , n);
}
if(btn.name =="btn_upload")
{
btn.mouseEnabled = true;
}
else
{
btn.mouseEnabled = false;
}
}
}
// This ll allow you to disable or enable all your objects
// so you can activate the button you like after you call this method.
function conrolmyButtons(doc:DisplayObjectContainer , b:Boolean):void{
for(var i:int=0; i<doc.numChildren; i++)
{
var btn:DisplayObjectContainer = this.getChildAt(i) as DisplayObjectContainer;
if(btn && btn.numChildren > 0){
findMyButton(btn , n);
}
btn.mouseEnabled = b;
}
}