0

So I have a lottie animation and it’s exactly the animation that I need, however it only either auto plays or plays on hover or have video control for it.

What I want to do is disguise a button inside the animation and only play the animation once it’s clicked.

I don’t need to worry about a stop button or resetting it because it’s a one time thing. Below are some pics captured of the animation so it will clear up on what I want.

I want the send button to be a button as right now it is only part of a lottie animation I made in after effects.

I have made the lottie animation in Adobe after effects and used bodymovin to export it into a lottie animation.

I feel like there must be a way for JavaScript to be able to stop the animation before it starts and only play after I click a certain button. I can then try to style that button to look the same as the lottie animation and put it on top same position and it only needs to play once, However I’m not good enough at JavaScript to know if it’s either possible or how to do it.

Starting of animation, this auto plays or plays the animation on hover and I want the animation to play on click

QThe animation spins the button and changes it to a coin, it then continues, the coin travels and goes above the chest with the chest opening and the coin drops in and the chest closes.

Harris
  • 31
  • 5

1 Answers1

0

Edit: Finally found a way to do it, by making it so the lottie doesn’t play and putting an invisible button on top and adding some simple js event listeners to make it so that clicking the invis button triggers the animation. So happy I finished it, really needed it done for today.

Harris
  • 31
  • 5