I’m toying with a great reference script found at http://paazio.nanbudo.fi/tutorials/flash/xiff-chat-part-1 . It’s working great for the most part after making some tweaks for it to work in Flash CS3. One thing that didn’t work was the reference to Presence.AVAILABLE_TYPE. There is no AVAILABLE_TYPE specified in Presence.as, only UNAVAILABLE_TYPE.
I changed this:
presence = new Presence(null, userJID, Presence.AVAILABLE_TYPE, Presence.SHOW_CHAT, null, 1);
presence = new Presence(null, userJID, “available”, Presence.SHOW_CHAT, null, 1);
That fixed the error, but I’m still having issues. Whenever I send a message from Flash to my IM client, the sender appears to be offline. When I reply, I get the message asking if I want to send the message now or later because of the sender is offline. When I send a message though, it shows up in Flash just fine.
My output shows an error:
onXiffError: Unknown Error
Any thoughts on how to make the Flash sender appear online? Thanks much in advance.
Here is a more complete output:
onXiffError: message:Unknown Error, condition: undefined-condition, type: modify, code: 500
onPresence [Event type=“presence” bubbles=false cancelable=false eventPhase=2]
This produces the same results:
presence = new Presence(null, connection.jid, null, Presence.SHOW_CHAT, null, 3);