Skip to content
Max Ziebell edited this page Jul 11, 2020 · 2 revisions

Running actions on paused timelines

hypeDocument.goToTimeInTimelineNamedAndTriggerAction = function(timeInSeconds, timelineName){
	var seconds = Math.floor(timeInSeconds);
	var frames = Math.round(((timeInSeconds - seconds) * 30)) / 30;
    var direction = this.currentDirectionForTimelineNamed(timelineName);
	var playing = this.isPlayingTimelineNamed(timelineName);
	if (!playing) this.continueTimelineNamed(timelineName, direction , true);
	this.goToTimeInTimelineNamed(seconds + frames, timelineName);
	if (!playing) this.pauseTimelineNamed(timelineName);
}

Further

Clone this wiki locally