Check if timeline is playing

HI.

I feel a little stupid here, but I need to check if a timeline is playing with javascript and then do something.

So this is what I tried and I’m doing something wrong, or my use-case is irrational:

if hypeDocument.isPlayingTimelineNamed('box') {
		
	hypeDocument.showNextScene(hypeDocument.kSceneTransitionCrossfade, 1.1);	};

The project:IsItPlayingOrNot.zip (22.0 KB)

Any ideas?

Thanks

Code should look more like this:

    if (hypeDocument.isPlayingTimelineNamed('box') == true) {
			
		console.log ('timeline is playing');
		hypeDocument.showNextScene(hypeDocument.kSceneTransitionCrossfade, 1.1);
		
		}

Regards, Kalle

IsItPlayingOrNot.zip (23.1 KB)

1 Like

Thank you @ktewes. This is a life-changer for me. Life has just become a little simpler.

1 Like