button rollover animation

hi all there,

do you have an idea how to animate e.g. images or textcolors between the states of a button?
lets say the button is in the ready-state. if you now rollover with your mouse, the buttontext (or image or alpha-value of rolloverimage) changes smoothly in maybe 1 second to the rollover-state.

or isn’t that possible with buttons?

greets

You’ll probably have to write your own button class to do this. The DirectButton implementation can only do a pop from one button state to the next, since it implements changing state by hiding one node and showing another.

David

Isn’t there a way you could get that node, and manually fade it using an interval that sets the alpha scale?

Sure. And by the time you’ve done that, you’ve basically written your own Button class. There’s not a whole lot of code inside DirectButton; the only thing it does different from DirectLabel is automatically hide and show the different states on rollover and click and whatnot.

You can certainly write your own code to do it differently, for instance by using an interval to fade in the nodes over a period of time. But then there’s not much point in keeping DirectButton, is there?

David

ok thanks for your answer.
i am new into panda, so could you please give me advice how to do that ?
maybe point out the steps or so…

greets