SL Version 7 Making a Clicked State Stick

I need to make a clicked object stay in the clicked state.  I'm finding it difficult to do if the object supports Hover.

The attached .story file has two objects.  One hovers by having a state called "Hover", the other object has a state "MyHover" and uses a trigger to change the state to Hover... but only when the state is Normal, not clicked.

Both objects change to state "Clicked" when clicked.  Both have issues retaining that state. The Hover actions on both objects create issues.  Try it out.

Is there any way to make the Clicked state stick on the object?

Sam

7 Replies
Matthew Bibby

Try this:

  • Add your object
  • Set up your selected state 
  • Duplicate the normal state and call it hover
  • Delete the image from within the hover state
  • Add your hover image (it needs to have a transparent background so the selected state can show through)
  • Use the Size and Position window to get the alignment right (i.e. Set the position to 0 vertical and 0 horizontal)

The only problem that I found with this approach (other than it's a pain to set up) is that when the mouse moves off the hover state there is a flicker... This can be dealt with by adding a normal image to the slide underneath your interactive object (this is also handy if you want a background colour to show up behind the hover when the object isn't selected). 

I hope that makes sense!

Let me know if you have any questions. 

Sam Carter

Hi Matthew,

Your solution sounds like what I did in the upper-left hover example in the .story file I uploaded, but with one exception that I don't understand:

What do you mean by "Add your hover image"? I presume you mean to the selected state Hover where I just deleted an image? Or something else?

Sam

Sam Carter

That will do, but when you have several of these on a slide it gets complicated, multiplying triggers and objects. 

The problem seems to be implementation:  There is no trigger for exit hover, just a restore to original state option. That option probably shouldn't fire if the state has changed from hover to clicked, but it does as shown in the second example of the .story file.

So your suggestion seems to work around this design shortcoming, but doubling the objects when you have eight on the slide already... to get around a design issue. Nuts.

Sam