Show/hide layers on select/deselect textboxes
Here's hoping someone can understand my dilemma! I'm trying to set up an activity where a user can click on text items to reveal a speech bubble on another layer. The idea is that this layer will become hidden again if they click on the bubble, if they click on "white space" or if they click again on the trigger textbox. I have managed to get this working on one textbox/speech bubble pair by using the following:
- Show the speech bubble layer when the state of the textbox is Selected
- Hide the speech bubble layer when the user clicks outside the speech bubble
- Hide the speech bubble layer when the user clicks on the speech bubble
- Change state of textbox back to Normal when you click outside the textbox
Unfortunately, if I add these exact same triggers to the other textbox/bubble pairs on the slide, the textbox select/deselect doesn't work. i.e. The bubble layer will disappear and the text returns to Normal state if I click on the bubble or on white space, but if I click the textbox again to toggle it off, it stays selected and the bubble layer stays visible. Funnily enough the initial pair continues to work.
Has anyone got any idea of what's going on? Or suggestions for a better way of achieving this?