i am not sure if i am wrong, but i did this and it doesnt work
[xml]
<style
<attributes font="Interface/fonts/some.fnt" backgroundColor="#f00f" />
<effect>
<onClick name="fade" start="#f" end="#0" length="3000">
</effect>
</styles>
[/xml]
Your style/styles tags seem rather messed up…
[xml]
<style>
<attributes font="Interface/fonts/some.fnt" backgroundColor="#f00f" />
<effect>
<onClick name="fade" start="#f" end="#0" length="3000">
</effect>
</style>
[/xml]
sorry about that. just asking if generalizing animation can be done?
I think so but I’m not sure as I don’t use styles a lot (most of my layouts are generated dynamically).
Give it a try… or you could try looking at the standard control styles and see what they do…
In general applying styles like in your example should work of course.
I think in this specific case you’re probably missing visibleToMouse=“true” so the element is ignored in event processing and your onClick effect is ignored.
I’ve done this and it doens’t work; just asked to check… I had put the visibleToMouse set True in the specific screen’s element in xml. I’ll try doing VisibleToMouse in the style perhaps… Thanks much!