If no movement go to some frame... setInterval?

Hello,

I have an animation that the user must interact with and if the user doesn’t interact with this then the animation will go to some frame.

Do I achieve this by using setInterval?

I bit lost… please advice… thank you. :book: