6 Replies Latest reply on Aug 11, 2010 10:27 AM by chris.campbell

    How To Open A Folder of native system

    vineet osho Level 1

      Hello Frnds can any body guides me how to open a folder of my system.actually i am using adobe air 2.0 for making a simple application in which i send and recived files.I simply uses File Class for extarct the nativepath of file.now i have path where my downloaded file stored.so Please tell me how to open the file or File Containg folder similary sevral aother web application does.

       

       

       

      Thanks In Advance

          Vineet Osho

        • 1. Re: How To Open A Folder of native system
          vezey

          For opening the file itself, AIR 2.0 gives you a method in the File class called File.openWithDefaultApplication():

           

          AIR-only openWithDefaultApplication

          ()

          method

          public function openWithDefaultApplication():void

           

          Language Version:

          ActionScript 3.0

          Runtime Versions:

          AIR 2

          Opens the file in the application registered by the operating system to open this file type

           

          The method description goes onto to talk about restrictions on file types in different operating systems.

           

          As far as opening a directory and performing some action on its contents, you can use the method File.getDirectoryListing(). This returns an array of File objects. You can test each File object with the isDirectory property, if you are interested in finding and dealing with sub-directories.

           

          Bill

          1 person found this helpful
          • 2. Re: How To Open A Folder of native system
            vineet osho Level 1

            Thanks A Lot For Your reply. Actully i  am  working on flex sdk 3.2 and using adobe air 2.0 still it can not support the method openWithDefaultApplication().my flex builder showing error on this.i check my application descriptor file of my air

            application which is  xmlns="http://ns.adobe.com/air/application/1.5.

            i tried to make it xmlns="http://ns.adobe.com/air/application/2.0 but it show error 102 of name space.

            can you explain how to make change my namspace of 1.5 to 2.0.so that i can run this method or there is some other problem of sdk.

             

             

            Thanks and Regards

                Vineet Osho

            • 3. Re: How To Open A Folder of native system
              tzeng Adobe Employee

              You need to update the AIR SDK inside the Flex SDK 3.2 to AIR 2.0 SDK.

              1 person found this helpful
              • 4. Re: How To Open A Folder of native system
                vineet osho Level 1

                Thanks for your reply.but as i told earlier that i am already using adobe air 2.0 but on adpplication descriptor it showing name space1.5 and i am using flex sdk 3.2.So pleaseguide me how to upgrade my adobe air runtime to 2.0 so that i t will show namspace 2.0 in appliation descriptor.

                 

                According to me the property openWithDefaultApplication is comes with latest sdk.Or i have to try this on flash builder 4.0.

                 

                Thanks and reagrds

                   Vineet Osho

                • 5. Re: How To Open A Folder of native system
                  vezey Level 1

                  The Adobe install guidance is to

                   

                  1. Close Flex Builder, if open
                  2. Extract the AIR 2.0 zip file into the Flex 3.2 SDK folder. On Windows the path will be something like

                   

                       \Program Files\Adobe\Flex Builder 3\sdks\3.2.0

                   

                       When prompted, overwrite the existing files with the new files from the AIR SDK.

                   

                    3. Restart Flex Builder and check it out. Flex Builder can be a bit of a bear at times with caching workspaces and not letting you actually work in your current environment. So if you are still having problems, one thing to do is to fully shut off your box and restart it. At least on Windows machines, doing a Restart does not always clear the system cache of unwanted values.

                  • 6. Re: How To Open A Folder of native system
                    chris.campbell Adobe Employee

                    Moved discussion to the Adobe AIR Development forum

                     

                    Here's a page that describes the "overlay" process for all desktop platforms.

                     

                    How to Overlay the AIR SDK for Use With the Flex SDK