Next button help
June 29, 2009 12:00 AM
Although, if you really prefer numbers (because, for example, you have over 26 buttons for your poor, poor students), you could instead make your numbers into strings. Give your variable an initial value of underscore. Then, as the learner clicks on each button, you add "1_", "2_", etc. Then, you can run your conditional to see if "23_" or "42_" exists.
Although, regardless of which route you take, I suggest a conditional when you add the variable. Add "a" ONLY if the variable does not already contain "a". This way, you don't have the chance of choking the machine with "aababbccbbcabbcaccabbccbbcabcabbcacbbccbbcabbcaccabbccbbcabbcacbbccbbcabbcabbccbbcabbcaccab".
It's unlikely you'll hit the limit on variable length, but never underestimate a click-happy, bored learner.
Kevin
Discussions have been disabled for this post