I just finished doing html5 animation with Animatron and downloaded my material (project html)..Cos my animation goes to responsive site i have to change my code so it works responsive way.
Problem is that i have not worked with Js code before and how to change it.
This is the code Animatron gave me where those width and height are. How i change this to work responsive way :
<script type="text/javascript">
var width = 1472;
var height = 485;
var playerParams = {
width: width,
height: height,
autoPlay: false,
repeat: false,
controlsEnabled: true
};
var WRAPPER_ID = 'target';
var wrapper = document.getElementById(WRAPPER_ID);
document.body.className = 'no-iframe';
wrapper.className = 'no-iframe';
wrapper.style.width = width + 'px';
wrapper.style.height = height + 'px';
wrapper.style.marginLeft = -Math.floor(width / 2) + 'px';
wrapper.style.marginTop = -Math.floor(height / 2) + 'px';
.
.
.
// Mika