I'm trying to do something that should be very simple - I want to change the Next button to normal when the user hovered all 4 colored tiles with their explanation.
What I did is enter 4 variables that changes from False to True when hovered and I set the button to change to Normal state when timeline starts, and all the variables are True.
I had trouble downloading your file. However, based on your description, I'd say the problem is the "when" of your trigger. If it's set to run when the timeline starts, then the trigger checks the value of the variable before the user can hover over the tiles.
Here's what you could do instead: Use 4 triggers. Each would change Next to Normal when one of the variables changes, with the conditions that all the variables are True.
By the way, you might want to reconsider hovering vs clicking. Anyone using a mobile device can't hover, so they'd be unable to advance. If you require clicking instead, and give each tile a Visited state, you'd just need one trigger to change Next to Normal when all 4 tiles are Visited.
You could also approach it this way using your variables. Once you hover over each Rectangle, it sets the variables to True. Once all are True, the Next button changes to the Normal state. I attached the updated SL file as well.
My apologies. I uploaded the wrong fix. Here is the updated one. Basically, you move the text for each rectangle to its own layer (remove from the states of the button itself). Set each button to show the applicable layer when the user hovers over it. Then, create a change state trigger and copy it to each layer.
As you can see, there are multiple ways of approaching this. Using states is one approach but if you ever want to use variables in the future, I thought I would pass this along.
7 Replies
I had trouble downloading your file. However, based on your description, I'd say the problem is the "when" of your trigger. If it's set to run when the timeline starts, then the trigger checks the value of the variable before the user can hover over the tiles.
Here's what you could do instead: Use 4 triggers. Each would change Next to Normal when one of the variables changes, with the conditions that all the variables are True.
By the way, you might want to reconsider hovering vs clicking. Anyone using a mobile device can't hover, so they'd be unable to advance. If you require clicking instead, and give each tile a Visited state, you'd just need one trigger to change Next to Normal when all 4 tiles are Visited.
Thanks for sharing your solution and helpful advice, Judy!
Israel, if you have more questions, let us know!
Israel,
You could also approach it this way using your variables. Once you hover over each Rectangle, it sets the variables to True. Once all are True, the Next button changes to the Normal state. I attached the updated SL file as well.
Richard
Thank you! it worked!
Btw, I know that all of my users work only from their PC at work, So I considered this :)
Thank you, but it only works if I hover on R1 first. Judy's solution worked my problem.
This post was removed by the author
Israel,
My apologies. I uploaded the wrong fix. Here is the updated one. Basically, you move the text for each rectangle to its own layer (remove from the states of the button itself). Set each button to show the applicable layer when the user hovers over it. Then, create a change state trigger and copy it to each layer.
As you can see, there are multiple ways of approaching this. Using states is one approach but if you ever want to use variables in the future, I thought I would pass this along.
It's a good approach too, thank you :)