creating Tree structure with data from the database with PHP programming.here there are three things to consider i have given them as points below follow them
1. define a http servive in ur flex application with properties resultFormat and result, including the url (the data from database or program)
<mx:HTTPService id=”newtree” useProxy=”false” url=”http://wdoserver/kumar/treeread.php” resultFormat=”e4x” result=”readMe(event)”/>
2. The PHP program which sends data as an xml it is given below, for progrmming write the similar tags in echo it gives out.
3. get that data in ur tree tag with properties dataprovider , showroot ,and labelfield
<mx:Tree x=”10″ y=”10″ width=”330″ height=”523″ labelField=”@data” showRoot=”false” id=”contenttree” change=”treeChanged(event)”>
finally get that result in a method as defined readMe(event) in httpservice
private function readMe(event:ResultEvent):void
thats it ur tree structure from database is ready now play with it.
As few readers requested some code example i am giving it here.Enjoy
Code Example: Download Here