Finally, you need to add the animations to the text elements. The "Hide" element needs to be hidden by default and show when the button is activated. The "Show" element needs to be shown by default and hidden when the button is activated. And once again, the trigger needs to be a click on the entire SwitchGroup.
The Show element
Select the Show element in the dialog, open the panel and select Add Animation: We want the Show text to move down with the switch button and to hide itself as it moves.
Click on SwitchGroup
Show text element
Position and Hide
Then configure the element to move the same amount and speed as the button. The animation should also have the same duration.
The Hide element
The Hide element is then configured as the reverse of the Show element, using Show instead of Hide:
Click on SwitchGroup
Hide text element
Position and Show
Selecting the animation automatically hides the element by default. The duration and distance are exactly the same.
Tip: You might think you need a negative number for the position but you don't, because "closing" the switch is actually a reversal of the opening animation and so using a negative number would give you the opposite of what you need.
|