How to get a collection of UIComponents based on a stylename in Adobe Flex

Posted by Mark Barton on Stack Overflow See other posts from Stack Overflow or by Mark Barton
Published on 2009-11-04T16:27:13Z Indexed on 2010/03/27 17:03 UTC
Read the original article Hit count: 440

Filed under:
|

Does anyone know an Actionscript equivalent of the javascript getElementsByClassName.

What I would like to do is add a custom 'stylename' to various components which I can then use to get a collection of these objects and therefore process their visibility property.

The idea is I want to hide various components based on what roles a logged in user has - I just want to make this flexible by adding an array of rolenames to a custom property or use the stylename property on a Canvas or Panel etc.

Thanks

© Stack Overflow or respective owner

Related posts about adobe-flex-3

Related posts about flex