David_Tangent
-
Posts
3 -
Joined
-
Last visited
Content Type
Forums
Gallery
Blogs
Events
Store
Downloads
Profiles
Posts posted by David_Tangent
-
-
Hey there everyone
Newbie here looking for some help. We're building a site on 7.1 tand we want a lottie to animate on scroll. At the moment we can't get it to work at all. It doesn't start scrolling, and when 'autoplay' and 'loop' are removed from the code block the lottie disappears. Can anyone help tweak the code?
This is what we have at the moment:
In Code Block container
<lottie-player id="firstLottie"
autoplay
src="https://lottie.host/34ce465b-cd91-4cc8-bc1a-b2ed33f9600f/OFCFTqFgzG.json"
style="width:100%; height: auto;">"></lottie-player>
Code injection in Header:
<script src="https://unpkg.com/@lottiefiles/lottie-player@latest/dist/lottie-player.js"></script>
<script src="https://unpkg.com/@lottiefiles/lottie-interactivity@latest/dist/lottie-interactivity.min.js"></script>
Code injection in footer:
<script>
LottieInteractivity.create({
player: "#firstLottie",
mode:"scroll",
container: "#block-yui_3_17_2_1_1696515827607_2322",
actions: [
{
visibility: [0, 1.0],
type: 'seek',
frames: [0, 150],
},
]
});
</script>
Any help would be very much appreciated!
Help needed with 'on-scroll' lottie files
in Customize with code
Posted
Thanks so much for your advice. I have updated the header script to:
<script src=&"x22;https://unpkg.com/@lottiefiles/lottie-interactivity@latest/dist/lottie-interactivity.min.js&"x22;></script>
Unfortunately the animation is still not working on scroll. I'm not sure if I have not properly followed your advice, or if there is some other error. Are you able to advise on any further steps please?
Many thanks!