2 Replies Latest reply on Jan 31, 2012 12:16 PM by NaBUru83

    Special features in file loaing/saving dialogs

    NaBUru83

      As I describe here, I'm building a web videogame on Adobe Flex. I'm loading and saving files with the FileReference methods load() and save(). I have two quick questions on them about special features:

       

      How can I tell the save dialog box (that is FileReference.save()) to use only a certain file extension? (I did that already with the loading.)

       

      How can I make the dialog boxes open a certain folder (like "C:/Games/myGame/"), rather than the system's default folder?

       

      Thanks!

        • 1. Re: Special features in file loaing/saving dialogs
          DonMitchinson Level 2

          From the docs:

           

          You can only specify a default filename for the save method

           

          When the file is saved successfully, the properties of the FileReference object are populated with the properties of the local file. The complete event is dispatched if the save is successful.

           

          The FileReference and FileReferenceList classes do not let you set the default file location for the dialog box that the browse() or download() methods generate.

          The default location shown in the dialog box is the most recently browsed folder, if that location can be determined, or the desktop.

          The classes do not allow you to read from or write to the transferred file.

          They do not allow the SWF file that initiated the upload or download to access the uploaded or downloaded file or the file's location on the user's disk.

          • 2. Re: Special features in file loaing/saving dialogs
            NaBUru83 Level 1

            Ok, I did the default filename trick. Thanks!