Hover & Selected states

I've been trying to help on of my coworkers with a problem and I think it may take the power of the forum. In a quiz situation, they would like the learner to hover over an option button. When they hover over a specific button, a part of an image will change it's state. If they don't select/click the button, the image reverts back to it's normal state. That part has been easy. Now if they click on the button, they want the image to stay in the same state as the hover state. Not so easy. No matter what we do, that pesky revert selection check box causes the image to revert back to the normal state. I have a simplified sample of how we have been trying to do it. I'm hoping someone has a simple work around. My coworker is planning on 9 buttons.

4 Replies
Preston Ruddell

I've attached a solution.  Here's what I did:

  • I removed the "restore on mouse leave" from the hover trigger on the button.
  • I added a rectangle that covered the entire slide (but it's located under the button).  Moving the mouse over this rectangle will restore the picture back to it's normal state only under the condition that the "selected" variable is false.  If you've clicked the button and the value is true, then the state of the picture will remain chosen.

Hope this helps!

Tessa Maki

Hi Mike!

In this scenario, it may work better to have the appearance of the object change by editing the states of the button rather than changing the state of the object dependent on the true/false variable. If you copy the colored object, you can edit the Hover state of the button and paste it. Then if you create a new state of the button titled Selected, you can also paste it there. This allows it to toggle back and forth between selected and not.

If you still have a need for the True/False variable to toggle (maybe needed for scoring?), you can switch the trigger Operator = NOT Assignment and that will toggle between True/False based on whether the button is selected or not. I'm not sure I'll be able to attach the file, but I'll try. :)

Hope this helps!

~Tessa