3 Replies Latest reply on Jul 5, 2007 4:40 AM by Xchristine

    can flash write documents

    Xchristine
      Hello,

      I would like to know if it is possible for a standalone flash application to output data into a text document (create the file and write in it).

      thank you.
      Christine
        • 1. Re: can flash write documents
          Greg Dove Level 4
          Its not possible for flash to do this directly. You can save data into a local sharedObject (so its possible to persist some information between times when the standalone projector is run), but its not the same as direct manipulation and creation of arbitrary files.

          Stopgap measures
          You could try embedding your flash as an activex control inside, say, a microsoft office document and calling VBA methods in the MS office document to save with fscommand from flash (I don't know if you can use the externalInterface class here) with the data you want to save. I've not done this but I believe its possible.

          Another option (very limited, but sometimes useful - could be used for testing before writing the saving support functionality for example) is that you can put data into the clipboard from flash - so you can do that and then instruct the user to paste into another application, such as notepad, word etc.

          "Real" options for file system access
          as2:
          You can do this with projector enhancements. Options: Jugglor, swf studio, Zinc, Screenweaver etc.

          For as3 its possible to use Adobe's AIR which provides a local filesystem API.
          • 2. Re: can flash write documents
            Level 7
            As GWD mentioned, a wrapper app may be your best bet if you need actual file
            system access. I just wanted to mention that you could also use Adobe's own
            Director. There's also PHP if your file can be stored on a server.

            --
            Dave -
            Head Developer
            http://www.blurredistinction.com
            Adobe Community Expert
            http://www.adobe.com/communities/experts/


            • 3. Re: can flash write documents
              Xchristine Level 1
              Thank you for your very clear answers
              The data cannot go to a remote serveur.

              The idea is to have a standalone application that collects data through forms (validate the data with the help of external xml data) and outputs it in a rft document. It was meant to be a web application (that's why i'm in charge) until we learned that it should be local. Now, I need to know the right way to do it even if it's not me who will develop it. it should work on PC or MAC

              Director could do that ???
              Thank you