A Flash Developer Resource Site

Results 1 to 1 of 1

Thread: Open folder / file from datagrid

  1. #1
    Senior Member
    Join Date
    Sep 2000

    Open folder / file from datagrid

    Greetings all,

    Got this from the adobe site and it works fine. I am trying to do two things:

    1. Open a directory on my local network, call it X Drive
    2. Click a cell in the datagrid to launch the file / open the subfolder

    Any tips will be appreciated.

    <?xml version="1.0" encoding="utf-8"?>
    <mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical">

    private function onBtnClick(event:MouseEvent) : void

    var dir : File = File.desktopDirectory;
    //var dir : File = File.desktopDirectory.resolvePath("path"); //if you want fixed path directory information
    dir.addEventListener(FileListEvent.DIRECTORY_LISTI NG,onDirectoryListComplete);

    private function onDirectoryListComplete(event : FileListEvent) : void
    var list : Array = event.files;
    dgList.dataProvider = list;


    <mx:Button label="List" click="onBtnClick(event)" />

    <mx: DataGrid id="dgList" height="400" width="950"/>

    Last edited by designforce; 01-10-2011 at 07:31 PM. Reason: typo

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width

HTML5 Development Center