Nice code
For something you did yourself this is pretty good. You still need to work at using the API commands. I pmed you a link for the pseudo code for a string sim, which was actually pretty hard for me to find. It should not be too difficult to implement in flash. Also, ask questions in the flash forums if you need help with it.