Navigate Back along the timeline


(John Cook) #1

A scene with 5 bullet points on.

It’s easy to have a button to continue the timeline to reela the next bullet point and then have a Pause Action so the presentation stops automatically at the next bullet point but is there a way to go back to the last Pause Scene Action (the last bullet point) or if there isn’t one of those, to go back to the last slide?

Thanks

John


(Andrew) #2

With this, I have added some script each time the bullet point is pressed:

then = now;
now = element.id;

if(now < then) {	
	hypeDocument.continueTimelineNamed('timelineName', hypeDocument.kDirectionReverse);
} else {	
	hypeDocument.continueTimelineNamed('timelineName', hypeDocument.kDirectionForward);
}

Each bullet point ID is a number, but you can change that to anything and split the element ID if needs be :smile:

On sceneLoad, I added the global var now = 0; and then = 0;

So it checks what was last pressed ,and then either moves forward or backward :smile:

timelineBackForth.hype.zip (15.5 KB)


(Mark Hunte) #3

You can do it all in Native hype.

With the pause actions on the timeline this example has two buttons. Up Down.

The down button has the normal continue timeline action. The Up button has the continue timeline action but with play in reverse check box ticked.

Pause TimeLine Play In Reverse.hype.zip (36.6 KB)


(John Cook) #4

Thanks both…
I didn’t know about the Reverse Check Box option.