I’m new to Hype, but already developing my first project with success!
I have 3 elements that call other scenes. I have an animation for each element that scale up filling screen, but I need to have the clicked element over the other two, because it will scale behind. Since I don’t know which element user will click, should it change Z order when clicked?
Can you post a project to show us what you have so far. This will make it easier for us to give you an answer that works for you and does not incur many more questions & answers due to us not understanding how you need things to work.
Give the rects the same class name and then iterate over them to set the zIndex to 0.
And then set the zIndex of the click element to a higher index number.
The elements also have an id each which match the timeline for the resizing for each.
var scalers = document.getElementsByClassName('scalers') //— WE GET AN ARRAY OF THE CLASS OBJETCS
for (i = 0; i < scalers.length; i++) {
hypeDocument.setElementProperty(scalers[i] , 'z-index', 0)
}
hypeDocument.setElementProperty(element, 'z-index', 1000);
hypeDocument.startTimelineNamed( element.id, hypeDocument.kDirectionForward)