Well kindof.
I have subclassed Button in an mxml component.
I have defined a get set property swatchColor in the mxml component(extended Button).
The problem is, how do I define a style for an mxml component, and yes man, I have almost read the WHOLE frekin beta docs ;-)
I didn't really think I needed a style implementation for this because it is actually a property(pre processing) not a style of the mxml component.
ANyway, you set this like;
currentSwatchButton.swatchColor = color (which is the current decimal color of the copied swatch).
Now, the weird thing that happens here is;
- first I know that the button is getting it's new property defined, becasue I have tested it. So this means we know the button has it's swatchColor defined. Now the problem arises when I click on the new swatch and it ONLY SHOWS the new color in the selectedDownSkin, but no other skins are updated UTNIL I call currentState = 'basicState' OR some call like that.
If I don't change state, the WHOLE skin set is not RE RENDERED with the NEW swatch color. Remeber this is actually a toggle button. so I am using selected and normal states of the Button.
Now, the reason I am not making this a style is I need additional preprocessing when the swatch color is set on the Button.
Let's say you find a way to do this right with the swatchColor being a style, well I could easily implement this pre-processing in the styleChanged override, but I wanted to avoid this for procedural sake.
thanks Manish! any thoughts now? :)
Peace, Mike
On 3/1/06, Manish Jethani <[EMAIL PROTECTED]> wrote:
On 3/1/06, Teoti Graphix <[EMAIL PROTECTED]> wrote:
> I have a custom skin class that draws all button skins. I am using a parent.swatchColor to get the color of the swatch but, when changing the color through a setter of the subclassed button component, it is not updating all 8 skins of the button.
So you have subclassed Button and "swatchColor" is your own style?
Try calling super.styleChanged(null) from where you're changing the colour.
Manish
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
Web site design development Computer software development Software design and development Macromedia flex Software development best practice
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
| Web site design development | Computer software development | Software design and development |
| Macromedia flex | Software development best practice |
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

