Action OnTap and script together only clicking the whole screen, not individual buttons


#1

Hello. This was working the other day and I’m not sure what I’ve changed or if there’s been an update.

Imagine Menu 1 with four buttons - Button 1, Button 2, Button 3, Button 4 - that take you to four other menus.
When I press Button 1, it should take me to Menu 2 > When I press Button 2 it should take me to Menu 3, etc.

  • On Button 1, I have an OnTap Action which closes Menu 1 using a Controller to change the State from Seen Menu1 to Unseen Menu1; and a script on the same button that then opens Menu 2 (and other actions) using symbol.controllers.Menu_group_02.elements.Seen.activate();

Instead what I’m getting now is that OnTap is registered to the whole screen, not the individual buttons, so I just go to the same Menu time and time again, and not the expected one (in this case it opens Menu 4 and I want Menu 2, but it’s always Menu 4 that opens): what have I done wrong? This was definitely working the other day.

I added a script instead of multiple OnTap actions in case the buttons were getting confused, and because I needed more functionality than the options provided there. If the actions can handle more than one thing, then do let me know, but I was also having issues there.

Any ideas? Thanks in advance!


#2

Don’t forget you have to change the Enabled as well. You can have hidden buttons that will still work.

Steve


#3

Hey @stevesanerd and thanks for your quick reply!

I checked Enabled and this time it wasn’t this issue, but it’s always good to remember!

The actual issue was that I was using png image files of menus and buttons which also had alpha channels and the whole image files were the size of a phone screen. This meant they looked like buttons and menus but actually Zappar saw them as screen-sized image files, and whichever one that was at the bottom of the hierarchy took priority and performed only those actions attached to them.

We solved this issue by exporting the buttons and menus as files at the correct size pixel size without an alpha.


#4

Glad to hear you got it!

Steve