I have a button that I’m trying to animate. I have two clips, a TurnOff clip which:
- It slides the button to its Off position.
- It replaces its sprite to show the Off sprite.
and a TurnOn clip which does the opposite.
I’m using 4 states to manage this:
- On, which waits (it has no clip associated clip), and once IsOn is false transitions to TurnOff.
- TurnOff, which plays the TurnOff clip, then transitions to Off.
- Off, which waits, and once IsOn is true transitions to TurnOn.
- TurnOn, whicih plays the TurnOn clip, then transitions to On.
This is what the states look like:
The problem is, once TurnOff is complete, the button snaps back to its original position (it also does a little bounce when it gets there) and sprite, rather than retaining the values as they were at the end of the animation, which is what I would like (so that the button remains in the Off position with the Off sprite).
Is this the proper way to do something like this? If so, how can I get the values to stick once the animation is complete?
Thank you.