Hi there all.
I'm working on a friends list and started using the buddy list system. It all worked well for me until I tried to get online updates of buddy states.
Server side: JAVA:
Initializing buddy list
Adding each friend (from a database) as TEMP
FLASH:
This runs on a ENTER_FRAME event...
txtStatus.text = sfs.buddyManager.buddyList.length.toString();
for each( var b:SFSBuddy in sfs.buddyManager.buddyList )
{
txtStatus.appendText( "\n - " + b.name + ":" + b.isOnline + " - " + b.state );
}
THE PROBLEM:
At certain points I change the state of a friend, but it never updates on flash. It works online really well for online/offline, but the state never updates.
If I log out and in again, I see the correct state of my friend, but when I change it again, it wont update till I log in again.
Am I doing something wrong? Am I lacking some step?
Pls help!
Thanks a ton!
Buddy State update
-
- Posts: 17
- Joined: 05 Nov 2010, 15:31
Personally I think that using an enter frame event to update the list is the wrong approach. Simply listen to the buddy-related events fired by the SFS API. In particular, the SFSBuddyEvent.BUDDY_VARIABLES_UPDATE contains the state update (because the state is saved in a buddy variable).
With the RC2 we will be releasing a Flex example showing the Buddy List features usage.
With the RC2 we will be releasing a Flex example showing the Buddy List features usage.
Paolo Bax
The SmartFoxServer Team
The SmartFoxServer Team
-
- Posts: 17
- Joined: 05 Nov 2010, 15:31
Return to “SFS2X ActionScript 3 API”
Who is online
Users browsing this forum: No registered users and 12 guests