Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/xml/15.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
如何加载带有URL变量的.xml文件_Xml_Actionscript 3_Urlloader_Urlvariables - Fatal编程技术网

如何加载带有URL变量的.xml文件

如何加载带有URL变量的.xml文件,xml,actionscript-3,urlloader,urlvariables,Xml,Actionscript 3,Urlloader,Urlvariables,如何使用AS3加载带有URL变量的.xml文件 示例:文件 xml?Varsher var loa:URLLoader = new URLLoader(); loa.addEventListener(Event.COMPLETE, gocom); loa.addEventListener(IOErrorEvent.IO_ERROR, gotError); loa.load(new URLRequest("example.xml")); function gotError(event:IOEr

如何使用AS3加载带有URL变量的.xml文件

示例:文件
xml?Varsher

var loa:URLLoader = new URLLoader();
loa.addEventListener(Event.COMPLETE, gocom);
loa.addEventListener(IOErrorEvent.IO_ERROR, gotError);
loa.load(new URLRequest("example.xml"));


function gotError(event:IOErrorEvent):void{
    trace("INVALID");
}//  function gotError


function gocom(event:Event){

    var userxml:XML = new XML(loa.data);
    XML.ignoreProcessingInstructions = false;
    userxml = new XML(loa.data);

}


//   INVALID

你到底想在这里完成什么?您是否正在尝试使用URL变量指定要应用程序加载的xml文件?你的帖子没有多大意义,因为你不需要使用URLVariables来加载XML文件,听起来你正在为一项已经可以很容易完成的任务做更多的工作。是的,听起来我好像做错了,但我想知道这是否可行。如果你知道你要完成什么,几乎任何事情都可以工作。;)看看错误是什么。跟踪(event.text);