当我将swf嵌入到html页面时,我的xml文件被加载到swf中但没有加载

时间:2018-05-03 20:20:57

标签: xml html5 flash

当我将swf嵌入到html页面时,我的xml文件被加载到swf中但没有加载 有什么帮助吗?

var data1:XML = new XML();
data1.ignoreWhite=true;
data1.load("foods.xml");

data1.onLoad = function(success){
if (success){
    name_txt.text = data1.firstChild.childNodes[0].attributes.name;
    count_txt.text = data1.firstChild.childNodes[0].attributes.count;
    type_txt.text = data1.firstChild.childNodes[0].attributes.type;
    }
}

0 个答案:

没有答案