1 Reply Latest reply on Oct 9, 2006 6:32 PM by FasterPastor

    Lingo to open multiple pdf's

    blueiz
      Heeeeelllllllpppppppp!
      I have a movie where the user clicks on a thumbnail picture to open a pdf file of the same image. I have two script that work for to open the first file, however I don't know how to change the pdf variables to open the other pdfs.

      Working Script 1:
      global pdf_filepath, adobePath

      on mouseUp me

      _player.open((pdf_filepath), adobePath)

      end

      Script 2:
      global currentfilepath, adobePath, pdf_filepath
      on startMovie
      --sets value of currentfile path to the exact path to current movie
      currentfilepath=the moviepath
      --adds route to pdf file to current file path
      pdf_filepath=currentfilepath&"dswmedia\StBernardParishHistory.pdf"
      --preset value for adobe application executable
      adobePath="C:\Program Files\Adobe\Acrobat 7.0\Reader\AcroRd32.exe"
      end startMovie

      How do I change the pdf filepath variable????
      I tried the following
      if sprite(21).member="Demographics" then
      pdf_filepath=currentfilepath& "dswmedia\StBernardParishDemographicsandUrbanForm.pdf"

      still no work...
      Godammmit, I'm going crazy if any one can help I'll give you ONE MILLLLLION dollars!

        • 1. Lingo to open multiple pdf's
          FasterPastor
          Short answer that may possibly help: Make sure the following is above (i.e. outside) the "handler" where you have the code you're trying (and yet in the same script):

          global pdf_filepath

          The code you showed after "I tried the following" ... seems sound. So, we need to question where you are putting that code... ? Is it being placed in a script that has the correct global variable declaration ( "global pdf_filepath" ) somewhere in it? If not, you can edit a _local_ variable of the same name as a _global_ variable, and the global variable of the same name will not be affected.

          Note that globals must be declared (to allow for access) _outside_ of any handlers, yet in the _same_ script. Every script that wishes to access a given global var must declare it in that script, outside of any handlers in the script.

          For more info, search the help system for details on global variables.

          What is a "handler"? There are several predefined ones (see some below), and you can also create your own, of almost any desired name, and then "call" on them as needed.

          Here are some examples of predefined ones, with a global variable "called" properly above them:


          global pdf_filepath

          on mouseUp me
          --code
          end


          global pdf_filepath

          on exitFrame
          --code
          end



          If this works for you, please contact me for info on where to send the million dollars. :)