|
-
[F8] User input text questions..
I have a little program where the user will input a question in an input text box and click a submit button. Based on the question asked a dynamic text box will answer it.
right now it is set up something like:
user: What is your name?
Flash: My name is Jimmy.
I have a couple questions to help make this better, as everything "works" right now...
1) What can I do to make the user input text transform to all lowercase letters, so that if they type: "WHAT is YOUr namE?" Flash will see: "what is your name?" ?
2) Is there a way to set an array up full of questions AND answers? Right now I am using a metric butt ton of if/else statements. I would prefer to use less code. I thought of an array with questions and another with answers, and if input text == questionArray[4] dynamic text will show answerArray[4] and so on, is that possible?
3) What about a key word criteria, instead of exacts? Like right now the question "What is your name?" MUST be entered exactly like that to generate the response. But some people talk differently, so a user might type "what's your name?" or "do you have a name?" Is there some way I can have Flash ignore certain words (What, Do, How, your, etc...) and focus only on the rest?
I know some of these (#3) may be very complicated, or impossible, but it never hurts to ask, right?
Thanks for any/all help with this!
~MoN
If I am wrong, please just correct me and move on.. there is no need for all that pointing and laughing! ~MoN
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|