首页 > 解决方案 > 我的 xml 文件已加载到 swf 但在我将 swf 嵌入 html 页面时未加载

问题描述

我的 xml 文件已加载到 swf 但当我将 swf 嵌入 html 页面时没有加载任何帮助?

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;
    }
}

标签: xmlhtmlflash

解决方案


推荐阅读