Restrict no. attempts on radio button
September 23, 2008 12:00 AM
I haven't tried this on my own copy of Lectora, so take this with a grain of salt. I believe it should work, but it may need some tweaking.I think you could get by with adding a variable, some actions to manipulate that variable, and a transparent button that does nothing.First, the variable. Set it initially to 0. Let's call it varAttemptCount. Each radio button runs an action group. The purpose of the action group is to increment varAttemptCount. So you have something like this:If(varAttemptCount=1) Set varAttemptCount=2If(varAttemptCount=0) Set varAttemptCount=1Note the order. If it isn't set in this order, then you can jump from 0 to 2, which is undesirable.Next, the transparent button. Place this over your radio buttons. Make it initially not visible. We'll call it Cover Button. Finally, we need an action to tie the varAttemptCount to Cover Button. Within the same action group that increments varAttemptCount, add another action that happens only when varAttemptCount=1 (place this before the variable is incremented). When this is true, then you Show Cover Button.The end result, if I did not forget something, is that the first time a radio button is clicked, your attempt count goes to 1. The second time a radio button is clicked (even the same one), your attempt count goes to 2, and the Cover Button comes up, preventing any further clicking of the radio buttons. Let me know if that makes sense (and more importantly if I left anything out). Kevin
Discussions have been disabled for this post