How to change state of button from hidden
Jun 26, 2012
I am trying to change the state of a button from hidden to normal based on two other buttons being clicked, and thus changing two variables. I think my logic is correct, I can get the states to work if I use something like 'disabled' but when I try to change a button from 'hidden' to 'normal' it is not showing up, I didn't see anything about 'visible'. I have the variables displayed on the stage so I know they are working correctly. Any help appreciated. Below are the triggers I have set up.
Thanks.
36 Replies
Below where, Vivian?
Yeah, tried to put in a screen capture but that didn't work. Trying again.
Not sure if this'll help (but it has for me in the past). Try moving "Set heightClicked equal to true..." above "Show layer height". I think that the triggers happen in sequence - so the layer might be skipping the 2nd trigger.
Colin hit it. Triggers execute top to bottom. Changing a slide context trumps execution of anything below, stuff below a slide jump won't execute.
Well, changing that particular one didn't help but I will try moving some others. The thing that confuses me most is that if I don't start with it as 'hidden', rather using another state, everything works just fine, it changes to the normal state when it should.
I tested again, using 'down' state instead of 'hidden' and it worked just fine which makes me think the logic is all correct but that there is something special about the 'hidden' state that may require a change other than to 'normal'.
Not sure, Vivian. I've used "hidden" to "normal" using variables a couple of times. I only ever ran into issues if I had the triggers out of order.
Can you change the default state of the button to hidden or would that break something else?
Well, I don't understand why but when I removed the trigger to set it to hidden and instead set the default to hidden on that page it all seems to work. In this instance making the change is fine, not sure it would always be so it would still be great to find out the why but at least I have the how. Thanks!
Can someone help me please? I am trying to make the submit button display when the user selects Button 1 checkbox and button 2 checkbox. This is what I have so far but it's not working. It displays if you select button 1 checkbox. I want it to display only if button 1 and 2 are selected. HELP!
Hi Ashley,
Instead of using 'User clicks' as the event (When), try changing it to 'State', selecting 'All of' from the 'On:' drop-down and then selecting both checkboxes.
Antony
Hi Ashley,
If you change the trigger to this you'll achieve your results. Would this work for your situation? This is assuming a customizes submit button's initial state is hidden. It changes to normal when two check boxes are selected.
Hi Antony, tag you're it!
Hi Rebecca Don't you hate it when you spend the time composing, typing and posting your response only to find that youv've been pipped to the post??
Rebecca and Anthony,
You rock! Worked perfectly. Thanks a ton! And thanks for the quick response!
You're welcome Ashley - good luck with the rest of your project
pipped to the post...new expression for me . Works literally and figuratively here. Freedictionary tells me it's British and Australian. Love it!
Oh, and glad it worked, Ashley.
Hey Anthony and Rebecca,
I've got another quick question. I've built two layers, correct and incorrect. I'd like to launch these layers individually when certain buttons are selected and then the submit button is clicked. For example.
if button 1 and 2 are selected and the submit button is clicked the "correct" layer displays. If only button 1 is selected and the submit button is clicked the "incorrect" layer displays.
Here is the combination of the buttons that equal c=correct feedback displayed or i=incorrect feedback displayed. (also I know that the number 4 is not used in this sequence. sorry for any confusion).
1=i
1,2=c
1, 3=i
1,5=i
1,6=i
2=i
2,3=i
2,3,5=i
2,3,5,6=i
3=i
3,5=i
3,5,6=i
5=i
5,6=i
6=i
I think I found the solution! What do you think?
Hi Ashley,
Is this slide not already set up as a multiple response question? If it was, then SL would automatically apply the logic to show the appropriate layer when any given combination of answers are selected.
If you have built this slide from scratch, then the easiest way would be to add 2 triggers.
Hope this helps,
Antony
Hi, I'm having a similar problem. I am trying to have checkmarks show up from the hidden state when users have clicked on a section tab to show that they have completed that section. It works in the initial menu slide when I preview just that slide, but does not work when I preview the course, either on the initial menu slide, nor on the menu slides later on in the course (I copied and pasted the menu buttons to the subsequent menu slides).
Thanks!
Sue
Hi Sue,
Did you check the slide's revisiting properties that they're not set to "reset to initial state"?
Hi Ashley,
I changed the 'automatically decide' option to 'resume saved state', but they're still not showing up - anywhere.
Hi Sue,
Is there anything else that could be resetting these checkmarks on another slide or on your slide masters? If you'd like us to take a look at your file can you share it here or even a mock up/sample file?
Sure, I'd be happy to share it. Any suggestions would be welcome - I think that I usually take the 'long way' instead of taking advantage of some of Storyline's features...
This discussion is closed. You can start a new discussion or contact Articulate Support.