You can use the layer and position your element twice on the timeline and use the display property to hide one and show the other.
You could also create a function in Hype on scene init:
hypeDocument.setDepthOnElement = function(depth, selector) {
var sceneElm = document.querySelector('#'+this.documentId()+' > .HYPE_scene[style*="block"]');
var elm = sceneElm.querySelector(selector);
this.setElementProperty(elm, 'z-index', depth);
}
Now use this in your head:
From here on out you should be able to use timeline commands triggering a custom behavior that looks something like this:
setDepthOnElement | 1 , ".myRedSquare"
Code is untested as I am on the road and only have access to my iPhone. Should work.