it's fairly simple. the actual check looks like this:
whichTextMember = "editableFieldMember"
-- or whatever the name is
theRightAnswer = "doggydoo"
-- or whatever the right answer is
on checkForCorrect me
if member(whichTextMember ).text = theRightAnswer then
-- correct!!!
else
-- incorrect
end if
end
and to call it:
on keyUp me
if member(whichTextMember).text.char.count = theRightAnswer.char.count
then
me.CheckForCorrect
end if
end
is the bare bones logic.
it gets trickier when you want to limit the number or kinds of
characters that can be entered, and i think it's a little weird just to
check for correct when they have the right number of letters, as opposed
to a submit button. but if that's what you want, the above is a start...
hope this helps,
bhakti
Kenneth Park wrote:
>
> Hi List
>
> Newbie here
>
> I am building a quiz in which the user will input their answer in an
> editable text field. I would then like the user to check this answer against
> the correct answer without using the return key or clicking on a submit
> button.
>
> I was thinking that I could use a behaviour which I could attach to the text
> field. This behaviour would count the number of characters keyed in by the
> user and on the last character check the answer.
>
> The problem is that I don't really know how to do this. Any help would be
> greatly appreciated.
>
> Kenneth Park
> Cardonald College
> Glassgow
>
> _________________________________________________________________
> Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
>
> [To remove yourself from this list, or to change to digest mode, go to
> http://www.penworks.com/LUJ/lingo-l.cgi To post messages to the list,
> email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED])
> Lingo-L is for learning and helping with programming Lingo. Thanks!]
--
R. Bhakti Klein
Instructional Media Developer, Distributed Learning Workshop
http://www.dlworkshop.net/
··
Baritone, Wicki6
http://www.wicki6.com
···
"On Earth, you can only do little things;
but you can do them with a lot of Love."
-- Mother Theresa
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi To post messages to the list,
email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo. Thanks!]