7 Replies Latest reply on Jun 2, 2006 12:35 PM by poonamsheth

    How to call the operation-system  "Save As"  Dialogue Box

    fighttodeath
      i am using Flex 2.0 Beta 2.
      My problem is so: i set a button control in the pannel layout control, then i want to write such a function in AS 3.0.If i press the button , it triggers the function,in the function i want to popup the operation-system "Save as " dialogue box, then i chose a location ,the function will pick it .Can i do it?and how can i do it?
      can some one tell me,thanks.
        • 1. Re: How to call the operation-system  "Save As"  Dialogue Box
          AnotherInsanity
          Quite honestly, I'm not sure what you want here...

          let's try and break this down some:

          1. You want an ActionScript 3 function.
          2. You have a button and when the button is pressed you want the function to be triggered.
          3. The function pops up an alert for save as.
          4. You choose a location to save.
          5. The function will save .... something somewhere?

          I can help with the first parts (i think).

          OK so you draw a button as usual, go to your mxml code, put in the button code

          quote:

          click="functionname();"


          which will initiate the function:

          quote:

          function functionname() { }


          for what do with your alert within the function I reccomend you start by reading this article
          • 2. Re: How to call the operation-system  "Save As"  Dialogue Box
            fighttodeath Level 1
            yes,you just exactly descriped what i mean.
            And my primary problem is:how to popup the "save as" dialogue box of the operation system from flex directly. Whether i can do it or not?
            If i can,how?
            So my operation system is windows 2000.
            and thank you for you information so much.
            • 3. Re: How to call the operation-system  "Save As"  Dialogue Box
              AnotherInsanity Level 1
              sorry i dont know if that's possible... actually i think it is possible but is so complex that there's no good reason for doing it - basically it would involve passing information to another scripting language or programming api and using that to trigger the save as box....

              why not just use the alert boxes within flex?
              • 4. Re: How to call the operation-system  "Save As"  Dialogue Box
                Level 7
                "fighttodeath" <webforumsuser@macromedia.com> wrote in message
                news:e49irf$j60$1@forums.macromedia.com...
                >i am using Flex 2.0 Beta 2.
                > My problem is so: i set a button control in the pannel layout control,
                > then i
                > want to write such a function in AS 3.0.If i press the button , it
                > triggers
                > the function,in the function i want to popup the operation-system "Save
                > as "
                > dialogue box, then i chose a location ,the function will pick it .Can i do
                > it?and how can i do it?
                > can some one tell me,thanks.
                >

                You can do it using navigateToURL()--it'll pop up a Save As dialog box if it
                can't display the file in the browser.

                --
                Manish Jethani
                Developer, Flex Framework
                Adobe Systems Inc.


                • 5. Re: How to call the operation-system  &quot;Save As&quot;  Dialogue Box
                  fighttodeath Level 1
                  The navigateToURL() function just navigates to another page, can it open the save as box?
                  Can you show me a code segment.
                  Thank you
                  • 6. Re: How to call the operation-system  &quot;Save As&quot;  Dialogue Box
                    Level 7
                    "fighttodeath" <webforumsuser@macromedia.com> wrote in message
                    news:e4e57e$kd5$1@forums.macromedia.com...
                    > The navigateToURL() function just navigates to another page, can it open
                    > the save as box?

                    If you call navigateToURL() pointing it to, say, a .exe file, it'll open the
                    Save As dialog.

                    --
                    Manish Jethani
                    Developer, Flex Framework
                    Adobe Systems Inc.


                    • 7. Re: How to call the operation-system  &quot;Save As&quot;  Dialogue Box
                      poonamsheth Level 1
                      different methods for navigation:

                      * NavigateToURL – A thin wrapper around the existing TWebBrowser.Navigate method that only deals with standard URLs and intelligently sets the cache and history flags. The main difference between this method and the underlying contol's method is that our method blocks until the required document has completely downloaded.
                      * NavigateToLocalFile – This convenience method simply adds the required file:// protocol to the URL before calling NavigateToURL.
                      * NavigateToResource – Loads HTML code from the program's (or other module's) resources into the browser. Overloaded versions of this method allow resources to be accessed by instance handle (like the TResourceStream constructors) or by providing the name of the module containing the resources.

                      NavigateToLocalFile and both versions of NavigateToResource work by creating the required URL from the parameters passed to them and then calling NavigateToURL to do the actual navigation. Let's first look at how NavigateToURL handles the navigation then come back to look at how the other routines put the URLs together.

                      note :

                      though this is not the solution to ur problem,
                      but looking at this link, u will understand how does it save the documents and all ,

                      http://www.delphidabbler.com/articles?article=14