【发布时间】:2012-04-13 11:43:26
【问题描述】:
我正在使用 StageWebView 在我的 iPhone 应用程序中加载 mp4 和 pdf 文件(适用于 iOS 的 Adobe air 3.2,在 Flash CS5.5 中)
下面是我用来加载 pdf 文件的代码(加载 mp4 文件的代码相同)。
我需要将文件保存在 iPhone 上,所以下次用户打开应用程序时,我会检查文件是否存在,我会使用 FileStream.open(filePath, FileMode.READ); 加载它。 有没有办法保存使用 StageWebView 加载的文件?如果没有,最好的方法是什么。
import flash.filesystem.FileMode;
import flash.filesystem.FileStream;
import flash.filesystem.File;
var fPath:String = "http://www.bloomerangs.com/Axor/Water-Bath-Design Museum - short version.pdf";
var webView = new StageWebView();
webView.stage = stage;
webView.viewPort = new Rectangle(0, 32, 320, 480);
webView.addEventListener(Event.COMPLETE, onComplete);
webView.loadURL( fPath );
function onComplete(event:Event):void{
trace("event = ", event);
trace("event.target = ", event.target);
}
提前致谢! :)
【问题讨论】:
标签: actionscript-3 flash air