Hype Function flickers wallpapers

Im using this code:

So people visiting the site can share specific pages, use the browser navigations buttons and stay in the same scene if they reload the page.

Im also using this code:

That way I can set the background image and video using certain conditions and making the background to stay the same without the scene transitions to interfere: Persistent background dissapearing


The first one is causing the wallpapers to flicker:

If I do remove / comment the whole code, the site works just fine:

To see exactly what I mean, go to “Heuristic” and navigate using the content menu:

If necessary, here you can download the hype file:

try this change (just a guess):

var checkHash = function() {
        var hash = window.location.hash.substring(1);
        for (var i = 0; i < hypeDocument.sceneNames().length; i++) {
            if (hypeDocument.sceneNames()[i] == hash && hypeDocument.currentSceneName() != hash) {

    if (window.loadedHashLocation != true) {
        window.loadedHashLocation = true;
        window.onhashchange = checkHash;

    window.location.hash = "#" + hypeDocument.currentSceneName();

So simple, but it works, you are genius!

I don’t know how users would live without this forum and users like you. I seriously feel bad to ask for so many help with these js scripts but Im thankful there is people willing to help.

1 Like


Hans, along the other two “regulars” who are routinely so generous with their time & JavaScript knowledge - @MarkHunte and @DBear - really transform this Forum in to a place of learning. Reading books & sleuthing through the Internet are valuable resources, but to have this level of JavaScript input~insight to questions that directly concern animating content with Hype is really extraordinary!

Gentlemen - Thank You so much!

I seriously feel bad to ask for so many help

@Davirus It is with questions like yours that we all get to learn - isn’t that part of what this Forum is about? (No one has to answer if they don’t want to.)

1 Like