About timeline and if statement

How can I push my animation to specific time in the timeline with if statement,

if ( _CONDITION_){
hypeDocument.goToTimeInTimelineNamed(0, 'timelineName')

But you should read the documentaion and look at basic Javascript tutorials

Thanks Mark, but maybe I wasn’t clear enough in my question, I want the animation to start and pause on this specific time, not Jumb


The following solution uses “setInterval”.

Timeline check using setInterval.hype.zip (15.4 KB)

The function “checkTime” is activated when the grey square is clicked (and the animation begins). Currently this function is set to check the time every 100 milliseconds, if the time is greater than 2 seconds the “Main Timeline” is paused.