Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/actionscript-3/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Actionscript 3 as3 URLLoader始终失败,出现IOError_Actionscript 3_Urlloader - Fatal编程技术网

Actionscript 3 as3 URLLoader始终失败,出现IOError

Actionscript 3 as3 URLLoader始终失败,出现IOError,actionscript-3,urlloader,Actionscript 3,Urlloader,我在flex应用程序中遇到URLRequest问题,无论我尝试哪个url,它都会失败: var r:URLRequest = new URLRequest("http://stackoverflow.com"); var l:URLLoader = new URLLoader(); l.addEventListener(IOErrorEvent.IO_ERROR, function(e:IOErrorEvent):void {

我在flex应用程序中遇到URLRequest问题,无论我尝试哪个url,它都会失败:

var r:URLRequest = new URLRequest("http://stackoverflow.com");
var l:URLLoader = new URLLoader();          
l.addEventListener(IOErrorEvent.IO_ERROR, function(e:IOErrorEvent):void {
                                                              trace(e);
                           });
l.load(r);
这是我得到的错误:

[IOErrorEvent type=“ioError”bubbles=false cancelable=false eventPhase=2 text=“Error#2032:Error de secuencia.URL:]

很明显,url没有关闭,因为我现在正在使用它来发布这个。我也尝试过其他的,比如google.com,它们在我的浏览器中运行正常,我也遇到了同样的错误。有人知道问题出在哪里吗


谢谢你

代码不应该编译,你的侦听器函数正在接受一个不存在的类型(
e:IO_ERROR
应该是
e:IOErrorEvent
)。这是发布代码时的一个错误,实际代码有IOErrorEvent,修复了它。我明白了。不管怎样,我测试了你的代码,它对我来说很好,没有错误。我向它添加了一个完整的侦听器,并获得了预期的数据。你能提供更多关于你测试环境的信息吗?对我来说很好。复制并粘贴。可能是系统环境问题。安全沙箱?虽然这应该是另一个错误。我还认为这可能是环境问题,但是编译后的swf在将url放入另一台机器的Web服务器后也无法加载任何url。该项目是用flashdevelop创建的,我没有更改任何设置