Link to the top of the page


(Khalil Younes) #1

Hello

I have a project that has 5 scenes, the scene size is 1000X2800, the first scene is a table of content, and it has buttons scattered vertically through out. The problem I am having is that when I link a button in the middle of the first scene to another scene, when the button is clicked, the new scene loads up but it is automatically scrolled down to the same position of the button on the first scene. Meaning that when a new scene gets loaded it doesn’t load at the top of the page.

So if the button place at 1000px down on the first scene, the next scene loads at 1000px down as if the button on the first scene is linking to an anchor point.

Not sure if it makes sense

Thanks for the help!


(Jonathan Deutsch) #2

The easiest solution is to run javascript on scene load that scrolls to the top of the page:

window.scrollTo(0,0);

(Khalil Younes) #3

Thanks Jonathan that worked fine!