You should talk with and check out the code for the FML project (http://fml.jabberstudio.org). They've got Flash and Jabber working together so should have the answers. -iain