1 Reply Latest reply on Jan 23, 2011 5:06 AM by Ned Murphy

    Open PDF from Flash (AS2)?

    mike_869 Level 1

      I have a button inside my flash movie and I would like to give the user the option to download a pdf on clicking the button.

      I am using Flash CS4 and AS2.

       

      What options do I have if I want one of these-

       

      a) Open the pdf in a new browser window/tab

       

      b) Give user the option to save the pdf to their computer instead of it opening in the browser automatically.

       

      I am not smart with coding so any help with the code would be appreciated. Thanks.

        • 1. Re: Open PDF from Flash (AS2)?
          Ned Murphy Adobe Community Professional & MVP

          The easiest approach is to use getURL and open the pdf in another browser window...

           

          getURL("your.pdf", "_blank");

           

          For the second part you could use the FileReference class to provide downloading, but it is more complicating to configure.  The getURL approach will give the same net result since the file is downloaded and saveable via the browser window anyways.