Closing an animation

I have my animation playing once I press a 3d model. I then want to close the symbol but with with a delay. So it doesn’t jump from playing to gone.

//pointerdown event handler

parent.on(“pointerdown”, parent_pointerdown);
function parent_pointerdown() {

symbol.controllers.Pill_Animation.elements.PillBreak.play();

symbol.close();

}

// setTimeout(function(){
symbol.close();
},2000);

I’ve tried looking at the docs and can’t seem to find the code I’m missing…I also tried extending the animation timeline so I didn’t have to use code. But this didn’t work.

Z.after(2000, function() {
console.log(“Two seconds have elapsed!”);
});

Is this the correct script? I still can’t get it to do what I need though…

Hi there,

We’ve received your request through support, and have replied there. :slight_smile:

Thanks,
Margaux