I have a button that is disabled when clicked. It is to check answers on a previous slide. I want the button to stay inactive until a user navigates away and then comes back to the slide to check a second time. I copied the code exactly from another cardsort that works perfectly. Mine however, will not reactivate the button. I can’t tell a single bit of difference.
Thanks for any help…
Here’s the set up
Slide 1 has the card sort called ‘sort’
Slide 2 has an untitled note and a button called ‘button’.
The only code is under the note and button.
HERE IS THE CODE FOR THE BUTTON:
s=sort
b=button
content: when b.timeSincePress()>0 “{start}{waveLine}” otherwise “${start}\n\n\n\n\n”
start= “Press the button to see how you did on the Card Sort.”
check=
when s.matchesKey “Great work! You got them all correct.\n\n\n”
otherwise “Not Yet. Go back and keep trying.\n\nYou can come back later to check again.”
time = b.timeSincePress()
animLength = 0.25
waveLine =
when time>0 and time <= animLength “\n\n\n\n…”
when time>0 and time <= animLength “\n\n\n\n…”
when time>numericValue(“1*{animLength}") and time <= numericValue( "2*{animLength}”) “\n\n\n\n·…”
when time>numericValue(“2*{animLength}") and time <= numericValue( "3*{animLength}”) “\n\n\n\n˙·…”
when time>numericValue(“3*{animLength}") and time <= numericValue( "4*{animLength}”) “\n\n\n\n·˙·…”
when time>numericValue(“4*{animLength}") and time <= numericValue( "5*{animLength}”) “\n\n\n\n.·˙·…”
when time>numericValue(“5*{animLength}") and time <= numericValue( "6*{animLength}”) “\n\n\n\n…·˙·.”
when time>numericValue(“6*{animLength}") and time <= numericValue( "7*{animLength}”) “\n\n\n\n…·˙·”
when time>numericValue(“7*{animLength}") and time <= numericValue( "8*{animLength}”) “\n\n\n\n…·˙”
when time>numericValue(“8*{animLength}") and time <= numericValue( "9*{animLength}”) “\n\n\n\n…·”
when time>numericValue(“9*{animLength}") and time <= numericValue("10*{animLength}”) “\n\n\n\n…”
when time > 0 “\n\n${check}”
otherwise “”
HERE IS THE CODE FOR THE BUTTON:
disabled: this.timeSincePress>0