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.