Setting the root directory on a FileSystemTree control in Adobe AIR
The following example shows how you can set the initial directory for the Adobe AIR FileSystemTree control by setting the directory property to a File object, which in this case is the user’s document’s directory.
Full code after the jump.
<?xml version="1.0" encoding="utf-8"?> <!-- http://airexamples.com/2008/12/13/setting-the-root-directory-on-a-filesystemtree-control-in-adobe-air/ --> <mx:WindowedApplication name="FileSystemTree_directory_test" xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalAlign="middle" title="{tree.directory.nativePath}"> <mx:FileSystemTree id="tree" directory="{File.documentsDirectory}" width="100%" height="100%" /> </mx:WindowedApplication>

Hi Peter,
I am trying to set the custom directory, let’s say “C:\Work”.
Still trying :(
I was wondering if you give me some advice how to do that.
Thanks.
Code below doesn’t work properly
<mx:FileSystemTree id="fsTree" directory="{workDir}" width="574" height="144">The solution is found: