Open PDF or Folder

混江龙づ霸主 提交于 2019-12-02 16:41:25

问题


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

Opening a PDF via urlRequest and navigateToUrl() always opens the browser.

I read about this solution with fscommand and it seems that we have 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.).

Is there a better way?


回答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



来源:https://stackoverflow.com/questions/6950774/open-pdf-or-folder

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!