Somebody ask a similar question on this list recently. You can loop through all the components in your app by using the numChildren property and getChildAt method:
function checkAllButtons(container) { for (var i = 0; i < container.numChildren; i++) { var c = container.getChildAt(i); if (c is Container) { checkAllButtons(c); } else { if (c is Button) { // Do your changes here } } } Then start the process by passing the application as a parameter: checkAllButtons(Application.application); -- Laurent Cozic Flash, Flex and Web Application development http://pogopixels.com --- On Tue, 8/12/08, itdanny2002 <[EMAIL PROTECTED]> wrote: From: itdanny2002 <[EMAIL PROTECTED]> Subject: [flexcoders] Loop through all visual components To: flexcoders@yahoogroups.com Date: Tuesday, August 12, 2008, 9:19 AM I have created a custom button and used it throughoutly in my FLEX application. How can I change it dynamically by looping through all components ? Is there any like "children" stuff and then use "ValidateDisplayLis t" to make it refresh ? Actually, it likes changing the skin dynamically. But I need to check the content of button before modification. Having example is great. Thanks in advance.