Xiff examples?

Great library for Flex but can you point me to any examples and documentation if available? I am trying to connect to an Openfire server but while I can log using the Psi client I cannot with XIFF. Here is my code which is very simple:

public function login():void{

** var con:XMPPConnection = new XMPPConnection();**


** con.server = “localhost”;**

** **con.port = 5222;

** con.username = “test@localhost”;**

** **con.password = “test”;

** **con.connect();

** **}

If the above code is wrong please post your comments. Thank you.