How to target a Symbol in another Scene using Hype API

I have a date sensitive banner I am working on. I need to hide symbols based on dates. I got this working using the API when the symbols were in the first scene. However, since the symbols have been moved to a second scene, the symbols are no longer hidden and are appearing as ‘undefined’ in the console window.

The code I’ve used to hide a symbol is:

window.parent.myhypedocument.getElementById(‘symbol-id’).style.display = ‘none’;

Is there a way of targeting this symbol from a different scene when the Hype document firsts loads?

Any help is appreciated.


Can you post a project file.

You’ll need to run that on scene load in the scene where the symbol is present.

When the symbol appears it will follow the ‘display’ rules set in the Hype interface, so even if you run a ‘hide’ function like the above on the first scene, it won’t have effect.