There are a plethora of ways to enable/disable controls. Most controls and forms repond to:
myObject.enabled = false; And visually update to that effect, as well as no longer accepting input, mouse or keyboard. Links respond the same thing: myLink.enabled = false; However, I can't remember if containers automatically turn off all of their children; I know they certainly don't in Flash unless you specificy a click handler on the container. Suffice it to say, it's pretty easy; either: - register for an event, internally, to the component, and when it's enabled state changes, set all children to the enabled property that the container will have - override setEnabled, and call super.setEnabled, and then set all of your children to the state - bind each controls' enabled property to its container As an old skooler, I'd do the override, but binding may work well here. However you desire to disable ALL Links EVERYWHERE is quite confusing; hopefully one of the above solutions should work. ----- Original Message ----- From: "dave buhler" <[EMAIL PROTECTED]> To: <[email protected]> Sent: Monday, August 15, 2005 2:14 PM Subject: Re: [flexcoders] Sweeping the Stage in Search of a MovieClip/Component Type I thought it would work to sweep through the Stage and all containers. I could sweep through the registered view, but I have nested views where the links are visible. It's not the views that need to be disabled, it's the link within the view. On 8/15/05, JesterXL <[EMAIL PROTECTED]> wrote: > All Views', all containers? Um, no, in that case, you'll need a global > registry, much like how ViewHelper's are registered by ID, etc. > > However, I question why you need such sweeping changes? Why not toggle > the > enabled/disabledness of each view when it needs to be? > > ----- Original Message ----- > From: "dave buhler" <[EMAIL PROTECTED]> > To: <[email protected]> > Sent: Monday, August 15, 2005 10:00 AM > Subject: Re: [flexcoders] Sweeping the Stage in Search of a > MovieClip/Component Type > > > No love. > > I ran this to try and reference all the links within the application > scope, but it returned just those properties of the application scope. > I am looking to reference the Links within all views/containers.: > > ---------------------------------------------------------------------------------- > > public function showProfileByRole () : Void { > for(var p in mx.core.Application.application) > { > _root.taDisplayData.text += p + '\n'; > if(this[p] instanceof Link) > { > this[p]._visible = false; > } > } > } > > ---------------------------------------------------------------------------------- > > > > > On 8/14/05, JesterXL <[EMAIL PROTECTED]> wrote: > > for(var p in this) > > { > > if(this[p] instanceof Link) > > { > > this[p].visible = false; > > } > > } > > > > ----- Original Message ----- > > From: "dave buhler" <[EMAIL PROTECTED]> > > To: <[email protected]> > > Sent: Sunday, August 14, 2005 11:14 PM > > Subject: [flexcoders] Sweeping the Stage in Search of a > > MovieClip/Component > > Type > > > > > > Hello, > > > > In Flash, I've swept the stage in search of certain object types (like > > TextFields), so I could disable the objects by either removing them or > > changing their visibility. > > > > In Flex, is there a way to sweep all objects in search of specific > > component types, including those that are part of another view? > > > > I have Links where the visibility needs to be toggled off and on. > > > > I thought about making the Link a sub-class, too and adding the > > instance name to an array when the Link is created. Ideas, thoughts > > and suggestions are welcome. > > > > Dave > > > > > > > > -- > > Flexcoders Mailing List > > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt > > Search Archives: > > http://www.mail-archive.com/flexcoders%40yahoogroups.com > > Yahoo! Groups Links > > > > > > > > > > > > > > > > > > -- > > Flexcoders Mailing List > > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt > > Search Archives: > > http://www.mail-archive.com/flexcoders%40yahoogroups.com > > Yahoo! Groups Links > > > > > > > > > > > > > > > > > > -- > Flexcoders Mailing List > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt > Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com > Yahoo! Groups Links > > > > > > > > > -- > Flexcoders Mailing List > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt > Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com > Yahoo! Groups Links > > > > > > > -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links ------------------------ Yahoo! Groups Sponsor --------------------~--> <font face=arial size=-1><a href="http://us.ard.yahoo.com/SIG=12h2kt79h/M=362329.6886308.7839368.1510227/D=groups/S=1705007207:TM/Y=YAHOO/EXP=1124138159/A=2894321/R=0/SIG=11dvsfulr/*http://youthnoise.com/page.php?page_id=1992 ">Fair play? Video games influencing politics. Click and talk back!</a>.</font> --------------------------------------------------------------------~-> -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

