Linking to a specific scene from inside and outside of a Tumult Hype document

Hi. I feel a bit stupid, but I don’t se any On Scene Load in my Scene Inspector?
(Only On Layout Load, but that is autre chose, n’est pas?)
I need to let some, but not all, visitors come directly to a specific scene (out of six scenes) from an external link in an ad.
Even more stupid, I don’t know much JavaScript…
(Hype 4 Pro)
Someone? Thanks!
Anders

If you have more than one layout (a new document only has a single scene, which in a way is just a single layout), then you would see ‘On Layout Load’ instead of ‘On Scene Load’.

You can download the ‘sceneurls.hype’ document linked in the first post to see how this works in a simple example. This runs JavaScript when the scene loads and supports the #sceneURL method. For your document, you would just need to have the JavaScript code from that document initiate ‘On Layout Load’ for your layouts where you want to support this method.

Thanks! I will try that. Mañana :slight_smile: It is late in Sweden.
Many thanks! Anders

1 Like

It worked! Don’t really know how but it did.
I found that the script must be on the default scene to work, this is important.
I don’t know if it also must be on the pages I wanted to find, but that is where I first put it.
What really made it work was to put it on the default scene.
Thanks a million!

(This was for a client who wanted visitors from abroad to see the scene direct:
https://advokatbostedt.se/#Engelska )

1 Like