You should never need to use getRGB() in
Flex; this is a low-level Flash API. You would use getStyle() and setStyle() on
the Button object, and store the old color in a instance var. <?xml version="1.0"
encoding="utf-8"?> <mx:Application
xmlns:mx="http://www.macromedia.com/2003/mxml" > <mx:Script> var
oldColor; function
b2_click() { if
(oldColor == undefined) { oldColor
= b1.getStyle("color"); b1.setStyle("color",
0xFF0000); } else { b1.setStyle("color",
oldColor); oldColor
= undefined; } } </mx:Script> <mx:Button
id="b1" label="Button"/> <mx:Button
id="b2" label="Click Me" click="b2_click()"/> </mx:Application> - Gordon From:
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of dave buhler On 6/6/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: I am asking because what I want to do is change the color of a button
to a different color but later on reset it to its original color. How do you
first store the value of the original color and how do you call it back later? Yahoo! Groups Links
Yahoo! Groups Links
|
- [flexcoders] How do you store and then retrieve the back... nostra72
- Re: [flexcoders] How do you store and then retrieve... dave buhler
- Re: [flexcoders] How do you store and then retrieve... Manish Jethani
- RE: [flexcoders] How do you store and then retrieve... Gordon Smith
- RE: [flexcoders] How do you store and then retrieve... Abdul Qabiz
- [flexcoders] More interesting than Zorn? Jeff Steiner
- [flexcoders] Need help with protecting FLVs Jeff Steiner
- RE: [flexcoders] Need help with protect... Alistair McLeod
- Re: [flexcoders] Need help with protect... Seth Voltz
- Re: [flexcoders] Need help with protect... Manish Jethani
- Re: [flexcoders] More interesting than Zorn... Jeff Steiner
- [flexcoders] Re: More interesting than ... temporal_illusion
- Re: [flexcoders] More interesting than ... Aldo Bucchi
- Re: [flexcoders] More interesting ... Aldo Bucchi