我有那个代码:
private function handleFlashVarsXmlLoaded(event:Event) : void
{
var secondsplit:String = null;
var item:Array = null;
var string:* = XML(String(event.target.data));
var notsplited:* = string.vars_CDATA; //what is .vars_CDATA?
var splitted:* = notsplitted.split("&");
var datacontainer:Object = {};
var index:Number = 0;
item = secondsplit.split("=");
datacontainer[item[0]] = item[1];
this.parseFlashVars(datacontainer); // go next
return;
}
该函数在加载 URLLoader 时加载。我认为此函数将 XML 文件解析为字符串(fe. param1=arg1¶m2=arg2
),然后将其拆分为“&”,然后拆分为“=”,然后将数据添加到数据容器中
datacontainer["param1"] = "arg1"
但是 XML 文件应该是什么样子,什么是字符串。vars_CDATA