I'm having some issues with actions

Hi all, I’m VERY new to this and have run into a problem I just can’t fathom.

OK, I’ve got a scene where three ‘icons’ launch pop up’s (these have their own close button).

For a reason I don’t understand you can’t add actions to icons, so I’m launching the controller variables via a script, nothing special, just show/hide.

The ‘window launch’ looks like this:

   symbol.nodes.Icon_20.on("custom:pointerdown", () => {
symbol.controllers.info_box_20_years_visibility.elements.visible.activate();
symbol.controllers.close_but_20_years_visibility.elements.visible.activate();

});

Works fine.

So my pop up and it’s close button are now on ascene.

I’ve used an action on the close button that ‘removes itself’ and the pop-up… Also works fine.

The issue arises when I try to apply the same methodology to the other two icons… I get as far as opening the other windows and their associated close buttons, but after adding actions to those close buttons, nothing happens on ‘tap’… The original button (that worked in the first place) still works, but nothing else.

I hope I’ve been clear there.

The code for launching all of the windows is just ‘the above’ but X3, it looks like this:

symbol.nodes.Icon_20.on("custom:pointerdown", () => {

symbol.controllers.info_box_20_years_visibility.elements.visible.activate();

symbol.controllers.close_but_20_years_visibility.elements.visible.activate();

});

symbol.nodes.Icon_21.on("custom:pointerdown", () => {

symbol.controllers.info_box_25_years_visibility.elements.visible.activate();

symbol.controllers.close_but_25_years_visibility.elements.visible.activate();

});

symbol.nodes.Icon_22.on("custom:pointerdown", () => {

symbol.controllers.info_box_30_years_visibility.elements.visible.activate();

symbol.controllers.close_but_30_years_visibility.elements.visible.activate();

});

I’m probably doing something stupid… Of course I am! I’m just too stupid to know what it is.

My first thought would be maybe something is still enabled?

Reguardless of the active state, the pointerdown will re-activate whatever state it’s supposed to upon every tap. You’d have to make sure your “open button” is disabled when the “opened” state is active (i.e. when the close button becomes a tappable option). That way, you don’t accidentally override the close button upon tap. Without seeing visually how the buttons are laid out, it’s hard to tell if that’s what’s going on.

It might be helpful to pop the .zpp (or a paired down version) on this thread if you’re still having issues