Error opening pdf file, but then it still opens

I have problems when I open a pdf file. I use the code below to open a pdf file.

on mouseUp me
Acro = bafindapp ("pdf")
If acro = empty then
acrofile = me.pPDF
alert 'this program was unable to find suitable for your system software to open a PDF document. It will open www.adobe.com, where you can download a free viewer.
goToNetPage " " http://www.Adobe.com "

on the other
Open the moviePath me.pPDF & "Resource\" with acro
end if

end

When it comes on a button, adobe reader software will open, but gives an error stating that "there was an error opening this document. This file is not found. »


When I hit the button on the advice of the error, the PDF opens.

No idea why I get this message even if the pdf file opens after rejecting the message would be appreciated.

The reason why I assumed, or asked, if it was only Windows is due to your use of the forward slash as the separator file. To make the cross-platform script try the following:

on mouseUp me  acro = baFindApp("pdf")  if ( acro = EMPTY ) then    alert "This program was unable to find a suitable program on your system to open a PDF document. It will open www.adobe.com, where you can download a free viewer"    goToNetPage "http://www.adobe.com"  else    mPath = _movie.path    tFile = mPath & "Resource" & mPath.char[length(mPath)] & me.pPDF    if baFileExists(tFile) then      OK = baOpenFile(tFile, "normal")      if ( OK < 32 ) then        -- see docs for numbers and their meaning        alert "Error opening file:" && OK      end if    else      alert "File not found:" &RETURN& tFile    end if  end ifend

Tags: Director

Similar Questions

Maybe you are looking for

  • Pavilion g7 1070US: installation of new SSD

    I'm helping a friend with a HP Pavilion g7 1070US laptop. His original hard drive crashed and we bought a PNY 960 GB SSD drive to replace its old WD 500 GB. We were able to restore his old Win 7 because while trying to create a USB startup device the

  • Z580 keep losing wifi connection

    Hello I have a Z580 running on Windows 8. When the top is closed and reopened the Wifi connection is lost and not connecting not for about 2-3 minutes... What I do need to update a driver or is there another soloution - its driving me crazy! Thanks i

  • Portable drive Windows 7 computer repair software

    Need help to find the right place to download and burn a CD (or USB) to attempt to repair the hard disk. I have a HP Notebook 2000-410US Windows 7 64 bit.  Diagnostic test does not have the short DST.  I know that it means that I have to replace the

  • Patches

    Once I have install a patch in a game. This patch will stay with this game even after I have uninstall?

  • Hotmail emails open so they can be read.

    original title: Hotmail Hotmail emails open so they can be read. It is happening now for more than a week now.