XIFF + Flash CS3 + AS3 Experiment (tiny preview)

8 actionscript,as3,flash,work,xiff,xmpp  |   October 8, 2007  |     1061

Hi all,

i am writing a chat client with XIFF (XIFF is an ActionScript library to communicate with XMPP servers out there) in AS3. As I am doing so, I’ve run into a few problems, namely the unavailability of the ArrayCollection class in Flash CS3 (it’s only available in Flex 2+). I ended up writing a simplified version of a collection class based on the Array. ArrayCollection offers both Event Dispatching and the Collection’s typical functions.

The other problem is the lack of documentation on XIFF for AS3. Actually there is only a SVN for source which you have to seriously dig to find:

It is maintained by Nick Vellof, the SVN is publicly accessible but read only. Nick has built a nice Flex Application on top of XIFF but he has chosen thus far not to share it’s source code. Therefore, officially there is no sample code at all with XIFF.

I just found today a project called XIFFIAN, which is a “3rd party” project, using XIFF. His project is full-fledged and the source is available. Here is the link:
Xiffian on Sourceforge

I will post sample code in the next few days accompanied by explanations. So far my application can connect to as Jabber type server, login, accept subscription requests or reject them. You get the list of all your contacts and see their status. I will write the controls for the actual chatting in the next few days.

My “simplified” ArrayCollection class for Flash CS3 is here. It contains strictly what is needed by the org.igniterealtime.xiff.im.Roster class.

I then wanted to connect to Google Talk to see the difference between the OpenFire server implementation and … something else. Alas Google Talk requires that you connect using TLS and the Flash Player will allow you to use HTTPS via the browsers capabilities, but it does not support TLS internally. Therefore for the moment there is no way to connect to Google Talk using XIFF in AS3.

I’ll keep you posted.

  • March 1, 2008 at 6:11 am

    pankaj rai

    hi, I want to start to work with XIFF APIS, for that what is the basic things that I have to know ……..

  • April 8, 2008 at 5:55 am


    Hi, I want to share the experiance with you to look into the XIFF-code, though I have to work harder on it. ha, it is great to enjoy that.

  • May 13, 2008 at 5:44 am


    sorry for the precedent comment, i have try the url with svn and it works, thanks for the information.

    Have you make a source code example of Xiff use ?


  • June 4, 2008 at 9:38 am


    Hello there,

    Actually with AS3 we can do binary sockets, so TLS can be handled. I found this cool library which already implements it.



  • June 22, 2008 at 1:14 pm



    Hi,i came across three tutorials for the xiff class and flash. Not sure if they work , still going through the code. As you said there is no documentation with XIFF so it is a nightmare

    Here is a link to the API


  • July 28, 2008 at 10:24 am

    Philip Double

    Has this gone any further – would love to be able to implement this in a project that is all CS3 so far.

  • February 14, 2009 at 6:14 pm


    i am embarking too in such a project. I am going to create a flash chat using the XIFF library hopefully integrating it in Drupal. Any news on your project? We could swap code/experience. Let me know.
    P.S. Great blog

  • March 29, 2010 at 11:01 am


    Hi martin,

    Thanks in Advance!

    I am looking for to connect Gtalk using XIFF api. Is there any possibilities to meet this requirement, if so please help me. I’m out of my hand.


Leave a Reply