Wed 10 Oct 2007
Nahuel Foronda just posted a cool example of a button skin that uses states in order to create a color animation on mouse over. The skin is written almost entirely in pure MXML, with a little bit of AS just to attach the filters to the button label. This really shows the power of using declarative states to implement a skin instead of having to write a bunch of procedural code, and as Nahuel points out, when we add graphics tags to the framework it will become even more powerful.
One modification that might be interesting would be to see if he could use an MXML transition to create the color animation instead of using Darron Schall’s AnimateColor component. I bet that would work, but haven’t tried it myself yet.
digg this |
del.icio.us | 4 Comments
Thanks for your comments. I updated the example and added transitions, but I’m still using the AnimateColor component. Maybe you can include something to animate colors in the framework (My apologies if there is something like that already and I didn’t find it)
@Nahuel: ah, you’re right. I was thinking you could just use the AnimateProperty effect, but that probably doesn’t work for styles, hence the need for something like AnimateColor.
Oops, it does work for styles, but doesn’t work for hex colors.
[…] http://www.rictus.com/muchado/2007/10/10/stateful-skins-using-mxml/ […]