RE: [flexcoders] Change alpha properties when setting enabled property
Good catch Mike... I was thinking "backgroundAlpha", which is a style on Container and its derived children, instead of the "alpha" propertry. Although it is not a style on UIComponent, it is more or less the same concept. Thanks for pointing that out. -Andy _ Andrew Trice Cynergy Systems, Inc. http://www.cynergysystems.com Blog: http://www.cynergysystems.com/blogs/page/andrewtrice Email: [EMAIL PROTECTED] Office: 866-CYNERGY From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Michael Schmalle Sent: Thursday, November 30, 2006 8:48 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Change alpha properties when setting enabled property Andy, > myComponent.setStyle("alpha", .5); Whay do you use setStyle()? Since alpha is a property, this just seems to use more overhead by calling two methods instead of one. Since all UIComponent implement IUIComponent that extends IFlexDisplayObject that declares alpha, you even have a straight forward interface into the component. IUIComponent(myComponent).alpha = 0.5; Just curoius, Peace, Mike On 11/30/06, Sam Shrefler <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > wrote: Andy: Thank you very much!!! Sam On 11/29/06, Andrew Trice < [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > wrote: Sorry... let me elaborate more. The previous example would be used inside of the component that is being enabled/disabled. To do this outside of a component, you need to do it in actionscript: myComponent.enabled=fase; myComponent.setStyle("alpha", .5); _ Andrew Trice Cynergy Systems, Inc. http://www.cynergysystems.com <http://www.cynergysystems.com> Blog: http://www.cynergysystems.com/blogs/page/andrewtrice <http://www.cynergysystems.com/blogs/page/andrewtrice> Email: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> Office: 866-CYNERGY From: [EMAIL PROTECTED] ups.com [mailto: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> ups.com <http://ups.com> ] On Behalf Of Andrew Trice Sent: Wednesday, November 29, 2006 4:19 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Change alpha properties when setting enabled property override public fuction set enabled(value:Boolean) : void { super.enabled = value; this.setStyle("alpha", ( value ? 1 : .5)); } Enjoy! -Andy _ Andrew Trice Cynergy Systems, Inc. http://www.cynergysystems.com <http://www.cynergysystems.com> Blog: http://www.cynergysystems.com/blogs/page/andrewtrice <http://www.cynergysystems.com/blogs/page/andrewtrice> Email: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> Office: 866-CYNERGY From: [EMAIL PROTECTED] ups.com [mailto:[EMAIL PROTECTED] ups.com <http://ups.com> ] On Behalf Of Sam Shrefler Sent: Wednesday, November 29, 2006 3:52 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Change alpha properties when setting enabled property Could someone tell me how to modify the alpha settings when setting a component to enabled="false"? Thanks! Sam -- Teoti Graphix http://www.teotigraphix.com <http://www.teotigraphix.com> Blog - Flex2Components http://www.flex2components.com <http://www.flex2components.com> You can find more by solving the problem then by 'asking the question'.
Re: [flexcoders] Change alpha properties when setting enabled property
Andy, myComponent.setStyle("alpha", .5); Whay do you use setStyle()? Since alpha is a property, this just seems to use more overhead by calling two methods instead of one. Since all UIComponent implement IUIComponent that extends IFlexDisplayObject that declares alpha, you even have a straight forward interface into the component. IUIComponent(myComponent).alpha = 0.5; Just curoius, Peace, Mike On 11/30/06, Sam Shrefler <[EMAIL PROTECTED]> wrote: Andy: Thank you very much!!! Sam On 11/29/06, Andrew Trice <[EMAIL PROTECTED] > wrote: > >Sorry… let me elaborate more. The previous example would be used > inside of the component that is being enabled/disabled. To do this outside > of a component, you need to do it in actionscript: > > > > myComponent.enabled=fase; > > myComponent.setStyle("alpha", .5); > > > > > > _ > > *Andrew Trice* > > Cynergy Systems, Inc. > > http://www.cynergysystems.com > > > > Blog: http://www.cynergysystems.com/blogs/page/andrewtrice > > Email: [EMAIL PROTECTED] > > Office: 866-CYNERGY > > > -- > > *From:* [EMAIL PROTECTED] ups.com [mailto:[EMAIL PROTECTED] ups.com] > *On Behalf Of *Andrew Trice > *Sent:* Wednesday, November 29, 2006 4:19 PM > *To:* flexcoders@yahoogroups.com > *Subject:* RE: [flexcoders] Change alpha properties when setting enabled > property > > > > override public fuction set enabled(value:Boolean) : void > > { > > super.enabled = value; > > this.setStyle("alpha", ( value ? 1 : .5)); > > } > > > > Enjoy! > > > > -Andy > > _ > > *Andrew Trice* > > Cynergy Systems, Inc. > > http://www.cynergysystems.com > > > > Blog: http://www.cynergysystems.com/blogs/page/andrewtrice > > Email: [EMAIL PROTECTED] > > Office: 866-CYNERGY > > > -- > > *From:* [EMAIL PROTECTED] ups.com [mailto:[EMAIL PROTECTED] > *On Behalf Of *Sam Shrefler > *Sent:* Wednesday, November 29, 2006 3:52 PM > *To:* flexcoders@yahoogroups.com > *Subject:* [flexcoders] Change alpha properties when setting enabled > property > > > > Could someone tell me how to modify the alpha settings when setting a > component to enabled="false"? > > Thanks! > > Sam > > -- Teoti Graphix http://www.teotigraphix.com Blog - Flex2Components http://www.flex2components.com You can find more by solving the problem then by 'asking the question'.
Re: [flexcoders] Change alpha properties when setting enabled property
Andy: Setting the alpha isn't giving me the exact results I was looking Instead, it was disabledOverlayAlpha from Container that I was looking forthanks for Darron Schall for pointing that out Thanks for the help... Sam On 11/30/06, Sam Shrefler <[EMAIL PROTECTED]> wrote: Andy: Thank you very much!!! Sam On 11/29/06, Andrew Trice <[EMAIL PROTECTED] > wrote: > >Sorry… let me elaborate more. The previous example would be used > inside of the component that is being enabled/disabled. To do this outside > of a component, you need to do it in actionscript: > > > > myComponent.enabled=fase; > > myComponent.setStyle("alpha", .5); > > > > > > _ > > *Andrew Trice* > > Cynergy Systems, Inc. > > http://www.cynergysystems.com > > > > Blog: http://www.cynergysystems.com/blogs/page/andrewtrice > > Email: [EMAIL PROTECTED] > > Office: 866-CYNERGY > > > -- > > *From:* [EMAIL PROTECTED] ups.com [mailto:[EMAIL PROTECTED] ups.com] > *On Behalf Of *Andrew Trice > *Sent:* Wednesday, November 29, 2006 4:19 PM > *To:* flexcoders@yahoogroups.com > *Subject:* RE: [flexcoders] Change alpha properties when setting enabled > property > > > > override public fuction set enabled(value:Boolean) : void > > { > > super.enabled = value; > > this.setStyle("alpha", ( value ? 1 : .5)); > > } > > > > Enjoy! > > > > -Andy > > _ > > *Andrew Trice* > > Cynergy Systems, Inc. > > http://www.cynergysystems.com > > > > Blog: http://www.cynergysystems.com/blogs/page/andrewtrice > > Email: [EMAIL PROTECTED] > > Office: 866-CYNERGY > > > ------ > > *From:* [EMAIL PROTECTED] ups.com [mailto:[EMAIL PROTECTED] > *On Behalf Of *Sam Shrefler > *Sent:* Wednesday, November 29, 2006 3:52 PM > *To:* flexcoders@yahoogroups.com > *Subject:* [flexcoders] Change alpha properties when setting enabled > property > > > > Could someone tell me how to modify the alpha settings when setting a > component to enabled="false"? > > Thanks! > > Sam > > >
Re: [flexcoders] Change alpha properties when setting enabled property
Andy: Thank you very much!!! Sam On 11/29/06, Andrew Trice <[EMAIL PROTECTED]> wrote: Sorry… let me elaborate more. The previous example would be used inside of the component that is being enabled/disabled. To do this outside of a component, you need to do it in actionscript: myComponent.enabled=fase; myComponent.setStyle("alpha", .5); _ *Andrew Trice* Cynergy Systems, Inc. http://www.cynergysystems.com Blog: http://www.cynergysystems.com/blogs/page/andrewtrice Email: [EMAIL PROTECTED] Office: 866-CYNERGY -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Andrew Trice *Sent:* Wednesday, November 29, 2006 4:19 PM *To:* flexcoders@yahoogroups.com *Subject:* RE: [flexcoders] Change alpha properties when setting enabled property override public fuction set enabled(value:Boolean) : void { super.enabled = value; this.setStyle("alpha", ( value ? 1 : .5)); } Enjoy! -Andy _ *Andrew Trice* Cynergy Systems, Inc. http://www.cynergysystems.com Blog: http://www.cynergysystems.com/blogs/page/andrewtrice Email: [EMAIL PROTECTED] Office: 866-CYNERGY -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Sam Shrefler *Sent:* Wednesday, November 29, 2006 3:52 PM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] Change alpha properties when setting enabled property Could someone tell me how to modify the alpha settings when setting a component to enabled="false"? Thanks! Sam
RE: [flexcoders] Change alpha properties when setting enabled property
Sorry... let me elaborate more. The previous example would be used inside of the component that is being enabled/disabled. To do this outside of a component, you need to do it in actionscript: myComponent.enabled=fase; myComponent.setStyle("alpha", .5); _ Andrew Trice Cynergy Systems, Inc. http://www.cynergysystems.com Blog: http://www.cynergysystems.com/blogs/page/andrewtrice Email: [EMAIL PROTECTED] Office: 866-CYNERGY From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Andrew Trice Sent: Wednesday, November 29, 2006 4:19 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Change alpha properties when setting enabled property override public fuction set enabled(value:Boolean) : void { super.enabled = value; this.setStyle("alpha", ( value ? 1 : .5)); } Enjoy! -Andy _ Andrew Trice Cynergy Systems, Inc. http://www.cynergysystems.com <http://www.cynergysystems.com> Blog: http://www.cynergysystems.com/blogs/page/andrewtrice <http://www.cynergysystems.com/blogs/page/andrewtrice> Email: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> Office: 866-CYNERGY From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Sam Shrefler Sent: Wednesday, November 29, 2006 3:52 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Change alpha properties when setting enabled property Could someone tell me how to modify the alpha settings when setting a component to enabled="false"? Thanks! Sam
RE: [flexcoders] Change alpha properties when setting enabled property
override public fuction set enabled(value:Boolean) : void { super.enabled = value; this.setStyle("alpha", ( value ? 1 : .5)); } Enjoy! -Andy _ Andrew Trice Cynergy Systems, Inc. http://www.cynergysystems.com Blog: http://www.cynergysystems.com/blogs/page/andrewtrice Email: [EMAIL PROTECTED] Office: 866-CYNERGY From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Sam Shrefler Sent: Wednesday, November 29, 2006 3:52 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Change alpha properties when setting enabled property Could someone tell me how to modify the alpha settings when setting a component to enabled="false"? Thanks! Sam
[flexcoders] Change alpha properties when setting enabled property
Could someone tell me how to modify the alpha settings when setting a component to enabled="false"? Thanks! Sam