Linking Button to PDF

Hi guys, so I am definitely new at AS3 and Flash in general, but I have to do a project for work that requires me to build a portion of a website in Flash. I need to link a button to a PDF document that will be stored on our site on the internet. So far I have been able to successfully write code that allows me to link one of the buttons:
var pdfURL:URLRequest = new URLRequest("images/Other/LetterDaniels.pdf");
//PDF Link
function pdfLink(event:MouseEvent):void {
    navigateToURL(pdfURL,"_blank");
{Text.daniels_btn.addEventListener(MouseEvent.CLICK, pdfLink);
Then I simply copied and paste this code and change it for the second button:
var pdfURL:URLRequest = new URLRequest("images/Other/LetterDaniels.pdf"); (line 1)
//PDF Link (line 4)
function pdfLink(event:MouseEvent):void {
    navigateToURL(pdfURL,"_blank");
{Text.daniels_btn.addEventListener(MouseEvent.CLICK, pdfLink); (line 9)
var pdfURL:URLRequest = new URLRequest("images/Other/LetterColnar.pdf");
//PDF Link
function pdfLink(event:MouseEvent):void { (line 16)
    navigateToURL(pdfURL,"_blank");
{Text.colnar_btn.addEventListener(MouseEvent.CLICK, pdfLink);
When I do so, however, I get a series of error messages:
Scene 1, Layer 'AS', Frame 1, Line 12    1151: A conflict exists with definition pdfURL in namespace internal.
Scene 1, Layer 'AS', Frame 1, Line 16    1021: Duplicate function definition.
ComponentShim (Compiled Clip), Line 1    5000: The class 'fl.core.ComponentShim' must subclass 'flash.display.MovieClip' since it is linked to a library symbol of that type.
ComponentShim (Compiled Clip), Line 1    5000: The class 'fl.containers.UILoader' must subclass 'flash.display.MovieClip' since it is linked to a library symbol of that type.
Can someone please help me with the code so that I can get rid of these error messages? I basically need three buttons to link to three different PDF files:
Text.daniels_btn to images/Other/LetterDaniels.pdf
Text.colnar_btn to images/Other/LetterColnar.pdf
Text.hansen_btn to images/Other/LetterHansen.pdf
Thanks!!

to keep it simple you should use three different named functions and three different named Variables:
function pdfLink1(event:MouseEvent):void {
    navigateToURL(pdfURL1,"_blank");
function pdfLink2(event:MouseEvent):void {
    navigateToURL(pdfURL2,"_blank");
function pdfLink3(event:MouseEvent):void {
    navigateToURL(pdfURL3,"_blank");

Similar Messages

  • Linking button to PDF file with published Windows Executable

    Hello all,
    I've been using Captivate 1 for years. I have always linked
    buttons to PDF files. The only thing I really ever had to remember
    was to take away the local directory address so where as only the
    filename was left. When I burned to CD I would just leave
    everything top-level.
    Well, for some reason now Captivate won't launch my pdf file
    (and yes I put the ".pdf"). It launches my web browser looking for
    a web address. Here's what I do. I create a new text or image
    button, next I select "open url or file". Finally I select the file
    through the browse window. I immediately take off the local
    directory before the filename because everything is located
    top-level on the CD's I produce.
    Please help, anyone. BTW I am experiencing the same thing on
    Captivate 2. I'm afraid I'm doing something silly wrong since it's
    been awhile. Thanks in advance .

    Hi Charles,
    Does by any chance you have upgraded your Flash Player
    recently? Flash Player 8 and above have restriction on not
    accessing the local files directly?
    thanks

  • I have a document made up of separate PDF files which reside in a folder and are linked to each other via hyperlinks. Each pdf file is set to open with bookmarks displayed, however if I link from one PDF file to another and use the "Previous View" button

    I have a document made up of separate PDF files which reside in a folder and are linked to each other via hyperlinks. Each pdf file is set to open with bookmarks displayed, however if I link from one PDF file to another and use the "Previous View" button to navigate back to my starting point the bookmarks are replaced by "page thumbnails". Is there anyway to stop this from happening?

    Hi Pusman,
    While setting up the links, if you choose to open the file in a new window then you won't face this issue, then you can simply switch to the previous file and bookmark view will remain as it is.
    Does that helps with your query?
    Regards,
    Rahul

  • Placing a PDF with hyperlinks/buttons into InDesign and retaining all the link/buttons after reprece

    I got a PDF file that has multiple links/buttons and I'm placing into an InDesign CS2 document with other items and then exporting out as another PDF for a digital edition magazine. I want to retain all the links/button once I export?

    James,
    I doubt that will work. But it should be easy enough to find out. If you
    print to pdf from ID, I guarantee is will not work. If you export from
    ID, I doubt it will work, but ask in the ID forum, since the creation
    does not depend upon Acrobat.
    Mike

  • ANN 1-hr webinars: Buttons for PDF Navigation/ Interactive Checklists/ Cross-File Links & Bookmarks

    Free; no fluff, no hype, no nonsense; starting 9am PDT
    • Creating Buttons for PDF Navigation using FrameMaker Hypertext Markers
    Wed, April 16
    https://www3.gotomeeting.com/register/817461086
    • Creating Interactive PDF Checklists with FrameMaker-to-Acrobat TimeSavers + Form Assistant
    Wed, April 23
    https://www3.gotomeeting.com/register/886165534
    • Cross-File Links and Bookmarks in PDFs Authored with FrameMaker
    Thu, May 1
    https://www3.gotomeeting.com/register/911390886
    Shlomo Perets
    MicroType, http://.microtype.com
    FrameMaker/Acrobat/Captivate training & consulting • FM-to-Acrobat TimeSavers/Assistants

    The Bookmark Panel to the left of the pdf is not displaying - I have checked everything (and double checked under preferences to ensure that under Documents > Open Settings > Restore last view settings when reopening documents is Not checked.)
    Have reinstalled Acrobat and still am having issues. The only thing I did was open AcrobatLive and converted a doc to a fillable form - I am getting error messages with that now as well.

  • Create a button to link to a pdf

    I created a button to link to a pdf but i cant get it to pull up when i click the button. Ive tried editing the index.asp file where the button resides but im having no luck. Can anyone help me?

    I infer that you are speaking of a form element button. You need not use a form to do this, just a hyperlink applied to the image of a button.
    I am unfamiliar with asp, but in straight html, all you need is an a tag wrapped around the 'button':
    <a href="[path to pdf]">button image</a>
    Beth

  • Linking to a .pdf in Captivate 7

    Can I add a button to a quiz slide for linking to a .pdf? The button seems to work on the text slides; however, when adding that same button to a question slide, it doesn't work (the .pdf file won't open).

    It is possible to add a shape button to a question slide, only interactive
    object that is allowed.
    Have a look at my blog post about shape buttons on question/score slide: http://blog.lilybiri.com/want-a-button-on-question-slide-in-captivate

  • MS Excel document as attachment to a PDF document does not open with a hot spot/link in the PDF

    Hi, I have attached an excel file to a pdf document. I need to open this document in a new window by clicking an icon/hotspot in the pdf document to which it it attached.
    I am using the Link Tool to create a hot spot around the icon in the pdf. In the next window I am using the Go to Page view option, opening the attachment to its first page and clicking the "set link" button.
    For some reason, clicking the hotspot does not open the excel document as it does another pdf document.
    Need help resolving this issue with attached documents.

    Select a particular download file. Press COMMAND-I to open the Get Info window.  In the Open With section choose the desired default application from the dropdown menu then click on the Change All button.
    For .dmg files use DiskImageMounter (System/Library/CoreServices/ folder.)
    For .zip files use Archiver - same folder as above - or download TheArchiver - MacUpdate or CNET Downloads.

  • Add web link to a PDF in preview

    Hello Mac World,
    I have a MacBook Air OSX 10.9.2
    I cannot seem to find how to add a working web-link to my PDF in preview.  I have looked in  Preview <tools>,<annotate> and there is no LINK button  
    Please help me to know if I need to buy a new program or if I'm just missing something here... Ps.. it's not in View either.
    Thank  you for your help,
    sunshine_415

    Open Preview, and check Help > Annotate a PDF.  It describes such things as adding a text bubble, etc.
    There is no explicit way to add a link in Preview.  Preview is, after all, primarily a viewer with a few markup tools.
    I happen to use a product called PDFPen which is available in the App Store to mark up PDFs.
    I have no financial interest in PDFPen.  I am a reasonably satisifed customer.

  • Linking from one PDF to another: Is there a more efficient way?

    Some background first:
    We make a large catalog (400pages) in Indesign and it's updated every year. We are a wholesale distributor and our pricing changes so we also make a price list with price ref # that corresponded with #s printed in the main catalogue.  Last year we also made this catalog interactive so that a pdf of it could be browsed using links and bookmarks. This is not too difficult using Indesign and making any adjustments in the exported PDF. Here is the part that becomes tedious and is especially so this year:
    We also set up links in the main catalog that go to the price list pdf - opening the page with the item's price ref # and prices... Here's my biggest issue - I have not found any way to do this except making links one at a time in Acrobat Pro (and setting various specifications like focus and action and which page (in the price list) to open) Last year this wasn't too bad because we used only one price list. It still took some time to go through and set up 400-500 links individually.
    This year we've simplified our linking a little by putting only one link per page but that is still 400 links. And this year I have 6 different price lists (price tiers...) to link to the main catalogue pdf. (That's in the neighborhood of 1200-1500 double clicking the link(button) to open Button Properties, click Actions tab, click Add..."Go to page view" , set link to other pdf page, click edit, change Open in to "New Window" and set Zoom.  This isn't a big deal if you only have a few Next, Previous, Home kind of buttons....but it's huge when you have hundreds of links. Surely there's a better way?
    Is there anyway in Acrobat or Indesign to more efficiently create and edit hundreds of links from one pdf to another?
    If anything is unclear and my question doesn't make sense please ask. I will do my best to help you answer my questions.
    Thanks

    George, I looked at the article talking about the fdf files and it sounds interesting. I've gathered that I could manipulate the pdf links by making an fdf file and importing that into the PDF, correct?
    Now, I wondered - can I export an fdf from the current pdf and then change what is in there and import it back into the pdf.  I've tried this (Forms>More Form Options>Manage Form Data>Export Data) and then opened the fdf in a text editor but I see nothing related to the documents links... I assume this is because the links are 'form' data to begin with - but is there away to export something with link data like that described in the article link you provided?
    Thanks

  • Combined PDF's and created links to original PDF's

    Combined multiple PDF's from several individuals into on E-book.  I also create a table of contents with links to original PDF's within the combined document.  Problem is that each link opens in a different magnification. Page 1 is 100%, 1st link 93%, 5 link 56%, etc.  Is it possible to have all pages open with the same magnification? (i.e. all open @ 100%).
    Thanks in advance.

    If the combined PDFs are within a single PDF file —
    Use the Link Action "Go to a page view".
    As the Create Go to View dialog states:
    "Use the scrollbars, mouse, and zoom tools to select the target view..."
    During this activity you can establish the desired zoom (page magnification of 100%).
    Once the activity is complete, click the Set Link button.
    Be well...

  • How to display message in Ajax Model pop-up extender/overlay on click of a link button

    I am dynamically create the link button using reapeter control and each link assign to different type of content.i want to show the content in  a overlay / Ajax modal pop-up extender. ( Content Type: Video/PDF/Text).
    I need to know how to display the content in overlay/Modal pop-up on click of the link button.

    Hi,
    According to your description, my understanding is that you want to display the content of Video/PDF/Text in a pop-up dialogue when clicking the link button.
    I suggest you can use the Jquery media plugin to open the file content in a pop up dialogue.
    Here is a detailed code demo for your reference:
    Jquery: Open PDF File in browser with Modal Popup using Jquery Media Plugin
    Thanks
    Best Regards
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • How to avoid safety warning when opening a pdf from an link in another pdf?

    I make pdf in Acrobat with links to other pdf files av have made. When i try to click a link to open the pdf, i get the safety question if trust it or if i will block it. How to avoid that question all the time?

    Hello Kvalitetetsansvarlig
    Try adding the PDF to the trust location in Acrobat
    Edit -> Preferences-> Security (Enhanced), Click on "Add File", and browse to your file.
    Click on "OK" button and check.
    Regards,
    Deepak

  • Linking to Adobe PDF on blog entry crashing iWeb

    Help! I have been using iWeb to create a website and blog. In a recent blog entry, i linked to an Adobe PDF file on my computer. The link was functioning and working fine, and then I saved the entry and iWeb crashed. I managed to open it back up by sending photos from iPhoto to iWeb. The other pages of the website work fine, and other blog posts also work fine. I tried publishing and the site published. However, in both iWeb and online, the blog post with the linked PDF is now just blank. The PDF works fine on its own and is not corrupted.
    I have tried editing the post as well as deleting it in iWeb, but every time I click either button iWeb crashes and gives me an error message. I cannot duplicate the blog post either. This would somehow be okay, but I cannot add a new blog entry in iWeb either (it crashes). other pages are unaffected. I have not attempted deleting the entire blog portion of the website yet. Is there anything I can do to get rid of the malfunctioning blog post besides deleting the whole website and starting from scratch? Bear in mind the back-up of the Domain I saved was after I saved the blog post. Is there a 3rd party app that I can open my Domain in to manually remove the blog entry, or someway to access the code to delete the data that way?

    This JUST happened to me as well after linking to a PDF file but now I can't get iWeb to load up, well, it opens and I can see the inspector pane but that is all...the main window is not there and I can't seem to figure out how to get it.
    I also noticed a bunch of iWeb stuff in the trash now in a "recovered files" folder.
    Any ideas?

  • Interactive Buttons in PDF not working when in iPhone

    Hello!
    I used CS3 to turn an InDesign document into an interactive PDF with buttons. It works just fine in a computer, but when I tried to view it in an iPhone, all interactive buttons are gone. Does anyone know why? Thanks! Here's the link for the PDF so you can try to view it on your own iPhones:
    http://www.cgu.edu/PDFFiles/Creative%20Service%20PDFs/Visitors%20Guide/VisitorsGuide2010B- Web.pdf

    Unfortunately there are no pdf reader which support this on neither the iPhone or the iPad.
    You have to create an App or rely on the limited functionality of the the pdf readers.
    I would like to see a pdf reader for the iPone, iPad ios supporting InDesign buttons and basis interactivity.
    :-) Nina Storm

Maybe you are looking for

  • Movie titles not showing up on SD card. TX with PQDVD

    Hi all, I am a new Palm TX user and have already gleaned much useful info from these forums.  I have purchased the PQDVD video program and it works fine except for one small quirk.  The movie titles do not show up on my SD card they way they do when

  • Retrieved param value is wrong from JSF  -- Plz hlp

    when i pass word with special character like tilbehør it is getting converted as tilbehør xhtml file i have input text...when i pass some text ..control goes to SearchBB as shown below.getting converted some wierd character for tilbehør ---> tilbehÃ

  • Does Apple mail have trouble with AOL E-mail addresses?

    When I send E-mail to an AOL E-mail address at least 50% of the time I get this annoying "Delivery Notification" failure crap messages back. I just copy and paste my original message and I keep sending it until I don't get that crappie message back a

  • MacBook Pro  Maverick 10.9.5 frequent crashes

    MacBook Pro 15" Mid 2010; Model Identifier: MacBookPro6,2  Processor Name: Intel Core i7; Processor Speed: 2.66 GHz; Number of Processors: 1; Total Number of Cores: 2;  L2 Cache (per Core): 256 KB;  L3 Cache: 4 MB; Memory: 8 GB; Processor Interconnec

  • HT4623 I updated my iphone and now its say I have to restore

    I updated my iphone and now its say I have to restore. Why