Forum Discussion

StevenBlea's avatar
StevenBlea
Community Member
21 days ago
Solved

Locking interactivity in a custom state

In the simulator that I'm working on, there is a way for users to go back through the slides they interacted with to see the breakdown of their results. I've been using the disable state to make sure they don't run into issues during this brief walkthrough.

Originally I had an entirely separate object to show which choice the user selected. It wasn't working, and while I might know what the issue is, it occurred to me that changing the state of the button to isolate the user's selection might be a better way of doing this.

However, I don't see any options to give custom states any of the features of other states and I still want the buttons to be disabled if possible. I tried duplicating the disabled state, but it seems those features are tied into the default state (and its name). Is there any other way to prevent the hover state and disabling the clickability of a button using a custom state, or is this a lost cause?

bonus question: if I do want to preserve the clickability of a button but disable the hover state when it's in a specific state, is that an option?

  • Note: Covering a button with a transparent shape does prevent someone from clicking the button with a mouse. However, it doesn't prevent someone from accessing the button with their keyboard. 

    One option to "disable" everything on the base is to show a layer during review that has its Slide Layer Properties set to "Prevent the user from clicking on the other layers." "Other layers" include the base.

    BTW, Storyline doesn't have a way to disable the Hover state based on the current state of the button. Hover is automatically on for all states except Disabled. 

    You could program a hover-like effect by showing a layer on mouse-over with a condition that the button is in the state you want.

    • Bonus tip: don't use "= Normal" in a condition. All the built-in states are based on Normal, so that condition doesn't always work as expected. Instead, the condition should indicate what state the button isn't in, e.g., "≠ Selected." 
  • MichaelHinze's avatar
    MichaelHinze
    Community Member

    One "low-tech" idea is to put a transparent object/or a layer over the entire interaction, so that users can still review their choices, but not change the selections.

    • StevenBlea's avatar
      StevenBlea
      Community Member

      I actually track whether or not they make a selection with a variable, so that it can't be changed, but this is an interesting thought too.

      I've realized that when going through the review at the end, not having the buttons be clickable is a problem as they can't see if they chose the correct recovery option for their wrong answers, since they can only access the wrong answer by clicking on the wrong button again. This is the reason for my "bonus question". Though it would still be good to know how to duplicate the disable features as well, I think for the purposes of the reasons behind this post I'm actually just looking for a way to stop the hover state from going off when the button is in a specific custom state.

  • Note: Covering a button with a transparent shape does prevent someone from clicking the button with a mouse. However, it doesn't prevent someone from accessing the button with their keyboard. 

    One option to "disable" everything on the base is to show a layer during review that has its Slide Layer Properties set to "Prevent the user from clicking on the other layers." "Other layers" include the base.

    BTW, Storyline doesn't have a way to disable the Hover state based on the current state of the button. Hover is automatically on for all states except Disabled. 

    You could program a hover-like effect by showing a layer on mouse-over with a condition that the button is in the state you want.

    • Bonus tip: don't use "= Normal" in a condition. All the built-in states are based on Normal, so that condition doesn't always work as expected. Instead, the condition should indicate what state the button isn't in, e.g., "≠ Selected." 
    • StevenBlea's avatar
      StevenBlea
      Community Member

      Thanks for this! You gave me something to work on, hopefully I can make it work.