Changing a nesxt buttom state
Jun 01, 2016
Hi everyone!
I'm working on a slide were I need to change the state of the next buttom. I want the next buttom to be "Hidden" when the slide starts and I want it to be "Normal" stated when a bunch of buttoms I have will be are already visited. I tried to make it work by using variables and states but doesn't works for me I don´t know why.
Do somebody can explain me another way to do it? Or a better way to do it with variables?
Thanks!
17 Replies
This post was removed by the author
That's pretty similar as the process I did but unfortunately didn't worked on my slide :/
Can you share your slide and maybe I or someone can take a look and see if we can fix it?
Andres,
I edited your .story file so your custom Next button changes from Hidden to Normal after all 4 buttons are clicked; see attached.
FYI: I duplicated your "Clicked" states as "Visited" states, and deleted the "Clicked" states. When you select the standard Visited, Hover, and Selected SL states from the state drop-down menu when creating states for a shape, you don't have to add triggers to change to those states. That makes it easier to program.
BTW, I highly recommend that you name your shapes and buttons. The little bit of time it takes to do that will save you from confusion when you're adding/editing triggers.
Good luck!
Hi Judy that was not my project
Here is mine, the one which I have the problem. Please check it out and if you can solve it because I have almost all morning trying to and I couldn't
I could be wrong, but I don't believe you can hide or disable the navigation controls on the player. You would have to create onscreen navigation controls which you can then have hidden and change to normal once all buttons are clicked!
Andres,
The VERY best advice I can give you is that groups and states do not function together.
If I follow your original question correctly, follow these steps:
1. Change state of NEXT Button to hidden when timeline starts.
2. Create a trigger to Jump to slide1 when the user clicks Button1, and similar for each button.
3. Adjust Variable Slide1Visited when user returns from Slide 1. Put this trigger at the same place as the trigger to return the user to the menu, but BEFORE (above) the jump trigger. Do the same for each slide.
4. Change state of NEXT button to Normal when timeline on menu slide starts if Slide1Visited = True AND Slide2Visited = True, and so on for all the other variables.
If you do that, you won't have troubles with the Visited states. If you rely on Visited states, there is a very large chance you will have trouble. Visited states are not reliable if you are visiting other slides, especially that many other slides.
The VERY best advice I can give you is that groups and states do not function together.
If you want to use states to show which buttons have been visited, do this:
Select a group, right-click on it and choose Save as Picture...
Open it in Paint, or some graphic editing software, and create a different version of it for the visited state.
Then you can Insert it as a picture, Edit States, create a new state named Completed, (anything other than Visited or one of the other built-in states, and insert the Visited state picture. If you use a built-in state, it comes with built-in triggers, which may conflict with your triggers.
Create a trigger to Change the state of Button1 to Completed when the timeline starts on condition Slide1Visited = True.
Mark, Write a trigger to change the state, and you will see in the drop-down menu options for Next Button, along with Previous and Submit, if you are on a slide that has them.
Andres,
I looked at your NextButton_Problem.story. I think the issue is that each button is part of a Group. SL doesn't assign states to a group (only to individual items in the group).
I can tell that you used multiple, grouped shapes to achieve the red-at-the-end look of the buttons. I suggest that you create an IMAGE with the button design you want, and then fill each button with that image. That way, you only have to deal with 1 shape per button. And you'll be able to add a trigger that adjusts the NEXT button to Normal when all your custom buttons are Visited.
BTW, I suggest you change the NEXT button to disabled rather than hidden. When you hide the player's NEXT button, the PREV button automatically takes its place. That can be confusing to users. So include a trigger that changes the NEXT button to Disabled when the timeline starts with the conditions that your custom buttons are Normal (i.e., not Visited).
I hope this helps. I probably won't be checking back to the forum for a while...
Only one of the reasons why I prefer my own navigation.
Thank you all! I'm going to try your advices
:)
Hi Walt!
Thank you very much for your help yesterday, I could finally made what I wanted but know I'm presenting another problem. When all the buttons change to visited the NEXT buttom is changed to NORMAL state, what is really good BUT when I jump back to de menu slide it turns into DISABLE state again and of course don't lend me pass from there.
Do you know why is it happening?
Thanks
Hello Judy can you check what I ask Walt?
May be you can help me too. Also thanks for helping me yesterday.
Hi Andres
you could add a number variable 'slideVisits' that adds +1 each time the slide is visited.
Then change your trigger on the next button to be normal when all buttons are visited and 'slideVisits' variable > 1.
Hope that helps
You could put a true/false variable that becomes true when the slide is finished and have variable that says change state of next button to true when the slide starts if the variable is false.
Looks like Wendy & Cary already provided the answer. I usually use a True/False variable, with its initial state set to False. I adjust that variable to True when the appropriate buttons are Visited -- in other words, with a trigger like the one to set NEXT to normal. Then be sure to add a condition to the "Change NEXT to disabled when the timeline starts" trigger so it only does that when the variable is False. That'll keep the NEXT button active when revisiting the slide.
Yes, it is because there is a trigger to disable NEXT at the beginning of the slide. I support Cary's solution.
I just did what you recommended me and it worked very well!
Thank you!
This discussion is closed. You can start a new discussion or contact Articulate Support.