10 Replies Latest reply on Feb 25, 2009 11:29 AM by Newsgroup_User

    PDF n a cdrom

    vrthree
      Is it possible have a link with a director movie that opens a PDF placed in a local folder? I was going to have a link to an on line version but my client wants to make sure people without a webconnection can see the material.

      Thanks
        • 1. Re: PDF n a cdrom
          Level 7
          Yes, this is possible. Did you search the forum before posting?
          • 2. Re: PDF n a cdrom
            vrthree Level 1
            Can someone explain this script to me, I am not a programmer; where do i get the buddy api xtra?

            see
            http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=11&catid=186&threadid =1406912&highlight_key=y&keyword1=pdf

            property myFolder --the folder that contains the PDF
            property myPDF --the PDF to be launched

            on getPropertyDescriptionList
            description = [:]
            description.addProp(#myFolder,[#format:#string,#default:"PDF_folder",#comment:"Folder containing PDF"])
            description.addProp(#myPDF,[#format:#string,#default:"PDF_file",#comment:"PDF file to load"])
            return description
            end

            on mouseDown me
            baOpenFile( _movie.moviePath & myFolder & "\" & myPDF, "" )
            end
            • 3. Re: PDF n a cdrom
              Level 7
              > Can someone explain this script to me, I am not a programmer;

              There is an explanation in the post you cited - which part of it don't
              you understand?

              > where do i get the buddy api xtra?

              Did you search the forum (or web) before posting?
              • 4. Re: PDF n a cdrom
                vrthree Level 1
                I have found the buddy api xtra and expect bu reading the other post that itis pretty straight forward. In the past I have had a script that searches the users system for quicktime and down loads it off the cdrom if they havn't, is there something similar for adobe acrobat?
                • 5. Re: PDF n a cdrom
                  Level 7
                  > I have found the buddy api xtra.

                  OK, good.

                  > In the past I have had a script that searches the
                  > users system for quicktime and down loads it off the cdrom if they havn't, is
                  > there something similar for adobe acrobat?

                  You can use Buddy API's baFindApp() to determine whether there is an
                  application associated with a file type, so in your case you might use
                  something like:
                  PDF_app = baFindApp("pdf")
                  if PDF_app = EMPTY then
                  -- no installed application found, run Reader installer
                  OK = baRunProgram("fully_qualified_path_to_installer", "normal")
                  if OK < 32 then
                  -- error running installer
                  alert "Error running Reader installer:" && OK
                  end if
                  end if

                  However, if you are also using baOpenFile() then you are up to 3
                  functions (including baFindApp and baRunProgram) and so will need a
                  licence (or tolerate the nag screen)
                  • 6. Re: PDF n a cdrom
                    vrthree Level 1
                    Can you explain to me how I add the script below to a sprite, I cannot find it in the list. I am not a programmer so i need it to be explain in very simple terms

                    property myFolder --the folder that contains the PDF
                    property myPDF --the PDF to be launched

                    on getPropertyDescriptionList
                    description = [:]
                    description.addProp(#myFolder,[#format:#string,#default:"PDF_folder",#comment:"Folder containing PDF"])
                    description.addProp(#myPDF,[#format:#string,#default:"PDF_file",#comment:"PDF file to load"])
                    return description
                    end

                    on mouseDown me
                    baOpenFile( _movie.moviePath & myFolder & "\" & myPDF, "" )
                    end
                    • 7. Re: PDF n a cdrom
                      Level 7
                      Make sure that the script type is set to #behavior. Then just drag the
                      script onto the sprite you want to add it to.
                      • 8. Re: PDF n a cdrom
                        vrthree Level 1
                        Sorry, I cant find the scrip to drag it!
                        • 9. Re: PDF n a cdrom
                          vrthree Level 1
                          This is the script I have, but it does not seem to work, I am not getting any errors when saving the script and I have made sure that it is a behavour script!

                          property Zandini
                          property zandini_paypoint_inv03


                          on getPropertyDescriptionList
                          description = [:]
                          description.addProp(#myFolder,[#format:#string,#default:"PDF_folder",#comment:"Folder containing PDF"])
                          description.addProp(#myPDF,[#format:#string,#default:"PDF_file",#comment:"PDF file to load"])
                          return description
                          end

                          on mouseUp me
                          baOpenFile( _movie.moviePath & Zandini & "\" & zandini_paypoint_inv03, "" )
                          end
                          • 10. Re: PDF n a cdrom
                            Level 7
                            Quit changing the code. This code works just fine. Paste it and don't
                            mess with it (unless you need to fix errand line feeds from the forum
                            software):

                            property myFolder --the folder that contains the PDF
                            property myPDF --the PDF to be launched

                            on getPropertyDescriptionList
                            description = [:]


                            description.addProp(#myFolder,[#format:#string,#default:"PDF_folder",#comment:"Folder
                            containing PDF"])

                            description.addProp(#myPDF,[#format:#string,#default:"PDF_file",#comment:"PDF
                            file to load"])
                            return description
                            end

                            on mouseDown me
                            baOpenFile( _movie.moviePath & myFolder & "\" & myPDF, "normal" )
                            end