【问题标题】:FlashDevelop iOS Export - Security errorFlashDevelop iOS 导出 - 安全错误
【发布时间】:2013-08-13 06:26:30
【问题描述】:

当尝试在我的适用于 iOS 的 actionscript 3 项目中加载本地 swf 时,我得到以下信息 调试器中的错误:

[Fault] exception, information=SecurityError: Error #3207: Application-sandbox content cannot access this feature.

我卡住了,有什么建议吗?

Security.allowDomain("*");

给我同样的结果。

米尔扎

【问题讨论】:

    标签: iphone ios actionscript-3


    【解决方案1】:

    在loader对象中,你是否在load()函数上设置了LoaderContext对象?

    【讨论】:

    • 是的,这就是我所做的: // 入口点 Security.allowDomain("*"); var mLoader:Loader = new Loader(); var mRequest:URLRequest = new URLRequest("DSDShell.swf"); var _lc:LoaderContext = new LoaderContext(false, ApplicationDomain.currentDomain, null); mLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onCompleteHandler); mLoader.load(mRequest, _lc);
    • 在调试器中,本地测试使用以下代码做得很好: import flash.display.Loader;导入 flash.events.Event;导入 flash.net.URLRequest; var l:Loader = new Loader(); l.contentLoaderInfo.addEventListener(Event.COMPLETE, onComplete); l.load(new URLRequest("test_swf.swf"));函数 onComplete(e:Event):void { addChild(l.content); }
    • 不在我身边...真的很奇怪,我使用 flashdevelop 和最新的 air sdk,我遇到了同样的安全错误
    • 当我在调试器外部运行 SWF 时,它工作正常,广告加载另一个 swf...但不是在 adl 测试调试器中,这很奇怪
    • 打包成ipa的时候,需要在某个地方嵌入本地swf吗?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-12-29
    • 1970-01-01
    • 2013-08-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-03-01
    相关资源
    最近更新 更多