2 Replies Latest reply on Dec 11, 2008 10:26 AM by urlolibero

    Open local file using fileReference in AIR

      I just started to build an AIR application and am facing a very basic problem. I need a File->Open menu that pops up a file open dialog and returns the location (including folder) of a file to edit.
      - I tried the fileReference.browse() but this does not seem to provide the full path to the file
      - I tried fileReferenceList.browse() but the SELECT event does not fire on my Mac under (seem to be a bug reported last October: http://bugs.adobe.com/jira/browse/SDK-13220)

      Now, how can I achieve this in AIR? I assume opening local file is a pretty standard operation for desktop application, any suggestion/tip?

      thanks
      *P
        • 1. Re: Open local file using fileReference in AIR
          peterent Level 2
          You don't want to use FileReference in AIR for what you are doing. Check the documentation for the mx.controls.FileSystemTree. There are actually a handful of AIR-specific controls for accessing the file system. There isn't a "File Open" dialog per se; you can build your own out of the controls given. I will say that the controls will have the flavor of the OS (so on a Mac the controls will behave similarly to the way a Mac accessses and browses for files).
          • 2. Re: Open local file using fileReference in AIR
            urlolibero
            HI! i have the same problem but not for an air application..
            my problem is how can pass the name of selected file using FileReference class to a variable
            ( also.. is it possible pass the entire path with namefile? (i.e. " \web\files\namefile.ext")
            warning, i begin tio use flex 3 from 4 days only!
            thanks


            1 person found this helpful