navigateToURL to open a local pdf file...

I have a problem with the following code. I searched yesterday for solutions open a PDF in a browser in the Flash window. I found different posts on the forum about using navigateToURL and looks that people succeed. It seems very simple to do, but whenever I try to open the pdf file, I get an error 404 in the browser, what is happening at this link:

http://file.PDF (which obviously does not exist)

My pdf file is sitting in the same folder as the swf file that attempts to launch. Is it possible to use navigateToURL and specify that the file is local? If not, is there another way to open a PDF from a folder? Or am I just a fool and I'm missing something very obvious?

Thanks for any help,

Chipleh

Code:

myBtn.addEventListener (MouseEvent.MOUSE_DOWN, openPDF);

function openPDF(event:MouseEvent):void {}
var url: String = "file.pdf";
var myRequest:URLRequest = new URLRequest (url);
try {}
navigateToURL (myRequest, "_blank");
}
{} catch (error)
trace ("Error occurred!");
}
}

Have you tried Windows Projector (from the publication settings)?

Tags: Adobe Animate

Similar Questions

  • How can I associate a local Pdf file with a button in Flash?

    Hello everyone,

    This is my first question in this case and hope that my English is not so bad...

    I am currently working on a Flash project for a client and this is my problem,

    I have to use a button that opens an external pdf file. But I can't find any solution :/
    I already tried to use fscommand with "exec" and also getURL

    Here is my code:

    PDF_Button_001.addEventListener (MouseEvent.Click, PDF_Button_001_onRelease);

    function PDF_Button_001_onRelease(e:Event)

    {

    getURL ("file://PDFs/PDF_001.pdf", "_blank")

    }

    Any help please :)

    Security sandbox default Flash to block this kind of thing. This has made many people very angry and been widely regarded as a bad move. To make this work you must manually add the local drive letter to the list of trusted locations on each computer that is running Flash content.

    When it works, I would advise against using getURL. Call a JavaScript function instead allows much more control over the way in which the PDF document is opened.

  • How to open a word/pdf file to MS via boolean?

    Hi all

    I need advice to open MS word/pdf file through boolean in VI. I'm just providing my system with the software manual.

    I put a Boolean value for control.

    Please guide me...

    See this

    And also this example

  • I am running Xp. When I try to open a. PDF file, I get "not a Win32 application valid?

    I run Windows XP.  When I try to open a. PDF file, I get "not a Win32 application valid?  The file type is SA4 SOF.  I try Adobe 10 but no luck.  Help would be appreciated.

    If you use Adobe Reader, you can try Adobe Support at http://www.adobe.com/support/.

    Good luck...

  • does anyone know how to open 2 separate PDF files so that they can be viewed alongside?

    does anyone know how to open 2 separate PDF files so that they can be viewed alongside?

    Hi ihorm29887441,

    Try to uncheck the "documents open as tabs in the same window" under "Edit > preferences > General".

    Then restart the player.

    Let me know if it works for you.

    Kind regards

    Meenakshi

  • How can I open 2 different pdf files and show them separately on 2 different monitors?

    How can I open 2 different pdf files and show them separately on 2 different monitors?

    Hi thomasr1953,

    You will need to uncheck 'Open documents as tabs... new' under ' Edit > Preferences > general "so that the two PDF files open in separate windows.

    Then, you can drag the second file to the second monitor.

    Kind regards

    Ana Maria

  • I recently tried to open a new pdf file using an existing program Acrobat Reader and it changed the extensions of all programs and .pdf desktop icons, making them unusable.  I uninstalled Reader and extensions have been fixed.  But when I installed the dr

    I recently tried to open a new pdf file using an existing program Acrobat Reader and it changed the extensions of all programs and .pdf desktop icons, making them unusable.  I uninstalled Reader and extensions have been fixed.  But when I installed the drive again - the latest version (DC) it happened again.  How can I fix it?  I am on Windows 7

    Hi donaldm78047015,

    Try the solution mentioned in this KB doc. https://helpx.Adobe.com/Acrobat/KB/application-file-icons-change-Acrobat.html

    Kind regards

    Nicos

  • Our InDesign seems to have lost the ability to open/modify a PDF file. Any idea on why this might have happened or how to fix it?

    We had to install InDesign CS6 recently on a Windows 8 machine and after using the program for a few days/weeks successfully, the user pointed out that it can is no longer open / edit a PDF file. I was wondering if anyone else has had this problem and how can I solve this problem. If I uninstall and reinstall the program I'll be able to use my existing license?

    InDesign has never been able to open or to modify a PDF file. Illustrator can do it, somehow, but unless the PDF file has been created in Illustrator and contain the original Illustrator file information, it is not a good idea.

    PDF has been designed as an end-format and is not really intended for further editing.

  • Adobe Reader does not open local PDF files / online

    Hello! When I try to open local or online PDF files, Adobe Reader opens aandd... rest like this. The program does not show me the document, and then closes.

    I uninstalled and installed again, but the problem persists. This happens with all of my pdf files.

    If you are on Windows (which we don't know), you can try to use Windows Explorer to navigate to C:\Program Files (x 86) \Adobe\Reader 11.0\Reader, and then double-click Eula.exe and accept the license agreement

  • When I try to open a linked pdf file, Firefox asks me where I want to save it!

    Firefox has never used to do this. It does with our intranet and other external sites. I don't want to save the pdf file. It's very exasperating, and if it is not resolved, I will change to another default browser.

    A recent Firefox update to v 23 also causes our site Intranet https must be blocked. You must select allow. Whenever we go to a different page the same thing happens. It is hopeless and totally inapplicable. How to return to v-22?

    In order to change the default reader for PDF files (allow Firefox open the PDF file instead of save locally), follow these steps:

    1. Go to Tools > Options (or Firefox > Options).
    2. In the Options window, select the Applications tab.
    3. In the Search box, type PDF. You should find Portable Document Format (PDF).
    4. On the right referring, you should find a column of Action . To select your favorite PDF reader. In order to view PDFs in Firefox, choose Preview in Firefox.

    The report please come back shortly.

  • I can't open my stored PDF files

    A little more in recent weeks, I was not able to open my PDF files. A lot of them that I use frequently to print. I get a message that ADOBE Reader that the file cannot be opened because it is not supported. I'm confused about this because I opened them so many times before.

    I have a fairly new computer Windows 8.1. Please notify.

    What you see when you open a file in Wordpad?

  • Opening an existing pdf file PDF reader problem

    Hope someone can help to understand what is happening with my pdf reader, is be until this morning, I could see a pdf of the school and this pm the same file, it creates an error to open, however, yesterday I bought the service to convert PDF to WORD or EXCEl files and it works fine the same pdf file that gives me problems to open can be converted to WORD and I see the file again, but open as pdf do not work. apparently seems to be few files that does this all of a sudden. Any ideas how to solve this problem?

    Hi Varias153,

    Please let me know the version of point exact of the reader & operating system installed on your computer?

    If you are using windows OS, open Reader, go to the Help menu and repair the installation.

    Kind regards
    Nicos

  • Open or save PDF files crashes Photoshop CS4

    Whenever I try to open a PDF file or save a file (for example a flattened PSD or a JPG) as a PDF from Photoshop, it will crash and give me an error report.  My Macbook Pro is only 2 months old, so I thought that maybe CS4 was simply too old for her, but all the other aspects of the program works perfectly and only manipulation of PDF files will give me this message and cause the crash.  However, I just installed Adobe Acrobat Reader DC earlier today right before trying to save/open these PDF documents, so I don't know if this has something to do with this issue.

    In addition, I tried to convert a JPG file to PDF in Bridge and also, he crashed and gave me an error.

    Yosemite OSX 10.10.1 and already updated CS4 11.0.2 using (and had this error before and after this update).

    I rarely have problems with Photoshop, so I'm not very familiar with a problem like that.

    After various attempts at solving problems, I discovered that the problem was caused by a corrupted font, that I discovered by validating and accordingly to remove the incorrect font files.

    I wanted to put it out there, just in case it helps someone else who might have the same problem.

  • HOW to KEEP the ELEMENT 6 opening / backup all PDF files.

    All of a sudden my system (Windows 2010) records all PDFs on Photoshop Elements 6. and open all PDFs directly in 6.

    1. How can I stop it?

    2. If nothing else how to disable "6" for now?

    Have you tried right-clicking on one of the pdf files, select Properties , and then on the general tab, select change to the right where it says opens with


    When you say windows 2010, what version of windows is it?

    Something like windows vista, windows 7, windows 8/8.1 or windows 10 preview?

  • why I can't open a downloaded .pdf file?

    When I download a PDF from the Internet and save it, the name and the file extension pdf all them seem to be in order.  However, when I try to open the file I get the following error message: "Acrobat file cannot be opened" site/folder/name.pdf "because it is not a type of file supported or because the file has been damaged."  I use Adobe Acrobat XI for Mac.


    I was able to open other pdf files that are not downloaded from the Internet without problem.


    After I download a PDF from the Internet I can't use select all to select the document to use in Pagis.


    Because I frequently need to access pdf files downloaded from the Internet, the current situation is totally unacceptable.


    Help!

    This happens usually if he was transferred incorrectly or inconsistent with the download, probably the first system. This happens with all PDFs or just a little? Have a link so that we can try? What operating system and the version of Acrobat are you using?

    With regard to the problem of download, people sometimes download a PDF as ASCII file and it's a binary file. Download ASCII corrupts the file. The first need is to see if it's a problem of downloading or something else, then the URL would be helpful.

Maybe you are looking for

  • I used to be able to accept or block all the cokkies manually, if this option is gone I won't use Firefox

    I used to be able to accept or block all cookies manually... it seems that firefox offers more this option in tools-options-privacy. Is there a configuration that would allow this again? If not then I'm not going to use the browser firefox web... It

  • Measuring frequency

    Hi, first of all, happy new year! I have two problems and I hope that someone can help me. Well, I need to measure the frequency of ill-defined but periodic signals (filtered biopotentiels) and I have to do with an acquisition of data USB-6008. The m

  • Draw freehand on the container to Image Vision - are part of the Image

    Hello people. You want to do a random draw on the fly on a 8-bit grayscale image into a container of Vision.  I then want to merge this draw with the actual image.  I suppose that the draw is an overlay.  Vision has a superposition of merge command t

  • T420 does not take into account the case of letters power on password

    Hello! just noticed that when I boot my laptop with power on password, it accepts the password regardless of the case of the letters I get. For example, if the password is set to "qwerty" it starts with "qwerty", "QWERTY", "qWeRtY", "QWErty" and so o

  • OfficeJet Pro K5400 printer.

    I get a light "Empty cartridge" (flashing) Cyan Ink Division even if I installed a new cartridge.  I reinstalled the cartridge several times (> 10) without success. I use Windows 7 Pro. with SP1. The printer is connected to your PC via a network, no