i tried making one ages ago...although not primarily in Flash, but it could be esaily altered to work with flash.
It was a bit rubbish though. It was meant to learn stuff, but after a few hours of working on it, i got a bit bored when i realised the scale of the project, and how hard it would be to get it working.
Anyway, you can have a look at it here: www.humanchimp.fdns.net ... It only answers questions at the moment, and only a few of them - it doesnt handle statments or anything else. Overall its a bit rubbish
www.humanchimp.fdns.net/data.xml is the data file it works with. And www.humanchimp.fdns.net/grammar.xml is the grammar file. For example, if you ask: How old are you? The PHP checks in the data file for: chimpbot->be->old and returns the answer. Pretty simple stuff at the moment.
I think pandorabots as token3 said is one of the most widely used bot creation tools - but im not sure whether it is open source or not, as ive never really tried it myself.
Anyway, good luck - id be interested to know how you go about doing it
Message on a gravestone:I finished before you in the human race.