Jump scroll a pano image right or left via buttons

(Tom) #1

I am having a problem scrolling an image, that is wider than the stage, set distances right and left using buttons below the image. I can easily add pause timeline events at each stop and have the timeline move one distance at a time. My problem is skipping buttons and having the timeline scroll past pauses. I can jump to time in timeline but that is instant. I want the viewer to see the timeline scroll to what ever position is associated with the button they clicked.

I assume this will be a js solution but I am stumped. Thanks Tom

(Mark Hunte) #2

The JS solution would be to use the API to set the left property

( http://tumult.com/hype/documentation/3.0/#setElementProperty )

of the element and set the duration time so you get a smooth slide.

Not at a comp. at the mo so cannot show you.

But there are plenty of examples on site and there is a tutorial that shows the idea also

(Mark Hunte) #3

Here is a quick example.

cssButtonFadeANN_slide_property.hype.zip (24.3 KB)

It includes a button selection that I exampled here.

Note in this example for the initial button selected I add Button_clicked class to its class list in the Identity pane.

(Tom) #4

Brilliant!! Thanks so much!!

(Rick) #5

Very useful, my thanks too!