I want to build a virtual session between a psychologist and a patient. The patient should be registered first and fill some important points about his character. Now when he logins, there is a talking character (this is actually a flash file) . According the points entered by the patient , the talking character open the conversation with a text &. Then the conversation continues, the customer says something and according to his sentence, the virtual Character (which is the Psychologist) asks him questions. According to my understanding there should be an algorithm that check each sentence entered by the customer And looks for keywords. If specific keywords are shown then the talking character will say : A and if other characters are shown then The character will say B Im not looking for a specific code, I only know that I have to integrate flash with other language.