How to exchange the layer

(Mike) #1

there is a problem,when a layer covering a button below it .(the layer is always there,In addition to remove it) how can i click the button.

(Greg) #2

Are you saying that you have an element that is covering a button and therefore you can not click the button? If so, you could use a timeline to move the button on a ‘mouse over’ action. Then you could click the button and move the element back on a ‘mouse out’ action.

Here’s a sample… (10.9 KB)

Could you upload a picture or your Hype file here?


In the next update of Hype, we’ll allow you to disable pointer events for elements so that you can click on elements underneath other elements. For now, you best bet is to set an element ID on an element (using the Element ID field in the identity inspector) and then set its CSS:

$("#foreground").css("pointer-events", "none");

That would set the element ID ‘foreground’ as unclickable, and should be run ‘on scene load’ as a JavaScript function.

(Mike) #4

when ,I can’t wait! @Daniel