打开和使用ActionScript的手机显示PDF文件(IOS)文件、手机、ActionScript、IOS

2023-09-08 11:29:03 作者:独自在角落,黑夜中的我

目前我正在与Adobe AIR和实践得到使用ActionScript。我的目的是要显示在查看PDF文件(新iPad查看特定)。要做到这一点,我是用的URLRequest 指定PDF的位置,的HTMLLoader 负载的PDF。但是不工作,我读了文档中的以下内容:

Currently I am working with Adobe AIR and getting practice with ActionScript. My aim is to display a PDF file in a view (iPad view in specific). To do so, I was using URLRequest to specify the location of the PDF and HTMLLoader for load the PDF. However is not working, I read in the documentation the following:

HTMLLoader类。 AIR配置文件支持:此功能支持   所有的桌面操作系统,但不支持移动设备   或者在AIR for TV设备。

HTMLLoader class. AIR profile support: This feature is supported on all desktop operating systems, but is not supported on mobile devices or on AIR for TV devices.

由于这个原因,我想问问你的乡亲,如果你做了类似的东西,或者你知道一种解决方法呢?

For this reason I would like to ask you folks if you have done something similar, or do you know a workaround for it?

在此先感谢!

推荐答案

我想的StageWebView是你所需要的。

I think StageWebView is what you need.

我刚刚做了类似的事情像这样...

I've just done a similar thing like this...

var _file:String = "nameOfPdf.pdf";
var webView = new StageWebView();
webView.stage = stage;
webView.viewPort = new Rectangle(20,103,960,640);//specify the clipping mask(x,y,w,h)

//NB I have my pdf file as an included file here (added in the publish panel.
var fPath:String = new File(new File("app:/includes/"+_file).nativePath).url;
webView.loadURL( fPath );

//Alternatively you should be able to navigate to a URL
webView.loadURL("http://www.google.com");