MoleDirect
Technical User
Hi all.
I am working on a small chatbot that will have conditioned responses depending on words a user types in.. So far, it is a failure.. Here is the code i have:
This simple code should be looking for certain 'keywords' in a sentence, and responding to it using pre written answers.
When I run this now, it only replace the text in the inputbox with 'Hi' and thats it, the dynamic box does not change.
I am using Flash MX (6)..
Thanks in advance!!
I am working on a small chatbot that will have conditioned responses depending on words a user types in.. So far, it is a failure.. Here is the code i have:
Code:
on (release, keyPress "<Enter>") {
if (_root.user.text=="Hi") {
_root.reply.Text = "Hello";
_root.user.text = "";
}else{
_root.reply.Text = "I have no idea";
}
This simple code should be looking for certain 'keywords' in a sentence, and responding to it using pre written answers.
When I run this now, it only replace the text in the inputbox with 'Hi' and thats it, the dynamic box does not change.
I am using Flash MX (6)..
Thanks in advance!!