header
ask question
Click here to ask Question Now Its free No registration required. Flash, Flex, Flash Media Server, ActionScript,Adobe Air. Most questions receive a response in an hour.
shyre
Points:200
Posts:2

12/17/2009 7:27:47 AM

Title: Flex Server Browser


I need to Design a Component showing files from various folder in the server..
I will be getting an xml file based on the xml file i need to show various elements ie folder subfolders,and their corresponding elements in the panel with detail and tiled view.

Any one please help me in startup.



1
Lexi
Points: 0
Posts:0
12/17/2009 9:14:33 AM



To create a server browser you need to provide an xml file as data provider to Tree component in flex. To load that xml I am using httpservice.

Your xml structure should look like this.

<?xml version='1.0' encoding='utf-8'?>
<folders> 
<dir name='Folder 1'> 
<dir name='Fruits'> 
	<dir name='Orange'/> 
</dir> 
<dir name='Juices'> 
	<dir name='Apple'/> 
	<dir name='Pineapple'/> 
</dir> 
</dir> 
<dir name='Phones'> 
	<dir name='Samsung Android'/> 
	<dir name='iphone'/> 
</dir> 
</folders>

Code in flex to load and populate the xml file as tree component in flex.
 
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="loadTreeXML.send()">
    <mx:HTTPService id="loadTreeXML" url="treexml.xml" resultFormat="e4x" />
    <mx:Tree y="10" width="278" horizontalScrollPolicy="auto" height="295" id="mytree" dataProvider="{loadTreeXML.lastResult.dir}" horizontalCenter="0" labelField="@name"/>
    <mx:Button y="313" label="Update XML Data" click="loadTreeXML.send()" horizontalCenter="0" width="188"/>
</mx:Application>


Post your Reply
Name  

Email

Type your Reply or Answer

Are you human? What is 1+11+0 



Members Login

Email  
Password
Forgot Password





This website focus on: Flash | Flex | FMS | RED5 | WOWZA | Flash Media Server | Adobe AIR | ActionScript,Flash Solutions | Flash Question | Flash Answers | Flash Developers | Flash Problem, Flash Help, Flash bugs, Flash workaround | Flash Blog | Flex Question Answers | Flash Forum | Flex Development | Actionscript development | Flash development | Adobe AIR development
Copyright © 2008 AskMeFlash.com. All rights reserved. Privacy Policy | Terms & Conditions