Forum Discussion
Using a trigger to start an animation?
I thought I could use a trigger to play an animation, but I'm not seeing it as an option.
I'm trying to have an exit animation play before a layer is hidden when user clicks the "X".
- PhilMayorSuper Hero
As David says, you just don't need the trigger to hide the layer set it in the layer properties, here is an example.
https://www.dropbox.com/s/lctlapho1xiozox/Circular%20Menu.story?dl=0
- DavidSchwartz-fCommunity Member
Phil, that is impressive. Took me a bit to see that you had added a spin to your hover states in the master. Love it!
- PhilMayorSuper Hero
Thanks David, that is an old one. I still like it.
Sent from my iPhone
- JeniJohnson-f06Community Member
Wish I could see your file, but Dropbox is blocked by my organization! :(
- MarcLaBoissireCommunity Member
Hi Phil, how did you do this kind of animation? I would like to understand.
- DavidSchwartz-fCommunity Member
Jeni,
It took me a while to find it the other day. It's in the master, on the layer called Animated. You have to not only edit the states of the icons, but actually click on the object within the hover state to see the animation.
Look at what I sent the other day, because it's done there as well, but in the slides.
- DavidSchwartz-fCommunity Member
One way to do it would be to set a trigger for the layer to pause the timeline at a certain point, like 0.5 seconds (time depending on whether you have any entrance animations on the layer). You'd want to make it as short as possible, to prevent the user from clicking the "X" before the timeline is paused, or simply have the "X" not appear until just before the pause.
Then create two additional triggers: Resume the timeline when the user clicks the "X," and Hide the layer when the layer's timeline ends. Make the timeline short enough that it ends as soon as your exit animation is completed.
- JeniJohnson-f06Community Member
How to I make the "X" spin when it is clicked?
- DavidSchwartz-fCommunity Member
I've attached a quick and dirty example. Rather than the markers, I used icons, and used a spin as an exit animation, also using the triggers I mentioned above.
- PhilMayorSuper Hero
- JeniJohnson-f06Community Member
I can see your file now, but I'm unsure how you made the spinning objects. I don't see them on your timeline, states, or any additional layers.
- JeniJohnson-f06Community Member
Thanks, now I see it.
I do wish there was a way to do animations upon hover. For example, the X would spin upon hover, but then the layer would close upon click.
Maybe in future versions of SL animation will be independent of a timeline.
- PhilMayorSuper Hero
In my file the icons spin on hover
- JeniJohnson-f06Community Member
- DavidSchwartz-fCommunity Member
Turns out that to make the object animate on hover, you need to make a copy of the object within the state after creating the hover state (or at least that's the only way I could make it happen), and then add the enter animation to that copy within the hover state. Phil, it looks like that's how you did it as well.
Jeni, I replaced your icons with images that are not transparent in the middle, as the base icon shone through under the animation. But they do have the hover animation working. Also, had to ungroup the icons from the main group, as otherwise, the hover animation was triggered by hovering anywhere over the group. Lastly, I had to shorten the length of the icons on the timeline, because otherwise the hover state was triggered again after clicking them because the mouse was still there.
- MarcLaBoissireCommunity Member
The one that you send in the dropbox.
- MickPhilipsen-9Community Member
Hi Marc, this seems an older thread (and I happened to land here too), though as you don't seem to have a response, I thought I'd give it a try...
Check out the Slide Master of Phil's file (you can find this under 'View'). There is a layer (called Activated) which you activate when you click on 'Menu'. Within the 'Activated' layer on the Slide Master, the three little white circles (those that turn red and rotate upon hovering) with the rectangles in them (which actually seem to be a character rather than a shape) have two states; normal and hover. The hover state has the Spin entrance animation on the shape.
Hope his helps!
- MaryMicheliniCommunity Member
Mick, nice detective work. Never would have found that. My question is: Why put this in the Master?