Jump to a specific point within a scene

I’m trying to put an action on a button that brings to a specific point/object inside the same scene and I don’t know how to do this.
Could someone help me? Thanks.

There’s two basic ways to do this. The first would be to have a Hype Element like a Rectangle (and not a HTML Widget) where you use Edit > Edit Element’s Inner HTML to create an anchor tag like:

<a name="myspot"></a>

And then use an action with Go To URL set for:

#myspot

The second method would be if it is a fixed position in pixels; you can use the Run JavaScript command with code like:

window.scrollTo(0, 220);

where 220 is the y position. There’s more info on the MDN page.

There are more elaborate ways to do this, say if you wanted smooth scrolling. I think there are solutions on the forums probably if you search “smooth scroll”.

Thank you Jonathan. I’ll try this and let you know if I’d understood (I don’t know even a letter about programming :blush:)

It worked nicely! Now I’ll try by a smooth movement.
Thank you very much!

1 Like

Thanks Hans. I’ll check this. Very nice examples … :slightly_smiling_face: :+1:

Yeeees Hans! Cool!
It’s exactly what I was looking for.
Thank you very much!

Great, glad you got it!