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

Totally understand -- I agree it's not the best-looking URL. At this time, since a Tumult Hype document exists on a single URL, you would need to create folder to hold each separate page. And each page would need to be exported using the name 'index' so that when you visit /privacy the 'index.html' page would be loaded.

1 Like

Gotcha! I'm using Amazon S3, gonna try to discover how to do that! Thanks! :smiley:

Worked like a charm! Thanks Daniel!

1 Like

Hi,

This works great and have been using this for a while, is it also possible to add another parameter to the URL, basically I am try to set a global variable within this script?

i.e. www.mysite.com/#privacy?en
or www.mysite.com/#privacy&en

where ? would be used for another script, this could be anything in reality.

Regards

Thanks Hans,

I think I understand how this works, hash[0] is the value after the #, subsequently hash[1] is the first value after the ?

so for a global variable I have added this as:
window.lang = hash[1];

Okay, How do I do this for right click?

Can we keep this in one thread @UXDJB?

1 Like

Hi this is my first post, i have a problem linking to timeline from outside of a Tumult Hype document, somebody could help me, how do it. Thanks!

1 Like

it’s well documented here :):
http://tumult.com/hype/documentation/3.0/#invoking-api-from-outside-oftumult-hype

3 Likes

Hi, Hans. Thanks so much!

thanks so much Hans

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

Hello @Daniel,

I tried to understand if what you shared in this post could be useful for what I need to do, but I haven't solved it yet.

I have two Hype documents:

  • "parent" document, which has a general menu on page 2.

  • "child" document, which has its own sub-menu.

In the sub-menu of the "child" document there is a "return" button that must return to page 2 of the "parent" document, where the general menu is.

Can I achieve this by assigning a function to the "return" button of the "child" document?

I don't know how to write it, could you help me?

Thank you in advance for your attention and help!

in fact your setup can be everything along with the description. A livelink and/or hypedocuments (<- reduced to show the issue nothing more) can help a lot here.

Anyway: I'd think this is your way to go https://github.com/worldoptimizer/HypeGlobalBehavior
it's a nonscripting-solution provided by @MaxZieb, but you've got to get your head around :slight_smile:

Hello @h_classen,

Thank you for the suggestion.

What do you mean?

In fact, I seemed to understand that @MaxZieb's example explains how to create a network for widgets on the same page, and therefore in the same document.

I therefore do not know how to apply these indications to my case :confused: