Unable to keep state change
Jul 22, 2016
I have a button that shows a question, then depending on the answer, changes the state of the button to a different color. If the timer runs out, the state displays a yellow edge. However, when I return to the main gameboard, if I hover over the button again, the state disappears. I thought I could protect it by putting a 'cover' on top of the button once it's been selected, but I could also not get that to work. Does anyone have any suggestions how I can keep the state of the button once the associated question has been answered?
9 Replies
Hover is a built-in state, and as such takes precedence over other states. If you are serious about a hover before, and not after, you need to create your own state for the first hover (don't name it hover) and write triggers so it will show the hover state when appropriate.
I am not using the built-in hover state - the hover state in my file is called 'glow'. The variable is triggered when the mouse is hovered over and the state of the button is 'normal'. I have a 'timeout' state that is triggered when the time runs out (turns the edge of the button yellow). It is this state that goes back to normal if I happen to hover over the button again upon revisiting the gameboard. Since the buttons can be selected in any order, I'd like to prevent the user from clicking on a button that has already been selected.
Hi Carole
you had the trigger set to when timeline starts on 'the button' instead of 'the slide' - see if attached works how you want
Hi Wendy,
The problem is still there. When the timer runs out, the button turns yellow - but if the trainer accidentally hovers over the already turned yellow button, the yellow disappears. This is what I'm trying to prevent.
Hey Carole. I see what you're saying. I'm doing a little testing on your file myself to figure out what's going on... I'll let you know what I figure out.
Hi Carole
see attached. I duplicated your glow state and renamed it hover and removed the associated 'hover' trigger.
I was racking my brains trying to figure that one out! Wendy to the rescue! Brilliant.
Dear Wendy - thank you soooo much. I really appreciate the help. It works perfectly now.
Glad to help Carole and good luck with your project!
This discussion is closed. You can start a new discussion or contact Articulate Support.