Saturday, August 30, 2008

My chatbot in Flash

flash as3.0 聊天机器人(点击展开中文翻译)

I was inspired by an interesting chatbot flash made by Chad Adams.
I can't fully understand his original class in flash mx, so just write one myself.
It costs me some time because I have to write the code while searching and learning what I need about XML.
I am not good at using action script to deal with XML and strings.
So no doubt the class can be improved.

Don't laugh at my bot, after all its brain only weighs 2 KB!
My chatbot source is Here: flash_chatbot_v1.0.rar
Chad Adams's original code is available at
All in all, this is one simple experiment. All it can do is to search the XML data (by Chad) to find answers according to some word you typed in and display the answers.

To extend my chatbot and make it more "clever", you can replace "brain.xml" with more complicated things such as "Artificial Intelligence Markup Language" and try to parser them:
and some open source chatbots based on AIML: chatterbot written in PHP and using MySQL.) (Flash AIML TTS Chatbot – ‘HAL9000′ using PHP and Festival)

By the way, if you are interested in chatbot, here are some links:
Some powerful chatbots are
they can say more and answer more questions.

Jamie Durrant offers us a tutorial about how to write a chatbot using what ALICE (above) knows(as2.0 or lower) with code here: .
What that flash file do is to replace the default html interface when using the AI chatbot at
Another Actionscript 3 Pandorabot Chat Class is here:

Finally, some flash chatbots:
by Billy T (nice UI !).
by Steve Worswick.

1 comment:

  1. See also