Add Bookmark to a page

Hype documents have the same URL for each scene by default. From what you're describing, first it sounds like you want to have each scene have a different URL. This can be accomplished via the steps in this post:

(see the first "Linking to a Scene using an URL" section)

Then secondarily, you would want some sort of button that guides the user into adding a browser bookmark. As far as I can tell there's not a good cross-browser way to do this (especially for Safari/Chrome), but the top Stack Overflow post shows that you could add this code to an On Mouse Click handler set to Run JavaScript:

    if (window.sidebar && window.sidebar.addPanel) { // Mozilla Firefox Bookmark
      window.sidebar.addPanel(document.title, window.location.href, '');
    } else if (window.external && ('AddFavorite' in window.external)) { // IE Favorite
      window.external.AddFavorite(location.href, document.title);
    } else { // webkit - safari/chrome
      alert('Press ' + (navigator.userAgent.toLowerCase().indexOf('mac') != -1 ? 'Command/Cmd' : 'CTRL') + ' + D to bookmark this page.');
    }

(I haven't tried this code myself)

P.S. in looking at your document, you will need to change the jump to scene actions on the first scene to go to the appropriate scene; right now they just are set to "First scene"

1 Like