4 Replies Latest reply on Jun 12, 2006 10:04 AM by TaiChiGuy

    handler error using buddyAPI

    TaiChiGuy
      I've seen plenty of queries about using buddy API to open PDF files. I don't want to go over old ground, however, I haven't seen a reference to the particular error I'm seeing. I'm a Director novice and not at all comfortable with Lingo.
      I'm using Director MX 2004 and the buddyAPI Xtra.
      My script is:
      on mouseup me
      baOpenFile(the pathname&"DataSheets\ePassport.pdf","normal")
      end
      The error I get is:
      Script error: Handler not defined #buddyOpenFile

      Am I missing a declaration of the handler? Is my syntax flawed?
      Any assistance would be appreciated.

        • 1. Re: handler error using buddyAPI
          Level 7
          There is no handler declaration required. Have you placed the Xtra in your
          Director Xtras folder? Are you including it in your published work?


          "TaiChiGuy" <webforumsuser@macromedia.com> wrote in message
          news:e6judq$499$1@forums.macromedia.com...
          > I've seen plenty of queries about using buddy API to open PDF files. I
          don't
          > want to go over old ground, however, I haven't seen a reference to the
          > particular error I'm seeing. I'm a Director novice and not at all
          comfortable
          > with Lingo.
          > I'm using Director MX 2004 and the buddyAPI Xtra.
          > My script is:
          > on mouseup me
          > baOpenFile(the pathname&"DataSheets\ePassport.pdf","normal")
          > end
          > The error I get is:
          > Script error: Handler not defined #buddyOpenFile
          >
          > Am I missing a declaration of the handler? Is my syntax flawed?
          > Any assistance would be appreciated.
          >
          >
          >


          • 2. Re: handler error using buddyAPI
            TaiChiGuy Level 1
            Thanks for the prompt reply.

            Under the folder with my working DIR files I have another folder called "Xtras".
            There's a different Xtra in that folder for another function that is working properly, so I think they're in the correct place.
            Would reinstalling the Xtra help?
            • 3. Re: handler error using buddyAPI
              Level 7
              For authoring, I believe you will need a copy of the Xtra in the Xtras
              folder where director is installed (typically c:\Programs
              files\Macromedia..etc\Xtras

              Also, your error says the handler not found is called buddyOpenFile, but in
              your example you have called the baOpenFile function. Is this a typo?


              • 4. Re: handler error using buddyAPI
                TaiChiGuy Level 1
                Yes, it is a typo.

                Copying the Xtra to the application directory seems to have done the trick. Reader is launching and displaying the proper PDF!
                Thanks much for the help.