6 Replies Latest reply on Jul 28, 2006 2:05 PM by septinite

    PDF Links don't work in Flaspaper

      I have a PDF with external links. However, when I use the FlashPaper driver to convert the PDF to a SWF, it totally ignores those links.

      Is there any workaround to this?

        • 1. Re: PDF Links don't work in Flaspaper
          i just ran into this same issue and uncovered a bit of a workaround. you can override the goToLinkTarget(linktarget:String, window:Object):Void method on the flashPaper object that you load. maybe a bit dirty, but it works.

          hope that helps.

          • 2. Re: PDF Links don't work in Flaspaper
            Septinte could you please attach some sample code so that I will understand better what you mean by
            overriding the gotToLinkTarget method?
            • 3. Re: PDF Links don't work in Flaspaper
              SeedofHope Level 1
              Yes, please! Some code would be great!

              • 4. Re: PDF Links don't work in Flaspaper
                septinite Level 1
                sorry for the late response, my pc didnt want to let me post

                anyway, i used this FlashPaperLoader component, cant remember the website, but the package is de.betriebsraum, so maybe that might help you find it. but if you want to just code a custom loader for flash paper, use the MovieClipLoader class but youll have to check for the existence of the flashPaper object within it. heres the code using that component:

                var loadListener:Object = {};
                loadListener.onLoad = function (eventObj:Object):Void {

                var fp:Object = eventObj.flashPaper;
                fp.goToLinkTarget = function (url:String, window:Object):Void {
                // your custom action goes here

                fpLoader.addEventListener("onLoad", loadListener);
                fpLoader.load("flash paper document url", target_mc);

                i could probably write up a non-component solution if you need.
                • 5. Re: PDF Links don't work in Flaspaper
                  SeedofHope Level 1

                  Thanks for the code. However, I'm still a newbie. I'm not exactly sure where to place it. Maybe the non-component solution might be easier to understand?

                  • 6. Re: PDF Links don't work in Flaspaper
                    septinite Level 1
                    ok, here goes, i havent tested this so i can't guarantee how good it is, its quick n dirty. youll need to have a movieclip to target using the movieclip loader. the whole overriding thing is a little advanced, heres an explanation:

                    - load the flashpaper swf as you would any normal swf file using MovieClipLoader
                    - when thats done loading youre not done yet, you need to wait until the flash paper interface has loaded within the loaded swf, so simply run an interval check until that handy function getIFlashPaper() actually returns a value
                    - when the flash paper interface is loaded re-write its goToLinkTarget function to do whatever it is you need to do with it, which i assume would be to load another flash paper swf into that same clip

                    let me know if that helps.