Just wanted to post some tips as they may come in handy to some one. I am only briefly explaining these as it should not be hard for you to experiment and test the limits of any of these…
First one is a to point out in v4 you can use the
HypeScenePrepareForDisplay event similar to how you would use the HypeSceneLoad event to catch all scene loads. The
HypeScenePrepareForDisplay will catch all scenes PrepareForDisplay.
Next tip, is using css custom variables.
As you see above we have a :root pseudo-class set up which can be used for variable css properties.
We assign the var property as a property of an elements css.
In this case I am doing so in the HypeScenePrepareForDisplay event to get and display the current scene name, incidently I am also using the trick of replacing text content with it.
Important note about the latter. You must double quote around any text you use or it may not show up in hype. i.e
"--main-scenename",'"this is ' + hypeDocument.currentSceneName()+ '"'
tips.hype.zip (31.5 KB)