6 Replies Latest reply on Sep 1, 2006 9:39 AM by Newsgroup_User

    Actionscript To Open A Word Doc

      I have an intereactive CD that I am working on and the client has asked for a button to be added that, when clicked, would launch a Microsoft Word document in Microsoft Word. In the past, I had used a button to launch a PDF with the "get URL" command, but apparently that is not going to work with a Word document. Anyone know a solution? Thanks to all for your assistance and I hope to hear from you soon!

        • 1. Re: Actionscript To Open A Word Doc
          Craig Grummitt Level 3
          if you use getURL, you are in essence asking the default browser to open the word document. how the browser reacts to that request is then dependent on which default browser your audience use.
          unless you go a different route by converting your docs to flashpaper for example, you have two alternatives i know of -
          you could set up a small exe to open the doc that would be ran through fscommand in the fscommand folder - which seems like a lot of stuffing around to me...
          or you can use a third party tool such as Zinc. With this you can open the word document directly or even display it inside your flash application using activex controls.
          • 2. Re: Actionscript To Open A Word Doc
            This should work for opening a word document in word.
            on (release) {
            Do you have word installed on your system ? If yes, keep the word document and .swf file both in the same folder.
            • 3. Re: Actionscript To Open A Word Doc
              Craig Grummitt Level 3
              from testing getURL just now with the two browsers i have installed - IE6 and FF1.5: in both cases the browser prompted the user to either open the document or save to disk. if open the document was selected, IE opens the word document inside the IE browser. FF opens the word document in word and a blank FF page stays open.
              • 4. Re: Actionscript To Open A Word Doc
                Level 1
                It seems that everyone is using the "getUrl" command to operate this task. I, too, was using this to start with and everything was working fine. I am on a Mac though and most of the recipients that will receive the Interactive CD will be on PCs. So I went and tested the files on several PCs. Most of the PCs operated the same way as Craig Grummitt had replied, promting to Open, Save, or Cancel once the button had been clicked to launch the Word document... but the main problem is that on two or three different PCs, the prompt window was BEHIND the Flash projector and not in FRONT of the projector. This was very annoying to the client. I agreed. Also, when I added a fscommand for the full-screen mode, none of the PCs could even see the prompt window, any web links or links to images within an assets folder. they functioned properly, JUST BEHIND THE PROJECTOR AND NOT IN FRONT. Why would some PCs bring up a prompt window in FRONT and some BEHIND? I really, really appreciate your help everyone. Thank you all.

                Todd Temple
                • 5. Re: Actionscript To Open A Word Doc
                  Craig Grummitt Level 3
                  i don't know the answer to that for sure but i do know this technique is problematic as you're more at the mercy of the user's individual configuration, and how browsers decide to react to a request to view a doc. a possibility - it may be reacting differently depending on whether microsoft word or the default browser is already open or not. or possibly your users are double clicking?

                  zinc by the way seems to always open the doc on top, but in case you need it it also gives you the capability to move windows in front or behind.
                  • 6. Re: Actionscript To Open A Word Doc
                    Level 7
                    if you use mProjector to build you exe then you get the benefit of some
                    nice extensions to AS.

                    in your case the openDocument call would be the one

                    here is the documentation for the call


                    in your FLA you just add code something like this


                    there are also methods to get the path to you file as well there is
                    sample code on the page linked above.


                    John Pattenden
                    Screentime Media
                    Flash Screen Saver, Application and Wallpaper tools