'Can I Loop json animation within index.html?
I'm currently working on creating HTML5 banners through Adobe After Effects and the plugin Bodymovin. I'm trying to create 3x30s animation for GoogleAds - When exporting, the animation loops infinitely - I was wondering whether there is an option to set the code to execute the loop only 3 times?
Here's the code:
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="id=edge">
<meta name="ad.size" content="width=300,height=600">
<script type="text/javascript">var clickTag = "";</script>
<style type="text/css">
#background_exit_dc {position: absolute; width: 100%; height: 100%; top: 0px; left: 0px; cursor: pointer; opacity: 0; z-index: 400;}
:focus {outline:none;}
::-moz-focus-inner {border:0;}
</style>
</head>
<body>
<div id="container_dc">
<div id="content_dc"></div>
<div id="myborder"></div>
<button id="background_exit_dc" onclick="window.open(window.clickTag)"></button>
</div>
<body>
<script src="player.js"></script>
<lottie-player src="data2.json" background="transparent" speed="1" style="width: 300px; height: 600px;" loop autoplay></lottie-player>
</body>
</html>
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
