The best way would probably be to set Application.application.enabled
= false; since it should also disable the children components of the app.

If it doesn't work, you can loop through all the components using a
recursive function. For example:


function recursiveDisable(component) {
   for (var i = 0; i < component.numChildren; i++) {
      recursiveDisable(component.getChildAt(i));
   }
   component.enabled = false;
}

recursiveDisable(Application.application);




--- In [email protected], "Claudio M. E. Bastos Iorio"
<[EMAIL PROTECTED]> wrote:
>
> I'm trying to access all controls in stage, to disable them (error
occurred
> in app -> disable all controls). 
> 
> I'd like to have access to some kind of collection to iterate trough,
> something like:
> 
>  
> 
> Foreach (var mycontrol:Control in CollectionofObjects){
> 
>                 Mycontrol.enabled = false;
> 
> }
> 
>  
> 
> Any idea?
> 
>  
> 
> ____________________________________
> 
> Claudio M. E. Bastos Iorio
> 
>  <http://www.blumer.com.ar/> http://www.blumer.com.ar
>


Reply via email to