// Function for enabling/disabling TAB in all MovieClips and Buttons
function enableDisableAllTab(target:*, toEnable:Boolean):void {
for (var i:Number = 0; i < target.numChildren; i++) {
var childRef:* = target.getChildAt(i);
try {
if(childRef is SimpleButton || childRef is MovieClip || childRef is Sprite){
childRef.tabEnabled=false;
}
} catch (_error:Error) {
}
try {
if (childRef is MovieClip || childRef is Sprite || childRef is SimpleButton) {
if (childRef.numChildren > 0) {
enableDisableAllTab (childRef, toEnable);
}
}
} catch (_error:Error) {
}
}
}
//end of disableAllTab function ----------------------------------//
