About timeline and if statement


(haytham) #1

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


(Mark Hunte) #2
if ( _CONDITION_){
hypeDocument.goToTimeInTimelineNamed(0, 'timelineName')
}

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


(haytham) #3

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


#4

@haythamfarid

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.