Hello, I’m working on a project in Captivate 2017 and have a slide where I’d like an object to animate in, I am animating it in the javascript window (the on enter action of the slide) and I have it written like:
var keyframes = [
{
transform:’scale0.4)’
},
{
transform:’scale1)’
}
];
var options =
{
delay: 1000,
endDelay: 0,
duration: 500,
easing: ‘ease-out’,
}
I’d like it to animate on it’s own (not based on user interaction), but not until after a second or so. With the delay in the options variable that works, however I’d like the object to not be visible until the animation starts. I tried writing something like:
cp.hide(‘bar’);
function playAnim(f,g,e){
cp.enable(f);
g();
pAnim = e.animate(keyframes, options);
pAnim.play();
}
function unhideBar(){
cp.show(‘bar’);
}
setTimeout(playAnim(‘bar’,unhideBar,barc), 1000);
but the setTimeout method does not seem to be working? (I’ve never used setTimeout before so I’m not sure if I’m using it correctly).
I also previously tried writing it as window.setTimeout …. but that didn’t work either.
Any advice is much appreciated, thanks!