dcsimg
A Flash Developer Resource Site

Results 1 to 13 of 13

Thread: Linking PDFs in Flash

  1. #1
    Junior Member
    Join Date
    Oct 2002
    Location
    Long Island, New York
    Posts
    29

    Linking PDFs in Flash

    Can you link dirrectly to a PDF in flash....such as creating a CD

  2. #2
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397

    Re: Linking PDFs in Flash

    Originally posted by MacArtist6
    Can you link dirrectly to a PDF in flash....such as creating a CD


    Link or create?

  3. #3
    Gods cower, women quiver. Buckwheat469's Avatar
    Join Date
    Dec 2003
    Location
    Uranus
    Posts
    247
    getURL("something.pdf",_self);

    Creating is a different story though.

    Oh, oldnewbie, I'm catching up to you now! I got into the 200's. One day I will look down at you with your meager 17000 posts.
    yup.

  4. #4
    Junior Member
    Join Date
    Oct 2002
    Location
    Long Island, New York
    Posts
    29
    I want to link a PDF to a button in flash... so when you click the button it opens the PDF in Acrobat.... is this possible????

    thanks for your help!

  5. #5
    Gods cower, women quiver. Buckwheat469's Avatar
    Join Date
    Dec 2003
    Location
    Uranus
    Posts
    247
    on(release){
    getURL("something.pdf",_blank);
    }
    yup.

  6. #6
    Junior Member
    Join Date
    Mar 2003
    Posts
    23
    I have an additional question on the same subject.

    On a web page, I'm using the getURL("xxxxxxx.pdf", "_blank") to get a PDF to open in a new window using onRelease on a button. It works fine - to point. It opens the new window, but rather than just opening the PDF with Acrobat in the browser window, a 'save' dialog box opens and if you hit "save", then you get the error message that says IE can't d/l the file, the name is wrong, yadda, yadda. The file name is correct, the path is correct (its in the same directory as the SWF file), but for some reason its not opening the file in the browser window with Acrobat.

    To add a twist, if I test this same movie on my local machine, it works perfectly - you click the button, a new window opens, and the PDF file opens inside it with Acrobat !

    So, anyone know why it doesn't work from the server in a normal browser session, but DOES work properly on my machine ??

    Any input would be greatly appreciated

  7. #7
    Gods cower, women quiver. Buckwheat469's Avatar
    Join Date
    Dec 2003
    Location
    Uranus
    Posts
    247
    try linking the entire URL and make sure the latest Acrobat is installed on the computer trying to download it.

    getURL("http://....something.pdf",_blank);
    yup.

  8. #8
    Junior Member
    Join Date
    Mar 2003
    Posts
    23
    Yah... I tried that too, using the whole URL - same results and my PC has the latest Acrobat plugin installed. It does work properly testing from my machine, it fails when I put it up on the development web server and then browse to that web page. That's what's got me stumped.

  9. #9
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    To my knowledge you shouldn't be using the "_blank" parameter.
    Just...
    code:

    on(release){
    getURL("http://www.yourserver.com/something.pdf");
    }



    It will open in a new window, but like through an Acrobat "browser plugin" and not in the Acrobat reader alone , as it would if you opened a .pdf locally.

  10. #10
    Junior Member
    Join Date
    Mar 2003
    Posts
    23
    Hmm.... I just tried that.. it doesn't work either Same results w/o the new window opening - "save" dialog box opens, then IE says it 'can't find the site' - but it works perfectly from my machine. I don't get it...

    We open PDF files on the site all the time, but this is the first time I've tried to do it from within a Flash movie.

    I appreciate the suggestions

  11. #11
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Ok! I'm on IE5.5! Just tried this 1 frame Flash movie test...

    stop();
    getURL("http://www.my_server/swf/DocBox.pdf", "_blank");

    Or...

    stop();
    getURL("http://www.my_server/swf/DocBox.pdf");

    Works fine both ways... No download screens... And that posted pdf link above appears fine in a new browser window...
    Last edited by oldnewbie; 10-01-2004 at 11:15 PM.

  12. #12
    Gods cower, women quiver. Buckwheat469's Avatar
    Join Date
    Dec 2003
    Location
    Uranus
    Posts
    247
    Reinstall your acrobat or try a different PDF to make sure it's not something wrong with the PDF.
    yup.

  13. #13
    Junior Member
    Join Date
    Mar 2003
    Posts
    23
    Nope, PDF is fine and so is my Acrobat and Reader plug-in.

    This is too weird....

    I'm trying to get this to fire off with an onRelease() on a button. What I WANT the thing to do is when the user presses the button that will load up the external MP3, it will ALSO open up the companion PDF file for that traning session.

    Here's the script (got this from Kenny Bellew's tut)

    on (press) {
    if (playing02!=true && playing!=true) {
    playing02=true;
    paused02=false;
    stopped02=false;
    loaded02=true;
    myEvent=0
    myStreaming=1
    //myMusic02 = new Sound(myMusicMc02);
    myMusic02 = new Sound();
    myMusic02.loadSound("coding.mp3",true);
    myMusic02Position=0;
    myMusic02Volume=50;
    myMusic02.setVolume(myMusic02Volume);
    mySongTypeText="Conference Call ";
    myInfoText= "Coding Bridging the Gap"
    }
    myMusic02.onSoundComplete=function() {playing02=false}

    on (release) {
    getURL("http://myserver.net/intrprct/training/icd10_sept04/training.pdf");
    */

    }


    As I said, I'm not an actionscripter by any stretch. Its just so odd that this works from my local machine and not from the server.
    Last edited by LadynRed; 10-07-2004 at 01:15 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center