macromedia.director.lingo
[Top] [All Lists]

Re: Text Input - Entering and Checking

Subject: Re: Text Input - Entering and Checking
From: Mike Blaustein <mblaustein@xxxxxxxxx>
Date: Thu, 24 Jul 2008 08:20:40 -0400
Newsgroups: macromedia.director.lingo


You can get the contents of a #text member like this:

put member("yourTextMemberName").text

You can compare that text to a stored value like this:

if member("yourTextMemberName").text="Correct Answer" then
 --do something if correct
else
 --do something if incorrect
end if

It is important to note that the .text of a member will always be a STRING. Therefore if the user had entered the number 4, it will return the value as "4".

<Prev in Thread] Current Thread [Next in Thread>