一、错误说明
在Air中,如果我们要加载swf文件,有时候会报
SecurityError: Error #3015: Loader.loadBytes() is not permitted to load content with executable code.
这个错误是因为loadBytes方法不能加载可执行的内容。如果我们要避免此错误,要在加载的时候设置下LoaderContext将LoaderContext的allowLoadBytesCodeExecution属性设置为true
更多内容请看:www.yoewan.com
二、代码
var load:Loader = new Loader();
var context:LoaderContext = new LoaderContext();
context.allowLoadBytesCodeExecution = true;
load.loadBytes('yoewan.com',context);//在加载二进制数据流的时候将context也放入
更多内容请看:[url=http://www.yoewan.com]yoewan分享[/url]
在Air中,如果我们要加载swf文件,有时候会报
SecurityError: Error #3015: Loader.loadBytes() is not permitted to load content with executable code.
这个错误是因为loadBytes方法不能加载可执行的内容。如果我们要避免此错误,要在加载的时候设置下LoaderContext将LoaderContext的allowLoadBytesCodeExecution属性设置为true
更多内容请看:www.yoewan.com
二、代码
var load:Loader = new Loader();
var context:LoaderContext = new LoaderContext();
context.allowLoadBytesCodeExecution = true;
load.loadBytes('yoewan.com',context);//在加载二进制数据流的时候将context也放入
更多内容请看:[url=http://www.yoewan.com]yoewan分享[/url]