Interpreting Scenes as Bookmarks in HTML5 exports...is it possible?

Sorry in advance for the long intro!

I started writing HTML by hand back in 1994/95 when Mozilla released their first version of Netscape Navigator.

What has always irked me is that HTML frames disappeared from web-development for various and obvious reasons. Frames rocked, me thinks, because it made creating “responsive” websites quite easy since they were so simple to resize along with resizing the browser window.

One of the main reasons they disappeared, though, is that it was quite difficult to bookmark sections of a website built with frames. My little boutique web-design agency in the 90’s did get around it by a clever programmer friend of mine adding Javascript code to “fake” bookmarks, but it’s not something I ever fully understood or could code myself.

end of rant

Since Hype 4 allows for Scenes, which I am currently using like the different menu-sections of a website, might there be some way to use the scenes as bookmarks to the first page of a section/scene when a user bookmarks a place within a scene (I would be fine with the bookmark pointing to the first frame within that scene).

Is it possible, without programming?

Or am I approaching it incorrectly and there is already another way of structuring a Hype project to allow for something similar?

While I noticed that “Advanced Export” allows for separate export of all scene with their own respective html file, I am trying to avoid the flash that would happen if each scene was to be loaded individually.

I am no programmer, but to those of you who are , is there some clever way of pre-cashing all scenes and switching to them in such a way that no flash/page-reload is perceived? If there is, any links to webpages explaining such a method?

One technique is to use the #anchor tags which can be interpreted to go to a specific scene, and change when the scene changes for bookmarking. The code to do this is shown in this post:

This is probably the best way given your requirements. Because it still is on the same page, image preloading and such will work to reduce flashing (although depending on your content, a browser may still need to do a lot of work to render the scene).

Does that solve it for you?

P.S. this technique was recently used in this post, using a single scene but to allow individual within to be bookmarked.

Thank you, jonathan.

Interesting…I’ll have to look into that and see whether I can get that to work. Sounds like it could.

As I mentioned, I am not a programmer, so I lack basic knowledge of proper syntax.

With that said, the instructions say to paste the following code into the New Function window, but I am wondering at which exact point it needs to go.

The New Function window already contains some code on lines 3 to 6, where lines 4 and 5 are empty…it appears that the new code snippet can only be pasted into lines 4 and 5…is that where it goes?

Or is it supposed to replace the “function untitledFunction…” code?

Boom!

I figured it out after looking at the example document. It’s a separate function altogether. And I only have to save it once, and can then reference it in all the other scenes through the drop-down menu…this is way easier than I feared. Brilliant!

Thanks again for your help with that :slight_smile:

1 Like

Great - glad you got it working!