Timeline event listener

Hi,

Im looking for a javascript action that will listen for a specific time in a timeline as the playhead plays forward or backwards, to fire and jump scene as soon as the specific duration is reached.

I would put this as an action on the timeline but i need it to be triggered and only active when a button is pressed.

the result is that the play head can play backwards and forwards with no effect an infinite number of times, until a button is pressed (1.00 is the jump frame) when the play head reaches 1.00 the scene jumps to the next scene. The code will then be used for multiple buttons at multiple jump frames/durations.

Any help regards the event listener would be great.

Have you tried custom behaviors?

@jstew

In this demo You do not need an “event listener”…
TimelineTrigger_JHSv1.hype.zip (25.5 KB)

Overview:
A blue rectangle runs back & forth continuously (2 sec timeline); upon the clicking of the button “Go to Scene 2”: as soon as the playhead hits the 1 second mark (running from either direction) the transition occurs to Scene 2. The 1 second mark features a JavaScript trigger that checks for the btnCliked variable = “true”. This variable is set to “true” by the clicking of the button “Go to Scene 2”.

Season this demo to taste. The details are not as important as the concept.

1 Like

Hi @JimScott

This is just what I was looking for, it does the job perfectly!

Thank you so much.

1 Like