3 Replies Last post: Oct 1, 2007 7:01 AM by Vivian  
Puspendu Banerjee Bronze 18 posts since
Jan 4, 2007
Currently Being Moderated

Feb 12, 2007 4:59 PM

Roster Visualization: From Datagrid (Array) to Tree (XML)

Hi,

I am very new in ActionScript/Flash.

Let me know if there is any easy method to implement Roster.dataprovider that way as it will be compatible to Tree.dataprovider, I mean XML dataprovider.

 

Thanks & Regards,

Puspendu Banerjee

Chase Seibert Bronze 54 posts since
May 18, 2007
Currently Being Moderated
Jun 1, 2007 8:40 AM in response to: Puspendu Banerjee
Re: Roster Visualization: From Datagrid (Array) to Tree (XML)

I was able to do this on my own. Here are the basic steps:

 

1. Create a class that stores an ArrayCollection which you can map to a tree. Basically it''s an ArrayCollection of ArrayCollections. Just look up a basic ArrayCollection -> Tree control example.

 

2. Attach RosterEvent and PresenseEvent handlers to your class to maintain the collection state as the roster changes.

 

3. Set the dataProvider property on your Tree control to be this ArrayCollection.

 

Take a look at my code here: http://www.bitkickers.com/code/sworks1.zip

Chase Seibert Bronze 54 posts since
May 18, 2007
Currently Being Moderated
Jun 1, 2007 8:52 AM in response to: Chase Seibert
Re: Roster Visualization: From Datagrid (Array) to Tree (XML)

Note: my implementation uses groups as the top level folders nodes, and users as the leafs. It also moves all offline users to an "Offline" group.

Vivian Bronze 20 posts since
Sep 9, 2007
Currently Being Moderated
Oct 1, 2007 7:01 AM in response to: Chase Seibert
Re: Roster Visualization: From Datagrid (Array) to Tree (XML)

 

Hi,

 

 

It would be so great if you could thought some insight..on the following..

 

 

How do you get your buddies list and update in the rooster ?.

 

 

How do I get the rooms list from the server.?

 

 

 

 

cheers

 

 

viv

 

 

More Like This

  • Retrieving data ...