I want to add object B on top of object A, so that when you click on A anywhere, even on the area of B that overlaps A, object A gets the click event. Is the correct way of doing this adding a function on On Scene Load that does:
Yes – that’s the correct way. Make sure you also set Pointer Events to ‘none’ for the top Hype element in the Metrics Inspector. Here’s more info, compatibility data, and a demo:
Thanks, those are some really informative links and you even wrote a quick example! Many thanks!
Just to clarify, when you say “Make sure you also set Pointer Events to ‘none’ for the top Hype element in the Metrics Inspector”, what do you mean exactly? When you say metrics inspector, I understand this thing, which does not seem to have any option for Pointer Events?
I would like to activate the links on images that are in a timeline. when I run the page in the browser, it remains the only active link that is in the top level. what i do?
Hi Mark, in the meantime i workarounds my problem
my test:
when i set in timeline my image opacity 100 > 0 to visualize another image, i set her dimension 100 > 0. in this case, the link of image, work fine.
if i don’t change dimensions of my image in top level but only set to 0 her opacity, the active link remain all time that’s in top image.
i think this is the solution
Thank you
Elements at the top of the layer order will always intercept mouse and touch actions. To enable clicking beneath the element, you could either change ‘pointer events’ to none, or use JavaScript. Please see this page for a demo: “Make an element Click Through”