Get own status

I have tried looking in old threads. Unfortunately I did not find anything. Is there a way to find out the current status of the user? ty

I need help with this too? Anybody…?

what do you mean by status: online/offline or away/idle/active?

online/offline is a Boolean: connection.isLoggedIn():Boolean.

cool, thanks for the reply!

the isConnected is great to have, but I was looking for away/idle/chat…?

Also, when I used isConnected, it does say true. When I unplugged my ethernet, it still said true (even after being disconnected for 30 seconds). Does it ever try to go to the server and ask if it’'s connected? The same goes for away/idle/chat… I want to know that instant if I am connected or not… if that makes sense.

I REALLY appreciate your reply. Thanks!

I guess connection.loggedIn() doesn’'t turn back to false unless you manually disconnect (connection.disconnect() ) or if it receives certain errors.

This isn’'t the ideal method, but this is how I determined the moment it connects:

var connection =

var me=this; // Scoping work around

var mc = createEmptyMovieClip(“mc”,this.getNextHighestDepth());

mc.onEnterFrame = function()

{

if(me.connection.loggedIn() )

{

me.InitJabberFunction();

this.onEnterFrame = null; // so it doesn’'t keep executing

}

}

function InitJabberFunction()

{

// Whatever you want to execute once connected

}

Hope that helps.

In terms of your current status, I can’‘t help you right now cause I haven’‘t gotten there myself When I do I’'ll post something up.

Cool. I am subscribed to this thread and so I’'ll definately take a look at what you come up with if you get that far.

thx a lot for the help

My idea was to find out the user extended status (away, dnd, …) and manage it the same way messenger does with the user personal sentence.

Unfortunately when xiff receives the login event it sets the status to “Online” with setPresence so probably there is no easy way to manage a persistent sentence.

Meanwhile I decided to catch changes to my own status parsing the outgoing data. This way I can change xiff default state and the client will act accordingly.