-->

Open PDF or Folder in Flash Player

2019-03-04 01:45发布

问题:

I try to open pdfs or folders (in finder/explorer) triggered by a mouse click in an swf application running in flash player.

opening a pdf via urlRequest and navigateToUrl() always opens the browser.

I read about this solution with fscommand: http://www.artfans.info/open-pdf-file-from-flash-using-fscommand/ seems then we had to write shell scripts for mac and pc...? doesn´t sound perfect.

the swf is executed on cd rom. so i think we can´t use an air application and the classes of the air framework (File... etc.).

Does anyone know a better way? Thanks in advance, Florian

回答1:

As far as I know, you unfortunately cannot open a PDF into flash natively. It sounds like these *PDF*s are static assets on your CD ROM so I would take a look at a PDF -> SWF conversion tool. Maybe something like swftools. All of this in efforts to replace your current *PDF*s with *SWF*s which you can then load via the flash.display.Loader class.



回答2:

we go now with zinc. it seems to be very powerful. you can create a exe from any swf. zinc let´s you implement many functions in actionscript, that give you access to the system. open pdf or something it the smallest task then :) cheers, florian