+2
To nie jest błąd

Tapping through a transparent layer

Ranco 11 lat temu Ostatnio zmodyfikowane przez Ezra Weinstein (Administrator) 11 lat temu 5

I want to be able to click the visible part of an element that is behind another semi-transparent element. 

For example in this screenshot, the girl is behind a wave. I can only click on the very top of her exposed head, whereas I expect to be able to click her entire visible body:

Image 30

I know is is per-pixel tap test, but still...

If there's a way around that - please advise

Thanks,

Ranco

Odpowiedź

Odpowiedź
To nie jest błąd

The best way to handle this is to add a transparent element in front of the image of the girl and add your action set to that element. This is not a bug because transparent elements can have action sets and the transparent part of an element needs to be clickable.

Odpowiedź
To nie jest błąd

The best way to handle this is to add a transparent element in front of the image of the girl and add your action set to that element. This is not a bug because transparent elements can have action sets and the transparent part of an element needs to be clickable.

By "Transparent" you mean alpha-only image, or a hidden element?

Why do you need to allow is a transparent element action sets at all?

Maybe there should be an "allows actions" parameter to an element...

a transparent element is for example a png that doesn't have any colors on it, not even the white background.

You can import a png in builder and set the Opacity to 0% and there you have a transparent element.

I would assume, that you would need to click "through" transparent pixels more often, than you would need to have an actionset on a transparent pixel?

I think it would be nice to be able to do both, so perhaps a global setting for whether you need to be able to click transparent pixels or not, and then being able to change it on specific objects? That way, we could have a click-through set for the entire app, and have 3 images with clickable transparent pixels. 

It would be very useful in many ways. You could make all images 1024*768 px in a stack of layers in Photoshop, and then have all objects place excactly where you want them from the start, when you import them to the stage. 
There is a feature in the element properties where you can set it's opacity, if this is what you suggested:
No, I'm talking about the same thing Ranco is talking about. If there's transparent pixels in a png image, these "covers" the image below, so you can't select it directly, even though it's in plain sight. 

If it's visible, I want to be able to select it, if that's more clear :)