Quantcast
Channel: Active questions tagged frames - Stack Overflow
Viewing all articles
Browse latest Browse all 55

Lottie interactivity frames action doesnt work

$
0
0

i want to animate an hamburger menu, the problem is that when i click on the dottie files the animation is complete, not respecting the frames i selected in the scriptHTML:

<dotlottie-player id="polp" src="https://lottie.host/c8921211-86fe-4265-b84e-74834ba6831b/gywO1u8Efd.json" background="transparent" speed="1" style="width: 300px; height: 300px;"></dotlottie-player><script src="https://unpkg.com/@dotlottie/player-component@latest/dist/dotlottie-player.mjs" type="module"></script> <script src="https://unpkg.com/@lottiefiles/lottie-interactivity@latest/dist/lottie-interactivity.min.js"></script><script src="script.js"></script>

SCRIPT.JS

const svgm = document.getElementById('polp');svgm.addEventListener('ready',() => {    LottieInteractivity.create({        player: svgm.getLottie(),        mode:"cursor",        actions: [            {                visibility: [0,1],                type: "click",                forceFlag: false,                frames: [0,42],            }        ]        });    });

I want to animate the lottie file correctly, respecting frames i selected


Viewing all articles
Browse latest Browse all 55

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>