Fade out on hover state but not at the end of the timeline

Apr 17, 2023

Hello,

I have a banner that I want to disappear when the mouse hovers on the object below it, and reappear on mouseout.

I set up the entry and exit animation and it works nicely, except that the banner disappears on the end of the timeline. 

Is there a way to do this without pausing the timeline ? I have a next button that activates at the end of the timeline so I cannot indefinitely pause it.

Thanks

2 Replies
Joel O.

Found it but it's kinda hackish :)

You have to create a mousein and a mouseout state, in the mouseout state you delete the original object and paste the same object with entry and exit animations, and on the mousein state you just delete the object. 

Then you add a trigger that shows the mouseout state when the timeline starts. As a second trigger you switch the state for mousein when the mouse hovers on the triggering object, and keep "restore previous state when the mouse exits".

What it does is emulate the hidden/normal states but because the object that has the entry and exit animations is another one that is brought by a state, its exit animation isn't triggered when the timeline ends.

This hack works as long as SL keeps the possibility to add animations on objects that are added in the states.